clauder-hub 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/dist/index.js +45 -1
- package/web/dist/assets/{MonacoEditor-Bg4hRqI5.js → MonacoEditor-DbrZH7RQ.js} +3 -3
- package/web/dist/assets/{cssMode-DLI5rcet.js → cssMode-CBcwtbru.js} +1 -1
- package/web/dist/assets/{freemarker2-mAdBy1ef.js → freemarker2-CmgEqz0j.js} +1 -1
- package/web/dist/assets/{handlebars-oBXdwkfB.js → handlebars-Bc5wn073.js} +1 -1
- package/web/dist/assets/{html-CM-JtQHa.js → html-Bx1ZYBKn.js} +1 -1
- package/web/dist/assets/{htmlMode-CyciH8Jt.js → htmlMode-Dy1sq2ZA.js} +1 -1
- package/web/dist/assets/index-D_FK5tAf.js +609 -0
- package/web/dist/assets/index-Dvl-6HEm.css +32 -0
- package/web/dist/assets/{index-B6o9B1RJ.js → index-jesLojEl.js} +1 -1
- package/web/dist/assets/{javascript-Dug1TGVe.js → javascript-RNvbIxFA.js} +1 -1
- package/web/dist/assets/{jsonMode-Do9Nqf7f.js → jsonMode-DEyUdKfX.js} +1 -1
- package/web/dist/assets/{liquid-CHZH40XM.js → liquid-ClawdWz2.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-DLJaDw3I.js → lspLanguageFeatures-B2Ri5yOC.js} +1 -1
- package/web/dist/assets/{mdx-CXrR4qVw.js → mdx-DhBuyid8.js} +1 -1
- package/web/dist/assets/{python-fhlUKliP.js → python-CqlBzS34.js} +1 -1
- package/web/dist/assets/{razor-B774Z11E.js → razor-Ccg59w6F.js} +1 -1
- package/web/dist/assets/{tsMode-ByWGGE4I.js → tsMode-D4XYmQ0Q.js} +1 -1
- package/web/dist/assets/{typescript-q7upuKXr.js → typescript-YNrO5mxL.js} +1 -1
- package/web/dist/assets/{workers-wzQbKBVv.js → workers-WMxUHImw.js} +1 -1
- package/web/dist/assets/{xml-DUBlUOt_.js → xml-VlPSTB_q.js} +1 -1
- package/web/dist/assets/{yaml-B9bmiZBG.js → yaml-CbcwIq08.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-BLJkMcyM.js +0 -594
- package/web/dist/assets/index-Ckf-TUxu.css +0 -32
|
@@ -1,594 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MonacoEditor-Bg4hRqI5.js","assets/MonacoEditor-BbYsqB7V.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var zx=e=>{throw TypeError(e)};var Hx=(e,i,r)=>i.has(e)||zx("Cannot "+r);var un=(e,i,r)=>(Hx(e,i,"read from private field"),r?r.call(e):i.get(e)),Fx=(e,i,r)=>i.has(e)?zx("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,r),_p=(e,i,r,s)=>(Hx(e,i,"write to private field"),s?s.call(e,r):i.set(e,r),r);function s3(e,i){for(var r=0;r<i.length;r++){const s=i[r];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const p=Object.getOwnPropertyDescriptor(s,l);p&&Object.defineProperty(e,l,p.get?p:{enumerable:!0,get:()=>s[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const p of l)if(p.type==="childList")for(const f of p.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function r(l){const p={};return l.integrity&&(p.integrity=l.integrity),l.referrerPolicy&&(p.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?p.credentials="include":l.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function s(l){if(l.ep)return;l.ep=!0;const p=r(l);fetch(l.href,p)}})();function Km(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xp={exports:{}},ml={};/**
|
|
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 Ux;function o3(){if(Ux)return ml;Ux=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,l,p){var f=null;if(p!==void 0&&(f=""+p),l.key!==void 0&&(f=""+l.key),"key"in l){p={};for(var a in l)a!=="key"&&(p[a]=l[a])}else p=l;return l=p.ref,{$$typeof:e,type:s,key:f,ref:l!==void 0?l:null,props:p}}return ml.Fragment=i,ml.jsx=r,ml.jsxs=r,ml}var $x;function a3(){return $x||($x=1,xp.exports=o3()),xp.exports}var v=a3(),yp={exports:{}},He={};/**
|
|
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 qx;function l3(){if(qx)return He;qx=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),f=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),y=Symbol.iterator;function E(V){return V===null||typeof V!="object"?null:(V=y&&V[y]||V["@@iterator"],typeof V=="function"?V:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,b={};function w(V,ne,le){this.props=V,this.context=ne,this.refs=b,this.updater=le||S}w.prototype.isReactComponent={},w.prototype.setState=function(V,ne){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,ne,"setState")},w.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function x(){}x.prototype=w.prototype;function T(V,ne,le){this.props=V,this.context=ne,this.refs=b,this.updater=le||S}var D=T.prototype=new x;D.constructor=T,g(D,w.prototype),D.isPureReactComponent=!0;var R=Array.isArray;function L(){}var A={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(V,ne,le){var X=le.ref;return{$$typeof:e,type:V,key:ne,ref:X!==void 0?X:null,props:le}}function I(V,ne){return M(V.type,ne,V.props)}function B(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function H(V){var ne={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(le){return ne[le]})}var U=/\/+/g;function W(V,ne){return typeof V=="object"&&V!==null&&V.key!=null?H(""+V.key):ne.toString(36)}function Y(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(L,L):(V.status="pending",V.then(function(ne){V.status==="pending"&&(V.status="fulfilled",V.value=ne)},function(ne){V.status==="pending"&&(V.status="rejected",V.reason=ne)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function Q(V,ne,le,X,$){var oe=typeof V;(oe==="undefined"||oe==="boolean")&&(V=null);var ee=!1;if(V===null)ee=!0;else switch(oe){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(V.$$typeof){case e:case i:ee=!0;break;case m:return ee=V._init,Q(ee(V._payload),ne,le,X,$)}}if(ee)return $=$(V),ee=X===""?"."+W(V,0):X,R($)?(le="",ee!=null&&(le=ee.replace(U,"$&/")+"/"),Q($,ne,le,"",function(Se){return Se})):$!=null&&(B($)&&($=I($,le+($.key==null||V&&V.key===$.key?"":(""+$.key).replace(U,"$&/")+"/")+ee)),ne.push($)),1;ee=0;var ue=X===""?".":X+":";if(R(V))for(var he=0;he<V.length;he++)X=V[he],oe=ue+W(X,he),ee+=Q(X,ne,le,oe,$);else if(he=E(V),typeof he=="function")for(V=he.call(V),he=0;!(X=V.next()).done;)X=X.value,oe=ue+W(X,he++),ee+=Q(X,ne,le,oe,$);else if(oe==="object"){if(typeof V.then=="function")return Q(Y(V),ne,le,X,$);throw ne=String(V),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return ee}function K(V,ne,le){if(V==null)return V;var X=[],$=0;return Q(V,X,"","",function(oe){return ne.call(le,oe,$++)}),X}function z(V){if(V._status===-1){var ne=V._result,le=ne();le.then(function(X){(V._status===0||V._status===-1)&&(V._status=1,V._result=X,le.status===void 0&&(le.status="fulfilled",le.value=X))},function(X){(V._status===0||V._status===-1)&&(V._status=2,V._result=X,le.status===void 0&&(le.status="rejected",le.reason=X))}),V._status===-1&&(V._status=0,V._result=le)}if(V._status===1)return V._result.default;throw V._result}var O=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)};function G(V){var ne=A.T,le={};le.types=ne!==null?ne.types:null,A.T=le;try{var X=V(),$=A.S;$!==null&&$(le,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(L,O)}catch(oe){O(oe)}finally{ne!==null&&le.types!==null&&(ne.types=le.types),A.T=ne}}function Z(V){var ne=A.T;if(ne!==null){var le=ne.types;le===null?ne.types=[V]:le.indexOf(V)===-1&&le.push(V)}else G(Z.bind(null,V))}var F={map:K,forEach:function(V,ne,le){K(V,function(){ne.apply(this,arguments)},le)},count:function(V){var ne=0;return K(V,function(){ne++}),ne},toArray:function(V){return K(V,function(ne){return ne})||[]},only:function(V){if(!B(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return He.Activity=c,He.Children=F,He.Component=w,He.Fragment=r,He.Profiler=l,He.PureComponent=T,He.StrictMode=s,He.Suspense=h,He.ViewTransition=_,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,He.__COMPILER_RUNTIME={__proto__:null,c:function(V){return A.H.useMemoCache(V)}},He.addTransitionType=Z,He.cache=function(V){return function(){return V.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(V,ne,le){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var X=g({},V.props),$=V.key;if(ne!=null)for(oe in ne.key!==void 0&&($=""+ne.key),ne)!j.call(ne,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&ne.ref===void 0||(X[oe]=ne[oe]);var oe=arguments.length-2;if(oe===1)X.children=le;else if(1<oe){for(var ee=Array(oe),ue=0;ue<oe;ue++)ee[ue]=arguments[ue+2];X.children=ee}return M(V.type,$,X)},He.createContext=function(V){return V={$$typeof:f,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:p,_context:V},V},He.createElement=function(V,ne,le){var X,$={},oe=null;if(ne!=null)for(X in ne.key!==void 0&&(oe=""+ne.key),ne)j.call(ne,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&($[X]=ne[X]);var ee=arguments.length-2;if(ee===1)$.children=le;else if(1<ee){for(var ue=Array(ee),he=0;he<ee;he++)ue[he]=arguments[he+2];$.children=ue}if(V&&V.defaultProps)for(X in ee=V.defaultProps,ee)$[X]===void 0&&($[X]=ee[X]);return M(V,oe,$)},He.createRef=function(){return{current:null}},He.forwardRef=function(V){return{$$typeof:a,render:V}},He.isValidElement=B,He.lazy=function(V){return{$$typeof:m,_payload:{_status:-1,_result:V},_init:z}},He.memo=function(V,ne){return{$$typeof:d,type:V,compare:ne===void 0?null:ne}},He.startTransition=G,He.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},He.use=function(V){return A.H.use(V)},He.useActionState=function(V,ne,le){return A.H.useActionState(V,ne,le)},He.useCallback=function(V,ne){return A.H.useCallback(V,ne)},He.useContext=function(V){return A.H.useContext(V)},He.useDebugValue=function(){},He.useDeferredValue=function(V,ne){return A.H.useDeferredValue(V,ne)},He.useEffect=function(V,ne){return A.H.useEffect(V,ne)},He.useEffectEvent=function(V){return A.H.useEffectEvent(V)},He.useId=function(){return A.H.useId()},He.useImperativeHandle=function(V,ne,le){return A.H.useImperativeHandle(V,ne,le)},He.useInsertionEffect=function(V,ne){return A.H.useInsertionEffect(V,ne)},He.useLayoutEffect=function(V,ne){return A.H.useLayoutEffect(V,ne)},He.useMemo=function(V,ne){return A.H.useMemo(V,ne)},He.useOptimistic=function(V,ne){return A.H.useOptimistic(V,ne)},He.useReducer=function(V,ne,le){return A.H.useReducer(V,ne,le)},He.useRef=function(V){return A.H.useRef(V)},He.useState=function(V){return A.H.useState(V)},He.useSyncExternalStore=function(V,ne,le){return A.H.useSyncExternalStore(V,ne,le)},He.useTransition=function(){return A.H.useTransition()},He.version="19.3.1",He}var Vx;function Qm(){return Vx||(Vx=1,yp.exports=l3()),yp.exports}var P=Qm();const wl=Km(P),ha=s3({__proto__:null,default:wl},[P]);var bp={exports:{}},gl={},Sp={exports:{}},wp={};/**
|
|
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 Wx;function c3(){return Wx||(Wx=1,(function(e){function i(Y,Q){var K=Y.length;Y.push(Q);e:for(;0<K;){var z=K-1>>>1,O=Y[z];if(0<l(O,Q))Y[z]=Q,Y[K]=O,K=z;else break e}}function r(Y){return Y.length===0?null:Y[0]}function s(Y){if(Y.length===0)return null;var Q=Y[0],K=Y.pop();if(K!==Q){Y[0]=K;e:for(var z=0,O=Y.length,G=O>>>1;z<G;){var Z=2*(z+1)-1,F=Y[Z],V=Z+1,ne=Y[V];if(0>l(F,K))V<O&&0>l(ne,F)?(Y[z]=ne,Y[V]=K,z=V):(Y[z]=F,Y[Z]=K,z=Z);else if(V<O&&0>l(ne,K))Y[z]=ne,Y[V]=K,z=V;else break e}}return Q}function l(Y,Q){var K=Y.sortIndex-Q.sortIndex;return K!==0?K:Y.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;e.unstable_now=function(){return p.now()}}else{var f=Date,a=f.now();e.unstable_now=function(){return f.now()-a}}var h=[],d=[],m=1,c=null,_=3,y=!1,E=!1,S=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function T(Y){for(var Q=r(d);Q!==null;){if(Q.callback===null)s(d);else if(Q.startTime<=Y)s(d),Q.sortIndex=Q.expirationTime,i(h,Q);else break;Q=r(d)}}function D(Y){if(S=!1,T(Y),!E)if(r(h)!==null)E=!0,R||(R=!0,B());else{var Q=r(d);Q!==null&&W(D,Q.startTime-Y)}}var R=!1,L=-1,A=5,j=-1;function M(){return g?!0:!(e.unstable_now()-j<A)}function I(){if(g=!1,R){var Y=e.unstable_now();j=Y;var Q=!0;try{e:{E=!1,S&&(S=!1,w(L),L=-1),y=!0;var K=_;try{t:{for(T(Y),c=r(h);c!==null&&!(c.expirationTime>Y&&M());){var z=c.callback;if(typeof z=="function"){c.callback=null,_=c.priorityLevel;var O=z(c.expirationTime<=Y);if(Y=e.unstable_now(),typeof O=="function"){c.callback=O,T(Y),Q=!0;break t}c===r(h)&&s(h),T(Y)}else s(h);c=r(h)}if(c!==null)Q=!0;else{var G=r(d);G!==null&&W(D,G.startTime-Y),Q=!1}}break e}finally{c=null,_=K,y=!1}Q=void 0}}finally{Q?B():R=!1}}}var B;if(typeof x=="function")B=function(){x(I)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,U=H.port2;H.port1.onmessage=I,B=function(){U.postMessage(null)}}else B=function(){b(I,0)};function W(Y,Q){L=b(function(){Y(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Y){Y.callback=null},e.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"):A=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(Y){switch(_){case 1:case 2:case 3:var Q=3;break;default:Q=_}var K=_;_=Q;try{return Y()}finally{_=K}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(Y,Q){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var K=_;_=Y;try{return Q()}finally{_=K}},e.unstable_scheduleCallback=function(Y,Q,K){var z=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?z+K:z):K=z,Y){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=K+O,Y={id:m++,callback:Q,priorityLevel:Y,startTime:K,expirationTime:O,sortIndex:-1},K>z?(Y.sortIndex=K,i(d,Y),r(h)===null&&Y===r(d)&&(S?(w(L),L=-1):S=!0,W(D,K-z))):(Y.sortIndex=O,i(h,Y),E||y||(E=!0,R||(R=!0,B()))),Y},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(Y){var Q=_;return function(){var K=_;_=Q;try{return Y.apply(this,arguments)}finally{_=K}}}})(wp)),wp}var Gx;function u3(){return Gx||(Gx=1,Sp.exports=c3()),Sp.exports}var Cp={exports:{}},hn={};/**
|
|
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 Yx;function h3(){if(Yx)return hn;Yx=1;var e=Qm();function i(m){var c="https://react.dev/errors/"+m;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)c+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+m+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal"),p=Symbol.for("react.recoverable"),f=Symbol.for("react.optimistic_key");function a(m,c,_){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:y===f?f:""+y,children:m,containerInfo:c,implementation:_}}var h=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,c){if(m==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,hn.browser=function(m){return{$$typeof:p,_reason:m}},hn.createPortal=function(m,c){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(i(299));return a(m,c,null,_)},hn.flushSync=function(m){var c=h.T,_=s.p;try{if(h.T=null,s.p=2,m)return m()}finally{h.T=c,s.p=_,s.d.f()}},hn.preconnect=function(m,c){typeof m=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,s.d.C(m,c))},hn.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},hn.preinit=function(m,c){if(typeof m=="string"&&c&&typeof c.as=="string"){var _=c.as,y=d(_,c.crossOrigin),E=typeof c.integrity=="string"?c.integrity:void 0,S=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;_==="style"?s.d.S(m,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:y,integrity:E,fetchPriority:S}):_==="script"&&s.d.X(m,{crossOrigin:y,integrity:E,fetchPriority:S,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},hn.preinitModule=function(m,c){if(typeof m=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var _=d(c.as,c.crossOrigin);s.d.M(m,{crossOrigin:_,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0})}}else c==null&&s.d.M(m)},hn.preload=function(m,c){if(typeof m=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var _=c.as,y=d(_,c.crossOrigin);s.d.L(m,_,{crossOrigin:y,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},hn.preloadModule=function(m,c){if(typeof m=="string")if(c){var _=d(c.as,c.crossOrigin);s.d.m(m,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:_,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0})}else s.d.m(m)},hn.requestFormReset=function(m){s.d.r(m)},hn.unstable_batchedUpdates=function(m,c){return m(c)},hn.useFormState=function(m,c,_){return h.H.useFormState(m,c,_)},hn.useFormStatus=function(){return h.H.useHostTransitionStatus()},hn.version="19.3.1",hn}var Xx;function oS(){if(Xx)return Cp.exports;Xx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(i){console.error(i)}}return e(),Cp.exports=h3(),Cp.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 Kx;function d3(){if(Kx)return gl;Kx=1;var e=u3(),i=Qm(),r=oS();function s(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function p(t){for(var n=t,o=n;o&&!o.alternate;)n=o,(n.flags&4098)!==0&&(t=n.return),o=n.return;for(;n.return;)n=n.return;return n.tag===3?t:null}function f(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function a(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function h(t){if(p(t)!==t)throw Error(s(188))}function d(t){var n=t.alternate;if(!n){if(n=p(t),n===null)throw Error(s(188));return n!==t?null:t}for(var o=t,u=n;;){var C=o.return;if(C===null)break;var k=C.alternate;if(k===null){if(u=C.return,u!==null){o=u;continue}break}if(C.child===k.child){for(k=C.child;k;){if(k===o)return h(C),t;if(k===u)return h(C),n;k=k.sibling}throw Error(s(188))}if(o.return!==u.return)o=C,u=k;else{for(var N=!1,q=C.child;q;){if(q===o){N=!0,o=C,u=k;break}if(q===u){N=!0,u=C,o=k;break}q=q.sibling}if(!N){for(q=k.child;q;){if(q===o){N=!0,o=k,u=C;break}if(q===u){N=!0,u=k,o=C;break}q=q.sibling}if(!N)throw Error(s(189))}}if(o.alternate!==u)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?t:n}function m(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=m(t),n!==null)return n;t=t.sibling}return null}function c(t,n,o,u,C,k){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&o(t,u,C,k)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&c(t.child,n,o,u,C,k))return!0;t=t.sibling}return!1}function _(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function y(t){var n=!1;for(t=t.return;t!==null&&(t.tag===4&&(n=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return n}function E(t){var n=[null,null],o=_(t);return o===null||S(n,t,o.child,{foundSelf:!1}),n}function S(t,n,o,u){for(;o!==null;){if(o===n)u.foundSelf=!0;else if(o.tag===5||o.tag===27||o.tag===6){if(u.foundSelf)return t[1]=o,!0;t[0]=o}else if((o.tag!==22||o.memoizedState===null)&&S(t,n,o.child,u))return!0;o=o.sibling}return!1}function g(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(s(559))}}var b=null,w=null;function x(t,n,o){return t===o?!0:t===n?(b=t,!0):!1}function T(t,n,o){return t===o?(w=t,!1):t===n?(w!==null&&(b=t),!0):!1}function D(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function R(t,n,o){for(var u=0,C=t;C;C=o(C))u++;C=0;for(var k=n;k;k=o(k))C++;for(;0<u-C;)t=o(t),u--;for(;0<C-u;)n=o(n),C--;for(;u--;){if(t===n||n!==null&&t===n.alternate)return t;t=o(t),n=o(n)}return null}var L=Object.assign,A=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),W=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),Z=Symbol.for("react.legacy_hidden"),F=Symbol.for("react.memo_cache_sentinel"),V=Symbol.for("react.view_transition"),ne=Symbol.for("react.recoverable"),le=Symbol.iterator;function X(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var $=Symbol.for("react.client.reference");function oe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case I:return"Fragment";case H:return"Profiler";case B:return"StrictMode";case Q:return"Suspense";case K:return"SuspenseList";case G:return"Activity";case V:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case M:return"Portal";case W:return t.displayName||"Context";case U:return(t._context.displayName||"Context")+".Consumer";case Y:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z:return n=t.displayName||null,n!==null?n:oe(t.type)||"Memo";case O:n=t._payload,t=t._init;try{return oe(t(n))}catch{}}return null}var ee=Array.isArray,ue=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se={pending:!1,data:null,method:null,action:null},be=[],Re=-1;function qe(t){return{current:t}}function Ee(t){0>Re||(t.current=be[Re],be[Re]=null,Re--)}function ze(t,n){Re++,be[Re]=t.current,t.current=n}var Mt=qe(null),$e=qe(null),Be=qe(null),Ie=qe(null);function Te(t,n){switch(ze(Be,n),ze($e,t),ze(Mt,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Y0(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Y0(n),t=X0(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ee(Mt),ze(Mt,t)}function Ve(){Ee(Mt),Ee($e),Ee(Be)}function gt(t){var n=t.memoizedState;n!==null&&(Uo._currentValue=n.memoizedState,ze(Ie,t)),n=Mt.current;var o=X0(n,t.type);n!==o&&(ze($e,t),ze(Mt,o))}function rt(t){$e.current===t&&(Ee(Mt),Ee($e)),Ie.current===t&&(Ee(Ie),Uo._currentValue=Se)}var fe,ge;function Le(t){if(fe===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);fe=n&&n[1]||"",ge=-1<o.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+fe+t+ge}var De=!1;function Fe(t,n){if(!t||De)return"";De=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(Ce){var ie=Ce}Reflect.construct(t,[],me)}else{try{me.call()}catch(Ce){ie=Ce}me=!1;try{var ce=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),me=!0,new t}finally{me&&(ce!==void 0?Object.defineProperty(t.prototype,"props",ce):delete t.prototype.props)}}}else{try{throw Error()}catch(Ce){ie=Ce}(me=t())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(Ce){if(Ce&&ie&&typeof Ce.stack=="string")return[Ce.stack,ie.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=u.DetermineComponentFrameRoot(),N=k[0],q=k[1];if(N&&q){var J=N.split(`
|
|
45
|
-
`),se=q.split(`
|
|
46
|
-
`);for(C=u=0;u<J.length&&!J[u].includes("DetermineComponentFrameRoot");)u++;for(;C<se.length&&!se[C].includes("DetermineComponentFrameRoot");)C++;if(u===J.length||C===se.length)for(u=J.length-1,C=se.length-1;1<=u&&0<=C&&J[u]!==se[C];)C--;for(;1<=u&&0<=C;u--,C--)if(J[u]!==se[C]){if(u!==1||C!==1)do if(u--,C--,0>C||J[u]!==se[C]){var de=`
|
|
47
|
-
`+J[u].replace(" at new "," at ");return t.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",t.displayName)),de}while(1<=u&&0<=C);break}}}finally{De=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?Le(o):""}function Me(t,n){switch(t.tag){case 26:case 27:case 5:return Le(t.type);case 16:return Le("Lazy");case 13:return t.child!==n&&n!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Fe(t.type,!1);case 11:return Fe(t.type.render,!1);case 1:return Fe(t.type,!0);case 31:return Le("Activity");case 30:return Le("ViewTransition");default:return""}}function Tt(t){try{var n="",o=null;do n+=Me(t,o),o=t,t=t.return;while(t);return n}catch(u){return`
|
|
48
|
-
Error generating stack: `+u.message+`
|
|
49
|
-
`+u.stack}}var qt=Object.prototype.hasOwnProperty,En=e.unstable_scheduleCallback,Zn=e.unstable_cancelCallback,Jn=e.unstable_shouldYield,Js=e.unstable_requestPaint,Vt=e.unstable_now,Wt=e.unstable_getCurrentPriorityLevel,ei=e.unstable_ImmediatePriority,vn=e.unstable_UserBlockingPriority,eo=e.unstable_NormalPriority,f5=e.unstable_LowPriority,xv=e.unstable_IdlePriority,p5=e.log,m5=e.unstable_setDisableYieldValue,Sa=null,zn=null;function kr(t){if(typeof p5=="function"&&m5(t),zn&&typeof zn.setStrictMode=="function")try{zn.setStrictMode(Sa,t)}catch{}}var Hn=Math.clz32?Math.clz32:_5,g5=Math.log,v5=Math.LN2;function _5(t){return t>>>=0,t===0?32:31-(g5(t)/v5|0)|0}var tc=256,nc=262144,ic=4194304;function gs(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function rc(t,n,o){var u=t.pendingLanes;if(u===0)return 0;var C=0,k=t.suspendedLanes,N=t.pingedLanes;t=t.warmLanes;var q=u&134217727;return q!==0?(u=q&~k,u!==0?C=gs(u):(N&=q,N!==0?C=gs(N):o||(o=q&~t,o!==0&&(C=gs(o))))):(q=u&~k,q!==0?C=gs(q):N!==0?C=gs(N):o||(o=u&~t,o!==0&&(C=gs(o)))),C===0?0:n!==0&&n!==C&&(n&k)===0&&(k=C&-C,o=n&-n,k>=o||k===32&&(o&4194048)!==0)?n:C}function wa(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function yv(t,n){(n&8)!==0&&(n|=n&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=n;0<o;){var u=31-Hn(o),C=1<<u;n|=t[u],o&=~C}return n}function x5(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 bv(){var t=ic;return ic<<=1,(ic&62914560)===0&&(ic=4194304),t}function qh(t){for(var n=[],o=0;31>o;o++)n.push(t);return n}function Ca(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function y5(t,n,o,u,C,k){var N=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var q=t.entanglements,J=t.expirationTimes,se=t.hiddenUpdates;for(o=N&~o;0<o;){var de=31-Hn(o),me=1<<de;q[de]=0,J[de]=-1;var ie=se[de];if(ie!==null)for(se[de]=null,de=0;de<ie.length;de++){var ce=ie[de];ce!==null&&(ce.lane&=-536870913)}o&=~me}u!==0&&Sv(t,u,0),k!==0&&C===0&&t.tag!==0&&(t.suspendedLanes|=k&~(N&~n))}function Sv(t,n,o){t.pendingLanes|=n,t.suspendedLanes&=~n;var u=31-Hn(n);t.entangledLanes|=n,t.entanglements[u]=t.entanglements[u]|1073741824|o&261930}function wv(t,n){var o=t.entangledLanes|=n;for(t=t.entanglements;o;){var u=31-Hn(o),C=1<<u;C&n|t[u]&n&&(t[u]|=n),o&=~C}}function Cv(t,n){var o=n&-n;return o=(o&42)!==0?1:Vh(o),(o&(t.suspendedLanes|n))!==0?0:o}function Vh(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Wh(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ev(){var t=he.p;return t!==0?t:(t=window.event,t===void 0?32:Mx(t.type))}function kv(t,n){var o=he.p;try{return he.p=t,n()}finally{he.p=o}}var Wi=Math.random().toString(36).slice(2),rn="__reactFiber$"+Wi,kn="__reactProps$"+Wi,to="__reactContainer$"+Wi,Tv="__reactEvents$"+Wi,b5="__reactListeners$"+Wi,S5="__reactHandles$"+Wi,Rv="__reactResources$"+Wi,Ea="__reactMarker$"+Wi,sc="__reactLoad$"+Wi;function oc(t){delete t[rn],delete t[kn],delete t[b5],delete t[S5]}function vs(t){var n;if(n=t[rn])return n;for(var o=t.parentNode;o;){if(n=o[to]||o[rn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(t=dx(t);t!==null;){if(o=t[rn])return o;t=dx(t)}return n}t=o,o=t.parentNode}return null}function no(t){if(t=t[rn]||t[to]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function ka(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(s(33))}function io(t){var n=t[Rv];return n||(n=t[Rv]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Kt(t){t[Ea]=!0}function Av(t){t[sc]=void 0}var Lv=new Set,Dv={};function _s(t,n){ro(t,n),ro(t+"Capture",n)}function ro(t,n){for(Dv[t]=n,t=0;t<n.length;t++)Lv.add(n[t])}var w5=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]*$"),Mv={},jv={};function C5(t){return qt.call(jv,t)?!0:qt.call(Mv,t)?!1:w5.test(t)?jv[t]=!0:(Mv[t]=!0,!1)}var st=!1;function Ov(){var t=st;return st=!1,t}function ac(t,n,o){if(C5(n))if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,o)}}function lc(t,n,o){if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,o)}}function Gi(t,n,o,u){if(u===null)t.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(n,o,u)}}function Fn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Nv(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function E5(t,n,o){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var C=u.get,k=u.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return C.call(this)},set:function(N){o=""+N,k.call(this,N)}}),Object.defineProperty(t,n,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(N){o=""+N},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Gh(t){if(!t._valueTracker){var n=Nv(t)?"checked":"value";t._valueTracker=E5(t,n,""+t[n])}}function Bv(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return t&&(u=Nv(t)?t.checked?"true":"false":t.value),t=u,t!==o?(n.setValue(t),!0):!1}var k5=/[\n"\\]/g;function ti(t){return t.replace(k5,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Yh(t,n,o,u,C,k,N,q){t.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?t.type=N:t.removeAttribute("type"),n!=null?N==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Fn(n)):t.value!==""+Fn(n)&&(t.value=""+Fn(n)):N!=="submit"&&N!=="reset"||t.removeAttribute("value"),n!=null?N==="number"&&t.value==n?Xh(t,Fn(t.value)):Xh(t,Fn(n)):o!=null?Xh(t,Fn(o)):u!=null&&t.removeAttribute("value"),C==null&&k!=null&&(t.defaultChecked=!!k),C!=null&&(t.checked=C&&typeof C!="function"&&typeof C!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?t.name=""+Fn(q):t.removeAttribute("name")}function Pv(t,n,o,u,C,k,N,q){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.type=k),n!=null||o!=null){if(!(k!=="submit"&&k!=="reset"||n!=null)){Gh(t);return}o=o!=null?""+Fn(o):"",n=n!=null?""+Fn(n):o,q||n===t.value||(t.value=n),t.defaultValue=n}u=u??C,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=q?t.checked:!!u,t.defaultChecked=!!u,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(t.name=N),Gh(t)}function Xh(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function so(t,n,o,u){if(t=t.options,n){n={};for(var C=0;C<o.length;C++)n["$"+o[C]]=!0;for(o=0;o<t.length;o++)C=n.hasOwnProperty("$"+t[o].value),t[o].selected!==C&&(t[o].selected=C),C&&u&&(t[o].defaultSelected=!0)}else{for(o=""+Fn(o),n=null,C=0;C<t.length;C++){if(t[C].value===o){t[C].selected=!0,u&&(t[C].defaultSelected=!0);return}n!==null||t[C].disabled||(n=t[C])}n!==null&&(n.selected=!0)}}function Iv(t,n,o){if(n!=null&&(n=""+Fn(n),n!==t.value&&(t.value=n),o==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=o!=null?""+Fn(o):""}function zv(t,n,o,u){if(n==null){if(u!=null){if(o!=null)throw Error(s(92));if(ee(u)){if(1<u.length)throw Error(s(93));u=u[0]}o=u}o==null&&(o=""),n=o}o=Fn(n),t.defaultValue=o,u=t.textContent,u===o&&u!==""&&u!==null&&(t.value=u),Gh(t)}function oo(t,n){if(n){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=n;return}}t.textContent=n}var T5=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 Hv(t,n,o){var u=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":u?t.setProperty(n,o):typeof o!="number"||o===0||T5.has(n)?n==="float"?t.cssFloat=o:t[n]=(""+o).trim():t[n]=o+"px"}function Fv(t,n,o){if(n!=null&&typeof n!="object")throw Error(s(62));if(t=t.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="",st=!0);for(var C in n)u=n[C],n.hasOwnProperty(C)&&o[C]!==u&&(Hv(t,C,u),st=!0)}else for(var k in n)n.hasOwnProperty(k)&&Hv(t,k,n[k])}function Kh(t){if(t.indexOf("-")===-1)return!1;switch(t){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 R5=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"],["maskType","mask-type"],["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"]]),A5=/^[\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 cc(t){return A5.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ei(){}var Qh=null;function Zh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ao=null,lo=null;function Uv(t){var n=no(t);if(n&&(t=n.stateNode)){var o=t[kn]||null;e:switch(t=n.stateNode,n.type){case"input":if(Yh(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+ti(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==t&&u.form===t.form){var C=u[kn]||null;if(!C)throw Error(s(90));Yh(u,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(n=0;n<o.length;n++)u=o[n],u.form===t.form&&Bv(u)}break e;case"textarea":Iv(t,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&so(t,!!o.multiple,n,!1)}}}var Jh=!1;function $v(t,n,o){if(Jh)return t(n,o);Jh=!0;try{var u=t(n);return u}finally{if(Jh=!1,(ao!==null||lo!==null)&&(cu(),ao&&(n=ao,t=lo,lo=ao=null,Uv(n),t)))for(n=0;n<t.length;n++)Uv(t[n])}}function Ta(t,n){var o=t.stateNode;if(o===null)return null;var u=o[kn]||null;if(u===null)return null;o=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(s(231,n,typeof o));return o}var Yi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ed=!1;if(Yi)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){ed=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch{ed=!1}var Tr=null,td=null,uc=null;function qv(){if(uc)return uc;var t,n=td,o=n.length,u,C="value"in Tr?Tr.value:Tr.textContent,k=C.length;for(t=0;t<o&&n[t]===C[t];t++);var N=o-t;for(u=1;u<=N&&n[o-u]===C[k-u];u++);return uc=C.slice(t,1<u?1-u:void 0)}function hc(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function dc(){return!0}function Vv(){return!1}function _n(t){function n(o,u,C,k,N){this._reactName=o,this._targetInst=C,this.type=u,this.nativeEvent=k,this.target=N,this.currentTarget=null;for(var q in t)t.hasOwnProperty(q)&&(o=t[q],this[q]=o?o(k):k[q]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?dc:Vv,this.isPropagationStopped=Vv,this}return L(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=dc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=dc)},persist:function(){},isPersistent:dc}),n}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fc=_n(Rr),Aa=L({},Rr,{view:0,detail:0}),L5=_n(Aa),nd,id,La,pc=L({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sd,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==La&&(La&&t.type==="mousemove"?(nd=t.screenX-La.screenX,id=t.screenY-La.screenY):id=nd=0,La=t),nd)},movementY:function(t){return"movementY"in t?t.movementY:id}}),Wv=_n(pc),D5=L({},pc,{dataTransfer:0}),M5=_n(D5),j5=L({},Aa,{relatedTarget:0}),rd=_n(j5),O5=L({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),N5=_n(O5),B5=L({},Rr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),P5=_n(B5),I5=L({},Rr,{data:0}),Gv=_n(I5),z5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H5={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"},F5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function U5(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=F5[t])?!!n[t]:!1}function sd(){return U5}var $5=L({},Aa,{key:function(t){if(t.key){var n=z5[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=hc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?H5[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sd,charCode:function(t){return t.type==="keypress"?hc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?hc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),q5=_n($5),V5=L({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yv=_n(V5),W5=L({},Rr,{submitter:0}),G5=_n(W5),Y5=L({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sd}),X5=_n(Y5),K5=L({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q5=_n(K5),Z5=L({},pc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),J5=_n(Z5),eE=L({},Rr,{newState:0,oldState:0,source:0}),tE=_n(eE),nE=[9,13,27,32],od=Yi&&"CompositionEvent"in window,Da=null;Yi&&"documentMode"in document&&(Da=document.documentMode);var iE=Yi&&"TextEvent"in window&&!Da,Xv=Yi&&(!od||Da&&8<Da&&11>=Da),Kv=" ",Qv=!1;function Zv(t,n){switch(t){case"keyup":return nE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jv(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var co=!1;function rE(t,n){switch(t){case"compositionend":return Jv(n);case"keypress":return n.which!==32?null:(Qv=!0,Kv);case"textInput":return t=n.data,t===Kv&&Qv?null:t;default:return null}}function sE(t,n){if(co)return t==="compositionend"||!od&&Zv(t,n)?(t=qv(),uc=td=Tr=null,co=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Xv&&n.locale!=="ko"?null:n.data;default:return null}}var oE={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 e_(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!oE[t.type]:n==="textarea"}function t_(t,n,o,u){ao?lo?lo.push(u):lo=[u]:ao=u,n=mu(n,"onChange"),0<n.length&&(o=new fc("onChange","change",null,o,u),t.push({event:o,listeners:n}))}var Ma=null,ja=null;function aE(t){U0(t,0)}function mc(t){var n=ka(t);if(Bv(n))return t}function n_(t,n){if(t==="change")return n}var i_=!1;if(Yi){var ad;if(Yi){var ld="oninput"in document;if(!ld){var r_=document.createElement("div");r_.setAttribute("oninput","return;"),ld=typeof r_.oninput=="function"}ad=ld}else ad=!1;i_=ad&&(!document.documentMode||9<document.documentMode)}function s_(){Ma&&(Ma.detachEvent("onpropertychange",o_),ja=Ma=null)}function o_(t){if(t.propertyName==="value"&&mc(ja)){var n=[];t_(n,ja,t,Zh(t)),$v(aE,n)}}function lE(t,n,o){t==="focusin"?(s_(),Ma=n,ja=o,Ma.attachEvent("onpropertychange",o_)):t==="focusout"&&s_()}function cE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return mc(ja)}function uE(t,n){if(t==="click")return mc(n)}function hE(t,n){if(t==="input"||t==="change")return mc(n)}function dE(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Un=typeof Object.is=="function"?Object.is:dE;function Oa(t,n){if(Un(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var o=Object.keys(t),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var C=o[u];if(!qt.call(n,C)||!Un(t[C],n[C]))return!1}return!0}function cd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function a_(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function l_(t,n){var o=a_(t);t=0;for(var u;o;){if(o.nodeType===3){if(u=t+o.textContent.length,t<=n&&u>=n)return{node:o,offset:n-t};t=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=a_(o)}}function c_(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?c_(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function u_(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=cd(t.document);n instanceof t.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)t=n.contentWindow;else break;n=cd(t.document)}return n}function ud(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var fE=Yi&&"documentMode"in document&&11>=document.documentMode,uo=null,hd=null,Na=null,dd=!1;function h_(t,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;dd||uo==null||uo!==cd(u)||(u=uo,"selectionStart"in u&&ud(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Na&&Oa(Na,u)||(Na=u,u=mu(hd,"onSelect"),0<u.length&&(n=new fc("onSelect","select",null,n,o),t.push({event:n,listeners:u}),n.target=uo)))}function xs(t,n){var o={};return o[t.toLowerCase()]=n.toLowerCase(),o["Webkit"+t]="webkit"+n,o["Moz"+t]="moz"+n,o}var ho={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionrun:xs("Transition","TransitionRun"),transitionstart:xs("Transition","TransitionStart"),transitioncancel:xs("Transition","TransitionCancel"),transitionend:xs("Transition","TransitionEnd")},fd={},d_={};Yi&&(d_=document.createElement("div").style,"AnimationEvent"in window||(delete ho.animationend.animation,delete ho.animationiteration.animation,delete ho.animationstart.animation),"TransitionEvent"in window||delete ho.transitionend.transition);function ys(t){if(fd[t])return fd[t];if(!ho[t])return t;var n=ho[t],o;for(o in n)if(n.hasOwnProperty(o)&&o in d_)return fd[t]=n[o];return t}var f_=ys("animationend"),p_=ys("animationiteration"),m_=ys("animationstart"),pE=ys("transitionrun"),mE=ys("transitionstart"),gE=ys("transitioncancel"),g_=ys("transitionend"),v_=new Map,pd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");pd.push("scrollEnd");function mi(t,n){v_.set(t,n),_s(n,[t])}var vE=0;function Xi(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=xi.identifierPrefix;var o=vE++;return t="_"+t+"t_"+o.toString(32)+"_",n.autoName=t}function __(t){if(t==null||typeof t=="string")return t;var n=null,o=Mo;if(o!==null)for(var u=0;u<o.length;u++){var C=t[o[u]];if(C!=null){if(C==="none")return"none";n=n==null?C:n+(" "+C)}}return n??t.default}function Ki(t,n){return t=__(t),n=__(n),n==null?t==="auto"?null:t:n==="auto"?null:n}var gc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ni=[],fo=0,md=0;function vc(){for(var t=fo,n=md=fo=0;n<t;){var o=ni[n];ni[n++]=null;var u=ni[n];ni[n++]=null;var C=ni[n];ni[n++]=null;var k=ni[n];if(ni[n++]=null,u!==null&&C!==null){var N=u.pending;N===null?C.next=C:(C.next=N.next,N.next=C),u.pending=C}k!==0&&x_(o,C,k)}}function _c(t,n,o,u){ni[fo++]=t,ni[fo++]=n,ni[fo++]=o,ni[fo++]=u,md|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function gd(t,n,o,u){return _c(t,n,o,u),xc(t)}function bs(t,n){return _c(t,null,null,n),xc(t)}function x_(t,n,o){t.lanes|=o;var u=t.alternate;u!==null&&(u.lanes|=o);for(var C=!1,k=t.return;k!==null;)k.childLanes|=o,u=k.alternate,u!==null&&(u.childLanes|=o),k.tag===22&&(t=k.stateNode,t===null||t._visibility&1||(C=!0)),t=k,k=k.return;return t.tag===3?(k=t.stateNode,C&&n!==null&&(C=31-Hn(o),t=k.hiddenUpdates,u=t[C],u===null?t[C]=[n]:u.push(n),n.lane=o|536870912),k):null}function xc(t){if(50<il)throw il=0,lu=null,Error(s(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var po={};function _E(t,n,o,u){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(t,n,o,u){return new _E(t,n,o,u)}function vd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Qi(t,n){var o=t.alternate;return o===null?(o=Tn(t.tag,n,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=n,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&1206910976,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,n=t.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function y_(t,n){t.flags&=1206910978;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,n=o.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function yc(t,n,o,u,C,k){var N=0;if(u=t,typeof u=="function")vd(u)&&(N=1);else if(typeof u=="string")N=Wk(t,o,Mt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(u){case G:return t=Tn(31,o,n,C),t.elementType=G,t.lanes=k,t;case I:return Ss(o.children,C,k,n);case B:N=8,C|=24;break;case H:return t=Tn(12,o,n,C|2),t.elementType=H,t.lanes=k,t;case Q:return t=Tn(13,o,n,C),t.elementType=Q,t.lanes=k,t;case K:return t=Tn(19,o,n,C),t.elementType=K,t.lanes=k,t;case Z:case V:return t=C|32,t=Tn(30,o,n,t),t.elementType=V,t.lanes=k,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case W:N=10;break e;case U:N=9;break e;case Y:N=11;break e;case z:N=14;break e;case O:N=16,u=null;break e}N=29,o=Error(s(130,t===null?"null":typeof t,"")),u=null}return n=Tn(N,o,n,C),n.elementType=t,n.type=u,n.lanes=k,n}function Ss(t,n,o,u){return t=Tn(7,t,u,n),t.lanes=o,t}function _d(t,n,o){return t=Tn(6,t,null,n),t.lanes=o,t}function b_(t){var n=Tn(18,null,null,0);return n.stateNode=t,n}function xd(t,n,o){return n=Tn(4,t.children!==null?t.children:[],t.key,n),n.lanes=o,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var S_=new WeakMap;function ii(t,n){if(typeof t=="object"&&t!==null){var o=S_.get(t);return o!==void 0?o:(n={value:t,source:n,stack:Tt(n)},S_.set(t,n),n)}return{value:t,source:n,stack:Tt(n)}}var mo=[],go=0,bc=null,Ba=0,ri=[],si=0,Ar=null,ki=1,Ti="";function Zi(t,n){mo[go++]=Ba,mo[go++]=bc,bc=t,Ba=n}function w_(t,n,o){ri[si++]=ki,ri[si++]=Ti,ri[si++]=Ar,Ar=t;var u=ki;t=Ti;var C=32-Hn(u)-1;u&=~(1<<C),o+=1;var k=32-Hn(n)+C;if(30<k){var N=C-C%5;k=(u&(1<<N)-1).toString(32),u>>=N,C-=N,ki=1<<32-Hn(n)+C|o<<C|u,Ti=k+t}else ki=1<<k|o<<C|u,Ti=t}function Sc(t){t.return!==null&&(Zi(t,1),w_(t,1,0))}function yd(t){for(;t===bc;)bc=mo[--go],mo[go]=null,Ba=mo[--go],mo[go]=null;for(;t===Ar;)Ar=ri[--si],ri[si]=null,Ti=ri[--si],ri[si]=null,ki=ri[--si],ri[si]=null}function C_(t,n){ri[si++]=ki,ri[si++]=Ti,ri[si++]=Ar,ki=n.id,Ti=n.overflow,Ar=t}var Qt=null,bt=null,Xe=!1,Lr=null,oi=!1,bd=Error(s(519));function Dr(t){var n=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pa(ii(n,t)),bd}function E_(t){var n=t.stateNode,o=t.type,u=t.memoizedProps;switch(n[rn]=t,n[kn]=u,o){case"dialog":Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":case"embed":Ze("load",n);break;case"video":case"audio":for(o=0;o<sl.length;o++)Ze(sl[o],n);break;case"source":Ze("error",n);break;case"img":case"image":case"link":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"input":Ze("invalid",n),Pv(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ze("invalid",n);break;case"textarea":Ze("invalid",n),zv(n,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||u.suppressHydrationWarning===!0||W0(n.textContent,o)?(u.popover!=null&&(Ze("beforetoggle",n),Ze("toggle",n)),u.onScroll!=null&&Ze("scroll",n),u.onScrollEnd!=null&&Ze("scrollend",n),u.onClick!=null&&(n.onclick=Ei),n=!0):n=!1,n||Dr(t,!0)}function wc(t){for(Qt=t.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:oi=!1;return;case 27:case 3:oi=!0;return;default:Qt=Qt.return}}function vo(t){if(t!==Qt)return!1;if(!Xe)return wc(t),Xe=!0,!1;var n=t.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||Zf(t.type,t.memoizedProps)),o=!o),o&&bt&&Dr(t),wc(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));bt=hx(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));bt=hx(t)}else n===27?(n=bt,Gr(t.type)?(t=ap,ap=null,bt=t):bt=n):bt=Qt?li(t.stateNode.nextSibling):null;return!0}function ws(){bt=Qt=null,Xe=!1}function Sd(){var t=Lr;return t!==null&&(Ln===null?Ln=t:Ln.push.apply(Ln,t),Lr=null),t}function Pa(t){Lr===null?Lr=[t]:Lr.push(t)}var wd=qe(null),Cs=null,Ji=null;function Mr(t,n,o){ze(wd,n._currentValue),n._currentValue=o}function er(t){t._currentValue=wd.current,Ee(wd)}function Cc(t,n,o){for(;t!==null;){var u=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),t===o)break;t=t.return}}function Cd(t,n,o,u){var C=t.child;for(C!==null&&(C.return=t);C!==null;){var k=C.dependencies;if(k!==null){var N=C.child;k=k.firstContext;e:for(;k!==null;){var q=k;k=C;for(var J=0;J<n.length;J++)if(q.context===n[J]){k.lanes|=o,q=k.alternate,q!==null&&(q.lanes|=o),Cc(k.return,o,t),u||(N=null);break e}k=q.next}}else if(C.tag===18){if(N=C.return,N===null)throw Error(s(341));N.lanes|=o,k=N.alternate,k!==null&&(k.lanes|=o),Cc(N,o,t),N=null}else C.tag===13&&C.memoizedState!==null&&C.memoizedState.dehydrated===null?(C.lanes|=o,N=C.alternate,N!==null&&(N.lanes|=o),Cc(C.return,o,t),N=C.child,N=N!==null?N.sibling:null):N=C.child;if(N!==null)N.return=C;else for(N=C;N!==null;){if(N===t){N=null;break}if(C=N.sibling,C!==null){C.return=N.return,N=C;break}N=N.return}C=N}}function Es(t,n,o,u){t=null;for(var C=n,k=!1;C!==null;){if(!k){if((C.flags&524288)!==0)k=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var N=C.alternate;if(N===null)throw Error(s(387));if(N=N.memoizedProps,N!==null){var q=C.type;Un(C.pendingProps.value,N.value)||(t!==null?t.push(q):t=[q])}}else if(C===Ie.current){if(N=C.alternate,N===null)throw Error(s(387));N.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(t!==null?t.push(Uo):t=[Uo])}C=C.return}return t!==null&&Cd(n,t,o,u),n.flags|=262144,t!==null}function Ec(t){for(t=t.firstContext;t!==null;){if(!Un(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ks(t){Cs=t,Ji=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function sn(t){return k_(Cs,t)}function kc(t,n){return Cs===null&&ks(t),k_(t,n)}function k_(t,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},Ji===null){if(t===null)throw Error(s(308));Ji=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else Ji=Ji.next=n;return o}var xE=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(o,u){t.push(u)}};this.abort=function(){n.aborted=!0,t.forEach(function(o){return o()})}},yE=e.unstable_scheduleCallback,bE=e.unstable_NormalPriority,Bt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ed(){return{controller:new xE,data:new Map,refCount:0}}function Ia(t){t.refCount--,t.refCount===0&&yE(bE,function(){t.controller.abort()})}function T_(t,n){if((t.pendingLanes&4194048)!==0){var o=t.transitionTypes;for(o===null&&(o=t.transitionTypes=[]),t=0;t<n.length;t++){var u=n[t];o.indexOf(u)===-1&&o.push(u)}}}var za=null;function SE(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var Ha=null,kd=0,Ts=0,_o=null;function wE(t,n){if(Ha===null){var o=Ha=[];kd=0,Ts=$f(),_o={status:"pending",value:void 0,then:function(u){o.push(u)}}}return kd++,n.then(R_,R_),n}function R_(){if(--kd===0&&(za=null,Ha!==null)){_o!==null&&(_o.status="fulfilled");var t=Ha;Ha=null,Ts=0,_o=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function CE(t,n){var o=[],u={status:"pending",value:null,reason:null,then:function(C){o.push(C)}};return t.then(function(){u.status="fulfilled",u.value=n;for(var C=0;C<o.length;C++)(0,o[C])(n)},function(C){for(u.status="rejected",u.reason=C,C=0;C<o.length;C++)(0,o[C])(void 0)}),u}var A_=ue.S;ue.S=function(t,n){if(b0=Vt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&wE(t,n),za!==null)for(var o=Bo;o!==null;)T_(o,za),o=o.next;if(o=t.types,o!==null){for(var u=Bo;u!==null;)T_(u,o),u=u.next;if(Ts!==0){u=za,u===null&&(u=za=[]);for(var C=0;C<o.length;C++){var k=o[C];u.indexOf(k)===-1&&u.push(k)}}}A_!==null&&A_(t,n)};var Rs=qe(null);function Td(){var t=Rs.current;return t!==null?t:_t.pooledCache}function Tc(t,n){n===null?ze(Rs,Rs.current):ze(Rs,n.pool)}function L_(){var t=Td();return t===null?null:{parent:Bt._currentValue,pool:t}}var xo=Error(s(460)),Rd=Error(s(474)),Rc=Error(s(542)),Ac={then:function(){}};function D_(t){return t=t.status,t==="fulfilled"||t==="rejected"}function M_(t,n,o){switch(o=t[o],o===void 0?t.push(n):o!==n&&(n.then(Ei,Ei),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,O_(t),t===void 0&&!("reason"in n)?Error(s(600)):t;default:if(typeof n.status=="string")n.then(Ei,Ei);else{if(t=_t,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=n,t.status="pending",t.then(function(u){if(n.status==="pending"){var C=n;C.status="fulfilled",C.value=u}},function(u){if(n.status==="pending"){var C=n;C.status="rejected",C.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,O_(t),t}throw Ls=n,xo}}function As(t){try{var n=t._init;return n(t._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Ls=o,xo):o}}var Ls=null;function j_(){if(Ls===null)throw Error(s(459));var t=Ls;return Ls=null,t}function O_(t){if(t===xo||t===Rc)throw Error(s(483))}var yo=null,Fa=0;function Lc(t){var n=Fa;return Fa+=1,yo===null&&(yo=[]),M_(yo,t,n)}function jr(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Dc(t,n){throw n.$$typeof===A?Error(s(525)):(t=Object.prototype.toString.call(n),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function N_(t){function n(re,te){if(t){var ae=re.deletions;ae===null?(re.deletions=[te],re.flags|=16):ae.push(te)}}function o(re,te){if(!t)return null;for(;te!==null;)n(re,te),te=te.sibling;return null}function u(re){for(var te=new Map;re!==null;)re.key===null?te.set(re.index,re):te.set(re.key,re),re=re.sibling;return te}function C(re,te){return re=Qi(re,te),re.index=0,re.sibling=null,re}function k(re,te,ae){return re.index=ae,t?(ae=re.alternate,ae!==null?(ae=ae.index,ae<te?(re.flags|=2,te):ae):(re.flags|=134217730,te)):(re.flags|=1048576,te)}function N(re){return t&&re.alternate===null&&(re.flags|=134217730),re}function q(re,te,ae,pe){return te===null||te.tag!==6?(te=_d(ae,re.mode,pe),te.return=re,te):(te=C(te,ae),te.return=re,te)}function J(re,te,ae,pe){var Ae=ae.type;return Ae===I?(re=de(re,te,ae.props.children,pe,ae.key),jr(re,ae),re):te!==null&&(te.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===O&&As(Ae)===te.type)?(te=C(te,ae.props),jr(te,ae),te.return=re,te):(te=yc(ae.type,ae.key,ae.props,null,re.mode,pe),jr(te,ae),te.return=re,te)}function se(re,te,ae,pe){return te===null||te.tag!==4||te.stateNode.containerInfo!==ae.containerInfo||te.stateNode.implementation!==ae.implementation?(te=xd(ae,re.mode,pe),te.return=re,te):(te=C(te,ae.children||[]),te.return=re,te)}function de(re,te,ae,pe,Ae){return te===null||te.tag!==7?(te=Ss(ae,re.mode,pe,Ae),te.return=re,te):(te=C(te,ae),te.return=re,te)}function me(re,te,ae){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=_d(""+te,re.mode,ae),te.return=re,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case j:return ae=yc(te.type,te.key,te.props,null,re.mode,ae),jr(ae,te),ae.return=re,ae;case M:return te=xd(te,re.mode,ae),te.return=re,te;case O:return te=As(te),me(re,te,ae)}if(ee(te)||X(te))return te=Ss(te,re.mode,ae,null),te.return=re,te;if(typeof te.then=="function")return me(re,Lc(te),ae);if(te.$$typeof===W)return me(re,kc(re,te),ae);Dc(re,te)}return null}function ie(re,te,ae,pe){var Ae=te!==null?te.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Ae!==null?null:q(re,te,""+ae,pe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case j:return ae.key===Ae?J(re,te,ae,pe):null;case M:return ae.key===Ae?se(re,te,ae,pe):null;case O:return ae=As(ae),ie(re,te,ae,pe)}if(ee(ae)||X(ae))return Ae!==null?null:de(re,te,ae,pe,null);if(typeof ae.then=="function")return ie(re,te,Lc(ae),pe);if(ae.$$typeof===W)return ie(re,te,kc(re,ae),pe);Dc(re,ae)}return null}function ce(re,te,ae,pe,Ae){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return re=re.get(ae)||null,q(te,re,""+pe,Ae);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case j:return re=re.get(pe.key===null?ae:pe.key)||null,J(te,re,pe,Ae);case M:return re=re.get(pe.key===null?ae:pe.key)||null,se(te,re,pe,Ae);case O:return pe=As(pe),ce(re,te,ae,pe,Ae)}if(ee(pe)||X(pe))return re=re.get(ae)||null,de(te,re,pe,Ae,null);if(typeof pe.then=="function")return ce(re,te,ae,Lc(pe),Ae);if(pe.$$typeof===W)return ce(re,te,ae,kc(te,pe),Ae);Dc(te,pe)}return null}function Ce(re,te,ae,pe){for(var Ae=null,et=null,Oe=te,Pe=te=0,zt=null;Oe!==null&&Pe<ae.length;Pe++){Oe.index>Pe?(zt=Oe,Oe=null):zt=Oe.sibling;var it=ie(re,Oe,ae[Pe],pe);if(it===null){Oe===null&&(Oe=zt);break}t&&Oe&&it.alternate===null&&n(re,Oe),te=k(it,te,Pe),et===null?Ae=it:et.sibling=it,et=it,Oe=zt}if(Pe===ae.length)return o(re,Oe),Xe&&Zi(re,Pe),Ae;if(Oe===null){for(;Pe<ae.length;Pe++)Oe=me(re,ae[Pe],pe),Oe!==null&&(te=k(Oe,te,Pe),et===null?Ae=Oe:et.sibling=Oe,et=Oe);return Xe&&Zi(re,Pe),Ae}for(Oe=u(Oe);Pe<ae.length;Pe++)zt=ce(Oe,re,Pe,ae[Pe],pe),zt!==null&&(t&&(it=zt.alternate,it!==null&&Oe.delete(it.key===null?Pe:it.key)),te=k(zt,te,Pe),et===null?Ae=zt:et.sibling=zt,et=zt);return t&&Oe.forEach(function(Zr){return n(re,Zr)}),Xe&&Zi(re,Pe),Ae}function je(re,te,ae,pe){if(ae==null)throw Error(s(151));for(var Ae=null,et=null,Oe=te,Pe=te=0,zt=null,it=ae.next();Oe!==null&&!it.done;Pe++,it=ae.next()){Oe.index>Pe?(zt=Oe,Oe=null):zt=Oe.sibling;var Zr=ie(re,Oe,it.value,pe);if(Zr===null){Oe===null&&(Oe=zt);break}t&&Oe&&Zr.alternate===null&&n(re,Oe),te=k(Zr,te,Pe),et===null?Ae=Zr:et.sibling=Zr,et=Zr,Oe=zt}if(it.done)return o(re,Oe),Xe&&Zi(re,Pe),Ae;if(Oe===null){for(;!it.done;Pe++,it=ae.next())it=me(re,it.value,pe),it!==null&&(te=k(it,te,Pe),et===null?Ae=it:et.sibling=it,et=it);return Xe&&Zi(re,Pe),Ae}for(Oe=u(Oe);!it.done;Pe++,it=ae.next())it=ce(Oe,re,Pe,it.value,pe),it!==null&&(t&&(zt=it.alternate,zt!==null&&Oe.delete(zt.key===null?Pe:zt.key)),te=k(it,te,Pe),et===null?Ae=it:et.sibling=it,et=it);return t&&Oe.forEach(function(r3){return n(re,r3)}),Xe&&Zi(re,Pe),Ae}function Ge(re,te,ae,pe){if(typeof ae=="object"&&ae!==null&&ae.type===I&&ae.key===null&&ae.props.ref===void 0&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case j:e:{for(var Ae=ae.key;te!==null;){if(te.key===Ae){if(Ae=ae.type,Ae===I){if(te.tag===7){o(re,te.sibling),pe=C(te,ae.props.children),jr(pe,ae),pe.return=re,re=pe;break e}}else if(te.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===O&&As(Ae)===te.type){o(re,te.sibling),pe=C(te,ae.props),jr(pe,ae),pe.return=re,re=pe;break e}o(re,te);break}else n(re,te);te=te.sibling}ae.type===I?(pe=Ss(ae.props.children,re.mode,pe,ae.key),jr(pe,ae),pe.return=re,re=pe):(pe=yc(ae.type,ae.key,ae.props,null,re.mode,pe),jr(pe,ae),pe.return=re,re=pe)}return N(re);case M:e:{for(Ae=ae.key;te!==null;){if(te.key===Ae)if(te.tag===4&&te.stateNode.containerInfo===ae.containerInfo&&te.stateNode.implementation===ae.implementation){o(re,te.sibling),pe=C(te,ae.children||[]),pe.return=re,re=pe;break e}else{o(re,te);break}else n(re,te);te=te.sibling}pe=xd(ae,re.mode,pe),pe.return=re,re=pe}return N(re);case O:return ae=As(ae),Ge(re,te,ae,pe)}if(ee(ae))return Ce(re,te,ae,pe);if(X(ae)){if(Ae=X(ae),typeof Ae!="function")throw Error(s(150));return ae=Ae.call(ae),je(re,te,ae,pe)}if(typeof ae.then=="function")return Ge(re,te,Lc(ae),pe);if(ae.$$typeof===W)return Ge(re,te,kc(re,ae),pe);Dc(re,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,te!==null&&te.tag===6?(o(re,te.sibling),pe=C(te,ae),pe.return=re,re=pe):(o(re,te),pe=_d(ae,re.mode,pe),pe.return=re,re=pe),N(re)):o(re,te)}return function(re,te,ae,pe){try{Fa=0;var Ae=Ge(re,te,ae,pe);return yo=null,Ae}catch(Oe){if(Oe===xo||Oe===Rc)throw Oe;var et=Tn(29,Oe,null,re.mode);return et.lanes=pe,et.return=re,et}finally{}}}var Ds=N_(!0),B_=N_(!1),Or=!1;function Ad(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ld(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Nr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Br(t,n,o){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(lt&2)!==0){var C=u.pending;return C===null?n.next=n:(n.next=C.next,C.next=n),u.pending=n,n=xc(t),x_(t,null,o),n}return _c(t,u,n,o),xc(t)}function Ua(t,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var u=n.lanes;u&=t.pendingLanes,o|=u,n.lanes=o,wv(t,o)}}function Dd(t,n){var o=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var C=null,k=null;if(o=o.firstBaseUpdate,o!==null){do{var N={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};k===null?C=k=N:k=k.next=N,o=o.next}while(o!==null);k===null?C=k=n:k=k.next=n}else C=k=n;o={baseState:u.baseState,firstBaseUpdate:C,lastBaseUpdate:k,shared:u.shared,callbacks:u.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=n:t.next=n,o.lastBaseUpdate=n}var Md=!1;function $a(){if(Md){var t=_o;if(t!==null)throw t}}function qa(t,n,o,u){Md=!1;var C=t.updateQueue;Or=!1;var k=C.firstBaseUpdate,N=C.lastBaseUpdate,q=C.shared.pending;if(q!==null){C.shared.pending=null;var J=q,se=J.next;J.next=null,N===null?k=se:N.next=se,N=J;var de=t.alternate;de!==null&&(de=de.updateQueue,q=de.lastBaseUpdate,q!==N&&(q===null?de.firstBaseUpdate=se:q.next=se,de.lastBaseUpdate=J))}if(k!==null){var me=C.baseState;N=0,de=se=J=null,q=k;do{var ie=q.lane&-536870913,ce=ie!==q.lane;if(ce?(Je&ie)===ie:(u&ie)===ie){ie!==0&&ie===Ts&&(Md=!0),de!==null&&(de=de.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var Ce=t,je=q;ie=n;var Ge=o;switch(je.tag){case 1:if(Ce=je.payload,typeof Ce=="function"){me=Ce.call(Ge,me,ie);break e}me=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=je.payload,ie=typeof Ce=="function"?Ce.call(Ge,me,ie):Ce,ie==null)break e;me=L({},me,ie);break e;case 2:Or=!0}}ie=q.callback,ie!==null&&(t.flags|=64,ce&&(t.flags|=8192),ce=C.callbacks,ce===null?C.callbacks=[ie]:ce.push(ie))}else ce={lane:ie,tag:q.tag,payload:q.payload,callback:q.callback,next:null},de===null?(se=de=ce,J=me):de=de.next=ce,N|=ie;if(q=q.next,q===null){if(q=C.shared.pending,q===null)break;ce=q,q=ce.next,ce.next=null,C.lastBaseUpdate=ce,C.shared.pending=null}}while(!0);de===null&&(J=me),C.baseState=J,C.firstBaseUpdate=se,C.lastBaseUpdate=de,k===null&&(C.shared.lanes=0),$r|=N,t.lanes=N,t.memoizedState=me}}function P_(t,n){if(typeof t!="function")throw Error(s(191,t));t.call(n)}function I_(t,n){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)P_(o[t],n)}var Pr=qe(null),Mc=qe(0);function z_(t,n){t=sr,ze(Mc,t),ze(Pr,n),sr=t|n.baseLanes}function jd(){ze(Mc,sr),ze(Pr,Pr.current)}function Od(){sr=Mc.current,Ee(Pr),Ee(Mc)}var on=qe(null),pn=null;function Ir(t){var n=t.alternate;ze(an,an.current&1),ze(on,t),pn===null&&(n===null||Pr.current!==null||n.memoizedState!==null)&&(pn=t)}function Nd(t){ze(an,an.current),ze(on,t),pn===null&&(pn=t)}function H_(t){t.tag===22?(ze(an,an.current),ze(on,t),pn===null&&(pn=t)):zr()}function zr(){ze(an,an.current),ze(on,on.current)}function $n(t){Ee(on),pn===t&&(pn=null),Ee(an)}var an=qe(0);function Va(t,n){ze(on,on.current),ze(an,n)}function Bd(t){Ee(an),Ee(on),pn===t&&(pn=null)}function jc(t){for(var n=t;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||sp(o)||op(o)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!=="independent"){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var tr=0,We=null,vt=null,Pt=null,Oc=!1,bo=!1,Ms=!1,Nc=0,Wa=0,So=null,EE=0;function At(){throw Error(s(321))}function Pd(t,n){if(n===null)return!1;for(var o=0;o<n.length&&o<t.length;o++)if(!Un(t[o],n[o]))return!1;return!0}function Id(t,n,o,u,C,k){return tr=k,We=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ue.H=t===null||t.memoizedState===null?w1:C1,Ms=!1,k=o(u,C),Ms=!1,bo&&(k=U_(n,o,u,C)),F_(t),k}function F_(t){ue.H=Uc;var n=vt!==null&&vt.next!==null;if(tr=0,Pt=vt=We=null,Oc=!1,Wa=0,So=null,n)throw Error(s(300));t===null||It||(t=t.dependencies,t!==null&&Ec(t)&&(It=!0))}function U_(t,n,o,u){We=t;var C=0;do{if(bo&&(So=null),Wa=0,bo=!1,25<=C)throw Error(s(301));if(C+=1,Pt=vt=null,t.updateQueue!=null){var k=t.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}ue.H=jE,k=n(o,u)}while(bo);return k}function kE(){var t=ue.H,n=t.useState()[0];return n=typeof n.then=="function"?Ga(n):n,t=t.useState()[0],(vt!==null?vt.memoizedState:null)!==t&&(We.flags|=1024),n}function zd(){var t=Nc!==0;return Nc=0,t}function Hd(t,n,o){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~o}function Fd(t){if(Oc){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Oc=!1}tr=0,Pt=vt=We=null,bo=!1,Wa=Nc=0,So=null}function xn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?We.memoizedState=Pt=t:Pt=Pt.next=t,Pt}function jt(){if(vt===null){var t=We.alternate;t=t!==null?t.memoizedState:null}else t=vt.next;var n=Pt===null?We.memoizedState:Pt.next;if(n!==null)Pt=n,vt=t;else{if(t===null)throw We.alternate===null?Error(s(467)):Error(s(310));vt=t,t={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},Pt===null?We.memoizedState=Pt=t:Pt=Pt.next=t}return Pt}function Bc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ga(t){var n=Wa;return Wa+=1,So===null&&(So=[]),t=M_(So,t,n),n=We,(Pt===null?n.memoizedState:Pt.next)===null&&(n=n.alternate,ue.H=n===null||n.memoizedState===null?w1:C1),t}function Pc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ga(t);if(t.$$typeof===ne)return;if(t.$$typeof===W)return sn(t)}throw Error(s(438,String(t)))}function Ud(t){var n=null,o=We.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var u=We.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(C){return C.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=Bc(),We.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(t),u=0;u<t;u++)o[u]=F;return n.index++,o}function nr(t,n){return typeof n=="function"?n(t):n}function Ic(t){var n=jt();return $d(n,vt,t)}function $d(t,n,o){var u=t.queue;if(u===null)throw Error(s(311));u.lastRenderedReducer=o;var C=t.baseQueue,k=u.pending;if(k!==null){if(C!==null){var N=C.next;C.next=k.next,k.next=N}n.baseQueue=C=k,u.pending=null}if(k=t.baseState,C===null)t.memoizedState=k;else{n=C.next;var q=N=null,J=null,se=n,de=!1;do{var me=se.lane&-536870913;if(me!==se.lane?(Je&me)===me:(tr&me)===me){var ie=se.revertLane;if(ie===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),me===Ts&&(de=!0);else if((tr&ie)===ie){se=se.next,ie===Ts&&(de=!0);continue}else me={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},J===null?(q=J=me,N=k):J=J.next=me,We.lanes|=ie,$r|=ie;me=se.action,Ms&&o(k,me),k=se.hasEagerState?se.eagerState:o(k,me)}else ie={lane:me,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},J===null?(q=J=ie,N=k):J=J.next=ie,We.lanes|=me,$r|=me;se=se.next}while(se!==null&&se!==n);if(J===null?N=k:J.next=q,!Un(k,t.memoizedState)&&(It=!0,de&&(o=_o,o!==null)))throw o;t.memoizedState=k,t.baseState=N,t.baseQueue=J,u.lastRenderedState=k}return C===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function qd(t){var n=jt(),o=n.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var u=o.dispatch,C=o.pending,k=n.memoizedState;if(C!==null){o.pending=null;var N=C=C.next;do k=t(k,N.action),N=N.next;while(N!==C);Un(k,n.memoizedState)||(It=!0),n.memoizedState=k,n.baseQueue===null&&(n.baseState=k),o.lastRenderedState=k}return[k,u]}function $_(t,n,o){var u=We,C=jt(),k=Xe;if(k){if(o===void 0)throw Error(s(407));o=o()}else o=n();var N=!Un((vt||C).memoizedState,o);if(N&&(C.memoizedState=o,It=!0),C=C.queue,Gd(W_.bind(null,u,C,t),[t]),t=C.getSnapshot!==n||N||Pt!==null&&(Pt.memoizedState.tag&1)!==0,wo(t?9:8,{destroy:void 0},V_.bind(null,u,C,o,n),null),t){if(u.flags|=2048,_t===null)throw Error(s(349));k||(tr&127)!==0||q_(u,n,o)}return o}function q_(t,n,o){t.flags|=16384,t={getSnapshot:n,value:o},n=We.updateQueue,n===null?(n=Bc(),We.updateQueue=n,n.stores=[t]):(o=n.stores,o===null?n.stores=[t]:o.push(t))}function V_(t,n,o,u){n.value=o,n.getSnapshot=u,G_(n)&&Y_(t)}function W_(t,n,o){return o(function(){G_(n)&&Y_(t)})}function G_(t){var n=t.getSnapshot;t=t.value;try{var o=n();return!Un(t,o)}catch{return!0}}function Y_(t){var n=bs(t,2);n!==null&&Dn(n,t,2)}function Vd(t){var n=xn();if(typeof t=="function"){var o=t;if(t=o(),Ms){kr(!0);try{o()}finally{kr(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nr,lastRenderedState:t},n}function X_(t,n,o,u){return t.baseState=o,$d(t,vt,typeof u=="function"?u:nr)}function TE(t,n,o,u,C){if(Fc(t))throw Error(s(485));if(t=n.action,t!==null){var k={payload:C,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){k.listeners.push(N)}};ue.T!==null?o(!0):k.isTransition=!1,u(k),o=n.pending,o===null?(k.next=n.pending=k,K_(n,k)):(k.next=o.next,n.pending=o.next=k)}}function K_(t,n){var o=n.action,u=n.payload,C=t.state;if(n.isTransition){var k=ue.T,N={};N.types=k!==null?k.types:null,ue.T=N;try{var q=o(C,u),J=ue.S;J!==null&&J(N,q),Q_(t,n,q)}catch(se){Wd(t,n,se)}finally{k!==null&&N.types!==null&&(k.types=N.types),ue.T=k}}else try{k=o(C,u),Q_(t,n,k)}catch(se){Wd(t,n,se)}}function Q_(t,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Z_(t,n,u)},function(u){return Wd(t,n,u)}):Z_(t,n,o)}function Z_(t,n,o){n.status="fulfilled",n.value=o,J_(n),t.state=o,n=t.pending,n!==null&&(o=n.next,o===n?t.pending=null:(o=o.next,n.next=o,K_(t,o)))}function Wd(t,n,o){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=o,J_(n),n=n.next;while(n!==u)}t.action=null}function J_(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function e1(t,n){return n}function t1(t,n){if(Xe){var o=_t.formState;if(o!==null){e:{var u=We;if(Xe){if(bt){t:{for(var C=bt,k=oi;C.nodeType!==8;){if(!k){C=null;break t}if(C=li(C.nextSibling),C===null){C=null;break t}}k=C.data,C=k==="F!"||k==="F"?C:null}if(C){bt=li(C.nextSibling),u=C.data==="F!";break e}}Dr(u)}u=!1}u&&(n=o[0])}}return o=xn(),o.memoizedState=o.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e1,lastRenderedState:n},o.queue=u,o=y1.bind(null,We,u),u.dispatch=o,u=Vd(!1),k=Zd.bind(null,We,!1,u.queue),u=xn(),C={state:n,dispatch:null,action:t,pending:null},u.queue=C,o=TE.bind(null,We,C,k,o),C.dispatch=o,u.memoizedState=t,[n,o,!1]}function n1(t){var n=jt();return i1(n,vt,t)}function i1(t,n,o){if(n=$d(t,n,e1)[0],t=Ic(nr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Ga(n)}catch(N){throw N===xo?Rc:N}else u=n;n=jt();var C=n.queue,k=C.dispatch;return o!==n.memoizedState&&(We.flags|=2048,wo(9,{destroy:void 0},RE.bind(null,C,o),null)),[u,k,t]}function RE(t,n){t.action=n}function r1(t){var n=jt(),o=vt;if(o!==null)return i1(n,o,t);jt(),n=n.memoizedState,o=jt();var u=o.queue.dispatch;return o.memoizedState=t,[n,u,!1]}function wo(t,n,o,u){return t={tag:t,create:o,deps:u,inst:n,next:null},n=We.updateQueue,n===null&&(n=Bc(),We.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=t.next=t:(u=o.next,o.next=t,t.next=u,n.lastEffect=t),t}function s1(){return jt().memoizedState}function zc(t,n,o,u){var C=xn();We.flags|=t,C.memoizedState=wo(1|n,{destroy:void 0},o,u===void 0?null:u)}function Hc(t,n,o,u){var C=jt();u=u===void 0?null:u;var k=C.memoizedState.inst;vt!==null&&u!==null&&Pd(u,vt.memoizedState.deps)?C.memoizedState=wo(n,k,o,u):(We.flags|=t,C.memoizedState=wo(1|n,k,o,u))}function o1(t,n){zc(8390656,8,t,n)}function Gd(t,n){Hc(2048,8,t,n)}function AE(t){We.flags|=4;var n=We.updateQueue;if(n===null)n=Bc(),We.updateQueue=n,n.events=[t];else{var o=n.events;o===null?n.events=[t]:o.push(t)}}function a1(t){var n=jt().memoizedState;return AE({ref:n,nextImpl:t}),function(){if((lt&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}function l1(t,n){return Hc(4,2,t,n)}function c1(t,n){return Hc(4,4,t,n)}function u1(t,n){if(typeof n=="function"){t=t();var o=n(t);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function h1(t,n,o){o=o!=null?o.concat([t]):null,Hc(4,4,u1.bind(null,n,t),o)}function Yd(){}function d1(t,n){var o=jt();n=n===void 0?null:n;var u=o.memoizedState;return n!==null&&Pd(n,u[1])?u[0]:(o.memoizedState=[t,n],t)}function f1(t,n){var o=jt();n=n===void 0?null:n;var u=o.memoizedState;if(n!==null&&Pd(n,u[1]))return u[0];if(u=t(),Ms){kr(!0);try{t()}finally{kr(!1)}}return o.memoizedState=[u,n],u}function Xd(t,n,o){return o===void 0||(tr&1073741824)!==0&&(Je&261930)===0?t.memoizedState=n:(t.memoizedState=o,t=w0(),We.lanes|=t,$r|=t,o)}function p1(t,n,o,u){return Un(o,n)?o:Pr.current!==null?(t=Xd(t,o,u),Un(t,n)||(It=!0),t):(tr&106)===0||(tr&1073741824)!==0&&(Je&261930)===0?(It=!0,t.memoizedState=o):(t=w0(),We.lanes|=t,$r|=t,n)}function m1(t,n,o,u,C){var k=he.p;he.p=k!==0&&8>k?k:8;var N=ue.T,q={};q.types=N!==null?N.types:null,ue.T=q,Zd(t,!1,n,o);try{var J=C(),se=ue.S;if(se!==null&&se(q,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var de=CE(J,u);Ya(t,n,de,Gn(t))}else Ya(t,n,u,Gn(t))}catch(me){Ya(t,n,{then:function(){},status:"rejected",reason:me},Gn())}finally{he.p=k,N!==null&&q.types!==null&&(N.types=q.types),ue.T=N}}function LE(){}function Kd(t,n,o,u){if(t.tag!==5)throw Error(s(476));var C=g1(t).queue;m1(t,C,n,Se,o===null?LE:function(){return v1(t),o(u)})}function g1(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Se,baseState:Se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nr,lastRenderedState:Se},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nr,lastRenderedState:o},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function v1(t){var n=g1(t);n.next===null&&(n=t.alternate.memoizedState),Ya(t,n.next.queue,{},Gn())}function Qd(){return sn(Uo)}function _1(){return jt().memoizedState}function x1(){return jt().memoizedState}function DE(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var o=Gn();t=Nr(o);var u=Br(n,t,o);u!==null&&(Dn(u,n,o),Ua(u,n,o)),n={cache:Ed()},t.payload=n;return}n=n.return}}function ME(t,n,o){var u=Gn();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Fc(t)?b1(n,o):(o=gd(t,n,o,u),o!==null&&(Dn(o,t,u),S1(o,n,u)))}function y1(t,n,o){var u=Gn();Ya(t,n,o,u)}function Ya(t,n,o,u){var C={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Fc(t))b1(n,C);else{var k=t.alternate;if(t.lanes===0&&(k===null||k.lanes===0)&&(k=n.lastRenderedReducer,k!==null))try{var N=n.lastRenderedState,q=k(N,o);if(C.hasEagerState=!0,C.eagerState=q,Un(q,N))return _c(t,n,C,0),_t===null&&vc(),!1}catch{}finally{}if(o=gd(t,n,C,u),o!==null)return Dn(o,t,u),S1(o,n,u),!0}return!1}function Zd(t,n,o,u){if(u={lane:2,revertLane:$f(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Fc(t)){if(n)throw Error(s(479))}else n=gd(t,o,u,2),n!==null&&Dn(n,t,2)}function Fc(t){var n=t.alternate;return t===We||n!==null&&n===We}function b1(t,n){bo=Oc=!0;var o=t.pending;o===null?n.next=n:(n.next=o.next,o.next=n),t.pending=n}function S1(t,n,o){if((o&4194048)!==0){var u=n.lanes;u&=t.pendingLanes,o|=u,n.lanes=o,wv(t,o)}}var Uc={readContext:sn,use:Pc,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At,useEffectEvent:At},w1={readContext:sn,use:Pc,useCallback:function(t,n){return xn().memoizedState=[t,n===void 0?null:n],t},useContext:sn,useEffect:o1,useImperativeHandle:function(t,n,o){o=o!=null?o.concat([t]):null,zc(4194308,4,u1.bind(null,n,t),o)},useLayoutEffect:function(t,n){return zc(4194308,4,t,n)},useInsertionEffect:function(t,n){zc(4,2,t,n)},useMemo:function(t,n){var o=xn();n=n===void 0?null:n;var u=t();if(Ms){kr(!0);try{t()}finally{kr(!1)}}return o.memoizedState=[u,n],u},useReducer:function(t,n,o){var u=xn();if(o!==void 0){var C=o(n);if(Ms){kr(!0);try{o(n)}finally{kr(!1)}}}else C=n;return u.memoizedState=u.baseState=C,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:C},u.queue=t,t=t.dispatch=ME.bind(null,We,t),[u.memoizedState,t]},useRef:function(t){var n=xn();return t={current:t},n.memoizedState=t},useState:function(t){t=Vd(t);var n=t.queue,o=y1.bind(null,We,n);return n.dispatch=o,[t.memoizedState,o]},useDebugValue:Yd,useDeferredValue:function(t,n){var o=xn();return Xd(o,t,n)},useTransition:function(){var t=Vd(!1);return t=m1.bind(null,We,t.queue,!0,!1),xn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,o){var u=We,C=xn();if(Xe){if(o===void 0)throw Error(s(407));o=o()}else{if(o=n(),_t===null)throw Error(s(349));(Je&127)!==0||q_(u,n,o)}C.memoizedState=o;var k={value:o,getSnapshot:n};return C.queue=k,o1(W_.bind(null,u,k,t),[t]),u.flags|=2048,wo(9,{destroy:void 0},V_.bind(null,u,k,o,n),null),o},useId:function(){var t=xn(),n=_t.identifierPrefix;if(Xe){var o=Ti,u=ki;o=(u&~(1<<32-Hn(u)-1)).toString(32)+o,n="_"+n+"R_"+o,o=Nc++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=EE++,n="_"+n+"r_"+o.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Qd,useFormState:t1,useActionState:t1,useOptimistic:function(t){var n=xn();n.memoizedState=n.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Zd.bind(null,We,!0,o),o.dispatch=n,[t,n]},useMemoCache:Ud,useCacheRefresh:function(){return xn().memoizedState=DE.bind(null,We)},useEffectEvent:function(t){var n=xn(),o={impl:t};return n.memoizedState=o,function(){if((lt&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}},C1={readContext:sn,use:Pc,useCallback:d1,useContext:sn,useEffect:Gd,useImperativeHandle:h1,useInsertionEffect:l1,useLayoutEffect:c1,useMemo:f1,useReducer:Ic,useRef:s1,useState:function(){return Ic(nr)},useDebugValue:Yd,useDeferredValue:function(t,n){var o=jt();return p1(o,vt.memoizedState,t,n)},useTransition:function(){var t=Ic(nr)[0],n=jt().memoizedState;return[typeof t=="boolean"?t:Ga(t),n]},useSyncExternalStore:$_,useId:_1,useHostTransitionStatus:Qd,useFormState:n1,useActionState:n1,useOptimistic:function(t,n){var o=jt();return X_(o,vt,t,n)},useMemoCache:Ud,useCacheRefresh:x1,useEffectEvent:a1},jE={readContext:sn,use:Pc,useCallback:d1,useContext:sn,useEffect:Gd,useImperativeHandle:h1,useInsertionEffect:l1,useLayoutEffect:c1,useMemo:f1,useReducer:qd,useRef:s1,useState:function(){return qd(nr)},useDebugValue:Yd,useDeferredValue:function(t,n){var o=jt();return vt===null?Xd(o,t,n):p1(o,vt.memoizedState,t,n)},useTransition:function(){var t=qd(nr)[0],n=jt().memoizedState;return[typeof t=="boolean"?t:Ga(t),n]},useSyncExternalStore:$_,useId:_1,useHostTransitionStatus:Qd,useFormState:r1,useActionState:r1,useOptimistic:function(t,n){var o=jt();return vt!==null?X_(o,vt,t,n):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:Ud,useCacheRefresh:x1,useEffectEvent:a1};function Jd(t,n,o,u){n=t.memoizedState,o=o(u,n),o=o==null?n:L({},n,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var ef={enqueueSetState:function(t,n,o){t=t._reactInternals;var u=Gn(),C=Nr(u);C.payload=n,o!=null&&(C.callback=o),n=Br(t,C,u),n!==null&&(Dn(n,t,u),Ua(n,t,u))},enqueueReplaceState:function(t,n,o){t=t._reactInternals;var u=Gn(),C=Nr(u);C.tag=1,C.payload=n,o!=null&&(C.callback=o),n=Br(t,C,u),n!==null&&(Dn(n,t,u),Ua(n,t,u))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var o=Gn(),u=Nr(o);u.tag=2,n!=null&&(u.callback=n),n=Br(t,u,o),n!==null&&(Dn(n,t,o),Ua(n,t,o))}};function E1(t,n,o,u,C,k,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,k,N):n.prototype&&n.prototype.isPureReactComponent?!Oa(o,u)||!Oa(C,k):!0}function k1(t,n,o,u){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==t&&ef.enqueueReplaceState(n,n.state,null)}function js(t,n){var o=n;if("ref"in n){o={};for(var u in n)u!=="ref"&&(o[u]=n[u])}if(t=t.defaultProps){o===n&&(o=L({},o));for(var C in t)o[C]===void 0&&(o[C]=t[C])}return o}function T1(t){gc(t)}function R1(t){console.error(t)}function A1(t){gc(t)}function $c(t,n){try{var o=t.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function L1(t,n,o){try{var u=t.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function tf(t,n,o){return o=Nr(o),o.tag=3,o.payload={element:null},o.callback=function(){$c(t,n)},o}function D1(t){return t=Nr(t),t.tag=3,t}function M1(t,n,o,u){var C=o.type.getDerivedStateFromError;if(typeof C=="function"){var k=u.value;t.payload=function(){return C(k)},t.callback=function(){L1(n,o,u)}}var N=o.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(t.callback=function(){L1(n,o,u),typeof C!="function"&&(qr===null?qr=new Set([this]):qr.add(this));var q=u.stack;this.componentDidCatch(u.value,{componentStack:q!==null?q:""})})}function OE(t,n,o,u,C){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=o.alternate,n!==null&&Es(n,o,C,!0),o=on.current,o!==null){switch(o.tag){case 31:case 13:case 19:return pn===null?uu():o.alternate===null&&Lt===0&&(Lt=3),o.flags&=-257,o.flags|=65536,o.lanes=C,u===Ac?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([u]):n.add(u),Hf(t,u,C)),!1;case 22:return o.flags|=65536,u===Ac?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([u]):o.add(u)),Hf(t,u,C)),!1}throw Error(s(435,o.tag))}return Hf(t,u,C),uu(),!1}if(Xe)return n=on.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=C,u!==bd&&(t=Error(s(422),{cause:u}),Pa(ii(t,o)))):(u!==bd&&(n=Error(s(423),{cause:u}),Pa(ii(n,o))),t=t.current.alternate,t.flags|=65536,C&=-C,t.lanes|=C,u=ii(u,o),C=tf(t.stateNode,u,C),Dd(t,C),Lt!==4&&(Lt=2)),!1;var k=Error(s(520),{cause:u});if(k=ii(k,o),nl===null?nl=[k]:nl.push(k),Lt!==4&&(Lt=2),n===null)return!0;u=ii(u,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,t=C&-C,o.lanes|=t,t=tf(o.stateNode,u,t),Dd(o,t),!1;case 1:if(n=o.type,k=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(qr===null||!qr.has(k))))return o.flags|=65536,C&=-C,o.lanes|=C,C=D1(C),M1(C,t,o,u),Dd(o,C),!1;break;case 22:if(o.memoizedState!==null)return o.flags|=65536,!1}o=o.return}while(o!==null);return!1}var nf=Error(s(461)),It=!1;function Gt(t,n,o,u){n.child=t===null?B_(n,null,o,u):Ds(n,t.child,o,u)}function j1(t,n,o,u,C){o=o.render;var k=n.ref;if("ref"in u){var N={};for(var q in u)q!=="ref"&&(N[q]=u[q])}else N=u;return ks(n),u=Id(t,n,o,N,k,C),q=zd(),t!==null&&!It?(Hd(t,n,C),ir(t,n,C)):(Xe&&q&&Sc(n),n.flags|=1,Gt(t,n,u,C),n.child)}function O1(t,n,o,u,C){if(t===null){var k=o.type;return typeof k=="function"&&!vd(k)&&k.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=k,N1(t,n,k,u,C)):(t=yc(o.type,null,u,n,n.mode,C),t.ref=n.ref,t.return=n,n.child=t)}if(k=t.child,!hf(t,C)){var N=k.memoizedProps;if(o=o.compare,o=o!==null?o:Oa,o(N,u)&&t.ref===n.ref)return ir(t,n,C)}return n.flags|=1,t=Qi(k,u),t.ref=n.ref,t.return=n,n.child=t}function N1(t,n,o,u,C){if(t!==null){var k=t.memoizedProps;if(Oa(k,u)&&t.ref===n.ref)if(It=!1,n.pendingProps=u=k,hf(t,C))(t.flags&131072)!==0&&(It=!0);else return n.lanes=t.lanes,ir(t,n,C)}return rf(t,n,o,u,C)}function B1(t,n,o,u){var C=u.children,k=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(k=k!==null?k.baseLanes|o:o,t!==null){for(u=n.child=t.child,C=0;u!==null;)C=C|u.lanes|u.childLanes,u=u.sibling;u=C&~k}else u=0,n.child=null;return P1(t,n,k,o,u)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Tc(n,k!==null?k.cachePool:null),k!==null?z_(n,k):jd(),H_(n);else return u=n.lanes=536870912,P1(t,n,k!==null?k.baseLanes|o:o,o,u)}else k!==null?(Tc(n,k.cachePool),z_(n,k),zr(),n.memoizedState=null):(t!==null&&Tc(n,null),jd(),zr());return Gt(t,n,C,o),n.child}function Xa(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function P1(t,n,o,u,C){var k=Td();return k=k===null?null:{parent:Bt._currentValue,pool:k},n.memoizedState={baseLanes:o,cachePool:k},t!==null&&Tc(n,null),jd(),H_(n),t!==null&&Es(t,n,u,!0),n.childLanes=C,null}function qc(t,n){return n=Vc({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function I1(t,n,o){return Ds(n,t.child,null,o),t=qc(n,n.pendingProps),t.flags|=2,$n(n),n.memoizedState=null,t}function NE(t,n,o){var u=n.pendingProps,C=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Xe){if(u.mode==="hidden")return t=qc(n,u),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Xa(null,t);if(Nd(n),(t=bt)?(t=ux(t,oi),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Ar!==null?{id:ki,overflow:Ti}:null,retryLane:536870912,hydrationErrors:null},o=b_(t),o.return=n,n.child=o,Qt=n,bt=null)):t=null,t===null)throw Dr(n);return n.lanes=536870912,null}return qc(n,u)}var k=t.memoizedState;if(k!==null){var N=k.dehydrated;if(Nd(n),C)if(n.flags&256)n.flags&=-257,n=I1(t,n,o);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(s(558));else if(It||Es(t,n,o,!1),C=(o&t.childLanes)!==0,It||C){if(Pr.current===null){if(u=_t,u!==null&&(N=Cv(u,o),N!==0&&N!==k.retryLane))throw k.retryLane=N,bs(t,N),Dn(u,t,N),nf;uu()}n=I1(t,n,o)}else t=k.treeContext,bt=li(N.nextSibling),Qt=n,Xe=!0,Lr=null,oi=!1,t!==null&&C_(n,t),n=qc(n,u),n.flags|=134221824;return n}return t=Qi(t.child,{mode:u.mode,children:u.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Co(t,n){var o=n.ref;if(o===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(t===null||t.ref!==o)&&(n.flags|=4194816)}}function rf(t,n,o,u,C){return ks(n),o=Id(t,n,o,u,void 0,C),u=zd(),t!==null&&!It?(Hd(t,n,C),ir(t,n,C)):(Xe&&u&&Sc(n),n.flags|=1,Gt(t,n,o,C),n.child)}function z1(t,n,o,u,C,k){return ks(n),n.updateQueue=null,o=U_(n,u,o,C),F_(t),u=zd(),t!==null&&!It?(Hd(t,n,k),ir(t,n,k)):(Xe&&u&&Sc(n),n.flags|=1,Gt(t,n,o,k),n.child)}function H1(t,n,o,u,C){if(ks(n),n.stateNode===null){var k=po,N=o.contextType;typeof N=="object"&&N!==null&&(k=sn(N)),k=new o(u,k),n.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=ef,n.stateNode=k,k._reactInternals=n,k=n.stateNode,k.props=u,k.state=n.memoizedState,k.refs={},Ad(n),N=o.contextType,k.context=typeof N=="object"&&N!==null?sn(N):po,k.state=n.memoizedState,N=o.getDerivedStateFromProps,typeof N=="function"&&(Jd(n,o,N,u),k.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(N=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),N!==k.state&&ef.enqueueReplaceState(k,k.state,null),qa(n,u,k,C),$a(),k.state=n.memoizedState),typeof k.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(t===null){k=n.stateNode;var q=n.memoizedProps,J=js(o,q);k.props=J;var se=k.context,de=o.contextType;N=po,typeof de=="object"&&de!==null&&(N=sn(de));var me=o.getDerivedStateFromProps;de=typeof me=="function"||typeof k.getSnapshotBeforeUpdate=="function",q=n.pendingProps!==q,de||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(q||se!==N)&&k1(n,k,u,N),Or=!1;var ie=n.memoizedState;k.state=ie,qa(n,u,k,C),$a(),se=n.memoizedState,q||ie!==se||Or?(typeof me=="function"&&(Jd(n,o,me,u),se=n.memoizedState),(J=Or||E1(n,o,J,u,ie,se,N))?(de||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(n.flags|=4194308)):(typeof k.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=se),k.props=u,k.state=se,k.context=N,u=J):(typeof k.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{k=n.stateNode,Ld(t,n),N=n.memoizedProps,de=js(o,N),k.props=de,me=n.pendingProps,ie=k.context,se=o.contextType,J=po,typeof se=="object"&&se!==null&&(J=sn(se)),q=o.getDerivedStateFromProps,(se=typeof q=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(N!==me||ie!==J)&&k1(n,k,u,J),Or=!1,ie=n.memoizedState,k.state=ie,qa(n,u,k,C),$a();var ce=n.memoizedState;N!==me||ie!==ce||Or||t!==null&&t.dependencies!==null&&Ec(t.dependencies)?(typeof q=="function"&&(Jd(n,o,q,u),ce=n.memoizedState),(de=Or||E1(n,o,de,u,ie,ce,J)||t!==null&&t.dependencies!==null&&Ec(t.dependencies))?(se||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(u,ce,J),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(u,ce,J)),typeof k.componentDidUpdate=="function"&&(n.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof k.componentDidUpdate!="function"||N===t.memoizedProps&&ie===t.memoizedState||(n.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&ie===t.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=ce),k.props=u,k.state=ce,k.context=J,u=de):(typeof k.componentDidUpdate!="function"||N===t.memoizedProps&&ie===t.memoizedState||(n.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&ie===t.memoizedState||(n.flags|=1024),u=!1)}return k=u,Co(t,n),u=(n.flags&128)!==0,k||u?(k=n.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:k.render(),n.flags|=1,t!==null&&u?(n.child=Ds(n,t.child,null,C),n.child=Ds(n,null,o,C)):Gt(t,n,o,C),n.memoizedState=k.state,t=n.child):t=ir(t,n,C),t}function F1(t,n,o,u){return ws(),n.flags|=256,Gt(t,n,o,u),n.child}var sf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function of(t){return{baseLanes:t,cachePool:L_()}}function af(t,n,o){return t=t!==null?t.childLanes&~o:0,n&&(t|=Wn),t}function U1(t,n,o){var u=n.pendingProps,C=!1,k=(n.flags&128)!==0,N;if((N=k)||(N=t!==null&&t.memoizedState===null?!1:(an.current&2)!==0),N&&(C=!0,n.flags&=-129),N=(n.flags&32)!==0,n.flags&=-33,t===null){if(Xe){if(C?Ir(n):zr(),(t=bt)?(t=ux(t,oi),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Ar!==null?{id:ki,overflow:Ti}:null,retryLane:536870912,hydrationErrors:null},o=b_(t),o.return=n,n.child=o,Qt=n,bt=null)):t=null,t===null)throw Dr(n);return op(t)?n.lanes=32:n.lanes=536870912,null}return k=u.children,u=u.fallback,C?(zr(),C=n.mode,k=Vc({mode:"hidden",children:k},C),u=Ss(u,C,o,null),k.return=n,u.return=n,k.sibling=u,n.child=k,u=n.child,u.memoizedState=of(o),u.childLanes=af(t,N,o),n.memoizedState=sf,Xa(null,u)):(Ir(n),lf(n,k))}var q=t.memoizedState;if(q!==null){var J=q.dehydrated;if(J!==null)return BE(t,n,k,N,u,J,q,o)}return C?(zr(),C=u.fallback,k=n.mode,q=t.child,J=q.sibling,u=Qi(q,{mode:"hidden",children:u.children}),u.subtreeFlags=q.subtreeFlags&1206910976,J!==null?C=Qi(J,C):(C=Ss(C,k,o,null),C.flags|=2),C.return=n,u.return=n,u.sibling=C,n.child=u,Xa(null,u),u=n.child,C=t.child.memoizedState,C===null?C=of(o):(k=C.cachePool,k!==null?(q=Bt._currentValue,k=k.parent!==q?{parent:q,pool:q}:k):k=L_(),C={baseLanes:C.baseLanes|o,cachePool:k}),u.memoizedState=C,u.childLanes=af(t,N,o),n.memoizedState=sf,Xa(t.child,u)):(Ir(n),o=t.child,t=o.sibling,o=Qi(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,t!==null&&(N=n.deletions,N===null?(n.deletions=[t],n.flags|=16):N.push(t)),n.child=o,n.memoizedState=null,o)}function lf(t,n){return n=Vc({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Vc(t,n){return t=Tn(22,t,null,n),t.lanes=0,t}function Wc(t,n,o){return Ds(n,t.child,null,o),t=lf(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function BE(t,n,o,u,C,k,N,q){if(o)return n.flags&256?(Ir(n),n.flags&=-257,Wc(t,n,q)):n.memoizedState!==null?(zr(),n.child=t.child,n.flags|=128,null):(zr(),k=C.fallback,N=n.mode,C=Vc({mode:"visible",children:C.children},N),k=Ss(k,N,q,null),k.flags|=2,C.return=n,k.return=n,C.sibling=k,n.child=C,Ds(n,t.child,null,q),C=n.child,C.memoizedState=of(q),C.childLanes=af(t,u,q),n.memoizedState=sf,Xa(null,C));if(Ir(n),op(k)){if(u=k.nextSibling&&k.nextSibling.dataset,u)var J=u.dgst;return u=J,u!==""&&(C=Error(s(419)),C.stack="",C.digest=u,Pa({value:C,source:null,stack:null})),Wc(t,n,q)}if(It||Es(t,n,q,!1),u=(q&t.childLanes)!==0,It||u){if(Pr.current!==null)return Wc(t,n,q);if(u=_t,u!==null&&(C=Cv(u,q),C!==0&&C!==N.retryLane))throw N.retryLane=C,bs(t,C),Dn(u,t,C),nf;return sp(k)||uu(),Wc(t,n,q)}return sp(k)?(n.flags|=192,n.child=t.child,null):(t=N.treeContext,bt=li(k.nextSibling),Qt=n,Xe=!0,Lr=null,oi=!1,t!==null&&C_(n,t),n=lf(n,C.children),n.flags|=134221824,n)}function $1(t,n,o){t.lanes|=n;var u=t.alternate;u!==null&&(u.lanes|=n),Cc(t.return,n,o)}function q1(t){for(var n=null;t!==null;){var o=t.alternate;o!==null&&jc(o)===null&&(n=t),t=t.sibling}return n}function Gc(t,n,o,u,C,k){var N=t.memoizedState;N===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:C,treeForkCount:k}:(N.isBackwards=n,N.rendering=null,N.renderingStartTime=0,N.last=u,N.tail=o,N.tailMode=C,N.treeForkCount=k)}function cf(t){var n=t.child;for(t.child=null;n!==null;){var o=n.sibling;n.sibling=t.child,t.child=n,n=o}}function uf(t,n,o){var u=n.pendingProps,C=u.revealOrder,k=u.tail;u=u.children;var N=an.current;if(n.flags&128)return Va(n,N),null;var q=(N&2)!==0;if(q?(N=N&1|2,n.flags|=128):N&=1,Va(n,N),C==="backwards"&&t!==null?(cf(t),Gt(t,n,u,o),cf(t)):Gt(t,n,u,o),u=Xe?Ba:0,!q&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&$1(t,o,n);else if(t.tag===19)$1(t,o,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(C){case"backwards":o=q1(n.child),o===null?(C=n.child,n.child=null):(C=o.sibling,o.sibling=null,cf(n)),Gc(n,!0,C,null,k,u);break;case"unstable_legacy-backwards":for(o=null,C=n.child,n.child=null;C!==null;){if(t=C.alternate,t!==null&&jc(t)===null){n.child=C;break}t=C.sibling,C.sibling=o,o=C,C=t}Gc(n,!0,o,null,k,u);break;case"together":Gc(n,!1,null,null,void 0,u);break;case"independent":n.memoizedState=null;break;default:o=q1(n.child),o===null?(C=n.child,n.child=null):(C=o.sibling,o.sibling=null),Gc(n,!1,C,o,k,u)}return n.child}function V1(t,n,o){var u=n.pendingProps;return Mr(n,n.type,u.value),Gt(t,n,u.children,o),n.child}function ir(t,n,o){if(t!==null&&(n.dependencies=t.dependencies),$r|=n.lanes,(o&n.childLanes)===0)if(t!==null){if(Es(t,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(s(153));if(n.child!==null){for(t=n.child,o=Qi(t,t.pendingProps),n.child=o,o.return=n;t.sibling!==null;)t=t.sibling,o=o.sibling=Qi(t,t.pendingProps),o.return=n;o.sibling=null}return n.child}function hf(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Ec(t)))}function PE(t,n,o){switch(n.tag){case 3:Te(n,n.stateNode.containerInfo),Mr(n,Bt,t.memoizedState.cache),ws();break;case 27:case 5:gt(n);break;case 4:Te(n,n.stateNode.containerInfo);break;case 10:Mr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Nd(n),null;break;case 13:var u=n.memoizedState;if(u!==null){if(u.dehydrated!==null)return Ir(n),n.flags|=128,null;u=Es(t,n,o,!1);var C=n.child.childLanes;return u||(o&C)!==0?U1(t,n,o):(Ir(n),t=ir(t,n,o),t!==null?t.sibling:null)}Ir(n);break;case 19:if(n.flags&128)return uf(t,n,o);if(C=(t.flags&128)!==0,u=(o&n.childLanes)!==0,u||(Es(t,n,o,!1),u=(o&n.childLanes)!==0),C){if(u)return uf(t,n,o);n.flags|=128}if(C=n.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),Va(n,an.current),u)break;return null;case 22:return n.lanes=0,B1(t,n,o,n.pendingProps);case 24:Mr(n,Bt,t.memoizedState.cache)}return ir(t,n,o)}function W1(t,n,o){if(t!==null)if(t.memoizedProps!==n.pendingProps)It=!0;else{if(!hf(t,o)&&(n.flags&128)===0)return It=!1,PE(t,n,o);It=(t.flags&131072)!==0}else It=!1,Xe&&(n.flags&1048576)!==0&&w_(n,Ba,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(t=As(n.elementType),n.type=t,typeof t=="function")vd(t)?(u=js(t,u),n.tag=1,n=H1(null,n,t,u,o)):(n.tag=0,n=rf(null,n,t,u,o));else{if(t!=null){var C=t.$$typeof;if(C===Y){n.tag=11,n=j1(null,n,t,u,o);break e}else if(C===z){n.tag=14,n=O1(null,n,t,u,o);break e}else if(C===W){n.tag=10,n.type=t,n=V1(null,n,o);break e}}throw n=oe(t)||t,Error(s(306,n,""))}}return n;case 0:return rf(t,n,n.type,n.pendingProps,o);case 1:return u=n.type,C=js(u,n.pendingProps),H1(t,n,u,C,o);case 3:e:{if(Te(n,n.stateNode.containerInfo),t===null)throw Error(s(387));u=n.pendingProps;var k=n.memoizedState;C=k.element,Ld(t,n),qa(n,u,null,o);var N=n.memoizedState;if(u=N.cache,Mr(n,Bt,u),u!==k.cache&&Cd(n,[Bt],o,!0),$a(),u=N.element,k.isDehydrated)if(k={element:u,isDehydrated:!1,cache:N.cache},n.updateQueue.baseState=k,n.memoizedState=k,n.flags&256){n=F1(t,n,u,o);break e}else if(u!==C){C=ii(Error(s(424)),n),Pa(C),n=F1(t,n,u,o);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(bt=li(t.firstChild),Qt=n,Xe=!0,Lr=null,oi=!0,o=B_(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|134221824,o=o.sibling}else{if(ws(),u===C){n=ir(t,n,o);break e}Gt(t,n,u,o)}n=n.child}return n;case 26:return Co(t,n),t===null?(o=vx(n.type,null,n.pendingProps,null))?n.memoizedState=o:Xe||(n.stateNode=K0(n.type,n.pendingProps,Be.current,n)):n.memoizedState=vx(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return gt(n),t===null&&Xe&&(u=n.stateNode=fx(n.type,n.pendingProps,Be.current),Qt=n,oi=!0,C=bt,Gr(n.type)?(ap=C,bt=li(u.firstChild)):bt=C),Gt(t,n,n.pendingProps.children,o),Co(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Xe&&((C=u=bt)&&(u=Dk(u,n.type,n.pendingProps,oi),u!==null?(n.stateNode=u,Qt=n,bt=li(u.firstChild),oi=!1,C=!0):C=!1),C||Dr(n)),gt(n),C=n.type,k=n.pendingProps,N=t!==null?t.memoizedProps:null,u=k.children,Zf(C,k)?u=null:N!==null&&Zf(C,N)&&(n.flags|=32),n.memoizedState!==null&&(C=Id(t,n,kE,null,null,o),Uo._currentValue=C),Co(t,n),Gt(t,n,u,o),n.child;case 6:return t===null&&Xe&&((t=o=bt)&&(o=Mk(o,n.pendingProps,oi),o!==null?(n.stateNode=o,Qt=n,bt=null,t=!0):t=!1),t||Dr(n)),null;case 13:return U1(t,n,o);case 4:return Te(n,n.stateNode.containerInfo),u=n.pendingProps,t===null?n.child=Ds(n,null,u,o):Gt(t,n,u,o),n.child;case 11:return j1(t,n,n.type,n.pendingProps,o);case 7:return u=n.pendingProps,Co(t,n),Gt(t,n,u,o),n.child;case 8:return Gt(t,n,n.pendingProps.children,o),n.child;case 12:return Gt(t,n,n.pendingProps.children,o),n.child;case 10:return V1(t,n,o);case 9:return C=n.type._context,u=n.pendingProps.children,ks(n),C=sn(C),u=u(C),n.flags|=1,Gt(t,n,u,o),n.child;case 14:return O1(t,n,n.type,n.pendingProps,o);case 15:return N1(t,n,n.type,n.pendingProps,o);case 19:return uf(t,n,o);case 31:return NE(t,n,o);case 22:return B1(t,n,o,n.pendingProps);case 24:return ks(n),u=sn(Bt),t===null?(C=Td(),C===null&&(C=_t,k=Ed(),C.pooledCache=k,k.refCount++,k!==null&&(C.pooledCacheLanes|=o),C=k),n.memoizedState={parent:u,cache:C},Ad(n),Mr(n,Bt,C)):((t.lanes&o)!==0&&(Ld(t,n),qa(n,null,null,o),$a()),C=t.memoizedState,k=n.memoizedState,C.parent!==u?(C={parent:u,cache:u},n.memoizedState=C,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=C),Mr(n,Bt,u)):(u=k.cache,Mr(n,Bt,u),u!==C.cache&&Cd(n,[Bt],o,!0))),Gt(t,n,n.pendingProps.children,o),n.child;case 30:return n.stateNode===null&&(n.stateNode={autoName:null,paired:null,clones:null,ref:null}),u=n.pendingProps,u.name!=null&&u.name!=="auto"?n.flags|=t===null?18882560:18874368:Xe&&Sc(n),t!==null&&t.memoizedProps.name!==u.name?n.flags|=4194816:Co(t,n),Gt(t,n,u.children,o),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}function rr(t){t.flags|=4}function df(t,n,o,u,C){var k;if((k=(t.mode&32)!==0)&&(k=o===null?bx(n,u):bx(n,u)&&(u.src!==o.src||u.srcSet!==o.srcSet)),k){if(t.flags|=16777216,(C&335544128)===C)if(t.stateNode.complete)t.flags|=8192;else if(T0())t.flags|=8192;else throw Ls=Ac,Rd}else t.flags&=-16777217}function G1(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Sx(n))if(T0())t.flags|=8192;else throw Ls=Ac,Rd}function Yc(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?bv():536870912,t.lanes|=n,Ao|=n)}function Ka(t,n){if(!Xe)switch(t.tailMode){case"visible":break;case"collapsed":for(var o=t.tail,u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null;break;default:for(n=t.tail,o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t.tail=null:o.sibling=null}}function St(t){var n=t.alternate!==null&&t.alternate.child===t.child,o=0,u=0;if(n)for(var C=t.child;C!==null;)o|=C.lanes|C.childLanes,u|=C.subtreeFlags&1206910976,u|=C.flags&1206910976,C.return=t,C=C.sibling;else for(C=t.child;C!==null;)o|=C.lanes|C.childLanes,u|=C.subtreeFlags,u|=C.flags,C.return=t,C=C.sibling;return t.subtreeFlags|=u,t.childLanes=o,n}function IE(t,n,o){var u=n.pendingProps;switch(yd(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(n),null;case 1:return St(n),null;case 3:return o=n.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),er(Bt),Ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(vo(n)?rr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Sd())),St(n),null;case 26:var C=n.type,k=n.memoizedState;return t===null?(rr(n),k!==null?(St(n),G1(n,k)):(St(n),df(n,C,null,u,o))):k?k!==t.memoizedState?(rr(n),St(n),G1(n,k)):(St(n),n.flags&=-16777217):(t=t.memoizedProps,t!==u&&rr(n),St(n),df(n,C,t,u,o)),null;case 27:if(rt(n),o=Be.current,C=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&rr(n);else{if(!u){if(n.stateNode===null)throw Error(s(166));return St(n),n.subtreeFlags&=-33554433,null}t=Mt.current,vo(n)?E_(n):(t=fx(C,u,o),n.stateNode=t,rr(n))}return St(n),n.subtreeFlags&=-33554433,null;case 5:if(rt(n),C=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&rr(n);else{if(!u){if(n.stateNode===null)throw Error(s(166));return St(n),n.subtreeFlags&=-33554433,null}if(k=Mt.current,vo(n))E_(n);else{var N=al(Be.current);switch(k){case 1:k=N.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:k=N.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":k=N.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":k=N.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":k=N.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof u.is=="string"?N.createElement("select",{is:u.is}):N.createElement("select"),u.multiple?k.multiple=!0:u.size&&(k.size=u.size);break;default:k=typeof u.is=="string"?N.createElement(C,{is:u.is}):N.createElement(C)}}k[rn]=n,k[kn]=u;e:for(N=n.child;N!==null;){if(N.tag===5||N.tag===6)k.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===n)break e;for(;N.sibling===null;){if(N.return===null||N.return===n)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}n.stateNode=k;e:switch(cn(k,C,u),C){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&rr(n)}}return St(n),n.subtreeFlags&=-33554433,df(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,o),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==u&&rr(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(s(166));if(t=Be.current,vo(n)){if(t=n.stateNode,o=n.memoizedProps,u=null,C=Qt,C!==null)switch(C.tag){case 27:case 5:u=C.memoizedProps}t[rn]=n,t=!!(t.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||W0(t.nodeValue,o)),t||Dr(n,!0)}else t=al(t).createTextNode(u),t[rn]=n,n.stateNode=t}return St(n),null;case 31:if(o=n.memoizedState,t===null||t.memoizedState!==null){if(u=vo(n),o!==null){if(t===null){if(!u)throw Error(s(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[rn]=n}else ws(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;St(n),t=!1}else o=Sd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),t=!0;if(!t)return n.flags&256?($n(n),n):($n(n),null);if((n.flags&128)!==0)throw Error(s(558))}return St(n),null;case 13:if(u=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(C=vo(n),u!==null&&u.dehydrated!==null){if(t===null){if(!C)throw Error(s(318));if(C=n.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(s(317));C[rn]=n}else ws(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;St(n),C=!1}else C=Sd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=C),C=!0;if(!C)return n.flags&256?($n(n),n):($n(n),null)}return $n(n),(n.flags&128)!==0?(n.lanes=o,n):(o=u!==null,t=t!==null&&t.memoizedState!==null,o&&(u=n.child,C=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(C=u.alternate.memoizedState.cachePool.pool),k=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(k=u.memoizedState.cachePool.pool),k!==C&&(u.flags|=2048)),o!==t&&o&&(n.child.flags|=8192),Yc(n,n.updateQueue),St(n),null);case 4:return Ve(),t===null&&Gf(n.stateNode.containerInfo),n.flags|=67108864,St(n),null;case 10:return er(n.type),St(n),null;case 19:if(Bd(n),u=n.memoizedState,u===null)return St(n),null;if(C=(n.flags&128)!==0,k=u.rendering,k===null)if(C)Ka(u,!1);else{if(Lt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(k=jc(t),k!==null){for(n.flags|=128,Ka(u,!1),t=k.updateQueue,n.updateQueue=t,Yc(n,t),n.subtreeFlags=0,t=o,o=n.child;o!==null;)y_(o,t),o=o.sibling;return Va(n,an.current&1|2),Xe&&Zi(n,u.treeForkCount),n.child}t=t.sibling}u.tail!==null&&Vt()>ou&&(n.flags|=128,C=!0,Ka(u,!1),n.lanes=4194304)}else{if(!C)if(t=jc(k),t!==null){if(n.flags|=128,C=!0,t=t.updateQueue,n.updateQueue=t,Yc(n,t),Ka(u,!0),u.tail===null&&u.tailMode!=="collapsed"&&u.tailMode!=="visible"&&!k.alternate&&!Xe)return St(n),null}else 2*Vt()-u.renderingStartTime>ou&&o!==536870912&&(n.flags|=128,C=!0,Ka(u,!1),n.lanes=4194304);u.isBackwards?(k.sibling=n.child,n.child=k):(t=u.last,t!==null?t.sibling=k:n.child=k,u.last=k)}if(u.tail!==null){t=u.tail;e:{for(o=t;o!==null;){if(o.alternate!==null){o=!1;break e}o=o.sibling}o=!0}return u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Vt(),t.sibling=null,k=an.current,k=C?k&1|2:k&1,u.tailMode==="visible"||u.tailMode==="collapsed"||!o||Xe?Va(n,k):(o=k,ze(on,n),ze(an,o),pn===null&&(pn=n)),Xe&&Zi(n,u.treeForkCount),t}return St(n),null;case 22:case 23:return $n(n),Od(),u=n.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(o&536870912)!==0&&(n.flags&128)===0&&(St(n),n.subtreeFlags&6&&(n.flags|=8192)):St(n),o=n.updateQueue,o!==null&&Yc(n,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048),t!==null&&Ee(Rs),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),er(Bt),St(n),null;case 25:return null;case 30:return n.flags|=33554432,St(n),null}throw Error(s(156,n.tag))}function zE(t,n){switch(yd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return er(Bt),Ve(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return rt(n),null;case 31:if(n.memoizedState!==null){if($n(n),n.alternate===null)throw Error(s(340));ws()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if($n(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(s(340));ws()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Bd(n),t=n.flags,t&65536?(n.flags=t&-65537|128,t=n.memoizedState,t!==null&&(t.rendering=null,t.tail=null),n.flags|=4,n):null;case 4:return Ve(),null;case 10:return er(n.type),null;case 22:case 23:return $n(n),Od(),t!==null&&Ee(Rs),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return er(Bt),null;case 25:return null;default:return null}}function Y1(t,n){switch(yd(n),n.tag){case 3:er(Bt),Ve();break;case 26:case 27:case 5:rt(n);break;case 4:Ve();break;case 31:n.memoizedState!==null&&$n(n);break;case 13:$n(n);break;case 19:Bd(n);break;case 10:er(n.type);break;case 22:case 23:$n(n),Od(),t!==null&&Ee(Rs);break;case 24:er(Bt)}}function Qa(t,n){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var C=u.next;o=C;do{if((o.tag&t)===t){u=void 0;var k=o.create,N=o.inst;u=k(),N.destroy=u}o=o.next}while(o!==C)}}catch(q){dt(n,n.return,q)}}function Hr(t,n,o){try{var u=n.updateQueue,C=u!==null?u.lastEffect:null;if(C!==null){var k=C.next;u=k;do{if((u.tag&t)===t){var N=u.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,C=n;var J=o,se=q;try{se()}catch(de){dt(C,J,de)}}}u=u.next}while(u!==k)}}catch(de){dt(n,n.return,de)}}function X1(t){var n=t.updateQueue;if(n!==null){var o=t.stateNode;try{I_(n,o)}catch(u){dt(t,t.return,u)}}}function K1(t,n,o){o.props=js(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(u){dt(t,n,u)}}function Ri(t,n){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:var C=t.stateNode,k=Xi(t.memoizedProps,C);(C.ref===null||C.ref.name!==k)&&(C.ref=ix(k)),u=C.ref;break;case 7:if(t.stateNode===null){var N=new Yn(t);c(t.child,!1,Ak,N,void 0,void 0),t.stateNode=N}u=t.stateNode;break;default:u=t.stateNode}typeof o=="function"?t.refCleanup=o(u):o.current=u}}catch(q){dt(t,n,q)}}function ln(t,n){var o=t.ref,u=t.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(C){dt(t,n,C)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(C){dt(t,n,C)}else o.current=null}function Xc(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var o=0;o<n.length;o++)cx(t.stateNode,n[o])}function Q1(t){for(var n=t.return;n!==null&&(pf(n)&&cx(t.stateNode,n.stateNode),!ff(n));)n=n.return}function Za(t){for(var n=t.return;n!==null&&(pf(n)&&Lk(t.stateNode,n.stateNode),!ff(n));)n=n.return}function ff(t){return t.tag===5||t.tag===3||t.tag===27}function pf(t){return t&&t.tag===7&&t.stateNode!==null}function mf(t){var n=t.type,o=t.memoizedProps,u=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(C){dt(t,t.return,C)}}function gf(t,n,o){try{var u=t.stateNode;hk(u,t.type,o,n),u[kn]=n}catch(C){dt(t,t.return,C)}}function Z1(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Gr(t.type)||t.tag===4}function vf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Z1(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Gr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function _f(t,n,o,u){var C=t.tag;if(C===5||C===6)C=t.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(C,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(C),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Ei)),Xc(t,u),st=!0;else if(C!==4&&(C===27&&(Xc(t,u),u=null,Gr(t.type)&&(o=t.stateNode,n=null)),t=t.child,t!==null))for(_f(t,n,o,u),t=t.sibling;t!==null;)_f(t,n,o,u),t=t.sibling}function Kc(t,n,o,u){var C=t.tag;if(C===5||C===6)C=t.stateNode,n?o.insertBefore(C,n):o.appendChild(C),Xc(t,u),st=!0;else if(C!==4&&(C===27&&(Xc(t,u),u=null,Gr(t.type)&&(o=t.stateNode)),t=t.child,t!==null))for(Kc(t,n,o,u),t=t.sibling;t!==null;)Kc(t,n,o,u),t=t.sibling}function J1(t){var n=t.stateNode,o=t.memoizedProps;try{for(var u=t.type,C=n.attributes;C.length;)n.removeAttributeNode(C[0]);cn(n,u,o),n[rn]=t,n[kn]=o}catch(k){dt(t,t.return,k)}}var Qc=!1,qn=null;function e0(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Qc=!0)}var Ai=null;function t0(){var t=Ai;return Ai=null,t}var Rn=0;function Eo(t,n,o,u,C){return Rn=0,n0(t.child,n,o,u,C)}function n0(t,n,o,u,C){for(var k=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(u!==null){var q=tp(N);u.push(q),q.view&&(k=!0)}else k||tp(N).view&&(k=!0);Qc=!0,tx(N,Rn===0?n:n+"_"+Rn,o),Rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&C||n0(t.child,n,o,u,C)&&(k=!0));t=t.sibling}return k}function Li(t,n){for(;t!==null;)t.tag===5?nx(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||Li(t.child,n)),t=t.sibling}function Zc(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Zc(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var n=t.memoizedProps;if(n.name==null||n.name==="auto")throw Error(s(544));var o=n.name;n=Ki(n.default,n.share),n!=="none"&&(Eo(t,o,n,null,!1)||Li(t.child,!1))}t=t.sibling}}function xf(t,n){if(t.tag===30){var o=t.stateNode,u=t.memoizedProps,C=Xi(u,o),k=Ki(u.default,o.paired?u.share:u.enter);k!=="none"?Eo(t,C,k,null,!1)?(Zc(t),o.paired||n||jo(t,u.onEnter)):Li(t.child,!1):Zc(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)xf(t,n),t=t.sibling;else Zc(t)}function yf(t){if(qn!==null&&qn.size!==0){var n=qn;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var o=t.memoizedProps,u=o.name;if(u!=null&&u!=="auto"){var C=n.get(u);if(C!==void 0){var k=Ki(o.default,o.share);if(k!=="none"&&(Eo(t,u,k,null,!1)?(k=t.stateNode,C.paired=k,k.paired=C,jo(t,o.onShare)):Li(t.child,!1)),n.delete(u),n.size===0)break}}}yf(t)}t=t.sibling}}}function bf(t){if(t.tag===30){var n=t.memoizedProps,o=Xi(n,t.stateNode),u=qn!==null?qn.get(o):void 0,C=Ki(n.default,u!==void 0?n.share:n.exit);C!=="none"&&(Eo(t,o,C,null,!1)?u!==void 0?(C=t.stateNode,u.paired=C,C.paired=u,qn.delete(o),jo(t,n.onShare)):jo(t,n.onExit):Li(t.child,!1)),qn!==null&&yf(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)bf(t),t=t.sibling;else qn!==null&&yf(t)}function i0(t){for(t=t.child;t!==null;){if(t.tag===30){var n=t.memoizedProps,o=Xi(n,t.stateNode);n=Ki(n.default,n.update),t.flags&=-5,n!=="none"&&Eo(t,o,n,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&i0(t);t=t.sibling}}function Sf(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var n=t.stateNode;n.paired!==null&&(n.paired=null,Li(t.child,!1))}Sf(t)}t=t.sibling}}function Jc(t){if(t.tag===30)t.stateNode.paired=null,Li(t.child,!1),Sf(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Jc(t),t=t.sibling;else Sf(t)}function r0(t){for(t=t.child;t!==null;)t.tag===30?Li(t.child,!1):(t.subtreeFlags&33554432)!==0&&r0(t),t=t.sibling}function wf(t,n,o,u,C,k,N){for(var q=!1;n!==null;){if(n.tag===5){var J=n.stateNode;if(k!==null&&Rn<k.length){var se=k[Rn],de=tp(J);(se.view||de.view)&&(q=!0);var me;if(me=(t.flags&4)===0)if(de.clip)me=!0;else{me=se.rect;var ie=de.rect;me=me.y!==ie.y||me.x!==ie.x||me.height!==ie.height||me.width!==ie.width}me&&(t.flags|=4),de.abs?de=!se.abs:(se=se.rect,de=de.rect,de=se.height!==de.height||se.width!==de.width),de&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&tx(J,Rn===0?o:o+"_"+Rn,C),q&&(t.flags&4)!==0||(Ai===null&&(Ai=[]),Ai.push(J,Rn===0?u:u+"_"+Rn,n.memoizedProps)),Rn++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&N?t.flags|=n.flags&32:wf(t,n.child,o,u,C,k,N)&&(q=!0));n=n.sibling}return q}function s0(t,n){for(t=t.child;t!==null;){if(t.tag===30){var o=t.memoizedProps,u=t.stateNode,C=Xi(o,u),k=Ki(o.default,o.update),N;N=t.memoizedState,t.memoizedState=null,u=t;var q=t.child;Rn=0,C=wf(u,q,C,C,k,N,!1),(t.flags&4)!==0&&C&&jo(t,o.onUpdate)}else(t.subtreeFlags&33554432)!==0&&s0(t);t=t.sibling}}var Zt=!1,ct=!1,Di=!1,Cf=!1,o0=typeof WeakSet=="function"?WeakSet:Set,Jt=null,Mi=!1,Ja=!1,eu=!1,Ef=!1;function HE(t,n,o){if(t=t.containerInfo,Kf=$o,t=u_(t),ud(t)){if("selectionStart"in t)var u={start:t.selectionStart,end:t.selectionEnd};else e:{u=(u=t.ownerDocument)&&u.defaultView||window;var C=u.getSelection&&u.getSelection();if(C&&C.rangeCount!==0){u=C.anchorNode;var k=C.anchorOffset,N=C.focusNode;C=C.focusOffset;try{u.nodeType,N.nodeType}catch{u=null;break e}var q=0,J=-1,se=-1,de=0,me=0,ie=t,ce=null;t:for(;;){for(var Ce;ie!==u||k!==0&&ie.nodeType!==3||(J=q+k),ie!==N||C!==0&&ie.nodeType!==3||(se=q+C),ie.nodeType===3&&(q+=ie.nodeValue.length),(Ce=ie.firstChild)!==null;)ce=ie,ie=Ce;for(;;){if(ie===t)break t;if(ce===u&&++de===k&&(J=q),ce===N&&++me===C&&(se=q),(Ce=ie.nextSibling)!==null)break;ie=ce,ce=ie.parentNode}ie=Ce}u=J===-1||se===-1?null:{start:J,end:se}}else u=null}u=u||{start:0,end:0}}else u=null;for(Qf={focusedElem:t,selectionRange:u},$o=!1,o=(o&335544064)===o,Jt=n,n=o?9270:1024;Jt!==null;){if(t=Jt,o&&(u=t.deletions,u!==null))for(k=0;k<u.length;k++)o&&bf(u[k]);if(t.alternate===null&&(t.flags&2)!==0)o&&e0(t),tu(o);else{if(t.tag===22){if(u=t.alternate,t.memoizedState!==null){u!==null&&u.memoizedState===null&&o&&bf(u),tu(o);continue}else if(u!==null&&u.memoizedState!==null){o&&e0(t),tu(o);continue}}u=t.child,(t.subtreeFlags&n)!==0&&u!==null?(u.return=t,Jt=u):(o&&i0(t),tu(o))}}qn=null}function tu(t){for(;Jt!==null;){var n=Jt,o=t,u=n.alternate,C=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((C&1024)!==0&&u!==null){o=void 0,C=u.memoizedProps,u=u.memoizedState;var k=n.stateNode;try{var N=js(n.type,C);o=k.getSnapshotBeforeUpdate(N,u),k.__reactInternalSnapshotBeforeUpdate=o}catch(q){dt(n,n.return,q)}}break;case 3:if((C&1024)!==0){if(u=n.stateNode.containerInfo,o=u.nodeType,o===9)rp(u);else if(o===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":rp(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:o&&u!==null&&(o=Xi(u.memoizedProps,u.stateNode),C=n.memoizedProps,C=Ki(C.default,C.update),C!=="none"&&Eo(u,o,C,u.memoizedState=[],!0));break;default:if((C&1024)!==0)throw Error(s(163))}if(u=n.sibling,u!==null){u.return=n.return,Jt=u;break}Jt=n.return}}function a0(t,n,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:ji(t,o),u&4&&Qa(5,o);break;case 1:if(ji(t,o),u&4)if(t=o.stateNode,n===null)try{t.componentDidMount()}catch(N){dt(o,o.return,N)}else{var C=js(o.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(C,n,t.__reactInternalSnapshotBeforeUpdate)}catch(N){dt(o,o.return,N)}}u&64&&X1(o),u&512&&Ri(o,o.return);break;case 3:if(ji(t,o),u&64&&(t=o.updateQueue,t!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{I_(t,n)}catch(N){dt(o,o.return,N)}}break;case 27:n===null&&u&4&&J1(o);case 26:case 5:ji(t,o),n===null&&u&4&&mf(o),u&512&&Ri(o,o.return);break;case 12:ji(t,o);break;case 31:ji(t,o),u&4&&h0(t,o);break;case 13:ji(t,o),u&4&&d0(t,o),u&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=ZE.bind(null,o),jk(t,o))));break;case 22:if(u=o.memoizedState!==null||Zt,!u){var k=n!==null&&n.memoizedState!==null||ct;n=Zt,C=ct,Zt=u,(ct=k)&&!C?(u=2,(o.subtreeFlags&8772)!==0&&(u|=1),_i(t,o,u)):ji(t,o),Zt=n,ct=C}break;case 30:ji(t,o),u&512&&Ri(o,o.return);break;case 7:u&512&&Ri(o,o.return);default:ji(t,o)}}function kf(t,n){for(t=t.child;t!==null;)l0(t,n),t=t.sibling}function l0(t,n){switch(t.tag){case 5:case 26:try{var o=t.stateNode;if(n){var u=o.style;typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"}else{var C=t.stateNode,k=t.memoizedProps.style,N=k!=null&&k.hasOwnProperty("display")?k.display:null;C.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(J){dt(t,t.return,J)}Tf(t,n);break;case 6:try{t.stateNode.nodeValue=n?"":t.memoizedProps,st=!0}catch(J){dt(t,t.return,J)}break;case 18:try{var q=t.stateNode;n?ex(q,!0):ex(t.stateNode,!1)}catch(J){dt(t,t.return,J)}break;case 22:case 23:t.memoizedState===null&&kf(t,n);break;default:kf(t,n)}}function Tf(t,n){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var o=t,u=n;switch(o.tag){case 4:l0(o,u);break e;case 22:o.memoizedState===null&&Tf(o,u);break e;default:Tf(o,u)}}t=t.sibling}}function c0(t){var n=t.alternate;n!==null&&(t.alternate=null,c0(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&oc(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Et=null,An=!1;function gi(t,n,o){for(o=o.child;o!==null;)u0(t,n,o),o=o.sibling}function u0(t,n,o){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Sa,o)}catch{}switch(o.tag){case 26:ct||ln(o,n),gi(t,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&!ct&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:ct||ln(o,n),Za(o);var u=Et,C=An;Gr(o.type)&&(Et=o.stateNode,An=!1),gi(t,n,o),px(o.stateNode,o.type,o.memoizedProps),Et=u,An=C;break;case 5:ct||ln(o,n),Za(o);case 6:if(o.tag===6&&Za(o),u=Et,C=An,Et=null,gi(t,n,o),Et=u,An=C,Et!==null)if(An)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(o.stateNode),st=!0}catch(k){dt(o,n,k)}else try{Et.removeChild(o.stateNode),st=!0}catch(k){dt(o,n,k)}break;case 18:Et!==null&&(An?(t=Et,J0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),qo(t)):J0(Et,o.stateNode));break;case 4:u=Et,C=An,Et=o.stateNode.containerInfo,An=!0,gi(t,n,o),Et=u,An=C;break;case 0:case 11:case 14:case 15:Hr(2,o,n),ct||Hr(4,o,n),gi(t,n,o);break;case 1:ct||(ln(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"&&K1(o,n,u)),gi(t,n,o);break;case 21:gi(t,n,o);break;case 22:ct=(u=ct)||o.memoizedState!==null,gi(t,n,o),ct=u;break;case 30:ln(o,n),gi(t,n,o);break;case 7:ct||ln(o,n),gi(t,n,o);break;default:gi(t,n,o)}}function h0(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{qo(t)}catch(o){dt(n,n.return,o)}}}function d0(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{qo(t)}catch(o){dt(n,n.return,o)}}function FE(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new o0),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new o0),n;default:throw Error(s(435,t.tag))}}function nu(t,n){var o=FE(t);n.forEach(function(u){if(!o.has(u)){o.add(u);var C=JE.bind(null,t,u);u.then(C,C)}})}function yn(t,n,o){var u=n.deletions;if(u!==null)for(var C=0;C<u.length;C++){var k=u[C],N=t,q=n,J=q;e:for(;J!==null;){switch(J.tag){case 27:if(Gr(J.type)){Et=J.stateNode,An=!1;break e}break;case 5:Et=J.stateNode,An=!1;break e;case 3:case 4:Et=J.stateNode.containerInfo,An=!0;break e}J=J.return}if(Et===null)throw Error(s(160));u0(N,q,k),Et=null,An=!1,N=k.alternate,N!==null&&(N.return=null),k.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)f0(n,t,o),n=n.sibling}var vi=null;function f0(t,n,o){var u=t.alternate,C=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(C&4&&(u=t.updateQueue,u=u!==null?u.events:null,u!==null))for(var k=0;k<u.length;k++){var N=u[k];N.ref.impl=N.nextImpl}yn(n,t,o),bn(t),C&4&&(Hr(3,t,t.return),Qa(3,t),Hr(5,t,t.return));break;case 1:yn(n,t,o),bn(t),C&512&&(ct||u===null||ln(u,u.return)),C&64&&Zt&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?n:o.concat(n))));break;case 26:if(k=vi,yn(n,t,o),bn(t),C&512&&(ct||u===null||ln(u,u.return)),C&4)if(C=u!==null?u.memoizedState:null,o=t.memoizedState,u===null)if(o===null)if(t.stateNode===null)if(Zt)t.stateNode=K0(t.type,t.memoizedProps,n.containerInfo,t);else{e:{n=t.type,o=t.memoizedProps,C=k.ownerDocument||k;t:switch(n){case"title":u=C.getElementsByTagName("title")[0],(!u||u[Ea]||u[rn]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=C.createElement(n),C.head.insertBefore(u,C.querySelector("head > title"))),cn(u,n,o),u[rn]=t,Kt(u),n=u;break e;case"link":if(k=yx("link","href",C).get(n+(o.href||""))){for(N=0;N<k.length;N++)if(u=k[N],u.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&u.getAttribute("rel")===(o.rel==null?null:o.rel)&&u.getAttribute("title")===(o.title==null?null:o.title)&&u.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){k.splice(N,1);break t}}u=C.createElement(n),cn(u,n,o),C.head.appendChild(u);break;case"meta":if(k=yx("meta","content",C).get(n+(o.content||""))){for(N=0;N<k.length;N++)if(u=k[N],u.getAttribute("content")===(o.content==null?null:""+o.content)&&u.getAttribute("name")===(o.name==null?null:o.name)&&u.getAttribute("property")===(o.property==null?null:o.property)&&u.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&u.getAttribute("charset")===(o.charSet==null?null:o.charSet)){k.splice(N,1);break t}}u=C.createElement(n),cn(u,n,o),C.head.appendChild(u);break;default:throw Error(s(468,n))}u[rn]=t,Kt(u),n=u}t.stateNode=n}else Zt||hp(k,t.type,t.stateNode);else t.stateNode=xx(k,o,t.memoizedProps);else C!==o?(C===null?(n=u.stateNode,n===null||ct||n.parentNode.removeChild(n)):C.count--,o===null?Zt||hp(k,t.type,t.stateNode):xx(k,o,t.memoizedProps)):o===null&&t.stateNode!==null&&gf(t,t.memoizedProps,u.memoizedProps);break;case 27:yn(n,t,o),bn(t),C&512&&(ct||u===null||ln(u,u.return)),u!==null&&C&4&&gf(t,t.memoizedProps,u.memoizedProps);break;case 5:if(k=Di,Di=!1,yn(n,t,o),Di=k,bn(t),C&512&&(ct||u===null||ln(u,u.return)),t.flags&32){n=t.stateNode;try{oo(n,""),st=!0}catch(de){dt(t,t.return,de)}}C&4&&t.stateNode!=null&&(n=t.memoizedProps,gf(t,n,u!==null?u.memoizedProps:n)),C&1024&&(Cf=!0);break;case 6:if(yn(n,t,o),bn(t),C&4){if(t.stateNode===null)throw Error(s(162));n=t.memoizedProps,o=t.stateNode;try{o.nodeValue=n,st=!0}catch(de){dt(t,t.return,de)}}break;case 3:if(st=!1,vu=null,k=vi,vi=ll(n.containerInfo),yn(n,t,o),vi=k,bn(t),C&4&&u!==null&&u.memoizedState.isDehydrated)try{qo(n.containerInfo)}catch(de){dt(t,t.return,de)}Cf&&(Cf=!1,p0(t)),st=!1;break;case 4:C=Di,Di=Zt,u=Ov(),k=vi,vi=ll(t.stateNode.containerInfo),yn(n,t,o),bn(t),vi=k,st&&Ja&&(eu=!0),st=u,Di=C;break;case 12:yn(n,t,o),bn(t);break;case 31:yn(n,t,o),bn(t),C&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,nu(t,n)));break;case 13:yn(n,t,o),bn(t),t.child.flags&8192&&t.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(su=Vt()),C&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,nu(t,n)));break;case 22:k=t.memoizedState!==null,N=u!==null&&u.memoizedState!==null;var q=Zt,J=ct,se=Di;Zt=q||k,Di=se||k,ct=J||N,yn(n,t,o),ct=J,Di=se,Zt=q,bn(t),C&8192&&(n=t.stateNode,n._visibility=k?n._visibility&-2:n._visibility|1,!k||u===null||N||Zt||ct||(n=N||ct,o=Zt,u=ct,Zt=k||Zt,ct=n,Fr(t,2),Zt=o,ct=u),!k&&Di||kf(t,k)),C&4&&(n=t.updateQueue,n!==null&&(o=n.retryQueue,o!==null&&(n.retryQueue=null,nu(t,o))));break;case 19:yn(n,t,o),bn(t),C&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,nu(t,n)));break;case 30:C&512&&(ct||u===null||ln(u,u.return)),C=Ov(),k=Ja,N=(o&335544064)===o,q=t.memoizedProps,Ja=N&&Ki(q.default,q.update)!=="none",yn(n,t,o),bn(t),N&&u!==null&&st&&(t.flags|=4),Ja=k,st=C;break;case 21:break;case 7:C&512&&(ct||u===null||ln(u,u.return)),u&&u.stateNode!==null&&(u.stateNode._fragmentFiber=t);default:yn(n,t,o),bn(t)}}function bn(t){var n=t.flags;if(n&2){try{for(var o,u=t.return;u!==null;){if(Z1(u)){o=u;break}u=u.return}u=null;for(var C=t.return;C!==null;){if(pf(C)){var k=C.stateNode;u===null?u=[k]:u.push(k)}if(ff(C))break;C=C.return}var N=u;if(o==null)throw Error(s(160));switch(o.tag){case 27:var q=o.stateNode,J=vf(t);Kc(t,J,q,N);break;case 5:var se=o.stateNode;o.flags&32&&(oo(se,""),o.flags&=-33);var de=vf(t);Kc(t,de,se,N);break;case 3:case 4:var me=o.stateNode.containerInfo,ie=vf(t);_f(t,ie,me,N);break;default:throw Error(s(161))}}catch(ce){dt(t,t.return,ce)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function p0(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;p0(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,$o=!0,n.reset(),$o=!1),t=t.sibling}}function ko(t,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)m0(n,t),n=n.sibling;else s0(n)}function m0(t,n){var o=t.alternate;if(o===null)xf(t,!1);else switch(t.tag){case 3:if(Ef=Mi=!1,t0(),ko(n,t),!Mi&&!eu){if(t=Ai,t!==null)for(var u=0;u<t.length;u+=3){o=t[u];var C=t[u+1];nx(o,t[u+2]),o=o.ownerDocument.documentElement,o!==null&&o.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+C+")"})}t=n.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Ef=!0}Ai=null;break;case 5:ko(n,t);break;case 4:u=Mi,Mi=!1,ko(n,t),Mi&&(eu=!0),Mi=u;break;case 22:t.memoizedState===null&&(o.memoizedState!==null?xf(t,!1):ko(n,t));break;case 30:u=Mi,C=t0(),Mi=!1,ko(n,t),Mi&&(t.flags|=4);var k=t.memoizedProps,N=t.stateNode;n=Xi(k,N),N=Xi(o.memoizedProps,N);var q=Ki(k.default,k.update);q==="none"?n=!1:(k=o.memoizedState,o.memoizedState=null,o=t.child,Rn=0,n=wf(t,o,n,N,q,k,!0),Rn!==(k===null?0:k.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(jo(t,t.memoizedProps.onUpdate),Ai=C):C!==null&&(C.push.apply(C,Ai),Ai=C),Mi=(t.flags&32)!==0?!0:u;break;default:ko(n,t)}}function ji(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)a0(t,n.alternate,n),n=n.sibling}function Fr(t,n){for(t=t.child;t!==null;){var o=t,u=n;switch(o.tag){case 0:case 11:case 14:case 15:Hr(4,o,o.return),Fr(o,u);break;case 1:ln(o,o.return);var C=o.stateNode;typeof C.componentWillUnmount=="function"&&K1(o,o.return,C),Fr(o,u);break;case 27:(u&2)!==0&&px(o.stateNode,o.type,o.memoizedProps);case 5:ln(o,o.return),o.tag!==5&&o.tag!==27||Za(o),Fr(o,u);break;case 6:Za(o);break;case 26:ln(o,o.return),C=o.stateNode,o.memoizedState!==null||C===null||ct||C.parentNode.removeChild(C),Fr(o,u);break;case 22:o.memoizedState===null&&Fr(o,u);break;case 30:ln(o,o.return),Fr(o,u);break;case 7:ln(o,o.return);default:Fr(o,u)}t=t.sibling}}function _i(t,n,o){for(o=(n.subtreeFlags&8772)!==0?o:o&-2,n=n.child;n!==null;){var u=n.alternate,C=t,k=n,N=k.flags,q=(o&1)!==0;switch(k.tag){case 0:case 11:case 15:_i(C,k,o),Qa(4,k);break;case 1:if(_i(C,k,o),u=k,C=u.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(de){dt(u,u.return,de)}if(u=k,C=u.updateQueue,C!==null){var J=u.stateNode;try{var se=C.shared.hiddenCallbacks;if(se!==null)for(C.shared.hiddenCallbacks=null,C=0;C<se.length;C++)P_(se[C],J)}catch(de){dt(u,u.return,de)}}q&&N&64&&X1(k),Ri(k,k.return);break;case 27:(o&2)!==0&&J1(k);case 5:k.tag!==5&&k.tag!==27||Q1(k),_i(C,k,o),q&&u===null&&N&4&&mf(k),Ri(k,k.return);break;case 6:Q1(k);break;case 26:J=k.stateNode,k.memoizedState!==null||J===null||Zt||hp(ll(J.ownerDocument),k.type,J),_i(C,k,o),q&&u===null&&N&4&&mf(k),Ri(k,k.return);break;case 12:_i(C,k,o);break;case 31:_i(C,k,o),q&&N&4&&h0(C,k);break;case 13:_i(C,k,o),q&&N&4&&d0(C,k);break;case 22:k.memoizedState===null&&_i(C,k,o),Ri(k,k.return);break;case 30:_i(C,k,o),Ri(k,k.return);break;case 7:Ri(k,k.return);default:_i(C,k,o)}n=n.sibling}}function Rf(t,n){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Ia(o))}function Af(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ia(t))}function ai(t,n,o,u){var C=(o&335544064)===o;if(n.subtreeFlags&(C?10262:10256))for(n=n.child;n!==null;)g0(t,n,o,u),n=n.sibling;else C&&r0(n)}function g0(t,n,o,u){var C=(o&335544064)===o;C&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Jc(n);var k=n.flags;switch(n.tag){case 0:case 11:case 15:ai(t,n,o,u),k&2048&&Qa(9,n);break;case 1:ai(t,n,o,u);break;case 3:ai(t,n,o,u),C&&Ef&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),k&2048&&(k=null,n.alternate!==null&&(k=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==k&&(n.refCount++,k!=null&&Ia(k)));break;case 12:if(k&2048){ai(t,n,o,u),k=n.stateNode;try{var N=n.memoizedProps,q=N.id,J=N.onPostCommit;typeof J=="function"&&J(q,n.alternate===null?"mount":"update",k.passiveEffectDuration,-0)}catch(se){dt(n,n.return,se)}}else ai(t,n,o,u);break;case 31:ai(t,n,o,u);break;case 13:ai(t,n,o,u);break;case 23:break;case 22:N=n.stateNode,q=n.alternate,n.memoizedState!==null?(C&&q!==null&&q.memoizedState===null&&Jc(q),N._visibility&2?ai(t,n,o,u):el(t,n)):(C&&q!==null&&q.memoizedState!==null&&Jc(n),N._visibility&2?ai(t,n,o,u):(N._visibility|=2,To(t,n,o,u,(n.subtreeFlags&10256)!==0||!1))),k&2048&&Rf(q,n);break;case 24:ai(t,n,o,u),k&2048&&Af(n.alternate,n);break;case 30:C&&(k=n.alternate,k!==null&&(Li(k.child,!0),Li(n.child,!0))),ai(t,n,o,u);break;default:ai(t,n,o,u)}}function To(t,n,o,u,C){for(C=C&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var k=t,N=n,q=o,J=u,se=N.flags;switch(N.tag){case 0:case 11:case 15:To(k,N,q,J,C),Qa(8,N);break;case 23:break;case 22:var de=N.stateNode;N.memoizedState!==null?de._visibility&2?To(k,N,q,J,C):el(k,N):(de._visibility|=2,To(k,N,q,J,C)),C&&se&2048&&Rf(N.alternate,N);break;case 24:To(k,N,q,J,C),C&&se&2048&&Af(N.alternate,N);break;default:To(k,N,q,J,C)}n=n.sibling}}function el(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=t,u=n,C=u.flags;switch(u.tag){case 22:el(o,u),C&2048&&Rf(u.alternate,u);break;case 24:el(o,u),C&2048&&Af(u.alternate,u);break;default:el(o,u)}n=n.sibling}}var Os=8192;function Ns(t,n,o){if(t.subtreeFlags&Os)for(t=t.child;t!==null;)v0(t,n,o),t=t.sibling}function v0(t,n,o){switch(t.tag){case 26:Ns(t,n,o),t.flags&Os&&(t.memoizedState!==null?Gk(o,vi,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&Cx(o,t)));break;case 5:Ns(t,n,o),t.flags&Os&&(t=t.stateNode,(n&335544128)===n&&Cx(o,t));break;case 3:case 4:var u=vi;vi=ll(t.stateNode.containerInfo),Ns(t,n,o),vi=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Os,Os=16777216,Ns(t,n,o),Os=u):Ns(t,n,o));break;case 30:if((t.flags&Os)!==0&&(u=t.memoizedProps.name,u!=null&&u!=="auto")){var C=t.stateNode;C.paired=null,qn===null&&(qn=new Map),qn.set(u,C)}Ns(t,n,o);break;default:Ns(t,n,o)}}function _0(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function tl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Jt=u,y0(u,t)}_0(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)x0(t),t=t.sibling}function x0(t){switch(t.tag){case 0:case 11:case 15:tl(t),t.flags&2048&&Hr(9,t,t.return);break;case 3:tl(t);break;case 12:tl(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,iu(t)):tl(t);break;default:tl(t)}}function iu(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];Jt=u,y0(u,t)}_0(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Hr(8,n,n.return),iu(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,iu(n));break;default:iu(n)}t=t.sibling}}function y0(t,n){for(;Jt!==null;){var o=Jt;switch(o.tag){case 0:case 11:case 15:Hr(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ia(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,Jt=u;else e:for(o=t;Jt!==null;){u=Jt;var C=u.sibling,k=u.return;if(c0(u),u===o){Jt=null;break e}if(C!==null){C.return=k,Jt=C;break e}Jt=k}}}var UE={getCacheForType:function(t){var n=sn(Bt),o=n.data.get(t);return o===void 0&&(o=t(),n.data.set(t,o)),o},cacheSignal:function(){return sn(Bt).controller.signal}},$E=typeof WeakMap=="function"?WeakMap:Map,lt=0,_t=null,Qe=null,Je=0,ht=0,Vn=null,Ur=!1,Ro=!1,Lf=!1,sr=0,Lt=0,$r=0,Bs=0,ru=0,Wn=0,Ao=0,nl=null,Ln=null,Df=!1,su=0,b0=0,ou=1/0,au=null,qr=null,Rt=0,xi=null,Ps=null,Oi=0,Mf=0,jf=null,S0=null,Lo=null,Do=null,Mo=null,il=0,lu=null;function Gn(){return(lt&2)!==0&&Je!==0?Je&-Je:ue.T!==null?$f():Ev()}function w0(){if(Wn===0)if((Je&536870912)===0||Xe){var t=nc;nc<<=1,(nc&3932160)===0&&(nc=262144),Wn=t}else Wn=536870912;return t=on.current,t!==null&&(t.flags|=32),Wn}function jo(t,n){if(n!=null){var o=t.stateNode,u=o.ref;u===null&&(u=o.ref=ix(Xi(t.memoizedProps,o))),Do===null&&(Do=[]),Do.push(n.bind(null,u))}}function Dn(t,n,o){(t===_t&&(ht===2||ht===9)||t.cancelPendingCommit!==null)&&(Oo(t,0),Vr(t,Je,Wn,!1)),Ca(t,o),((lt&2)===0||t!==_t)&&(t===_t&&((lt&2)===0&&(Bs|=o),Lt===4&&Vr(t,Je,Wn,!1)),Ni(t))}function C0(t,n,o){if((lt&6)!==0)throw Error(s(327));var u=!o&&(n&127)===0&&(n&t.expiredLanes)===0||wa(t,n),C=u?WE(t,n):Nf(t,n,!0),k=u;do{if(C===0){Ro&&!u&&Vr(t,n,0,!1);break}else{if(o=t.current.alternate,k&&!qE(o)){C=Nf(t,n,!1),k=!1;continue}if(C===2){if(k=n,t.errorRecoveryDisabledLanes&k)var N=0;else N=t.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){n=N;e:{var q=t;C=nl;var J=q.current.memoizedState.isDehydrated;if(J&&(Oo(q,N).flags|=256),N=Nf(q,N,!1),N!==2&&N!==6){if(Lf&&!J){q.errorRecoveryDisabledLanes|=k,Bs|=k,C=4;break e}k=Ln,Ln=C,k!==null&&(Ln===null?Ln=k:Ln.push.apply(Ln,k))}C=N}if(k=!1,C!==2)continue}}if(C===1){Oo(t,0),Vr(t,n,0,!0);break}e:{switch(u=t,k=C,k){case 0:case 1:throw Error(s(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Vr(u,n,Wn,!Ur);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(s(329))}if((n&62914560)===n&&(C=su+300-Vt(),10<C)){if(Vr(u,n,Wn,!Ur),rc(u,0,!0)!==0)break e;Oi=n,u.timeoutHandle=ep(E0.bind(null,u,o,Ln,au,Df,n,Wn,Bs,Ao,Ur,k,"Throttled",-0,0),C);break e}E0(u,o,Ln,au,Df,n,Wn,Bs,Ao,Ur,k,null,-0,0)}}break}while(!0);Ni(t)}function E0(t,n,o,u,C,k,N,q,J,se,de,me,ie,ce){t.timeoutHandle=-1;var Ce=n.subtreeFlags,je=(k&335544064)===k;if(me=null,(je||Ce&8192||(Ce&16785408)===16785408)&&(me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ei},qn=null,v0(n,k,me),je&&(Ce=me,je=t.containerInfo,je=(je.nodeType===9?je:je.ownerDocument).__reactViewTransition,je!=null&&(Ce.count++,Ce.waitingForViewTransition=!0,Ce=hl.bind(Ce),je.finished.then(Ce,Ce))),Ce=(k&62914560)===k?su-Vt():(k&4194048)===k?b0-Vt():0,Ce=Yk(me,Ce),Ce!==null)){Oi=k,t.cancelPendingCommit=Ce(j0.bind(null,t,n,k,o,u,C,N,q,J,se,de,me,null,ie,ce)),Vr(t,k,N,!se);return}j0(t,n,k,o,u,C,N,q,J,se,de,me)}function qE(t){for(var n=t;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var C=o[u],k=C.getSnapshot;C=C.value;try{if(!Un(k(),C))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Vr(t,n,o,u){n=yv(t,n),n&=~ru,n&=~Bs,t.suspendedLanes|=n,t.pingedLanes&=~n,u&&(t.warmLanes|=n),u=t.expirationTimes;for(var C=n;0<C;){var k=31-Hn(C),N=1<<k;u[k]=-1,C&=~N}o!==0&&Sv(t,o,n)}function cu(){return(lt&6)===0?(rl(0),!1):!0}function Of(){if(Qe!==null){if(ht===0)var t=Qe.return;else t=Qe,Ji=Cs=null,Fd(t),yo=null,Fa=0,t=Qe;for(;t!==null;)Y1(t.alternate,t),t=t.return;Qe=null}}function Oo(t,n){var o=t.timeoutHandle;return o!==-1&&(t.timeoutHandle=-1,pk(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),Oi=0,Of(),_t=t,Qe=o=Qi(t.current,null),Je=n,ht=0,Vn=null,Ur=!1,Ro=wa(t,n),Lf=!1,Ao=Wn=ru=Bs=$r=Lt=0,Ln=nl=null,Df=!1,sr=yv(t,n),vc(),o}function k0(t,n){We=null,ue.H=Uc,n===xo||n===Rc?(n=j_(),ht=3):n===Rd?(n=j_(),ht=4):ht=n===nf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Vn=n,Qe===null&&(Lt=1,$c(t,ii(n,t.current)))}function T0(){var t=on.current;return t===null?!0:(Je&4194048)===Je?pn===null:(Je&62914560)===Je||(Je&536870912)!==0?t===pn:!1}function R0(){var t=ue.H;return ue.H=Uc,t===null?Uc:t}function A0(){var t=ue.A;return ue.A=UE,t}function uu(){Lt=4,Ur||(Je&4194048)!==Je&&on.current!==null||(Ro=!0),($r&134217727)===0&&(Bs&134217727)===0||_t===null||Vr(_t,Je,Wn,!1)}function Nf(t,n,o){var u=lt;lt|=2;var C=R0(),k=A0();(_t!==t||Je!==n)&&(au=null,Oo(t,n)),n=!1;var N=Lt;e:do try{if(ht!==0&&Qe!==null){var q=Qe,J=Vn;switch(ht){case 8:Of(),N=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(n=!0);var se=ht;if(ht=0,Vn=null,No(t,q,J,se),o&&Ro){N=0;break e}break;default:se=ht,ht=0,Vn=null,No(t,q,J,se)}}VE(),N=Lt;break}catch(de){k0(t,de)}while(!0);return n&&t.shellSuspendCounter++,Ji=Cs=null,lt=u,ue.H=C,ue.A=k,Qe===null&&(_t=null,Je=0,vc()),N}function VE(){for(;Qe!==null;)L0(Qe)}function WE(t,n){var o=lt;lt|=2;var u=R0(),C=A0();_t!==t||Je!==n?(au=null,ou=Vt()+500,Oo(t,n)):Ro=wa(t,n);e:do try{if(ht!==0&&Qe!==null){n=Qe;var k=Vn;t:switch(ht){case 1:ht=0,Vn=null,No(t,n,k,1);break;case 2:case 9:if(D_(k)){ht=0,Vn=null,D0(n);break}n=function(){ht!==2&&ht!==9||_t!==t||(ht=7),Ni(t)},k.then(n,n);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:D_(k)?(ht=0,Vn=null,D0(n)):(ht=0,Vn=null,No(t,n,k,7));break;case 5:var N=null;switch(Qe.tag){case 26:N=Qe.memoizedState;case 5:case 27:var q=Qe;if(N?Sx(N):q.stateNode.complete){ht=0,Vn=null;var J=q.sibling;if(J!==null)Qe=J;else{var se=q.return;se!==null?(Qe=se,hu(se)):Qe=null}break t}}ht=0,Vn=null,No(t,n,k,5);break;case 6:ht=0,Vn=null,No(t,n,k,6);break;case 8:Of(),Lt=6;break e;default:throw Error(s(462))}}GE();break}catch(de){k0(t,de)}while(!0);return Ji=Cs=null,ue.H=u,ue.A=C,lt=o,Qe!==null?0:(_t=null,Je=0,vc(),Lt)}function GE(){for(;Qe!==null&&!Jn();)L0(Qe)}function L0(t){var n=W1(t.alternate,t,sr);t.memoizedProps=t.pendingProps,n===null?hu(t):Qe=n}function D0(t){var n=t,o=n.alternate;switch(n.tag){case 15:case 0:n=z1(o,n,n.pendingProps,n.type,void 0,Je);break;case 11:n=z1(o,n,n.pendingProps,n.type.render,n.ref,Je);break;case 5:Fd(n);var u=n;u===Qt&&(Xe?(wc(u),u.tag===5&&u.stateNode!=null&&(bt=u.stateNode)):(wc(u),Xe=!0));default:Y1(o,n),n=Qe=y_(n,sr),n=W1(o,n,sr)}t.memoizedProps=t.pendingProps,n===null?hu(t):Qe=n}function No(t,n,o,u){Ji=Cs=null,Fd(n),yo=null,Fa=0;var C=n.return;try{if(OE(t,C,n,o,Je)){Lt=1,$c(t,ii(o,t.current)),Qe=null;return}}catch(k){if(C!==null)throw Qe=C,k;Lt=1,$c(t,ii(o,t.current)),Qe=null;return}n.flags&32768?(Xe||u===1?t=!0:Ro||(Je&536870912)!==0?t=!1:(Ur=t=!0,(u===2||u===9||u===3||u===6)&&(u=on.current,u!==null&&u.tag===13&&(u.flags|=16384))),M0(n,t)):hu(n)}function hu(t){var n=t;do{if((n.flags&32768)!==0){M0(n,Ur);return}t=n.return;var o=IE(n.alternate,n,sr);if(o!==null){Qe=o;return}if(n=n.sibling,n!==null){Qe=n;return}Qe=n=t}while(n!==null);Lt===0&&(Lt=5)}function M0(t,n){do{var o=zE(t.alternate,t);if(o!==null){o.flags&=32767,Qe=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(t=t.sibling,t!==null)){Qe=t;return}Qe=t=o}while(t!==null);Lt=6,Qe=null}function j0(t,n,o,u,C,k,N,q,J,se,de,me){t.cancelPendingCommit=null;do du();while(Rt!==0);if((lt&6)!==0)throw Error(s(327));if(n!==null){if(n===t.current)throw Error(s(177));t===_t&&(Qe=_t=null,Je=0),Ps=n,xi=t,Oi=o,jf=C,S0=u,YE(t,n,o,N,q,J,me)}}function YE(t,n,o,u,C,k,N){var q=n.lanes|n.childLanes;if(Mf=q,q|=md,y5(t,o,q,u,C,k),Do=null,(o&335544064)===o?(Mo=SE(t),u=10262):(Mo=null,u=10256),(n.subtreeFlags&u)!==0||(n.flags&u)!==0?(t.callbackNode=null,t.callbackPriority=0,ek(eo,function(){return zf(),null})):(t.callbackNode=null,t.callbackPriority=0),Qc=!1,u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=ue.T,ue.T=null,C=he.p,he.p=2,k=lt,lt|=4;try{HE(t,n,o)}finally{lt=k,he.p=C,ue.T=u}}Rt=1,Qc?Lo=yk(N,t.containerInfo,Mo,Bf,Pf,KE,If,zf,XE):(Bf(),Pf(),If())}function XE(t){if(Rt!==0){var n=xi.onRecoverableError;n(t,{componentStack:null})}}function KE(){Rt===3&&(Rt=0,m0(Ps,xi),Rt=4)}function Bf(){if(Rt===1){Rt=0;var t=xi,n=Ps,o=Oi,u=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||u){u=ue.T,ue.T=null;var C=he.p;he.p=2;var k=lt;lt|=4;try{Ja=eu=!1,f0(n,t,o),o=Qf;var N=u_(t.containerInfo),q=o.focusedElem,J=o.selectionRange;if(N!==q&&q&&q.ownerDocument&&c_(q.ownerDocument.documentElement,q)){if(J!==null&&ud(q)){var se=J.start,de=J.end;if(de===void 0&&(de=se),"selectionStart"in q)q.selectionStart=se,q.selectionEnd=Math.min(de,q.value.length);else{var me=q.ownerDocument||document,ie=me&&me.defaultView||window;if(ie.getSelection){var ce=ie.getSelection(),Ce=q.textContent.length,je=Math.min(J.start,Ce),Ge=J.end===void 0?je:Math.min(J.end,Ce);!ce.extend&&je>Ge&&(N=Ge,Ge=je,je=N);var re=l_(q,je),te=l_(q,Ge);if(re&&te&&(ce.rangeCount!==1||ce.anchorNode!==re.node||ce.anchorOffset!==re.offset||ce.focusNode!==te.node||ce.focusOffset!==te.offset)){var ae=me.createRange();ae.setStart(re.node,re.offset),ce.removeAllRanges(),je>Ge?(ce.addRange(ae),ce.extend(te.node,te.offset)):(ae.setEnd(te.node,te.offset),ce.addRange(ae))}}}}for(me=[],ce=q;ce=ce.parentNode;)ce.nodeType===1&&me.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<me.length;q++){var pe=me[q];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}$o=!!Kf,Qf=Kf=null}finally{lt=k,he.p=C,ue.T=u}}t.current=n,Rt=2}}function Pf(){if(Rt===2){Rt=0;var t=xi,n=Ps,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=ue.T,ue.T=null;var u=he.p;he.p=2;var C=lt;lt|=4;try{a0(t,n.alternate,n)}finally{lt=C,he.p=u,ue.T=o}}Rt=3}}function If(){if(Rt===4||Rt===3){Rt=0;var t=Lo;Lo=null,Js();var n=xi,o=Ps,u=Oi,C=S0,k=(u&335544064)===u?10262:10256;if((o.subtreeFlags&k)!==0||(o.flags&k)!==0?Rt=5:(Rt=0,Ps=xi=null,O0(n,n.pendingLanes)),k=n.pendingLanes,k===0&&(qr=null),Wh(u),o=o.stateNode,zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(Sa,o,void 0,(o.current.flags&128)===128)}catch{}if(C!==null){o=ue.T,k=he.p,he.p=2,ue.T=null;try{for(var N=n.onRecoverableError,q=0;q<C.length;q++){var J=C[q];N(J.value,{componentStack:J.stack})}}finally{ue.T=o,he.p=k}}if(C=Do,N=Mo,Mo=null,C!==null&&(Do=null,N===null&&(N=[]),t!==null))for(J=0;J<C.length;J++)o=(0,C[J])(N),o!==void 0&&t.finished.finally(o);(Oi&3)!==0&&du(),Ni(n),k=n.pendingLanes,(u&261930)!==0&&(k&42)!==0?n===lu?il++:(il=0,lu=n):(il=0,lu=null),rl(0)}}function O0(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ia(n)))}function du(){return Lo!==null&&(Lo.skipTransition(),Lo=null),Bf(),Pf(),If(),zf()}function zf(){if(Rt!==5)return!1;var t=xi,n=Mf;Mf=0;var o=Wh(Oi),u=ue.T,C=he.p;try{he.p=32>o?32:o,ue.T=null,o=jf,jf=null;var k=xi,N=Oi;if(Rt=0,Ps=xi=null,Oi=0,(lt&6)!==0)throw Error(s(331));var q=lt;if(lt|=4,x0(k.current),g0(k,k.current,N,o),lt=q,rl(0,!1),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(Sa,k)}catch{}return!0}finally{he.p=C,ue.T=u,O0(t,n)}}function N0(t,n,o){n=ii(o,n),n=tf(t.stateNode,n,2),t=Br(t,n,2),t!==null&&(Ca(t,2),Ni(t))}function dt(t,n,o){if(t.tag===3)N0(t,t,o);else for(;n!==null;){if(n.tag===3){N0(n,t,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(qr===null||!qr.has(u))){t=ii(o,t),o=D1(2),u=Br(n,o,2),u!==null&&(M1(o,u,n,t),Ca(u,2),Ni(u));break}}n=n.return}}function Hf(t,n,o){var u=t.pingCache;if(u===null){u=t.pingCache=new $E;var C=new Set;u.set(n,C)}else C=u.get(n),C===void 0&&(C=new Set,u.set(n,C));C.has(o)||(Lf=!0,C.add(o),t=QE.bind(null,t,n,o),n.then(t,t))}function QE(t,n,o){var u=t.pingCache;u!==null&&u.delete(n),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,_t===t&&(Je&o)===o&&((Lt===4||Lt===3&&(Je&62914560)===Je&&300>Vt()-su)&&(lt&2)===0?Oo(t,0):ru|=o,Ao===Je&&(Ao=0)),Ni(t)}function B0(t,n){n===0&&(n=bv()),t=bs(t,n),t!==null&&(Ca(t,n),Ni(t))}function ZE(t){var n=t.memoizedState,o=0;n!==null&&(o=n.retryLane),B0(t,o)}function JE(t,n){var o=0;switch(t.tag){case 31:case 13:var u=t.stateNode,C=t.memoizedState;C!==null&&(o=C.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(s(314))}u!==null&&u.delete(n),B0(t,o)}function ek(t,n){return En(t,n)}var Bo=null,Po=null,Ff=!1,fu=!1,Uf=!1,Wr=0;function Ni(t){t!==Po&&t.next===null&&(Po===null?Bo=Po=t:Po=Po.next=t),fu=!0,Ff||(Ff=!0,nk())}function rl(t,n){if(!Uf&&fu){Uf=!0;do for(var o=!1,u=Bo;u!==null;){if(t!==0){var C=u.pendingLanes;if(C===0)var k=0;else{var N=u.suspendedLanes,q=u.pingedLanes;k=(1<<31-Hn(42|t)+1)-1,k&=C&~(N&~q),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(o=!0,H0(u,k))}else k=Je,k=rc(u,u===_t?k:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(k&3)===0||wa(u,k)||(o=!0,H0(u,k));u=u.next}while(o);Uf=!1}}function tk(){P0()}function P0(){fu=Ff=!1;var t=0;Wr!==0&&fk()&&(t=Wr);for(var n=Vt(),o=null,u=Bo;u!==null;){var C=u.next,k=I0(u,n);k===0?(u.next=null,o===null?Bo=C:o.next=C,C===null&&(Po=o)):(o=u,(t!==0||(k&3)!==0)&&(fu=!0)),u=C}Rt!==0&&Rt!==5||rl(t),Wr!==0&&(Wr=0)}function I0(t,n){for(var o=t.suspendedLanes,u=t.pingedLanes,C=t.expirationTimes,k=t.pendingLanes&-62914561;0<k;){var N=31-Hn(k),q=1<<N,J=C[N];J===-1?((q&o)===0||(q&u)!==0)&&(C[N]=x5(q,n)):J<=n&&(t.expiredLanes|=q),k&=~q}if(n=_t,o=Je,o=rc(t,t===n?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,o===0||t===n&&(ht===2||ht===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&Zn(u),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||wa(t,o)){if(n=o&-o,n===t.callbackPriority)return n;switch(u!==null&&Zn(u),Wh(o)){case 2:case 8:o=vn;break;case 32:o=eo;break;case 268435456:o=xv;break;default:o=eo}return u=z0.bind(null,t),o=En(o,u),t.callbackPriority=n,t.callbackNode=o,n}return u!==null&&u!==null&&Zn(u),t.callbackPriority=2,t.callbackNode=null,2}function z0(t,n){if(Rt!==0&&Rt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(du()&&t.callbackNode!==o)return null;var u=Je;return u=rc(t,t===_t?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(C0(t,u,n),I0(t,Vt()),t.callbackNode!=null&&t.callbackNode===o?z0.bind(null,t):null)}function H0(t,n){if(du())return null;C0(t,n,!0)}function nk(){mk(function(){(lt&6)!==0?En(ei,tk):P0()})}function $f(){if(Wr===0){var t=Ts;t===0&&(t=tc,tc<<=1,(tc&261888)===0&&(tc=256)),Wr=t}return Wr}function F0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:cc(t)}function ik(t,n,o,u,C){if(n==="submit"&&o&&o.stateNode===C){var k=F0((C[kn]||null).action),N=u.submitter;N&&(n=(n=N[kn]||null)?F0(n.formAction):N.getAttribute("formAction"),n!==null&&(k=n,N=null));var q=new fc("action","action",null,u,C);t.push({event:q,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Wr!==0){var J=new FormData(C,N);Kd(o,{pending:!0,data:J,method:C.method,action:k},null,J)}}else typeof k=="function"&&(q.preventDefault(),J=new FormData(C,N),Kd(o,{pending:!0,data:J,method:C.method,action:k},k,J))},currentTarget:C}]})}}for(var qf=0;qf<pd.length;qf++){var Vf=pd[qf],rk=Vf.toLowerCase(),sk=Vf[0].toUpperCase()+Vf.slice(1);mi(rk,"on"+sk)}mi(f_,"onAnimationEnd"),mi(p_,"onAnimationIteration"),mi(m_,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(pE,"onTransitionRun"),mi(mE,"onTransitionStart"),mi(gE,"onTransitionCancel"),mi(g_,"onTransitionEnd"),ro("onMouseEnter",["mouseout","mouseover"]),ro("onMouseLeave",["mouseout","mouseover"]),ro("onPointerEnter",["pointerout","pointerover"]),ro("onPointerLeave",["pointerout","pointerover"]),_s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_s("onBeforeInput",["compositionend","keypress","textInput","paste"]),_s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sl="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(" "),ok=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sl));function U0(t,n){n=(n&4)!==0;for(var o=0;o<t.length;o++){var u=t[o],C=u.event;u=u.listeners;e:{var k=void 0;if(n)for(var N=u.length-1;0<=N;N--){var q=u[N],J=q.instance,se=q.currentTarget;if(q=q.listener,J!==k&&C.isPropagationStopped())break e;k=q,C.currentTarget=se;try{k(C)}catch(de){gc(de)}C.currentTarget=null,k=J}else for(N=0;N<u.length;N++){if(q=u[N],J=q.instance,se=q.currentTarget,q=q.listener,J!==k&&C.isPropagationStopped())break e;k=q,C.currentTarget=se;try{k(C)}catch(de){gc(de)}C.currentTarget=null,k=J}}}}function Ze(t,n){var o=n[Tv];o===void 0&&(o=n[Tv]=new Set);var u=t+"__bubble";o.has(u)||($0(n,t,2,!1),o.add(u))}function Wf(t,n,o){var u=0;n&&(u|=4),$0(o,t,u,n)}var pu="_reactListening"+Math.random().toString(36).slice(2);function Gf(t){if(!t[pu]){t[pu]=!0,Lv.forEach(function(o){o!=="selectionchange"&&(ok.has(o)||Wf(o,!1,t),Wf(o,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[pu]||(n[pu]=!0,Wf("selectionchange",!1,n))}}function $0(t,n,o,u){switch(Mx(n)){case 2:var C=Zk;break;case 8:C=Jk;break;default:C=fp}o=C.bind(null,n,o,t),C=void 0,!ed||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(C=!0),u?C!==void 0?t.addEventListener(n,o,{capture:!0,passive:C}):t.addEventListener(n,o,!0):C!==void 0?t.addEventListener(n,o,{passive:C}):t.addEventListener(n,o,!1)}function Yf(t,n,o,u,C){var k=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var N=u.tag;if(N===3||N===4){var q=u.stateNode.containerInfo;if(q===C)break;if(N===4)for(N=u.return;N!==null;){var J=N.tag;if((J===3||J===4)&&N.stateNode.containerInfo===C)return;N=N.return}for(;q!==null;){if(N=vs(q),N===null)return;if(J=N.tag,J===5||J===6||J===26||J===27){u=k=N;continue e}q=q.parentNode}}u=u.return}$v(function(){var se=k,de=Zh(o),me=[];e:{var ie=v_.get(t);if(ie!==void 0){var ce=fc,Ce=t;switch(t){case"keypress":if(hc(o)===0)break e;case"keydown":case"keyup":ce=q5;break;case"focusin":Ce="focus",ce=rd;break;case"focusout":Ce="blur",ce=rd;break;case"beforeblur":case"afterblur":ce=rd;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Wv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=M5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=X5;break;case f_:case p_:case m_:ce=N5;break;case g_:ce=Q5;break;case"scroll":case"scrollend":ce=L5;break;case"wheel":ce=J5;break;case"copy":case"cut":case"paste":ce=P5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Yv;break;case"submit":ce=G5;break;case"toggle":case"beforetoggle":ce=tE}var je=(n&4)!==0,Ge=!je&&(t==="scroll"||t==="scrollend"),re=je?ie!==null?ie+"Capture":null:ie;je=[];for(var te=se,ae;te!==null;){var pe=te;if(ae=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ae===null||re===null||(pe=Ta(te,re),pe!=null&&je.push(ol(te,pe,ae))),Ge)break;te=te.return}0<je.length&&(ie=new ce(ie,Ce,null,o,de),me.push({event:ie,listeners:je}))}}if((n&7)===0){e:{if(ce=t==="mouseover"||t==="pointerover",ie=t==="mouseout"||t==="pointerout",ce&&o!==Qh&&(Ce=o.relatedTarget||o.fromElement)&&(vs(Ce)||Ce[to]))break e;(ie||ce)&&(Ce=de.window===de?de:(ce=de.ownerDocument)?ce.defaultView||ce.parentWindow:window,ie?(ce=o.relatedTarget||o.toElement,ie=se,ce=ce?vs(ce):null,ce!==null&&(Ge=p(ce),je=ce.tag,ce!==Ge||je!==5&&je!==27&&je!==6)&&(ce=null)):(ie=null,ce=se),ie!==ce&&(je=Wv,pe="onMouseLeave",re="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(je=Yv,pe="onPointerLeave",re="onPointerEnter",te="pointer"),Ge=ie==null?Ce:ka(ie),ae=ce==null?Ce:ka(ce),Ce=new je(pe,te+"leave",ie,o,de),Ce.target=Ge,Ce.relatedTarget=ae,pe=null,vs(de)===se&&(je=new je(re,te+"enter",ce,o,de),je.target=ae,je.relatedTarget=Ge,pe=je),Ge=pe,je=ie&&ce?R(ie,ce,ak):null,ie!==null&&q0(me,Ce,ie,je,!1),ce!==null&&Ge!==null&&q0(me,Ge,ce,je,!0)))}e:{if(ie=se?ka(se):window,ce=ie.nodeName&&ie.nodeName.toLowerCase(),ce==="select"||ce==="input"&&ie.type==="file")var Ae=n_;else if(e_(ie))if(i_)Ae=hE;else{Ae=cE;var et=lE}else ce=ie.nodeName,!ce||ce.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?se&&Kh(se.elementType)&&(Ae=n_):Ae=uE;if(Ae&&(Ae=Ae(t,se))){t_(me,Ae,o,de);break e}et&&et(t,ie,se)}switch(et=se?ka(se):window,t){case"focusin":(e_(et)||et.contentEditable==="true")&&(uo=et,hd=se,Na=null);break;case"focusout":Na=hd=uo=null;break;case"mousedown":dd=!0;break;case"contextmenu":case"mouseup":case"dragend":dd=!1,h_(me,o,de);break;case"selectionchange":if(fE)break;case"keydown":case"keyup":h_(me,o,de)}var Oe;if(od)e:{switch(t){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else co?Zv(t,o)&&(Pe="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(Pe="onCompositionStart");Pe&&(Xv&&o.locale!=="ko"&&(co||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&co&&(Oe=qv()):(Tr=de,td="value"in Tr?Tr.value:Tr.textContent,co=!0)),et=mu(se,Pe),0<et.length&&(Pe=new Gv(Pe,t,null,o,de),me.push({event:Pe,listeners:et}),Oe?Pe.data=Oe:(Oe=Jv(o),Oe!==null&&(Pe.data=Oe)))),(Oe=iE?rE(t,o):sE(t,o))&&(Pe=mu(se,"onBeforeInput"),0<Pe.length&&(et=new Gv("onBeforeInput","beforeinput",null,o,de),me.push({event:et,listeners:Pe}),et.data=Oe)),ik(me,t,se,o,de)}U0(me,n)})}function ol(t,n,o){return{instance:t,listener:n,currentTarget:o}}function mu(t,n){for(var o=n+"Capture",u=[];t!==null;){var C=t,k=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||k===null||(C=Ta(t,o),C!=null&&u.unshift(ol(t,C,k)),C=Ta(t,n),C!=null&&u.push(ol(t,C,k))),t.tag===3)return u;t=t.return}return[]}function ak(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function q0(t,n,o,u,C){for(var k=n._reactName,N=[];o!==null&&o!==u;){var q=o,J=q.alternate,se=q.stateNode;if(q=q.tag,J!==null&&J===u)break;q!==5&&q!==26&&q!==27||se===null||(J=se,C?(se=Ta(o,k),se!=null&&N.unshift(ol(o,se,J))):C||(se=Ta(o,k),se!=null&&N.push(ol(o,se,J)))),o=o.return}N.length!==0&&t.push({event:n,listeners:N})}var lk=/\r\n?/g,ck=/\u0000|\uFFFD/g;function V0(t){return(typeof t=="string"?t:""+t).replace(lk,`
|
|
50
|
-
`).replace(ck,"")}function W0(t,n){return n=V0(n),V0(t)===n}function ft(t,n,o,u,C,k){switch(o){case"children":if(typeof u=="string")n==="body"||n==="textarea"&&u===""||oo(t,u);else if(typeof u=="number"||typeof u=="bigint")n!=="body"&&oo(t,""+u);else return;break;case"className":lc(t,"class",u);break;case"tabIndex":lc(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":lc(t,o,u);break;case"style":Fv(t,u,k);return;case"data":if(n!=="object"){lc(t,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=cc(u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"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 k=="function"&&(o==="formAction"?(n!=="input"&&ft(t,n,"name",C.name,C,null),ft(t,n,"formEncType",C.formEncType,C,null),ft(t,n,"formMethod",C.formMethod,C,null),ft(t,n,"formTarget",C.formTarget,C,null)):(ft(t,n,"encType",C.encType,C,null),ft(t,n,"method",C.method,C,null),ft(t,n,"target",C.target,C,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=cc(u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Ei);return;case"onScroll":u!=null&&Ze("scroll",t);return;case"onScrollEnd":u!=null&&Ze("scrollend",t);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(o=u.__html,o!=null){if(C.children!=null)throw Error(s(60));(k!=null?k.__html:void 0)!==o&&(t.innerHTML=o)}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=cc(u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":Ze("beforetoggle",t),Ze("toggle",t),ac(t,"popover",u);break;case"xlinkActuate":Gi(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Gi(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Gi(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Gi(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Gi(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Gi(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Gi(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Gi(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Gi(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":ac(t,"is",u);break;case"innerText":case"textContent":return;default:if(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")o=R5.get(o)||o,ac(t,o,u);else return}st=!0}function Xf(t,n,o,u,C,k){switch(o){case"style":Fv(t,u,k);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(o=u.__html,o!=null){if(C.children!=null)throw Error(s(60));(k!=null?k.__html:void 0)!==o&&(t.innerHTML=o)}}break;case"children":if(typeof u=="string")oo(t,u);else if(typeof u=="number"||typeof u=="bigint")oo(t,""+u);else return;break;case"onScroll":u!=null&&Ze("scroll",t);return;case"onScrollEnd":u!=null&&Ze("scrollend",t);return;case"onClick":u!=null&&(t.onclick=Ei);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Dv.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(C=o.endsWith("Capture"),k=o.slice(2,C?o.length-7:void 0),n=t[kn]||null,n=n!=null?n[o]:null,typeof n=="function"&&t.removeEventListener(k,n,C),typeof u=="function")){typeof n!="function"&&n!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(k,u,C);break e}st=!0,o in t?t[o]=u:u===!0?t.setAttribute(o,""):ac(t,o,u)}return}st=!0}function cn(t,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",t),Ze("load",t);var u=!1,C=!1,k;for(k in o)if(o.hasOwnProperty(k)){var N=o[k];if(N!=null)switch(k){case"src":u=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:ft(t,n,k,N,o,null)}}C&&ft(t,n,"srcSet",o.srcSet,o,null),u&&ft(t,n,"src",o.src,o,null);return;case"input":Ze("invalid",t);var q=k=N=C=null,J=null,se=null;for(u in o)if(o.hasOwnProperty(u)){var de=o[u];if(de!=null)switch(u){case"name":C=de;break;case"type":N=de;break;case"checked":J=de;break;case"defaultChecked":se=de;break;case"value":k=de;break;case"defaultValue":q=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(s(137,n));break;default:ft(t,n,u,de,o,null)}}Pv(t,k,q,J,se,N,C,!1);return;case"select":Ze("invalid",t),u=N=k=null;for(C in o)if(o.hasOwnProperty(C)&&(q=o[C],q!=null))switch(C){case"value":k=q;break;case"defaultValue":N=q;break;case"multiple":u=q;default:ft(t,n,C,q,o,null)}n=k,o=N,t.multiple=!!u,n!=null?so(t,!!u,n,!1):o!=null&&so(t,!!u,o,!0);return;case"textarea":Ze("invalid",t),k=C=u=null;for(N in o)if(o.hasOwnProperty(N)&&(q=o[N],q!=null))switch(N){case"value":u=q;break;case"defaultValue":C=q;break;case"children":k=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(91));break;default:ft(t,n,N,q,o,null)}zv(t,u,C,k);return;case"option":for(J in o)if(o.hasOwnProperty(J)&&(u=o[J],u!=null))switch(J){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:ft(t,n,J,u,o,null)}return;case"dialog":Ze("beforetoggle",t),Ze("toggle",t),Ze("cancel",t),Ze("close",t);break;case"iframe":case"object":Ze("load",t);break;case"video":case"audio":for(u=0;u<sl.length;u++)Ze(sl[u],t);break;case"image":Ze("error",t),Ze("load",t);break;case"details":Ze("toggle",t);break;case"embed":case"source":case"link":Ze("error",t),Ze("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in o)if(o.hasOwnProperty(se)&&(u=o[se],u!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:ft(t,n,se,u,o,null)}return;default:if(Kh(n)){for(de in o)o.hasOwnProperty(de)&&(u=o[de],u!==void 0&&Xf(t,n,de,u,o,void 0));return}}for(q in o)o.hasOwnProperty(q)&&(u=o[q],u!=null&&ft(t,n,q,u,o,null))}var uk={};function hk(t,n,o,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,k=null,N=null,q=null,J=null,se=null,de=null;for(ce in o){var me=o[ce];if(o.hasOwnProperty(ce)&&me!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":J=me;default:u.hasOwnProperty(ce)||ft(t,n,ce,null,u,me)}}for(var ie in u){var ce=u[ie];if(me=o[ie],u.hasOwnProperty(ie)&&(ce!=null||me!=null))switch(ie){case"type":ce!==me&&(st=!0),k=ce;break;case"name":ce!==me&&(st=!0),C=ce;break;case"checked":ce!==me&&(st=!0),se=ce;break;case"defaultChecked":ce!==me&&(st=!0),de=ce;break;case"value":ce!==me&&(st=!0),N=ce;break;case"defaultValue":ce!==me&&(st=!0),q=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(s(137,n));break;default:ce!==me&&ft(t,n,ie,ce,u,me)}}Yh(t,N,q,J,se,de,k,C);return;case"select":ce=N=q=ie=null;for(k in o)if(J=o[k],o.hasOwnProperty(k)&&J!=null)switch(k){case"value":break;case"multiple":ce=J;default:u.hasOwnProperty(k)||ft(t,n,k,null,u,J)}for(C in u)if(k=u[C],J=o[C],u.hasOwnProperty(C)&&(k!=null||J!=null))switch(C){case"value":k!==J&&(st=!0),ie=k;break;case"defaultValue":k!==J&&(st=!0),q=k;break;case"multiple":k!==J&&(st=!0),N=k;default:k!==J&&ft(t,n,C,k,u,J)}n=q,o=N,u=ce,ie!=null?so(t,!!o,ie,!1):!!u!=!!o&&(n!=null?so(t,!!o,n,!0):so(t,!!o,o?[]:"",!1));return;case"textarea":ce=ie=null;for(q in o)if(C=o[q],o.hasOwnProperty(q)&&C!=null&&!u.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:ft(t,n,q,null,u,C)}for(N in u)if(C=u[N],k=o[N],u.hasOwnProperty(N)&&(C!=null||k!=null))switch(N){case"value":C!==k&&(st=!0),ie=C;break;case"defaultValue":C!==k&&(st=!0),ce=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(s(91));break;default:C!==k&&ft(t,n,N,C,u,k)}Iv(t,ie,ce);return;case"option":for(var Ce in o)if(ie=o[Ce],o.hasOwnProperty(Ce)&&ie!=null&&!u.hasOwnProperty(Ce))switch(Ce){case"selected":t.selected=!1;break;default:ft(t,n,Ce,null,u,ie)}for(J in u)if(ie=u[J],ce=o[J],u.hasOwnProperty(J)&&ie!==ce&&(ie!=null||ce!=null))switch(J){case"selected":ie!==ce&&(st=!0),t.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:ft(t,n,J,ie,u,ce)}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 je in o)ie=o[je],o.hasOwnProperty(je)&&ie!=null&&!u.hasOwnProperty(je)&&ft(t,n,je,null,u,ie);for(se in u)if(ie=u[se],ce=o[se],u.hasOwnProperty(se)&&ie!==ce&&(ie!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,n));break;default:ft(t,n,se,ie,u,ce)}return;default:if(Kh(n)){for(var Ge in o)ie=o[Ge],o.hasOwnProperty(Ge)&&ie!==void 0&&!u.hasOwnProperty(Ge)&&Xf(t,n,Ge,void 0,u,ie);for(de in u)ie=u[de],ce=o[de],!u.hasOwnProperty(de)||ie===ce||ie===void 0&&ce===void 0||Xf(t,n,de,ie,u,ce);return}}for(var re in o)ie=o[re],o.hasOwnProperty(re)&&ie!=null&&!u.hasOwnProperty(re)&&ft(t,n,re,null,u,ie);for(me in u)ie=u[me],ce=o[me],!u.hasOwnProperty(me)||ie===ce||ie==null&&ce==null||ft(t,n,me,ie,u,ce)}function G0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var C=o[u],k=C.transferSize,N=C.initiatorType,q=C.duration;if(k&&q&&G0(N)){for(N=0,q=C.responseEnd,u+=1;u<o.length;u++){var J=o[u],se=J.startTime;if(se>q)break;var de=J.transferSize,me=J.initiatorType;de&&G0(me)&&(J=J.responseEnd,N+=de*(J<q?1:(q-se)/(J-se)))}if(--u,n+=8*(k+N)/(C.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Kf=null,Qf=null;function al(t){return t.nodeType===9?t:t.ownerDocument}function Y0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function X0(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function K0(t,n,o,u){return o=al(o).createElement(t),o[rn]=u,o[kn]=n,cn(o,t,n),Kt(o),o}function Zf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Jf=null;function fk(){var t=window.event;return t&&t.type==="popstate"?t===Jf?!1:(Jf=t,!0):(Jf=null,!1)}var ep=typeof setTimeout=="function"?setTimeout:void 0,pk=typeof clearTimeout=="function"?clearTimeout:void 0,Q0=typeof Promise=="function"?Promise:void 0,Z0=typeof requestAnimationFrame=="function"?requestAnimationFrame:ep,mk=typeof queueMicrotask=="function"?queueMicrotask:typeof Q0<"u"?function(t){return Q0.resolve(null).then(t).catch(gk)}:ep;function gk(t){setTimeout(function(){throw t})}function Gr(t){return t==="head"}function J0(t,n){var o=n,u=0;do{var C=o.nextSibling;if(t.removeChild(o),C&&C.nodeType===8)if(o=C.data,o==="/$"||o==="/&"){if(u===0){t.removeChild(C),qo(n);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")lp(t.ownerDocument.documentElement);else if(o==="head"){o=t.ownerDocument.head,lp(o);for(var k=o.firstChild;k;){var N=k.nextSibling,q=k.nodeName;k[Ea]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&k.rel.toLowerCase()==="stylesheet"||o.removeChild(k),k=N}}else o==="body"&&lp(t.ownerDocument.body);o=C}while(o);qo(n)}function ex(t,n){var o=t;t=0;do{var u=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(t===0)break;t--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||t++;o=u}while(o)}function tx(t,n,o){if(n=CSS.escape(n)!==n?"r-"+btoa(n).replace(/=/g,""):n,t.style.viewTransitionName=n,o!=null&&(t.style.viewTransitionClass=o),o=getComputedStyle(t),o.display==="inline"){if(n=t.getClientRects(),n.length===1)var u=1;else for(var C=u=0;C<n.length;C++){var k=n[C];0<k.width&&0<k.height&&u++}u===1&&(t=t.style,t.display=n.length===1?"inline-block":"block",t.marginTop="-"+o.paddingTop,t.marginBottom="-"+o.paddingBottom)}}function nx(t,n){t=t.style,n=n.style;var o=n!=null?n.hasOwnProperty("viewTransitionName")?n.viewTransitionName:n.hasOwnProperty("view-transition-name")?n["view-transition-name"]:null:null;t.viewTransitionName=o==null||typeof o=="boolean"?"":(""+o).trim(),o=n!=null?n.hasOwnProperty("viewTransitionClass")?n.viewTransitionClass:n.hasOwnProperty("view-transition-class")?n["view-transition-class"]:null:null,t.viewTransitionClass=o==null||typeof o=="boolean"?"":(""+o).trim(),t.display==="inline-block"&&(n==null?t.display=t.margin="":(o=n.display,t.display=o==null||typeof o=="boolean"?"":o,o=n.margin,o!=null?t.margin=o:(o=n.hasOwnProperty("marginTop")?n.marginTop:n["margin-top"],t.marginTop=o==null||typeof o=="boolean"?"":o,n=n.hasOwnProperty("marginBottom")?n.marginBottom:n["margin-bottom"],t.marginBottom=n==null||typeof n=="boolean"?"":n)))}function vk(t,n,o){return o=o.ownerDocument.defaultView,{rect:t,abs:n.position==="absolute"||n.position==="fixed",clip:n.clipPath!=="none"||n.overflow!=="visible"||n.filter!=="none"||n.mask!=="none"||n.mask!=="none"||n.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=o.innerHeight&&t.left<=o.innerWidth}}function tp(t){var n=t.getBoundingClientRect(),o=getComputedStyle(t);return vk(n,o,t)}function _k(t){return t.documentElement.clientHeight}function xk(t){this.addEventListener("load",t),this.addEventListener("error",t)}function yk(t,n,o,u,C,k,N,q,J){var se=n.nodeType===9?n:n.ownerDocument;try{var de=se.startViewTransition({update:function(){var ie=se.defaultView,ce=ie.navigation&&ie.navigation.transition,Ce=se.fonts.status;u();var je=[];if(Ce==="loaded"&&(_k(se),se.fonts.status==="loading"&&je.push(se.fonts.ready)),Ce=je.length,t!==null)for(var Ge=t.suspenseyImages,re=0,te=0;te<Ge.length;te++){var ae=Ge[te];if(!ae.complete){var pe=ae.getBoundingClientRect();if(0<pe.bottom&&0<pe.right&&pe.top<ie.innerHeight&&pe.left<ie.innerWidth){if(re+=wx(ae),re>_u){je.length=Ce;break}ae=new Promise(xk.bind(ae)),je.push(ae)}}}if(0<je.length)return ie=Promise.race([Promise.all(je),new Promise(function(Ae){return setTimeout(Ae,500)})]).then(C,C),(ce?Promise.allSettled([ce.finished,ie]):ie).then(k,k);if(C(),ce)return ce.finished.then(k,k);k()},types:o});se.__reactViewTransition=de;var me=[];return de.ready.then(function(){for(var ie=se.documentElement.getAnimations({subtree:!0}),ce=0;ce<ie.length;ce++){var Ce=ie[ce],je=Ce.effect,Ge=je.pseudoElement;if(Ge!=null&&Ge.startsWith("::view-transition")){me.push(Ce),Ce=je.getKeyframes();for(var re=Ge=void 0,te=!0,ae=0;ae<Ce.length;ae++){var pe=Ce[ae],Ae=pe.width;if(Ge===void 0)Ge=Ae;else if(Ge!==Ae){te=!1;break}if(Ae=pe.height,re===void 0)re=Ae;else if(re!==Ae){te=!1;break}delete pe.width,delete pe.height,pe.transform==="none"&&delete pe.transform}te&&Ge!==void 0&&re!==void 0&&(je.setKeyframes(Ce),te=getComputedStyle(je.target,je.pseudoElement),te.width!==Ge||te.height!==re)&&(te=Ce[0],te.width=Ge,te.height=re,te=Ce[Ce.length-1],te.width=Ge,te.height=re,je.setKeyframes(Ce))}}N()},function(ie){se.__reactViewTransition===de&&(se.__reactViewTransition=null);try{if(typeof ie=="object"&&ie!==null)switch(ie.name){case"InvalidStateError":(ie.message==="View transition was skipped because document visibility state is hidden."||ie.message==="Skipping view transition because document visibility state has become hidden."||ie.message==="Skipping view transition because viewport size changed."||ie.message==="Transition was aborted because of invalid state")&&(ie=null)}ie!==null&&J(ie)}finally{u(),C(),N()}}),de.finished.finally(function(){for(var ie=0;ie<me.length;ie++)me[ie].cancel();se.__reactViewTransition===de&&(se.__reactViewTransition=null),q()}),de}catch{return u(),C(),N(),null}}function Is(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}Is.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:L({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},Is.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,o=t.getAnimations({subtree:!0}),u=[],C=0;C<o.length;C++){var k=o[C].effect;k!==null&&k.target===t&&k.pseudoElement===n&&u.push(o[C])}return u},Is.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function ix(t){return{name:t,group:new Is("group",t),imagePair:new Is("image-pair",t),old:new Is("old",t),new:new Is("new",t)}}function Yn(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Yn.prototype.addEventListener=function(t,n,o){var u=null,C=null;if(!(o!=null&&typeof o!="boolean"&&(u=o.signal||null,u!==null&&u.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var k=this._eventListeners;if(sx(k,t,n,o)===-1){var N=this,q=n;o!=null&&typeof o!="boolean"&&o.once===!0&&(q=function(J){N.removeEventListener(t,n,o),typeof n=="function"?n.call(this,J):n.handleEvent(J)}),u!==null&&(C=N.removeEventListener.bind(N,t,n,o),u.addEventListener("abort",C,{once:!0}),C=u.removeEventListener.bind(u,"abort",C)),u=Io(o),k.push({type:t,listener:n,optionsOrUseCapture:o,attachedListener:q,cleanup:C}),c(this._fragmentFiber.child,!1,bk,t,q,u)}this._eventListeners=k}};function bk(t,n,o,u){return g(t).addEventListener(n,o,u),!1}Yn.prototype.removeEventListener=function(t,n,o){var u=this._eventListeners;if(u!==null&&(n=sx(u,t,n,o),n!==-1)){var C=u[n];o=C.attachedListener;var k=C.cleanup;C=Io(C.optionsOrUseCapture),c(this._fragmentFiber.child,!1,Sk,t,o,C),u.splice(n,1),k!==null&&k()}};function Sk(t,n,o,u){return g(t).removeEventListener(n,o,u),!1}function Io(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function rx(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function sx(t,n,o,u){if(t.length===0)return-1;u=rx(u);for(var C=0;C<t.length;C++){var k=t[C];if(k.type===n&&k.listener===o&&rx(k.optionsOrUseCapture)===u)return C}return-1}Yn.prototype.dispatchEvent=function(t){var n=_(this._fragmentFiber);if(n===null)return!0;n=g(n);var o=this._eventListeners;if(o!==null&&0<o.length||!t.bubbles){var u=n.nodeType===9?n.createComment(""):document.createTextNode("");if(o)for(var C=0;C<o.length;C++){var k=o[C];u.addEventListener(k.type,k.attachedListener,Io(k.optionsOrUseCapture))}if(n.appendChild(u),t=u.dispatchEvent(t),o)for(C=0;C<o.length;C++)k=o[C],u.removeEventListener(k.type,k.attachedListener,Io(k.optionsOrUseCapture));return n.removeChild(u),t}return n.dispatchEvent(t)},Yn.prototype.focus=function(t){c(this._fragmentFiber.child,!0,ox,t,void 0,void 0)};function ox(t,n){return t.tag===6?!1:(t=g(t),Ok(t,n))}Yn.prototype.focusLast=function(t){var n=[];c(this._fragmentFiber.child,!0,np,n,void 0,void 0);for(var o=n.length-1;0<=o&&!ox(n[o],t);o--);};function np(t,n){return n.push(t),!1}Yn.prototype.blur=function(){var t=_(this._fragmentFiber);t!==null&&(t=g(t),t=al(t).activeElement,t!==null&&c(this._fragmentFiber.child,!1,wk,t,void 0,void 0))};function wk(t,n){return t.tag===6?!1:(t=g(t),t===n||t.contains(n)?(n.blur(),!0):!1)}Yn.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),c(this._fragmentFiber.child,!1,Ck,t,void 0,void 0)};function Ck(t,n){return t.tag===6||(t=g(t),n.observe(t)),!1}Yn.prototype.unobserveUsing=function(t){var n=this._observers;if(n!==null&&n.has(t)){n.delete(t),c(this._fragmentFiber.child,!1,Ek,t,void 0,void 0);for(var o=n=0;o<yi.length;o++){var u=yi[o];u.fragmentInstance===this&&u.observer===t?t.unobserve(u.instance):yi[n++]=u}yi.length=n}};function Ek(t,n){return t.tag===6||(t=g(t),n.unobserve(t)),!1}var yi=[],ip=!1;function kk(t,n,o){yi.push({fragmentInstance:t,observer:n,instance:o}),ip||(ip=!0,Nk(function(){ip=!1;var u=yi;yi=[];for(var C=0;C<u.length;C++){var k=u[C];k.observer.unobserve(k.instance)}}))}Yn.prototype.getClientRects=function(){var t=[];return c(this._fragmentFiber.child,!1,Tk,t,void 0,void 0),t};function Tk(t,n){if(t.tag===6){t=t.stateNode;var o=t.ownerDocument.createRange();o.selectNodeContents(t),n.push.apply(n,o.getClientRects())}else t=g(t),n.push.apply(n,t.getClientRects());return!1}Yn.prototype.getRootNode=function(t){var n=_(this._fragmentFiber);return n===null?this:g(n).getRootNode(t)},Yn.prototype.compareDocumentPosition=function(t){var n=_(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var o=[];c(this._fragmentFiber.child,!1,np,o,void 0,void 0);var u=g(n);if(o.length===0){if(o=u,y(this._fragmentFiber)){e:{for(n=this._fragmentFiber.return;n!==null;){if(n.tag===4){n=n.stateNode.containerInfo;break e}if(n.tag===3||n.tag===5||n.tag===27)break;n=n.return}n=null}n!=null&&(o=n)}n=this._fragmentFiber;var C=u=o.compareDocumentPosition(t);return o===t?C=Node.DOCUMENT_POSITION_CONTAINS:u&Node.DOCUMENT_POSITION_CONTAINED_BY&&(o=E(n)[1],o===null?C=Node.DOCUMENT_POSITION_PRECEDING:(t=g(o).compareDocumentPosition(t),C=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),C|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}n=g(o[0]),C=g(o[o.length-1]);var k=y(this._fragmentFiber)?n.parentElement:u;if(k==null)return Node.DOCUMENT_POSITION_DISCONNECTED;u=k.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,k=k.compareDocumentPosition(C)&Node.DOCUMENT_POSITION_CONTAINED_BY;var N=n.compareDocumentPosition(t),q=C.compareDocumentPosition(t),J=N&Node.DOCUMENT_POSITION_CONTAINED_BY||q&Node.DOCUMENT_POSITION_CONTAINED_BY;return q=u&&k&&N&Node.DOCUMENT_POSITION_FOLLOWING&&q&Node.DOCUMENT_POSITION_PRECEDING,n=u&&n===t||k&&C===t||J||q?Node.DOCUMENT_POSITION_CONTAINED_BY:!u&&n===t||!k&&C===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:N,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Rk(n,this._fragmentFiber,o[0],o[o.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Rk(t,n,o,u,C){var k=vs(C);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(o=!!k)e:{for(;k!==null;){if(k.tag===7&&(k===n||k.alternate===n)){o=!0;break e}k=k.return}o=!1}return o}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(k===null)return k=C.ownerDocument,C===k||C===k.documentElement||C===k.body;e:{for(k=n,n=_(n);k!==null;){if(!(k.tag!==5&&k.tag!==3&&k.tag!==27||k!==n&&k.alternate!==n)){k=!0;break e}k=k.return}k=!1}return k}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!k)&&!(n=k===o)&&(n=R(o,k,D),n===null?n=!1:(c(n,!0,x,k,o),k=b,b=null,n=k!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!k)&&!(n=k===u)&&(n=R(u,k,D),n===null?n=!1:(c(n,!0,T,k,u),k=b,w=b=null,n=k!==null)),n):!1}function ax(t,n){var o=t.ownerDocument.createRange();o.selectNodeContents(t),t=o.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,n?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Yn.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(s(566));var n=[];c(this._fragmentFiber.child,!1,np,n,void 0,void 0);var o=t!==!1;if(n.length===0){var u=E(this._fragmentFiber);if(u=o?u[1]||u[0]||_(this._fragmentFiber):u[0]||u[1],u===null)return;if(u.tag===6){t=g(u),ax(t,o);return}if(u=g(u),u.nodeType!==9){if(u.nodeType===11){o="host"in u?u.host:null,o!==null&&o.scrollIntoView(t);return}u.scrollIntoView(t)}}for(u=o?n.length-1:0;u!==(o?-1:n.length);){var C=n[u];C.tag===6?(C=g(C),ax(C,o)):g(C).scrollIntoView(t),u+=o?-1:1}};function Ak(t,n){return t=g(t),lx(t,n),!1}function lx(t,n){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(n)}function cx(t,n){var o=n._eventListeners;if(o!==null)for(var u=0;u<o.length;u++){var C=o[u];t.addEventListener(C.type,C.attachedListener,Io(C.optionsOrUseCapture))}t.nodeType!==3&&(o=n._observers,o!==null&&o.forEach(function(k){for(var N=0,q=0;q<yi.length;q++){var J=yi[q];(J.fragmentInstance!==n||J.observer!==k||J.instance!==t)&&(yi[N++]=J)}yi.length=N,k.observe(t)}),lx(t,n))}function Lk(t,n){var o=n._eventListeners;if(o!==null)for(var u=0;u<o.length;u++){var C=o[u];t.removeEventListener(C.type,C.attachedListener,Io(C.optionsOrUseCapture))}t.nodeType!==3&&(o=n._observers,o!==null&&o.forEach(function(k){typeof k.rootMargin=="string"?kk(n,k,t):k.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(n))}function rp(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":rp(o),oc(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function Dk(t,n,o,u){for(;t.nodeType===1;){var C=o;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Ea])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(k=t.getAttribute("rel"),k==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(k!==C.rel||t.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||t.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||t.getAttribute("title")!==(C.title==null?null:C.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(k=t.getAttribute("src"),(k!==(C.src==null?null:C.src)||t.getAttribute("type")!==(C.type==null?null:C.type)||t.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&k&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var k=C.name==null?null:""+C.name;if(C.type==="hidden"&&t.getAttribute("name")===k)return t}else return t;if(t=li(t.nextSibling),t===null)break}return null}function Mk(t,n,o){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=li(t.nextSibling),t===null))return null;return t}function ux(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=li(t.nextSibling),t===null))return null;return t}function sp(t){return t.data==="$?"||t.data==="$~"}function op(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function jk(t,n){var o=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||o.readyState!=="loading")n();else{var u=function(){n(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function li(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var ap=null;function hx(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"||o==="/&"){if(n===0)return li(t.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}t=t.nextSibling}return null}function dx(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return t;n--}else o!=="/$"&&o!=="/&"||n++}t=t.previousSibling}return null}function Ok(t,n){function o(){u=!0}if(t.ownerDocument.activeElement===t)return!0;var u=!1;try{t.ownerDocument.addEventListener("focus",o,!0),(t.focus||HTMLElement.prototype.focus).call(t,n)}finally{t.ownerDocument.removeEventListener("focus",o,!0)}return u}function Nk(t){Z0(function(){Z0(function(n){return t(n)})})}function fx(t,n,o){switch(n=al(o),t){case"html":if(t=n.documentElement,!t)throw Error(s(452));return t;case"head":if(t=n.head,!t)throw Error(s(453));return t;case"body":if(t=n.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function px(t,n,o){for(var u in o){var C=o[u];o.hasOwnProperty(u)&&C!=null&&ft(t,n,u,null,uk,C)}o.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Ei&&(t.onclick=null),oc(t)}function lp(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);oc(t)}var ci=new Map,mx=new Set;function ll(t){if(typeof t.getRootNode=="function"){var n=t.getRootNode();if(n.nodeType===9||n.nodeType===11)return n}return t.nodeType===9?t:t.ownerDocument}var or=he.d;he.d={f:Bk,r:Pk,D:Ik,C:zk,L:Hk,m:Fk,X:$k,S:Uk,M:qk};function Bk(){var t=or.f(),n=cu();return t||n}function Pk(t){var n=no(t);n!==null&&n.tag===5&&n.type==="form"?v1(n):or.r(t)}var zo=typeof document>"u"?null:document;function gx(t,n,o){var u=zo;if(u&&typeof n=="string"&&n){var C=ti(n);C='link[rel="'+t+'"][href="'+C+'"]',typeof o=="string"&&(C+='[crossorigin="'+o+'"]'),mx.has(C)||(mx.add(C),t={rel:t,crossOrigin:o,href:n},u.querySelector(C)===null&&(n=u.createElement("link"),cn(n,"link",t),Kt(n),u.head.appendChild(n)))}}function Ik(t){or.D(t),gx("dns-prefetch",t,null)}function zk(t,n){or.C(t,n),gx("preconnect",t,n)}function Hk(t,n,o){or.L(t,n,o);var u=zo;if(u&&t&&n){var C='link[rel="preload"][as="'+ti(n)+'"]';n==="image"&&o&&o.imageSrcSet?(C+='[imagesrcset="'+ti(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(C+='[imagesizes="'+ti(o.imageSizes)+'"]')):C+='[href="'+ti(t)+'"]';var k=C;switch(n){case"style":k=Ho(t);break;case"script":k=Fo(t)}if(!(ci.has(k)||(t=L({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:t,as:n},o),ci.set(k,t),u.querySelector(C)!==null||n==="style"&&u.querySelector(cl(k))||n==="script"&&u.querySelector(ul(k))))){var N=u.createElement("link");cn(N,"link",t),n==="style"&&(N[sc]=!0,N.onload=N.onerror=function(){Av(N)}),Kt(N),u.head.appendChild(N)}}}function Fk(t,n){or.m(t,n);var o=zo;if(o&&t){var u=n&&typeof n.as=="string"?n.as:"script",C='link[rel="modulepreload"][as="'+ti(u)+'"][href="'+ti(t)+'"]',k=C;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=Fo(t)}if(!ci.has(k)&&(t=L({rel:"modulepreload",href:t},n),ci.set(k,t),o.querySelector(C)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(ul(k)))return}u=o.createElement("link"),cn(u,"link",t),Kt(u),o.head.appendChild(u)}}}function Uk(t,n,o){or.S(t,n,o);var u=zo;if(u&&t){var C=io(u).hoistableStyles,k=Ho(t);n=n||"default";var N=C.get(k);if(!N){var q={loading:0,preload:null};if(N=u.querySelector(cl(k)))q.loading=5;else{t=L({rel:"stylesheet",href:t,"data-precedence":n},o),(o=ci.get(k))&&cp(t,o);var J=N=u.createElement("link");Kt(J),cn(J,"link",t),J._p=new Promise(function(se,de){J.onload=se,J.onerror=de}),J.addEventListener("load",function(){q.loading|=1}),J.addEventListener("error",function(){q.loading|=2}),q.loading|=4,gu(N,n,u)}N={type:"stylesheet",instance:N,count:1,state:q},C.set(k,N)}}}function $k(t,n){or.X(t,n);var o=zo;if(o&&t){var u=io(o).hoistableScripts,C=Fo(t),k=u.get(C);k||(k=o.querySelector(ul(C)),k||(t=L({src:t,async:!0},n),(n=ci.get(C))&&up(t,n),k=o.createElement("script"),Kt(k),cn(k,"link",t),o.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},u.set(C,k))}}function qk(t,n){or.M(t,n);var o=zo;if(o&&t){var u=io(o).hoistableScripts,C=Fo(t),k=u.get(C);k||(k=o.querySelector(ul(C)),k||(t=L({src:t,async:!0,type:"module"},n),(n=ci.get(C))&&up(t,n),k=o.createElement("script"),Kt(k),cn(k,"link",t),o.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},u.set(C,k))}}function vx(t,n,o,u){var C=(C=Be.current)?ll(C):null;if(!C)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(o=Ho(o.href),n=io(C).hoistableStyles,u=n.get(o),u||(u={type:"style",instance:null,count:0,state:null},n.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=Ho(o.href);var k=io(C).hoistableStyles,N=k.get(t);if(N||(C=C.ownerDocument||C,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(t,N),(k=C.querySelector(cl(t)))?k._p||(N.instance=k,N.state.loading=5):(k=ci.get(t),k||(k={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ci.set(t,k)),Vk(C,t,k,N.state))),n&&u===null)throw Error(s(528,""));return N}if(n&&u!==null)throw Error(s(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(o=Fo(o),n=io(C).hoistableScripts,u=n.get(o),u||(u={type:"script",instance:null,count:0,state:null},n.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ho(t){return'href="'+ti(t)+'"'}function cl(t){return'link[rel="stylesheet"]['+t+"]"}function _x(t){return L({},t,{"data-precedence":t.precedence,precedence:null})}function Vk(t,n,o,u){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[sc]!==!0){u.loading=1;return}}else n=t.createElement("link"),n[sc]=!0,n.onload=n.onerror=Av.bind(null,n),cn(n,"link",o),Kt(n),t.head.appendChild(n);u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2})}function Fo(t){return'[src="'+ti(t)+'"]'}function ul(t){return"script[async]"+t}function xx(t,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var u=t.querySelector('style[data-href~="'+ti(o.href)+'"]');if(u)return n.instance=u,Kt(u),u;var C=L({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),Kt(u),cn(u,"style",C),gu(u,o.precedence,t),n.instance=u;case"stylesheet":C=Ho(o.href);var k=t.querySelector(cl(C));if(k)return n.state.loading|=4,n.instance=k,Kt(k),k;u=_x(o),(C=ci.get(C))&&cp(u,C),k=(t.ownerDocument||t).createElement("link"),Kt(k);var N=k;return N._p=new Promise(function(q,J){N.onload=q,N.onerror=J}),cn(k,"link",u),n.state.loading|=4,gu(k,o.precedence,t),n.instance=k;case"script":return k=Fo(o.src),(C=t.querySelector(ul(k)))?(n.instance=C,Kt(C),C):(u=o,(C=ci.get(k))&&(u=L({},o),up(u,C)),t=t.ownerDocument||t,C=t.createElement("script"),Kt(C),cn(C,"link",u),t.head.appendChild(C),n.instance=C);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,gu(u,o.precedence,t));return n.instance}function gu(t,n,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=u.length?u[u.length-1]:null,k=C,N=0;N<u.length;N++){var q=u[N];if(q.dataset.precedence===n)k=q;else if(k!==C)break}k?k.parentNode.insertBefore(t,k.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(t,n.firstChild))}function cp(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function up(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var vu=null;function yx(t,n,o){if(vu===null){var u=new Map,C=vu=new Map;C.set(o,u)}else C=vu,u=C.get(o),u||(u=new Map,C.set(o,u));if(u.has(t))return u;for(u.set(t,null),o=o.getElementsByTagName(t),C=0;C<o.length;C++){var k=o[C];if(!(k[Ea]||k[rn]||t==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var N=k.getAttribute(n)||"";N=t+N;var q=u.get(N);q?q.push(k):u.set(N,[k])}}return u}function hp(t,n,o){t=t.ownerDocument||t,t.head.insertBefore(o,n==="title"?t.querySelector("head > title"):null)}function Wk(t,n,o){if(o===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function bx(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function Sx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function wx(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Cx(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=wx(n),t.suspenseyImages.push(n)),t=Xk.bind(t),n.decode().then(t,t))}function Gk(t,n,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var C=Ho(u.href),k=n.querySelector(cl(C));if(k){n=k._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=hl.bind(t),n.then(t,t)),o.state.loading|=4,o.instance=k,Kt(k);return}k=n.ownerDocument||n,u=_x(u),(C=ci.get(C))&&cp(u,C),k=k.createElement("link"),Kt(k);var N=k;N._p=new Promise(function(q,J){N.onload=q,N.onerror=J}),cn(k,"link",u),o.instance=k}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=hl.bind(t),n.addEventListener("load",o),n.addEventListener("error",o))}}var _u=0;function Yk(t,n){return t.stylesheets&&t.count===0&&yu(t,t.stylesheets),0<t.count||0<t.imgCount?function(o){var u=setTimeout(function(){if(t.stylesheets&&yu(t,t.stylesheets),t.unsuspend){var k=t.unsuspend;t.unsuspend=null,k()}},6e4+n);0<t.imgBytes&&_u===0&&(_u=62500*dk());var C=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&yu(t,t.stylesheets),t.unsuspend)){var k=t.unsuspend;t.unsuspend=null,k()}},(t.imgBytes>_u?50:800)+n);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(C)}}:null}function Ex(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)yu(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function hl(){this.count--,Ex(this)}function Xk(){this.imgCount--,Ex(this)}var xu=null;function yu(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xu=new Map,n.forEach(Kk,t),xu=null,hl.call(t))}function Kk(t,n){if(!(n.state.loading&4)){var o=xu.get(t);if(o)var u=o.get(null);else{o=new Map,xu.set(t,o);for(var C=t.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<C.length;k++){var N=C[k];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(o.set(N.dataset.precedence,N),u=N)}u&&o.set(null,u)}C=n.instance,N=C.getAttribute("data-precedence"),k=o.get(N)||u,k===u&&o.set(null,C),o.set(N,C),this.count++,u=hl.bind(this),C.addEventListener("load",u),C.addEventListener("error",u),k?k.parentNode.insertBefore(C,k.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(C,t.firstChild)),n.state.loading|=4}}var Uo={$$typeof:W,Provider:null,Consumer:null,_currentValue:Se,_currentValue2:Se,_threadCount:0};function Qk(t,n,o,u,C,k,N,q,J){this.tag=1,this.containerInfo=t,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=qh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qh(0),this.hiddenUpdates=qh(null),this.identifierPrefix=u,this.onUncaughtError=C,this.onCaughtError=k,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.transitionTypes=null,this.incompleteTransitions=new Map}function kx(t,n,o,u,C,k,N,q,J,se,de,me){return t=new Qk(t,n,o,N,J,se,de,me,q),n=1,k===!0&&(n|=24),k=Tn(3,null,null,n),t.current=k,k.stateNode=t,n=Ed(),n.refCount++,t.pooledCache=n,n.refCount++,k.memoizedState={element:u,isDehydrated:o,cache:n},Ad(k),t}function Tx(t){return t?(t=po,t):po}function Rx(t,n,o,u,C,k){C=Tx(C),u.context===null?u.context=C:u.pendingContext=C,u=Nr(n),u.payload={element:o},k=k===void 0?null:k,k!==null&&(u.callback=k),o=Br(t,u,n),o!==null&&(Dn(o,t,n),Ua(o,t,n))}function Ax(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<n?o:n}}function dp(t,n){Ax(t,n),(t=t.alternate)&&Ax(t,n)}function Lx(t){if(t.tag===13||t.tag===31){var n=bs(t,67108864);n!==null&&Dn(n,t,67108864),dp(t,67108864)}}function Dx(t){if(t.tag===13||t.tag===31){var n=Gn();n=Vh(n);var o=bs(t,n);o!==null&&Dn(o,t,n),dp(t,n)}}var $o=!0;function Zk(t,n,o,u){var C=ue.T;ue.T=null;var k=he.p;try{he.p=2,fp(t,n,o,u)}finally{he.p=k,ue.T=C}}function Jk(t,n,o,u){var C=ue.T;ue.T=null;var k=he.p;try{he.p=8,fp(t,n,o,u)}finally{he.p=k,ue.T=C}}function fp(t,n,o,u){if($o){var C=pp(u);if(C===null)Yf(t,n,u,bu,o),jx(t,u);else if(t3(C,t,n,o,u))u.stopPropagation();else if(jx(t,u),n&4&&-1<e3.indexOf(t)){for(;C!==null;){var k=no(C);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var N=gs(k.pendingLanes);if(N!==0){var q=k;for(q.pendingLanes|=2,q.entangledLanes|=2;N;){var J=1<<31-Hn(N);q.entanglements[1]|=J,N&=~J}Ni(k),(lt&6)===0&&(ou=Vt()+500,rl(0))}}break;case 31:case 13:q=bs(k,2),q!==null&&Dn(q,k,2),cu(),dp(k,2)}if(k=pp(u),k===null&&Yf(t,n,u,bu,o),k===C)break;C=k}C!==null&&u.stopPropagation()}else Yf(t,n,u,null,o)}}function pp(t){return t=Zh(t),mp(t)}var bu=null;function mp(t){if(bu=null,t=vs(t),t!==null){var n=p(t);if(n===null)t=null;else{var o=n.tag;if(o===13){if(t=f(n),t!==null)return t;t=null}else if(o===31){if(t=a(n),t!==null)return t;t=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return bu=t,null}function Mx(t){switch(t){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wt()){case ei:return 2;case vn:return 8;case eo:case f5:return 32;case xv:return 268435456;default:return 32}default:return 32}}var gp=!1,Yr=null,Xr=null,Kr=null,dl=new Map,fl=new Map,Qr=[],e3="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 jx(t,n){switch(t){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Xr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":dl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":fl.delete(n.pointerId)}}function pl(t,n,o,u,C,k){return t===null||t.nativeEvent!==k?(t={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:k,targetContainers:[C]},n!==null&&(n=no(n),n!==null&&Lx(n)),t):(t.eventSystemFlags|=u,n=t.targetContainers,C!==null&&n.indexOf(C)===-1&&n.push(C),t)}function t3(t,n,o,u,C){switch(n){case"focusin":return Yr=pl(Yr,t,n,o,u,C),!0;case"dragenter":return Xr=pl(Xr,t,n,o,u,C),!0;case"mouseover":return Kr=pl(Kr,t,n,o,u,C),!0;case"pointerover":var k=C.pointerId;return dl.set(k,pl(dl.get(k)||null,t,n,o,u,C)),!0;case"gotpointercapture":return k=C.pointerId,fl.set(k,pl(fl.get(k)||null,t,n,o,u,C)),!0}return!1}function Ox(t){var n=vs(t.target);if(n!==null){var o=p(n);if(o!==null){if(n=o.tag,n===13){if(n=f(o),n!==null){t.blockedOn=n,kv(t.priority,function(){Dx(o)});return}}else if(n===31){if(n=a(o),n!==null){t.blockedOn=n,kv(t.priority,function(){Dx(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Su(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var o=pp(t.nativeEvent);if(o===null){o=t.nativeEvent;var u=new o.constructor(o.type,o);Qh=u,o.target.dispatchEvent(u),Qh=null}else return n=no(o),n!==null&&Lx(n),t.blockedOn=o,!1;n.shift()}return!0}function Nx(t,n,o){Su(t)&&o.delete(n)}function n3(){gp=!1,Yr!==null&&Su(Yr)&&(Yr=null),Xr!==null&&Su(Xr)&&(Xr=null),Kr!==null&&Su(Kr)&&(Kr=null),dl.forEach(Nx),fl.forEach(Nx)}function wu(t,n){t.blockedOn===n&&(t.blockedOn=null,gp||(gp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,n3)))}var Cu=null;function Bx(t){Cu!==t&&(Cu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cu===t&&(Cu=null);for(var n=0;n<t.length;n+=3){var o=t[n],u=t[n+1],C=t[n+2];if(typeof u!="function"){if(mp(u||o)===null)continue;break}var k=no(o);k!==null&&(t.splice(n,3),n-=3,Kd(k,{pending:!0,data:C,method:o.method,action:u},u,C))}}))}function qo(t){function n(J){return wu(J,t)}Yr!==null&&wu(Yr,t),Xr!==null&&wu(Xr,t),Kr!==null&&wu(Kr,t),dl.forEach(n),fl.forEach(n);for(var o=0;o<Qr.length;o++){var u=Qr[o];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Qr.length&&(o=Qr[0],o.blockedOn===null);)Ox(o),o.blockedOn===null&&Qr.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var C=o[u],k=o[u+1],N=C[kn]||null;if(typeof k=="function")N||Bx(o);else if(N){var q=null;if(k&&k.hasAttribute("formAction")){if(C=k,N=k[kn]||null)q=N.formAction;else if(mp(C)!==null)continue}else q=N.action;typeof q=="function"?o[u+1]=q:(o.splice(u,3),u-=3),Bx(o)}}}function Px(){function t(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(N){return C=N})},focusReset:"manual",scroll:"manual"})}function n(){C!==null&&(C(),C=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,C=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),C!==null&&(C(),C=null)}}}function vp(t){this._internalRoot=t}Eu.prototype.render=vp.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(s(409));var o=n.current,u=Gn();Rx(o,u,t,n,null,null)},Eu.prototype.unmount=vp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Rx(t.current,2,null,t,null,null),cu(),n[to]=null}};function Eu(t){this._internalRoot=t}Eu.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ev();t={blockedOn:null,target:t,priority:n};for(var o=0;o<Qr.length&&n!==0&&n<Qr[o].priority;o++);Qr.splice(o,0,t),o===0&&Ox(t)}};var Ix=i.version;if(Ix!=="19.3.1")throw Error(s(527,Ix,"19.3.1"));he.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=d(n),t=t!==null?m(t):null,t=t===null?null:t.stateNode,t};var i3={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ku.isDisabled&&ku.supportsFiber)try{Sa=ku.inject(i3),zn=ku}catch{}}return gl.createRoot=function(t,n){if(!l(t))throw Error(s(299));var o=!1,u="",C=T1,k=R1,N=A1;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(C=n.onUncaughtError),n.onCaughtError!==void 0&&(k=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError)),n=kx(t,1,!1,null,null,o,u,null,C,k,N,Px),t[to]=n.current,Gf(t),new vp(n)},gl.hydrateRoot=function(t,n,o){if(!l(t))throw Error(s(299));var u=!1,C="",k=T1,N=R1,q=A1,J=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(C=o.identifierPrefix),o.onUncaughtError!==void 0&&(k=o.onUncaughtError),o.onCaughtError!==void 0&&(N=o.onCaughtError),o.onRecoverableError!==void 0&&(q=o.onRecoverableError),o.formState!==void 0&&(J=o.formState)),n=kx(t,1,!0,n,o??null,u,C,J,k,N,q,Px),n.context=Tx(null),o=n.current,u=Gn(),u=Vh(u),C=Nr(u),C.callback=null,Br(o,C,u),o=u,n.current.lanes=o,Ca(n,o),Ni(n),t[to]=n.current,Gf(t),new Eu(n)},gl.version="19.3.1",gl}var Qx;function f3(){if(Qx)return bp.exports;Qx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(i){console.error(i)}}return e(),bp.exports=d3(),bp.exports}var p3=f3();/**
|
|
51
|
-
* @license lucide-react v0.469.0 - ISC
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the ISC license.
|
|
54
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const m3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aS=(...e)=>e.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();/**
|
|
56
|
-
* @license lucide-react v0.469.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/var g3={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"};/**
|
|
61
|
-
* @license lucide-react v0.469.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const v3=P.forwardRef(({color:e="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:l="",children:p,iconNode:f,...a},h)=>P.createElement("svg",{ref:h,...g3,width:i,height:i,stroke:e,strokeWidth:s?Number(r)*24/Number(i):r,className:aS("lucide",l),...a},[...f.map(([d,m])=>P.createElement(d,m)),...Array.isArray(p)?p:[p]]));/**
|
|
66
|
-
* @license lucide-react v0.469.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const ke=(e,i)=>{const r=P.forwardRef(({className:s,...l},p)=>P.createElement(v3,{ref:p,iconNode:i,className:aS(`lucide-${m3(e)}`,s),...l}));return r.displayName=`${e}`,r};/**
|
|
71
|
-
* @license lucide-react v0.469.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const ph=ke("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
76
|
-
* @license lucide-react v0.469.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const _3=ke("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
81
|
-
* @license lucide-react v0.469.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const oa=ke("BellOff",[["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"}]]);/**
|
|
86
|
-
* @license lucide-react v0.469.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const as=ke("Bell",[["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"}]]);/**
|
|
91
|
-
* @license lucide-react v0.469.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const x3=ke("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
96
|
-
* @license lucide-react v0.469.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const y3=ke("BookText",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]);/**
|
|
101
|
-
* @license lucide-react v0.469.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const lS=ke("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
106
|
-
* @license lucide-react v0.469.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const mh=ke("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
|
|
111
|
-
* @license lucide-react v0.469.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const Il=ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
116
|
-
* @license lucide-react v0.469.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const zl=ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
121
|
-
* @license lucide-react v0.469.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const b3=ke("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
126
|
-
* @license lucide-react v0.469.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const da=ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
131
|
-
* @license lucide-react v0.469.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const cS=ke("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
|
|
136
|
-
* @license lucide-react v0.469.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const uS=ke("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
|
|
141
|
-
* @license lucide-react v0.469.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const hS=ke("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
146
|
-
* @license lucide-react v0.469.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const dS=ke("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
151
|
-
* @license lucide-react v0.469.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const Cl=ke("CircleX",[["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"}]]);/**
|
|
156
|
-
* @license lucide-react v0.469.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const om=ke("ClipboardPaste",[["path",{d:"M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z",key:"1pp7kr"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10",key:"2ik1ml"}],["path",{d:"m17 10 4 4-4 4",key:"vp2hj1"}]]);/**
|
|
161
|
-
* @license lucide-react v0.469.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const S3=ke("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
166
|
-
* @license lucide-react v0.469.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const w3=ke("Command",[["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"}]]);/**
|
|
171
|
-
* @license lucide-react v0.469.0 - ISC
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the ISC license.
|
|
174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const gh=ke("Copy",[["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"}]]);/**
|
|
176
|
-
* @license lucide-react v0.469.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* This source code is licensed under the ISC license.
|
|
179
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const C3=ke("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
181
|
-
* @license lucide-react v0.469.0 - ISC
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the ISC license.
|
|
184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const fS=ke("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
186
|
-
* @license lucide-react v0.469.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const fa=ke("ExternalLink",[["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"}]]);/**
|
|
191
|
-
* @license lucide-react v0.469.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const E3=ke("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
196
|
-
* @license lucide-react v0.469.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const Zm=ke("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
201
|
-
* @license lucide-react v0.469.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const am=ke("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
206
|
-
* @license lucide-react v0.469.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const k3=ke("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
211
|
-
* @license lucide-react v0.469.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const lm=ke("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
216
|
-
* @license lucide-react v0.469.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const Jm=ke("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
221
|
-
* @license lucide-react v0.469.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const pS=ke("FolderGit2",[["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
|
|
226
|
-
* @license lucide-react v0.469.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const aa=ke("FolderOpen",[["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"}]]);/**
|
|
231
|
-
* @license lucide-react v0.469.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const cm=ke("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
236
|
-
* @license lucide-react v0.469.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const eg=ke("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
241
|
-
* @license lucide-react v0.469.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const T3=ke("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
|
246
|
-
* @license lucide-react v0.469.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const R3=ke("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["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"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
251
|
-
* @license lucide-react v0.469.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const A3=ke("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
|
|
256
|
-
* @license lucide-react v0.469.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const L3=ke("Inbox",[["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"}]]);/**
|
|
261
|
-
* @license lucide-react v0.469.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const D3=ke("KeyRound",[["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"}]]);/**
|
|
266
|
-
* @license lucide-react v0.469.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const tg=ke("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
271
|
-
* @license lucide-react v0.469.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const M3=ke("LayoutDashboard",[["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"}]]);/**
|
|
276
|
-
* @license lucide-react v0.469.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const j3=ke("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
281
|
-
* @license lucide-react v0.469.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const El=ke("Link",[["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"}]]);/**
|
|
286
|
-
* @license lucide-react v0.469.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const O3=ke("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
291
|
-
* @license lucide-react v0.469.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const N3=ke("ListX",[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"m19 10-4 4",key:"1tz659"}],["path",{d:"m15 10 4 4",key:"1n7nei"}]]);/**
|
|
296
|
-
* @license lucide-react v0.469.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const B3=ke("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
|
|
301
|
-
* @license lucide-react v0.469.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const mS=ke("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
306
|
-
* @license lucide-react v0.469.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const gS=ke("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/**
|
|
311
|
-
* @license lucide-react v0.469.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const P3=ke("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
316
|
-
* @license lucide-react v0.469.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const I3=ke("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
321
|
-
* @license lucide-react v0.469.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const _r=ke("Pencil",[["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"}]]);/**
|
|
326
|
-
* @license lucide-react v0.469.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const la=ke("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
331
|
-
* @license lucide-react v0.469.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const z3=ke("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/**
|
|
336
|
-
* @license lucide-react v0.469.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const Hl=ke("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
341
|
-
* @license lucide-react v0.469.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const fi=ke("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
346
|
-
* @license lucide-react v0.469.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const H3=ke("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
|
|
351
|
-
* @license lucide-react v0.469.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const Fl=ke("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
356
|
-
* @license lucide-react v0.469.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const vh=ke("RefreshCw",[["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"}]]);/**
|
|
361
|
-
* @license lucide-react v0.469.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const F3=ke("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
366
|
-
* @license lucide-react v0.469.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const U3=ke("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
371
|
-
* @license lucide-react v0.469.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const $3=ke("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/**
|
|
376
|
-
* @license lucide-react v0.469.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const ng=ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
381
|
-
* @license lucide-react v0.469.0 - ISC
|
|
382
|
-
*
|
|
383
|
-
* This source code is licensed under the ISC license.
|
|
384
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
-
*/const vS=ke("Send",[["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"}]]);/**
|
|
386
|
-
* @license lucide-react v0.469.0 - ISC
|
|
387
|
-
*
|
|
388
|
-
* This source code is licensed under the ISC license.
|
|
389
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
-
*/const q3=ke("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
391
|
-
* @license lucide-react v0.469.0 - ISC
|
|
392
|
-
*
|
|
393
|
-
* This source code is licensed under the ISC license.
|
|
394
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
-
*/const V3=ke("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
396
|
-
* @license lucide-react v0.469.0 - ISC
|
|
397
|
-
*
|
|
398
|
-
* This source code is licensed under the ISC license.
|
|
399
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
-
*/const ig=ke("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
401
|
-
* @license lucide-react v0.469.0 - ISC
|
|
402
|
-
*
|
|
403
|
-
* This source code is licensed under the ISC license.
|
|
404
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
-
*/const _S=ke("SquareTerminal",[["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"}]]);/**
|
|
406
|
-
* @license lucide-react v0.469.0 - ISC
|
|
407
|
-
*
|
|
408
|
-
* This source code is licensed under the ISC license.
|
|
409
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
-
*/const _h=ke("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
411
|
-
* @license lucide-react v0.469.0 - ISC
|
|
412
|
-
*
|
|
413
|
-
* This source code is licensed under the ISC license.
|
|
414
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
-
*/const xS=ke("StepForward",[["line",{x1:"6",x2:"6",y1:"4",y2:"20",key:"fy8qot"}],["polygon",{points:"10,4 20,12 10,20",key:"1mc1pf"}]]);/**
|
|
416
|
-
* @license lucide-react v0.469.0 - ISC
|
|
417
|
-
*
|
|
418
|
-
* This source code is licensed under the ISC license.
|
|
419
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
-
*/const yS=ke("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/**
|
|
421
|
-
* @license lucide-react v0.469.0 - ISC
|
|
422
|
-
*
|
|
423
|
-
* This source code is licensed under the ISC license.
|
|
424
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/const xr=ke("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
426
|
-
* @license lucide-react v0.469.0 - ISC
|
|
427
|
-
*
|
|
428
|
-
* This source code is licensed under the ISC license.
|
|
429
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
-
*/const bS=ke("TriangleAlert",[["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"}]]);/**
|
|
431
|
-
* @license lucide-react v0.469.0 - ISC
|
|
432
|
-
*
|
|
433
|
-
* This source code is licensed under the ISC license.
|
|
434
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
-
*/const W3=ke("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
|
|
436
|
-
* @license lucide-react v0.469.0 - ISC
|
|
437
|
-
*
|
|
438
|
-
* This source code is licensed under the ISC license.
|
|
439
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
-
*/const SS=ke("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
|
|
441
|
-
* @license lucide-react v0.469.0 - ISC
|
|
442
|
-
*
|
|
443
|
-
* This source code is licensed under the ISC license.
|
|
444
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
-
*/const Ul=ke("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
446
|
-
* @license lucide-react v0.469.0 - ISC
|
|
447
|
-
*
|
|
448
|
-
* This source code is licensed under the ISC license.
|
|
449
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
-
*/const Nn=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);let Zu=null;const ls="global";function G3(e){Zu=e}function Tu(){return Zu}function Hi(){if(!Zu)throw new Error("No project is open.");return`/api/p/${encodeURIComponent(Zu)}`}function kt(e,i){return wS(`${Hi()}${e}`,i)}function Sn(e,i){return wS(`/api${e}`,i)}async function wS(e,i){const r=await fetch(e,{...i,headers:{"Content-Type":"application/json",...(i==null?void 0:i.headers)??{}}}),s=await r.text();let l={};try{l=s?JSON.parse(s):{}}catch{throw r.ok?new Error("The server returned a response that was not JSON."):new Error(`${r.status} ${r.statusText}`)}if(!r.ok)throw new Error(l.error??r.statusText);return l}const Ot=(e,i)=>kt(e,{method:"POST",body:i===void 0?void 0:JSON.stringify(i)}),wn=(e,i)=>kt(e,{method:"PUT",body:JSON.stringify(i)}),Vo=e=>kt(e,{method:"DELETE"}),_e={health:()=>kt("/health"),hub:()=>Sn("/hub"),checkClaude:()=>Sn("/claude/check",{method:"POST"}),projects:()=>Sn("/projects"),addProject:e=>Sn("/projects",{method:"POST",body:JSON.stringify({path:e})}),openedProject:e=>Sn(`/projects/${encodeURIComponent(e)}/open`,{method:"POST"}),removeProject:e=>Sn(`/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),folders:e=>Sn(`/folders${e?`?path=${encodeURIComponent(e)}`:""}`),globalOverview:()=>Sn("/global/overview"),globalInbox:()=>Sn("/global/inbox"),setMuted:(e,i)=>Sn(`/global/muted/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({muted:i})}),answerIn:(e,i,r)=>Sn(`/p/${encodeURIComponent(e)}/interactions/${i}/answer`,{method:"POST",body:JSON.stringify({answer:r})}),chooseIn:(e,i,r)=>Sn(`/p/${encodeURIComponent(e)}/interactions/${i}/choose`,{method:"POST",body:JSON.stringify({ref:r})}),pauseNotificationsIn:(e,i)=>Sn(`/p/${encodeURIComponent(e)}/notifications/paused`,{method:"PUT",body:JSON.stringify({paused:i})}),revealIn:e=>Sn(`/p/${encodeURIComponent(e)}/files/reveal`,{method:"POST",body:JSON.stringify({path:""})}),dismissIn:(e,i)=>Sn(`/p/${encodeURIComponent(e)}/interactions/${i}/dismiss`,{method:"POST"}),sessions:()=>kt("/sessions"),session:e=>kt(`/sessions/${e}`),startSession:e=>Ot("/sessions",e),startPurpose:(e,i,r={})=>Ot("/purpose-sessions",{kind:e,targetId:i,...r}),resumeSession:(e,i={})=>Ot(`/sessions/${e}/resume`,i),killSession:e=>Ot(`/sessions/${e}/kill`),renameSession:(e,i)=>wn(`/sessions/${e}/title`,{title:i}),deletionPlan:e=>kt(`/sessions/${e}/deletion`),deleteSession:(e,i=!0)=>Vo(`/sessions/${e}?temp=${i?1:0}`),interactions:e=>kt(`/interactions${e?`?status=${e}`:""}`),answer:(e,i)=>Ot(`/interactions/${e}/answer`,{answer:i}),choose:(e,i)=>Ot(`/interactions/${e}/choose`,{ref:i}),dismiss:e=>Ot(`/interactions/${e}/dismiss`),inventory:()=>kt("/inventory"),stats:()=>kt("/stats"),categories:()=>kt("/categories"),saveCategory:e=>e.id?wn(`/categories/${e.id}`,e):Ot("/categories",e),deleteCategory:e=>Vo(`/categories/${e}`),prompts:()=>kt("/prompts"),savePrompt:(e,i)=>wn(`/prompts/${e}`,{text:i}),previewSystemPrompt:e=>kt(`/prompts/preview?category=${encodeURIComponent(e)}`),memory:()=>kt("/memory"),memoryFile:e=>kt(`/memory/file?path=${encodeURIComponent(e)}`),saveMemoryFile:(e,i)=>wn("/memory/file",{path:e,content:i}),channels:()=>kt("/channels"),setNotificationsPaused:e=>wn("/notifications/paused",{paused:e}),setNotifyKinds:e=>wn("/notifications/kinds",{kinds:e}),setSessionQuiet:(e,i)=>wn(`/sessions/${e}/quiet`,{quiet:i}),dismissWaiting:e=>Ot(`/sessions/${e}/dismiss-waiting`),saveChannel:e=>e.id?wn(`/channels/${e.id}`,e):Ot("/channels",e),deleteChannel:e=>Vo(`/channels/${e}`),testChannel:e=>Ot(`/channels/${e}/test`),jobs:()=>kt("/jobs"),saveJob:e=>e.id?wn(`/jobs/${e.id}`,e):Ot("/jobs",e),deleteJob:e=>Vo(`/jobs/${e}`),rotateJobToken:e=>Ot(`/jobs/${e}/rotate`),runJob:e=>Ot(`/jobs/${e}/run`,{}),runs:()=>kt("/runs"),queueRun:(e,i)=>Ot("/runs",{prompt:e,category:i}),cancelRun:e=>Ot(`/runs/${e}/cancel`),stopRun:e=>Ot(`/runs/${e}/stop`),resumeRun:e=>Ot(`/runs/${e}/resume`),toolsetCatalog:()=>kt("/toolset/catalog"),setSessionToolset:(e,i)=>wn(`/sessions/${e}/toolset`,{toolset:i}),setSessionSetup:(e,i)=>wn(`/sessions/${e}/setup`,i),presets:()=>kt("/presets"),savePreset:e=>e.id?wn(`/presets/${e.id}`,e):Ot("/presets",e),deletePreset:e=>Vo(`/presets/${e}`),setDefaultItem:(e,i,r)=>wn("/toolset/default",{kind:e,id:i,enabled:r}),claudeSettings:()=>kt("/claude-settings"),saveClaudeSettings:e=>wn("/claude-settings",e),mcpCatalog:()=>kt("/mcp/catalog"),suggestions:()=>kt("/mcp/suggestions"),mcpSuggestionsEnabled:()=>kt("/mcp-suggestions/enabled"),setMcpSuggestionsEnabled:e=>wn("/mcp-suggestions/enabled",{enabled:e}),installSuggestion:e=>Ot(`/mcp/suggestions/${e}/install`),skipSuggestion:(e,i="")=>Ot(`/mcp/suggestions/${e}/skip`,{note:i}),deleteSuggestion:e=>Vo(`/mcp/suggestions/${e}`)};function CS(e){var i,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(i=0;i<l;i++)e[i]&&(r=CS(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function ES(){for(var e,i,r=0,s="",l=arguments.length;r<l;r++)(e=arguments[r])&&(i=CS(e))&&(s&&(s+=" "),s+=i);return s}const rg="-",Y3=e=>{const i=K3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:f=>{const a=f.split(rg);return a[0]===""&&a.length!==1&&a.shift(),kS(a,i)||X3(f)},getConflictingClassGroupIds:(f,a)=>{const h=r[f]||[];return a&&s[f]?[...h,...s[f]]:h}}},kS=(e,i)=>{var f;if(e.length===0)return i.classGroupId;const r=e[0],s=i.nextPart.get(r),l=s?kS(e.slice(1),s):void 0;if(l)return l;if(i.validators.length===0)return;const p=e.join(rg);return(f=i.validators.find(({validator:a})=>a(p)))==null?void 0:f.classGroupId},Zx=/^\[(.+)\]$/,X3=e=>{if(Zx.test(e)){const i=Zx.exec(e)[1],r=i==null?void 0:i.substring(0,i.indexOf(":"));if(r)return"arbitrary.."+r}},K3=e=>{const{theme:i,prefix:r}=e,s={nextPart:new Map,validators:[]};return Z3(Object.entries(e.classGroups),r).forEach(([p,f])=>{um(f,s,p,i)}),s},um=(e,i,r,s)=>{e.forEach(l=>{if(typeof l=="string"){const p=l===""?i:Jx(i,l);p.classGroupId=r;return}if(typeof l=="function"){if(Q3(l)){um(l(s),i,r,s);return}i.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([p,f])=>{um(f,Jx(i,p),r,s)})})},Jx=(e,i)=>{let r=e;return i.split(rg).forEach(s=>{r.nextPart.has(s)||r.nextPart.set(s,{nextPart:new Map,validators:[]}),r=r.nextPart.get(s)}),r},Q3=e=>e.isThemeGetter,Z3=(e,i)=>i?e.map(([r,s])=>{const l=s.map(p=>typeof p=="string"?i+p:typeof p=="object"?Object.fromEntries(Object.entries(p).map(([f,a])=>[i+f,a])):p);return[r,l]}):e,J3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let i=0,r=new Map,s=new Map;const l=(p,f)=>{r.set(p,f),i++,i>e&&(i=0,s=r,r=new Map)};return{get(p){let f=r.get(p);if(f!==void 0)return f;if((f=s.get(p))!==void 0)return l(p,f),f},set(p,f){r.has(p)?r.set(p,f):l(p,f)}}},TS="!",e4=e=>{const{separator:i,experimentalParseClassName:r}=e,s=i.length===1,l=i[0],p=i.length,f=a=>{const h=[];let d=0,m=0,c;for(let g=0;g<a.length;g++){let b=a[g];if(d===0){if(b===l&&(s||a.slice(g,g+p)===i)){h.push(a.slice(m,g)),m=g+p;continue}if(b==="/"){c=g;continue}}b==="["?d++:b==="]"&&d--}const _=h.length===0?a:a.substring(m),y=_.startsWith(TS),E=y?_.substring(1):_,S=c&&c>m?c-m:void 0;return{modifiers:h,hasImportantModifier:y,baseClassName:E,maybePostfixModifierPosition:S}};return r?a=>r({className:a,parseClassName:f}):f},t4=e=>{if(e.length<=1)return e;const i=[];let r=[];return e.forEach(s=>{s[0]==="["?(i.push(...r.sort(),s),r=[]):r.push(s)}),i.push(...r.sort()),i},n4=e=>({cache:J3(e.cacheSize),parseClassName:e4(e),...Y3(e)}),i4=/\s+/,r4=(e,i)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:l}=i,p=[],f=e.trim().split(i4);let a="";for(let h=f.length-1;h>=0;h-=1){const d=f[h],{modifiers:m,hasImportantModifier:c,baseClassName:_,maybePostfixModifierPosition:y}=r(d);let E=!!y,S=s(E?_.substring(0,y):_);if(!S){if(!E){a=d+(a.length>0?" "+a:a);continue}if(S=s(_),!S){a=d+(a.length>0?" "+a:a);continue}E=!1}const g=t4(m).join(":"),b=c?g+TS:g,w=b+S;if(p.includes(w))continue;p.push(w);const x=l(S,E);for(let T=0;T<x.length;++T){const D=x[T];p.push(b+D)}a=d+(a.length>0?" "+a:a)}return a};function s4(){let e=0,i,r,s="";for(;e<arguments.length;)(i=arguments[e++])&&(r=RS(i))&&(s&&(s+=" "),s+=r);return s}const RS=e=>{if(typeof e=="string")return e;let i,r="";for(let s=0;s<e.length;s++)e[s]&&(i=RS(e[s]))&&(r&&(r+=" "),r+=i);return r};function o4(e,...i){let r,s,l,p=f;function f(h){const d=i.reduce((m,c)=>c(m),e());return r=n4(d),s=r.cache.get,l=r.cache.set,p=a,a(h)}function a(h){const d=s(h);if(d)return d;const m=r4(h,r);return l(h,m),m}return function(){return p(s4.apply(null,arguments))}}const Ct=e=>{const i=r=>r[e]||[];return i.isThemeGetter=!0,i},AS=/^\[(?:([a-z-]+):)?(.+)\]$/i,a4=/^\d+\/\d+$/,l4=new Set(["px","full","screen"]),c4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,u4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,h4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=e=>na(e)||l4.has(e)||a4.test(e),Jr=e=>pa(e,"length",b4),na=e=>!!e&&!Number.isNaN(Number(e)),Ep=e=>pa(e,"number",na),vl=e=>!!e&&Number.isInteger(Number(e)),p4=e=>e.endsWith("%")&&na(e.slice(0,-1)),Ye=e=>AS.test(e),es=e=>c4.test(e),m4=new Set(["length","size","percentage"]),g4=e=>pa(e,m4,LS),v4=e=>pa(e,"position",LS),_4=new Set(["image","url"]),x4=e=>pa(e,_4,w4),y4=e=>pa(e,"",S4),_l=()=>!0,pa=(e,i,r)=>{const s=AS.exec(e);return s?s[1]?typeof i=="string"?s[1]===i:i.has(s[1]):r(s[2]):!1},b4=e=>u4.test(e)&&!h4.test(e),LS=()=>!1,S4=e=>d4.test(e),w4=e=>f4.test(e),C4=()=>{const e=Ct("colors"),i=Ct("spacing"),r=Ct("blur"),s=Ct("brightness"),l=Ct("borderColor"),p=Ct("borderRadius"),f=Ct("borderSpacing"),a=Ct("borderWidth"),h=Ct("contrast"),d=Ct("grayscale"),m=Ct("hueRotate"),c=Ct("invert"),_=Ct("gap"),y=Ct("gradientColorStops"),E=Ct("gradientColorStopPositions"),S=Ct("inset"),g=Ct("margin"),b=Ct("opacity"),w=Ct("padding"),x=Ct("saturate"),T=Ct("scale"),D=Ct("sepia"),R=Ct("skew"),L=Ct("space"),A=Ct("translate"),j=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Ye,i],B=()=>[Ye,i],H=()=>["",ar,Jr],U=()=>["auto",na,Ye],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",Ye],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[na,Ye];return{cacheSize:500,separator:":",theme:{colors:[_l],spacing:[ar,Jr],blur:["none","",es,Ye],brightness:G(),borderColor:[e],borderRadius:["none","","full",es,Ye],borderSpacing:B(),borderWidth:H(),contrast:G(),grayscale:z(),hueRotate:G(),invert:z(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[p4,Jr],inset:I(),margin:I(),opacity:G(),padding:B(),saturate:G(),scale:G(),sepia:z(),skew:G(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[es]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),Ye]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vl,Ye]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",vl,Ye]}],"grid-cols":[{"grid-cols":[_l]}],"col-start-end":[{col:["auto",{span:["full",vl,Ye]},Ye]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[_l]}],"row-start-end":[{row:["auto",{span:[vl,Ye]},Ye]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-y":[_]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,i]}],"min-w":[{"min-w":[Ye,i,"min","max","fit"]}],"max-w":[{"max-w":[Ye,i,"none","full","min","max","fit","prose",{screen:[es]},es]}],h:[{h:[Ye,i,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,i,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,i,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,i,"auto","min","max","fit"]}],"font-size":[{text:["base",es,Jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ep]}],"font-family":[{font:[_l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ye]}],"line-clamp":[{"line-clamp":["none",na,Ep]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ar,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ar,Jr]}],"underline-offset":[{"underline-offset":["auto",ar,Ye]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),v4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",g4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},x4]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[p]}],"rounded-s":[{"rounded-s":[p]}],"rounded-e":[{"rounded-e":[p]}],"rounded-t":[{"rounded-t":[p]}],"rounded-r":[{"rounded-r":[p]}],"rounded-b":[{"rounded-b":[p]}],"rounded-l":[{"rounded-l":[p]}],"rounded-ss":[{"rounded-ss":[p]}],"rounded-se":[{"rounded-se":[p]}],"rounded-ee":[{"rounded-ee":[p]}],"rounded-es":[{"rounded-es":[p]}],"rounded-tl":[{"rounded-tl":[p]}],"rounded-tr":[{"rounded-tr":[p]}],"rounded-br":[{"rounded-br":[p]}],"rounded-bl":[{"rounded-bl":[p]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:Y()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[ar,Ye]}],"outline-w":[{outline:[ar,Jr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ar,Jr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",es,y4]}],"shadow-color":[{shadow:[_l]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",es,Ye]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[c]}],saturate:[{saturate:[x]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[vl,Ye]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ar,Jr,Ep]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},E4=o4(C4);function ye(...e){return E4(ES(e))}function jn(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function sg(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024**3?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}function ss(e){return e?e.input+e.output+e.cacheRead+e.cacheCreation:0}function $l(e){if(!e)return"";const i=Math.max(0,(Date.now()-Date.parse(e))/1e3);return i<60?"just now":i<3600?`${Math.floor(i/60)}m ago`:i<86400?`${Math.floor(i/3600)}h ago`:`${Math.floor(i/86400)}d ago`}function qs(e){return e?new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}function k4(e){return e==="Agent"||e==="Task"?"agents":e==="Skill"?"skills":e.startsWith("mcp__")?"mcp":"built-in"}function T4(e){const i=e.slice(5),r=i.indexOf("__");return r===-1?{server:i,tool:""}:{server:i.slice(0,r),tool:i.slice(r+2)}}function R4(e){const i={"built-in":[],agents:[],skills:[],mcp:[]};for(const[r,s]of Object.entries(e))i[k4(r)].push({name:r,...s});for(const r of Object.values(i))r.sort((s,l)=>l.count-s.count);return i}const ey=e=>{let i;const r=new Set,s=(d,m)=>{const c=typeof d=="function"?d(i):d;if(!Object.is(c,i)){const _=i;i=m??(typeof c!="object"||c===null)?c:Object.assign({},i,c),r.forEach(y=>y(i,_))}},l=()=>i,a={setState:s,getState:l,getInitialState:()=>h,subscribe:d=>(r.add(d),()=>r.delete(d))},h=i=e(s,l,a);return a},A4=(e=>e?ey(e):ey),L4=e=>e;function D4(e,i=L4){const r=wl.useSyncExternalStore(e.subscribe,wl.useCallback(()=>i(e.getState()),[e,i]),()=>i(e.getInitialState()));return wl.useDebugValue(r),r}const ty=e=>{const i=A4(e),r=s=>D4(i,s);return Object.assign(r,i),r},ql=(e=>e?ty(e):ty),ur=ql(e=>({item:null,set:i=>e({item:i})})),en=ql(e=>({drafts:{},put:(i,r)=>e(s=>({drafts:{...s.drafts,[i]:r}})),drop:i=>e(r=>{const{[i]:s,...l}=r.drafts;return{drafts:l}}),move:(i,r)=>e(s=>({drafts:Object.fromEntries(Object.entries(s.drafts).map(([l,p])=>[l===i?r:l.startsWith(`${i}/`)?r+l.slice(i.length):l,p]))}))})),is=e=>!!(e&&e.text!==e.base),$u=new Map;let Ru=null;function M4(e){e!==Ru&&(Ru&&$u.set(Ru,en.getState().drafts),en.setState({drafts:e&&$u.get(e)||{}}),e&&$u.delete(e),Ru=e)}window.addEventListener("beforeunload",e=>{[en.getState().drafts,...$u.values()].some(r=>Object.values(r).some(is))&&e.preventDefault()});const ny="clauder-hub:auto-save",iy=ql(e=>({on:(()=>{try{return localStorage.getItem(ny)==="1"}catch{return!1}})(),set:i=>{try{localStorage.setItem(ny,i?"1":"0")}catch{}e({on:i})}}));let Al=null;function DS(){if(!Al)return[];try{const e=JSON.parse(localStorage.getItem(Al)??"[]");return Array.isArray(e)?e.filter(i=>typeof(i==null?void 0:i.path)=="string").map(i=>({path:i.path,preview:!!i.preview})):[]}catch{return[]}}function j4(e){if(Al)try{localStorage.setItem(Al,JSON.stringify(e))}catch{}}const MS=(e,i)=>e===i||e.startsWith(`${i}/`),Bn=ql((e,i)=>{const r=s=>{j4(s),e({tabs:s})};return{tabs:DS(),show:s=>{const l=i().tabs;if(l.some(f=>f.path===s))return;const p=l.findIndex(f=>f.preview);if(p===-1)return r([...l,{path:s,preview:!0}]);r(l.map((f,a)=>a===p?{path:s,preview:!0}:f))},pin:s=>{const l=i().tabs;if(!l.some(p=>p.path===s&&p.preview)){l.some(p=>p.path===s)||r([...l,{path:s,preview:!1}]);return}r(l.map(p=>p.path===s?{...p,preview:!1}:p))},close:(s,l)=>{var c;const p=i().tabs,f=new Set(s),a=p.filter(_=>!f.has(_.path));if(r(a),!l||!f.has(l))return l;const h=p.findIndex(_=>_.path===l),d=p.slice(h+1).find(_=>!f.has(_.path)),m=p.slice(0,h).reverse().find(_=>!f.has(_.path));return((c=d??m)==null?void 0:c.path)??null},reorder:(s,l)=>{const p=[...i().tabs],f=p.findIndex(d=>d.path===s),a=p.findIndex(d=>d.path===l);if(f===-1||a===-1||f===a)return;const[h]=p.splice(f,1);p.splice(a,0,h),r(p)},rename:(s,l)=>r(i().tabs.map(p=>MS(p.path,s)?{...p,path:l+p.path.slice(s.length)}:p))}}),Ju=new Map;function O4(e,i){Ju.set(e,i)}function N4(e){const i=Ju.get(e)??null;return Ju.delete(e),i}function B4(e){Ju.clear(),Al=e?`clauder-hub:open-files:${e}`:null,Bn.setState({tabs:DS()})}function P4(e){return Bn.getState().tabs.filter(i=>MS(i.path,e)).map(i=>i.path)}function I4(e){M4(e),B4(e),ur.getState().set(null)}const z4=["overview","inbox","automation","instructions","agents","skills","commands","mcp-servers","hooks","plugins","channels","hub-prompts","claude-settings","mcp-suggestions","presets","categories"];let Wo=null,kp=null;function ry(e){try{return decodeURIComponent(e)}catch{return e}}function sy(){let e=window.location.hash.replace(/^#\/?/,"");const i=e.startsWith("w/");i&&(e=e.slice(2));const r=e.indexOf("/"),s=ry(r===-1?e:e.slice(0,r))||ls;return e=r===-1?"":e.slice(r+1),e.startsWith("session/")?{projectId:s,view:{kind:"session",id:e.slice(8)},windowed:i}:e.startsWith("file/")?{projectId:s,view:{kind:"file",path:e.slice(5).split("/").map(ry).join("/")},windowed:i}:{projectId:s,view:{kind:"page",page:z4.find(l=>l===e)??"overview"},windowed:i}}function eh(e,i,r){if(!e)return eh(ls,i,r);const s=i.kind==="session"?`session/${i.id}`:i.kind==="file"?`file/${i.path.split("/").map(encodeURIComponent).join("/")}`:i.page;return`#/${r?"w/":""}${encodeURIComponent(e)}/${s}`}function og(e){const i=we.getState().projectId,r=e.kind==="session"?`clauder-${i}-${e.id}`:e.kind==="file"?`clauder-file-${i}-${e.path}`:`clauder-${i}-${e.page}`;window.open(`${location.origin}${location.pathname}${eh(i,e,!0)}`,r,"popup,width=1280,height=820")}const H4={sessions:0,transcript:0,interactions:0,runs:0,jobs:0,mcp:0,channels:0,files:0,projects:0},we=ql((e,i)=>{const r=async s=>{if(G3(s),I4(s),e({projectId:s,health:null,sessions:[],open:[],transcriptTicks:{}}),!!s)try{const[l]=await Promise.all([_e.health(),i().refreshSessions(),i().refreshOpen()]);i().projectId===s&&e({health:l}),s!==ls&&_e.openedProject(s).catch(()=>{})}catch(l){if(i().projectId!==s)return;/no such project/i.test(l.message)?(i().notify(`The hub has no project '${s}'. Open its folder again from here.`,"error"),i().openProject(ls)):i().notify(`Could not open the project: ${l.message}`,"error")}};return{health:null,sessions:[],open:[],...sy(),ticks:{...H4},transcriptTicks:{},toast:null,boot:async()=>{window.addEventListener("hashchange",()=>{const f=sy(),a=f.projectId!==i().projectId;e({view:f.view,windowed:f.windowed}),a&&r(f.projectId)}),Wo==null||Wo.close(),Wo=new EventSource("/api/stream");const s=new Set;let l=null;const p=()=>{l=null;const f={...i().ticks},a={...i().transcriptTicks};for(const d of s)d.startsWith("transcript:")?a[d.slice(11)]=Date.now():f[d]+=1;const h=new Set(s);s.clear(),e({ticks:f,transcriptTicks:a}),i().projectId&&((h.has("sessions")||h.has("transcript")||h.has("interactions"))&&i().refreshSessions(),h.has("interactions")&&i().refreshOpen())};Wo.onmessage=f=>{const a=JSON.parse(f.data);a.project&&a.project!==i().projectId?s.add("projects"):(s.add(a.topic==="transcript"?`transcript:${a.payload.sessionId}`:a.topic),a.topic==="transcript"&&s.add("transcript")),l??(l=setTimeout(p,400))},Wo.onopen=()=>{i().projectId&&(i().refreshSessions(),i().refreshOpen())},await r(i().projectId)},go:s=>{window.location.hash=eh(i().projectId,s,i().windowed).slice(1),e({view:s})},openProject:s=>{const l=eh(s,{kind:"page",page:"overview"},!1);window.location.hash===l&&s!==i().projectId&&r(s),window.location.hash=l.slice(1)},refreshSessions:async()=>{const s=i().projectId;if(!s)return;const l=await _e.sessions();i().projectId===s&&e({sessions:l})},refreshOpen:async()=>{const s=i().projectId;if(!s)return;const l=await _e.interactions("open");i().projectId===s&&e({open:l})},notify:(s,l="info")=>{kp&&clearTimeout(kp),e({toast:{text:s,tone:l}}),kp=setTimeout(()=>e({toast:null}),l==="error"?6e3:3e3)}}});function mt(e,i,r=null){const s=we(c=>i.map(_=>c.ticks[_]).join(",")),[l,p]=P.useState(null),[f,a]=P.useState(null),[h,d]=P.useState(0);P.useEffect(()=>{let c=!1;return e().then(_=>{c||(p(_),a(null))},_=>!c&&a(_.message)),()=>{c=!0}},[s,h,JSON.stringify(r)]);const m=P.useCallback(()=>d(c=>c+1),[]);return{data:l,error:f,reload:m}}async function at(e,i){try{const r=await e();return i&&we.getState().notify(i),r}catch(r){we.getState().notify(r.message,"error");return}}function Ks(){const e=we(l=>l.go),[i,r]=P.useState(!1);return{starting:i,start:async(l,p)=>{if(i)return;r(!0);const f=Math.max(80,Math.floor((window.innerWidth-340)/7.8)),a=Math.max(24,Math.floor((window.innerHeight-220)/17)),h=await at(()=>_e.startPurpose(l,p,{cols:f,rows:a}));r(!1),h&&(await we.getState().refreshSessions(),e({kind:"session",id:h.sessionId}))}}}const oy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ay=ES,F4=(e,i)=>r=>{var s;if((i==null?void 0:i.variants)==null)return ay(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:l,defaultVariants:p}=i,f=Object.keys(l).map(d=>{const m=r==null?void 0:r[d],c=p==null?void 0:p[d];if(m===null)return null;const _=oy(m)||oy(c);return l[d][_]}),a=r&&Object.entries(r).reduce((d,m)=>{let[c,_]=m;return _===void 0||(d[c]=_),d},{}),h=i==null||(s=i.compoundVariants)===null||s===void 0?void 0:s.reduce((d,m)=>{let{class:c,className:_,...y}=m;return Object.entries(y).every(E=>{let[S,g]=E;return Array.isArray(g)?g.includes({...p,...a}[S]):{...p,...a}[S]===g})?[...d,c,_]:d},[]);return ay(e,f,h,r==null?void 0:r.class,r==null?void 0:r.className)},U4=F4("inline-flex items-center justify-center gap-1.5 font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed shrink-0",{variants:{variant:{foreground:"bg-foreground text-background hover:bg-foreground/90",primary:"bg-primary text-primary-foreground hover:bg-primary/90",muted:"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground",ghost:"text-muted-foreground hover:bg-muted hover:text-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",success:"bg-success text-success-foreground hover:bg-success/90"},size:{sm:"text-xs px-3 py-1.5 rounded",md:"text-sm px-4 py-2 rounded-md",lg:"text-base px-5 py-2.5 rounded-md",icon:"p-1.5 rounded-md"}},defaultVariants:{variant:"muted",size:"sm"}}),ve=P.forwardRef(({className:e,variant:i,size:r,...s},l)=>v.jsx("button",{ref:l,className:ye(U4({variant:i,size:r}),e),...s}));ve.displayName="Button";var $4=Object.defineProperty,ma=(e,i)=>$4(e,"name",{value:i,configurable:!0}),jS=!!(typeof window<"u"&&window.document&&window.document.createElement);function tt(e,i,{checkForDefaultPrevented:r=!0}={}){return ma(function(l){if(e==null||e(l),r===!1||!l||!l.defaultPrevented)return i==null?void 0:i(l)},"handleEvent")}ma(tt,"composeEventHandlers");function q4(e){var i;if(!jS)throw new Error("Cannot access window outside of the DOM");return((i=e==null?void 0:e.ownerDocument)==null?void 0:i.defaultView)??window}ma(q4,"getOwnerWindow");function hm(e){if(!jS)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}ma(hm,"getOwnerDocument");function OS(e,i=!1){const{activeElement:r}=hm(e);if(!(r!=null&&r.nodeName))return null;if(NS(r)&&r.contentDocument)return OS(r.contentDocument.body,i);if(i){const s=r.getAttribute("aria-activedescendant");if(s){const l=hm(r).getElementById(s);if(l)return l}}return r}ma(OS,"getActiveElement");function NS(e){return e.tagName==="IFRAME"}ma(NS,"isFrame");var V4=Object.defineProperty,ag=(e,i)=>V4(e,"name",{value:i,configurable:!0});function dm(e,i){if(typeof e=="function")return e(i);e!=null&&(e.current=i)}ag(dm,"setRef");function BS(...e){return i=>{let r=!1;const s=e.map(l=>{const p=dm(l,i);return!r&&typeof p=="function"&&(r=!0),p});if(r)return()=>{for(let l=0;l<s.length;l++){const p=s[l];typeof p=="function"?p():dm(e[l],null)}}}}ag(BS,"composeRefs");function ut(...e){return P.useCallback(BS(...e),e)}ag(ut,"useComposedRefs");var W4=Object.defineProperty,hi=(e,i)=>W4(e,"name",{value:i,configurable:!0});function G4(e,i){const r=P.createContext(i);r.displayName=e+"Context";const s=hi(p=>{const{children:f,...a}=p,h=P.useMemo(()=>a,Object.values(a));return v.jsx(r.Provider,{value:h,children:f})},"Provider");s.displayName=e+"Provider";function l(p,f={}){const{optional:a=!1}=f,h=P.useContext(r);if(h)return h;if(i!==void 0)return i;if(!a)throw new Error(`\`${p}\` must be used within \`${e}\``)}return hi(l,"useContext"),[s,l]}hi(G4,"createContext");function yr(e,i=[]){let r=[];function s(p,f){const a=P.createContext(f);a.displayName=p+"Context";const h=r.length;r=[...r,f];const d=hi(c=>{var b;const{scope:_,children:y,...E}=c,S=((b=_==null?void 0:_[e])==null?void 0:b[h])||a,g=P.useMemo(()=>E,Object.values(E));return v.jsx(S.Provider,{value:g,children:y})},"Provider");d.displayName=p+"Provider";function m(c,_,y={}){var b;const{optional:E=!1}=y,S=((b=_==null?void 0:_[e])==null?void 0:b[h])||a,g=P.useContext(S);if(g)return g;if(f!==void 0)return f;if(!E)throw new Error(`\`${c}\` must be used within \`${p}\``)}return hi(m,"useContext"),[d,m]}hi(s,"createContext");const l=hi(()=>{const p=r.map(f=>P.createContext(f));return hi(function(a){const h=(a==null?void 0:a[e])||p;return P.useMemo(()=>({[`__scope${e}`]:{...a,[e]:h}}),[a,h])},"useScope")},"createScope");return l.scopeName=e,[s,PS(l,...i)]}hi(yr,"createContextScope");function PS(...e){const i=e[0];if(e.length===1)return i;const r=hi(()=>{const s=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return hi(function(p){const f=s.reduce((a,{useScope:h,scopeName:d})=>{const c=h(p)[`__scope${d}`];return{...a,...c}},{});return P.useMemo(()=>({[`__scope${i.scopeName}`]:f}),[f])},"useComposedScopes")},"createScope");return r.scopeName=i.scopeName,r}hi(PS,"composeContextScopes");var $t=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},Y4=Object.defineProperty,X4=(e,i)=>Y4(e,"name",{value:i,configurable:!0}),K4=ha[" useId ".trim().toString()]||(()=>{}),Q4=0;function Fi(e){const[i,r]=P.useState(K4());return $t(()=>{e||r(s=>s??String(Q4++))},[e]),e||(i?`radix-${i}`:"")}X4(Fi,"useId");var Z4=Object.defineProperty,J4=(e,i)=>Z4(e,"name",{value:i,configurable:!0}),ly=ha[" useEffectEvent ".trim().toString()],cy=ha[" useInsertionEffect ".trim().toString()];function IS(e){if(typeof ly=="function")return ly(e);const i=P.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof cy=="function"?cy(()=>{i.current=e}):$t(()=>{i.current=e}),P.useMemo(()=>((...r)=>{var s;return(s=i.current)==null?void 0:s.call(i,...r)}),[])}J4(IS,"useEffectEvent");var eT=Object.defineProperty,Vl=(e,i)=>eT(e,"name",{value:i,configurable:!0}),tT=ha[" useInsertionEffect ".trim().toString()]||$t;function Vs({prop:e,defaultProp:i,onChange:r=Vl(()=>{},"onChange"),caller:s}){const[l,p,f]=zS({defaultProp:i,onChange:r}),a=e!==void 0,h=a?e:l,d=P.useCallback(m=>{var c;if(a){const _=HS(m)?m(e):m;_!==e&&((c=f.current)==null||c.call(f,_))}else p(m)},[a,e,p,f]);return[h,d]}Vl(Vs,"useControllableState");function zS({defaultProp:e,onChange:i}){const[r,s]=P.useState(e),l=P.useRef(r),p=P.useRef(i);return tT(()=>{p.current=i},[i]),P.useEffect(()=>{var f;l.current!==r&&((f=p.current)==null||f.call(p,r),l.current=r)},[r,l]),[r,s,p]}Vl(zS,"useUncontrolledState");function HS(e){return typeof e=="function"}Vl(HS,"isFunction");var uy=Symbol("RADIX:SYNC_STATE");function nT(e,i,r,s){const{prop:l,defaultProp:p,onChange:f,caller:a}=i,h=l!==void 0,d=IS(f),m=[{...r,state:p}];s&&m.push(s);const[c,_]=P.useReducer((g,b)=>{if(b.type===uy)return{...g,state:b.state};const w=e(g,b);return h&&!Object.is(w.state,g.state)&&d(w.state),w},...m),y=c.state,E=P.useRef(y);P.useEffect(()=>{E.current!==y&&(E.current=y,h||d(y))},[y,E,h]);const S=P.useMemo(()=>l!==void 0?{...c,state:l}:c,[c,l]);return P.useEffect(()=>{h&&!Object.is(l,c.state)&&_({type:uy,state:l})},[l,c.state,h]),[S,_]}Vl(nT,"useControllableStateReducer");var Wl=oS(),iT=Object.defineProperty,Qn=(e,i)=>iT(e,"name",{value:i,configurable:!0});function pr(e){const i=P.forwardRef((r,s)=>{let{children:l,...p}=r,f=null,a=!1;const h=[];l=GS(l),P.Children.forEach(l,_=>{var y;if(VS(_)){a=!0;const E=_;let S="child"in E.props?E.props.child:E.props.children;for(;lg(S)&&typeof th=="function";)S=th(S._payload);f=rT(E,S),h.push((y=f==null?void 0:f.props)==null?void 0:y.children)}else h.push(_)}),f?f=P.cloneElement(f,void 0,h):!a&&P.Children.count(l)===1&&P.isValidElement(l)&&(f=l);const d=f?qS(f):void 0,m=ut(s,d);if(!f){if(l||l===0)throw new Error(a?aT(e):oT(e));return l}const c=$S(p,f.props??{});return f.type!==P.Fragment&&(c.ref=s?m:d),P.cloneElement(f,c)});return i.displayName=`${e}.Slot`,i}Qn(pr,"createSlot");var FS=Symbol.for("radix.slottable");function US(e){const i=Qn(r=>"child"in r?r.children(r.child):r.children,"Slottable");return i.displayName=`${e}.Slottable`,i.__radixId=FS,i}Qn(US,"createSlottable");var rT=Qn((e,i)=>"child"in e.props?P.isValidElement(i)?P.cloneElement(i,void 0,e.props.children(i.props.children)):null:P.isValidElement(i)?i:null,"getSlottableElementFromSlottable");function $S(e,i){const r={...i};for(const s in i){const l=e[s],p=i[s];/^on[A-Z]/.test(s)?l&&p?r[s]=(...a)=>{const h=p(...a);return l(...a),h}:l&&(r[s]=l):s==="style"?r[s]={...l,...p}:s==="className"?r[s]=[l,p].filter(Boolean).join(" "):s==="aria-describedby"&&(r[s]=YS(p,l))}return{...e,...r}}Qn($S,"mergeProps");function qS(e){var s,l;let i=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?e.ref:(i=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}Qn(qS,"getElementRef");function VS(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FS}Qn(VS,"isSlottable");var sT=Symbol.for("react.lazy");function lg(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===sT&&"_payload"in e&&WS(e._payload)}Qn(lg,"isLazyComponent");function WS(e){return typeof e=="object"&&e!==null&&"then"in e}Qn(WS,"isPromiseLike");function GS(e){let i=e;for(;lg(i)&&typeof th=="function";)i=th(i._payload);return i}Qn(GS,"useUnwrappedLazy");function YS(...e){const i=new Set;for(const r of e)if(typeof r=="string")for(const s of String(r).trim().split(/\s+/))s&&i.add(s);return i.size>0?Array.from(i).join(" "):void 0}Qn(YS,"concatAriaDescribedby");var oT=Qn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),aT=Qn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),th=ha[" use ".trim().toString()],lT=Object.defineProperty,cT=(e,i)=>lT(e,"name",{value:i,configurable:!0}),uT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=uT.reduce((e,i)=>{const r=pr(`Primitive.${i}`),s=P.forwardRef((l,p)=>{const{asChild:f,...a}=l,h=f?r:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(h,{...a,ref:p})});return s.displayName=`Primitive.${i}`,{...e,[i]:s}},{});function XS(e,i){e&&Wl.flushSync(()=>e.dispatchEvent(i))}cT(XS,"dispatchDiscreteCustomEvent");var hT=Object.defineProperty,dT=(e,i)=>hT(e,"name",{value:i,configurable:!0}),hy=ha[" useInsertionEffect ".trim().toString()];function Ui(e){const i=P.useRef(e);return typeof hy=="function"?hy(()=>{i.current=e}):$t(()=>{i.current=e}),P.useMemo(()=>((...r)=>{var s;return(s=i.current)==null?void 0:s.call(i,...r)}),[])}dT(Ui,"useCallbackRef");var fT=Object.defineProperty,tn=(e,i)=>fT(e,"name",{value:i,configurable:!0}),fm="dismissableLayer.update",pT="dismissableLayer.pointerDownOutside",mT="dismissableLayer.focusOutside",dy,KS=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),xh=P.forwardRef(tn(function(i,r){const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:l=!1,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:a,onInteractOutside:h,onDismiss:d,...m}=i,c=P.useContext(KS),[_,y]=P.useState(null),E=(_==null?void 0:_.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=P.useState({}),g=ut(r,y),b=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=w?b.indexOf(w):-1,T=_?b.indexOf(_):-1,D=c.layersWithOutsidePointerEventsDisabled.size>0,R=T>=x,L=P.useRef(!1),A=ZS(B=>{f==null||f(B),h==null||h(B),B.defaultPrevented||d==null||d()},{ownerDocument:E,deferPointerDownOutside:l,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:P.useCallback(B=>{if(!(B instanceof Node))return!1;const H=[...c.branches].some(U=>U.contains(B));return R&&!H},[c.branches,R])}),j=JS(B=>{if(l&&L.current)return;const H=B.target;[...c.branches].some(W=>W.contains(H))||(a==null||a(B),h==null||h(B),B.defaultPrevented||d==null||d())},E),M=_?T===b.length-1:!1,I=Ui(B=>{B.key==="Escape"&&(p==null||p(B),!B.defaultPrevented&&d&&(B.preventDefault(),d()))});return P.useEffect(()=>{if(M)return E.addEventListener("keydown",I,{capture:!0}),()=>E.removeEventListener("keydown",I,{capture:!0})},[E,M,I]),P.useEffect(()=>{if(_)return s&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(dy=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(_)),c.layers.add(_),pm(),()=>{s&&(c.layersWithOutsidePointerEventsDisabled.delete(_),c.layersWithOutsidePointerEventsDisabled.size===0&&(E.body.style.pointerEvents=dy))}},[_,E,s,c]),P.useEffect(()=>()=>{_&&(c.layers.delete(_),c.layersWithOutsidePointerEventsDisabled.delete(_),pm())},[_,c]),P.useEffect(()=>{const B=tn(()=>S({}),"handleUpdate");return document.addEventListener(fm,B),()=>document.removeEventListener(fm,B)},[]),v.jsx(wt.div,{...m,ref:g,style:{pointerEvents:D?R?"auto":"none":void 0,...i.style},onFocusCapture:tt(i.onFocusCapture,j.onFocusCapture),onBlurCapture:tt(i.onBlurCapture,j.onBlurCapture),onPointerDownCapture:tt(i.onPointerDownCapture,A.onPointerDownCapture)})},"DismissableLayer"));function QS(){const e=P.useContext(KS),[i,r]=P.useState(null);return P.useEffect(()=>{if(i)return e.dismissableSurfaces.add(i),()=>{e.dismissableSurfaces.delete(i)}},[i,e.dismissableSurfaces]),r}tn(QS,"useDismissableLayerSurface");var gT=tn(()=>!0,"IS_TRUE");function ZS(e,i){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:l,dismissableSurfaces:p,shouldHandlePointerDownOutside:f=gT}=i,a=Ui(e),h=P.useRef(!1),d=P.useRef(!1),m=P.useRef(new Map),c=P.useRef(()=>{});return P.useEffect(()=>{function _(){d.current=!1,l.current=!1,m.current.clear()}tn(_,"resetOutsideInteraction");function y(){return Array.from(m.current.values()).some(Boolean)}tn(y,"isOutsideInteractionIntercepted");function E(x){if(!d.current)return;const T=x.target;T instanceof Node&&[...p].some(R=>R.contains(T))||m.current.set(x.type,!0),x.type==="click"&&window.setTimeout(()=>{d.current&&c.current()},0)}tn(E,"handleInteractionCapture");function S(x){d.current&&m.current.set(x.type,!1)}tn(S,"handleInteractionBubble");const g=tn(x=>{if(x.target&&!h.current){let T=function(){r.removeEventListener("click",c.current);const R=y();_(),R||cg(pT,a,D,{discrete:!0})};if(tn(T,"handleAndDispatchPointerDownOutsideEvent"),!f(x.target)){r.removeEventListener("click",c.current),_(),h.current=!1;return}const D={originalEvent:x};d.current=!0,l.current=s&&x.button===0,m.current.clear(),!s||x.button!==0?T():(r.removeEventListener("click",c.current),c.current=T,r.addEventListener("click",c.current,{once:!0}))}else r.removeEventListener("click",c.current),_();h.current=!1},"handlePointerDown"),b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const x of b)r.addEventListener(x,E,!0),r.addEventListener(x,S);const w=window.setTimeout(()=>{r.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(w),r.removeEventListener("pointerdown",g),r.removeEventListener("click",c.current);for(const x of b)r.removeEventListener(x,E,!0),r.removeEventListener(x,S)}},[r,a,s,l,p,f]),{onPointerDownCapture:tn(()=>h.current=!0,"onPointerDownCapture")}}tn(ZS,"usePointerDownOutside");function JS(e,i=globalThis==null?void 0:globalThis.document){const r=Ui(e),s=P.useRef(!1);return P.useEffect(()=>{const l=tn(p=>{p.target&&!s.current&&cg(mT,r,{originalEvent:p},{discrete:!1})},"handleFocus");return i.addEventListener("focusin",l),()=>i.removeEventListener("focusin",l)},[i,r]),{onFocusCapture:tn(()=>s.current=!0,"onFocusCapture"),onBlurCapture:tn(()=>s.current=!1,"onBlurCapture")}}tn(JS,"useFocusOutside");function pm(){const e=new CustomEvent(fm);document.dispatchEvent(e)}tn(pm,"dispatchUpdate");function cg(e,i,r,{discrete:s}){const l=r.originalEvent.target,p=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});i&&l.addEventListener(e,i,{once:!0}),s?XS(l,p):l.dispatchEvent(p)}tn(cg,"handleAndDispatchCustomEvent");var vT=Object.defineProperty,Ft=(e,i)=>vT(e,"name",{value:i,configurable:!0}),Tp="focusScope.autoFocusOnMount",Rp="focusScope.autoFocusOnUnmount",fy={bubbles:!1,cancelable:!0},ug=P.forwardRef(Ft(function(i,r){const{loop:s=!1,trapped:l=!1,branches:p,onMountAutoFocus:f,onUnmountAutoFocus:a,...h}=i,[d,m]=P.useState(null),c=Ui(f),_=Ui(a),y=P.useRef(null),E=ut(r,m),S=P.useRef(p);P.useEffect(()=>{S.current=p});const g=P.useCallback(x=>{var T;return x?d!=null&&d.contains(x)?!0:!!((T=S.current)!=null&&T.some(D=>D.contains(x))):!1},[d]),b=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(l){let x=function(L){if(b.paused||!d)return;const A=L.target;g(A)?y.current=A:lr(y.current,{select:!0})},T=function(L){if(b.paused||!d)return;const A=L.relatedTarget;A!==null&&(g(A)||lr(y.current,{select:!0}))},D=function(L){if(document.activeElement===document.body)for(const j of L)j.removedNodes.length>0&&lr(d)};Ft(x,"handleFocusIn"),Ft(T,"handleFocusOut"),Ft(D,"handleMutations"),document.addEventListener("focusin",x),document.addEventListener("focusout",T);const R=new MutationObserver(D);return d&&R.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",T),R.disconnect()}}},[l,d,b.paused,g]),P.useEffect(()=>{if(d){py.add(b);const x=document.activeElement;if(!d.contains(x)){const D=new CustomEvent(Tp,fy);d.addEventListener(Tp,c),d.dispatchEvent(D),D.defaultPrevented||(tw(ow(pg(d)),{select:!0}),document.activeElement===x&&lr(d))}return()=>{d.removeEventListener(Tp,c);const D=d.ownerDocument,R=CustomEvent;setTimeout(()=>{const L=new R(Rp,fy);d.addEventListener(Rp,_),d.dispatchEvent(L),L.defaultPrevented||lr(x??D.body,{select:!0}),d.removeEventListener(Rp,_),py.remove(b)},0)}}},[d,c,_,b]);const w=P.useCallback(x=>{if(!s&&!l||b.paused)return;const T=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,D=document.activeElement;if(T&&D){const R=x.currentTarget,[L,A]=nw(R);L&&A?!x.shiftKey&&D===A?(x.preventDefault(),s&&lr(L,{select:!0})):x.shiftKey&&D===L&&(x.preventDefault(),s&&lr(A,{select:!0})):D===R&&x.preventDefault()}},[s,l,b.paused]);return v.jsx(wt.div,{tabIndex:-1,...h,ref:E,onKeyDown:w})},"FocusScope")),ew=P.createContext(null);function hg({registry:e,children:i}){return e?v.jsx(ew.Provider,{value:e,children:i}):i}Ft(hg,"FocusScopeBranchProvider");function dg(){const[e,i]=P.useState([]),r=P.useMemo(()=>({add:Ft(s=>i(l=>l.includes(s)?l:[...l,s]),"add"),remove:Ft(s=>i(l=>l.filter(p=>p!==s)),"remove")}),[]);return{nodes:e,registry:r}}Ft(dg,"useFocusScopeBranchRegistry");function fg(e){const i=P.useContext(ew);P.useEffect(()=>{if(!(!e||!i))return i.add(e),()=>i.remove(e)},[e,i])}Ft(fg,"useFocusScopeBranch");function tw(e,{select:i=!1}={}){const r=document.activeElement;for(const s of e)if(lr(s,{select:i}),document.activeElement!==r)return}Ft(tw,"focusFirst");function nw(e){const i=pg(e),r=mm(i,e),s=mm(i.reverse(),e);return[r,s]}Ft(nw,"getTabbableEdges");function pg(e){const i=[],s=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Ft(l=>{const p=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||p?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;s.nextNode();)i.push(s.currentNode);return i}Ft(pg,"getTabbableCandidates");function mm(e,i){const r=typeof i.checkVisibility=="function"&&i.checkVisibility({checkVisibilityCSS:!0});for(const s of e)if(!(r?!s.checkVisibility({checkVisibilityCSS:!0}):iw(s,{upTo:i})))return s}Ft(mm,"findVisible");function iw(e,{upTo:i}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(i!==void 0&&e===i)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Ft(iw,"isHidden");function rw(e){return e.tagName==="INPUT"&&typeof e.select=="function"}Ft(rw,"isSelectableInput");function lr(e,{select:i=!1}={}){if(e&&e.focus){const s=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==s&&rw(e)&&i&&e.select()}}Ft(lr,"focus");var py=sw();function sw(){let e=[];return{add(i){const r=e[0];i!==r&&(r==null||r.pause()),e=gm(e,i),e.unshift(i)},remove(i){var r;e=gm(e,i),(r=e[0])==null||r.resume()}}}Ft(sw,"createFocusScopesStack");function gm(e,i){const r=[...e],s=r.indexOf(i);return s!==-1&&r.splice(s,1),r}Ft(gm,"arrayRemove");function ow(e){return e.filter(i=>i.tagName!=="A")}Ft(ow,"removeLinks");var _T=Object.defineProperty,xT=(e,i)=>_T(e,"name",{value:i,configurable:!0}),yh=P.forwardRef(xT(function(i,r){var h;const{container:s,...l}=i,[p,f]=P.useState(!1);$t(()=>f(!0),[]);const a=s||p&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return a?Wl.createPortal(v.jsx(wt.div,{...l,ref:r}),a):null},"Portal")),yT=Object.defineProperty,mr=(e,i)=>yT(e,"name",{value:i,configurable:!0});function aw(e,i){return P.useReducer((r,s)=>i[r][s]??r,e)}mr(aw,"useStateMachine");var br=mr(e=>{const{present:i,children:r}=e,s=lw(i),l=typeof r=="function"?r({present:s.isPresent}):P.Children.only(r),p=cw(s.ref,uw(l));return typeof r=="function"||s.isPresent?P.cloneElement(l,{ref:p}):null},"Presence");function lw(e){const[i,r]=P.useState(),s=P.useRef(null),l=P.useRef(e),p=P.useRef("none"),f=P.useRef(void 0),a=e?"mounted":"unmounted",[h,d]=aw(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{h==="mounted"?(p.current=f.current??Zo(s.current),f.current=void 0):p.current="none"},[h]),$t(()=>{const m=s.current,c=l.current;if(c!==e){const y=p.current,E=Zo(m);e?(f.current=E,d("MOUNT")):E==="none"||(m==null?void 0:m.display)==="none"?d("UNMOUNT"):d(c&&y!==E?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,d]),$t(()=>{if(i){let m;const c=i.ownerDocument.defaultView??window,_=mr(E=>{const g=Zo(s.current).includes(CSS.escape(E.animationName));if(E.target===i&&g&&(d("ANIMATION_END"),!l.current)){const b=i.style.animationFillMode;i.style.animationFillMode="forwards",m=c.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=b)})}},"handleAnimationEnd"),y=mr(E=>{E.target===i&&(p.current=Zo(s.current))},"handleAnimationStart");return i.addEventListener("animationstart",y),i.addEventListener("animationcancel",_),i.addEventListener("animationend",_),()=>{c.clearTimeout(m),i.removeEventListener("animationstart",y),i.removeEventListener("animationcancel",_),i.removeEventListener("animationend",_)}}else d("ANIMATION_END")},[i,d]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:P.useCallback(m=>{if(m){const c=getComputedStyle(m);s.current=c,f.current=Zo(c)}else s.current=null;r(m)},[])}}mr(lw,"usePresence");function vm(e,i){if(typeof e=="function")return e(i);e!=null&&(e.current=i)}mr(vm,"setRef");function cw(...e){const i=P.useRef(e);return i.current=e,P.useCallback(r=>{const s=i.current;let l=!1;const p=s.map(f=>{const a=vm(f,r);return!l&&typeof a=="function"&&(l=!0),a});if(l)return()=>{for(let f=0;f<p.length;f++){const a=p[f];typeof a=="function"?a():vm(s[f],null)}}},[])}mr(cw,"useStableComposedRefs");function Zo(e){return(e==null?void 0:e.animationName)||"none"}mr(Zo,"getAnimationName");function uw(e){var s,l;let i=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?e.ref:(i=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}mr(uw,"getElementRef");var bT=Object.defineProperty,mg=(e,i)=>bT(e,"name",{value:i,configurable:!0}),Au=0,Bi=null;function ST(e){return Gl(),e.children}mg(ST,"FocusGuards");function Gl(){P.useEffect(()=>{Bi||(Bi={start:_m(),end:_m()});const{start:e,end:i}=Bi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==i&&document.body.insertAdjacentElement("beforeend",i),Au++,()=>{Au===1&&(Bi==null||Bi.start.remove(),Bi==null||Bi.end.remove(),Bi=null),Au=Math.max(0,Au-1)}},[])}mg(Gl,"useFocusGuards");function _m(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}mg(_m,"createFocusGuard");var Ii=function(){return Ii=Object.assign||function(i){for(var r,s=1,l=arguments.length;s<l;s++){r=arguments[s];for(var p in r)Object.prototype.hasOwnProperty.call(r,p)&&(i[p]=r[p])}return i},Ii.apply(this,arguments)};function hw(e,i){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(e);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(r[s[l]]=e[s[l]]);return r}function wT(e,i,r){if(r||arguments.length===2)for(var s=0,l=i.length,p;s<l;s++)(p||!(s in i))&&(p||(p=Array.prototype.slice.call(i,0,s)),p[s]=i[s]);return e.concat(p||Array.prototype.slice.call(i))}var qu="right-scroll-bar-position",Vu="width-before-scroll-bar",CT="with-scroll-bars-hidden",ET="--removed-body-scroll-bar-size";function Ap(e,i){return typeof e=="function"?e(i):e&&(e.current=i),e}function kT(e,i){var r=P.useState(function(){return{value:e,callback:i,facade:{get current(){return r.value},set current(s){var l=r.value;l!==s&&(r.value=s,r.callback(s,l))}}}})[0];return r.callback=i,r.facade}var TT=typeof window<"u"?P.useLayoutEffect:P.useEffect,my=new WeakMap;function RT(e,i){var r=kT(null,function(s){return e.forEach(function(l){return Ap(l,s)})});return TT(function(){var s=my.get(r);if(s){var l=new Set(s),p=new Set(e),f=r.current;l.forEach(function(a){p.has(a)||Ap(a,null)}),p.forEach(function(a){l.has(a)||Ap(a,f)})}my.set(r,e)},[e]),r}function AT(e){return e}function LT(e,i){i===void 0&&(i=AT);var r=[],s=!1,l={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(p){var f=i(p,s);return r.push(f),function(){r=r.filter(function(a){return a!==f})}},assignSyncMedium:function(p){for(s=!0;r.length;){var f=r;r=[],f.forEach(p)}r={push:function(a){return p(a)},filter:function(){return r}}},assignMedium:function(p){s=!0;var f=[];if(r.length){var a=r;r=[],a.forEach(p),f=r}var h=function(){var m=f;f=[],m.forEach(p)},d=function(){return Promise.resolve().then(h)};d(),r={push:function(m){f.push(m),d()},filter:function(m){return f=f.filter(m),r}}}};return l}function DT(e){e===void 0&&(e={});var i=LT(null);return i.options=Ii({async:!0,ssr:!1},e),i}var dw=function(e){var i=e.sideCar,r=hw(e,["sideCar"]);if(!i)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=i.read();if(!s)throw new Error("Sidecar medium not found");return P.createElement(s,Ii({},r))};dw.isSideCarExport=!0;function MT(e,i){return e.useMedium(i),dw}var fw=DT(),Lp=function(){},bh=P.forwardRef(function(e,i){var r=P.useRef(null),s=P.useState({onScrollCapture:Lp,onWheelCapture:Lp,onTouchMoveCapture:Lp}),l=s[0],p=s[1],f=e.forwardProps,a=e.children,h=e.className,d=e.removeScrollBar,m=e.enabled,c=e.shards,_=e.sideCar,y=e.noRelative,E=e.noIsolation,S=e.inert,g=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=e.gapMode,T=hw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=_,R=RT([r,i]),L=Ii(Ii({},T),l);return P.createElement(P.Fragment,null,m&&P.createElement(D,{sideCar:fw,removeScrollBar:d,shards:c,noRelative:y,noIsolation:E,inert:S,setCallbacks:p,allowPinchZoom:!!g,lockRef:r,gapMode:x}),f?P.cloneElement(P.Children.only(a),Ii(Ii({},L),{ref:R})):P.createElement(w,Ii({},L,{className:h,ref:R}),a))});bh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bh.classNames={fullWidth:Vu,zeroRight:qu};var jT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var i=jT();return i&&e.setAttribute("nonce",i),e}function NT(e,i){e.styleSheet?e.styleSheet.cssText=i:e.appendChild(document.createTextNode(i))}function BT(e){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(e)}var PT=function(){var e=0,i=null;return{add:function(r){e==0&&(i=OT())&&(NT(i,r),BT(i)),e++},remove:function(){e--,!e&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},IT=function(){var e=PT();return function(i,r){P.useEffect(function(){return e.add(i),function(){e.remove()}},[i&&r])}},pw=function(){var e=IT(),i=function(r){var s=r.styles,l=r.dynamic;return e(s,l),null};return i},zT={left:0,top:0,right:0,gap:0},Dp=function(e){return parseInt(e||"",10)||0},HT=function(e){var i=window.getComputedStyle(document.body),r=i[e==="padding"?"paddingLeft":"marginLeft"],s=i[e==="padding"?"paddingTop":"marginTop"],l=i[e==="padding"?"paddingRight":"marginRight"];return[Dp(r),Dp(s),Dp(l)]},FT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zT;var i=HT(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,s-r+i[2]-i[0])}},UT=pw(),ia="data-scroll-locked",$T=function(e,i,r,s){var l=e.left,p=e.top,f=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
451
|
-
.`.concat(CT,` {
|
|
452
|
-
overflow: hidden `).concat(s,`;
|
|
453
|
-
padding-right: `).concat(a,"px ").concat(s,`;
|
|
454
|
-
}
|
|
455
|
-
body[`).concat(ia,`] {
|
|
456
|
-
overflow: hidden `).concat(s,`;
|
|
457
|
-
overscroll-behavior: contain;
|
|
458
|
-
`).concat([i&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
459
|
-
padding-left: `.concat(l,`px;
|
|
460
|
-
padding-top: `).concat(p,`px;
|
|
461
|
-
padding-right: `).concat(f,`px;
|
|
462
|
-
margin-left:0;
|
|
463
|
-
margin-top:0;
|
|
464
|
-
margin-right: `).concat(a,"px ").concat(s,`;
|
|
465
|
-
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.`).concat(qu,` {
|
|
469
|
-
right: `).concat(a,"px ").concat(s,`;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.`).concat(Vu,` {
|
|
473
|
-
margin-right: `).concat(a,"px ").concat(s,`;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.`).concat(qu," .").concat(qu,` {
|
|
477
|
-
right: 0 `).concat(s,`;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.`).concat(Vu," .").concat(Vu,` {
|
|
481
|
-
margin-right: 0 `).concat(s,`;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
body[`).concat(ia,`] {
|
|
485
|
-
`).concat(ET,": ").concat(a,`px;
|
|
486
|
-
}
|
|
487
|
-
`)},gy=function(){var e=parseInt(document.body.getAttribute(ia)||"0",10);return isFinite(e)?e:0},qT=function(){P.useEffect(function(){return document.body.setAttribute(ia,(gy()+1).toString()),function(){var e=gy()-1;e<=0?document.body.removeAttribute(ia):document.body.setAttribute(ia,e.toString())}},[])},VT=function(e){var i=e.noRelative,r=e.noImportant,s=e.gapMode,l=s===void 0?"margin":s;qT();var p=P.useMemo(function(){return FT(l)},[l]);return P.createElement(UT,{styles:$T(p,!i,l,r?"":"!important")})},xm=!1;if(typeof window<"u")try{var Lu=Object.defineProperty({},"passive",{get:function(){return xm=!0,!0}});window.addEventListener("test",Lu,Lu),window.removeEventListener("test",Lu,Lu)}catch{xm=!1}var Go=xm?{passive:!1}:!1,WT=function(e){return e.tagName==="TEXTAREA"},mw=function(e,i){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[i]!=="hidden"&&!(r.overflowY===r.overflowX&&!WT(e)&&r[i]==="visible")},GT=function(e){return mw(e,"overflowY")},YT=function(e){return mw(e,"overflowX")},vy=function(e,i){var r=i.ownerDocument,s=i;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var l=gw(e,s);if(l){var p=vw(e,s),f=p[1],a=p[2];if(f>a)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},XT=function(e){var i=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[i,r,s]},KT=function(e){var i=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[i,r,s]},gw=function(e,i){return e==="v"?GT(i):YT(i)},vw=function(e,i){return e==="v"?XT(i):KT(i)},QT=function(e,i){return e==="h"&&i==="rtl"?-1:1},ZT=function(e,i,r,s,l){var p=QT(e,window.getComputedStyle(i).direction),f=p*s,a=r.target,h=i.contains(a),d=!1,m=f>0,c=0,_=0;do{if(!a)break;var y=vw(e,a),E=y[0],S=y[1],g=y[2],b=S-g-p*E;(E||b)&&gw(e,a)&&(c+=b,_+=E);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!h&&a!==document.body||h&&(i.contains(a)||i===a));return(m&&Math.abs(c)<1||!m&&Math.abs(_)<1)&&(d=!0),d},Du=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_y=function(e){return[e.deltaX,e.deltaY]},xy=function(e){return e&&"current"in e?e.current:e},JT=function(e,i){return e[0]===i[0]&&e[1]===i[1]},eR=function(e){return`
|
|
488
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
489
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
490
|
-
`)},tR=0,Yo=[];function nR(e){var i=P.useRef([]),r=P.useRef([0,0]),s=P.useRef(),l=P.useState(tR++)[0],p=P.useState(pw)[0],f=P.useRef(e);P.useEffect(function(){f.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var S=wT([e.lockRef.current],(e.shards||[]).map(xy),!0).filter(Boolean);return S.forEach(function(g){return g.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),S.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var a=P.useCallback(function(S,g){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!f.current.allowPinchZoom;var b=Du(S),w=r.current,x="deltaX"in S?S.deltaX:w[0]-b[0],T="deltaY"in S?S.deltaY:w[1]-b[1],D,R=S.target,L=Math.abs(x)>Math.abs(T)?"h":"v";if("touches"in S&&L==="h"&&R.type==="range")return!1;var A=window.getSelection(),j=A&&A.anchorNode,M=j?j===R||j.contains(R):!1;if(M)return!1;var I=vy(L,R);if(!I)return!0;if(I?D=L:(D=L==="v"?"h":"v",I=vy(L,R)),!I)return!1;if(!s.current&&"changedTouches"in S&&(x||T)&&(s.current=D),!D)return!0;var B=s.current||D;return ZT(B,g,S,B==="h"?x:T)},[]),h=P.useCallback(function(S){var g=S;if(!(!Yo.length||Yo[Yo.length-1]!==p)){var b="deltaY"in g?_y(g):Du(g),w=i.current.filter(function(D){return D.name===g.type&&(D.target===g.target||g.target===D.shadowParent)&&JT(D.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var x=(f.current.shards||[]).map(xy).filter(Boolean).filter(function(D){return D.contains(g.target)}),T=x.length>0?a(g,x[0]):!f.current.noIsolation;T&&g.cancelable&&g.preventDefault()}}},[]),d=P.useCallback(function(S,g,b,w){var x={name:S,delta:g,target:b,should:w,shadowParent:iR(b)};i.current.push(x),setTimeout(function(){i.current=i.current.filter(function(T){return T!==x})},1)},[]),m=P.useCallback(function(S){r.current=Du(S),s.current=void 0},[]),c=P.useCallback(function(S){d(S.type,_y(S),S.target,a(S,e.lockRef.current))},[]),_=P.useCallback(function(S){d(S.type,Du(S),S.target,a(S,e.lockRef.current))},[]);P.useEffect(function(){return Yo.push(p),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:_}),document.addEventListener("wheel",h,Go),document.addEventListener("touchmove",h,Go),document.addEventListener("touchstart",m,Go),function(){Yo=Yo.filter(function(S){return S!==p}),document.removeEventListener("wheel",h,Go),document.removeEventListener("touchmove",h,Go),document.removeEventListener("touchstart",m,Go)}},[]);var y=e.removeScrollBar,E=e.inert;return P.createElement(P.Fragment,null,E?P.createElement(p,{styles:eR(l)}):null,y?P.createElement(VT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function iR(e){for(var i=null;e!==null;)e instanceof ShadowRoot&&(i=e.host,e=e.host),e=e.parentNode;return i}const rR=MT(fw,nR);var Sh=P.forwardRef(function(e,i){return P.createElement(bh,Ii({},e,{ref:i,sideCar:rR}))});Sh.classNames=bh.classNames;var sR=function(e){if(typeof document>"u")return null;var i=Array.isArray(e)?e[0]:e;return i.ownerDocument.body},Xo=new WeakMap,Mu=new WeakMap,ju={},Mp=0,_w=function(e){return e&&(e.host||_w(e.parentNode))},oR=function(e,i){return i.map(function(r){if(e.contains(r))return r;var s=_w(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},aR=function(e,i,r,s){var l=oR(i,Array.isArray(e)?e:[e]);ju[r]||(ju[r]=new WeakMap);var p=ju[r],f=[],a=new Set,h=new Set(l),d=function(c){!c||a.has(c)||(a.add(c),d(c.parentNode))};l.forEach(d);var m=function(c){!c||h.has(c)||Array.prototype.forEach.call(c.children,function(_){if(a.has(_))m(_);else try{var y=_.getAttribute(s),E=y!==null&&y!=="false",S=(Xo.get(_)||0)+1,g=(p.get(_)||0)+1;Xo.set(_,S),p.set(_,g),f.push(_),S===1&&E&&Mu.set(_,!0),g===1&&_.setAttribute(r,"true"),E||_.setAttribute(s,"true")}catch(b){console.error("aria-hidden: cannot operate on ",_,b)}})};return m(i),a.clear(),Mp++,function(){f.forEach(function(c){var _=Xo.get(c)-1,y=p.get(c)-1;Xo.set(c,_),p.set(c,y),_||(Mu.has(c)||c.removeAttribute(s),Mu.delete(c)),y||c.removeAttribute(r)}),Mp--,Mp||(Xo=new WeakMap,Xo=new WeakMap,Mu=new WeakMap,ju={})}},gg=function(e,i,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),l=sR(e);return l?(s.push.apply(s,Array.from(l.querySelectorAll("[aria-live], script"))),aR(s,l,r,"aria-hidden")):function(){return null}},lR=Object.defineProperty,Pn=(e,i)=>lR(e,"name",{value:i,configurable:!0}),vg="Dialog",[xw,q9]=yr(vg),[cR,Ci]=xw(vg),yw=Pn(e=>{const{__scopeDialog:i,children:r,open:s,defaultOpen:l,onOpenChange:p,modal:f=!0}=e,a=P.useRef(null),h=P.useRef(null),{nodes:d,registry:m}=dg(),[c,_]=Vs({prop:s,defaultProp:l??!1,onChange:p,caller:vg}),[y,E]=P.useState(0),[S,g]=P.useState(0);return v.jsx(cR,{scope:i,triggerRef:a,contentRef:h,contentId:Fi(),titleId:Fi(),descriptionId:Fi(),titlePresent:y>0,descriptionPresent:S>0,setTitleCount:E,setDescriptionCount:g,open:c,onOpenChange:_,onOpenToggle:P.useCallback(()=>_(b=>!b),[_]),modal:f,branchNodes:d,branchRegistry:m,children:r})},"Dialog"),uR="DialogTrigger",hR=P.forwardRef(Pn(function(i,r){const{__scopeDialog:s,...l}=i,p=Ci(uR,s),f=ut(r,p.triggerRef);return v.jsx(wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":p.open,"aria-controls":p.open?p.contentId:void 0,"data-state":wh(p.open),...l,ref:f,onClick:tt(i.onClick,p.onOpenToggle)})},"DialogTrigger")),bw="DialogPortal",[dR,Sw]=xw(bw,{forceMount:void 0}),ww=Pn(e=>{const{__scopeDialog:i,forceMount:r,children:s,container:l}=e,p=Ci(bw,i);return v.jsx(dR,{scope:i,forceMount:r,children:P.Children.map(s,f=>v.jsx(br,{present:r||p.open,children:v.jsx(yh,{asChild:!0,container:l,children:f})}))})},"DialogPortal"),ym="DialogOverlay",Cw=P.forwardRef(Pn(function(i,r){const s=Sw(ym,i.__scopeDialog),{forceMount:l=s.forceMount,...p}=i,f=Ci(ym,i.__scopeDialog);return f.modal?v.jsx(br,{present:l||f.open,children:v.jsx(pR,{...p,ref:r})}):null},"DialogOverlay")),fR=pr("DialogOverlay.RemoveScroll"),pR=P.forwardRef(Pn(function(i,r){const{__scopeDialog:s,...l}=i,p=Ci(ym,s),f=QS(),a=ut(r,f);return v.jsx(Sh,{as:fR,allowPinchZoom:!0,shards:P.useMemo(()=>[p.contentRef,...p.branchNodes.map(h=>({current:h}))],[p.contentRef,p.branchNodes]),children:v.jsx(wt.div,{"data-state":wh(p.open),...l,ref:a,style:{pointerEvents:"auto",...l.style}})})},"DialogOverlayImpl")),Ll="DialogContent",Ew=P.forwardRef(Pn(function(i,r){const s=Sw(Ll,i.__scopeDialog),{forceMount:l=s.forceMount,...p}=i,f=Ci(Ll,i.__scopeDialog);return v.jsx(br,{present:l||f.open,children:f.modal?v.jsx(mR,{...p,ref:r}):v.jsx(gR,{...p,ref:r})})},"DialogContent")),mR=P.forwardRef(Pn(function(i,r){const s=Ci(Ll,i.__scopeDialog),l=P.useRef(null),p=ut(r,s.contentRef,l);return P.useEffect(()=>{const f=l.current;if(f)return gg(f)},[]),v.jsx(kw,{...i,ref:p,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:tt(i.onCloseAutoFocus,f=>{var a;f.preventDefault(),(a=s.triggerRef.current)==null||a.focus()}),onPointerDownOutside:tt(i.onPointerDownOutside,f=>{const a=f.detail.originalEvent,h=a.button===0&&a.ctrlKey===!0;(a.button===2||h)&&f.preventDefault()}),onFocusOutside:tt(i.onFocusOutside,f=>f.preventDefault())})},"DialogContentModal")),gR=P.forwardRef(Pn(function(i,r){const s=Ci(Ll,i.__scopeDialog),l=P.useRef(!1),p=P.useRef(!1);return v.jsx(kw,{...i,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var a,h;(a=i.onCloseAutoFocus)==null||a.call(i,f),f.defaultPrevented||(l.current||(h=s.triggerRef.current)==null||h.focus(),f.preventDefault()),l.current=!1,p.current=!1},onInteractOutside:f=>{var d,m;(d=i.onInteractOutside)==null||d.call(i,f),f.defaultPrevented||(l.current=!0,f.detail.originalEvent.type==="pointerdown"&&(p.current=!0));const a=f.target;((m=s.triggerRef.current)==null?void 0:m.contains(a))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&p.current&&f.preventDefault()}})},"DialogContentNonModal")),kw=P.forwardRef(Pn(function(i,r){const{__scopeDialog:s,trapFocus:l,onOpenAutoFocus:p,onCloseAutoFocus:f,"aria-describedby":a,children:h,...d}=i,m=Ci(Ll,s);return Gl(),v.jsx(hg,{registry:m.branchRegistry,children:v.jsx(ug,{asChild:!0,loop:!0,trapped:l,branches:m.branchNodes,onMountAutoFocus:p,onUnmountAutoFocus:f,children:v.jsx(xh,{role:"dialog",id:m.contentId,"aria-labelledby":m.titlePresent?m.titleId:void 0,"aria-describedby":m.descriptionPresent?Lw(a,m.descriptionId):a,"data-state":wh(m.open),...d,ref:r,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1),children:h})})})},"DialogContentImpl")),Tw=P.forwardRef(Pn(function(i,r){const{__scopeDialog:s,...l}=i,p=Ci("DialogTitle",s),{setTitleCount:f}=p;return $t(()=>(f(a=>a+1),()=>f(a=>a-1)),[f]),v.jsx(wt.h2,{id:p.titleId,...l,ref:r})},"DialogTitle")),Rw=P.forwardRef(Pn(function(i,r){const{__scopeDialog:s,...l}=i,p=Ci("DialogDescription",s),{setDescriptionCount:f}=p;return $t(()=>(f(a=>a+1),()=>f(a=>a-1)),[f]),v.jsx(wt.p,{id:p.descriptionId,...l,ref:r})},"DialogDescription")),vR="DialogClose",Aw=P.forwardRef(Pn(function(i,r){const{__scopeDialog:s,...l}=i,p=Ci(vR,s);return v.jsx(wt.button,{type:"button",...l,ref:r,onClick:tt(i.onClick,()=>p.onOpenChange(!1))})},"DialogClose"));function Lw(...e){const i=new Set;for(const r of e)if(typeof r=="string")for(const s of String(r).trim().split(/\s+/))s&&i.add(s);return i.size>0?Array.from(i).join(" "):void 0}Pn(Lw,"concatAriaDescribedby");function wh(e){return e?"open":"closed"}Pn(wh,"getState");function Dw({open:e,onOpenChange:i,title:r,description:s,children:l,footer:p,headerAction:f,maxWidth:a="max-w-md",height:h,disableOutsideClose:d}){return v.jsx(yw,{open:e,onOpenChange:i,children:v.jsxs(ww,{children:[v.jsx(Cw,{className:"fixed inset-0 z-50 bg-foreground/40 animate-in fade-in-0"}),v.jsxs(Ew,{className:`fixed left-1/2 top-1/2 z-50 flex w-[calc(100%-1.5rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl bg-card shadow-xl focus:outline-none animate-in fade-in-0 zoom-in-95 sm:w-[calc(100%-2rem)] ${a} max-h-[calc(100dvh-1.5rem)] sm:max-h-[calc(100dvh-2rem)] ${h??""}`,onInteractOutside:d?m=>m.preventDefault():void 0,children:[v.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-3 px-4 py-4 sm:px-5",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx(Tw,{className:"text-sm font-semibold text-foreground",children:r}),s&&v.jsx(Rw,{className:"mt-0.5 truncate text-xs text-muted-foreground",title:s,children:s})]}),v.jsxs("div",{className:"mt-0.5 flex shrink-0 items-center gap-1",children:[f,v.jsx(Aw,{asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon","aria-label":"Close",children:v.jsx(Nn,{size:15})})})]})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pb-4 pt-1 sm:px-5",children:l}),p&&v.jsx("div",{className:"flex shrink-0 flex-wrap justify-end gap-2 border-t border-border px-4 pb-4 pt-3 sm:px-5",children:p})]})]})})}const Mw=P.createContext(null);function yy({children:e}){const[i,r]=P.useState(null),[s,l]=P.useState(!1),p=P.useRef(null),f=P.useCallback(d=>{var m;return(m=p.current)==null||m.call(p,!1),r(d),new Promise(c=>{p.current=c})},[]),a=d=>{var m;(m=p.current)==null||m.call(p,d),p.current=null,r(null),l(!1)},h=async()=>{if(!(i!=null&&i.run))return a(!0);l(!0);try{await i.run(),a(!0)}catch(d){we.getState().notify(d.message,"error"),l(!1)}};return v.jsxs(Mw.Provider,{value:f,children:[e,i&&v.jsx(Dw,{open:!0,onOpenChange:d=>!d&&!s&&a(!1),title:i.title,description:i.description,maxWidth:i.maxWidth??"max-w-md",disableOutsideClose:s,footer:v.jsxs(v.Fragment,{children:[v.jsx(ve,{disabled:s,onClick:()=>a(!1),children:"Cancel"}),v.jsx(ve,{variant:i.tone??"primary",disabled:s,onClick:()=>void h(),autoFocus:!0,children:s?"Working...":i.confirmLabel??"Confirm"})]}),children:i.body})]})}function mn(){const e=P.useContext(Mw);if(!e)throw new Error("useConfirm needs a ConfirmProvider above it.");return e}function Dl({text:e,className:i}){const[r,s]=P.useState(!1),l=async p=>{p.stopPropagation();try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),1500)}catch{}};return v.jsx("button",{onClick:l,title:`Copy: ${e}`,className:ye("shrink-0 rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",i),children:r?v.jsx(Il,{size:11,className:"text-severity-suggestion"}):v.jsx(gh,{size:11})})}function nn({icon:e,title:i,hint:r,variant:s="card",className:l}){return s==="inline"?v.jsx("div",{className:ye("px-2 py-3 text-xs text-muted-foreground",l),children:i}):v.jsxs("div",{className:ye("card flex flex-col items-center gap-1.5 p-8 text-center",l),children:[e&&v.jsx(e,{size:20,className:"text-muted-foreground/60"}),v.jsx("div",{className:"text-sm text-muted-foreground",children:i}),r&&v.jsx("div",{className:"max-w-sm text-xs text-muted-foreground/70",children:r})]})}const _R=["top","right","bottom","left"],cs=Math.min,hr=Math.max,nh=Math.round,Ou=Math.floor,dr=e=>({x:e,y:e}),xR={left:"right",right:"left",bottom:"top",top:"bottom"};function jw(e,i,r){return hr(e,cs(i,r))}function gr(e,i){return typeof e=="function"?e(i):e}function us(e){return e.split("-")[0]}function ga(e){return e.split("-")[1]}function _g(e){return e==="x"?"y":"x"}function xg(e){return e==="y"?"height":"width"}function zi(e){const i=e[0];return i==="t"||i==="b"?"y":"x"}function yg(e){return _g(zi(e))}function yR(e,i,r){r===void 0&&(r=!1);const s=ga(e),l=yg(e),p=xg(l);let f=l==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return i.reference[p]>i.floating[p]&&(f=ih(f)),[f,ih(f)]}function bR(e){const i=ih(e);return[bm(e),i,bm(i)]}function bm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const by=["left","right"],Sy=["right","left"],SR=["top","bottom"],wR=["bottom","top"];function CR(e,i,r){switch(e){case"top":case"bottom":return r?i?Sy:by:i?by:Sy;case"left":case"right":return i?SR:wR;default:return[]}}function ER(e,i,r,s){const l=ga(e);let p=CR(us(e),r==="start",s);return l&&(p=p.map(f=>f+"-"+l),i&&(p=p.concat(p.map(bm)))),p}function ih(e){const i=us(e);return xR[i]+e.slice(i.length)}function kR(e){var i,r,s,l;return{top:(i=e.top)!=null?i:0,right:(r=e.right)!=null?r:0,bottom:(s=e.bottom)!=null?s:0,left:(l=e.left)!=null?l:0}}function Ow(e){return typeof e!="number"?kR(e):{top:e,right:e,bottom:e,left:e}}function rh(e){const{x:i,y:r,width:s,height:l}=e;return{width:s,height:l,top:r,left:i,right:i+s,bottom:r+l,x:i,y:r}}function wy(e,i,r){let{reference:s,floating:l}=e;const p=zi(i),f=yg(i),a=xg(f),h=us(i),d=p==="y",m=s.x+s.width/2-l.width/2,c=s.y+s.height/2-l.height/2,_=s[a]/2-l[a]/2;let y;switch(h){case"top":y={x:m,y:s.y-l.height};break;case"bottom":y={x:m,y:s.y+s.height};break;case"right":y={x:s.x+s.width,y:c};break;case"left":y={x:s.x-l.width,y:c};break;default:y={x:s.x,y:s.y}}const E=ga(i);return E&&(y[f]+=_*(E==="end"?1:-1)*(r&&d?-1:1)),y}async function TR(e,i){var r;i===void 0&&(i={});const{x:s,y:l,platform:p,rects:f,elements:a,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:c="floating",altBoundary:_=!1,padding:y=0}=gr(i,e),E=Ow(y),g=a[_?c==="floating"?"reference":"floating":c],b=rh(await p.getClippingRect({element:(r=await(p.isElement==null?void 0:p.isElement(g)))==null||r?g:g.contextElement||await(p.getDocumentElement==null?void 0:p.getDocumentElement(a.floating)),boundary:d,rootBoundary:m,strategy:h})),w=c==="floating"?{x:s,y:l,width:f.floating.width,height:f.floating.height}:f.reference,x=await(p.getOffsetParent==null?void 0:p.getOffsetParent(a.floating)),T=await(p.isElement==null?void 0:p.isElement(x))&&await(p.getScale==null?void 0:p.getScale(x))||{x:1,y:1},D=rh(p.convertOffsetParentRelativeRectToViewportRelativeRect?await p.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:h}):w);return{top:(b.top-D.top+E.top)/T.y,bottom:(D.bottom-b.bottom+E.bottom)/T.y,left:(b.left-D.left+E.left)/T.x,right:(D.right-b.right+E.right)/T.x}}const RR=50,AR=async(e,i,r)=>{const{placement:s="bottom",strategy:l="absolute",middleware:p=[],platform:f}=r,a=f.detectOverflow?f:{...f,detectOverflow:TR},h=await(f.isRTL==null?void 0:f.isRTL(i));let d=await f.getElementRects({reference:e,floating:i,strategy:l}),{x:m,y:c}=wy(d,s,h),_=s,y=0;const E={};for(let S=0;S<p.length;S++){const g=p[S];if(!g)continue;const{name:b,fn:w}=g,{x,y:T,data:D,reset:R}=await w({x:m,y:c,initialPlacement:s,placement:_,strategy:l,middlewareData:E,rects:d,platform:a,elements:{reference:e,floating:i}});m=x??m,c=T??c,E[b]={...E[b],...D},R&&y<RR&&(y++,typeof R=="object"&&(R.placement&&(_=R.placement),R.rects&&(d=R.rects===!0?await f.getElementRects({reference:e,floating:i,strategy:l}):R.rects),{x:m,y:c}=wy(d,_,h)),S=-1)}return{x:m,y:c,placement:_,strategy:l,middlewareData:E}},LR=e=>({name:"arrow",options:e,async fn(i){const{x:r,y:s,placement:l,rects:p,platform:f,elements:a,middlewareData:h}=i,{element:d,padding:m=0}=gr(e,i)||{};if(d==null)return{};const c=Ow(m),_={x:r,y:s},y=yg(l),E=xg(y),S=await f.getDimensions(d),g=y==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",T=p.reference[E]+p.reference[y]-_[y]-p.floating[E],D=_[y]-p.reference[y],R=await(f.getOffsetParent==null?void 0:f.getOffsetParent(d));let L=R?R[x]:0;(!L||!await(f.isElement==null?void 0:f.isElement(R)))&&(L=a.floating[x]||p.floating[E]);const A=T/2-D/2,j=L/2-S[E]/2-1,M=cs(c[b],j),I=cs(c[w],j),B=L-S[E]-I,H=L/2-S[E]/2+A,U=jw(M,H,B),W=!h.arrow&&ga(l)!=null&&H!==U&&p.reference[E]/2-(H<M?M:I)-S[E]/2<0,Y=W?H<M?H-M:H-B:0;return{[y]:_[y]+Y,data:{[y]:U,centerOffset:H-U-Y,...W&&{alignmentOffset:Y}},reset:W}}}),DR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(i){var r,s;const{placement:l,middlewareData:p,rects:f,initialPlacement:a,platform:h,elements:d}=i,{mainAxis:m=!0,crossAxis:c=!0,fallbackPlacements:_,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,...g}=gr(e,i);if((r=p.arrow)!=null&&r.alignmentOffset)return{};const b=us(l),w=zi(a),x=us(a)===a,T=await(h.isRTL==null?void 0:h.isRTL(d.floating)),D=_||(x||!S?[ih(a)]:bR(a)),R=E!=="none";!_&&R&&D.push(...ER(a,S,E,T));const L=[a,...D],A=await h.detectOverflow(i,g),j=[];let M=((s=p.flip)==null?void 0:s.overflows)||[];if(m&&j.push(A[b]),c){const U=yR(l,f,T);j.push(A[U[0]],A[U[1]])}if(M=[...M,{placement:l,overflows:j}],!j.every(U=>U<=0)){var I,B;const U=(((I=p.flip)==null?void 0:I.index)||0)+1,W=L[U];if(W&&(!(c==="alignment"?w!==zi(W):!1)||M.every(K=>zi(K.placement)===w?K.overflows[0]>0:!0)))return{data:{index:U,overflows:M},reset:{placement:W}};let Y=(B=M.filter(Q=>Q.overflows[0]<=0).sort((Q,K)=>Q.overflows[1]-K.overflows[1])[0])==null?void 0:B.placement;if(!Y)switch(y){case"bestFit":{var H;const Q=(H=M.filter(K=>{if(R){const z=zi(K.placement);return z===w||z==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(z=>z>0).reduce((z,O)=>z+O,0)]).sort((K,z)=>K[1]-z[1])[0])==null?void 0:H[0];Q&&(Y=Q);break}case"initialPlacement":Y=a;break}if(l!==Y)return{reset:{placement:Y}}}return{}}}};function Cy(e,i){return{top:e.top-i.height,right:e.right-i.width,bottom:e.bottom-i.height,left:e.left-i.width}}function Ey(e){return _R.some(i=>e[i]>=0)}const MR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(i){const{rects:r,platform:s}=i,{strategy:l="referenceHidden",...p}=gr(e,i);switch(l){case"referenceHidden":{const f=await s.detectOverflow(i,{...p,elementContext:"reference"}),a=Cy(f,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ey(a)}}}case"escaped":{const f=await s.detectOverflow(i,{...p,altBoundary:!0}),a=Cy(f,r.floating);return{data:{escapedOffsets:a,escaped:Ey(a)}}}default:return{}}}}},Nw=new Set(["left","top"]);async function jR(e,i){const{placement:r,platform:s,elements:l}=e,p=await(s.isRTL==null?void 0:s.isRTL(l.floating)),f=us(r),a=ga(r),h=zi(r)==="y",d=Nw.has(f)?-1:1,m=p&&h?-1:1,c=gr(i,e);let{mainAxis:_,crossAxis:y,alignmentAxis:E}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof E=="number"&&(y=a==="end"?E*-1:E),h?{x:y*m,y:_*d}:{x:_*d,y:y*m}}const OR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(i){var r,s;const{x:l,y:p,placement:f,middlewareData:a}=i,h=await jR(i,e);return f===((r=a.offset)==null?void 0:r.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:l+h.x,y:p+h.y,data:{...h,placement:f}}}}},NR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(i){const{x:r,y:s,placement:l,platform:p}=i,{mainAxis:f=!0,crossAxis:a=!1,limiter:h={fn:w=>{let{x,y:T}=w;return{x,y:T}}},...d}=gr(e,i),m={x:r,y:s},c=await p.detectOverflow(i,d),_=zi(l),y=_g(_);let E=m[y],S=m[_];const g=(w,x)=>jw(x+c[w==="y"?"top":"left"],x,x-c[w==="y"?"bottom":"right"]);f&&(E=g(y,E)),a&&(S=g(_,S));const b=h.fn({...i,[y]:E,[_]:S});return{...b,data:{x:b.x-r,y:b.y-s,enabled:{[y]:f,[_]:a}}}}}},BR=function(e){return e===void 0&&(e={}),{options:e,fn(i){var r,s;const{x:l,y:p,placement:f,rects:a,middlewareData:h}=i,{offset:d=0,mainAxis:m=!0,crossAxis:c=!0}=gr(e,i),_={x:l,y:p},y=zi(f),E=_g(y);let S=_[E],g=_[y];const b=gr(d,i),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:(r=b.mainAxis)!=null?r:0,crossAxis:(s=b.crossAxis)!=null?s:0};if(m){const D=E==="y"?"height":"width",R=a.reference[E]-a.floating[D]+w.mainAxis,L=a.reference[E]+a.reference[D]-w.mainAxis;S<R?S=R:S>L&&(S=L)}if(c){var x,T;const D=E==="y"?"width":"height",R=Nw.has(us(f)),L=a.reference[y]-a.floating[D]+(R&&((x=h.offset)==null?void 0:x[y])||0)+(R?0:w.crossAxis),A=a.reference[y]+a.reference[D]+(R?0:((T=h.offset)==null?void 0:T[y])||0)-(R?w.crossAxis:0);g<L?g=L:g>A&&(g=A)}return{[E]:S,[y]:g}}}},PR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(i){const{placement:r,rects:s,platform:l,elements:p}=i,{apply:f=()=>{},...a}=gr(e,i),h=await l.detectOverflow(i,a),d=us(r),m=ga(r),c=zi(r)==="y",{width:_,height:y}=s.floating;let E,S;d==="top"||d==="bottom"?(E=d,S=m===(await(l.isRTL==null?void 0:l.isRTL(p.floating))?"start":"end")?"left":"right"):(S=d,E=m==="end"?"top":"bottom");const g=y-h.top-h.bottom,b=_-h.left-h.right,w=cs(y-h[E],g),x=cs(_-h[S],b),T=i.middlewareData.shift,D=!T;let R=w,L=x;T!=null&&T.enabled.x&&(L=b),T!=null&&T.enabled.y&&(R=g),D&&!m&&(c?L=_-2*hr(h.left,h.right):R=y-2*hr(h.top,h.bottom)),await f({...i,availableWidth:L,availableHeight:R});const A=await l.getDimensions(p.floating);return _!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Ch(){return typeof window<"u"}function va(e){return Bw(e)?(e.nodeName||"").toLowerCase():"#document"}function On(e){var i;return(e==null||(i=e.ownerDocument)==null?void 0:i.defaultView)||window}function Sr(e){var i;return(i=(Bw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:i.documentElement}function Bw(e){return Ch()?e instanceof Node||e instanceof On(e).Node:!1}function $i(e){return Ch()?e instanceof Element||e instanceof On(e).Element:!1}function fs(e){return Ch()?e instanceof HTMLElement||e instanceof On(e).HTMLElement:!1}function ky(e){return!Ch()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof On(e).ShadowRoot}function Eh(e){const{overflow:i,overflowX:r,overflowY:s,display:l}=qi(e);return/auto|scroll|overlay|hidden|clip/.test(i+s+r)&&l!=="inline"&&l!=="contents"}function IR(e){return/^(table|td|th)$/.test(va(e))}function kh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const zR=/transform|translate|scale|rotate|perspective|filter/,HR=/paint|layout|strict|content/,zs=e=>!!e&&e!=="none";let jp;function bg(e){const i=$i(e)?qi(e):e;return zs(i.transform)||zs(i.translate)||zs(i.scale)||zs(i.rotate)||zs(i.perspective)||!Sg()&&(zs(i.backdropFilter)||zs(i.filter))||zR.test(i.willChange||"")||HR.test(i.contain||"")}function FR(e){let i=Ws(e);for(;fs(i)&&!Ml(i);){if(bg(i))return i;if(kh(i))return null;i=Ws(i)}return null}function Sg(){return jp==null&&(jp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jp}function Ml(e){return/^(html|body|#document)$/.test(va(e))}function qi(e){return On(e).getComputedStyle(e)}function Th(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ws(e){if(va(e)==="html")return e;const i=e.assignedSlot||e.parentNode||ky(e)&&e.host||Sr(e);return ky(i)?i.host:i}function Pw(e){const i=Ws(e);return Ml(i)?(e.ownerDocument||e).body:fs(i)&&Eh(i)?i:Pw(i)}function jl(e,i,r){var s;i===void 0&&(i=[]),r===void 0&&(r=!0);const l=Pw(e),p=l===((s=e.ownerDocument)==null?void 0:s.body),f=On(l);if(p){const a=Sm(f);return i.concat(f,f.visualViewport||[],Eh(l)?l:[],a&&r?jl(a):[])}else return i.concat(l,jl(l,[],r))}function Sm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Iw(e){const i=qi(e);let r=parseFloat(i.width)||0,s=parseFloat(i.height)||0;const l=fs(e),p=l?e.offsetWidth:r,f=l?e.offsetHeight:s,a=nh(r)!==p||nh(s)!==f;return a&&(r=p,s=f),{width:r,height:s,$:a}}function wg(e){return $i(e)?e:e.contextElement}function ra(e){const i=wg(e);if(!fs(i))return dr(1);const r=i.getBoundingClientRect(),{width:s,height:l,$:p}=Iw(i);let f=(p?nh(r.width):r.width)/s,a=(p?nh(r.height):r.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!a||!Number.isFinite(a))&&(a=1),{x:f,y:a}}const UR=dr(0);function zw(e){const i=On(e);return!Sg()||!i.visualViewport?UR:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function $R(e,i,r){return i===void 0&&(i=!1),!!r&&i&&r===On(e)}function Gs(e,i,r,s){i===void 0&&(i=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),p=wg(e);let f=dr(1);i&&(s?$i(s)&&(f=ra(s)):f=ra(e));const a=$R(p,r,s)?zw(p):dr(0);let h=(l.left+a.x)/f.x,d=(l.top+a.y)/f.y,m=l.width/f.x,c=l.height/f.y;if(p&&s){const _=On(p),y=$i(s)?On(s):s;let E=_,S=Sm(E);for(;S&&y!==E;){const g=ra(S),b=S.getBoundingClientRect(),w=qi(S),x=b.left+(S.clientLeft+parseFloat(w.paddingLeft))*g.x,T=b.top+(S.clientTop+parseFloat(w.paddingTop))*g.y;h*=g.x,d*=g.y,m*=g.x,c*=g.y,h+=x,d+=T,E=On(S),S=Sm(E)}}return rh({width:m,height:c,x:h,y:d})}function Rh(e,i){const r=Th(e).scrollLeft;return i?i.left+r:Gs(Sr(e)).left+r}function Hw(e,i){const r=e.getBoundingClientRect(),s=r.left+i.scrollLeft-Rh(e,r),l=r.top+i.scrollTop;return{x:s,y:l}}function qR(e){let{elements:i,rect:r,offsetParent:s,strategy:l}=e;const p=l==="fixed",f=Sr(s),a=i?kh(i.floating):!1;if(s===f||a&&p)return r;let h={scrollLeft:0,scrollTop:0},d=dr(1);const m=dr(0),c=fs(s);if((c||!p)&&((va(s)!=="body"||Eh(f))&&(h=Th(s)),c)){const y=Gs(s);d=ra(s),m.x=y.x+s.clientLeft,m.y=y.y+s.clientTop}const _=f&&!c&&!p?Hw(f,h):dr(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-h.scrollLeft*d.x+m.x+_.x,y:r.y*d.y-h.scrollTop*d.y+m.y+_.y}}function VR(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function WR(e){const i=Th(e),r=e.ownerDocument.body,s=hr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),l=hr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let p=-i.scrollLeft+Rh(e);const f=-i.scrollTop;return qi(r).direction==="rtl"&&(p+=hr(e.clientWidth,r.clientWidth)-s),{width:s,height:l,x:p,y:f}}const GR=25;function YR(e,i,r){r===void 0&&(r="viewport");const s=r==="layoutViewport",l=On(e),p=Sr(e),f=l.visualViewport;let a=p.clientWidth,h=p.clientHeight,d=0,m=0;if(f){const _=!Sg()||i==="fixed";s?_||(d=-f.offsetLeft,m=-f.offsetTop):(a=f.width,h=f.height,_&&(d=f.offsetLeft,m=f.offsetTop))}if(Rh(p)<=0){const _=p.ownerDocument,y=_.body,E=getComputedStyle(y),S=_.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,g=Math.abs(p.clientWidth-y.clientWidth-S),b=getComputedStyle(p).scrollbarGutter==="stable both-edges"?g/2:g;b<=GR&&(a-=b)}return{width:a,height:h,x:d,y:m}}function XR(e,i){const r=Gs(e,!0,i==="fixed"),s=r.top+e.clientTop,l=r.left+e.clientLeft,p=ra(e),f=e.clientWidth*p.x,a=e.clientHeight*p.y,h=l*p.x,d=s*p.y;return{width:f,height:a,x:h,y:d}}function Ty(e,i,r){let s;if(i==="viewport"||i==="layoutViewport")s=YR(e,r,i);else if(i==="document")s=WR(Sr(e));else if($i(i))s=XR(i,r);else{const l=zw(e);s={x:i.x-l.x,y:i.y-l.y,width:i.width,height:i.height}}return rh(s)}function KR(e,i){const r=i.get(e);if(r)return r;let s=jl(e,[],!1).filter(a=>$i(a)&&va(a)!=="body"),l=null;const p=qi(e).position==="fixed";let f=p?Ws(e):e;for(;$i(f)&&!Ml(f);){const a=qi(f),h=bg(f),d=l?l.position:p?"fixed":"";!h&&(d==="fixed"||d==="absolute"&&a.position==="static")?s=s.filter(c=>c!==f):l=a,f=Ws(f)}return i.set(e,s),s}function QR(e){let{element:i,boundary:r,rootBoundary:s,strategy:l}=e;const f=[...r==="clippingAncestors"?kh(i)?[]:KR(i,this._c):[].concat(r),s],a=Ty(i,f[0],l);let h=a.top,d=a.right,m=a.bottom,c=a.left;for(let _=1;_<f.length;_++){const y=Ty(i,f[_],l);h=hr(y.top,h),d=cs(y.right,d),m=cs(y.bottom,m),c=hr(y.left,c)}return{width:d-c,height:m-h,x:c,y:h}}function ZR(e){const{width:i,height:r}=Iw(e);return{width:i,height:r}}function JR(e,i,r){const s=fs(i),l=Sr(i),p=r==="fixed",f=Gs(e,!0,p,i);let a={scrollLeft:0,scrollTop:0};const h=dr(0);if((s||!p)&&((va(i)!=="body"||Eh(l))&&(a=Th(i)),s)){const _=Gs(i,!0,p,i);h.x=_.x+i.clientLeft,h.y=_.y+i.clientTop}!s&&l&&(h.x=Rh(l));const d=l&&!s&&!p?Hw(l,a):dr(0),m=f.left+a.scrollLeft-h.x-d.x,c=f.top+a.scrollTop-h.y-d.y;return{x:m,y:c,width:f.width,height:f.height}}function Op(e){return qi(e).position==="static"}function Ry(e,i){if(!fs(e)||qi(e).position==="fixed")return null;if(i)return i(e);let r=e.offsetParent;return Sr(e)===r&&(r=r.ownerDocument.body),r}function Fw(e,i){const r=On(e);if(kh(e))return r;if(!fs(e)){let l=Ws(e);for(;l&&!Ml(l);){if($i(l)&&!Op(l))return l;l=Ws(l)}return r}let s=Ry(e,i);for(;s&&IR(s)&&Op(s);)s=Ry(s,i);return s&&Ml(s)&&Op(s)&&!bg(s)?r:s||FR(e)||r}const eA=async function(e){const i=this.getOffsetParent||Fw,r=this.getDimensions,s=await r(e.floating);return{reference:JR(e.reference,await i(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function tA(e){return qi(e).direction==="rtl"}const nA={convertOffsetParentRelativeRectToViewportRelativeRect:qR,getDocumentElement:Sr,getClippingRect:QR,getOffsetParent:Fw,getElementRects:eA,getClientRects:VR,getDimensions:ZR,getScale:ra,isElement:$i,isRTL:tA};function Uw(e,i){return e.x===i.x&&e.y===i.y&&e.width===i.width&&e.height===i.height}function iA(e,i,r){let s=null,l;const p=Sr(e);function f(){var m;clearTimeout(l),(m=s)==null||m.disconnect(),s=null}function a(m,c){m===void 0&&(m=!1),c===void 0&&(c=1),f();const _=e.getBoundingClientRect(),{left:y,top:E,width:S,height:g}=_;if(m||i(),!S||!g)return;const b=Ou(E),w=Ou(p.clientWidth-(y+S)),x=Ou(p.clientHeight-(E+g)),T=Ou(y),R={rootMargin:-b+"px "+-w+"px "+-x+"px "+-T+"px",threshold:hr(0,cs(1,c))||1};let L=!0;function A(j){const M=j[0].intersectionRatio;if(!Uw(_,e.getBoundingClientRect()))return a();if(M!==c){if(!L)return a();M?a(!1,M):l=setTimeout(()=>{a(!1,1e-7)},1e3)}L=!1}try{s=new IntersectionObserver(A,{...R,root:p.ownerDocument})}catch{s=new IntersectionObserver(A,R)}s.observe(e)}const h=On(e),d=()=>a(r);return h.addEventListener("resize",d),a(!0),()=>{h.removeEventListener("resize",d),f()}}function rA(e,i,r,s){s===void 0&&(s={});const{ancestorScroll:l=!0,ancestorResize:p=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,d=wg(e),m=l||p?[...d?jl(d):[],...i?jl(i):[]]:[];m.forEach(b=>{l&&b.addEventListener("scroll",r),p&&b.addEventListener("resize",r)});const c=d&&a?iA(d,r,p):null;let _=-1,y=null;f&&(y=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&y&&i&&(y.unobserve(i),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var x;(x=y)==null||x.observe(i)})),r()}),d&&!h&&y.observe(d),i&&y.observe(i));let E,S=h?Gs(e):null;h&&g();function g(){const b=Gs(e);S&&!Uw(S,b)&&r(),S=b,E=requestAnimationFrame(g)}return r(),()=>{var b;m.forEach(w=>{l&&w.removeEventListener("scroll",r),p&&w.removeEventListener("resize",r)}),c==null||c(),(b=y)==null||b.disconnect(),y=null,h&&cancelAnimationFrame(E)}}const sA=OR,oA=NR,aA=DR,lA=PR,cA=MR,Ay=LR,uA=BR,hA=(e,i,r)=>{const s=new Map,l=r??{},p={...nA,...l.platform,_c:s};return AR(e,i,{...l,platform:p})};var dA=typeof document<"u",fA=function(){},Wu=dA?P.useLayoutEffect:fA;function sh(e,i){if(e===i)return!0;if(typeof e!=typeof i)return!1;if(typeof e=="function"&&e.toString()===i.toString())return!0;let r,s,l;if(e&&i&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==i.length)return!1;for(s=r;s--!==0;)if(!sh(e[s],i[s]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(i).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(i,l[s]))return!1;for(s=r;s--!==0;){const p=l[s];if(!(p==="_owner"&&e.$$typeof)&&!sh(e[p],i[p]))return!1}return!0}return e!==e&&i!==i}function $w(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ly(e,i){const r=$w(e);return Math.round(i*r)/r}function Np(e){const i=P.useRef(e);return Wu(()=>{i.current=e}),i}function pA(e){e===void 0&&(e={});const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:l,elements:{reference:p,floating:f}={},transform:a=!0,whileElementsMounted:h,open:d}=e,[m,c]=P.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[_,y]=P.useState(s);sh(_,s)||y(s);const[E,S]=P.useState(null),[g,b]=P.useState(null),w=P.useCallback(K=>{K!==R.current&&(R.current=K,S(K))},[]),x=P.useCallback(K=>{K!==L.current&&(L.current=K,b(K))},[]),T=p||E,D=f||g,R=P.useRef(null),L=P.useRef(null),A=P.useRef(m),j=h!=null,M=Np(h),I=Np(l),B=Np(d),H=P.useCallback(()=>{if(!R.current||!L.current)return;const K={placement:i,strategy:r,middleware:_};I.current&&(K.platform=I.current),hA(R.current,L.current,K).then(z=>{const O={...z,isPositioned:B.current!==!1};U.current&&!sh(A.current,O)&&(A.current=O,Wl.flushSync(()=>{c(O)}))})},[_,i,r,I,B]);Wu(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,c(K=>({...K,isPositioned:!1})))},[d]);const U=P.useRef(!1);Wu(()=>(U.current=!0,()=>{U.current=!1}),[]),Wu(()=>{if(T&&(R.current=T),D&&(L.current=D),T&&D){if(M.current)return M.current(T,D,H);H()}},[T,D,H,M,j]);const W=P.useMemo(()=>({reference:R,floating:L,setReference:w,setFloating:x}),[w,x]),Y=P.useMemo(()=>({reference:T,floating:D}),[T,D]),Q=P.useMemo(()=>{const K={position:r,left:0,top:0};if(!Y.floating)return K;const z=Ly(Y.floating,m.x),O=Ly(Y.floating,m.y);return a?{...K,transform:"translate("+z+"px, "+O+"px)",...$w(Y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:O}},[r,a,Y.floating,m.x,m.y]);return P.useMemo(()=>({...m,update:H,refs:W,elements:Y,floatingStyles:Q}),[m,H,W,Y,Q])}const mA=e=>{function i(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:s,padding:l}=typeof e=="function"?e(r):e;return s&&i(s)?s.current!=null?Ay({element:s.current,padding:l}).fn(r):{}:s?Ay({element:s,padding:l}).fn(r):{}}}},gA=(e,i)=>{const r=sA(e);return{name:r.name,fn:r.fn,options:[e,i]}},vA=(e,i)=>{const r=oA(e);return{name:r.name,fn:r.fn,options:[e,i]}},_A=(e,i)=>({fn:uA(e).fn,options:[e,i]}),xA=(e,i)=>{const r=aA(e);return{name:r.name,fn:r.fn,options:[e,i]}},yA=(e,i)=>{const r=lA(e);return{name:r.name,fn:r.fn,options:[e,i]}},bA=(e,i)=>{const r=cA(e);return{name:r.name,fn:r.fn,options:[e,i]}},SA=(e,i)=>{const r=mA(e);return{name:r.name,fn:r.fn,options:[e,i]}};var wA=Object.defineProperty,CA=(e,i)=>wA(e,"name",{value:i,configurable:!0}),EA=P.forwardRef(CA(function(i,r){const{children:s,width:l=10,height:p=5,...f}=i;return v.jsx(wt.svg,{...f,ref:r,width:l,height:p,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:i.asChild?s:v.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),kA=Object.defineProperty,TA=(e,i)=>kA(e,"name",{value:i,configurable:!0});function Cg(e){const[i,r]=P.useState(void 0);return $t(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let s=0;const l=new ResizeObserver(p=>{if(!Array.isArray(p)||!p.length)return;const f=p[0];window.cancelAnimationFrame(s),s=window.requestAnimationFrame(()=>{let a,h;if("borderBoxSize"in f){const d=f.borderBoxSize,m=Array.isArray(d)?d[0]:d;a=m.inlineSize,h=m.blockSize}else a=e.offsetWidth,h=e.offsetHeight;r({width:a,height:h})})});return l.observe(e,{box:"border-box"}),()=>{window.cancelAnimationFrame(s),l.unobserve(e)}}else r(void 0)},[e]),i}TA(Cg,"useSize");var RA=Object.defineProperty,fr=(e,i)=>RA(e,"name",{value:i,configurable:!0}),Dy={Partial:"partial"},My={Optimized:"optimized",Always:"always"},qw="Popper",[Vw,_a]=yr(qw),[AA,Ww]=Vw(qw),Eg=fr(e=>{const{__scopePopper:i,children:r}=e,[s,l]=P.useState(null),[p,f]=P.useState(void 0);return v.jsx(AA,{scope:i,anchor:s,onAnchorChange:l,placementState:p,setPlacementState:f,children:r})},"Popper"),LA="PopperAnchor",kg=P.forwardRef(fr(function(i,r){const{__scopePopper:s,virtualRef:l,...p}=i,f=Ww(LA,s),a=P.useRef(null),h=f.onAnchorChange,d=P.useCallback(S=>{a.current=S,S&&h(S)},[h]),m=ut(r,d),c=P.useRef(null);P.useEffect(()=>{if(!l)return;const S=c.current;c.current=l.current,S!==c.current&&h(c.current)});const _=f.placementState&&Ah(f.placementState),y=_==null?void 0:_[0],E=_==null?void 0:_[1];return l?null:v.jsx(wt.div,{"data-radix-popper-side":y,"data-radix-popper-align":E,...p,ref:m})},"PopperAnchor")),Gw="PopperContent",[DA,MA]=Vw(Gw),Tg=P.forwardRef(fr(function(i,r){var oe,ee,ue,he,Se,be,Re;const{__scopePopper:s,side:l="bottom",sideOffset:p=0,align:f="center",alignOffset:a=0,arrowPadding:h=0,avoidCollisions:d=!0,collisionBoundary:m=[],collisionPadding:c=0,sticky:_=Dy.Partial,hideWhenDetached:y=!1,updatePositionStrategy:E=My.Optimized,onPlaced:S,...g}=i,b=Ww(Gw,s),[w,x]=P.useState(null),T=ut(r,x),[D,R]=P.useState(null),L=Cg(D),A=(L==null?void 0:L.width)??0,j=(L==null?void 0:L.height)??0,M=l+(f!=="center"?"-"+f:""),I=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},B=Array.isArray(m)?m:[m],H=B.length>0,U={padding:I,boundary:B.filter(Yw),altBoundary:H},{refs:W,floatingStyles:Y,placement:Q,isPositioned:K,middlewareData:z}=pA({strategy:"fixed",placement:M,whileElementsMounted:fr((...qe)=>rA(...qe,{animationFrame:E===My.Always}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[gA({mainAxis:p+j,alignmentAxis:a}),d&&vA({mainAxis:!0,crossAxis:!1,..._===Dy.Partial?{limiter:_A()}:{},...U}),d&&xA({...U}),yA({...U,apply:fr(({elements:qe,rects:Ee,availableWidth:ze,availableHeight:Mt})=>{const{width:$e,height:Be}=Ee.reference,Ie=qe.floating.style;Ie.setProperty("--radix-popper-available-width",`${ze}px`),Ie.setProperty("--radix-popper-available-height",`${Mt}px`),Ie.setProperty("--radix-popper-anchor-width",`${$e}px`),Ie.setProperty("--radix-popper-anchor-height",`${Be}px`)},"apply")}),D&&SA({element:D,padding:h}),BA({arrowWidth:A,arrowHeight:j}),y&&bA(H?{strategy:"referenceHidden",...U}:{strategy:"referenceHidden",padding:U.padding,altBoundary:U.altBoundary})]}),O=b.setPlacementState;$t(()=>(O(Q),()=>{O(void 0)}),[Q,O]);const[G,Z]=Ah(Q),F=Ui(S);$t(()=>{K&&(F==null||F())},[K,F]);const V=(oe=z.arrow)==null?void 0:oe.x,ne=(ee=z.arrow)==null?void 0:ee.y,le=((ue=z.arrow)==null?void 0:ue.centerOffset)!==0,[X,$]=P.useState();return $t(()=>{w&&$(window.getComputedStyle(w).zIndex)},[w]),v.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:K?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(he=z.transformOrigin)==null?void 0:he.x,(Se=z.transformOrigin)==null?void 0:Se.y].join(" "),...((be=z.hide)==null?void 0:be.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:i.dir,children:v.jsx(DA,{scope:s,placedSide:G,placedAlign:Z,onArrowChange:R,arrowX:V,arrowY:ne,shouldHideArrow:le,children:v.jsx(wt.div,{"data-side":G,"data-align":Z,...g,ref:T,style:{...g.style,animation:K?(Re=g.style)==null?void 0:Re.animation:"none"}})})})},"PopperContent")),jA="PopperArrow",OA={top:"bottom",right:"left",bottom:"top",left:"right"},NA=P.forwardRef(fr(function(i,r){const{__scopePopper:s,...l}=i,p=MA(jA,s),f=OA[p.placedSide];return v.jsx("span",{ref:p.onArrowChange,style:{position:"absolute",left:p.arrowX,top:p.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[p.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[p.placedSide],visibility:p.shouldHideArrow?"hidden":void 0},children:v.jsx(EA,{...l,ref:r,style:{...l.style,display:"block"}})})},"PopperArrow"));function Yw(e){return e!==null}fr(Yw,"isNotNull");var BA=fr(e=>({name:"transformOrigin",options:e,fn(i){var g,b,w;const{placement:r,rects:s,middlewareData:l}=i,f=((g=l.arrow)==null?void 0:g.centerOffset)!==0,a=f?0:e.arrowWidth,h=f?0:e.arrowHeight,[d,m]=Ah(r),c={start:"0%",center:"50%",end:"100%"}[m],_=(((b=l.arrow)==null?void 0:b.x)??0)+a/2,y=(((w=l.arrow)==null?void 0:w.y)??0)+h/2;let E="",S="";return d==="bottom"?(E=f?c:`${_}px`,S=`${-h}px`):d==="top"?(E=f?c:`${_}px`,S=`${s.floating.height+h}px`):d==="right"?(E=`${-h}px`,S=f?c:`${y}px`):d==="left"&&(E=`${s.floating.width+h}px`,S=f?c:`${y}px`),{data:{x:E,y:S}}}}),"transformOrigin");function Ah(e){const[i,r="center"]=e.split("-");return[i,r]}fr(Ah,"getSideAndAlignFromPlacement");var PA=Object.defineProperty,wr=(e,i)=>PA(e,"name",{value:i,configurable:!0}),Rg="Popover",[Xw,V9]=yr(Rg,[_a]),Ag=_a(),[IA,xa]=Xw(Rg),zA=wr(e=>{const{__scopePopover:i,children:r,open:s,defaultOpen:l,onOpenChange:p,modal:f=!1}=e,a=Ag(i),h=P.useRef(null),[d,m]=P.useState(!1),[c,_]=P.useState(0),[y,E]=P.useState(0),[S,g]=Vs({prop:s,defaultProp:l??!1,onChange:p,caller:Rg});return v.jsx(Eg,{...a,children:v.jsx(IA,{scope:i,contentId:Fi(),titleId:Fi(),descriptionId:Fi(),titlePresent:c>0,descriptionPresent:y>0,setTitleCount:_,setDescriptionCount:E,triggerRef:h,open:S,onOpenChange:g,onOpenToggle:P.useCallback(()=>g(b=>!b),[g]),hasCustomAnchor:d,onCustomAnchorAdd:P.useCallback(()=>m(!0),[]),onCustomAnchorRemove:P.useCallback(()=>m(!1),[]),modal:f,children:r})})},"Popover"),HA="PopoverTrigger",FA=P.forwardRef(wr(function(i,r){const{__scopePopover:s,...l}=i,p=xa(HA,s),f=Ag(s),a=ut(r,p.triggerRef),h=v.jsx(wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":p.open,"aria-controls":p.open?p.contentId:void 0,"data-state":Lg(p.open),...l,ref:a,onClick:tt(i.onClick,p.onOpenToggle)});return p.hasCustomAnchor?h:v.jsx(kg,{asChild:!0,...f,children:h})},"PopoverTrigger")),Kw="PopoverPortal",[UA,$A]=Xw(Kw,{forceMount:void 0}),qA=wr(e=>{const{__scopePopover:i,forceMount:r,children:s,container:l}=e,p=xa(Kw,i);return v.jsx(UA,{scope:i,forceMount:r,children:v.jsx(br,{present:r||p.open,children:v.jsx(yh,{asChild:!0,container:l,children:s})})})},"PopoverPortal"),Ol="PopoverContent",VA=P.forwardRef(wr(function(i,r){const s=$A(Ol,i.__scopePopover),{forceMount:l=s.forceMount,...p}=i,f=xa(Ol,i.__scopePopover);return v.jsx(br,{present:l||f.open,children:f.modal?v.jsx(GA,{...p,ref:r}):v.jsx(YA,{...p,ref:r})})},"PopoverContent")),WA=pr("PopoverContent.RemoveScroll"),GA=P.forwardRef(wr(function(i,r){const s=xa(Ol,i.__scopePopover),l=P.useRef(null),p=ut(r,l),f=P.useRef(!1),{nodes:a,registry:h}=dg();return P.useEffect(()=>{const d=l.current;if(d)return gg(d)},[]),v.jsx(Sh,{as:WA,allowPinchZoom:!0,shards:P.useMemo(()=>[l,...a.map(d=>({current:d}))],[l,a]),children:v.jsx(Qw,{...i,ref:p,branchNodes:a,branchRegistry:h,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tt(i.onCloseAutoFocus,d=>{var m;d.preventDefault(),f.current||(m=s.triggerRef.current)==null||m.focus()}),onPointerDownOutside:tt(i.onPointerDownOutside,d=>{const m=d.detail.originalEvent,c=m.button===0&&m.ctrlKey===!0,_=m.button===2||c;f.current=_},{checkForDefaultPrevented:!1}),onFocusOutside:tt(i.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),YA=P.forwardRef(wr(function(i,r){const s=xa(Ol,i.__scopePopover),l=P.useRef(!1),p=P.useRef(!1);return v.jsx(Qw,{...i,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var a,h;(a=i.onCloseAutoFocus)==null||a.call(i,f),f.defaultPrevented||(l.current||(h=s.triggerRef.current)==null||h.focus(),f.preventDefault()),l.current=!1,p.current=!1},onInteractOutside:f=>{var d,m;(d=i.onInteractOutside)==null||d.call(i,f),f.defaultPrevented||(l.current=!0,f.detail.originalEvent.type==="pointerdown"&&(p.current=!0));const a=f.target;((m=s.triggerRef.current)==null?void 0:m.contains(a))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&p.current&&f.preventDefault()}})},"PopoverContentNonModal")),Qw=P.forwardRef(wr(function(i,r){const{__scopePopover:s,trapFocus:l,onOpenAutoFocus:p,onCloseAutoFocus:f,disableOutsidePointerEvents:a,onEscapeKeyDown:h,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:c,"aria-describedby":_,branchNodes:y,branchRegistry:E,...S}=i,g=xa(Ol,s),b=Ag(s),[w,x]=P.useState(null),T=ut(r,x);return fg(w),Gl(),v.jsx(hg,{registry:E,children:v.jsx(ug,{asChild:!0,loop:!0,trapped:l,branches:y,onMountAutoFocus:p,onUnmountAutoFocus:f,children:v.jsx(xh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:h,onPointerDownOutside:d,onFocusOutside:m,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:v.jsx(Tg,{"data-state":Lg(g.open),role:"dialog",id:g.contentId,"aria-labelledby":g.titlePresent?g.titleId:void 0,"aria-describedby":g.descriptionPresent?Zw(_,g.descriptionId):_,...b,...S,ref:T,style:{...S.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})},"PopoverContentImpl"));function Lg(e){return e?"open":"closed"}wr(Lg,"getState");function Zw(...e){const i=new Set;for(const r of e)if(typeof r=="string")for(const s of String(r).trim().split(/\s+/))s&&i.add(s);return i.size>0?Array.from(i).join(" "):void 0}wr(Zw,"concatAriaDescribedby");function Jw({trigger:e,children:i,side:r="bottom",align:s="start",className:l,open:p,onOpenChange:f}){return v.jsxs(zA,{open:p,onOpenChange:f,children:[v.jsx(FA,{asChild:!0,children:e}),v.jsx(qA,{children:v.jsx(VA,{side:r,align:s,sideOffset:6,collisionPadding:8,className:ye("z-50 rounded-lg border bg-card p-3 shadow-lg focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",l),children:i})})]})}const XA={on:"bg-foreground text-background",off:"bg-muted text-muted-foreground",critical:"bg-severity-critical text-primary-foreground",warning:"bg-severity-warning text-background",suggestion:"bg-severity-suggestion text-background",success:"bg-success text-success-foreground"};function nt({tone:e="on",icon:i,children:r,className:s,title:l}){return v.jsxs("span",{title:l,className:ye("inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium",XA[e],s),children:[i&&v.jsx(i,{className:"h-2.5 w-2.5"}),r]})}const jy="clauder-hub:automation-tab";function KA(){var h,d,m,c;const e=mt(()=>_e.jobs(),["jobs"]),i=mt(()=>_e.runs(),["runs"]),{starting:r,start:s}=Ks(),[l,p]=P.useState(()=>{try{return localStorage.getItem(jy)==="queue"?"queue":"jobs"}catch{return"jobs"}}),f=_=>{p(_);try{localStorage.setItem(jy,_)}catch{}},a=(i.data??[]).filter(_=>_.status==="queued"||_.status==="running").length;return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"space-y-4 p-5",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Operation"}),v.jsx("h1",{className:"text-base font-semibold",children:"Automation"}),v.jsx("p",{className:"truncate text-xs text-muted-foreground",title:"Cron and webhook runs, one session at a time, while the hub runs.",children:"Cron and webhook runs, one session at a time, while the hub runs."})]}),v.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[v.jsxs(ve,{disabled:r,onClick:()=>void s("queue-run"),title:"Opens a Claude session to queue a run",children:[v.jsx(la,{size:12})," Queue a run"]}),v.jsxs(ve,{variant:"primary",disabled:r,onClick:()=>void s("create-job"),title:"Opens a Claude session to create a job",children:[v.jsx(fi,{size:12})," New job"]})]})]}),v.jsx("div",{className:"no-scrollbar flex gap-1 overflow-x-auto border-b",children:[["jobs","Jobs",((h=e.data)==null?void 0:h.length)??0,"Every job of this project"],["queue","Queue",((d=i.data)==null?void 0:d.length)??0,a?`${a} waiting or running now`:"Nothing waiting or running now"]].map(([_,y,E,S])=>v.jsxs("button",{onClick:()=>f(_),title:S,className:ye("flex shrink-0 items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-xs transition-colors",l===_?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:[y,v.jsx("span",{className:ye("grid h-4 min-w-[1rem] place-items-center rounded-full px-1 text-[10px] font-semibold leading-none tabular-nums",_==="queue"&&a>0?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:E})]},_))}),l==="jobs"?(m=e.data)!=null&&m.length?v.jsx("div",{className:"divide-y rounded-md border",children:e.data.map(_=>v.jsx(QA,{job:_,onEdit:()=>void s("edit-job",_.id)},_.id))}):v.jsx(nn,{variant:"inline",title:"No jobs yet. A cron job runs a prompt on a schedule; a manual / webhook job runs when you press Run, type /job in a channel, or something calls its URL."}):(c=i.data)!=null&&c.length?v.jsx(e6,{runs:i.data}):v.jsx(nn,{variant:"inline",title:"Nothing has run yet."})]})})}function QA({job:e,onEdit:i}){const r=mn(),l=`curl -X POST "${`${location.origin}${Hi()}/trigger/${e.id}`}" -H "x-clauder-token: ${e.token}" -H "content-type: application/json" -d "{\\"issue\\":\\"ABC-123\\"}"`;return v.jsxs("div",{className:"px-3 py-2.5",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[e.kind==="cron"?v.jsx(mh,{size:14,className:"shrink-0 text-muted-foreground"}):v.jsx(SS,{size:14,className:"shrink-0 text-muted-foreground"}),v.jsx("span",{className:"min-w-0 truncate text-xs font-medium",children:e.name}),!e.enabled&&v.jsx(nt,{tone:"off",children:"disabled"}),v.jsx(nt,{tone:"off",title:e.kind==="cron"?"Runs on its schedule while the hub runs, and whenever it is run by hand":"No schedule: runs when you press Run, type /job in a channel, or something calls its URL",children:e.kind==="cron"?"cron":"manual / webhook"}),v.jsx(nt,{tone:"off",children:e.category||"no category"}),v.jsx(ZA,{job:e,curl:l}),v.jsxs("span",{className:"ml-auto flex gap-1",children:[v.jsx(ve,{variant:"ghost",size:"icon",title:"Run now",onClick:()=>void r({title:`Run '${e.name}' now?`,description:"Joins the queue as an unattended session.",body:v.jsx("pre",{className:"max-h-48 overflow-auto whitespace-pre-wrap rounded bg-muted p-2 text-[11px]",children:e.prompt}),confirmLabel:"Queue it",run:async()=>{await _e.runJob(e.id),we.getState().notify("Queued.")}}),children:v.jsx(la,{size:13})}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Edit with Claude",onClick:i,children:v.jsx(_r,{size:13})}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Delete",onClick:()=>void r({title:`Delete the job '${e.name}'?`,description:"Its schedule or webhook stops. Past runs stay.",confirmLabel:"Delete",tone:"destructive",run:()=>_e.deleteJob(e.id)}),children:v.jsx(xr,{size:13})})]})]}),v.jsx("div",{className:"mt-1 line-clamp-2 break-words pl-6 text-[11px] text-muted-foreground",children:e.prompt}),v.jsxs("div",{className:"mt-1 flex flex-wrap gap-3 pl-6 text-[11px] text-muted-foreground",children:[e.kind==="cron"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"font-mono",children:e.schedule}),v.jsxs("span",{children:["next: ",e.nextRunAt?qs(e.nextRunAt):"-"]})]}):v.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[v.jsxs("span",{className:"break-all font-mono",children:["POST ",Hi(),"/trigger/",e.id]}),v.jsx(Dl,{text:l}),v.jsx("span",{children:"copy curl"}),v.jsx(ve,{variant:"ghost",size:"icon",title:"New token",onClick:()=>void r({title:"Issue a new token?",description:"Callers using the old token stop working.",confirmLabel:"Issue new token",tone:"destructive",run:()=>_e.rotateJobToken(e.id)}),children:v.jsx(vh,{size:11})})]}),v.jsxs("span",{children:["last run: ",e.lastRunAt?$l(e.lastRunAt):"never"]})]})]})}function ZA({job:e,curl:i}){const r=`curl -X POST "http://127.0.0.1:${location.port||80}${Hi()}/jobs/${e.id}/run" -H "content-type: application/json" -d "{}"`;return v.jsxs(Jw,{align:"start",className:"w-[30rem] max-w-[calc(100vw-1rem)] space-y-2.5 text-[11px]",trigger:v.jsxs("button",{className:"flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted hover:text-foreground",title:"Every way to start this job",children:[v.jsx(dS,{size:11})," How to run"]}),children:[v.jsxs("div",{className:"text-xs font-semibold",children:["How to run ‘",e.name,"’"]}),e.kind==="cron"?v.jsxs(Ko,{title:"On its schedule",children:[v.jsx("span",{className:"font-mono",children:e.schedule}),", next ",e.nextRunAt?qs(e.nextRunAt):"-",", while the hub runs",e.enabled?"":" (disabled now)","."]}):v.jsx(Ko,{title:"No schedule",children:"It runs only when started one of the ways below."}),v.jsxs(Ko,{title:"From this page",children:["Press ",v.jsx(la,{size:11,className:"inline"})," Run. It asks first, then joins the project’s queue (one run at a time). In the queue below, ",v.jsx(_h,{size:10,className:"inline"})," stops a running run and ",v.jsx(xS,{size:10,className:"inline"})," resumes a stopped one where it left off."]}),v.jsxs(Ko,{title:"From a channel",children:[v.jsxs("span",{className:"font-mono",children:["/job ",e.name]})," on Telegram (",v.jsx("span",{className:"font-mono",children:"!job"})," on Slack), or ",v.jsx("span",{className:"font-mono",children:"/jobs"})," and pick it. It asks before it queues. ",v.jsx("span",{className:"font-mono",children:"/stop"})," stops it, ",v.jsx("span",{className:"font-mono",children:"/resume"})," carries it on."]}),e.kind==="webhook"&&v.jsxs(Ko,{title:"From another tool (webhook)",children:[v.jsxs("span",{className:"flex items-center gap-1",children:[v.jsxs("span",{className:"min-w-0 break-all font-mono",children:["POST ",Hi(),"/trigger/",e.id]}),v.jsx(Dl,{text:i})]}),"With the header ",v.jsx("span",{className:"font-mono",children:"x-clauder-token"})," (the job’s token, in the copied curl; renew it with ",v.jsx(vh,{size:10,className:"inline"})," on the row). The JSON body reaches the prompt as ",v.jsx("span",{className:"font-mono",children:"{{payload}}"})," or ",v.jsx("span",{className:"font-mono",children:"{{payload.field}}"}),"."]}),v.jsxs(Ko,{title:"From an app on this machine",children:[v.jsxs("span",{className:"flex items-center gap-1",children:[v.jsxs("span",{className:"min-w-0 break-all font-mono",children:["POST ",Hi(),"/jobs/",e.id,"/run"]}),v.jsx(Dl,{text:r})]}),"No token: the hub only listens on 127.0.0.1. An optional ",v.jsx("span",{className:"font-mono",children:'{"payload": {...}}'})," body fills the prompt as above."]})]})}function Ko({title:e,children:i}){return v.jsxs("div",{children:[v.jsx("div",{className:"font-medium text-foreground",children:e}),v.jsx("div",{className:"text-muted-foreground",children:i})]})}const JA={queued:"off",running:"warning",done:"success",exited:"off",cancelled:"off"};function e6({runs:e}){const i=we(l=>l.go),r=mn(),s=l=>l.jobName??l.prompt.slice(0,60);return v.jsx("div",{className:"divide-y rounded-md border",children:e.map(l=>v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-xs",children:[v.jsx(nt,{tone:JA[l.status],children:l.status}),l.resume&&v.jsx(nt,{tone:"off",title:"Queued again to carry on its own session",children:"resumed"}),v.jsx("span",{className:"hidden w-16 shrink-0 text-[11px] text-muted-foreground sm:block",children:l.source}),v.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l.jobName&&v.jsxs("span",{className:"font-medium",children:[l.jobName,": "]}),v.jsx("span",{className:"text-muted-foreground",children:l.prompt})]}),v.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:$l(l.createdAt)}),l.sessionId&&v.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>i({kind:"session",id:l.sessionId}),children:"Open"}),l.status==="running"&&l.sessionId&&v.jsx(ve,{variant:"ghost",size:"icon",title:"Stop",onClick:()=>void r({title:`Stop '${s(l)}'?`,description:"Its terminal closes and the queue moves on. The conversation is kept: Resume carries on from where it stopped.",confirmLabel:"Stop",tone:"destructive",run:()=>_e.stopRun(l.id)}),children:v.jsx(_h,{size:13})}),l.status==="exited"&&l.sessionId&&v.jsx(ve,{variant:"ghost",size:"icon",title:"Resume",onClick:()=>void r({title:`Resume '${s(l)}'?`,description:"Joins the back of the queue as an unattended run and carries on its own conversation from where it stopped.",confirmLabel:"Queue it",run:async()=>{const{position:p}=await _e.resumeRun(l.id);we.getState().notify(`Queued, number ${p} in line.`)}}),children:v.jsx(xS,{size:13})}),l.status==="queued"&&v.jsx(ve,{variant:"ghost",size:"icon",title:"Cancel",onClick:()=>void at(()=>_e.cancelRun(l.id)),children:v.jsx(Nn,{size:13})})]},l.id))})}function rs({label:e,value:i,hint:r}){return v.jsxs("div",{className:"card px-3 py-2.5",title:r,children:[v.jsx("div",{className:"text-[11px] text-muted-foreground",children:e}),v.jsx("div",{className:"mt-0.5 text-lg font-semibold tabular-nums",children:i})]})}function eC({tokens:e}){return v.jsxs("div",{className:"grid grid-cols-2 gap-2 md:grid-cols-4",children:[v.jsx(rs,{label:"Input",value:jn(e.input),hint:`${e.input.toLocaleString()} uncached input tokens`}),v.jsx(rs,{label:"Output",value:jn(e.output),hint:`${e.output.toLocaleString()} output tokens`}),v.jsx(rs,{label:"Cache read",value:jn(e.cacheRead),hint:`${e.cacheRead.toLocaleString()} tokens read from the prompt cache`}),v.jsx(rs,{label:"Cache write",value:jn(e.cacheCreation),hint:`${e.cacheCreation.toLocaleString()} tokens written to the prompt cache`})]})}function os({rows:e,empty:i="Nothing yet.",limit:r=12,format:s=jn}){const[l,p]=P.useState(!1);if(!e.length)return v.jsx("div",{className:"px-1 py-2 text-xs text-muted-foreground",children:i});const f=[...e].sort((d,m)=>m.value-d.value),a=l?f:f.slice(0,r),h=Math.max(...f.map(d=>d.value),1);return v.jsxs("div",{className:"space-y-1.5",children:[a.map(d=>v.jsxs("div",{className:"group",title:`${d.label}: ${d.value.toLocaleString()}${d.note?` (${d.note})`:""}`,children:[v.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs",children:[v.jsxs("span",{className:"min-w-0 truncate font-mono text-[11px]",children:[d.label,d.sublabel&&v.jsx("span",{className:"ml-1.5 font-sans text-muted-foreground",children:d.sublabel})]}),v.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[s(d.value),d.note&&v.jsx("span",{className:"ml-1 text-severity-critical",children:d.note})]})]}),v.jsx("div",{className:"mt-0.5 h-1.5 rounded-full bg-foreground/10",children:v.jsx("div",{className:"h-1.5 rounded-full bg-series transition-all group-hover:opacity-80",style:{width:`${Math.max(2,d.value/h*100)}%`}})})]},d.key)),f.length>r&&v.jsx("button",{className:"text-[11px] text-muted-foreground hover:text-foreground",onClick:()=>p(!l),children:l?"Show fewer":`Show all ${f.length}`})]})}function t6({days:e,valueOf:i,label:r}){const[s,l]=P.useState(null),p=Object.entries(e).sort(([d],[m])=>d.localeCompare(m)).slice(-30);if(!p.length)return v.jsx("div",{className:"px-1 py-2 text-xs text-muted-foreground",children:"No sessions yet."});const f=Math.max(...p.map(([,d])=>i(d)),1),a=s??p[p.length-1][0],h=i(e[a]);return v.jsxs("div",{children:[v.jsxs("div",{className:"mb-2 flex items-baseline gap-2 text-xs",children:[v.jsx("span",{className:"font-medium tabular-nums",children:jn(h)}),v.jsxs("span",{className:"text-muted-foreground",children:[r," on ",a]})]}),v.jsx("div",{className:"flex h-28 items-end gap-[2px]",onMouseLeave:()=>l(null),children:p.map(([d,m])=>{const c=i(m);return v.jsx("div",{className:"flex h-full max-w-8 flex-1 cursor-default items-end",onMouseEnter:()=>l(d),children:v.jsx("div",{className:ye("w-full rounded-t bg-series transition-opacity",s&&s!==d&&"opacity-50"),style:{height:`${Math.max(2,c/f*100)}%`}})},d)})}),v.jsxs("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground",children:[v.jsx("span",{children:p[0][0]}),v.jsx("span",{children:p[p.length-1][0]})]})]})}function Dt({title:e,description:i,children:r,action:s,className:l}){return v.jsxs("section",{className:ye("card p-4",l),children:[v.jsxs("div",{className:"mb-3 flex items-start justify-between gap-2",children:[v.jsxs("div",{children:[v.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e}),i&&v.jsx("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:i})]}),s]}),r]})}const n6=[{name:"feature",description:"New behaviour",deliverables:[{name:"PR",description:"link to the pull request",required:!0},{name:"Documentation",description:"path or link to the docs written or updated",required:!0},{name:"Test evidence",description:"how it was tested and the result",required:!0}]},{name:"bugfix",description:"A defect fixed",deliverables:[{name:"PR",description:"link to the pull request",required:!0},{name:"RCA",description:"root cause analysis, a few sentences or a file path",required:!0},{name:"Test evidence",description:"the failing case now passing",required:!0}]}];function i6(){var s;const e=mt(()=>_e.categories(),[]),{starting:i,start:r}=Ks();return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"space-y-4 p-5",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Settings"}),v.jsx("h1",{className:"text-base font-semibold",children:"Task categories"}),v.jsx("p",{className:"truncate text-xs text-muted-foreground",title:"What counts as done for each kind of task.",children:"What counts as done for each kind of task."})]}),v.jsxs(ve,{variant:"primary",className:"shrink-0",disabled:i,onClick:()=>void r("create-category"),title:"Opens a Claude session to define a category",children:[v.jsx(fi,{size:12})," New category"]})]}),(s=e.data)==null?void 0:s.map(l=>v.jsx(r6,{category:l,onEdit:()=>void r("edit-category",l.id),onDeleted:e.reload},l.id)),e.data&&!e.data.length&&v.jsx(nn,{title:"No categories yet.",hint:"Without any, a triggered session reports a summary and evidence of its own choosing. Start from the examples, or describe your own to Claude."}),e.data&&!e.data.length&&v.jsx("div",{className:"flex justify-center",children:v.jsx(ve,{onClick:()=>void Promise.all(n6.map(l=>_e.saveCategory(l))).then(e.reload),children:"Add the feature and bugfix examples"})})]})})}function r6({category:e,onEdit:i,onDeleted:r}){const s=mn();return v.jsx(Dt,{title:e.name,description:e.description||void 0,action:v.jsxs("div",{className:"flex gap-1",children:[v.jsx(ve,{variant:"ghost",size:"icon",title:"Edit with Claude",onClick:i,children:v.jsx(_r,{size:13})}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Delete",onClick:()=>void s({title:`Delete the category '${e.name}'?`,description:"Sessions using it can no longer close against it.",confirmLabel:"Delete",tone:"destructive",run:async()=>{await _e.deleteCategory(e.id),r()}}),children:v.jsx(xr,{size:13})})]}),children:e.deliverables.length?v.jsx("div",{className:"divide-y rounded-md border",children:e.deliverables.map(l=>v.jsxs("div",{className:"flex items-start gap-2 px-3 py-2",children:[v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-xs font-medium",children:l.name}),l.description&&v.jsx("div",{className:"break-words text-[11px] text-muted-foreground",children:l.description})]}),v.jsx(nt,{tone:l.required?"on":"off",children:l.required?"required":"optional"})]},l.name))}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"No fixed deliverables."})})}const s6={permission:"Permission requests",question:"Questions",turn:"End of each turn",mcp:"MCP suggestions",done:"Task done"},wm="clauder:highlight-notifications";let Cm=!1;function o6(){Cm=!0,we.getState().go({kind:"page",page:"channels"}),window.dispatchEvent(new Event(wm))}function tC({on:e,label:i,onToggle:r,className:s}){return v.jsx("button",{role:"switch","aria-checked":e,"aria-label":i,title:i,onClick:r,className:ye("relative h-5 w-9 shrink-0 rounded-full transition-colors",e?"bg-primary":"bg-foreground/20",s),children:v.jsx("span",{className:ye("absolute top-0.5 h-4 w-4 rounded-full bg-background transition-all",e?"left-[18px]":"left-0.5")})})}function nC({global:e=!1}){var E,S,g,b,w;const i=mt(()=>_e.channels(),["channels"]),{starting:r,start:s}=Ks(),l=mn(),p=((E=i.data)==null?void 0:E.kinds)??[],f=((S=i.data)==null?void 0:S.paused)??!1,a=new Set(((g=i.data)==null?void 0:g.notifyKinds)??[]),h=(b=i.data)==null?void 0:b.channels.find(x=>x.kind==="device"),d=(((w=i.data)==null?void 0:w.channels)??[]).filter(x=>x.kind!=="device"),m=P.useRef(null),[c,_]=P.useState(!1);P.useEffect(()=>{const x=()=>{!Cm||!m.current||(Cm=!1,m.current.scrollIntoView({block:"center",behavior:"smooth"}),_(!0),window.setTimeout(()=>_(!1),2200))};return x(),window.addEventListener(wm,x),()=>window.removeEventListener(wm,x)},[i.data!==null]);const y=x=>void at(()=>_e.setNotifyKinds(a.has(x)?[...a].filter(T=>T!==x):[...a,x]));return v.jsx("div",{className:e?"":"h-full overflow-y-auto",children:v.jsxs("div",{className:ye("space-y-4",!e&&"p-5"),children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:e?"Every project":"Settings"}),v.jsx("h1",{className:"text-base font-semibold",children:e?"Global channels":"Channels"}),e?v.jsx("p",{className:"truncate text-xs text-muted-foreground",title:"One bot for every project: their questions arrive here, named after the project, and /projects, /use pick one.",children:"One bot for every project: their questions arrive here, named after the project."}):v.jsx("p",{className:"truncate text-xs text-muted-foreground",title:"Where sessions reach you. A reply goes back into the session.",children:"Where sessions reach you. A reply goes back into the session."})]}),v.jsxs(ve,{variant:"primary",className:"shrink-0",disabled:r,onClick:()=>void s("create-channel"),title:"Opens a Claude session to connect a channel",children:[v.jsx(fi,{size:12})," Add channel"]})]}),i.data&&v.jsx(Dt,{title:"Notifications",description:f?"Paused: no channel hears of anything; questions still wait in the inbox.":"For every channel below, this computer included.",action:v.jsxs("div",{ref:m,className:ye("flex items-center gap-2 rounded-full py-0.5 pl-2.5 pr-0.5 transition-shadow",c&&"ring-2 ring-primary ring-offset-2 ring-offset-background animate-pulse"),children:[v.jsx("span",{className:ye("text-[11px] font-medium",f?"text-severity-warning":"text-muted-foreground"),children:f?"Paused on every channel":"On for every channel"}),v.jsx(tC,{on:!f,label:f?"Turn notifications back on":"Pause notifications on every channel",onToggle:()=>void at(()=>_e.setNotificationsPaused(!f))})]}),children:v.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[v.jsx("span",{className:"mr-1 text-[11px] text-muted-foreground",children:"Notify for"}),(i.data.interactionKinds??[]).map(x=>v.jsx("button",{disabled:f,onClick:()=>y(x),className:ye("rounded-full border px-2.5 py-0.5 text-[11px] transition-colors disabled:cursor-not-allowed disabled:opacity-40",a.has(x)?"border-primary bg-primary/15 text-foreground":"text-muted-foreground hover:bg-muted"),children:s6[x]??x},x))]})}),v.jsx(Dt,{title:"Channels",description:"Send /help to the Telegram bot, or !help in the Slack channel, for the commands: new session, run, sessions, summary, stop, queue.",children:i.data&&(!e||d.length)?v.jsxs("div",{className:"divide-y rounded-md border",children:[!e&&v.jsx(a6,{channel:h}),d.map(x=>{var T;return v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[v.jsx(Fl,{size:14,className:"shrink-0 text-muted-foreground"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[v.jsx("span",{className:"min-w-0 truncate font-medium",children:x.name}),v.jsx(nt,{tone:"off",children:((T=p.find(D=>D.kind===x.kind))==null?void 0:T.label)??x.kind}),v.jsx(nt,{tone:x.status.ok?"success":x.enabled?"warning":"off",children:x.status.ok?"connected":x.enabled?"not connected":"off"})]}),v.jsx("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:x.status.detail}),x.kind==="http"&&v.jsxs("div",{className:"mt-0.5 flex min-w-0 items-center gap-1 text-[11px] text-muted-foreground",children:[v.jsxs("span",{className:"truncate font-mono",children:["POST ",`${location.origin}${Hi()}/channels/${x.id}/reply`]}),v.jsx(Dl,{text:`${location.origin}${Hi()}/channels/${x.id}/reply`})]})]}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Send a test message",onClick:()=>void at(()=>_e.testChannel(x.id),"Test message sent."),children:v.jsx(vS,{size:13})}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Edit with Claude",onClick:()=>void s("edit-channel",x.id),children:v.jsx(_r,{size:13})}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Delete",onClick:()=>void l({title:`Remove '${x.name}'?`,description:"Sessions stop reaching you there.",confirmLabel:"Remove",tone:"destructive",run:()=>_e.deleteChannel(x.id)}),children:v.jsx(xr,{size:13})})]},x.id)})]}):i.data&&v.jsx(nn,{variant:"inline",title:"No channels yet. Without one, questions wait in the dashboard's inbox and the terminal."})})]})})}function a6({channel:e}){const i=!!(e!=null&&e.enabled),r=()=>at(()=>_e.saveChannel({id:e==null?void 0:e.id,kind:"device",name:"This computer",config:{},enabled:!i,kinds:e==null?void 0:e.kinds}));return v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[v.jsx(I3,{size:14,className:"shrink-0 text-muted-foreground"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[v.jsx("span",{className:"min-w-0 truncate font-medium",children:"This computer"}),v.jsx(nt,{tone:"off",children:"System notifications"}),v.jsx(nt,{tone:i&&(e!=null&&e.status.ok)?"success":i?"warning":"off",children:i?e!=null&&e.status.ok?"on":"not working":"off"})]}),v.jsx("div",{className:ye("mt-0.5 truncate text-[11px]",i&&e&&!e.status.ok?"text-severity-critical":"text-muted-foreground"),children:i&&e&&!e.status.ok?e.status.detail:"From the hub itself; they arrive even with the browser closed."})]}),i&&e&&v.jsx(ve,{variant:"ghost",size:"icon",title:"Send a test notification",onClick:()=>void at(()=>_e.testChannel(e.id),"Test notification sent."),children:v.jsx(vS,{size:13})}),v.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:i?"On":"Off"}),v.jsx(tC,{on:i,label:i?"Stop notifying on this computer":"Notify on this computer",onToggle:()=>void r()})]})}function Cr({group:e,title:i,description:r,action:s}){return v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:e}),v.jsx("h1",{className:"text-base font-semibold",children:i}),r&&v.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",title:r,children:r})]}),s&&v.jsx("div",{className:"flex flex-wrap gap-1.5",children:s})]})}function Dg({onClick:e}){return v.jsxs(ve,{variant:"ghost",className:"-ml-2 mb-3 md:hidden",onClick:e,children:[v.jsx(b3,{size:13})," Back"]})}function Hs({label:e,hint:i,children:r}){return v.jsxs("label",{className:"block space-y-1",children:[v.jsx("div",{className:"text-xs font-medium",children:e}),r,i&&v.jsx("div",{className:"text-[11px] text-muted-foreground",children:i})]})}const pi=P.forwardRef(({className:e,size:i="sm",...r},s)=>v.jsx("input",{ref:s,className:ye("w-full rounded border bg-transparent font-sans","focus:outline-none focus:ring-1 focus:ring-ring","placeholder:text-muted-foreground disabled:opacity-50",i==="sm"?"px-2 py-1.5 text-xs":"px-3 py-2 text-sm",e),...r}));pi.displayName="Input";var l6=Object.defineProperty,c6=(e,i)=>l6(e,"name",{value:i,configurable:!0});function Em(e,[i,r]){return Math.min(r,Math.max(i,e))}c6(Em,"clamp");var u6=Object.defineProperty,Yt=(e,i)=>u6(e,"name",{value:i,configurable:!0});function iC(e){const i=e+"CollectionProvider",[r,s]=yr(i),[l,p]=r(i,{collectionRef:{current:null},itemMap:new Map}),f=Yt(S=>{const{scope:g,children:b}=S,w=P.useRef(null),x=P.useRef(new Map).current;return v.jsx(l,{scope:g,itemMap:x,collectionRef:w,children:b})},"CollectionProvider");f.displayName=i;const a=e+"CollectionSlot",h=pr(a),d=P.forwardRef((S,g)=>{const{scope:b,children:w}=S,x=p(a,b),T=ut(g,x.collectionRef);return v.jsx(h,{ref:T,children:w})});d.displayName=a;const m=e+"CollectionItemSlot",c="data-radix-collection-item",_=pr(m),y=P.forwardRef((S,g)=>{const{scope:b,children:w,...x}=S,T=P.useRef(null),D=ut(g,T),R=p(m,b);return P.useEffect(()=>(R.itemMap.set(T,{ref:T,...x}),()=>void R.itemMap.delete(T))),v.jsx(_,{[c]:"",ref:D,children:w})});y.displayName=m;function E(S){const g=p(e+"CollectionConsumer",S);return P.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((R,L)=>x.indexOf(R.ref.current)-x.indexOf(L.ref.current))},[g.collectionRef,g.itemMap])}return Yt(E,"useCollection"),[{Provider:f,Slot:d,ItemSlot:y},E,s]}Yt(iC,"createCollection");var Oy=new WeakMap,Nt,Kn,Nu=(Kn=class extends Map{constructor(r){super(r);Fx(this,Nt);_p(this,Nt,[...super.keys()]),Oy.set(this,!0)}set(r,s){return Oy.get(this)&&!this.has(r)&&un(this,Nt).push(r),super.set(r,s),this}insert(r,s,l){const p=this.has(s),f=p?this.size:this.size+1,a=Mg(r),h=a>=0?Math.min(a,f-1):Math.max(f+a,0);if(p?un(this,Nt).indexOf(s)===h:h===this.size)return this.set(s,l),this;const d=un(this,Nt).filter(c=>c!==s);d.splice(h,0,s);const m=d.map(c=>[c,c===s?l:this.get(c)]);this.clear();for(const[c,_]of m)this.set(c,_);return this}with(r,s,l){const p=new Kn(this);return p.insert(r,s,l),p}before(r){const s=un(this,Nt).indexOf(r)-1;if(!(s<0))return this.entryAt(s)}setBefore(r,s,l){const p=un(this,Nt).indexOf(r);if(p===-1)return this;const f=un(this,Nt).indexOf(s),a=f!==-1&&f<p?p-1:p;return this.insert(a,s,l)}after(r){let s=un(this,Nt).indexOf(r);if(s=s===-1||s===this.size-1?-1:s+1,s!==-1)return this.entryAt(s)}setAfter(r,s,l){const p=un(this,Nt).indexOf(r);if(p===-1)return this;const f=un(this,Nt).indexOf(s),a=f!==-1&&f<=p?p:p+1;return this.insert(a,s,l)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return _p(this,Nt,[]),super.clear()}delete(r){const s=super.delete(r);return s&&un(this,Nt).splice(un(this,Nt).indexOf(r),1),s}deleteAt(r){const s=this.keyAt(r);return s!==void 0?this.delete(s):!1}at(r){const s=Gu(un(this,Nt),r);if(s!==void 0)return this.get(s)}entryAt(r){const s=Gu(un(this,Nt),r);if(s!==void 0)return[s,this.get(s)]}indexOf(r){return un(this,Nt).indexOf(r)}keyAt(r){return Gu(un(this,Nt),r)}from(r,s){const l=this.indexOf(r);if(l===-1)return;let p=l+s;return p<0&&(p=0),p>=this.size&&(p=this.size-1),this.at(p)}keyFrom(r,s){const l=this.indexOf(r);if(l===-1)return;let p=l+s;return p<0&&(p=0),p>=this.size&&(p=this.size-1),this.keyAt(p)}find(r,s){let l=0;for(const p of this){if(Reflect.apply(r,s,[p,l,this]))return p;l++}}findIndex(r,s){let l=0;for(const p of this){if(Reflect.apply(r,s,[p,l,this]))return l;l++}return-1}filter(r,s){const l=[];let p=0;for(const f of this)Reflect.apply(r,s,[f,p,this])&&l.push(f),p++;return new Kn(l)}map(r,s){const l=[];let p=0;for(const f of this)l.push([f[0],Reflect.apply(r,s,[f,p,this])]),p++;return new Kn(l)}reduce(...r){const[s,l]=r,p=r.length>1;if(!p&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let f=0,a=l;for(const h of this)f===0&&!p?a=h:a=Reflect.apply(s,this,[a,h,f,this]),f++;return a}reduceRight(...r){const[s,l]=r,p=r.length>1;if(!p&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let f=l;for(let a=this.size-1;a>=0;a--){const h=this.entryAt(a);a===this.size-1&&!p?f=h:f=Reflect.apply(s,this,[f,h,a,this])}return f}sort(r){if(typeof r!="function")throw new TypeError("OrderedDict.sort requires a compare function");const s=[...this.entries()].sort(r);this.clear();for(const[l,p]of s)this.set(l,p);return this}toSorted(r){if(typeof r!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");const s=[...this.entries()].sort(r);return new Kn(s)}toReversed(){const r=new Kn;for(let s=this.size-1;s>=0;s--){const l=this.keyAt(s),p=this.get(l);r.set(l,p)}return r}toSpliced(...r){const s=[...this.entries()];return s.splice(...r),new Kn(s)}slice(r,s){const l=new Kn;for(const p of un(this,Nt).slice(r,s))l.set(p,this.get(p));return l}every(r,s){let l=0;for(const p of this){if(!Reflect.apply(r,s,[p,l,this]))return!1;l++}return!0}some(r,s){let l=0;for(const p of this){if(Reflect.apply(r,s,[p,l,this]))return!0;l++}return!1}},Nt=new WeakMap,Yt(Kn,"OrderedDict"),Kn);function Gu(e,i){if("at"in Array.prototype)return Array.prototype.at.call(e,i);const r=rC(e,i);return r===-1?void 0:e[r]}Yt(Gu,"at");function rC(e,i){const r=e.length,s=Mg(i),l=s>=0?s:r+s;return l<0||l>=r?-1:l}Yt(rC,"toSafeIndex");function Mg(e){return e!==e||e===0?0:Math.trunc(e)}Yt(Mg,"toSafeInteger");function h6(e){const i=e+"CollectionProvider",[r,s]=yr(i),[l,p]=r(i);l.displayName=e+"CollectionStableContextProvider";const[f,a]=r(i);f.displayName=e+"CollectionStatefulContextProvider";const h=Yt(({state:R,...L})=>R?v.jsx(m,{...L,state:R}):v.jsx(d,{...L}),"CollectionProvider");h.displayName=i;const d=Yt(R=>{const L=w();return v.jsx(m,{...R,state:L})},"CollectionInit");d.displayName=e+"CollectionInit";const m=Yt(R=>{const{scope:L,children:A,state:j}=R,M=P.useRef(null),[I,B]=P.useState(null),H=ut(M,B),[U,W]=j,Y=P.useRef(new Nu),Q=P.useCallback(()=>{const K=Y.current;return aC(K)||K.sort(Yu),K},[]);return P.useEffect(()=>{if(!I)return;const K=lC(()=>{W(z=>{const O=z.toSorted(Yu);return O.some(([Z],F)=>z.keyAt(F)!==Z)?O:z})});return K.observe(I,{childList:!0,subtree:!0}),()=>{K.disconnect()}},[I,W]),v.jsx(l,{scope:L,collectionElementRef:H,collectionElementRefObject:M,getCollection:Q,setCollection:W,registryRef:Y,children:v.jsx(f,{scope:L,collectionElement:I,collection:U,children:A})})},"CollectionProviderImpl");m.displayName=e+"CollectionProviderImpl";const c=e+"CollectionSlot",_=pr(c),y=P.forwardRef((R,L)=>{const{scope:A,children:j}=R,M=p(c,A),I=ut(L,M.collectionElementRef);return v.jsx(_,{ref:I,children:j})});y.displayName=c;const E=e+"CollectionItemSlot",S="data-radix-collection-item",g=pr(E),b=P.forwardRef((R,L)=>{const{scope:A,children:j,...M}=R,I=P.useRef(null),B=p(E,A),{setCollection:H,registryRef:U}=B,W=P.useRef(M);sC(W.current,M)||(W.current=M);const Y=W.current,Q=P.useCallback(O=>{const G=U.current;O?G.set(O,{...W.current,element:O}):I.current&&G.delete(I.current)},[U]),K=ut(L,Q,I);$t(()=>{const O=I.current,G=U.current;O&&G.has(O)&&G.set(O,{...Y,element:O})},[Y,U]);const z=P.useRef(null);return P.useEffect(()=>{const O=I.current,G=z.current;((G==null?void 0:G.element)??null)===O&&(!O||(G==null?void 0:G.itemData)===Y)||(z.current=O?{element:O,itemData:Y}:null,H(Z=>{const F=new Nu(Z);return G&&G.element!==O&&F.delete(G.element),O&&F.set(O,{...Y,element:O}),F.sort(Yu)}))}),P.useEffect(()=>()=>{const O=z.current;z.current=null,O&&H(G=>{if(!G.has(O.element))return G;const Z=new Nu(G);return Z.delete(O.element),Z})},[H]),v.jsx(g,{[S]:"",ref:K,children:j})});b.displayName=E;function w(){return P.useState(new Nu)}Yt(w,"useInitCollection");function x(R){const{collection:L}=a(e+"CollectionConsumer",R);return L}Yt(x,"useCollection");function T(R){const{getCollection:L}=p(e+"CollectionConsumer",R);return L}return Yt(T,"useGetCollection"),[{Provider:h,Slot:y,ItemSlot:b},{createCollectionScope:s,useCollection:x,useGetCollection:T,useInitCollection:w}]}Yt(h6,"createCollection");function sC(e,i){if(e===i)return!0;if(typeof e!="object"||typeof i!="object"||e==null||i==null)return!1;const r=Object.keys(e),s=Object.keys(i);if(r.length!==s.length)return!1;for(const l of r)if(!Object.prototype.hasOwnProperty.call(i,l)||e[l]!==i[l])return!1;return!0}Yt(sC,"shallowEqual");function oC(e,i){return!!(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Yt(oC,"isElementPreceding");function aC(e){let i;for(const r of e.keys()){if(i){const s=i.compareDocumentPosition(r);if(!(s&Node.DOCUMENT_POSITION_DISCONNECTED)&&s&Node.DOCUMENT_POSITION_PRECEDING)return!1}i=r}return!0}Yt(aC,"isInDocumentOrder");function Yu(e,i){return!e[1].element||!i[1].element?0:oC(e[1].element,i[1].element)?-1:1}Yt(Yu,"sortByDocumentPosition");function lC(e){return new MutationObserver(r=>{for(const s of r)if(s.type==="childList"){e();return}})}Yt(lC,"getChildListObserver");var d6=Object.defineProperty,f6=(e,i)=>d6(e,"name",{value:i,configurable:!0}),p6={LTR:"ltr"},m6=P.createContext(void 0);function cC(e){const i=P.useContext(m6);return e||i||p6.LTR}f6(cC,"useDirection");var g6=Object.defineProperty,v6=(e,i)=>g6(e,"name",{value:i,configurable:!0}),uC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_6=P.forwardRef(v6(function(i,r){return v.jsx(wt.span,{...i,ref:r,style:{...uC,...i.style}})},"VisuallyHidden")),x6=Object.defineProperty,pt=(e,i)=>x6(e,"name",{value:i,configurable:!0}),Ny={ItemAligned:"item-aligned",Popper:"popper"},y6={RTL:"rtl"},b6=[" ","Enter","ArrowUp","ArrowDown"],S6=[" ","Enter"],ca="Select",[Lh,jg,w6]=iC(ca),[Qs,W9]=yr(ca,[w6,_a]),Og=_a(),[C6,ps]=Qs(ca),[E6,k6]=Qs(ca);function hC(e){const{__scopeSelect:i,children:r,open:s,defaultOpen:l,onOpenChange:p,value:f,defaultValue:a,onValueChange:h,dir:d,name:m,autoComplete:c,disabled:_,required:y,form:E,internal_do_not_use_render:S}=e,g=Og(i),[b,w]=P.useState(null),[x,T]=P.useState(null),[D,R]=P.useState(!1),L=cC(d),[A,j]=Vs({prop:s,defaultProp:l??!1,onChange:p,caller:ca}),[M,I]=Vs({prop:f,defaultProp:a,onChange:h,caller:ca}),B=P.useRef(null),H=P.useRef(!1),[U,W]=P.useState(null),Y=pt(le=>{W({value:le,hasConsumerStoppedPropagation:H.current}),I(le)},"handleUserSelect"),Q=P.useRef(M);P.useEffect(()=>{const le=E?b==null?void 0:b.ownerDocument.getElementById(E):b==null?void 0:b.form;if(le instanceof HTMLFormElement){const X=pt(()=>I(Q.current),"reset");return le.addEventListener("reset",X),()=>le.removeEventListener("reset",X)}},[E,b,I]);const K=b?!!E||!!b.closest("form"):!0,[z,O]=P.useState(new Set),G=Fi(),Z=Array.from(z).map(le=>le.props.value).join(";"),F=P.useCallback(le=>{O(X=>new Set(X).add(le))},[]),V=P.useCallback(le=>{O(X=>{const $=new Set(X);return $.delete(le),$})},[]),ne={required:y,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:T,valueNodeHasChildren:D,onValueNodeHasChildrenChange:R,contentId:G,value:M,onValueChange:I,hasConsumerStoppedPropagationRef:H,userSelection:U,onUserSelect:Y,open:A,onOpenChange:j,dir:L,triggerPointerDownPosRef:B,disabled:_,name:m,autoComplete:c,form:E,nativeOptions:z,nativeSelectKey:Z,isFormControl:K};return v.jsx(Eg,{...g,children:v.jsx(C6,{scope:i,...ne,children:v.jsx(Lh.Provider,{scope:i,children:v.jsx(E6,{scope:i,onNativeOptionAdd:F,onNativeOptionRemove:V,children:pC(S)?S(ne):r})})})})}pt(hC,"SelectProvider");var T6=pt(e=>{const{__scopeSelect:i,children:r,...s}=e;return v.jsx(hC,{__scopeSelect:i,...s,internal_do_not_use_render:({isFormControl:l})=>v.jsxs(v.Fragment,{children:[r,l?v.jsx(Z6,{__scopeSelect:i}):null]})})},"Select"),R6="SelectTrigger",A6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,disabled:l=!1,...p}=i,f=Og(s),a=ps(R6,s),h=a.disabled||l,d=ut(r,a.onTriggerChange),m=jg(s),c=P.useRef("touch"),[_,y,E]=Ng(g=>{const b=m().filter(T=>!T.disabled),w=b.find(T=>T.value===a.value),x=Bg(b,g,w);x!==void 0&&a.onUserSelect(x.value)}),S=pt(g=>{h||(a.onOpenChange(!0),E()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})},"handleOpen");return v.jsx(kg,{asChild:!0,...f,children:v.jsx(wt.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":Yl(a.value)?"":void 0,...p,ref:d,onClick:tt(p.onClick,g=>{g.currentTarget.focus(),c.current!=="mouse"&&S(g)}),onPointerDown:tt(p.onPointerDown,g=>{c.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(S(g),g.preventDefault())}),onKeyDown:tt(p.onKeyDown,g=>{const b=_.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&(a.hasConsumerStoppedPropagationRef.current=g.isPropagationStopped(),y(g.key)),!(b&&g.key===" ")&&b6.includes(g.key)&&(S(),g.preventDefault())})})})},"SelectTrigger")),L6="SelectValue",D6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,className:l,style:p,children:f,placeholder:a="",...h}=i,d=ps(L6,s),{onValueNodeHasChildrenChange:m}=d,c=f!==void 0,_=ut(r,d.onValueNodeChange);$t(()=>{m(c)},[m,c]);const y=Yl(d.value);return v.jsx(wt.span,{...h,asChild:y?!1:h.asChild,ref:_,style:{pointerEvents:"none"},children:v.jsx(P.Fragment,{children:y?a:f},y?"placeholder":"value")})},"SelectValue")),M6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,children:l,...p}=i;return v.jsx(wt.span,{"aria-hidden":!0,...p,ref:r,children:l||"▼"})},"SelectIcon")),j6="SelectPortal",[O6,N6]=Qs(j6,{forceMount:void 0}),B6=pt(e=>{const{__scopeSelect:i,forceMount:r,...s}=e;return v.jsx(O6,{scope:e.__scopeSelect,forceMount:r,children:v.jsx(yh,{asChild:!0,...s})})},"SelectPortal"),Ys="SelectContent",P6=P.forwardRef(pt(function(i,r){const s=N6(Ys,i.__scopeSelect),{forceMount:l=s.forceMount,...p}=i,f=ps(Ys,i.__scopeSelect),[a,h]=P.useState();return $t(()=>{h(new DocumentFragment)},[]),v.jsx(br,{present:l||f.open,children:({present:d})=>d?v.jsx(H6,{...p,ref:r}):v.jsx(I6,{...p,fragment:a})})},"SelectContent")),I6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,children:l,fragment:p}=i;return p?Wl.createPortal(v.jsx(dC,{scope:s,children:v.jsx(Lh.Slot,{scope:s,children:v.jsx("div",{ref:r,children:l})})}),p):null},"SelectContentFragment")),bi=10,[dC,Dh]=Qs(Ys),z6=pr("SelectContent.RemoveScroll"),H6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s}=i,{position:l=Ny.ItemAligned,onCloseAutoFocus:p,onEscapeKeyDown:f,onPointerDownOutside:a,side:h,sideOffset:d,align:m,alignOffset:c,arrowPadding:_,collisionBoundary:y,collisionPadding:E,sticky:S,hideWhenDetached:g,avoidCollisions:b,...w}=i,x=ps(Ys,s),[T,D]=P.useState(null),[R,L]=P.useState(null),A=ut(r,D),[j,M]=P.useState(null),[I,B]=P.useState(null),H=jg(s),[U,W]=P.useState(!1),Y=P.useRef(!1),Q=P.useRef(!1),K=P.useRef(!1);P.useEffect(()=>{if(T)return gg(T)},[T]),Gl();const z=P.useCallback(ee=>{const[ue,...he]=H().map(Re=>Re.ref.current),[Se]=he.slice(-1),be=document.activeElement;for(const Re of ee)if(Re===be||(Re==null||Re.scrollIntoView({block:"nearest"}),Re===ue&&R&&(R.scrollTop=0),Re===Se&&R&&(R.scrollTop=R.scrollHeight),Re==null||Re.focus(),document.activeElement!==be))return},[H,R]),O=P.useCallback(()=>z([j,T]),[z,j,T]);P.useEffect(()=>{U&&O()},[U,O]);const{onOpenChange:G,triggerPointerDownPosRef:Z}=x;P.useEffect(()=>{if(T){let ee={x:0,y:0};const ue=pt(Se=>{var be,Re;ee={x:Math.abs(Math.round(Se.pageX)-(((be=Z.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(Se.pageY)-(((Re=Z.current)==null?void 0:Re.y)??0))}},"handlePointerMove"),he=pt(Se=>{ee.x<=10&&ee.y<=10?Se.preventDefault():Se.composedPath().includes(T)||G(!1),document.removeEventListener("pointermove",ue),Z.current=null},"handlePointerUp");return Z.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",he,{capture:!0})}}},[T,G,Z]),P.useEffect(()=>{const ee=pt(()=>G(!1),"close");return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[G]);const[F,V]=Ng(ee=>{const ue=H().filter(be=>!be.disabled),he=ue.find(be=>be.ref.current===document.activeElement),Se=Bg(ue,ee,he);Se&&setTimeout(()=>{var be;return(be=Se.ref.current)==null?void 0:be.focus()})}),ne=P.useCallback((ee,ue,he)=>{const Se=!Q.current;Se&&(Q.current=!0);const be=!Y.current&&!he;x.value!==void 0&&x.value===ue||be?(M(ee),be&&(Y.current=!0)):Se&&M(ee)},[x.value]),le=P.useCallback(()=>T==null?void 0:T.focus(),[T]),X=P.useCallback((ee,ue,he)=>{if(!ee)return;const Se=!K.current;Se&&(K.current=!0);const be=!Y.current&&!he;(x.value!==void 0&&x.value===ue||be||Se)&&B(ee)},[x.value]),$=l===Ny.Popper?By:F6,oe=$===By?{side:h,sideOffset:d,align:m,alignOffset:c,arrowPadding:_,collisionBoundary:y,collisionPadding:E,sticky:S,hideWhenDetached:g,avoidCollisions:b}:{};return v.jsx(dC,{scope:s,content:T,viewport:R,onViewportChange:L,itemRefCallback:ne,selectedItem:j,onItemLeave:le,itemTextRefCallback:X,focusSelectedItem:O,selectedItemText:I,position:l,isPositioned:U,searchRef:F,children:v.jsx(Sh,{as:z6,allowPinchZoom:!0,children:v.jsx(ug,{asChild:!0,trapped:x.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:tt(p,ee=>{var ue;(ue=x.trigger)==null||ue.focus({preventScroll:!0}),ee.preventDefault()}),children:v.jsx(xh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:a,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:v.jsx($,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ee=>ee.preventDefault(),...w,...oe,onPlaced:()=>W(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:tt(w.onKeyDown,ee=>{const ue=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ue&&ee.key.length===1&&V(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Se=H().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const be=ee.target,Re=Se.indexOf(be);Se=Se.slice(Re+1)}setTimeout(()=>z(Se)),ee.preventDefault()}})})})})})})},"SelectContentImpl")),F6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,onPlaced:l,...p}=i,f=ps(Ys,s),a=Dh(Ys,s),[h,d]=P.useState(null),[m,c]=P.useState(null),_=ut(r,c),y=jg(s),E=P.useRef(!1),S=P.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,T=P.useCallback(()=>{if(f.trigger&&f.valueNode&&h&&m&&g&&b&&w){const A=f.trigger.getBoundingClientRect(),j=m.getBoundingClientRect(),M=f.valueNode.getBoundingClientRect(),I=w.getBoundingClientRect();if(f.dir!==y6.RTL){const he=I.left-j.left,Se=M.left-he,be=A.left-Se,Re=A.width+be,qe=Math.max(Re,j.width),Ee=window.innerWidth-bi,ze=Em(Se,[bi,Math.max(bi,Ee-qe)]);h.style.minWidth=Re+"px",h.style.left=ze+"px"}else{const he=j.right-I.right,Se=window.innerWidth-M.right-he,be=window.innerWidth-A.right-Se,Re=A.width+be,qe=Math.max(Re,j.width),Ee=window.innerWidth-bi,ze=Em(Se,[bi,Math.max(bi,Ee-qe)]);h.style.minWidth=Re+"px",h.style.right=ze+"px"}const B=y(),H=window.innerHeight-bi*2,U=g.scrollHeight,W=window.getComputedStyle(m),Y=parseInt(W.borderTopWidth,10),Q=parseInt(W.paddingTop,10),K=parseInt(W.borderBottomWidth,10),z=parseInt(W.paddingBottom,10),O=Y+Q+U+z+K,G=Math.min(b.offsetHeight*5,O),Z=window.getComputedStyle(g),F=parseInt(Z.paddingTop,10),V=parseInt(Z.paddingBottom,10),ne=A.top+A.height/2-bi,le=H-ne,X=b.offsetHeight/2,$=b.offsetTop+X,oe=Y+Q+$,ee=O-oe;if(oe<=ne){const he=B.length>0&&b===B[B.length-1].ref.current;h.style.bottom="0px";const Se=m.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(le,X+(he?V:0)+Se+K),Re=oe+be;h.style.height=Re+"px"}else{const he=B.length>0&&b===B[0].ref.current;h.style.top="0px";const be=Math.max(ne,Y+g.offsetTop+(he?F:0)+X)+ee;h.style.height=be+"px",g.scrollTop=oe-ne+g.offsetTop}h.style.margin=`${bi}px 0`,h.style.minHeight=G+"px",h.style.maxHeight=H+"px",l==null||l(),requestAnimationFrame(()=>E.current=!0)}},[y,f.trigger,f.valueNode,h,m,g,b,w,f.dir,l]);$t(()=>T(),[T]);const[D,R]=P.useState();$t(()=>{m&&R(window.getComputedStyle(m).zIndex)},[m]);const L=P.useCallback(A=>{A&&S.current===!0&&(T(),x==null||x(),S.current=!1)},[T,x]);return v.jsx(U6,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:E,onScrollButtonChange:L,children:v.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:v.jsx(wt.div,{...p,ref:_,style:{boxSizing:"border-box",maxHeight:"100%",...p.style}})})})},"SelectItemAlignedPosition")),By=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,align:l="start",collisionPadding:p=bi,...f}=i,a=Og(s);return v.jsx(Tg,{...a,...f,ref:r,align:l,collisionPadding:p,style:{boxSizing:"border-box",...f.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[U6,$6]=Qs(Ys,{}),Py="SelectViewport",q6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,nonce:l,...p}=i,f=Dh(Py,s),a=$6(Py,s),h=ut(r,f.onViewportChange),d=P.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),v.jsx(Lh.Slot,{scope:s,children:v.jsx(wt.div,{"data-radix-select-viewport":"",role:"presentation",...p,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...p.style},onScroll:tt(p.onScroll,m=>{const c=m.currentTarget,{contentWrapper:_,shouldExpandOnScrollRef:y}=a;if(y!=null&&y.current&&_){const E=Math.abs(d.current-c.scrollTop);if(E>0){const S=window.innerHeight-bi*2,g=parseFloat(_.style.minHeight),b=parseFloat(_.style.height),w=Math.max(g,b);if(w<S){const x=w+E,T=Math.min(S,x),D=x-T;_.style.height=T+"px",_.style.bottom==="0px"&&(c.scrollTop=D>0?D:0,_.style.justifyContent="flex-end")}}}d.current=c.scrollTop})})})]})},"SelectViewport")),V6="SelectGroup",[G9,Y9]=Qs(V6),km="SelectItem",[W6,fC]=Qs(km),G6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,value:l,disabled:p=!1,textValue:f,...a}=i,h=ps(km,s),d=Dh(km,s),m=h.value===l,[c,_]=P.useState(f??""),[y,E]=P.useState(!1),S=Ui(T=>{var D;return(D=d.itemRefCallback)==null?void 0:D.call(d,T,l,p)}),g=ut(r,S),b=Fi(),w=P.useRef("touch");function x(T){h.hasConsumerStoppedPropagationRef.current=T.isPropagationStopped(),h.onUserSelect(l),h.onOpenChange(!1)}return pt(x,"handleSelect"),v.jsx(W6,{scope:s,value:l,disabled:p,textId:b,isSelected:m,onItemTextChange:P.useCallback(T=>{_(D=>D||((T==null?void 0:T.textContent)??"").trim())},[]),children:v.jsx(Lh.ItemSlot,{scope:s,value:l,disabled:p,textValue:c,children:v.jsx(wt.div,{role:"option","aria-labelledby":b,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":p||void 0,"data-disabled":p?"":void 0,tabIndex:p?void 0:-1,...a,ref:g,onFocus:tt(a.onFocus,()=>E(!0)),onBlur:tt(a.onBlur,()=>E(!1)),onClick:tt(a.onClick,T=>{p||w.current!=="mouse"&&x(T)}),onPointerUp:tt(a.onPointerUp,T=>{p||w.current==="mouse"&&x(T)}),onPointerDown:tt(a.onPointerDown,T=>{w.current=T.pointerType}),onPointerMove:tt(a.onPointerMove,T=>{var D;w.current=T.pointerType,p?(D=d.onItemLeave)==null||D.call(d):w.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tt(a.onPointerLeave,T=>{var D;T.currentTarget===document.activeElement&&((D=d.onItemLeave)==null||D.call(d))}),onKeyDown:tt(a.onKeyDown,T=>{var R;p||T.target!==T.currentTarget||((R=d.searchRef)==null?void 0:R.current)!==""&&T.key===" "||(S6.includes(T.key)&&x(T),T.key===" "&&T.preventDefault())})})})})},"SelectItem")),Bu="SelectItemText",Y6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,className:l,style:p,...f}=i,a=ps(Bu,s),h=Dh(Bu,s),d=fC(Bu,s),m=k6(Bu,s),[c,_]=P.useState(null),y=Ui(x=>{var T;return(T=h.itemTextRefCallback)==null?void 0:T.call(h,x,d.value,d.disabled)}),E=ut(r,_,d.onItemTextChange,y),S=c==null?void 0:c.textContent,g=P.useMemo(()=>v.jsx("option",{value:d.value,disabled:d.disabled,children:S},d.value),[d.disabled,d.value,S]),{onNativeOptionAdd:b,onNativeOptionRemove:w}=m;return $t(()=>(b(g),()=>w(g)),[b,w,g]),v.jsxs(v.Fragment,{children:[v.jsx(wt.span,{id:d.textId,...f,ref:E}),d.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!Yl(a.value)?Wl.createPortal(f.children,a.valueNode):null]})},"SelectItemText")),X6="SelectItemIndicator",K6=P.forwardRef(pt(function(i,r){const{__scopeSelect:s,...l}=i;return fC(X6,s).isSelected?v.jsx(wt.span,{"aria-hidden":!0,...l,ref:r}):null},"SelectItemIndicator")),Q6="SelectBubbleInput",Z6=P.forwardRef(pt(function({__scopeSelect:i,...r},s){const l=ps(Q6,i),{value:p,onValueChange:f,required:a,disabled:h,name:d,autoComplete:m,form:c,userSelection:_}=l,{nativeOptions:y,nativeSelectKey:E}=l,S=P.useRef(null),g=ut(s,S),b=p??"",w=P.useRef(b),x=P.useRef(_),T=P.useRef(!1),D=Array.from(y).some(R=>(R.props.value??"")==="");return P.useEffect(()=>{const R=S.current;if(!R)return;const L=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(L,"value").set,M=_!==null&&_!==x.current;x.current=_;const I=w.current!==b;w.current=b;const B=M&&I;if(M&&!I&&_.value!==b&&!_.hasConsumerStoppedPropagation&&j){T.current=!0;try{j.call(R,_.value),R.dispatchEvent(new Event("change",{bubbles:!0}))}finally{T.current=!1,j.call(R,b)}return}const H=B&&!_.hasConsumerStoppedPropagation;if(I&&j){const U=new Event("change",{bubbles:H});j.call(R,b),R.dispatchEvent(U)}},[b,_]),v.jsxs(wt.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:d,autoComplete:m,disabled:h,form:c,onChange:R=>{T.current||f(R.target.value)},...r,style:{...uC,...r.style},ref:g,defaultValue:b,children:[Yl(p)&&!D?v.jsx("option",{value:""}):null,Array.from(y)]},E)},"SelectBubbleInput"));function pC(e){return typeof e=="function"}pt(pC,"isFunction");function Yl(e){return e===""||e===void 0}pt(Yl,"shouldShowPlaceholder");function Ng(e){const i=Ui(e),r=P.useRef(""),s=P.useRef(0),l=P.useCallback(f=>{const a=r.current+f;i(a);function h(d){r.current=d,window.clearTimeout(s.current),d!==""&&(s.current=window.setTimeout(()=>h(""),1e3))}pt(h,"updateSearch"),h(a)},[i]),p=P.useCallback(()=>{r.current="",window.clearTimeout(s.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(s.current),[]),[r,l,p]}pt(Ng,"useTypeaheadSearch");function Bg(e,i,r){const l=i.length>1&&Array.from(i).every(d=>d===i[0])?i[0]:i,p=r?e.indexOf(r):-1;let f=mC(e,Math.max(p,0));l.length===1&&(f=f.filter(d=>d!==r));const h=f.find(d=>d.textValue.toLowerCase().startsWith(l.toLowerCase()));return h!==r?h:void 0}pt(Bg,"findNextItem");function mC(e,i){return e.map((r,s)=>e[(i+s)%e.length])}pt(mC,"wrapArray");const gC="__empty__",vC=e=>e===""?gC:e,J6=e=>e===gC?"":e;function ta({value:e,onValueChange:i,placeholder:r,size:s="sm",disabled:l,className:p,children:f}){return v.jsxs(T6,{value:vC(e),onValueChange:a=>i(J6(a)),disabled:l,children:[v.jsxs(A6,{className:ye("flex w-full select-none items-center justify-between rounded border bg-transparent font-sans","focus:outline-none focus:ring-1 focus:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-muted-foreground/60",s==="sm"?"gap-1 px-2 py-1.5 text-xs":"gap-2 px-3 py-2 text-sm",p),children:[v.jsx(D6,{placeholder:r}),v.jsx(M6,{asChild:!0,children:v.jsx(zl,{className:ye("shrink-0 text-muted-foreground",s==="sm"?"h-3 w-3":"h-4 w-4")})})]}),v.jsx(B6,{children:v.jsx(P6,{position:"popper",sideOffset:4,className:ye("z-50 min-w-[var(--radix-select-trigger-width)] overflow-hidden","rounded-lg border bg-card shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:v.jsx(q6,{className:"p-1",children:f})})})]})}const Cn=P.forwardRef(({value:e,children:i,className:r},s)=>v.jsxs(G6,{ref:s,value:vC(e),className:ye("relative flex w-full cursor-pointer select-none items-center rounded","px-2 py-1.5 pr-7 text-xs outline-none","focus:bg-muted focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),children:[v.jsx(Y6,{children:i}),v.jsx(K6,{className:"absolute right-2 flex items-center justify-center",children:v.jsx(Il,{className:"h-3 w-3 text-foreground"})})]}));Cn.displayName="SelectItem";const Pg=P.forwardRef(({className:e,size:i="sm",...r},s)=>v.jsx("textarea",{ref:s,className:ye("w-full resize-y rounded border bg-transparent font-serif leading-relaxed","focus:outline-none focus:ring-1 focus:ring-ring","placeholder:text-muted-foreground disabled:opacity-50",i==="sm"?"px-2 py-1.5 text-xs":"px-3 py-2 text-sm",e),...r}));Pg.displayName="Textarea";const Iy={manual:"Manual: ask before edits and commands",default:"Default (older name of Manual)",acceptEdits:"Accept edits: ask only for commands",plan:"Plan: read and plan, change nothing",auto:"Auto: a classifier decides what to ask",dontAsk:"Don't ask: deny what is not allowed",bypassPermissions:"Bypass: never ask"},eL=["default","fable","opus","sonnet","haiku","opus[1m]","sonnet[1m]","claude-fable-5-1","claude-opus-5-5","claude-sonnet-5-5","claude-haiku-5-5"],Pu="";function tL(){var _,y;const e=mt(()=>_e.claudeSettings(),[]),[i,r]=P.useState(null),[s,l]=P.useState(""),[p,f]=P.useState(""),[a,h]=P.useState("");P.useEffect(()=>{if(!e.data)return;const E=e.data.settings;r(E),l(E.model),f(E.fallbackModel),h(E.addDirs.join(`
|
|
491
|
-
`))},[e.data]);const d=async E=>{const S=await at(()=>_e.saveClaudeSettings(E),"Saved. New sessions use it.");S&&r(S)},m=((_=e.data)==null?void 0:_.permissionModes)??[],c=((y=e.data)==null?void 0:y.efforts)??[];return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"space-y-4 p-5",children:[v.jsx(Cr,{group:"Settings",title:"Claude settings",description:"How the hub starts claude. Applies to sessions started from now on; empty keeps your own Claude Code setting."}),i&&v.jsxs(v.Fragment,{children:[v.jsx(Dt,{title:"Permissions",description:"Which mode a session starts in.",children:v.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[v.jsx(Hs,{label:"Sessions you open",hint:"New session, resumes and hub tasks.",children:v.jsxs(ta,{value:i.permissionMode,onValueChange:E=>void d({permissionMode:E}),children:[v.jsx(Cn,{value:Pu,children:"Your Claude Code setting"}),m.map(E=>v.jsx(Cn,{value:E,children:Iy[E]??E},E))]})}),v.jsx(Hs,{label:"Unattended runs",hint:"Cron, webhook and queued runs. Their questions go to the channels.",children:v.jsxs(ta,{value:i.runPermissionMode,onValueChange:E=>void d({runPermissionMode:E}),children:[v.jsx(Cn,{value:Pu,children:"Your Claude Code setting"}),m.map(E=>v.jsx(Cn,{value:E,children:Iy[E]??E},E))]})})]})}),v.jsxs(Dt,{title:"Model",description:"An alias or a full model id.",children:[v.jsx("datalist",{id:"claude-models",children:eL.map(E=>v.jsx("option",{value:E},E))}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(Hs,{label:"Model",children:v.jsx(pi,{list:"claude-models",value:s,placeholder:"Your Claude Code setting",onChange:E=>l(E.target.value),onBlur:()=>s!==i.model&&void d({model:s.trim()})})}),v.jsx(Hs,{label:"Fallback model",hint:"Used when the model is overloaded.",children:v.jsx(pi,{list:"claude-models",value:p,placeholder:"None",onChange:E=>f(E.target.value),onBlur:()=>p!==i.fallbackModel&&void d({fallbackModel:p.trim()})})}),v.jsx(Hs,{label:"Effort",children:v.jsxs(ta,{value:i.effort,onValueChange:E=>void d({effort:E}),children:[v.jsx(Cn,{value:Pu,children:"Your Claude Code setting"}),c.map(E=>v.jsx(Cn,{value:E,children:E},E))]})})]})]}),v.jsx(Dt,{title:"Access",description:"What else a session can reach.",children:v.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[v.jsx(Hs,{label:"Extra directories",hint:"One path per line, passed as --add-dir.",children:v.jsx(Pg,{rows:3,className:"font-mono",value:a,placeholder:"C:\\Source code\\shared-lib",onChange:E=>h(E.target.value),onBlur:()=>a!==i.addDirs.join(`
|
|
492
|
-
`)&&void d({addDirs:a.split(`
|
|
493
|
-
`)})})}),v.jsx(Hs,{label:"Claude in Chrome",children:v.jsxs(ta,{value:i.chrome,onValueChange:E=>void d({chrome:E}),children:[v.jsx(Cn,{value:Pu,children:"Your Claude Code setting"}),v.jsx(Cn,{value:"on",children:"On"}),v.jsx(Cn,{value:"off",children:"Off"})]})})]})})]})]})})}class _C extends Error{constructor(i,r){super(i),this.status=r}}async function Jo(e,i){const r=await fetch(`${Hi()}/files${e}`,{...i,headers:{"Content-Type":"application/json"}}),s=await r.json().catch(()=>({}));if(!r.ok)throw new _C(s.error??r.statusText,r.status);return s}const ts=(e,i,r)=>Jo(i,{method:e,body:JSON.stringify(r)}),Xt={list:(e,i)=>Jo(`/list?path=${encodeURIComponent(e)}${i?"&ignored=1":""}`),read:e=>Jo(`/read?path=${encodeURIComponent(e)}`),blame:e=>Jo(`/blame?path=${encodeURIComponent(e)}`),commit:e=>Jo(`/commit?sha=${encodeURIComponent(e)}`),stat:e=>Jo(`/stat?path=${encodeURIComponent(e)}`),write:(e,i,r)=>ts("PUT","/write",{path:e,content:i,expectedMtimeMs:r}),create:e=>ts("POST","/create",{path:e}),mkdir:e=>ts("POST","/mkdir",{path:e}),rename:(e,i)=>ts("POST","/rename",{from:e,to:i}),remove:e=>ts("POST","/delete",{path:e}),reveal:e=>ts("POST","/reveal",{path:e}),copyToClipboard:e=>ts("POST","/clipboard",{path:e}),copy:(e,i)=>ts("POST","/copy",{from:e,folder:i})},nL=e=>/\.(md|markdown|mdx)$/i.test(e),iL=e=>/\.(html?|xhtml)$/i.test(e);function zy(e){var r;const i=((r=e.split(".").pop())==null?void 0:r.toLowerCase())??"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif","svg"].includes(i)?"image":["mp3","wav","ogg","oga","m4a","aac","flac","opus","weba"].includes(i)?"audio":["mp4","webm","ogv","mov","m4v","mkv"].includes(i)?"video":null}const Tm=e=>`${Hi()}/files/raw/${e.split("/").map(encodeURIComponent).join("/")}`,rL="modulepreload",sL=function(e){return"/"+e},Hy={},oL=function(i,r,s){let l=Promise.resolve();if(r&&r.length>0){let f=function(d){return Promise.all(d.map(m=>Promise.resolve(m).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),h=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));l=f(r.map(d=>{if(d=sL(d),d in Hy)return;Hy[d]=!0;const m=d.endsWith(".css"),c=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${c}`))return;const _=document.createElement("link");if(_.rel=m?"stylesheet":rL,m||(_.as="script"),_.crossOrigin="",_.href=d,h&&_.setAttribute("nonce",h),document.head.appendChild(_),m)return new Promise((y,E)=>{_.addEventListener("load",y),_.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${d}`)))})}))}function p(f){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=f,window.dispatchEvent(a),!a.defaultPrevented)throw f}return l.then(f=>{for(const a of f||[])a.status==="rejected"&&p(a.reason);return i().catch(p)})},aL=P.lazy(()=>oL(()=>import("./MonacoEditor-Bg4hRqI5.js").then(e=>e.b),__vite__mapDeps([0,1])));function xC(e){return v.jsx(P.Suspense,{fallback:v.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"Loading editor..."}),children:v.jsx(aL,{...e})})}function lL(e,i){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const cL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hL={};function Fy(e,i){return(hL.jsx?uL:cL).test(e)}const dL=/[ \t\n\f\r]/g;function fL(e){return typeof e=="object"?e.type==="text"?Uy(e.value):!1:Uy(e)}function Uy(e){return e.replace(dL,"")===""}class Xl{constructor(i,r,s){this.normal=r,this.property=i,s&&(this.space=s)}}Xl.prototype.normal={};Xl.prototype.property={};Xl.prototype.space=void 0;function yC(e,i){const r={},s={};for(const l of e)Object.assign(r,l.property),Object.assign(s,l.normal);return new Xl(r,s,i)}function Rm(e){return e.toLowerCase()}class In{constructor(i,r){this.attribute=r,this.property=i}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let pL=0;const Ue=Zs(),Ht=Zs(),Am=Zs(),xe=Zs(),xt=Zs(),$s=Zs(),Xn=Zs();function Zs(){return 2**++pL}const Lm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Ht,commaOrSpaceSeparated:Xn,commaSeparated:$s,number:xe,overloadedBoolean:Am,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),Bp=Object.keys(Lm);class Ig extends In{constructor(i,r,s,l){let p=-1;if(super(i,r),$y(this,"space",l),typeof s=="number")for(;++p<Bp.length;){const f=Bp[p];$y(this,Bp[p],(s&Lm[f])===Lm[f])}}}Ig.prototype.defined=!0;function $y(e,i,r){r&&(e[i]=r)}function ya(e){const i={},r={};for(const[s,l]of Object.entries(e.properties)){const p=new Ig(s,e.transform(e.attributes||{},s),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(p.mustUseProperty=!0),i[s]=p,r[Rm(s)]=s,r[Rm(p.attribute)]=s}return new Xl(i,r,e.space)}const bC=ya({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:xt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:xe,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:xt,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:Ht,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function SC(e,i){return i in e?e[i]:i}function wC(e,i){return SC(e,i.toLowerCase())}const mL=ya({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$s,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alpha:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:xt,autoFocus:Ue,autoPlay:Ue,blocking:xt,capture:null,charSet:null,checked:Ue,cite:null,className:xt,closedBy:null,colorSpace:null,cols:xe,colSpan:xe,command:null,commandFor:null,content:null,contentEditable:Ht,controls:Ue,controlsList:xt,coords:xe|$s,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Am,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:xt,height:xe,hidden:Am,high:xe,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ue,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:xe,pattern:null,ping:xt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:xt,required:Ue,reversed:Ue,rows:xe,rowSpan:xe,sandbox:xt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootCustomElementRegistry:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shadowRootSerializable:Ue,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Ht,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ue,disablePictureInPicture:Ue,disableRemotePlayback:Ue,exportParts:$s,part:xt,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:wC}),gL=ya({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Xn,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$s,g2:$s,glyphName:$s,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:Xn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xn,rev:Xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xn,requiredFeatures:Xn,requiredFonts:Xn,requiredFormats:Xn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:Xn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xn,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:SC}),CC=ya({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,i){return"xlink:"+i.slice(5).toLowerCase()}}),EC=ya({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wC}),kC=ya({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,i){return"xml:"+i.slice(3).toLowerCase()}}),vL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_L=/[A-Z]/g,qy=/-[a-z]/g,xL=/^data[-\w.:]+$/i;function yL(e,i){const r=Rm(i);let s=i,l=In;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&xL.test(i)){if(i.charAt(4)==="-"){const p=i.slice(5).replace(qy,SL);s="data"+p.charAt(0).toUpperCase()+p.slice(1)}else{const p=i.slice(4);if(!qy.test(p)){let f=p.replace(_L,bL);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}l=Ig}return new l(s,i)}function bL(e){return"-"+e.toLowerCase()}function SL(e){return e.charAt(1).toUpperCase()}const wL=yC([bC,mL,CC,EC,kC],"html"),zg=yC([bC,gL,CC,EC,kC],"svg");function CL(e){return e.join(" ").trim()}var Qo={},Pp,Vy;function EL(){if(Vy)return Pp;Vy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,p=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,h=`
|
|
494
|
-
`,d="/",m="*",c="",_="comment",y="declaration";function E(g,b){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];b=b||{};var w=1,x=1;function T(U){var W=U.match(i);W&&(w+=W.length);var Y=U.lastIndexOf(h);x=~Y?U.length-Y:x+U.length}function D(){var U={line:w,column:x};return function(W){return W.position=new R(U),j(),W}}function R(U){this.start=U,this.end={line:w,column:x},this.source=b.source}R.prototype.content=g;function L(U){var W=new Error(b.source+":"+w+":"+x+": "+U);if(W.reason=U,W.filename=b.source,W.line=w,W.column=x,W.source=g,!b.silent)throw W}function A(U){var W=U.exec(g);if(W){var Y=W[0];return T(Y),g=g.slice(Y.length),W}}function j(){A(r)}function M(U){var W;for(U=U||[];W=I();)W!==!1&&U.push(W);return U}function I(){var U=D();if(!(d!=g.charAt(0)||m!=g.charAt(1))){for(var W=2;c!=g.charAt(W)&&(m!=g.charAt(W)||d!=g.charAt(W+1));)++W;if(W+=2,c===g.charAt(W-1))return L("End of comment missing");var Y=g.slice(2,W-2);return x+=2,T(Y),g=g.slice(W),x+=2,U({type:_,comment:Y})}}function B(){var U=D(),W=A(s);if(W){if(I(),!A(l))return L("property missing ':'");var Y=A(p),Q=U({type:y,property:S(W[0].replace(e,c)),value:Y?S(Y[0].replace(e,c)):c});return A(f),Q}}function H(){var U=[];M(U);for(var W;W=B();)W!==!1&&(U.push(W),M(U));return U}return j(),H()}function S(g){return g?g.replace(a,c):c}return Pp=E,Pp}var Wy;function kL(){if(Wy)return Qo;Wy=1;var e=Qo&&Qo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=r;const i=e(EL());function r(s,l){let p=null;if(!s||typeof s!="string")return p;const f=(0,i.default)(s),a=typeof l=="function";return f.forEach(h=>{if(h.type!=="declaration")return;const{property:d,value:m}=h;a?l(d,m,h):m&&(p=p||{},p[d]=m)}),p}return Qo}var xl={},Gy;function TL(){if(Gy)return xl;Gy=1,Object.defineProperty(xl,"__esModule",{value:!0}),xl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,p=function(d){return!d||r.test(d)||e.test(d)},f=function(d,m){return m.toUpperCase()},a=function(d,m){return"".concat(m,"-")},h=function(d,m){return m===void 0&&(m={}),p(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(l,a):d=d.replace(s,a),d.replace(i,f))};return xl.camelCase=h,xl}var yl,Yy;function RL(){if(Yy)return yl;Yy=1;var e=yl&&yl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},i=e(kL()),r=TL();function s(l,p){var f={};return!l||typeof l!="string"||(0,i.default)(l,function(a,h){a&&h&&(f[(0,r.camelCase)(a,p)]=h)}),f}return s.default=s,yl=s,yl}var AL=RL();const LL=Km(AL),TC=RC("end"),Hg=RC("start");function RC(e){return i;function i(r){const s=r&&r.position&&r.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function DL(e){const i=Hg(e),r=TC(e);if(i&&r)return{start:i,end:r}}function kl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xy(e.position):"start"in e||"end"in e?Xy(e):"line"in e||"column"in e?Dm(e):""}function Dm(e){return Ky(e&&e.line)+":"+Ky(e&&e.column)}function Xy(e){return Dm(e&&e.start)+"-"+Dm(e&&e.end)}function Ky(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(i,r,s){super(),typeof r=="string"&&(s=r,r=void 0);let l="",p={},f=!1;if(r&&("line"in r&&"column"in r?p={place:r}:"start"in r&&"end"in r?p={place:r}:"type"in r?p={ancestors:[r],place:r.position}:p={...r}),typeof i=="string"?l=i:!p.cause&&i&&(f=!0,l=i.message,p.cause=i),!p.ruleId&&!p.source&&typeof s=="string"){const h=s.indexOf(":");h===-1?p.ruleId=s:(p.source=s.slice(0,h),p.ruleId=s.slice(h+1))}if(!p.place&&p.ancestors&&p.ancestors){const h=p.ancestors[p.ancestors.length-1];h&&(p.place=h.position)}const a=p.place&&"start"in p.place?p.place.start:p.place;this.ancestors=p.ancestors||void 0,this.cause=p.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=a?a.line:void 0,this.name=kl(p.place)||"1:1",this.place=p.place||void 0,this.reason=this.message,this.ruleId=p.ruleId||void 0,this.source=p.source||void 0,this.stack=f&&p.cause&&typeof p.cause.stack=="string"?p.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="";gn.prototype.name="";gn.prototype.reason="";gn.prototype.message="";gn.prototype.stack="";gn.prototype.column=void 0;gn.prototype.line=void 0;gn.prototype.ancestors=void 0;gn.prototype.cause=void 0;gn.prototype.fatal=void 0;gn.prototype.place=void 0;gn.prototype.ruleId=void 0;gn.prototype.source=void 0;const Fg={}.hasOwnProperty,ML=new Map,jL=/[A-Z]/g,OL=new Set(["table","tbody","thead","tfoot","tr"]),NL=new Set(["td","th"]),AC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BL(e,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let s;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=qL(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=$L(r,i.jsx,i.jsxs)}const l={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:s,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?zg:wL,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},p=LC(l,e,void 0);return p&&typeof p!="string"?p:l.create(e,l.Fragment,{children:p||void 0},void 0)}function LC(e,i,r){if(i.type==="element")return PL(e,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return IL(e,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return HL(e,i,r);if(i.type==="mdxjsEsm")return zL(e,i);if(i.type==="root")return FL(e,i,r);if(i.type==="text")return UL(e,i)}function PL(e,i,r){const s=e.schema;let l=s;i.tagName.toLowerCase()==="svg"&&s.space==="html"&&(l=zg,e.schema=l),e.ancestors.push(i);const p=MC(e,i.tagName,!1),f=VL(e,i);let a=$g(e,i);return OL.has(i.tagName)&&(a=a.filter(function(h){return typeof h=="string"?!fL(h):!0})),DC(e,f,p,i),Ug(f,a),e.ancestors.pop(),e.schema=s,e.create(i,p,f,r)}function IL(e,i){if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Nl(e,i.position)}function zL(e,i){if(i.data&&i.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(i.data.estree);Nl(e,i.position)}function HL(e,i,r){const s=e.schema;let l=s;i.name==="svg"&&s.space==="html"&&(l=zg,e.schema=l),e.ancestors.push(i);const p=i.name===null?e.Fragment:MC(e,i.name,!0),f=WL(e,i),a=$g(e,i);return DC(e,f,p,i),Ug(f,a),e.ancestors.pop(),e.schema=s,e.create(i,p,f,r)}function FL(e,i,r){const s={};return Ug(s,$g(e,i)),e.create(i,e.Fragment,s,r)}function UL(e,i){return i.value}function DC(e,i,r,s){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(i.node=s)}function Ug(e,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(e.children=r)}}function $L(e,i,r){return s;function s(l,p,f,a){const d=Array.isArray(f.children)?r:i;return a?d(p,f,a):d(p,f)}}function qL(e,i){return r;function r(s,l,p,f){const a=Array.isArray(p.children),h=Hg(s);return i(l,p,f,a,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function VL(e,i){const r={};let s,l;for(l in i.properties)if(l!=="children"&&Fg.call(i.properties,l)){const p=GL(e,l,i.properties[l]);if(p){const[f,a]=p;e.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&NL.has(i.tagName)?s=a:r[f]=a}}if(s){const p=r.style||(r.style={});p[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return r}function WL(e,i){const r={};for(const s of i.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const p=s.data.estree.body[0];p.type;const f=p.expression;f.type;const a=f.properties[0];a.type,Object.assign(r,e.evaluater.evaluateExpression(a.argument))}else Nl(e,i.position);else{const l=s.name;let p;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const a=s.value.data.estree.body[0];a.type,p=e.evaluater.evaluateExpression(a.expression)}else Nl(e,i.position);else p=s.value===null?!0:s.value;r[l]=p}return r}function $g(e,i){const r=[];let s=-1;const l=e.passKeys?new Map:ML;for(;++s<i.children.length;){const p=i.children[s];let f;if(e.passKeys){const h=p.type==="element"?p.tagName:p.type==="mdxJsxFlowElement"||p.type==="mdxJsxTextElement"?p.name:void 0;if(h){const d=l.get(h)||0;f=h+"-"+d,l.set(h,d+1)}}const a=LC(e,p,f);a!==void 0&&r.push(a)}return r}function GL(e,i,r){const s=yL(e.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=s.commaSeparated?lL(r):CL(r)),s.property==="style"){let l=typeof r=="object"?r:YL(e,String(r));return e.stylePropertyNameCase==="css"&&(l=XL(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&s.space?vL[s.property]||s.property:s.attribute,r]}}function YL(e,i){try{return LL(i,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const s=r,l=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=AC+"#cannot-parse-style-attribute",l}}function MC(e,i,r){let s;if(!r)s={type:"Literal",value:i};else if(i.includes(".")){const l=i.split(".");let p=-1,f;for(;++p<l.length;){const a=Fy(l[p])?{type:"Identifier",name:l[p]}:{type:"Literal",value:l[p]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(p&&a.type==="Literal"),optional:!1}:a}s=f}else s=Fy(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(s.type==="Literal"){const l=s.value;return Fg.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(s);Nl(e)}function Nl(e,i){const r=new gn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=AC+"#cannot-handle-mdx-estrees-without-createevaluater",r}function XL(e){const i={};let r;for(r in e)Fg.call(e,r)&&(i[KL(r)]=e[r]);return i}function KL(e){let i=e.replace(jL,QL);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function QL(e){return"-"+e.toLowerCase()}const Ip={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ZL={};function qg(e,i){const r=ZL,s=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return jC(e,s,l)}function jC(e,i,r){if(JL(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(i&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qy(e.children,i,r)}return Array.isArray(e)?Qy(e,i,r):""}function Qy(e,i,r){const s=[];let l=-1;for(;++l<e.length;)s[l]=jC(e[l],i,r);return s.join("")}function JL(e){return!!(e&&typeof e=="object")}const Zy=document.createElement("i");function Vg(e){const i="&"+e+";";Zy.innerHTML=i;const r=Zy.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===i?!1:r}function Si(e,i,r,s){const l=e.length;let p=0,f;if(i<0?i=-i>l?0:l+i:i=i>l?l:i,r=r>0?r:0,s.length<1e4)f=Array.from(s),f.unshift(i,r),e.splice(...f);else for(r&&e.splice(i,r);p<s.length;)f=s.slice(p,p+1e4),f.unshift(i,0),e.splice(...f),p+=1e4,i+=1e4}function ui(e,i){return e.length>0?(Si(e,e.length,0,i),e):i}const Jy={}.hasOwnProperty;function OC(e){const i={};let r=-1;for(;++r<e.length;)eD(i,e[r]);return i}function eD(e,i){let r;for(r in i){const l=(Jy.call(e,r)?e[r]:void 0)||(e[r]={}),p=i[r];let f;if(p)for(f in p){Jy.call(l,f)||(l[f]=[]);const a=p[f];tD(l[f],Array.isArray(a)?a:a?[a]:[])}}}function tD(e,i){let r=-1;const s=[];for(;++r<i.length;)(i[r].add==="after"?e:s).push(i[r]);Si(e,0,0,s)}function NC(e,i){const r=Number.parseInt(e,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function wi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dn=ms(/[A-Za-z]/),fn=ms(/[\dA-Za-z]/),nD=ms(/[#-'*+\--9=?A-Z^-~]/);function oh(e){return e!==null&&(e<32||e===127)}const Mm=ms(/\d/),iD=ms(/[\dA-Fa-f]/),BC=ms(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Mh=ms(new RegExp("\\p{P}|\\p{S}","u")),Xs=ms(/\s/);function ms(e){return i;function i(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ba(e){const i=[];let r=-1,s=0,l=0;for(;++r<e.length;){const p=e.charCodeAt(r);let f="";if(p===37&&fn(e.charCodeAt(r+1))&&fn(e.charCodeAt(r+2)))l=2;else if(p<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(p))||(f=String.fromCharCode(p));else if(p>55295&&p<57344){const a=e.charCodeAt(r+1);p<56320&&a>56319&&a<57344?(f=String.fromCharCode(p,a),l=1):f="�"}else f=String.fromCharCode(p);f&&(i.push(e.slice(s,r),encodeURIComponent(f)),s=r+l+1,f=""),l&&(r+=l,l=0)}return i.join("")+e.slice(s)}function ot(e,i,r,s){const l=s?s-1:1/0;let p=0;return f;function f(h){return Ke(h)?(e.enter(r),a(h)):i(h)}function a(h){return Ke(h)&&p++<l?(e.consume(h),a):(e.exit(r),i(h))}}function PC(e,i,r,s,l,p){let f=0;return a;function a(m){return Ke(m)?(e.enter(s),h(m)):d(m)}function h(m){return Ke(m)&&f<p?(e.consume(m),f++,h):(e.exit(s),d(m))}function d(m){return f>=l?i(m):r(m)}}const rD={tokenize:sD};function sD(e){const i=e.attempt(this.parser.constructs.contentInitial,s,l);let r;return i;function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ot(e,i,"linePrefix")}function l(a){return e.enter("paragraph"),p(a)}function p(a){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,f(a)}function f(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return Ne(a)?(e.consume(a),e.exit("chunkText"),p):(e.consume(a),f)}}let ah=class{constructor(){this.index=new Map,this.map=[]}add(i,r,s){eb(this,i,r,s,!1)}addBefore(i,r,s){eb(this,i,r,s,!0)}consume(i){if(this.map.sort(function(p,f){return p[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const s=[];for(;r>0;)r-=1,s.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];s.push(i.slice()),i.length=0;let l=s.pop();for(;l;){for(const p of l)i.push(p);l=s.pop()}this.map.length=0,this.index.clear()}};function eb(e,i,r,s,l){if(r===0&&s.length===0)return;const p=e.index.get(i);if(p){p[1]+=r,l?(s.push(...p[2]),p[2]=s):p[2].push(...s);return}const f=[i,r,s];e.map.push(f),e.index.set(i,f)}const oD={tokenize:aD},tb={tokenize:lD};function aD(e){const i=this,r=[];let s=0,l,p,f;return a;function a(x){if(s<r.length){const T=r[s];return i.containerState=T[1],e.attempt(T[0].continuation,h,d)(x)}return d(x)}function h(x){if(s++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,l&&w();const T=i.events.length;let D=T,R;for(;D--;)if(i.events[D][0]==="exit"&&i.events[D][1].type==="chunkFlow"){R=i.events[D][1].end;break}b(s);let L=T;for(;L<i.events.length;)i.events[L][1].end={...R},L++;const A=new ah;return A.add(D+1,0,i.events.slice(T)),A.add(T,L-T,[]),A.consume(i.events),d(x)}return a(x)}function d(x){if(s===r.length){if(!l)return _(x);if(l.currentConstruct&&l.currentConstruct.concrete)return E(x);i.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(tb,m,c)(x)}function m(x){return l&&w(),b(s),_(x)}function c(x){return i.parser.lazy[i.now().line]=s!==r.length,f=i.now().offset,E(x)}function _(x){return i.containerState={},e.attempt(tb,y,E)(x)}function y(x){return s++,r.push([i.currentConstruct,i.containerState]),_(x)}function E(x){if(x===null){l&&w(),b(0),e.consume(x);return}return l=l||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:p}),S(x)}function S(x){if(x===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(x);return}return Ne(x)?(e.consume(x),g(e.exit("chunkFlow")),s=0,i.interrupt=void 0,a):(e.consume(x),S)}function g(x,T){const D=i.sliceStream(x);if(T&&D.push(null),x.previous=p,p&&(p.next=x),p=x,l.defineSkip(x.start),l.write(D),i.parser.lazy[x.start.line]){let R=l.events.length;for(;R--;)if(l.events[R][1].start.offset<f&&(!l.events[R][1].end||l.events[R][1].end.offset>f))return;const L=i.events.length;let A=L,j,M;for(;A--;)if(i.events[A][0]==="exit"&&i.events[A][1].type==="chunkFlow"){if(j){M=i.events[A][1].end;break}j=!0}for(b(s),R=L;R<i.events.length;)i.events[R][1].end={...M},R++;const I=new ah;I.add(A+1,0,i.events.slice(L)),I.add(L,R-L,[]),I.consume(i.events)}}function b(x){let T=r.length;for(;T-- >x;){const D=r[T];i.containerState=D[1],D[0].exit.call(i,e)}r.length=x}function w(){l.write([null]),p=void 0,l=void 0,i.containerState._closeFlow=void 0}}function lD(e,i,r){return ot(e,e.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hs(e){if(e===null||yt(e)||Xs(e))return 1;if(Mh(e))return 2}function jh(e,i,r){const s=[];let l=-1;for(;++l<e.length;){const p=e[l].resolveAll;p&&!s.includes(p)&&(i=p(i,r),s.push(p))}return i}const jm={name:"attention",resolveAll:cD,tokenize:uD};function cD(e,i){let r=-1,s;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){let l=r;for(;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&i.sliceSerialize(e[l][1]).charCodeAt(0)===i.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[l][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const p=e[l][1].end.offset-e[l][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,f={...e[l][1].end},a={...e[r][1].start};nb(f,-p),nb(a,p);const h={type:p>1?"strongSequence":"emphasisSequence",start:f,end:{...e[l][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:a},m={type:p>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[r][1].start}},c={type:p>1?"strong":"emphasis",start:{...h.start},end:{...d.end}};e[l][1].end={...h.start},e[r][1].start={...d.end},s=[],e[l][1].end.offset-e[l][1].start.offset&&(s=ui(s,[["enter",e[l][1],i],["exit",e[l][1],i]])),s=ui(s,[["enter",c,i],["enter",h,i],["exit",h,i],["enter",m,i]]),s=ui(s,jh(i.parser.constructs.insideSpan.null,e.slice(l+1,r),i)),s=ui(s,[["exit",m,i],["enter",d,i],["exit",d,i],["exit",c,i]]);let _=0;e[r][1].end.offset-e[r][1].start.offset&&(_=2,s=ui(s,[["enter",e[r][1],i],["exit",e[r][1],i]])),Si(e,l-1,r-l+3,s),r=l+s.length-_-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function uD(e,i){const r=this.parser.constructs.attentionMarkers.null,s=this.previous,l=hs(s);let p;return f;function f(h){return p=h,e.enter("attentionSequence"),a(h)}function a(h){if(h===p)return e.consume(h),a;const d=e.exit("attentionSequence"),m=hs(h),c=!m||m===2&&l||r.includes(h)&&h!==42&&h!==95,_=!l||l===2&&m||r.includes(s)&&s!==42&&s!==95;return d._open=!!(p===42?c:c&&(l||!_)),d._close=!!(p===42?_:_&&(m||!c)),i(h)}}function nb(e,i){e.column+=i,e.offset+=i,e._bufferIndex+=i}const hD={name:"autolink",tokenize:dD};function dD(e,i,r){let s=0;return l;function l(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),p}function p(y){return dn(y)?(e.consume(y),f):y===64?r(y):d(y)}function f(y){return y===43||y===45||y===46||fn(y)?(s=1,a(y)):d(y)}function a(y){return y===58?(e.consume(y),s=0,h):(y===43||y===45||y===46||fn(y))&&s++<32?(e.consume(y),a):(s=0,d(y))}function h(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),i):y===null||y===32||y===60||oh(y)?r(y):(e.consume(y),h)}function d(y){return y===64?(e.consume(y),m):nD(y)?(e.consume(y),d):r(y)}function m(y){return fn(y)?c(y):r(y)}function c(y){return y===46?(e.consume(y),s=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),i):_(y)}function _(y){if((y===45||fn(y))&&s++<63){const E=y===45?_:c;return e.consume(y),E}return r(y)}}const Kl={partial:!0,tokenize:fD};function fD(e,i,r){return s;function s(p){return Ke(p)?ot(e,l,"linePrefix")(p):l(p)}function l(p){return p===null||Ne(p)?i(p):r(p)}}const IC={continuation:{tokenize:mD},exit:gD,name:"blockQuote",tokenize:pD};function pD(e,i,r){const s=this;return l;function l(f){if(f===62){const a=s.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(f),e.exit("blockQuoteMarker"),p}return r(f)}function p(f){return Ke(f)?(e.enter("blockQuotePrefixWhitespace"),e.consume(f),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),i):(e.exit("blockQuotePrefix"),i(f))}}function mD(e,i,r){const s=this;return l;function l(f){return Ke(f)?ot(e,p,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):p(f)}function p(f){return e.attempt(IC,i,r)(f)}}function gD(e){e.exit("blockQuote")}const zC={name:"characterEscape",tokenize:vD};function vD(e,i,r){return s;function s(p){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(p),e.exit("escapeMarker"),l}function l(p){return BC(p)?(e.enter("characterEscapeValue"),e.consume(p),e.exit("characterEscapeValue"),e.exit("characterEscape"),i):r(p)}}const HC={name:"characterReference",tokenize:_D};function _D(e,i,r){const s=this;let l=0,p,f;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),h}function h(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),p=31,f=fn,m(c))}function d(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),p=6,f=iD,m):(e.enter("characterReferenceValue"),p=7,f=Mm,m(c))}function m(c){if(c===59&&l){const _=e.exit("characterReferenceValue");return f===fn&&!Vg(s.sliceSerialize(_))?r(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),i)}return f(c)&&l++<p?(e.consume(c),m):r(c)}}const Om={partial:!0,tokenize:xD};function xD(e,i,r){const s=this;return l;function l(f){return f===null?r(f):(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p)}function p(f){return s.parser.lazy[s.now().line]?r(f):i(f)}}const ib={concrete:!0,name:"codeFenced",tokenize:yD};function yD(e,i,r){const s=this,l={partial:!0,tokenize:D};let p=0,f=0,a;return h;function h(R){return d(R)}function d(R){const L=s.events[s.events.length-1];return p=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(R)}function m(R){return R===a?(f++,e.consume(R),m):f<3?r(R):(e.exit("codeFencedFenceSequence"),Ke(R)?ot(e,c,"whitespace")(R):c(R))}function c(R){return R===null||Ne(R)?(e.exit("codeFencedFence"),s.interrupt?i(R):e.check(Om,S,T)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Ne(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(R)):Ke(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ot(e,y,"whitespace")(R)):R===96&&R===a?r(R):(e.consume(R),_)}function y(R){return R===null||Ne(R)?c(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(R))}function E(R){return R===null||Ne(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(R)):R===96&&R===a?r(R):(e.consume(R),E)}function S(R){return e.attempt(l,T,g)(R)}function g(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),b}function b(R){return p>0&&Ke(R)?ot(e,w,"linePrefix",p+1)(R):w(R)}function w(R){return R===null||Ne(R)?e.check(Om,S,T)(R):(e.enter("codeFlowValue"),x(R))}function x(R){return R===null||Ne(R)?(e.exit("codeFlowValue"),w(R)):(e.consume(R),x)}function T(R){return e.exit("codeFenced"),i(R)}function D(R,L,A){let j=0;return M;function M(W){return R.enter("lineEnding"),R.consume(W),R.exit("lineEnding"),I}function I(W){return R.enter("codeFencedFence"),Ke(W)?ot(R,B,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):B(W)}function B(W){return W===a?(R.enter("codeFencedFenceSequence"),H(W)):A(W)}function H(W){return W===a?(j++,R.consume(W),H):j>=f?(R.exit("codeFencedFenceSequence"),Ke(W)?ot(R,U,"whitespace")(W):U(W)):A(W)}function U(W){return W===null||Ne(W)?(R.exit("codeFencedFence"),L(W)):A(W)}}}const zp={name:"codeIndented",tokenize:SD},bD={partial:!0,tokenize:wD};function SD(e,i,r){return s;function s(a){return e.enter("codeIndented"),PC(e,l,r,"linePrefix",4,4)(a)}function l(a){return a===null?f(a):Ne(a)?e.attempt(bD,l,f)(a):(e.enter("codeFlowValue"),p(a))}function p(a){return a===null||Ne(a)?(e.exit("codeFlowValue"),l(a)):(e.consume(a),p)}function f(a){return e.exit("codeIndented"),i(a)}}function wD(e,i,r){const s=this;return l;function l(f){return s.parser.lazy[s.now().line]?r(f):Ne(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):PC(e,i,p,"linePrefix",4,4)(f)}function p(f){return Ne(f)?l(f):r(f)}}const CD={name:"codeText",previous:kD,resolve:ED,tokenize:TD};function ED(e){let i=e.length-4,r=3,s,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[i][1].type==="lineEnding"||e[i][1].type==="space")){for(s=r;++s<i;)if(e[s][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(s=r-1,i++;++s<=i;)l===void 0?s!==i&&e[s][1].type!=="lineEnding"&&(l=s):(s===i||e[s][1].type==="lineEnding")&&(e[l][1].type="codeTextData",s!==l+2&&(e[l][1].end=e[s-1][1].end,e.splice(l+2,s-l-2),i-=s-l-2,s=l+2),l=void 0);return e}function kD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TD(e,i,r){let s=0,l,p;return f;function f(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),s++,a):(e.exit("codeTextSequence"),h(c))}function h(c){return c===null?r(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),h):c===96?(p=e.enter("codeTextSequence"),l=0,m(c)):Ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),h):(e.enter("codeTextData"),d(c))}function d(c){return c===null||c===32||c===96||Ne(c)?(e.exit("codeTextData"),h(c)):(e.consume(c),d)}function m(c){return c===96?(e.consume(c),l++,m):l===s?(e.exit("codeTextSequence"),e.exit("codeText"),i(c)):(p.type="codeTextData",d(c))}}class RD{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const s=r??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(i,s):i>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(i,r,s){const l=r||0;this.setCursor(Math.trunc(i));const p=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return s&&bl(this.left,s),p.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),bl(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),bl(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);bl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);bl(this.left,r.reverse())}}}function bl(e,i){let r=0;if(i.length<1e4)e.push(...i);else for(;r<i.length;)e.push(...i.slice(r,r+1e4)),r+=1e4}function FC(e){const i={};let r=-1,s,l,p,f,a,h,d;const m=new RD(e);for(;++r<m.length;){for(;r in i;)r=i[r];if(s=m.get(r),r&&s[1].type==="chunkFlow"&&m.get(r-1)[1].type==="listItemPrefix"&&(h=s[1]._tokenizer.events,p=0,p<h.length&&h[p][1].type==="lineEndingBlank"&&(p+=2),p<h.length&&h[p][1].type==="content"))for(;++p<h.length&&h[p][1].type!=="content";)h[p][1].type==="chunkText"&&(h[p][1]._isInFirstContentOfListItem=!0,p++);if(s[0]==="enter")s[1].contentType&&(Object.assign(i,AD(m,r)),r=i[r],d=!0);else if(s[1]._container){for(p=r,l=void 0;p--;)if(f=m.get(p),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(l&&(m.get(l)[1].type="lineEndingBlank"),f[1].type="lineEnding",l=p);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;l&&(s[1].end={...m.get(l)[1].start},a=m.slice(l,r),a.unshift(s),m.splice(l,r-l+1,a))}}return Si(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!d}function AD(e,i){const r=e.get(i)[1],s=e.get(i)[2];let l=i-1;const p=[];let f=r._tokenizer;f||(f=s.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,h=[],d={};let m,c,_=-1,y=r,E=0,S=0;const g=[S];for(;y;){for(;e.get(++l)[1]!==y;);p.push(l),y._tokenizer||(m=s.sliceStream(y),y.next||m.push(null),c&&f.defineSkip(y.start),y._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(m),y._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),c=y,y=y.next}for(y=r;++_<a.length;)a[_][0]==="exit"&&a[_-1][0]==="enter"&&a[_][1].type===a[_-1][1].type&&a[_][1].start.line!==a[_][1].end.line&&(S=_+1,g.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(f.events=[],y?(y._tokenizer=void 0,y.previous=void 0):g.pop(),_=g.length;_--;){const b=a.slice(g[_],g[_+1]),w=p.pop();h.push([w,w+b.length-1]),e.splice(w,2,b)}for(h.reverse(),_=-1;++_<h.length;)d[E+h[_][0]]=E+h[_][1],E+=h[_][1]-h[_][0]-1;return d}const LD={resolve:MD,tokenize:jD},DD={partial:!0,tokenize:OD};function MD(e){return FC(e),e}function jD(e,i){let r;return s;function s(a){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(a)}function l(a){return a===null?p(a):Ne(a)?e.check(DD,f,p)(a):(e.consume(a),l)}function p(a){return e.exit("chunkContent"),e.exit("content"),i(a)}function f(a){return e.consume(a),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function OD(e,i,r){const s=this;return l;function l(f){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ot(e,p,"linePrefix")}function p(f){if(f===null||Ne(f))return r(f);const a=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?i(f):e.interrupt(s.parser.constructs.flow,r,i)(f)}}function UC(e,i,r,s,l,p,f,a,h){const d=h||Number.POSITIVE_INFINITY;let m=0;return c;function c(b){return b===60?(e.enter(s),e.enter(l),e.enter(p),e.consume(b),e.exit(p),_):b===null||b===32||b===41||oh(b)?r(b):(e.enter(s),e.enter(f),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(b))}function _(b){return b===62?(e.enter(p),e.consume(b),e.exit(p),e.exit(l),e.exit(s),i):(e.enter(a),e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===62?(e.exit("chunkString"),e.exit(a),_(b)):b===null||b===60||Ne(b)?r(b):(e.consume(b),b===92?E:y)}function E(b){return b===60||b===62||b===92?(e.consume(b),y):y(b)}function S(b){return!m&&(b===null||b===41||yt(b))?(e.exit("chunkString"),e.exit(a),e.exit(f),e.exit(s),i(b)):m<d&&b===40?(e.consume(b),m++,S):b===41?(e.consume(b),m--,S):b===null||b===32||b===40||oh(b)?r(b):(e.consume(b),b===92?g:S)}function g(b){return b===40||b===41||b===92?(e.consume(b),S):S(b)}}function $C(e,i,r,s,l,p){const f=this;let a=0,h;return d;function d(y){return e.enter(s),e.enter(l),e.consume(y),e.exit(l),e.enter(p),m}function m(y){return a>999||y===null||y===91||y===93&&!h||y===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?r(y):y===93?(e.exit(p),e.enter(l),e.consume(y),e.exit(l),e.exit(s),i):Ne(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),c(y))}function c(y){return y===null||y===91||y===93||Ne(y)||a++>999?(e.exit("chunkString"),m(y)):(e.consume(y),h||(h=!Ke(y)),y===92?_:c)}function _(y){return y===91||y===92||y===93?(e.consume(y),a++,c):c(y)}}function qC(e,i,r,s,l,p){let f;return a;function a(_){return _===34||_===39||_===40?(e.enter(s),e.enter(l),e.consume(_),e.exit(l),f=_===40?41:_,h):r(_)}function h(_){return _===f?(e.enter(l),e.consume(_),e.exit(l),e.exit(s),i):(e.enter(p),d(_))}function d(_){return _===f?(e.exit(p),h(f)):_===null?r(_):Ne(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),ot(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===f||_===null||Ne(_)?(e.exit("chunkString"),d(_)):(e.consume(_),_===92?c:m)}function c(_){return _===f||_===92?(e.consume(_),m):m(_)}}function Tl(e,i){let r;return s;function s(l){return Ne(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,s):Ke(l)?ot(e,s,r?"linePrefix":"lineSuffix")(l):i(l)}}const ND={name:"definition",tokenize:PD},BD={partial:!0,tokenize:ID};function PD(e,i,r){const s=this;let l;return p;function p(y){return e.enter("definition"),f(y)}function f(y){return $C.call(s,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function a(y){return l=wi(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),h):r(y)}function h(y){return yt(y)?Tl(e,d)(y):d(y)}function d(y){return UC(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(BD,c,c)(y)}function c(y){return Ke(y)?ot(e,_,"whitespace")(y):_(y)}function _(y){return y===null||Ne(y)?(e.exit("definition"),s.parser.defined.push(l),i(y)):r(y)}}function ID(e,i,r){return s;function s(a){return yt(a)?Tl(e,l)(a):r(a)}function l(a){return qC(e,p,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function p(a){return Ke(a)?ot(e,f,"whitespace")(a):f(a)}function f(a){return a===null||Ne(a)?i(a):r(a)}}const zD={name:"hardBreakEscape",tokenize:HD};function HD(e,i,r){return s;function s(p){return e.enter("hardBreakEscape"),e.consume(p),l}function l(p){return Ne(p)?(e.exit("hardBreakEscape"),i(p)):r(p)}}const FD={name:"headingAtx",resolve:UD,tokenize:$D};function UD(e,i){let r=e.length-2,s=3;if(e[s][1].type==="whitespace"&&(s+=2),r-2>s&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(s===r-1||r-4>s&&e[r-2][1].type==="whitespace")&&(r-=s+1===r?2:4),r>s){const l={type:"atxHeadingText",start:e[s][1].start,end:e[r][1].end},p={type:"chunkText",start:e[s][1].start,end:e[r][1].end,contentType:"text"};Si(e,s,r-s+1,[["enter",l,i],["enter",p,i],["exit",p,i],["exit",l,i]])}return e}function $D(e,i,r){let s=0;return l;function l(m){return e.enter("atxHeading"),p(m)}function p(m){return e.enter("atxHeadingSequence"),f(m)}function f(m){return m===35&&s++<6?(e.consume(m),f):m===null||yt(m)?(e.exit("atxHeadingSequence"),a(m)):r(m)}function a(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ne(m)?(e.exit("atxHeading"),i(m)):Ke(m)?ot(e,a,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),a(m))}function d(m){return m===null||m===35||yt(m)?(e.exit("atxHeadingText"),a(m)):(e.consume(m),d)}}const VC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nm=["pre","script","style","textarea"],qD={concrete:!0,name:"htmlFlow",resolveTo:WD,tokenize:GD},VD={partial:!0,tokenize:YD};function WD(e){let i=e.length;for(;i--&&!(e[i][0]==="enter"&&e[i][1].type==="htmlFlow"););return i>1&&e[i-2][1].type==="linePrefix"&&(e[i][1].start=e[i-2][1].start,e[i+1][1].start=e[i-2][1].start,e.splice(i-2,2)),e}function GD(e,i,r){const s=this;let l,p,f,a,h;return d;function d(F){return m(F)}function m(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),c}function c(F){return F===33?(e.consume(F),_):F===47?(e.consume(F),p=!0,S):F===63?(e.consume(F),l=3,s.interrupt?i:O):dn(F)?(e.consume(F),f=String.fromCharCode(F),g):r(F)}function _(F){return F===45?(e.consume(F),l=2,y):F===91?(e.consume(F),l=5,a=0,E):dn(F)?(e.consume(F),l=4,s.interrupt?i:O):r(F)}function y(F){return F===45?(e.consume(F),s.interrupt?i:O):r(F)}function E(F){const V="CDATA[";return F===V.charCodeAt(a++)?(e.consume(F),a===V.length?s.interrupt?i:B:E):r(F)}function S(F){return dn(F)?(e.consume(F),f=String.fromCharCode(F),g):r(F)}function g(F){if(F===null||F===47||F===62||yt(F)){const V=F===47,ne=f.toLowerCase();return!V&&!p&&Nm.includes(ne)?(l=1,s.interrupt?i(F):B(F)):VC.includes(f.toLowerCase())?(l=6,V?(e.consume(F),b):s.interrupt?i(F):B(F)):(l=7,s.interrupt&&!s.parser.lazy[s.now().line]?r(F):p?w(F):x(F))}return F===45||fn(F)?(e.consume(F),f+=String.fromCharCode(F),g):r(F)}function b(F){return F===62?(e.consume(F),s.interrupt?i:B):r(F)}function w(F){return Ke(F)?(e.consume(F),w):M(F)}function x(F){return F===47?(e.consume(F),M):F===58||F===95||dn(F)?(e.consume(F),T):Ke(F)?(e.consume(F),x):M(F)}function T(F){return F===45||F===46||F===58||F===95||fn(F)?(e.consume(F),T):D(F)}function D(F){return F===61?(e.consume(F),R):Ke(F)?(e.consume(F),D):x(F)}function R(F){return F===null||F===60||F===61||F===62||F===96?r(F):F===34||F===39?(e.consume(F),h=F,L):Ke(F)?(e.consume(F),R):A(F)}function L(F){return F===h?(e.consume(F),h=null,j):F===null||Ne(F)?r(F):(e.consume(F),L)}function A(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||yt(F)?D(F):(e.consume(F),A)}function j(F){return F===47||F===62||Ke(F)?x(F):r(F)}function M(F){return F===62?(e.consume(F),I):r(F)}function I(F){return F===null||Ne(F)?B(F):Ke(F)?(e.consume(F),I):r(F)}function B(F){return F===45&&l===2?(e.consume(F),Y):F===60&&l===1?(e.consume(F),Q):F===62&&l===4?(e.consume(F),G):F===63&&l===3?(e.consume(F),O):F===93&&l===5?(e.consume(F),z):Ne(F)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(VD,Z,H)(F)):F===null||Ne(F)?(e.exit("htmlFlowData"),H(F)):(e.consume(F),B)}function H(F){return e.check(Om,U,Z)(F)}function U(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),W}function W(F){return F===null||Ne(F)?H(F):(e.enter("htmlFlowData"),B(F))}function Y(F){return F===45?(e.consume(F),O):B(F)}function Q(F){return F===47?(e.consume(F),f="",K):B(F)}function K(F){if(F===62){const V=f.toLowerCase();return Nm.includes(V)?(e.consume(F),G):B(F)}return dn(F)&&f.length<8?(e.consume(F),f+=String.fromCharCode(F),K):B(F)}function z(F){return F===93?(e.consume(F),O):B(F)}function O(F){return F===62?(e.consume(F),G):F===45&&l===2?(e.consume(F),O):B(F)}function G(F){return F===null||Ne(F)?(e.exit("htmlFlowData"),Z(F)):(e.consume(F),G)}function Z(F){return e.exit("htmlFlow"),i(F)}}function YD(e,i,r){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Kl,i,r)}}const XD={name:"htmlText",tokenize:KD};function KD(e,i,r){const s=this;let l,p,f;return a;function a(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),d):O===47?(e.consume(O),D):O===63?(e.consume(O),x):dn(O)?(e.consume(O),A):r(O)}function d(O){return O===45?(e.consume(O),m):O===91?(e.consume(O),p=0,E):dn(O)?(e.consume(O),w):r(O)}function m(O){return O===45?(e.consume(O),y):r(O)}function c(O){return O===null?r(O):O===45?(e.consume(O),_):Ne(O)?(f=c,Q(O)):(e.consume(O),c)}function _(O){return O===45?(e.consume(O),y):c(O)}function y(O){return O===62?Y(O):O===45?_(O):c(O)}function E(O){const G="CDATA[";return O===G.charCodeAt(p++)?(e.consume(O),p===G.length?S:E):r(O)}function S(O){return O===null?r(O):O===93?(e.consume(O),g):Ne(O)?(f=S,Q(O)):(e.consume(O),S)}function g(O){return O===93?(e.consume(O),b):S(O)}function b(O){return O===62?Y(O):O===93?(e.consume(O),b):S(O)}function w(O){return O===null||O===62?Y(O):Ne(O)?(f=w,Q(O)):(e.consume(O),w)}function x(O){return O===null?r(O):O===63?(e.consume(O),T):Ne(O)?(f=x,Q(O)):(e.consume(O),x)}function T(O){return O===62?Y(O):x(O)}function D(O){return dn(O)?(e.consume(O),R):r(O)}function R(O){return O===45||fn(O)?(e.consume(O),R):L(O)}function L(O){return Ne(O)?(f=L,Q(O)):Ke(O)?(e.consume(O),L):Y(O)}function A(O){return O===45||fn(O)?(e.consume(O),A):O===47||O===62||yt(O)?j(O):r(O)}function j(O){return O===47?(e.consume(O),Y):O===58||O===95||dn(O)?(e.consume(O),M):Ne(O)?(f=j,Q(O)):Ke(O)?(e.consume(O),j):Y(O)}function M(O){return O===45||O===46||O===58||O===95||fn(O)?(e.consume(O),M):I(O)}function I(O){return O===61?(e.consume(O),B):Ne(O)?(f=I,Q(O)):Ke(O)?(e.consume(O),I):j(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?r(O):O===34||O===39?(e.consume(O),l=O,H):Ne(O)?(f=B,Q(O)):Ke(O)?(e.consume(O),B):(e.consume(O),U)}function H(O){return O===l?(e.consume(O),l=void 0,W):O===null?r(O):Ne(O)?(f=H,Q(O)):(e.consume(O),H)}function U(O){return O===null||O===34||O===39||O===60||O===61||O===96?r(O):O===47||O===62||yt(O)?j(O):(e.consume(O),U)}function W(O){return O===47||O===62||yt(O)?j(O):r(O)}function Y(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),i):r(O)}function Q(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),K}function K(O){return Ke(O)?ot(e,z,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):z(O)}function z(O){return e.enter("htmlTextData"),f(O)}}const Wg={name:"labelEnd",resolveAll:eM,resolveTo:tM,tokenize:nM},QD={tokenize:iM},ZD={tokenize:rM},JD={tokenize:sM};function eM(e){let i=-1;const r=[];for(;++i<e.length;){const s=e[i][1];if(r.push(e[i]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const l=s.type==="labelImage"?4:2;s.type="data",i+=l}}return e.length!==r.length&&Si(e,0,e.length,r),e}function tM(e,i){let r=e.length,s=0,l,p,f;for(;r--;){const m=e[r][1];if(l){if(m.type==="link"||m.type==="labelLink"&&m._inactive)break;e[r][0]==="enter"&&m.type==="labelLink"&&(m._inactive=!0)}else if(p){if(e[r][0]==="enter"&&(m.type==="labelImage"||m.type==="labelLink")&&!m._balanced&&(l=r,m.type!=="labelLink")){s=2;break}}else m.type==="labelEnd"&&(p=r)}const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[p][1].end}},d={type:"labelText",start:{...e[l+s+2][1].end},end:{...e[p-2][1].start}};return f=[["enter",a,i],["enter",h,i]],f=ui(f,e.slice(l+1,l+s+3)),f=ui(f,[["enter",d,i]]),f=ui(f,jh(i.parser.constructs.insideSpan.null,e.slice(l+s+4,p-3),i)),f=ui(f,[["exit",d,i],e[p-2],e[p-1],["exit",h,i]]),f=ui(f,e.slice(p+1)),f=ui(f,[["exit",a,i]]),Si(e,l,e.length,f),e}function nM(e,i,r){const s=this,l=s._labelStarts;let p,f;if(l){for(;l.length>0&&l[l.length-1]._balanced;)l.pop();p=l[l.length-1]}return a;function a(_){return p?p._inactive?c(_):(f=s.parser.defined.includes(wi(s.sliceSerialize({start:p.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),h):r(_)}function h(_){return _===40?e.attempt(QD,m,f?m:c)(_):_===91?e.attempt(ZD,m,f?d:c)(_):f?m(_):c(_)}function d(_){return e.attempt(JD,m,c)(_)}function m(_){return l.pop(),i(_)}function c(_){return p._balanced=!0,r(_)}}function iM(e,i,r){return s;function s(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),l}function l(c){return yt(c)?Tl(e,p)(c):p(c)}function p(c){return c===41?m(c):UC(e,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function f(c){return yt(c)?Tl(e,h)(c):m(c)}function a(c){return r(c)}function h(c){return c===34||c===39||c===40?qC(e,d,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):m(c)}function d(c){return yt(c)?Tl(e,m)(c):m(c)}function m(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),i):r(c)}}function rM(e,i,r){const s=this;return l;function l(a){return $C.call(s,e,p,f,"reference","referenceMarker","referenceString")(a)}function p(a){return s.parser.defined.includes(wi(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?i(a):r(a)}function f(a){return r(a)}}function sM(e,i,r){return s;function s(p){return e.enter("reference"),e.enter("referenceMarker"),e.consume(p),e.exit("referenceMarker"),l}function l(p){return p===93?(e.enter("referenceMarker"),e.consume(p),e.exit("referenceMarker"),e.exit("reference"),i):r(p)}}const oM={name:"labelStartImage",resolveAll:Wg.resolveAll,tokenize:aM};function aM(e,i,r){const s=this;let l;return p;function p(h){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(h),e.exit("labelImageMarker"),f}function f(h){return h===91?(e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),l=e.exit("labelImage"),a):r(h)}function a(h){return h===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(h):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(l),i(h))}}const lM={name:"labelStartLink",resolveAll:Wg.resolveAll,tokenize:cM};function cM(e,i,r){const s=this;let l;return p;function p(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),l=e.exit("labelLink"),f}function f(a){return a===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(a):(s._labelStarts=s._labelStarts||[],s._labelStarts.push(l),i(a))}}const Hp={name:"lineEnding",tokenize:uM};function uM(e,i){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ot(e,i,"linePrefix")}}const Xu={name:"thematicBreak",tokenize:hM};function hM(e,i,r){let s=0,l;return p;function p(d){return e.enter("thematicBreak"),f(d)}function f(d){return l=d,a(d)}function a(d){return d===l?(e.enter("thematicBreakSequence"),h(d)):s>=3&&(d===null||Ne(d))?(e.exit("thematicBreak"),i(d)):r(d)}function h(d){return d===l?(e.consume(d),s++,h):(e.exit("thematicBreakSequence"),Ke(d)?ot(e,a,"whitespace")(d):a(d))}}const Mn={continuation:{tokenize:mM},exit:vM,name:"list",tokenize:pM},dM={partial:!0,tokenize:_M},fM={partial:!0,tokenize:gM};function pM(e,i,r){const s=this,l=s.events[s.events.length-1];let p=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,f=0;return a;function a(y){const E=s.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!s.containerState.marker||y===s.containerState.marker:Mm(y)){if(s.containerState.type||(s.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Xu,r,d)(y):d(y);if(!s.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(y)}return r(y)}function h(y){return Mm(y)&&++f<10?(e.consume(y),h):(!s.interrupt||f<2)&&(s.containerState.marker?y===s.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):r(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||y,e.check(Kl,s.interrupt?r:m,e.attempt(dM,_,c))}function m(y){return s.containerState.initialBlankLine=!0,p++,_(y)}function c(y){return Ke(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),_):r(y)}function _(y){return s.containerState.size=p+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,i(y)}}function mM(e,i,r){const s=this;return s.containerState._closeFlow=void 0,e.check(Kl,l,p);function l(a){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,ot(e,i,"listItemIndent",s.containerState.size+1)(a)}function p(a){return s.containerState.furtherBlankLines||!Ke(a)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,f(a)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(fM,i,f)(a))}function f(a){return s.containerState._closeFlow=!0,s.interrupt=void 0,ot(e,e.attempt(Mn,i,r),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function gM(e,i,r){const s=this;return ot(e,l,"listItemIndent",s.containerState.size+1);function l(p){const f=s.events[s.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===s.containerState.size?i(p):r(p)}}function vM(e){e.exit(this.containerState.type)}function _M(e,i,r){const s=this;return ot(e,l,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(p){const f=s.events[s.events.length-1];return!Ke(p)&&f&&f[1].type==="listItemPrefixWhitespace"?i(p):r(p)}}const rb={name:"setextUnderline",resolveTo:xM,tokenize:yM};function xM(e,i){const r=new ah;let s=e.length,l,p,f;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){l=s;break}e[s][1].type==="paragraph"&&(p=s)}else e[s][1].type==="content"&&r.add(s,1,[]),!f&&e[s][1].type==="definition"&&(f=s);const a={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[p][1].type="setextHeadingText",f?(r.add(p,0,[["enter",a,i]]),r.add(f+1,0,[["exit",e[l][1],i]]),e[l][1].end={...e[f][1].end}):e[l][1]=a,r.add(e.length,0,[["exit",a,i]]),r.consume(e),e}function yM(e,i,r){const s=this;let l;return p;function p(d){let m=s.events.length,c;for(;m--;)if(s.events[m][1].type!=="lineEnding"&&s.events[m][1].type!=="linePrefix"&&s.events[m][1].type!=="content"){c=s.events[m][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||c)?(e.enter("setextHeadingLine"),l=d,f(d)):r(d)}function f(d){return e.enter("setextHeadingLineSequence"),a(d)}function a(d){return d===l?(e.consume(d),a):(e.exit("setextHeadingLineSequence"),Ke(d)?ot(e,h,"lineSuffix")(d):h(d))}function h(d){return d===null||Ne(d)?(e.exit("setextHeadingLine"),i(d)):r(d)}}const bM={tokenize:SM};function SM(e){const i=this,r=e.attempt(Kl,s,e.attempt(this.parser.constructs.flowInitial,l,ot(e,e.attempt(this.parser.constructs.flow,l,e.attempt(LD,l)),"linePrefix")));return r;function s(p){if(p===null){e.consume(p);return}return e.enter("lineEndingBlank"),e.consume(p),e.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function l(p){if(p===null){e.consume(p);return}return e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),i.currentConstruct=void 0,r}}const wM={resolveAll:GC()},CM=WC("string"),EM=WC("text");function WC(e){return{resolveAll:GC(e==="text"?kM:void 0),tokenize:i};function i(r){const s=this,l=this.parser.constructs[e],p=r.attempt(l,f,a);return f;function f(m){return d(m)?p(m):a(m)}function a(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),h}function h(m){return d(m)?(r.exit("data"),p(m)):(r.consume(m),h)}function d(m){if(m===null)return!0;const c=l[m];let _=-1;if(c)for(;++_<c.length;){const y=c[_];if(!y.previous||y.previous.call(s,s.previous))return!0}return!1}}}function GC(e){return i;function i(r,s){let l=-1,p;for(;++l<=r.length;)p===void 0?r[l]&&r[l][1].type==="data"&&(p=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==p+2&&(r[p][1].end=r[l-1][1].end,r.splice(p+2,l-p-2),l=p+2),p=void 0);return e?e(r,s):r}}function kM(e,i){const r=new ah;let s=0;for(;++s<=e.length;)if((s===e.length||e[s][1].type==="lineEnding")&&e[s-1][1].type==="data"){const l=e[s-1][1],p=i.sliceStream(l);let f=p.length,a=-1,h=0,d;for(;f--;){const m=p[f];if(typeof m=="string"){for(a=m.length;m.charCodeAt(a-1)===32;)h++,a--;if(a)break;a=-1}else if(m===-2)d=!0,h++;else if(m!==-1){f++;break}}if(i._contentTypeTextTrailing&&s===e.length&&(h=0),h){const m={type:s===e.length||d||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:f?a:l.start._bufferIndex+a,_index:l.start._index+f,line:l.end.line,column:l.end.column-h,offset:l.end.offset-h},end:{...l.end}};l.end={...m.start},l.start.offset===l.end.offset?Object.assign(l,m):r.add(s,0,[["enter",m,i],["exit",m,i]])}s++}return r.consume(e),e}const TM={42:Mn,43:Mn,45:Mn,48:Mn,49:Mn,50:Mn,51:Mn,52:Mn,53:Mn,54:Mn,55:Mn,56:Mn,57:Mn,62:IC},RM={91:ND},AM={[-2]:zp,[-1]:zp,32:zp},LM={35:FD,42:Xu,45:[rb,Xu],60:qD,61:rb,95:Xu,96:ib,126:ib},DM={38:HC,92:zC},MM={[-5]:Hp,[-4]:Hp,[-3]:Hp,33:oM,38:HC,42:jm,60:[hD,XD],91:lM,92:[zD,zC],93:Wg,95:jm,96:CD},jM={null:[jm,wM]},OM={null:[42,95]},NM={null:[]},BM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:OM,contentInitial:RM,disable:NM,document:TM,flow:LM,flowInitial:AM,insideSpan:jM,string:DM,text:MM},Symbol.toStringTag,{value:"Module"}));function PM(e,i,r){let s={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},p=[];let f=[],a=[];const h={attempt:L(D),check:L(R),consume:w,enter:x,exit:T,interrupt:L(R,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:E,parser:e,previous:null,sliceSerialize:_,sliceStream:y,write:c};let m=i.tokenize.call(d,h);return i.resolveAll&&p.push(i),d;function c(I){return f=ui(f,I),g(),f[f.length-1]!==null?[]:(A(i,0),d.events=jh(p,d.events,d),d.events)}function _(I,B){return zM(y(I),B)}function y(I){return IM(f,I)}function E(){const{_bufferIndex:I,_index:B,line:H,column:U,offset:W}=s;return{_bufferIndex:I,_index:B,line:H,column:U,offset:W}}function S(I){l[I.line]=I.column,M()}function g(){for(;s._index<f.length;){const I=f[s._index];if(typeof I=="string"){const B=s._index;for(s._bufferIndex<0&&(s._bufferIndex=0);s._index===B&&s._bufferIndex<I.length;)b(I.charCodeAt(s._bufferIndex))}else b(I)}}function b(I){m=m(I)}function w(I){Ne(I)?(s.line++,s.column=1,s.offset+=I===-3?2:1,M()):I!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===f[s._index].length&&(s._bufferIndex=-1,s._index++)),d.previous=I}function x(I,B){const H=B||{};return H.type=I,H.start=E(),d.events.push(["enter",H,d]),a.push(H),H}function T(I){const B=a.pop();return B.end=E(),d.events.push(["exit",B,d]),B}function D(I,B){A(I,B.from)}function R(I,B){B.restore()}function L(I,B){return H;function H(U,W,Y){let Q,K,z,O;return Array.isArray(U)?Z(U):"tokenize"in U?Z([U]):G(U);function G(le){return X;function X($){const oe=$!==null&&le[$],ee=$!==null&&le.null,ue=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return Z(ue)($)}}function Z(le){return Q=le,K=0,le.length===0?Y:F(le[K])}function F(le){return X;function X($){return O=j(),z=le,le.partial||(d.currentConstruct=le),le.name&&d.parser.constructs.disable.null.includes(le.name)?ne():le.tokenize.call(B?Object.assign(Object.create(d),B):d,h,V,ne)($)}}function V(le){return I(z,O),W}function ne(le){return O.restore(),++K<Q.length?F(Q[K]):Y}}}function A(I,B){I.resolveAll&&!p.includes(I)&&p.push(I),I.resolve&&Si(d.events,B,d.events.length-B,I.resolve(d.events.slice(B),d)),I.resolveTo&&(d.events=I.resolveTo(d.events,d))}function j(){const I=E(),B=d.previous,H=d.currentConstruct,U=d.events.length,W=Array.from(a);return{from:U,restore:Y};function Y(){s=I,d.previous=B,d.currentConstruct=H,d.events.length=U,a=W,M()}}function M(){s.line in l&&s.column<2&&(s.column=l[s.line],s.offset+=l[s.line]-1)}}function IM(e,i){const r=i.start._index,s=i.start._bufferIndex,l=i.end._index,p=i.end._bufferIndex;let f;if(r===l)f=[e[r].slice(s,p)];else{if(f=e.slice(r,l),s>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(s):f.shift()}p>0&&f.push(e[l].slice(0,p))}return f}function zM(e,i){let r=-1;const s=[];let l;for(;++r<e.length;){const p=e[r];let f;if(typeof p=="string")f=p;else switch(p){case-5:{f="\r";break}case-4:{f=`
|
|
495
|
-
`;break}case-3:{f=`\r
|
|
496
|
-
`;break}case-2:{f=i?" ":" ";break}case-1:{if(!i&&l)continue;f=" ";break}default:f=String.fromCharCode(p)}l=p===-2,s.push(f)}return s.join("")}function HM(e){const s={constructs:OC([BM,...(e||{}).extensions||[]]),content:l(rD),defined:[],document:l(oD),flow:l(bM),lazy:{},string:l(CM),text:l(EM)};return s;function l(p){return f;function f(a){return PM(s,p,a)}}}function FM(e){for(;!FC(e););return e}const sb=/[\0\t\n\r]/g;function UM(){let e=1,i="",r=!0,s;return l;function l(p,f,a){p=i+(typeof p=="string"?p.toString():new TextDecoder(f||void 0).decode(p));const h=[];let d=0;for(i="",r&&(p.charCodeAt(0)===65279&&d++,r=void 0);d<p.length;){sb.lastIndex=d;const m=sb.exec(p),c=m&&m.index!==void 0?m.index:p.length,_=p.charCodeAt(c);if(!m){i=p.slice(d);break}if(_===10&&d===c&&s)h.push(-3),s=void 0;else switch(s&&(h.push(-5),s=void 0),d<c&&(h.push(p.slice(d,c)),e+=c-d),_){case 0:{h.push(65533),e++;break}case 9:{const y=Math.ceil(e/4)*4;for(h.push(-2);e++<y;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:s=!0,e=1}d=c+1}return a&&(s&&h.push(-5),i&&h.push(i),h.push(null)),h}}const $M=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qM(e){return e.replace($M,VM)}function VM(e,i,r){if(i)return i;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),p=l===120||l===88;return NC(r.slice(p?2:1),p?16:10)}return Vg(r)||e}const YC={}.hasOwnProperty;function WM(e,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),GM(r)(FM(HM(r).document().write(UM()(e,i,!0))))}function GM(e){const i={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:f($e),autolinkProtocol:M,autolinkEmail:M,atxHeading:f(qe),blockQuote:f(ue),characterEscape:M,characterReference:M,codeFenced:f(he),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:f(he,a),codeText:f(Se,a),codeTextData:M,data:M,codeFlowValue:M,definition:f(be),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:f(Re),hardBreakEscape:f(Ee),hardBreakTrailing:f(Ee),htmlFlow:f(ze,a),htmlFlowData:M,htmlText:f(ze,a),htmlTextData:M,image:f(Mt),label:a,link:f($e),listItem:f(Ie),listItemValue:y,listOrdered:f(Be,_),listUnordered:f(Be),paragraph:f(Te),reference:V,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:f(qe),strong:f(Ve),thematicBreak:f(rt)},exit:{atxHeading:d(),atxHeadingSequence:R,autolink:d(),autolinkEmail:ee,autolinkProtocol:oe,blockQuote:d(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:X,characterReference:$,codeFenced:d(b),codeFencedFence:g,codeFencedFenceInfo:E,codeFencedFenceMeta:S,codeFlowValue:I,codeIndented:d(w),codeText:d(Y),codeTextData:I,data:I,definition:d(),definitionDestinationString:D,definitionLabelString:x,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(H),hardBreakTrailing:d(H),htmlFlow:d(U),htmlFlowData:I,htmlText:d(W),htmlTextData:I,image:d(K),label:O,labelText:z,lineEnding:B,link:d(Q),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ne,resourceDestinationString:G,resourceTitleString:Z,resource:F,setextHeading:d(j),setextHeadingLineSequence:A,setextHeadingText:L,strong:d(),thematicBreak:d()}};XC(i,(e||{}).mdastExtensions||[]);const r={};return s;function s(fe){let ge={type:"root",children:[],position:void 0};const Le={stack:[ge],tokenStack:[],config:i,enter:h,exit:m,buffer:a,resume:c,data:r},De=[],Fe=[];let Me=-1;for(;++Me<fe.length;)if(Fe.push(fe[Me]),fe[Me][1].type==="listOrdered"||fe[Me][1].type==="listUnordered")if(fe[Me][0]==="enter")De.push(Fe.length-1);else{const Tt=De.pop();p(Fe,Tt)}for(fe=Fe,Me=-1;++Me<fe.length;){const Tt=i[fe[Me][0]];fe[Me][0]==="enter"&&i.beforeEnter.length>0&&l(i.beforeEnter,{...Le,sliceSerialize:fe[Me][2].sliceSerialize},fe[Me][1]),YC.call(Tt,fe[Me][1].type)&&Tt[fe[Me][1].type].call({...Le,sliceSerialize:fe[Me][2].sliceSerialize},fe[Me][1]),fe[Me][0]==="exit"&&i.afterExit.length>0&&l(i.afterExit,{...Le,sliceSerialize:fe[Me][2].sliceSerialize},fe[Me][1])}if(Le.tokenStack.length>0){const Tt=Le.tokenStack[Le.tokenStack.length-1];(Tt[1]||ob).call(Le,void 0,Tt[0])}for(ge.position={start:ns(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:ns(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<i.transforms.length;)ge=i.transforms[Me](ge)||ge;return ge}function l(fe,ge,Le){let De=-1;for(;++De<fe.length;)fe[De].call(ge,Le)}function p(fe,ge){const Le=fe.length-1;let De=ge-1,Fe=-1,Me=!1,Tt,qt,En,Zn;const Jn=[];for(;++De<=Le;){const Wt=fe[De];switch(Wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Wt[0]==="enter"?Fe++:Fe--,Zn=void 0;break}case"lineEndingBlank":{Wt[0]==="enter"&&(Tt&&!Zn&&!Fe&&!En&&(En=De),Zn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zn=void 0}if(!Fe&&Wt[0]==="enter"&&Wt[1].type==="listItemPrefix"||Fe===-1&&Wt[0]==="exit"&&(Wt[1].type==="listUnordered"||Wt[1].type==="listOrdered")){if(Tt){let ei=De;for(qt=void 0;ei--;){const vn=fe[ei];if(vn[1].type==="lineEnding"||vn[1].type==="lineEndingBlank"){if(vn[0]==="exit")continue;qt&&(fe[qt][1].type="lineEndingBlank",Me=!0),vn[1].type="lineEnding",qt=ei}else if(!(vn[1].type==="linePrefix"||vn[1].type==="blockQuotePrefix"||vn[1].type==="blockQuotePrefixWhitespace"||vn[1].type==="blockQuoteMarker"||vn[1].type==="listItemIndent"))break}En&&(!qt||En<qt)&&(Tt._spread=!0),Tt.end=Object.assign({},qt?fe[qt][1].start:Wt[1].end),Jn.push({at:qt||De,event:["exit",Tt,Wt[2]]})}if(Wt[1].type==="listItemPrefix"){const ei={type:"listItem",_spread:!1,start:Object.assign({},Wt[1].start),end:void 0};Tt=ei,Jn.push({at:De,event:["enter",ei,Wt[2]]}),En=void 0,Zn=!0}}}const Js=fe.splice(ge);let Vt=0;for(De=-1;++De<Js.length;){for(;Vt<Jn.length&&Jn[Vt].at===ge+De;)fe.push(Jn[Vt++].event);fe.push(Js[De])}fe[ge][1]._spread=Me}function f(fe,ge){return Le;function Le(De){h.call(this,fe(De),De),ge&&ge.call(this,De)}}function a(){this.stack.push({type:"fragment",children:[]})}function h(fe,ge,Le){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([ge,Le||void 0]),fe.position={start:ns(ge.start),end:void 0}}function d(fe){return ge;function ge(Le){fe&&fe.call(this,Le),m.call(this,Le)}}function m(fe,ge){const Le=this.stack.pop(),De=this.tokenStack.pop();if(!De)throw new Error("Cannot close `"+fe.type+"` ("+kl({start:fe.start,end:fe.end})+"): it’s not open");De[0].type!==fe.type&&(ge?ge.call(this,fe,De[0]):(De[1]||ob).call(this,fe,De[0])),Le.position.end=ns(fe.end)}function c(){return qg(this.stack.pop())}function _(){this.data.expectingFirstListItemValue=!0}function y(fe){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function E(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=fe}function S(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=fe}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe.replace(/(\r?\n|\r)$/g,"")}function x(fe){const ge=this.resume(),Le=this.stack[this.stack.length-1];Le.label=ge,Le.identifier=wi(this.sliceSerialize(fe)).toLowerCase()}function T(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.title=fe}function D(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.url=fe}function R(fe){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Le=this.sliceSerialize(fe).length;ge.depth=Le}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function A(fe){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function M(fe){const Le=this.stack[this.stack.length-1].children;let De=Le[Le.length-1];(!De||De.type!=="text")&&(De=gt(),De.position={start:ns(fe.start),end:void 0},Le.push(De)),this.stack.push(De)}function I(fe){const ge=this.stack.pop();ge.value+=this.sliceSerialize(fe),ge.position.end=ns(fe.end)}function B(fe){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=ge.children[ge.children.length-1];Le.position.end=ns(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ge.type)&&(M.call(this,fe),I.call(this,fe))}function H(){this.data.atHardBreak=!0}function U(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe}function W(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe}function Y(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe}function Q(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ge,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function K(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ge,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function z(fe){const ge=this.sliceSerialize(fe),Le=this.stack[this.stack.length-2];Le.label=qM(ge),Le.identifier=wi(ge).toLowerCase()}function O(){const fe=this.stack[this.stack.length-1],ge=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const De=fe.children;Le.children=De}else Le.alt=ge}function G(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.url=fe}function Z(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.title=fe}function F(){this.data.inReference=void 0}function V(){this.data.referenceType="collapsed"}function ne(fe){const ge=this.resume(),Le=this.stack[this.stack.length-1];Le.label=ge,Le.identifier=wi(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function le(fe){this.data.characterReferenceType=fe.type}function X(fe){const ge=this.sliceSerialize(fe),Le=this.data.characterReferenceType;let De;Le?(De=NC(ge,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Vg(ge);const Fe=this.stack[this.stack.length-1];Fe.value+=De}function $(fe){const ge=this.stack.pop();ge.position.end=ns(fe.end)}function oe(fe){I.call(this,fe);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(fe)}function ee(fe){I.call(this,fe);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(fe)}function ue(){return{type:"blockquote",children:[],position:void 0}}function he(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Se(){return{type:"inlineCode",value:"",position:void 0}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Re(){return{type:"emphasis",children:[],position:void 0}}function qe(){return{type:"heading",depth:0,children:[],position:void 0}}function Ee(){return{type:"break",position:void 0}}function ze(){return{type:"html",value:"",position:void 0}}function Mt(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function $e(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Be(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[],position:void 0}}function Ie(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[],position:void 0}}function Te(){return{type:"paragraph",children:[],position:void 0}}function Ve(){return{type:"strong",children:[],position:void 0}}function gt(){return{type:"text",value:"",position:void 0}}function rt(){return{type:"thematicBreak",position:void 0}}}function ns(e){return{line:e.line,column:e.column,offset:e.offset}}function XC(e,i){let r=-1;for(;++r<i.length;){const s=i[r];Array.isArray(s)?XC(e,s):YM(e,s)}}function YM(e,i){let r;for(r in i)if(YC.call(i,r))switch(r){case"canContainEols":{const s=i[r];s&&e[r].push(...s);break}case"transforms":{const s=i[r];s&&e[r].push(...s);break}case"afterExit":case"beforeEnter":{const s=i[r];s&&e[r].push(s);break}case"enter":case"exit":{const s=i[r];s&&Object.assign(e[r],s);break}}}function ob(e,i){throw e?new Error("Cannot close `"+e.type+"` ("+kl({start:e.start,end:e.end})+"): a different token (`"+i.type+"`, "+kl({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+kl({start:i.start,end:i.end})+") is still open")}function XM(e){const i=this;i.parser=r;function r(s){return WM(s,{...i.data("settings"),...e,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function KM(e,i){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(i),!0)};return e.patch(i,r),e.applyData(i,r)}function QM(e,i){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(i,r),[e.applyData(i,r),{type:"text",value:`
|
|
497
|
-
`}]}function ZM(e,i){const r=i.value?i.value+`
|
|
498
|
-
`:"",s={},l=i.lang?i.lang.split(/\s+/):[];l.length>0&&(s.className=["language-"+l[0]]);let p={type:"element",tagName:"code",properties:s,children:[{type:"text",value:r}]};return i.meta&&(p.data={meta:i.meta}),e.patch(i,p),p=e.applyData(i,p),p={type:"element",tagName:"pre",properties:{},children:[p]},e.patch(i,p),p}function JM(e,i){const r={type:"element",tagName:"del",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function ej(e,i){const r={type:"element",tagName:"em",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function tj(e,i){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(i.identifier).toUpperCase(),l=ba(s.toLowerCase()),p=e.footnoteOrder.indexOf(s);let f,a=e.footnoteCounts.get(s);a===void 0?(a=0,e.footnoteOrder.push(s),f=e.footnoteOrder.length):f=p+1,a+=1,e.footnoteCounts.set(s,a);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};e.patch(i,h);const d={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(i,d),e.applyData(i,d)}function nj(e,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function ij(e,i){if(e.options.allowDangerousHtml){const r={type:"raw",value:i.value};return e.patch(i,r),e.applyData(i,r)}}function KC(e,i){const r=i.referenceType;let s="]";if(r==="collapsed"?s+="[]":r==="full"&&(s+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+s}];const l=e.all(i),p=l[0];p&&p.type==="text"?p.value="["+p.value:l.unshift({type:"text",value:"["});const f=l[l.length-1];return f&&f.type==="text"?f.value+=s:l.push({type:"text",value:s}),l}function rj(e,i){const r=String(i.identifier).toUpperCase(),s=e.definitionById.get(r);if(!s)return KC(e,i);const l={src:ba(s.url||""),alt:i.alt};s.title!==null&&s.title!==void 0&&(l.title=s.title);const p={type:"element",tagName:"img",properties:l,children:[]};return e.patch(i,p),e.applyData(i,p)}function sj(e,i){const r={src:ba(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return e.patch(i,s),e.applyData(i,s)}function oj(e,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};e.patch(i,r);const s={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(i,s),e.applyData(i,s)}function aj(e,i){const r=String(i.identifier).toUpperCase(),s=e.definitionById.get(r);if(!s)return KC(e,i);const l={href:ba(s.url||"")};s.title!==null&&s.title!==void 0&&(l.title=s.title);const p={type:"element",tagName:"a",properties:l,children:e.all(i)};return e.patch(i,p),e.applyData(i,p)}function lj(e,i){const r={href:ba(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:e.all(i)};return e.patch(i,s),e.applyData(i,s)}function cj(e,i,r){const s=e.all(i),l=r?uj(r):QC(i),p={},f=[];if(typeof i.checked=="boolean"){const m=s[0];let c;m&&m.type==="element"&&m.tagName==="p"?c=m:(c={type:"element",tagName:"p",properties:{},children:[]},s.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),p.className=["task-list-item"]}let a=-1;for(;++a<s.length;){const m=s[a];(l||a!==0||m.type!=="element"||m.tagName!=="p")&&f.push({type:"text",value:`
|
|
499
|
-
`}),m.type==="element"&&m.tagName==="p"&&!l?f.push(...m.children):f.push(m)}const h=s[s.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&f.push({type:"text",value:`
|
|
500
|
-
`});const d={type:"element",tagName:"li",properties:p,children:f};return e.patch(i,d),e.applyData(i,d)}function uj(e){let i=!1;if(e.type==="list"){i=e.spread||!1;const r=e.children;let s=-1;for(;!i&&++s<r.length;)i=QC(r[s])}return i}function QC(e){const i=e.spread;return i??e.children.length>1}function hj(e,i){const r={},s=e.all(i);let l=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++l<s.length;){const f=s[l];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const p={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:e.wrap(s,!0)};return e.patch(i,p),e.applyData(i,p)}function dj(e,i){const r={type:"element",tagName:"p",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function fj(e,i){const r={type:"root",children:e.wrap(e.all(i))};return e.patch(i,r),e.applyData(i,r)}function pj(e,i){const r={type:"element",tagName:"strong",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function mj(e,i){const r=e.all(i),s=r.shift(),l=[];if(s){const f={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(i.children[0],f),l.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},a=Hg(i.children[1]),h=TC(i.children[i.children.length-1]);a&&h&&(f.position={start:a,end:h}),l.push(f)}const p={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(i,p),e.applyData(i,p)}function gj(e,i,r){const s=r?r.children:void 0,p=(s?s.indexOf(i):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,a=f?f.length:i.children.length;let h=-1;const d=[];for(;++h<a;){const c=i.children[h],_={},y=f?f[h]:void 0;y&&(_.align=y);let E={type:"element",tagName:p,properties:_,children:[]};c&&(E.children=e.all(c),e.patch(c,E),E=e.applyData(c,E)),d.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(i,m),e.applyData(i,m)}function vj(e,i){const r={type:"element",tagName:"td",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}const ab=9,lb=32;function _j(e){const i=String(e),r=/\r?\n|\r/g;let s=r.exec(i),l=0;const p=[];for(;s;)p.push(cb(i.slice(l,s.index),l>0,!0),s[0]),l=s.index+s[0].length,s=r.exec(i);return p.push(cb(i.slice(l),l>0,!1)),p.join("")}function cb(e,i,r){let s=0,l=e.length;if(i){let p=e.codePointAt(s);for(;p===ab||p===lb;)s++,p=e.codePointAt(s)}if(r){let p=e.codePointAt(l-1);for(;p===ab||p===lb;)l--,p=e.codePointAt(l-1)}return l>s?e.slice(s,l):""}function xj(e,i){const r={type:"text",value:_j(String(i.value))};return e.patch(i,r),e.applyData(i,r)}function yj(e,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(i,r),e.applyData(i,r)}const bj={blockquote:KM,break:QM,code:ZM,delete:JM,emphasis:ej,footnoteReference:tj,heading:nj,html:ij,imageReference:rj,image:sj,inlineCode:oj,linkReference:aj,link:lj,listItem:cj,list:hj,paragraph:dj,root:fj,strong:pj,table:mj,tableCell:vj,tableRow:gj,text:xj,thematicBreak:yj,toml:Iu,yaml:Iu,definition:Iu,footnoteDefinition:Iu};function Iu(){}const ZC=-1,Oh=0,Rl=1,lh=2,Gg=3,Yg=4,Xg=5,Kg=6,JC=7,e2=8,{defineProperty:Sj}=Object,t2=typeof self=="object"?self:globalThis,ub=(e,i)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new t2[e](i)},wj=(e,i)=>{const r=(l,p)=>(e.set(p,l),l),s=l=>{if(e.has(l))return e.get(l);const[p,f]=i[l];switch(p){case Oh:case ZC:return r(f,l);case Rl:{const a=r([],l);for(const h of f)a.push(s(h));return a}case lh:{const a=r({},l);for(const[h,d]of f){const m=s(h),c=s(d);m==="__proto__"?Sj(a,m,{value:c,configurable:!0,enumerable:!0,writable:!0}):a[m]=c}return a}case Gg:return r(new Date(f),l);case Yg:{const{source:a,flags:h}=f;return r(new RegExp(a,h),l)}case Xg:{const a=r(new Map,l);for(const[h,d]of f)a.set(s(h),s(d));return a}case Kg:{const a=r(new Set,l);for(const h of f)a.add(s(h));return a}case JC:{const{name:a,message:h}=f;return r(typeof t2[a]=="function"?ub(a,h):new Error(h),l)}case e2:return r(BigInt(f),l);case"BigInt":return r(Object(BigInt(f)),l);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:a}=new Uint8Array(f);return r(new DataView(a),f)}case"-0":return-0}return r(ub(p,f),l)};return s},hb=e=>wj(new Map,e)(0),Us="",{toString:Cj}={},{keys:Ej,is:kj}=Object,Sl=e=>{const i=typeof e;if(i!=="object"||!e)return[Oh,i];const r=Cj.call(e).slice(8,-1);switch(r){case"Array":return[Rl,Us];case"Object":return[lh,Us];case"Date":return[Gg,Us];case"RegExp":return[Yg,Us];case"Map":return[Xg,Us];case"Set":return[Kg,Us];case"DataView":return[Rl,r]}return r.includes("Array")?[Rl,r]:e instanceof Error?[JC,e.name||"Error"]:[lh,r]},zu=([e,i])=>e===Oh&&(i==="function"||i==="symbol"),Tj=(e,i,r,s)=>{const l=(f,a)=>{const h=s.push(f)-1;return r.set(a,h),h},p=f=>{if(r.has(f))return r.get(f);let[a,h]=Sl(f);switch(a){case Oh:{let m=f;switch(h){case"bigint":a=e2,m=f.toString();break;case"number":if(!f&&kj(f,-0))return s.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return l([ZC],f)}return l([a,m],f)}case Rl:{if(h){let _=f;return h==="DataView"?_=new Uint8Array(f.buffer):h==="ArrayBuffer"&&(_=new Uint8Array(f)),l([h,[..._]],f)}const m=[],c=l([a,m],f);for(const _ of f)m.push(p(_));return c}case lh:{if(h)switch(h){case"BigInt":return l([h,f.toString()],f);case"Boolean":case"Number":case"String":return l([h,f.valueOf()],f)}if(i&&"toJSON"in f)return p(f.toJSON());const m=[],c=l([a,m],f);for(const _ of Ej(f))(e||!zu(Sl(f[_])))&&m.push([p(_),p(f[_])]);return c}case Gg:return l([a,isNaN(f.getTime())?Us:f.toISOString()],f);case Yg:{const{source:m,flags:c}=f;return l([a,{source:m,flags:c}],f)}case Xg:{const m=[],c=l([a,m],f);for(const[_,y]of f)(e||!(zu(Sl(_))||zu(Sl(y))))&&m.push([p(_),p(y)]);return c}case Kg:{const m=[],c=l([a,m],f);for(const _ of f)(e||!zu(Sl(_)))&&m.push(p(_));return c}}const{message:d}=f;return l([a,{name:h,message:d}],f)};return p},db=(e,{json:i,lossy:r}={})=>{const s=[];return Tj(!(i||r),!!i,new Map,s)(e),s},ch=typeof structuredClone=="function"?(e,i)=>i&&("json"in i||"lossy"in i)?hb(db(e,i)):structuredClone(e):(e,i)=>hb(db(e,i));function Rj(e,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function Aj(e,i){return"Back to reference "+(e+1)+(i>1?"-"+i:"")}function Lj(e){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Rj,s=e.options.footnoteBackLabel||Aj,l=e.options.footnoteLabel||"Footnotes",p=e.options.footnoteLabelTagName||"h2",f=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let h=-1;for(;++h<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[h]);if(!d)continue;const m=e.all(d),c=String(d.identifier).toUpperCase(),_=ba(c.toLowerCase());let y=0;const E=[],S=e.footnoteCounts.get(c);for(;S!==void 0&&++y<=S;){E.length>0&&E.push({type:"text",value:" "});let w=typeof r=="string"?r:r(h,y);typeof w=="string"&&(w={type:"text",value:w}),E.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+_+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(h,y),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const g=m[m.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const w=g.children[g.children.length-1];w&&w.type==="text"?w.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...E)}else m.push(...E);const b={type:"element",tagName:"li",properties:{id:i+"fn-"+_},children:e.wrap(m,!0)};e.patch(d,b),a.push(b)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:p,properties:{...ch(f),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
501
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
502
|
-
`}]}}const Nh=(function(e){if(e==null)return Oj;if(typeof e=="function")return Bh(e);if(typeof e=="object")return Array.isArray(e)?Dj(e):Mj(e);if(typeof e=="string")return jj(e);throw new Error("Expected function, string, or object as test")});function Dj(e){const i=[];let r=-1;for(;++r<e.length;)i[r]=Nh(e[r]);return Bh(s);function s(...l){let p=-1;for(;++p<i.length;)if(i[p].apply(this,l))return!0;return!1}}function Mj(e){const i=e;return Bh(r);function r(s){const l=s;let p;for(p in e)if(l[p]!==i[p])return!1;return!0}}function jj(e){return Bh(i);function i(r){return r&&r.type===e}}function Bh(e){return i;function i(r,s,l){return!!(Nj(r)&&e.call(this,r,typeof s=="number"?s:void 0,l||void 0))}}function Oj(){return!0}function Nj(e){return e!==null&&typeof e=="object"&&"type"in e}const n2=[],Bj=!0,Ku=!1,Bm="skip";function Pm(e,i,r,s){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let l=!0,p,f,a,h;if(typeof r=="function"||r&&typeof r=="object"?(p=i,f=r,s&&(l=!1)):(f=i,r&&(l=!1)),typeof f=="function")a=f;else if(f&&typeof f=="object"){if(!(f.enter===null||f.enter===void 0))if(typeof f.enter=="function")a=f.enter;else throw new Error("Unexpected value `"+f.enter+"` for `visitors.enter`, expected optional visitor");if(typeof f.exit=="function")h=f.exit;else throw new Error("Unexpected value `"+f.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+f+"` for `enter` or `visitors`, expected visitor or object with visitors");const d=Nh(p),m=l?1:-1;c(e,void 0,[])();function c(_,y,E){const S=_&&typeof _=="object"?_:{};if(typeof S.type=="string"){const b=typeof S.tagName=="string"?S.tagName:typeof S.name=="string"?S.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(_.type+(b?"<"+b+">":""))+")"})}return g;function g(){const b=!p||d(_,y,E[E.length-1]||void 0);let w=n2;if(a&&b&&(w=fb(a(_,E,y)),w[0]===Ku))return w;if("children"in _&&_.children){const x=_;if(x.children&&w[0]!==Bm){let T=(l?-1:x.children.length)+m;const D=[...E,x];for(;T>-1&&T<x.children.length;){const R=x.children[T],L=c(R,T,D)();if(L[0]===Ku)return L;T=typeof L[1]=="number"?L[1]:T+m}}}if(h&&b){const x=fb(h(_,E,y));if(x[0]===Bm)throw new Error("Unexpected value `"+x[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(x[0]===Ku||typeof x[1]=="number")return x}return w}}}function fb(e){return Array.isArray(e)?e:typeof e=="number"?[Bj,e]:e==null?n2:[e]}function Qg(e,i,r,s){let l,p,f;p=i,f=r,typeof p=="function"?Pm(e,l,Im(p),f):Pm(e,l,Pj(p),f)}function Pj(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?Im(e.enter):e.enter,exit:typeof e.exit=="function"?Im(e.exit):e.exit}}function Im(e){return i;function i(r,s,l){return e(r,l,s[s.length-1])}}const zm={}.hasOwnProperty,Ij={};function zj(e,i){const r=i||Ij,s=new Map,l=new Map,p=new Map,f={...bj,...r.handlers},a={all:d,applyData:Fj,definitionById:s,footnoteById:l,footnoteCounts:p,footnoteOrder:[],handlers:f,one:h,options:r,patch:Hj,wrap:$j};return Qg(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const c=m.type==="definition"?s:l,_=String(m.identifier).toUpperCase();c.has(_)||c.set(_,m)}}),a;function h(m,c){const _=m.type,y=a.handlers[_];if(zm.call(a.handlers,_)&&y)return y(a,m,c);if(a.options.passThrough&&a.options.passThrough.includes(_)){if("children"in m){const{children:S,...g}=m,b=ch(g);return b.children=a.all(m),b}return ch(m)}return(a.options.unknownHandler||Uj)(a,m,c)}function d(m){const c=[];if("children"in m){const _=m.children;let y=-1;for(;++y<_.length;){const E=a.one(_[y],m);if(E){if(y&&_[y-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=pb(E.value)),!Array.isArray(E)&&E.type==="element")){const S=E.children[0];S&&S.type==="text"&&(S.value=pb(S.value))}Array.isArray(E)?c.push(...E):c.push(E)}}}return c}}function Hj(e,i){e.position&&(i.position=DL(e))}function Fj(e,i){let r=i;if(e&&e.data){const s=e.data.hName,l=e.data.hChildren,p=e.data.hProperties;if(typeof s=="string")if(r.type==="element")r.tagName=s;else{const f="children"in r?r.children:[r];r={type:"element",tagName:s,properties:{},children:f}}r.type==="element"&&p&&Object.assign(r.properties,ch(p)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function Uj(e,i){const r=i.data||{},s="value"in i&&!(zm.call(r,"hProperties")||zm.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:e.all(i)};return e.patch(i,s),e.applyData(i,s)}function $j(e,i){const r=[];let s=-1;for(i&&r.push({type:"text",value:`
|
|
503
|
-
`});++s<e.length;)s&&r.push({type:"text",value:`
|
|
504
|
-
`}),r.push(e[s]);return i&&e.length>0&&r.push({type:"text",value:`
|
|
505
|
-
`}),r}function pb(e){let i=0,r=e.charCodeAt(i);for(;r===9||r===32;)i++,r=e.charCodeAt(i);return e.slice(i)}function mb(e,i){const r=zj(e,i),s=r.one(e,void 0),l=Lj(r),p=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&p.children.push({type:"text",value:`
|
|
506
|
-
`},l),p}function qj(e,i){return e&&"run"in e?async function(r,s){const l=mb(r,{file:s,...i});await e.run(l,s)}:function(r,s){return mb(r,{file:s,...e||i})}}function gb(e){if(e)throw e}var Fp,vb;function Vj(){if(vb)return Fp;vb=1;var e=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=function(d){return typeof Array.isArray=="function"?Array.isArray(d):i.call(d)==="[object Array]"},p=function(d){if(!d||i.call(d)!=="[object Object]")return!1;var m=e.call(d,"constructor"),c=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!m&&!c)return!1;var _;for(_ in d);return typeof _>"u"||e.call(d,_)},f=function(d,m){r&&m.name==="__proto__"?r(d,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):d[m.name]=m.newValue},a=function(d,m){if(m==="__proto__")if(e.call(d,m)){if(s)return s(d,m).value}else return;return d[m]};return Fp=function h(){var d,m,c,_,y,E,S=arguments[0],g=1,b=arguments.length,w=!1;for(typeof S=="boolean"&&(w=S,S=arguments[1]||{},g=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});g<b;++g)if(d=arguments[g],d!=null)for(m in d)c=a(S,m),_=a(d,m),S!==_&&(w&&_&&(p(_)||(y=l(_)))?(y?(y=!1,E=c&&l(c)?c:[]):E=c&&p(c)?c:{},f(S,{name:m,newValue:h(w,E,_)})):typeof _<"u"&&f(S,{name:m,newValue:_}));return S},Fp}var Wj=Vj();const Up=Km(Wj);function Hm(e){if(typeof e!="object"||e===null)return!1;const i=Object.getPrototypeOf(e);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gj(){const e=[],i={run:r,use:s};return i;function r(...l){let p=-1;const f=l.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...l);function a(h,...d){const m=e[++p];let c=-1;if(h){f(h);return}for(;++c<l.length;)(d[c]===null||d[c]===void 0)&&(d[c]=l[c]);l=d,m?Yj(m,a)(...d):f(null,...d)}}function s(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),i}}function Yj(e,i){let r;return s;function s(...f){const a=e.length>f.length;let h;a&&f.push(l);try{h=e.apply(this,f)}catch(d){const m=d;if(a&&r)throw m;return l(m)}a||(h&&h.then&&typeof h.then=="function"?h.then(p,l):h instanceof Error?l(h):p(h))}function l(f,...a){r||(r=!0,i(f,...a))}function p(f){l(null,f)}}const Pi={basename:Xj,dirname:Kj,extname:Qj,join:Zj,sep:"/"};function Xj(e,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Ql(e);let r=0,s=-1,l=e.length,p;if(i===void 0||i.length===0||i.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(p){r=l+1;break}}else s<0&&(p=!0,s=l+1);return s<0?"":e.slice(r,s)}if(i===e)return"";let f=-1,a=i.length-1;for(;l--;)if(e.codePointAt(l)===47){if(p){r=l+1;break}}else f<0&&(p=!0,f=l+1),a>-1&&(e.codePointAt(l)===i.codePointAt(a--)?a<0&&(s=l):(a=-1,s=f));return r===s?s=f:s<0&&(s=e.length),e.slice(r,s)}function Kj(e){if(Ql(e),e.length===0)return".";let i=-1,r=e.length,s;for(;--r;)if(e.codePointAt(r)===47){if(s){i=r;break}}else s||(s=!0);return i<0?e.codePointAt(0)===47?"/":".":i===1&&e.codePointAt(0)===47?"//":e.slice(0,i)}function Qj(e){Ql(e);let i=e.length,r=-1,s=0,l=-1,p=0,f;for(;i--;){const a=e.codePointAt(i);if(a===47){if(f){s=i+1;break}continue}r<0&&(f=!0,r=i+1),a===46?l<0?l=i:p!==1&&(p=1):l>-1&&(p=-1)}return l<0||r<0||p===0||p===1&&l===r-1&&l===s+1?"":e.slice(l,r)}function Zj(...e){let i=-1,r;for(;++i<e.length;)Ql(e[i]),e[i]&&(r=r===void 0?e[i]:r+"/"+e[i]);return r===void 0?".":Jj(r)}function Jj(e){Ql(e);const i=e.codePointAt(0)===47;let r=eO(e,!i);return r.length===0&&!i&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),i?"/"+r:r}function eO(e,i){let r="",s=0,l=-1,p=0,f=-1,a,h;for(;++f<=e.length;){if(f<e.length)a=e.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(l===f-1||p===1))if(l!==f-1&&p===2){if(r.length<2||s!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",s=0):(r=r.slice(0,h),s=r.length-1-r.lastIndexOf("/")),l=f,p=0;continue}}else if(r.length>0){r="",s=0,l=f,p=0;continue}}i&&(r=r.length>0?r+"/..":"..",s=2)}else r.length>0?r+="/"+e.slice(l+1,f):r=e.slice(l+1,f),s=f-l-1;l=f,p=0}else a===46&&p>-1?p++:p=-1}return r}function Ql(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tO={cwd:nO};function nO(){return"/"}function Fm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iO(e){if(typeof e=="string")e=new URL(e);else if(!Fm(e)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(e.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return rO(e)}function rO(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const i=e.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const s=i.codePointAt(r+2);if(s===70||s===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(i)}const $p=["history","path","basename","stem","extname","dirname"];class i2{constructor(i){let r;i?Fm(i)?r={path:i}:typeof i=="string"||sO(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":tO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<$p.length;){const p=$p[s];p in r&&r[p]!==void 0&&r[p]!==null&&(this[p]=p==="history"?[...r[p]]:r[p])}let l;for(l in r)$p.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Pi.basename(this.path):void 0}set basename(i){Vp(i,"basename"),qp(i,"basename"),this.path=Pi.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Pi.dirname(this.path):void 0}set dirname(i){_b(this.basename,"dirname"),this.path=Pi.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Pi.extname(this.path):void 0}set extname(i){if(qp(i,"extname"),_b(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pi.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Fm(i)&&(i=iO(i)),Vp(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Pi.basename(this.path,this.extname):void 0}set stem(i){Vp(i,"stem"),qp(i,"stem"),this.path=Pi.join(this.dirname||"",i+(this.extname||""))}fail(i,r,s){const l=this.message(i,r,s);throw l.fatal=!0,l}info(i,r,s){const l=this.message(i,r,s);return l.fatal=void 0,l}message(i,r,s){const l=new gn(i,r,s);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function qp(e,i){if(e&&e.includes(Pi.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Pi.sep+"`")}function Vp(e,i){if(!e)throw new Error("`"+i+"` cannot be empty")}function _b(e,i){if(!e)throw new Error("Setting `"+i+"` requires `path` to be set too")}function sO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oO=(function(e){const s=this.constructor.prototype,l=s[e],p=function(){return l.apply(p,arguments)};return Object.setPrototypeOf(p,s),p}),aO={}.hasOwnProperty;class Zg extends oO{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Gj()}copy(){const i=new Zg;let r=-1;for(;++r<this.attachers.length;){const s=this.attachers[r];i.use(...s)}return i.data(Up(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Yp("data",this.frozen),this.namespace[i]=r,this):aO.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Yp("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const l=r.call(i,...s);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Hu(i),s=this.parser||this.Parser;return Wp("parse",s),s(String(r),r)}process(i,r){const s=this;return this.freeze(),Wp("process",this.parser||this.Parser),Gp("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(p,f){const a=Hu(i),h=s.parse(a);s.run(h,a,function(m,c,_){if(m||!c||!_)return d(m);const y=c,E=s.stringify(y,_);uO(E)?_.value=E:_.result=E,d(m,_)});function d(m,c){m||!c?f(m):p?p(c):r(void 0,c)}}}processSync(i){let r=!1,s;return this.freeze(),Wp("processSync",this.parser||this.Parser),Gp("processSync",this.compiler||this.Compiler),this.process(i,l),yb("processSync","process",r),s;function l(p,f){r=!0,gb(p),s=f}}run(i,r,s){xb(i),this.freeze();const l=this.transformers;return!s&&typeof r=="function"&&(s=r,r=void 0),s?p(void 0,s):new Promise(p);function p(f,a){const h=Hu(r);l.run(i,h,d);function d(m,c,_){const y=c||i;m?a(m):f?f(y):s(void 0,y,_)}}}runSync(i,r){let s=!1,l;return this.run(i,r,p),yb("runSync","run",s),l;function p(f,a){gb(f),l=a,s=!0}}stringify(i,r){this.freeze();const s=Hu(r),l=this.compiler||this.Compiler;return Gp("stringify",l),xb(i),l(i,s)}use(i,...r){const s=this.attachers,l=this.namespace;if(Yp("use",this.frozen),i!=null)if(typeof i=="function")h(i,r);else if(typeof i=="object")Array.isArray(i)?a(i):f(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function p(d){if(typeof d=="function")h(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[m,...c]=d;h(m,c)}else f(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function f(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(d.plugins),d.settings&&(l.settings=Up(!0,l.settings,d.settings))}function a(d){let m=-1;if(d!=null)if(Array.isArray(d))for(;++m<d.length;){const c=d[m];p(c)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function h(d,m){let c=-1,_=-1;for(;++c<s.length;)if(s[c][0]===d){_=c;break}if(_===-1)s.push([d,...m]);else if(m.length>0){let[y,...E]=m;const S=s[_][1];Hm(S)&&Hm(y)&&(y=Up(!0,S,y)),s[_]=[d,y,...E]}}}}const lO=new Zg().freeze();function Wp(e,i){if(typeof i!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gp(e,i){if(typeof i!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Yp(e,i){if(i)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xb(e){if(!Hm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function yb(e,i,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+i+"` instead")}function Hu(e){return cO(e)?e:new i2(e)}function cO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uO(e){return typeof e=="string"||hO(e)}function hO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bb=[],Sb={allowDangerousHtml:!0},fO=/^(https?|ircs?|mailto|xmpp)$/i,pO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mO(e){const i=gO(e),r=vO(e);return _O(i.runSync(i.parse(r),r),e)}function gO(e){const i=e.rehypePlugins||bb,r=e.remarkPlugins||bb,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Sb}:Sb;return lO().use(XM).use(r).use(qj,s).use(i)}function vO(e){const i=e.children||"",r=new i2;return typeof i=="string"&&(r.value=i),r}function _O(e,i){const r=i.allowedElements,s=i.allowElement,l=i.components,p=i.disallowedElements,f=i.skipHtml,a=i.unwrapDisallowed,h=i.urlTransform||xO;for(const m of pO)Object.hasOwn(i,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+dO+m.id,void 0);return Qg(e,d),BL(e,{Fragment:v.Fragment,components:l,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function d(m,c,_){if(m.type==="raw"&&_&&typeof c=="number")return f?_.children.splice(c,1):_.children[c]={type:"text",value:m.value},c;if(m.type==="element"){let y;for(y in Ip)if(Object.hasOwn(Ip,y)&&Object.hasOwn(m.properties,y)){const E=m.properties[y],S=Ip[y];(S===null||S.includes(m.tagName))&&(m.properties[y]=h(String(E||""),y,m))}}if(m.type==="element"){let y=r?!r.includes(m.tagName):p?p.includes(m.tagName):!1;if(!y&&s&&typeof c=="number"&&(y=!s(m,c,_)),y&&_&&typeof c=="number")return a&&m.children?_.children.splice(c,1,...m.children):_.children.splice(c,1),c}}}function xO(e){const i=e.indexOf(":"),r=e.indexOf("?"),s=e.indexOf("#"),l=e.indexOf("/");return i===-1||l!==-1&&i>l||r!==-1&&i>r||s!==-1&&i>s||fO.test(e.slice(0,i))?e:""}function wb(e,i){const r=String(e);if(typeof i!="string")throw new TypeError("Expected character");let s=0,l=r.indexOf(i);for(;l!==-1;)s++,l=r.indexOf(i,l+i.length);return s}function yO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bO(e,i,r){const l=Nh((r||{}).ignore||[]),p=SO(i);let f=-1;for(;++f<p.length;)Pm(e,a);function a(d,m,c){if(d.type==="text"&&typeof c=="number")return h(d,m,c);if(l(d,c,m[m.length-1]))return Bm}function h(d,m,c){const _=m[m.length-1],y=p[f][0],E=p[f][1];let S=0,g=!1,b=[];y.lastIndex=0;let w=y.exec(d.value);for(;w;){const T=w.index,D={index:w.index,input:w.input,stack:[...m,d]};let R=E(...w,D);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1)y.lastIndex=T+1;else{if(S!==T&&x({type:"text",value:d.value.slice(S,T)}),Array.isArray(R))for(const L of R)x(L);else R&&x(R);S=T+w[0].length,g=!0}if(!y.global)break;w=y.exec(d.value)}return g?(S<d.value.length&&x({type:"text",value:d.value.slice(S)}),_.children.splice(c,1,...b)):b=[d],c+b.length;function x(T){const D=b[b.length-1];D&&D.type==="text"&&T.type==="text"?D.value+=T.value:b.push(T)}}}function SO(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=[],r=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<r.length;){const l=r[s];i.push([wO(l[0]),CO(l[1])])}return i}function wO(e){return typeof e=="string"?new RegExp(yO(e),"g"):e}function CO(e){return typeof e=="function"?e:function(){return e}}const Xp="phrasing",Kp=["autolink","link","image","label"];function EO(){return{transforms:[MO],enter:{literalAutolink:TO,literalAutolinkEmail:Qp,literalAutolinkHttp:Qp,literalAutolinkWww:Qp},exit:{literalAutolink:DO,literalAutolinkEmail:LO,literalAutolinkHttp:RO,literalAutolinkWww:AO}}}function kO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xp,notInConstruct:Kp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Xp,notInConstruct:Kp},{character:":",before:"[ps]",after:"\\/",inConstruct:Xp,notInConstruct:Kp}]}}function TO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qp(e){this.config.enter.autolinkProtocol.call(this,e)}function RO(e){this.config.exit.autolinkProtocol.call(this,e)}function AO(e){this.config.exit.data.call(this,e);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(e)}function LO(e){this.config.exit.autolinkEmail.call(this,e)}function DO(e){this.exit(e)}function MO(e){bO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,jO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),OO]],{ignore:["link","linkReference"]})}function jO(e,i,r,s,l){let p="";if(!r2(l)||(/^w/i.test(i)&&(r=i+r,i="",p="http://"),!NO(r)))return!1;const f=BO(r+s);if(!f[0])return!1;const a={type:"link",title:null,url:p+i+f[0],children:[{type:"text",value:i+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function OO(e,i,r,s){return!r2(s,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function NO(e){const i=e.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function BO(e){const i=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!i)return[e,void 0];e=e.slice(0,i.index);let r=i[0],s=r.indexOf(")");const l=wb(e,"(");let p=wb(e,")");for(;s!==-1&&l>p;)e+=r.slice(0,s+1),r=r.slice(s+1),s=r.indexOf(")"),p++;return[e,r]}function r2(e,i){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Xs(r)||Mh(r))&&(!i||r!==47)}s2.peek=VO;function PO(){this.buffer()}function IO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function zO(){this.buffer()}function HO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function FO(e){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=wi(this.sliceSerialize(e)).toLowerCase(),r.label=i}function UO(e){this.exit(e)}function $O(e){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=wi(this.sliceSerialize(e)).toLowerCase(),r.label=i}function qO(e){this.exit(e)}function VO(){return"["}function s2(e,i,r,s){const l=r.createTracker(s);let p=l.move("[^");const f=r.enter("footnoteReference"),a=r.enter("reference");return p+=l.move(r.safe(r.associationId(e),{after:"]",before:p})),a(),f(),p+=l.move("]"),p}function WO(){return{enter:{gfmFootnoteCallString:PO,gfmFootnoteCall:IO,gfmFootnoteDefinitionLabelString:zO,gfmFootnoteDefinition:HO},exit:{gfmFootnoteCallString:FO,gfmFootnoteCall:UO,gfmFootnoteDefinitionLabelString:$O,gfmFootnoteDefinition:qO}}}function GO(e){let i=!1;return e&&e.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:s2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(s,l,p,f){const a=p.createTracker(f);let h=a.move("[^");const d=p.enter("footnoteDefinition"),m=p.enter("label");return h+=a.move(p.safe(p.associationId(s),{before:h,after:"]"})),m(),h+=a.move("]:"),s.children&&s.children.length>0&&(a.shift(4),h+=a.move((i?`
|
|
507
|
-
`:" ")+p.indentLines(p.containerFlow(s,a.current()),i?o2:YO))),d(),h}}function YO(e,i,r){return i===0?e:o2(e,i,r)}function o2(e,i,r){return(r?"":" ")+e}const XO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Jg.attention=eN;Jg.peek=tN;function KO(){return{canContainEols:["delete"],enter:{strikethrough:ZO},exit:{strikethrough:JO}}}function QO(){return{handlers:{delete:Jg},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:XO}]}}function ZO(e){this.enter({type:"delete",children:[],position:void 0},e)}function JO(e){this.exit(e)}function Jg(e,i,r,s){const l=r.createTracker(s),p=r.stack.includes("strikethrough")?"~":"~~",f=r.enter("strikethrough");let a=l.move(p);return a+=r.containerPhrasing(e,{...l.current(),before:a,after:"~"}),a+=l.move(p),f(),a}function eN(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function tN(){return"~"}function nN(e){return e.length}function iN(e,i){const r=i||{},s=(r.align||[]).concat(),l=r.stringLength||nN,p=[],f=[],a=[],h=[];let d=0,m=-1;for(;++m<e.length;){const S=[],g=[];let b=-1;for(e[m].length>d&&(d=e[m].length);++b<e[m].length;){const w=rN(e[m][b]);if(r.alignDelimiters!==!1){const x=l(w);g[b]=x,(h[b]===void 0||x>h[b])&&(h[b]=x)}S.push(w)}f[m]=S,a[m]=g}let c=-1;if(typeof s=="object"&&"length"in s)for(;++c<d;)p[c]=Cb(s[c]);else{const S=Cb(s);for(;++c<d;)p[c]=S}c=-1;const _=[],y=[];for(;++c<d;){const S=p[c];let g="",b="";S===99?(g=":",b=":"):S===108?g=":":S===114&&(b=":");let w=r.alignDelimiters===!1?1:Math.max(1,h[c]-g.length-b.length);const x=g+"-".repeat(w)+b;r.alignDelimiters!==!1&&(w=g.length+w+b.length,w>h[c]&&(h[c]=w),y[c]=w),_[c]=x}f.splice(1,0,_),a.splice(1,0,y),m=-1;const E=[];for(;++m<f.length;){const S=f[m],g=a[m];c=-1;const b=[];for(;++c<d;){const w=S[c]||"";let x="",T="";if(r.alignDelimiters!==!1){const D=h[c]-(g[c]||0),R=p[c];R===114?x=" ".repeat(D):R===99?D%2?(x=" ".repeat(D/2+.5),T=" ".repeat(D/2-.5)):(x=" ".repeat(D/2),T=x):T=" ".repeat(D)}r.delimiterStart!==!1&&!c&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&w==="")&&(r.delimiterStart!==!1||c)&&b.push(" "),r.alignDelimiters!==!1&&b.push(x),b.push(w),r.alignDelimiters!==!1&&b.push(T),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||c!==d-1)&&b.push("|")}E.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return E.join(`
|
|
508
|
-
`)}function rN(e){return e==null?"":String(e)}function Cb(e){const i=typeof e=="string"?e.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}const sN=Nh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function oN(e,i,r,s){const l=r.enter("blockquote"),p=r.createTracker(s);p.move("> "),p.shift(2);const f=r.indentLines(r.containerFlow(e,p.current()),aN);return l(),f}function aN(e,i,r){return">"+(r?"":" ")+e}function lN(e,i){return Eb(e,i.inConstruct,!0)&&!Eb(e,i.notInConstruct,!1)}function Eb(e,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let s=-1;for(;++s<i.length;)if(e.includes(i[s]))return!0;return!1}function kb(e,i,r,s){let l=-1;for(;++l<r.unsafe.length;){const p=r.unsafe[l];if(p.character===`
|
|
509
|
-
`&&!p.before&&!p.after&&lN(r.stack,p))return/[\t ]/.test(s.before)?"":" "}return`\\
|
|
510
|
-
`}function cN(e,i){const r=String(e);let s=r.indexOf(i),l=s,p=0,f=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===l?++p>f&&(f=p):p=1,l=s+i.length,s=r.indexOf(i,l);return f}function uN(e,i){return!!(i.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function hN(e){const i=e.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function dN(e,i,r,s){const l=hN(r),p=e.value||"";if(uN(e,r)){const c=r.enter("codeIndented"),_=r.indentLines(p,fN);return c(),_}const f=r.createTracker(s),a=l.repeat(Math.max(cN(p,l)+1,3)),h=r.enter("codeFenced"),d=l==="`"?"GraveAccent":"Tilde";let m=f.move(a);if(e.lang){const c=r.enter(`codeFencedLang${d}`);m+=f.move(r.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),c()}if(e.lang&&e.meta){const c=r.enter(`codeFencedMeta${d}`);m+=f.move(" "),m+=f.move(r.safe(e.meta,{before:m,after:`
|
|
511
|
-
`,encode:["`"],...f.current()})),c()}return m+=f.move(`
|
|
512
|
-
`),p&&(m+=f.move(p+`
|
|
513
|
-
`)),m+=f.move(a),h(),m}function fN(e,i,r){return(r?"":" ")+e}function ev(e){const i=e.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function pN(e,i,r,s){const l=ev(r),p=l==='"'?"Quote":"Apostrophe",f=r.enter("definition");let a=r.enter("label");const h=r.createTracker(s);let d=h.move("[");return d+=h.move(r.safe(r.associationId(e),{before:d,after:"]",...h.current()})),d+=h.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=r.enter("destinationLiteral"),d+=h.move("<"),d+=h.move(r.safe(e.url,{before:d,after:">",...h.current()})),d+=h.move(">")):(a=r.enter("destinationRaw"),d+=h.move(r.safe(e.url,{before:d,after:e.title?" ":`
|
|
514
|
-
`,...h.current()}))),a(),e.title&&(a=r.enter(`title${p}`),d+=h.move(" "+l),d+=h.move(r.safe(e.title,{before:d,after:l,...h.current()})),d+=h.move(l),a()),f(),d}function mN(e){const i=e.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function uh(e){const i=e.codePointAt(0);return i===void 0?"":String.fromCodePoint(i)}function sa(e){const i=e.codePointAt(e.length-2);return i!==void 0&&i>65535?e.slice(-2):e.slice(-1)}function a2(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tb(e,i,r){const s=hs(e),l=hs(i);return s===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function gN(e){if(e.charCodeAt(0)!==60)return;const i=e.charCodeAt(1);if(i===33){const a=e.charCodeAt(2);return a===45?2:a===91?5:dn(a)?4:void 0}if(i===63)return 3;const r=i===47,s=r?2:1;let l=s,p=e.charCodeAt(l);if(!dn(p))return;for(;p===45||fn(p);)p=e.charCodeAt(++l);const f=e.slice(s,l).toLowerCase();return!r&&p!==47&&Nm.includes(f)?1:VC.includes(f)?6:7}const vN=new Map([["*",!1],["_",!0]]);function _N(e,i,r){const s=new Set;for(const p of e){const f=r.get(p);if(f&&p.attention&&i.some(a=>a.attention===p.attention))for(const a of f.tokens)s.add(a.attention)}const l=[];for(const p of e)p.attention&&s.delete(p.attention)&&l.push(p.attention);return l.reverse(),l}function l2(e,i,r){const s=[],l=new Map,p=new Map;let f=0;for(;f<e.length;){if(!e[f].attention){f++;continue}const a=e[f].value.charAt(0),h=vN.get(a);let d=f+1;for(;d<e.length&&e[d].attention&&e[d].value.charAt(0)===a;)d++;const m=f?e[f-1].value:i,c=hs(m.charCodeAt(m.length-1)),_=hs((d<e.length?e[d].value:r).charCodeAt(0)),y=!_||_===2&&!!c,E=!c||c===2&&!!_,S={tokens:e.slice(f,d),markers:[],start:0,end:0,open:h?y&&(!!c||!E):y,close:h?E&&(!!_||!y):E,split:h!==void 0};for(const g of S.tokens){l.set(g,[...S.tokens]),p.set(g,S);let b=g.value.length;for(;b--;)S.markers.push(g)}S.end=S.markers.length,s.push(S),f=d}for(yN(s,l),f=-1;++f<e.length;){const a=l.get(e[f]);if(a)return{attention:_N(e,a,p),index:f}}}function Fu(e,i){const r=e[i?0:e.length-1];if(!r||r.attention)return;const s=i?uh(r.value):sa(r.value),l=a2(s.codePointAt(0));if(i)r.value=l+r.value.slice(s.length);else{let p=r.value.slice(0,r.value.length-s.length),f=0;for(;p.charCodeAt(p.length-1-f)===92;)f++;f%2&&(p+="\\"),r.value=p+l}}function xN(e,i,r,s,l){for(const p of r.attention){const f=i.get(p)||p.sequences[0];for(const a of p.sequences){if(a===f)continue;const h=new Map(i);h.set(p,a);const d=nv(e,h,s,l),m=l2(d,s,l);if(!m||m.index>r.index)return{chosen:h,mistake:m,tokens:d}}}}function yN(e,i){const r=new Map;for(const s of e){const l=s.tokens[0].value.charAt(0);let p=r.get(l);p||(p=[],r.set(l,p));let f=s.close?p.length:0;for(;f--&&s.start<s.end;){const a=p[f],h=a.end-a.start,d=s.end-s.start;if(s.split?(a.close||s.open)&&d%3&&!((h+d)%3):h!==a.markers.length||h!==d)continue;const m=s.split?h>1&&d>1?2:1:d,c=a.markers.slice(a.end-m,a.end),_=s.markers.slice(s.start,s.start+m),y=c[0],E=_[0];if(y===c[m-1]&&y.value.length===m&&E===_[m-1]&&E.value.length===m&&y.attention===E.attention)i.delete(y),i.delete(E);else{const S=[...new Set([...c,..._])];for(const g of S){const b=i.get(g);b&&b.push(...S)}}a.end-=m,s.start+=m,a.start===a.end&&p.splice(f,1),f=p.length}s.open&&s.start<s.end&&p.push(s)}}function bN(e,i,r){if(i.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(r.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const l of r)if(!Number.isSafeInteger(l)||l<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+l+"` as size, expected positive integer");const s=[];for(const l of i){if(l.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+l+"` as marker, expected a single ascii character");if(!BC(l.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+l+"` as marker, expected ascii punctuation");for(const p of r)s.push(l.repeat(p))}return s}function SN(e,i,r){const s=i.indexStack,l=e.children||[],p=[];let f=-1,a=r.before;s.push(-1);let h=i.createTracker(r);for(;++f<l.length;){const d=l[f];let m;if(s[s.length-1]=f,f+1<l.length){let y=i.handle.handlers[l[f+1].type];y&&y.peek&&(y=y.peek),m=y?uh(y(l[f+1],e,i,{before:"",after:"",...h.current()})):""}else m=r.after;const c=p[p.length-1];typeof c=="string"&&(a==="\r"||a===`
|
|
515
|
-
`)&&d.type==="html"&&gN(d.value)!==7&&(p[p.length-1]=c.replace(/(\r?\n|\r)$/," "),a=" ",h=i.createTracker(r),h.move(Ph(p,r.before,r.after)));const _=i.handle.handlers[d.type];if(_&&_.attention){const y=tv(d,_.attention,i,h);p.push(y),a=sa(y.sequences[0])}else{const y=i.handle(d,e,i,{...h.current(),after:m,before:a});if(!y)continue;h.move(y),p.push(y),a=sa(y)}}return s.pop(),p}function tv(e,i,r,s){const{construct:l,markers:p,sizes:f}=i(e,r),a=bN(e.type,p,f),h=a[0],d=r.enter(l);s.move(h);const m=SN(e,r,{...s.current(),before:h,after:h});return s.move(Ph(m,h,h)),s.move(h),d(),{children:m,sequences:a}}function nv(e,i,r,s){const l=[];let p,f=sa(r),a=-1;for(;++a<e.length;){const h=e[a];if(typeof h=="string"){const x={value:h,attention:void 0};p&&p===uh(h)&&Fu([x],!0),p=void 0,l.push(x),x.value&&(f=sa(x.value));continue}const d=i.get(h)||h.sequences[0],m=d.charAt(0),c=e[a+1],_=f,y=uh(c===void 0?s:typeof c=="string"?c:i.get(c)||c.sequences[0]),E=nv(h.children,i,d,d),S=E.length>0?E[0].value:"",g=Tb(_.charCodeAt(_.length-1),S.charCodeAt(0),m);g.inside&&Fu(E,!0);const b=E.length>0?sa(E[E.length-1].value):"",w=Tb(y.charCodeAt(0),b.charCodeAt(b.length-1),m);w.inside&&Fu(E,!1),g.outside&&_!==`
|
|
516
|
-
`&&_!=="\r"&&Fu(l,!1),w.outside&&(p=y),l.push({value:d,attention:h},...E,{value:d,attention:h}),f=d.charAt(d.length-1)}return l}function Ph(e,i,r){let s=new Map;const l=nv(e,s,i,r);let p=l,f=l2(p,i,r);for(;f;){const h=xN(e,s,f,i,r);if(!h){p=l;break}s=h.chosen,p=h.tokens,f=h.mistake}let a="";for(const h of p)a+=h.value;return a}iv.attention=c2;iv.peek=wN;function iv(e,i,r,s){const l=r.enter("phrasing"),p=tv(e,c2,r,r.createTracker(s)),f=Ph([p],s.before,s.after);return l(),f}function c2(e,i){return{construct:"emphasis",markers:mN(i)==="*"?["*","_"]:["_","*"],sizes:[1]}}function wN(e,i,r){return r.options.emphasis||"*"}function CN(e,i){let r=!1;return Qg(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return r=!0,Ku}),!!((!e.depth||e.depth<3)&&qg(e)&&(i.options.setext||r))}function EN(e,i,r,s){const l=Math.max(Math.min(6,e.depth||1),1),p=r.createTracker(s);if(CN(e,r)){const c=r.enter("headingSetext"),_=r.enter("phrasing"),y=r.containerPhrasing(e,{...p.current(),before:`
|
|
517
|
-
`,after:`
|
|
518
|
-
`});return _(),c(),y+`
|
|
519
|
-
`+(l===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
520
|
-
`))+1))}const f="#".repeat(l),a=r.enter("headingAtx"),h=r.enter("phrasing");p.move(f+" ");let d=r.containerPhrasing(e,{before:"# ",after:`
|
|
521
|
-
`,...p.current()});const m=d.charCodeAt(0);return(m===9||m===32)&&(d=a2(m)+d.slice(1)),d=d?f+" "+d:f,r.options.closeAtx&&(d+=" "+f),h(),a(),d}u2.peek=kN;function u2(e){return e.value||""}function kN(){return"<"}h2.peek=TN;function h2(e,i,r,s){const l=ev(r),p=l==='"'?"Quote":"Apostrophe",f=r.enter("image");let a=r.enter("label");const h=r.createTracker(s);let d=h.move("![");return d+=h.move(r.safe(e.alt,{before:d,after:"]",...h.current()})),d+=h.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=r.enter("destinationLiteral"),d+=h.move("<"),d+=h.move(r.safe(e.url,{before:d,after:">",...h.current()})),d+=h.move(">")):(a=r.enter("destinationRaw"),d+=h.move(r.safe(e.url,{before:d,after:e.title?" ":")",...h.current()}))),a(),e.title&&(a=r.enter(`title${p}`),d+=h.move(" "+l),d+=h.move(r.safe(e.title,{before:d,after:l,...h.current()})),d+=h.move(l),a()),d+=h.move(")"),f(),d}function TN(){return"!"}d2.peek=RN;function d2(e,i,r,s){const l=e.referenceType,p=r.enter("imageReference");let f=r.enter("label");const a=r.createTracker(s);let h=a.move("![");const d=r.safe(e.alt,{before:h,after:"]",...a.current()});h+=a.move(d+"]["),f();const m=r.stack;r.stack=m.filter(function(_){return _!=="phrasing"}),f=r.enter("reference");const c=r.safe(r.associationId(e),{before:h,after:"]",...a.current()});return f(),r.stack=m,p(),l==="full"||!d||d!==c?h+=a.move(c+"]"):l==="shortcut"?h=h.slice(0,-1):h+=a.move("]"),h}function RN(){return"!"}f2.peek=AN;function f2(e,i,r){let s=e.value||"",l="`",p=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(s);)l+="`";for(/[^\n\r ]/.test(s)&&(/^[\n\r ]/.test(s)&&/[\n\r ]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++p<r.unsafe.length;){const f=r.unsafe[p],a=r.compilePattern(f);if(!f.atBreak)continue;let h;for(;h=a.exec(s);){let d=h.index;s.charCodeAt(d)===10&&s.charCodeAt(d-1)===13&&d--,s=s.slice(0,d)+" "+s.slice(h.index+1)}}return l+s+l}function AN(){return"`"}function p2(e,i){const r=qg(e);return!!(!i.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}m2.peek=LN;function m2(e,i,r,s){const l=ev(r),p=l==='"'?"Quote":"Apostrophe",f=r.createTracker(s);if(p2(e,r)){const E=r.stack;r.stack=E.filter(function(b){return b!=="phrasing"});const S=r.enter("autolink");let g=f.move("<");return g+=f.move(r.containerPhrasing(e,{before:g,after:">",...f.current()})),g+=f.move(">"),S(),r.stack=E,g}const a=r.enter("link");let h=r.enter("label"),d=f.move("[");const m=r.containerPhrasing(e,{before:d,after:"](",...f.current()});d+=f.move(m),h(),d+=f.move("](");const c=/[\0- \u007F]/.test(e.url),_=s.before.charAt(s.before.length-1);let y=e.title||void 0;if(!y&&!c&&(_===`
|
|
522
|
-
`||_==="\r")){let E=0;for(;E<m.length&&m.charCodeAt(E)!==93;)E+=m.charCodeAt(E)===92?2:1;m.charCodeAt(E+1)===58&&(y="")}return!e.url&&typeof y=="string"||c?(h=r.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(r.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(h=r.enter("destinationRaw"),d+=f.move(r.safe(e.url,{before:d,after:typeof y=="string"?" ":")",...f.current()}))),h(),typeof y=="string"&&(h=r.enter(`title${p}`),d+=f.move(" "+l),d+=f.move(r.safe(y,{before:d,after:l,...f.current()})),d+=f.move(l),h()),d+=f.move(")"),a(),d}function LN(e,i,r){return p2(e,r)?"<":"["}g2.peek=DN;function g2(e,i,r,s){const l=e.referenceType,p=r.enter("linkReference");let f=r.enter("label");const a=r.createTracker(s);let h=a.move("[");const d=r.containerPhrasing(e,{before:h,after:"]",...a.current()});h+=a.move(d+"]["),f();const m=r.stack;r.stack=m.filter(function(_){return _!=="phrasing"}),f=r.enter("reference");const c=r.safe(r.associationId(e),{before:h,after:"]",...a.current()});return f(),r.stack=m,p(),l==="full"||!d||d!==c?h+=a.move(c+"]"):l==="shortcut"?h=h.slice(0,-1):h+=a.move("]"),h}function DN(){return"["}function rv(e){const i=e.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function MN(e){const i=rv(e),r=e.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function jN(e){const i=e.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function v2(e){const i=e.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function ON(e,i,r,s){const l=r.enter("list"),p=r.bulletCurrent;let f=e.ordered?jN(r):rv(r);const a=e.ordered?f==="."?")":".":MN(r);let h=i&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((f==="*"||f==="-")&&m&&(!m.children||!m.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),v2(r)===f&&m){let c=-1;for(;++c<e.children.length;){const _=e.children[c];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(f=a),r.bulletCurrent=f;const d=r.containerFlow(e,s);return r.bulletLastUsed=f,r.bulletCurrent=p,l(),d}function NN(e){const i=e.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function BN(e,i,r,s){const l=NN(r);let p=r.bulletCurrent||rv(r);i&&i.type==="list"&&i.ordered&&(p=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(e))+p);let f=p.length+1;(l==="tab"||l==="mixed"&&(i&&i.type==="list"&&i.spread||e.spread))&&(f=Math.ceil(f/4)*4);const a=r.createTracker(s);a.move(p+" ".repeat(f-p.length)),a.shift(f);const h=r.enter("listItem"),d=r.indentLines(r.containerFlow(e,a.current()),m);return h(),d;function m(c,_,y){return _?(y?"":" ".repeat(f))+c:(y?p:p+" ".repeat(f-p.length))+c}}function PN(e,i,r,s){const l=r.enter("paragraph"),p=r.enter("phrasing"),f=r.containerPhrasing(e,s);return p(),l(),f}function IN(e,i,r,s){if(!e.children.some(function(a){return sN(a)}))return r.containerFlow(e,s);const p=r.enter("phrasing"),f=r.containerPhrasing(e,s);return p(),f}function zN(e){const i=e.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}sv.attention=_2;sv.peek=HN;function sv(e,i,r,s){const l=r.enter("phrasing"),p=tv(e,_2,r,r.createTracker(s)),f=Ph([p],s.before,s.after);return l(),f}function _2(e,i){return{construct:"strong",markers:zN(i)==="*"?["*","_"]:["_","*"],sizes:[2]}}function HN(e,i,r){return r.options.strong||"*"}function FN(e,i,r,s){const l=i?i.children:[],p=r.indexStack[r.indexStack.length-1];return r.safe(e.value,{...s,afterNode:l[p+1],beforeNode:l[p-1]})}function UN(e){const i=e.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function $N(e,i,r){const s=(v2(r)+(r.options.ruleSpaces?" ":"")).repeat(UN(r));return r.options.ruleSpaces?s.slice(0,-1):s}const x2={blockquote:oN,break:kb,code:dN,definition:pN,emphasis:iv,hardBreak:kb,heading:EN,html:u2,image:h2,imageReference:d2,inlineCode:f2,link:m2,linkReference:g2,list:ON,listItem:BN,paragraph:PN,root:IN,strong:sv,text:FN,thematicBreak:$N};function qN(){return{enter:{table:VN,tableData:Rb,tableHeader:Rb,tableRow:GN},exit:{codeText:YN,table:WN,tableData:Zp,tableHeader:Zp,tableRow:Zp}}}function VN(e){const i=e._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function WN(e){this.exit(e),this.data.inTable=void 0}function GN(e){this.enter({type:"tableRow",children:[]},e)}function Zp(e){this.exit(e)}function Rb(e){this.enter({type:"tableCell",children:[]},e)}function YN(e){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,XN));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(e)}function XN(e,i){return i==="|"?i:e}function KN(e){const i=e||{},r=i.tableCellPadding,s=i.tablePipeAlign,l=i.stringLength,p=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
523
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:f,tableCell:h,tableRow:a}};function f(y,E,S,g){return d(m(y,S,g),y.align)}function a(y,E,S,g){const b=c(y,S,g),w=d([b]);return w.slice(0,w.indexOf(`
|
|
524
|
-
`))}function h(y,E,S,g){const b=S.enter("tableCell"),w=S.enter("phrasing"),x=S.containerPhrasing(y,{...g,before:p,after:p});return w(),b(),x}function d(y,E){return iN(y,{align:E,alignDelimiters:s,padding:r,stringLength:l})}function m(y,E,S){const g=y.children;let b=-1;const w=[],x=E.enter("table");for(;++b<g.length;)w[b]=c(g[b],E,S);return x(),w}function c(y,E,S){const g=y.children;let b=-1;const w=[],x=E.enter("tableRow");for(;++b<g.length;)w[b]=h(g[b],y,E,S);return x(),w}function _(y,E,S){let g=x2.inlineCode(y,E,S);return S.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function QN(){return{exit:{taskListCheckValueChecked:Ab,taskListCheckValueUnchecked:Ab,paragraph:JN}}}function ZN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:e7}}}function Ab(e){const i=this.stack[this.stack.length-2];i.type,i.checked=e.type==="taskListCheckValueChecked"}function JN(e){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const s=r.children[0];if(s&&s.type==="text"){const l=i.children;let p=-1,f;for(;++p<l.length;){const a=l[p];if(a.type==="paragraph"){f=a;break}}f===r&&(s.value=s.value.slice(1),s.value.length===0?r.children.shift():r.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,r.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function e7(e,i,r,s){const l=e.children[0],p=typeof e.checked=="boolean"&&l&&l.type==="paragraph",f="["+(e.checked?"x":" ")+"] ",a=r.createTracker(s);p&&a.move(f);let h=x2.listItem(e,i,r,{...s,...a.current()});return p&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),h;function d(m){return m+f}}function t7(){return[EO(),WO(),KO(),qN(),QN()]}function n7(e){return{extensions:[kO(),GO(e),QO(),KN(e),ZN()]}}const i7={tokenize:c7,partial:!0},y2={tokenize:u7,partial:!0},b2={tokenize:h7,partial:!0},S2={tokenize:d7,partial:!0},r7={tokenize:f7,partial:!0},w2={name:"wwwAutolink",tokenize:a7,previous:E2},C2={name:"protocolAutolink",tokenize:l7,previous:k2},Er={name:"emailAutolink",tokenize:o7,previous:T2},Vi={};function s7(){return{text:Vi}}let Fs=48;for(;Fs<123;)Vi[Fs]=Er,Fs++,Fs===58?Fs=65:Fs===91&&(Fs=97);Vi[43]=Er;Vi[45]=Er;Vi[46]=Er;Vi[95]=Er;Vi[72]=[Er,C2];Vi[104]=[Er,C2];Vi[87]=[Er,w2];Vi[119]=[Er,w2];function o7(e,i,r){const s=this;let l,p;return f;function f(c){return!Um(c)||!T2.call(s,s.previous)||ov(s.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Um(c)?(e.consume(c),a):c===64?(e.consume(c),h):r(c)}function h(c){return c===46?e.check(r7,m,d)(c):c===45||c===95||fn(c)?(p=!0,e.consume(c),h):m(c)}function d(c){return e.consume(c),l=!0,h}function m(c){return p&&l&&dn(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),i(c)):r(c)}}function a7(e,i,r){const s=this;return l;function l(f){return f!==87&&f!==119||!E2.call(s,s.previous)||ov(s.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(i7,e.attempt(y2,e.attempt(b2,p),r),r)(f))}function p(f){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),i(f)}}function l7(e,i,r){const s=this;let l="",p=!1;return f;function f(c){return(c===72||c===104)&&k2.call(s,s.previous)&&!ov(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(c),e.consume(c),a):r(c)}function a(c){if(dn(c)&&l.length<5)return l+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const _=l.toLowerCase();if(_==="http"||_==="https")return e.consume(c),h}return r(c)}function h(c){return c===47?(e.consume(c),p?d:(p=!0,h)):r(c)}function d(c){return c===null||oh(c)||yt(c)||Xs(c)||Mh(c)?r(c):e.attempt(y2,e.attempt(b2,m),r)(c)}function m(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),i(c)}}function c7(e,i,r){let s=0;return l;function l(f){return(f===87||f===119)&&s<3?(s++,e.consume(f),l):f===46&&s===3?(e.consume(f),p):r(f)}function p(f){return f===null?r(f):i(f)}}function u7(e,i,r){let s,l,p;return f;function f(d){return d===46||d===95?e.check(S2,h,a)(d):d===null||yt(d)||Xs(d)||d!==45&&Mh(d)?h(d):(p=!0,e.consume(d),f)}function a(d){return d===95?s=!0:(l=s,s=void 0),e.consume(d),f}function h(d){return l||s||!p?r(d):i(d)}}function h7(e,i){let r=0,s=0;return l;function l(f){return f===40?(r++,e.consume(f),l):f===41&&s<r?p(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?e.check(S2,i,p)(f):f===null||yt(f)||Xs(f)?i(f):(e.consume(f),l)}function p(f){return f===41&&s++,e.consume(f),l}}function d7(e,i,r){return s;function s(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),s):a===38?(e.consume(a),p):a===93?(e.consume(a),l):a===60||a===null||yt(a)||Xs(a)?i(a):r(a)}function l(a){return a===null||a===40||a===91||yt(a)||Xs(a)?i(a):s(a)}function p(a){return dn(a)?f(a):r(a)}function f(a){return a===59?(e.consume(a),s):dn(a)?(e.consume(a),f):r(a)}}function f7(e,i,r){return s;function s(p){return e.consume(p),l}function l(p){return fn(p)?r(p):i(p)}}function E2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function k2(e){return!dn(e)}function T2(e){return!(e===47||Um(e))}function Um(e){return e===43||e===45||e===46||e===95||fn(e)}function ov(e){let i=e.length,r=!1;for(;i--;){const s=e[i][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){r=!0;break}if(s._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const p7={tokenize:S7,partial:!0};function m7(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:x7,continuation:{tokenize:y7},exit:b7}},text:{91:{name:"gfmFootnoteCall",tokenize:_7},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:g7,resolveTo:v7}}}}function g7(e,i,r){const s=this;let l=s.events.length;const p=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let f;for(;l--;){const h=s.events[l][1];if(h.type==="labelImage"){f=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return a;function a(h){if(!f||!f._balanced)return r(h);const d=wi(s.sliceSerialize({start:f.end,end:s.now()}));return d.codePointAt(0)!==94||!p.includes(d.slice(1))?r(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),i(h))}}function v7(e,i){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const p={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},p.start),end:Object.assign({},p.end)},a=[e[r+1],e[r+2],["enter",s,i],e[r+3],e[r+4],["enter",l,i],["exit",l,i],["enter",p,i],["enter",f,i],["exit",f,i],["exit",p,i],e[e.length-2],e[e.length-1],["exit",s,i]];return e.splice(r,e.length-r+1,...a),e}function _7(e,i,r){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let p=0,f;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),h}function h(c){return c!==94?r(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(c){if(p>999||c===93&&!f||c===null||c===91||yt(c))return r(c);if(c===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return l.includes(wi(s.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),i):r(c)}return yt(c)||(f=!0),p++,e.consume(c),c===92?m:d}function m(c){return c===91||c===92||c===93?(e.consume(c),p++,d):d(c)}}function x7(e,i,r){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let p,f=0,a;return h;function h(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(E)}function m(E){if(f>999||E===93&&!a||E===null||E===91||yt(E))return r(E);if(E===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return p=wi(s.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return yt(E)||(a=!0),f++,e.consume(E),E===92?c:m}function c(E){return E===91||E===92||E===93?(e.consume(E),f++,m):m(E)}function _(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),l.includes(p)||l.push(p),ot(e,y,"gfmFootnoteDefinitionWhitespace")):r(E)}function y(E){return i(E)}}function y7(e,i,r){return e.check(Kl,i,e.attempt(p7,i,r))}function b7(e){e.exit("gfmFootnoteDefinition")}function S7(e,i,r){const s=this;return ot(e,l,"gfmFootnoteDefinitionIndent",5);function l(p){const f=s.events[s.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?i(p):r(p)}}function w7(e){let r=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:p,resolveAll:l};return r==null&&(r=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function l(f,a){let h=-1;for(;++h<f.length;)if(f[h][0]==="enter"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._close){let d=h;for(;d--;)if(f[d][0]==="exit"&&f[d][1].type==="strikethroughSequenceTemporary"&&f[d][1]._open&&f[h][1].end.offset-f[h][1].start.offset===f[d][1].end.offset-f[d][1].start.offset){f[h][1].type="strikethroughSequence",f[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},f[d][1].start),end:Object.assign({},f[h][1].end)},c={type:"strikethroughText",start:Object.assign({},f[d][1].end),end:Object.assign({},f[h][1].start)},_=[["enter",m,a],["enter",f[d][1],a],["exit",f[d][1],a],["enter",c,a]],y=a.parser.constructs.insideSpan.null;y&&Si(_,_.length,0,jh(y,f.slice(d+1,h),a)),Si(_,_.length,0,[["exit",c,a],["enter",f[h][1],a],["exit",f[h][1],a],["exit",m,a]]),Si(f,d-1,h-d+3,_),h=d+_.length-2;break}}for(h=-1;++h<f.length;)f[h][1].type==="strikethroughSequenceTemporary"&&(f[h][1].type="data");return f}function p(f,a,h){const d=this.previous,m=this.events;let c=0;return _;function _(E){return d===126&&m[m.length-1][1].type!=="characterEscape"?h(E):(f.enter("strikethroughSequenceTemporary"),y(E))}function y(E){const S=hs(d);if(E===126)return c>1?h(E):(f.consume(E),c++,y);if(c<2&&!r)return h(E);const g=f.exit("strikethroughSequenceTemporary"),b=hs(E);return g._open=!b||b===2&&!!S,g._close=!S||S===2&&!!b,a(E)}}}class C7{constructor(){this.map=[],this.index=new Map}add(i,r,s){E7(this,i,r,s)}consume(i){if(this.map.sort(function(p,f){return p[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const s=[];for(;r>0;)r-=1,s.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];s.push(i.slice()),i.length=0;let l=s.pop();for(;l;){for(const p of l)i.push(p);l=s.pop()}this.map.length=0,this.index.clear()}}function E7(e,i,r,s){if(r===0&&s.length===0)return;const l=e.index.get(i);if(l){l[1]+=r,l[2].push(...s);return}const p=[i,r,s];e.map.push(p),e.index.set(i,p)}function k7(e,i){let r=!1;const s=[];for(;i<e.length;){const l=e[i];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&s.push(e[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[i-1][1].type==="tableDelimiterMarker"){const p=s.length-1;s[p]=s[p]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return s}function T7(){return{flow:{null:{name:"table",tokenize:R7,resolveAll:A7}}}}function R7(e,i,r){const s=this;let l=0,p=0,f;return a;function a(M){let I=s.events.length-1;for(;I>-1;){const{type:U}=s.events[I][1];if(U==="lineEnding"||U==="linePrefix")I--;else break}const B=I>-1?s.events[I][1].type:null,H=B==="tableHead"||B==="tableRow"?R:h;return H===R&&s.parser.lazy[s.now().line]?r(M):H(M)}function h(M){return e.enter("tableHead"),e.enter("tableRow"),d(M)}function d(M){return M===124||(f=!0,p+=1),m(M)}function m(M){return M===null?r(M):Ne(M)?p>1?(p=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),y):r(M):Ke(M)?ot(e,m,"whitespace")(M):(p+=1,f&&(f=!1,l+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),f=!0,m):(e.enter("data"),c(M)))}function c(M){return M===null||M===124||yt(M)?(e.exit("data"),m(M)):(e.consume(M),M===92?_:c)}function _(M){return M===92||M===124?(e.consume(M),c):c(M)}function y(M){return s.interrupt=!1,s.parser.lazy[s.now().line]?r(M):(e.enter("tableDelimiterRow"),f=!1,Ke(M)?ot(e,E,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):E(M))}function E(M){return M===45||M===58?g(M):M===124?(f=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),S):D(M)}function S(M){return Ke(M)?ot(e,g,"whitespace")(M):g(M)}function g(M){return M===58?(p+=1,f=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),b):M===45?(p+=1,b(M)):M===null||Ne(M)?T(M):D(M)}function b(M){return M===45?(e.enter("tableDelimiterFiller"),w(M)):D(M)}function w(M){return M===45?(e.consume(M),w):M===58?(f=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(M))}function x(M){return Ke(M)?ot(e,T,"whitespace")(M):T(M)}function T(M){return M===124?E(M):M===null||Ne(M)?!f||l!==p?D(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),i(M)):D(M)}function D(M){return r(M)}function R(M){return e.enter("tableRow"),L(M)}function L(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),L):M===null||Ne(M)?(e.exit("tableRow"),i(M)):Ke(M)?ot(e,L,"whitespace")(M):(e.enter("data"),A(M))}function A(M){return M===null||M===124||yt(M)?(e.exit("data"),L(M)):(e.consume(M),M===92?j:A)}function j(M){return M===92||M===124?(e.consume(M),A):A(M)}}function A7(e,i){let r=-1,s=!0,l=0,p=[0,0,0,0],f=[0,0,0,0],a=!1,h=0,d,m,c;const _=new C7;for(;++r<e.length;){const y=e[r],E=y[1];y[0]==="enter"?E.type==="tableHead"?(a=!1,h!==0&&(Lb(_,i,h,d,m),m=void 0,h=0),d={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(r,0,[["enter",d,i]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(s=!0,c=void 0,p=[0,0,0,0],f=[0,r+1,0,0],a&&(a=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(r,0,[["enter",m,i]])),l=E.type==="tableDelimiterRow"?2:m?3:1):l&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(s=!1,f[2]===0&&(p[1]!==0&&(f[0]=f[1],c=Uu(_,i,p,l,void 0,c),p=[0,0,0,0]),f[2]=r)):E.type==="tableCellDivider"&&(s?s=!1:(p[1]!==0&&(f[0]=f[1],c=Uu(_,i,p,l,void 0,c)),p=f,f=[p[1],r,0,0])):E.type==="tableHead"?(a=!0,h=r):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=r,p[1]!==0?(f[0]=f[1],c=Uu(_,i,p,l,r,c)):f[1]!==0&&(c=Uu(_,i,f,l,r,c)),l=0):l&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=r)}for(h!==0&&Lb(_,i,h,d,m),_.consume(i.events),r=-1;++r<i.events.length;){const y=i.events[r];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=k7(i.events,r))}return e}function Uu(e,i,r,s,l,p){const f=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",a="tableContent";r[0]!==0&&(p.end=Object.assign({},ea(i.events,r[0])),e.add(r[0],0,[["exit",p,i]]));const h=ea(i.events,r[1]);if(p={type:f,start:Object.assign({},h),end:Object.assign({},h)},e.add(r[1],0,[["enter",p,i]]),r[2]!==0){const d=ea(i.events,r[2]),m=ea(i.events,r[3]),c={type:a,start:Object.assign({},d),end:Object.assign({},m)};if(e.add(r[2],0,[["enter",c,i]]),s!==2){const _=i.events[r[2]],y=i.events[r[3]];if(_[1].end=Object.assign({},y[1].end),_[1].type="chunkText",_[1].contentType="text",r[3]>r[2]+1){const E=r[2]+1,S=r[3]-r[2]-1;e.add(E,S,[])}}e.add(r[3]+1,0,[["exit",c,i]])}return l!==void 0&&(p.end=Object.assign({},ea(i.events,l)),e.add(l,0,[["exit",p,i]]),p=void 0),p}function Lb(e,i,r,s,l){const p=[],f=ea(i.events,r);l&&(l.end=Object.assign({},f),p.push(["exit",l,i])),s.end=Object.assign({},f),p.push(["exit",s,i]),e.add(r+1,0,p)}function ea(e,i){const r=e[i],s=r[0]==="enter"?"start":"end";return r[1][s]}const L7={name:"tasklistCheck",tokenize:M7};function D7(){return{text:{91:L7}}}function M7(e,i,r){const s=this;return l;function l(h){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?r(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),p)}function p(h){return yt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),f):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),f):r(h)}function f(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):r(h)}function a(h){return Ne(h)?i(h):Ke(h)?e.check({tokenize:j7},i,r)(h):r(h)}}function j7(e,i,r){return ot(e,s,"whitespace");function s(l){return l===null?r(l):i(l)}}function O7(e){return OC([s7(),m7(),w7(e),T7(),D7()])}const N7={};function B7(e){const i=this,r=e||N7,s=i.data(),l=s.micromarkExtensions||(s.micromarkExtensions=[]),p=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),f=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);l.push(O7(r)),p.push(t7()),f.push(n7(r))}function av({children:e,className:i}){return v.jsx("div",{className:ye("space-y-2 font-serif leading-relaxed",i),children:v.jsx(mO,{remarkPlugins:[B7],components:{p:({children:r})=>v.jsx("p",{className:"whitespace-pre-wrap",children:r}),h1:({children:r})=>v.jsx("h1",{className:"font-sans text-sm font-semibold",children:r}),h2:({children:r})=>v.jsx("h2",{className:"font-sans text-sm font-semibold",children:r}),h3:({children:r})=>v.jsx("h3",{className:"font-sans text-xs font-semibold uppercase tracking-wide",children:r}),ul:({children:r})=>v.jsx("ul",{className:"list-disc space-y-1 pl-4",children:r}),ol:({children:r})=>v.jsx("ol",{className:"list-decimal space-y-1 pl-4",children:r}),li:({children:r})=>v.jsx("li",{className:"marker:text-muted-foreground",children:r}),a:({children:r,href:s})=>v.jsx("a",{href:s,target:"_blank",rel:"noreferrer",className:"text-primary underline underline-offset-2",children:r}),blockquote:({children:r})=>v.jsx("blockquote",{className:"border-l-2 border-border pl-3 italic text-foreground/80",children:r}),code:({className:r,children:s})=>!!r?v.jsx("code",{className:"block overflow-x-auto font-mono text-xs",children:s}):v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]",children:s}),pre:({children:r})=>v.jsx("pre",{className:"overflow-x-auto rounded-md bg-muted p-2 font-mono text-xs",children:r}),table:({children:r})=>v.jsx("div",{className:"overflow-x-auto",children:v.jsx("table",{className:"w-full border-collapse text-xs",children:r})}),th:({children:r})=>v.jsx("th",{className:"border-b px-2 py-1 text-left font-sans font-medium",children:r}),td:({children:r})=>v.jsx("td",{className:"border-b border-border/50 px-2 py-1 align-top",children:r}),hr:()=>v.jsx("hr",{className:"border-border"})},children:e})})}function P7(e){const i=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(e);if(!i)return{fields:[],body:e};const r=[];for(const s of i[1].split(/\r?\n/)){const l=/^([A-Za-z0-9_-]+):\s*(.*)$/.exec(s);l?r.push([l[1],l[2]]):r.length&&s.trim()&&(r[r.length-1][1]+=` ${s.trim()}`)}return{fields:r,body:e.slice(i[0].length)}}function I7({mode:e,onChange:i,editable:r}){const s=[["view",Zm,"View mode"],["edit",_r,r?"Edit mode":"Edit mode (read-only)"]];return v.jsx("div",{className:"flex rounded-md border bg-card p-0.5",children:s.map(([l,p,f])=>v.jsx("button",{title:f,"aria-label":f,"aria-pressed":e===l,onClick:()=>i(l),className:ye("rounded p-1 transition-colors",e===l?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"),children:v.jsx(p,{size:13})},l))})}function Zl({value:e,onChange:i,rows:r=24,fill:s=!1,blame:l,fileBlame:p,defaultMode:f="view",className:a}){const[h,d]=P.useState(f),{fields:m,body:c}=P7(e),_={height:s?"100%":`${r*1.6+1}rem`};return v.jsxs("div",{className:ye("flex flex-col overflow-hidden rounded border bg-transparent",s&&"h-full",a),children:[v.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b px-2 py-1",children:[v.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:h==="view"?"View":i?"Edit":"Raw (read-only)"}),v.jsx(I7,{mode:h,onChange:d,editable:!!i})]}),h==="view"?v.jsxs("div",{className:ye("overflow-y-auto px-4 py-3",s&&"min-h-0 flex-1"),style:s?void 0:_,children:[m.length>0&&v.jsx("table",{className:"mb-3 w-full border-collapse text-[11px]",children:v.jsx("tbody",{children:m.map(([y,E])=>v.jsxs("tr",{className:"border-b border-border/60",children:[v.jsx("td",{className:"w-32 py-1 pr-3 align-top font-mono text-muted-foreground",children:y}),v.jsx("td",{className:"py-1 align-top [overflow-wrap:anywhere]",children:E})]},y))})}),c.trim()?v.jsx(av,{className:"text-xs",children:c}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"Empty."})]}):v.jsx("div",{className:ye(s&&"min-h-0 flex-1"),style:s?void 0:_,children:v.jsx(xC,{value:e,onChange:i,language:"markdown",wrap:!0,blame:l,fileBlame:p})})]})}function z7(e,i){const r=e.split(`
|
|
525
|
-
`),s=i.split(`
|
|
526
|
-
`),l=Array.from({length:r.length+1},()=>new Uint32Array(s.length+1));for(let h=r.length-1;h>=0;h-=1)for(let d=s.length-1;d>=0;d-=1)l[h][d]=r[h]===s[d]?l[h+1][d+1]+1:Math.max(l[h+1][d],l[h][d+1]);const p=[];let f=0,a=0;for(;f<r.length&&a<s.length;)r[f]===s[a]?(p.push({type:" ",line:r[f]}),f+=1,a+=1):l[f+1][a]>=l[f][a+1]?p.push({type:"-",line:r[f++]}):p.push({type:"+",line:s[a++]});for(;f<r.length;)p.push({type:"-",line:r[f++]});for(;a<s.length;)p.push({type:"+",line:s[a++]});return p}function hh({before:e,after:i}){const r=z7(e,i);return v.jsx("pre",{className:"max-h-[60vh] overflow-auto rounded border font-mono text-[11px]",children:r.filter((s,l)=>s.type!==" "||r.slice(Math.max(0,l-2),l+3).some(p=>p.type!==" ")).map((s,l)=>v.jsxs("div",{className:ye("px-2",s.type==="+"&&"bg-success/20",s.type==="-"&&"bg-destructive/20"),children:[s.type," ",s.line]},l))})}function R2({path:e,title:i,badge:r,subtitle:s,onSaved:l}){const p=mn(),[f,a]=P.useState(null),[h,d]=P.useState(!1),[m,c]=P.useState(""),[_,y]=P.useState(null);if(P.useEffect(()=>{a(null),y(null),_e.memoryFile(e).then(g=>{a(g.content),c(g.content),d(g.writable)},g=>y(g.message))},[e]),_)return v.jsx("div",{className:"text-xs text-severity-critical",children:_});if(f===null)return v.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."});const E=m!==f,S=()=>p({title:`Write ${i}?`,description:"Writes the real file on disk.",body:v.jsx(hh,{before:f,after:m}),confirmLabel:"Write file",maxWidth:"max-w-3xl",run:async()=>{const g=await _e.saveMemoryFile(e,m);a(g.content),we.getState().notify("Written."),l==null||l()}});return v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsxs("h2",{className:"flex items-center gap-2 font-mono text-sm font-semibold",children:[v.jsx("span",{className:"min-w-0 truncate",children:i}),r]}),v.jsxs("p",{className:"break-all text-[11px] text-muted-foreground",children:[s??e,!h&&" · read-only (managed by a plugin)",h&&!f&&" · does not exist yet; saving creates it"]})]}),h&&v.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[E&&v.jsx(ve,{onClick:()=>c(f),children:"Discard"}),v.jsx(ve,{variant:"primary",disabled:!E,onClick:()=>void S(),children:"Review & save"})]})]}),v.jsx(Zl,{rows:26,value:m,onChange:h?c:void 0})]})}var H7=Object.defineProperty,vr=(e,i)=>H7(e,"name",{value:i,configurable:!0}),lv="Checkbox",[F7,K9]=yr(lv),[U7,cv]=F7(lv);function A2(e){const{__scopeCheckbox:i,checked:r,children:s,defaultChecked:l,disabled:p,form:f,name:a,onCheckedChange:h,required:d,value:m="on",internal_do_not_use_render:c}=e,[_,y]=Vs({prop:r,defaultProp:l??!1,onChange:h,caller:lv}),[E,S]=P.useState(null),[g,b]=P.useState(null),[w,x]=P.useState(null),T=E?!!f||!!E.closest("form"):!0,D={checked:_,disabled:p,setChecked:y,control:E,setControl:S,name:a,form:f,value:m,userClick:w,onUserClick:x,required:d,defaultChecked:di(l)?!1:l,isFormControl:T,bubbleInput:g,setBubbleInput:b};return v.jsx(U7,{scope:i,...D,children:L2(c)?c(D):s})}vr(A2,"CheckboxProvider");var $7="CheckboxTrigger",q7=P.forwardRef(vr(function({__scopeCheckbox:i,onKeyDown:r,onClick:s,...l},p){const{control:f,value:a,disabled:h,checked:d,required:m,setControl:c,setChecked:_,onUserClick:y,isFormControl:E,bubbleInput:S}=cv($7,i),g=ut(p,c),b=P.useRef(d);return P.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const x=vr(()=>_(b.current),"reset");return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[f,_]),v.jsx(wt.button,{type:"button",role:"checkbox","aria-checked":di(d)?"mixed":d,"aria-required":m,"data-state":uv(d),"data-disabled":h?"":void 0,disabled:h,value:a,...l,ref:g,onKeyDown:tt(r,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:tt(s,w=>{const x=w.isPropagationStopped();y({requestedChecked:di(d)?!0:!d,hasConsumerStoppedPropagation:x}),_(T=>di(T)?!0:!T),S&&E&&(x||w.stopPropagation())})})},"CheckboxTrigger")),V7=P.forwardRef(vr(function(i,r){const{__scopeCheckbox:s,name:l,checked:p,defaultChecked:f,required:a,disabled:h,value:d,onCheckedChange:m,form:c,..._}=i;return v.jsx(A2,{__scopeCheckbox:s,checked:p,defaultChecked:f,disabled:h,required:a,onCheckedChange:m,name:l,form:c,value:d,internal_do_not_use_render:({isFormControl:y})=>v.jsxs(v.Fragment,{children:[v.jsx(q7,{..._,ref:r,__scopeCheckbox:s}),y&&v.jsx(X7,{__scopeCheckbox:s})]})})},"Checkbox")),W7="CheckboxIndicator",G7=P.forwardRef(vr(function(i,r){const{__scopeCheckbox:s,forceMount:l,...p}=i,f=cv(W7,s);return v.jsx(br,{present:l||di(f.checked)||f.checked===!0,children:v.jsx(wt.span,{"data-state":uv(f.checked),"data-disabled":f.disabled?"":void 0,...p,ref:r,style:{pointerEvents:"none",...i.style}})})},"CheckboxIndicator")),Y7="CheckboxBubbleInput",X7=P.forwardRef(vr(function({__scopeCheckbox:i,onClick:r,...s},l){const{control:p,userClick:f,checked:a,defaultChecked:h,required:d,disabled:m,name:c,value:_,form:y,bubbleInput:E,setBubbleInput:S}=cv(Y7,i),g=ut(l,S),b=Cg(p),w=P.useRef(!1),x=P.useRef(a),T=P.useRef(f),D=P.useRef(null);P.useEffect(()=>{const L=E;if(!L)return;const A=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(A,"checked").set;if(!M)return;const I=x.current!==a;x.current=a;const B=f!==null&&f!==T.current;if(T.current=f,B)D.current=I?null:f,I&&(L.indeterminate=di(a),M.call(L,di(a)?!1:a)),L.dispatchEvent(new Event("click",{bubbles:!f.hasConsumerStoppedPropagation}));else if(I){const H=D.current;D.current=null;const U=(H==null?void 0:H.requestedChecked)===a;w.current=!0,L.indeterminate=di(a),M.call(L,di(a)?!1:a),L.dispatchEvent(new Event("click",{bubbles:!(U&&H.hasConsumerStoppedPropagation)})),w.current=!1}},[E,a,f]);const R=P.useRef(di(a)?!1:a);return v.jsx(wt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:h??R.current,required:d,disabled:m,name:c,value:_,form:y,...s,tabIndex:-1,ref:g,onClick:tt(r,L=>{w.current&&L.stopPropagation()}),style:{...s.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function L2(e){return typeof e=="function"}vr(L2,"isFunction");function di(e){return e==="indeterminate"}vr(di,"isIndeterminate");function uv(e){return di(e)?"indeterminate":e?"checked":"unchecked"}vr(uv,"getState");function Ih({id:e,label:i,ariaLabel:r,checked:s,onCheckedChange:l,disabled:p,title:f,className:a}){const h=e??(i?`cb-${String(i).toLowerCase().replace(/\s+/g,"-")}`:void 0);return v.jsxs("div",{className:ye("flex items-center gap-2",a),title:f,children:[v.jsx(V7,{id:h,checked:s,onCheckedChange:d=>l(d===!0),"aria-label":r,disabled:p,className:"h-4 w-4 shrink-0 cursor-pointer rounded border border-border bg-transparent focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-40",children:v.jsx(G7,{className:"flex items-center justify-center",children:v.jsx(Il,{className:"h-3 w-3 text-primary",strokeWidth:3})})}),i&&v.jsx("label",{htmlFor:h,className:"cursor-pointer select-none text-xs",children:i})]})}function K7({path:e,kind:i,tick:r}){const[s,l]=P.useState(!1),[p,f]=P.useState(0);P.useEffect(()=>{let h=!1;return Xt.stat(e).then(d=>!h&&f(d.mtimeMs),()=>{}),()=>{h=!0}},[e,r]),P.useEffect(()=>l(!1),[e,p]);const a=`${Tm(e)}?v=${p}`;return s?v.jsx(nn,{icon:lm,title:"The browser cannot show this file.",hint:"Its format is not one this browser plays or displays."}):v.jsxs("div",{className:"flex h-full items-center justify-center overflow-auto rounded border bg-muted/20 p-3",children:[i==="image"&&v.jsx("img",{src:a,alt:e,onError:()=>l(!0),className:"max-h-full max-w-full object-contain"}),i==="audio"&&v.jsx("audio",{controls:!0,src:a,onError:()=>l(!0),className:"w-full max-w-xl"},a),i==="video"&&v.jsx("video",{controls:!0,src:a,onError:()=>l(!0),className:"max-h-full max-w-full"},a)]})}function Db(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}const Q7=1500,Z7=1e3,Mb="clauder-hub:file-blame";function J7(e){const i=Math.floor((Date.now()/1e3-e)/86400);if(i<1){const r=Math.floor((Date.now()/1e3-e)/3600);return r<1?"just now":`${r} hour${r>1?"s":""} ago`}return i<30?`${i} day${i>1?"s":""} ago`:new Date(e*1e3).toLocaleDateString()}const e8=e=>Xt.commit(e).then(i=>i.message);function t8({path:e}){const i=en(F=>F.drafts[e]),{put:r,drop:s}=en.getState(),l=we(F=>F.ticks.files),[p,f]=P.useState(null),[a,h]=P.useState(null),[d,m]=P.useState(!1),[c,_]=P.useState(!1),[y,E]=P.useState(null),S=P.useRef(!1),g=P.useRef(null),b=P.useRef(0),w=P.useRef(0),x=is(i),T=zy(e),D=iL(e),[R,L]=P.useState("preview"),[A,j]=P.useState(null),[M,I]=P.useState(()=>{try{return localStorage.getItem(Mb)==="1"}catch{return!1}}),B=()=>{const F=!M;I(F);try{localStorage.setItem(Mb,F?"1":"0")}catch{}},H=i==null?void 0:i.mtimeMs;P.useEffect(()=>{if(H===void 0)return;let F=!1;return Xt.blame(e).then(V=>!F&&j(V),()=>!F&&j(null)),()=>{F=!0}},[e,H]);const U=P.useMemo(()=>A!=null&&A.available&&!x?{you:A.you,commits:A.commits,lines:A.lines,details:e8}:void 0,[A,x]),W=(()=>{if(!(A!=null&&A.available))return null;const F=Object.values(A.commits).filter(X=>!X.uncommitted),V=F.sort((X,$)=>$.time-X.time)[0],ne=new Set(F.map(X=>X.author)).size,le=Object.values(A.commits).some(X=>X.uncommitted);return{latest:V,authors:ne,uncommitted:le,you:A.you}})(),Y=P.useCallback((F=!1)=>{if(!F&&is(en.getState().drafts[e])||zy(e))return;const V=Tu();Xt.read(e).then(ne=>{if(Tu()===V){if(h(null),_(!1),E(null),ne.kind!=="text"){f({kind:ne.kind,size:ne.size}),s(e);return}f(null),r(e,{text:ne.content,base:ne.content,mtimeMs:ne.mtimeMs})}},ne=>h(ne.message))},[e,r,s]);P.useEffect(()=>Y(),[Y,l]);const Q=P.useCallback(async(F=!1,V=!1)=>{var X;const ne=en.getState().drafts[e];if(!ne||S.current)return;const le=Tu();m(!0),S.current=!0;try{const $=await Xt.write(e,ne.text,F?void 0:ne.mtimeMs);if(g.current=null,Tu()!==le)return;const oe=((X=en.getState().drafts[e])==null?void 0:X.text)??ne.text;r(e,{text:oe,base:ne.text,mtimeMs:$.mtimeMs}),_(!1),E(null),V||we.getState().notify("Saved.")}catch($){$ instanceof _C&&$.status===409?_(!0):(g.current=ne.text,we.getState().notify($.message,"error"))}finally{m(!1),S.current=!1}},[e,r]);P.useEffect(()=>{let F=!1;const V=async()=>{const le=en.getState().drafts[e];if(F||!le||S.current||document.hidden)return;const X=await Xt.stat(e).catch(()=>null);if(!X||F||S.current)return;const $=en.getState().drafts[e];if($){if(!X.exists){if(w.current===-1)return;E(oe=>(oe==null?void 0:oe.state)==="deleted"?oe:{state:"deleted",comparing:!1});return}if(X.mtimeMs!==$.mtimeMs){if(!is($))return Y(!0);b.current=X.mtimeMs,X.mtimeMs!==w.current&&E(oe=>(oe==null?void 0:oe.state)==="changed"?oe:{state:"changed",comparing:!1})}}},ne=setInterval(()=>void V(),Q7);return()=>{F=!0,clearInterval(ne)}},[e,Y]);const K=iy(F=>F.on);P.useEffect(()=>{if(!K||!x||c||y||(i==null?void 0:i.text)===g.current)return;const F=window.setTimeout(()=>void Q(!1,!0),Z7);return()=>window.clearTimeout(F)},[K,x,c,y,i==null?void 0:i.text,Q]);const z=async()=>{const F=await Xt.read(e).catch(()=>null);(F==null?void 0:F.kind)==="text"&&E({state:"changed",content:F.content,comparing:!0})};P.useEffect(()=>{const F=V=>{(V.ctrlKey||V.metaKey)&&V.key.toLowerCase()==="s"&&(V.preventDefault(),is(en.getState().drafts[e])&&Q())};return window.addEventListener("keydown",F,!0),()=>window.removeEventListener("keydown",F,!0)},[e,Q]),P.useEffect(()=>Bn.getState().show(e),[e]);const O=F=>{const V=en.getState().drafts[e];V&&r(e,{...V,text:F}),Bn.getState().pin(e)},G=e.split("/").pop()??e,Z=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"project root";return v.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[v.jsxs("div",{className:"space-y-3 px-5 pb-3 pt-4",children:[v.jsx(Cr,{group:"Files",title:G,description:Z,action:(T||i)&&v.jsxs(v.Fragment,{children:[D&&i&&v.jsxs(ve,{onClick:()=>L(R==="preview"?"code":"preview"),title:R==="preview"?"Edit the HTML":"Show the page",children:[R==="preview"?v.jsx(S3,{size:13}):v.jsx(Zm,{size:13})," ",R==="preview"?"Code":"Preview"]}),(T||D)&&v.jsx("a",{href:Tm(e),target:"_blank",rel:"noreferrer",title:"Open in a new browser tab",className:"inline-flex items-center rounded p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",children:v.jsx(fa,{size:13})}),i&&v.jsxs(v.Fragment,{children:[x&&!K&&v.jsx("span",{className:"self-center text-[11px] text-severity-warning",children:"Unsaved, kept while this page is open"}),v.jsx(Ih,{label:"Auto save",title:"For every file: saves 1 second after you stop typing",checked:K,onCheckedChange:F=>{iy.getState().set(F),we.getState().notify(F?"Auto save on: every file saves itself 1 second after you stop typing.":"Auto save off: save with the Save button or Ctrl+S.")},className:"mr-1"}),x&&v.jsx(ve,{onClick:()=>r(e,{...i,text:i.base}),children:"Discard"}),v.jsxs(ve,{variant:"primary",disabled:!x||d,onClick:()=>void Q(),title:"Save (Ctrl+S)",children:[v.jsx(U3,{size:13})," ",d?"Saving...":"Save"]})]})]})}),A&&v.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:[v.jsx(T3,{size:13,className:"shrink-0"}),A.available?v.jsxs(v.Fragment,{children:[(W==null?void 0:W.latest)&&v.jsxs("span",{className:"min-w-0 truncate",title:W.latest.summary,children:["Last change: ",v.jsx("span",{className:"text-foreground",children:W.latest.author===W.you?"You":W.latest.author}),", ",J7(W.latest.time)," · ",W.latest.summary]}),v.jsxs("span",{children:[(W==null?void 0:W.authors)??0," author",(W==null?void 0:W.authors)===1?"":"s"]}),(W==null?void 0:W.uncommitted)&&v.jsx("span",{className:"text-severity-warning",children:"uncommitted changes"}),x&&v.jsx("span",{children:"blame hidden while editing"}),v.jsxs("button",{className:ye("ml-auto rounded px-1.5 py-0.5 transition-colors",M?"bg-primary/15 text-primary":"hover:bg-muted hover:text-foreground"),onClick:B,title:"Show who last changed every line",children:["File blame ",M?"on":"off"]})]}):v.jsx("span",{children:A.reason})]}),y&&!c&&v.jsxs("div",{className:"space-y-2 rounded-md border border-severity-warning/50 bg-severity-warning/10 px-3 py-2 text-xs",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("span",{className:"flex-1",children:y.state==="deleted"?"This file was deleted on disk. Your unsaved edits are still here.":"This file changed on disk while you were editing it. Your edits are kept; saving will ask before overwriting."}),y.state==="changed"&&v.jsx(ve,{onClick:()=>y.comparing?E({...y,comparing:!1}):void z(),children:y.comparing?"Hide changes":"Compare"}),y.state==="changed"&&v.jsx(ve,{onClick:()=>Y(!0),children:"Reload from disk"}),v.jsx(ve,{variant:"ghost",onClick:()=>{w.current=y.state==="deleted"?-1:b.current,E(null)},children:"Keep editing"})]}),y.comparing&&y.content!==void 0&&i&&v.jsx(hh,{before:y.content,after:i.text})]}),c&&v.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-severity-warning/50 bg-severity-warning/10 px-3 py-2 text-xs",children:[v.jsx("span",{className:"flex-1",children:"This file changed on disk since it was opened. Overwrite it with your version, or reload it and lose your edits."}),v.jsx(ve,{variant:"primary",onClick:()=>void Q(!0),children:"Overwrite"}),v.jsx(ve,{onClick:()=>Y(!0),children:"Reload from disk"})]})]}),v.jsx("div",{className:"min-h-0 flex-1 px-5 pb-5",children:T?v.jsx(K7,{path:e,kind:T,tick:l}):a?v.jsx(nn,{icon:lm,title:a}):p?v.jsx(nn,{icon:lm,title:p.kind==="binary"?"A binary file":"Too large to open here",hint:p.kind==="binary"?`${Db(p.size)}; it is not shown as text.`:`${Db(p.size)}; files over 2 MB are not opened in the editor.`}):i?D&&R==="preview"?v.jsx("iframe",{title:G,src:`${Tm(e)}?v=${i.mtimeMs}`,sandbox:"allow-scripts allow-forms allow-popups allow-modals",className:"h-full w-full rounded border bg-white"},i.mtimeMs):nL(e)?v.jsx(Zl,{fill:!0,value:i.text,onChange:O,blame:U,fileBlame:M}):v.jsx("div",{className:"h-full overflow-hidden rounded border",children:v.jsx(xC,{path:e,value:i.text,onChange:O,blame:U,fileBlame:M})}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."})})]})}function n8({value:e,onChange:i,categories:r,allowNone:s=!0}){return v.jsxs(ta,{value:e,onValueChange:i,children:[s&&v.jsx(Cn,{value:"",children:"None (stays open until you stop it)"}),v.jsx(Cn,{value:"auto",children:"Auto (Claude picks one)"}),r.map(l=>v.jsx(Cn,{value:l.name,children:l.name},l.id))]})}const i8={"claude-system":"Appended to Claude's system prompt","claude-typed":"Typed into the session",channel:"Sent to channels"};function r8(){const e=mt(()=>_e.prompts(),[]),[i,r]=P.useState("preview"),[s,l]=P.useState(!1),p=f=>{r(f),l(!0)};return v.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[v.jsx("div",{className:"border-b px-5 py-4",children:v.jsx(Cr,{group:"Settings",title:"Hub prompts",description:"Text the hub adds to sessions and sends to channels."})}),v.jsxs("div",{className:"flex min-h-0 flex-1",children:[v.jsxs("div",{className:ye("w-full shrink-0 overflow-y-auto p-3 md:block md:w-56 md:border-r lg:w-72",s&&"hidden"),children:[v.jsx(jb,{active:i==="preview",onClick:()=>p("preview"),children:"Preview what a session gets"}),["claude-system","claude-typed","channel"].map(f=>v.jsxs("div",{className:"mt-3",children:[v.jsx("div",{className:"px-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:i8[f]}),(e.data??[]).filter(a=>a.audience===f).map(a=>v.jsxs(jb,{active:i===a.key,onClick:()=>p(a.key),children:[v.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.label}),a.overridden&&v.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-primary",title:"Edited"})]},a.key))]},f))]}),v.jsxs("div",{className:ye("min-w-0 flex-1 overflow-y-auto p-4 md:block md:p-5",!s&&"hidden"),children:[v.jsx(Dg,{onClick:()=>l(!1)}),i==="preview"?v.jsx(o8,{}):e.data&&v.jsx(s8,{prompt:e.data.find(f=>f.key===i),onSaved:e.reload},i)]})]})]})}function jb({active:e,onClick:i,children:r}){return v.jsxs("button",{onClick:i,className:ye("flex w-full items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs",e?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[v.jsx(gS,{size:12,className:"shrink-0"}),r]})}function s8({prompt:e,onSaved:i}){const r=mn(),[s,l]=P.useState(e.text),p=s!==e.text,f=()=>r({title:`Save "${e.label}"?`,description:"New sessions get the new text.",body:v.jsx(hh,{before:e.text,after:s}),confirmLabel:"Save",maxWidth:"max-w-3xl",run:async()=>{await _e.savePrompt(e.key,s),we.getState().notify("Saved."),i()}}),a=()=>r({title:"Restore the default text?",description:"Your version is discarded.",body:v.jsx(hh,{before:e.text,after:e.defaultText}),confirmLabel:"Restore default",tone:"destructive",maxWidth:"max-w-3xl",run:async()=>{await _e.savePrompt(e.key,null),l(e.defaultText),i()}});return v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[e.label,e.overridden&&v.jsx(nt,{tone:"on",children:"edited"})]}),v.jsx("p",{className:"text-[11px] text-muted-foreground",children:e.description})]}),v.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.overridden&&v.jsxs(ve,{variant:"ghost",onClick:()=>void a(),children:[v.jsx(F3,{size:12})," Restore default"]}),p&&v.jsx(ve,{onClick:()=>l(e.text),children:"Discard"}),v.jsx(ve,{variant:"primary",disabled:!p,onClick:()=>void f(),children:"Review & save"})]})]}),e.placeholders.length>0&&v.jsxs("div",{className:"text-[11px] text-muted-foreground",children:["Placeholders:"," ",e.placeholders.map(h=>v.jsx("code",{className:"mr-1 rounded bg-muted px-1 font-mono",children:`{{${h}}}`},h))]}),v.jsx(Zl,{rows:22,value:s,onChange:l})]})}function o8(){const[e,i]=P.useState(""),[r,s]=P.useState([]),l=mt(()=>_e.previewSystemPrompt(e),[],e);return P.useEffect(()=>{_e.categories().then(s)},[]),v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{children:[v.jsx("h2",{className:"text-sm font-semibold",children:"What the hub appends to a session"}),v.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Passed with --append-system-prompt-file, after Claude Code's own system prompt and your CLAUDE.md files, which still load as usual. Pick a category to see the done protocol a triggered run gets."})]}),v.jsx("div",{className:"w-full max-w-[18rem]",children:v.jsx(n8,{value:e,onChange:i,categories:r})}),l.data?v.jsx(Zl,{rows:24,value:l.data.text}):v.jsx(nn,{variant:"inline",title:"Loading..."})]})}function D2(e){const[i,r]=P.useState(()=>window.matchMedia(e).matches);return P.useEffect(()=>{const s=window.matchMedia(e),l=()=>r(s.matches);return l(),s.addEventListener("change",l),()=>s.removeEventListener("change",l)},[e]),i}function M2(e,i,{min:r=200,max:s=720}={}){const l=P.useCallback(d=>Math.min(s,Math.max(r,Math.round(d))),[r,s]),[p,f]=P.useState(()=>{try{const d=Number(localStorage.getItem(e));return d?l(d):i}catch{return i}});P.useEffect(()=>{try{localStorage.setItem(e,String(p))}catch{}},[e,p]);const a=P.useCallback(d=>f(m=>l(m+d)),[l]),h=P.useCallback(()=>f(i),[i]);return{width:p,resizeBy:a,reset:h}}function $m({placeholder:e,disabled:i,onSend:r,value:s,onChange:l,autoFocus:p,className:f}){return v.jsx(Pg,{rows:1,autoFocus:p,value:s,disabled:i,placeholder:`${e.replace(/\.\.\.$/,"")} (Enter to send)`,onChange:a=>l(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),s.trim()&&r(s))},className:ye("min-h-[32px] flex-1 font-sans",f)})}const qm=e=>`clauder-hub:answer:${e}`;function a8(e,i){const[r,s]=P.useState(()=>{try{const p=localStorage.getItem(qm(e));return p?{...i,...JSON.parse(p)}:i}catch{return i}});return[r,p=>{s(p);try{localStorage.setItem(qm(e),JSON.stringify(p))}catch{}}]}function l8(e){try{localStorage.removeItem(qm(e))}catch{}}function c8(e){const i=e.findIndex(r=>/recommended/i.test(r.label));return i===-1?0:i}function u8({interactionId:e,questions:i,busy:r,onChoose:s,onReply:l}){const p=i.length>1,[f,a]=a8(e,{picks:{},otherOpen:{},others:{},free:""}),{picks:h,otherOpen:d,others:m,free:c}=f,_=S=>a({...f,...S}),y=S=>{const g=h[S];return!!(g&&("option"in g||g.other.trim()))},E=()=>i.map((S,g)=>{const b=h[g];return"option"in b?String(b.option+1):b.other.trim()}).join(`
|
|
527
|
-
`);return v.jsxs("div",{className:"space-y-3",children:[i.map((S,g)=>{const b=c8(S.options),w=h[g];return v.jsxs("div",{className:"space-y-1.5",children:[v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("span",{className:"mt-px grid h-5 w-5 shrink-0 place-items-center rounded-full bg-primary/15 text-[11px] font-semibold tabular-nums text-primary",children:g+1}),v.jsxs("div",{className:"min-w-0",children:[S.header&&v.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:S.header}),v.jsx("div",{className:"break-words text-sm font-semibold leading-snug",children:S.question})]})]}),v.jsxs("div",{className:"space-y-1 pl-7",children:[S.options.map((x,T)=>{const D=!!(w&&"option"in w&&w.option===T);return v.jsxs("button",{disabled:r,onClick:()=>p?_({picks:{...h,[g]:{option:T}}}):s(T),className:ye("flex w-full items-start gap-2.5 rounded-md border px-3 py-1.5 text-left transition-colors hover:bg-muted disabled:opacity-50",T===b&&"border-primary",D&&"bg-primary/15"),children:[v.jsx("span",{className:"mt-px shrink-0 text-xs tabular-nums text-muted-foreground",children:T+1}),v.jsxs("span",{className:"min-w-0",children:[v.jsx("span",{className:"block text-xs font-medium",children:x.label}),x.description&&v.jsx("span",{className:"block text-[11px] text-muted-foreground",children:x.description})]})]},T)}),d[g]?v.jsx("div",{className:ye("rounded-md border px-2 py-1",w&&"other"in w&&"bg-primary/15"),children:v.jsx($m,{autoFocus:!0,placeholder:"Your own answer",disabled:r,value:m[g]??"",onChange:x=>_({others:{...m,[g]:x},...p?{picks:{...h,[g]:{other:x}}}:{}}),onSend:x=>p?_({picks:{...h,[g]:{other:x}}}):l(x),className:"border-0 bg-transparent px-1 focus:ring-0"})}):v.jsxs("button",{disabled:r,onClick:()=>_({otherOpen:{...d,[g]:!0}}),className:"flex w-full items-center gap-2.5 rounded-md border border-dashed px-3 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-50",children:[v.jsx(_r,{size:12,className:"shrink-0"})," Other, in your own words..."]})]})]},g)}),p&&v.jsxs("div",{className:"flex items-end gap-1.5",children:[v.jsx($m,{placeholder:"Or answer all of it in your own words",disabled:r,value:c,onChange:S=>_({free:S}),onSend:S=>l(S)}),v.jsx(ve,{variant:"primary",disabled:r||!i.every((S,g)=>y(g)),onClick:()=>l(E()),children:"Send answers"})]})]})}function h8(e,i){P.useEffect(()=>{i||l8(e)},[e,i])}const d8={permission:{label:"Permission",icon:q3},question:{label:"Question",icon:dS},turn:{label:"Waiting",icon:P3},mcp:{label:"MCP suggested",icon:Hl},done:{label:"Done",icon:hS}};function f8(e){var p,f;const i=e.answer;if(!i)return null;const r=e.presented,s={permission:{1:0,2:1,3:2},mcp:{install:0,skip:1}},l=e.kind==="question"?Number(i)-1:(p=s[e.kind])==null?void 0:p[i];return l!==void 0&&Number.isInteger(l)&&((f=r==null?void 0:r.choices[l])==null?void 0:f.label)||i}function Bl({interaction:e,showSession:i=!1,compact:r=!1,project:s}){var D,R;const l=we(L=>L.sessions),p=we(L=>L.go),f=L=>s?window.location.hash=`#/${encodeURIComponent(s.id)}/session/${L.id}`:p(L),[a,h]=P.useState(""),[d,m]=P.useState(!1),[c,_]=P.useState(!1),y=d8[e.kind],E=e.status==="open",S=l.find(L=>L.id===e.sessionId);h8(e.id,E);const g=e.presented??{kind:e.kind,sessionTitle:(S==null?void 0:S.title)??"",headline:e.title,choices:[],quickReplies:[],freeText:"Reply to the session...",details:e.body?{label:"Details",text:e.body,format:"markdown"}:void 0},b=async L=>{m(!0);const A=await at(L,"Sent to the session.");m(!1),A&&h("")},w=L=>b(()=>s?_e.chooseIn(s.id,e.id,L.ref):_e.choose(e.id,L.ref)),x=L=>L.trim()&&b(()=>s?_e.answerIn(s.id,e.id,L):_e.answer(e.id,L)),T=async()=>{m(!0),await at(()=>s?_e.dismissIn(s.id,e.id):_e.dismiss(e.id),"Dismissed."),m(!1)};return v.jsxs("div",{className:ye("card p-3",E&&"border-primary/60"),children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(nt,{tone:E?"warning":e.kind==="done"?"success":"off",icon:y.icon,children:y.label}),s&&v.jsx(nt,{tone:"off",children:s.name}),i&&v.jsx("button",{className:"min-w-0 truncate text-xs font-medium hover:underline",onClick:()=>f({kind:"session",id:e.sessionId}),children:(S==null?void 0:S.title)??(((D=e.presented)==null?void 0:D.sessionTitle)||e.sessionId.slice(0,8))}),v.jsx("span",{className:"ml-auto shrink-0 text-[11px] text-muted-foreground",children:$l(e.createdAt)}),i&&v.jsxs(ve,{variant:"muted",className:"shrink-0",title:S!=null&&S.live?"Open the session's terminal":"Open the session (not running; resume it there)","aria-label":"Open the session's terminal",onClick:()=>f({kind:"session",id:e.sessionId}),children:[v.jsx(_S,{size:12})," ",v.jsx("span",{className:"hidden sm:inline",children:"Terminal"})]}),E&&v.jsx(ve,{variant:"ghost",size:"icon",className:"shrink-0",disabled:d,title:"Dismiss (nothing is sent to the session)","aria-label":"Dismiss",onClick:()=>void T(),children:v.jsx(Nn,{size:13})})]}),v.jsx("div",{className:ye("mt-2 break-words text-sm font-medium",e.kind==="permission"&&"font-mono text-[13px]",r&&"line-clamp-2"),children:g.headline}),g.question&&!r&&v.jsx("div",{className:"mt-0.5 break-words text-xs text-muted-foreground",children:g.question}),E&&!r&&v.jsx("div",{className:"mt-3 space-y-2.5",children:e.kind==="question"&&((R=g.questions)!=null&&R.length)?v.jsx(u8,{interactionId:e.id,questions:g.questions,busy:d,onChoose:L=>void w({ref:`o:${L}`}),onReply:L=>void x(L)}):v.jsxs(v.Fragment,{children:[g.choices.some(L=>L.description)?v.jsx("div",{className:"space-y-1",children:g.choices.map((L,A)=>v.jsxs("button",{disabled:d,onClick:()=>void w(L),className:ye("flex w-full items-start gap-2.5 rounded-md border px-3 py-2 text-left transition-colors hover:bg-muted disabled:opacity-50",L.tone==="primary"&&"border-primary"),children:[v.jsx("span",{className:"mt-px shrink-0 text-xs tabular-nums text-muted-foreground",children:A+1}),v.jsxs("span",{className:"min-w-0",children:[v.jsx("span",{className:"block text-xs font-medium",children:L.label}),L.description&&v.jsx("span",{className:"block text-[11px] text-muted-foreground",children:L.description})]})]},L.ref))}):g.choices.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1.5",children:g.choices.map(L=>v.jsx(ve,{variant:L.tone==="primary"?"primary":L.tone==="danger"?"destructive":"muted",disabled:d,onClick:()=>void w(L),children:L.label},L.ref))}),g.quickReplies.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1.5",children:g.quickReplies.map(L=>v.jsx("button",{disabled:d,onClick:()=>void w(L),className:"rounded-full border px-2.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-50",children:L.label},L.ref))}),g.freeText&&v.jsx($m,{placeholder:g.freeText,disabled:d,value:a,onChange:h,onSend:L=>void x(L)})]})}),g.details&&!r&&v.jsxs("div",{className:"mt-2",children:[v.jsxs("button",{className:"flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground",onClick:()=>_(!c),children:[v.jsx(da,{size:12,className:ye("transition-transform",c&&"rotate-90")}),g.details.label]}),c&&(g.details.format==="code"?v.jsx("pre",{className:"mt-1.5 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded bg-muted p-2 font-mono text-[11px]",children:g.details.text}):v.jsx(av,{className:"mt-1.5 max-h-72 overflow-auto rounded bg-muted/40 p-2 text-xs",children:g.details.text}))]}),!E&&e.status==="answered"&&v.jsxs("div",{className:"mt-2 break-words text-[11px] text-muted-foreground",children:[e.answeredBy,": ",v.jsx("span",{className:"text-foreground",children:f8(e)})]}),!E&&e.status==="closed"&&e.answeredBy&&e.kind!=="done"&&v.jsxs("div",{className:"mt-2 text-[11px] text-muted-foreground",children:["Closed (",e.answeredBy,")."]})]})}function p8({size:e=18,className:i}){return v.jsxs("svg",{viewBox:"0 18 48 30",width:e,height:e*30/48,className:i,role:"img","aria-label":"Clauder Hub",children:[v.jsx("rect",{width:"36",height:"24",x:"6",y:"18",fill:"#d77757"}),v.jsx("rect",{width:"3",height:"9",x:"9",y:"39",fill:"#d77757"}),v.jsx("rect",{width:"3",height:"9",x:"15",y:"39",fill:"#d77757"}),v.jsx("rect",{width:"3",height:"9",x:"30",y:"39",fill:"#d77757"}),v.jsx("rect",{width:"3",height:"9",x:"36",y:"39",fill:"#d77757"}),v.jsx("rect",{width:"7.5",height:"6",y:"33",fill:"#d77757"}),v.jsx("rect",{width:"7.5",height:"6",x:"40.5",y:"33",fill:"#d77757"}),v.jsx("rect",{width:"9",height:"9",x:"12",y:"24"}),v.jsx("rect",{width:"9",height:"9",x:"27",y:"24"}),v.jsx("rect",{width:"3",height:"6",x:"22.5",y:"22.5",transform:"rotate(90 24 25.5)"}),v.jsx("rect",{width:"3",height:"7",x:"37",y:"22",transform:"rotate(90 38.5 25.5)"}),v.jsx("rect",{width:"3",height:"7",x:"8",y:"22",transform:"rotate(90 9.5 25.5)"})]})}function j2({open:e,onOpenChange:i}){const r=we(y=>y.openProject),[s,l]=P.useState(null),[p,f]=P.useState(""),[a,h]=P.useState(null),[d,m]=P.useState(!1),c=async y=>{try{const E=await _e.folders(y);l(E),f(E.path),h(null)}catch(E){h(E.message)}};P.useEffect(()=>{e&&c(s==null?void 0:s.path)},[e]);const _=async y=>{m(!0);try{const E=await _e.addProject(y);i(!1),r(E.id)}catch(E){h(E.message)}finally{m(!1)}};return v.jsx(Dw,{open:e,onOpenChange:i,title:"Open folder",description:"Its sessions, jobs and channels run in the hub from now on.",maxWidth:"max-w-xl",height:"h-[min(36rem,calc(100dvh-2rem))]",footer:v.jsxs(v.Fragment,{children:[v.jsx(ve,{onClick:()=>i(!1),children:"Cancel"}),v.jsx(ve,{variant:"primary",disabled:!p.trim()||d,onClick:()=>void _(p.trim()),children:d?"Opening...":"Open this folder"})]}),children:v.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[v.jsxs("form",{className:"flex gap-1.5",onSubmit:y=>{y.preventDefault(),c(p.trim())},children:[v.jsx(pi,{value:p,onChange:y=>f(y.target.value),placeholder:"C:\\Source code\\your-repo",className:"font-mono"}),v.jsx(ve,{type:"submit",title:"Go to this folder",children:v.jsx(da,{size:13})})]}),v.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[v.jsxs(ve,{variant:"ghost",disabled:!(s!=null&&s.parent),onClick:()=>(s==null?void 0:s.parent)&&void c(s.parent),title:"Up one folder",children:[v.jsx(_3,{size:12})," Up"]}),v.jsxs(ve,{variant:"ghost",onClick:()=>void c(s==null?void 0:s.home),children:[v.jsx(A3,{size:12})," Home"]}),((s==null?void 0:s.drives.length)??0)>1&&s.drives.map(y=>v.jsxs(ve,{variant:"ghost",onClick:()=>void c(y),children:[v.jsx(R3,{size:12})," ",y]},y))]}),a&&v.jsx("div",{className:"text-xs text-severity-critical",children:a}),v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto rounded-md border",children:s!=null&&s.folders.length?s.folders.map(y=>v.jsxs("button",{onClick:()=>void c(y.path),onDoubleClick:()=>void _(y.path),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs hover:bg-muted",title:y.git?"A git repository. Double-click to open it.":y.path,children:[y.git?v.jsx(pS,{size:13,className:"shrink-0 text-primary"}):v.jsx(aa,{size:13,className:"shrink-0 text-muted-foreground"}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:y.name}),y.git&&v.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:"git"})]},y.path)):v.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:s?"No folders in here.":"Loading..."})})]})})}function ua({className:e}){const i=we(r=>r.openProject);return v.jsx("button",{onClick:()=>i(ls),title:"Global: every project","aria-label":"Go to Global",className:ye("shrink-0 rounded hover:opacity-80",e),children:v.jsx(p8,{size:20})})}let Ob=null;function zh(){const e=we(s=>s.openProject),[i,r]=P.useState(null);return P.useEffect(()=>{Ob??(Ob=_e.hub().then(s=>s.version??null).catch(()=>null)),Ob.then(r)},[]),v.jsxs("span",{className:"flex items-baseline gap-1.5",children:[v.jsx("button",{onClick:()=>e(ls),title:"Global: every project",className:"text-left text-sm font-semibold leading-tight hover:underline",children:"Clauder Hub"}),i&&v.jsxs("span",{className:"text-[10px] font-normal leading-tight text-muted-foreground/70",children:["v",i]}),v.jsx(m8,{})]})}function m8(){var r;const e=we(s=>s.projectId),i=mt(()=>_e.channels(),["channels"],e);return!((r=i.data)!=null&&r.paused)||!i.data.channels.length?null:v.jsx("button",{onClick:o6,title:"Notifications are paused on every channel. Click to turn them back on.","aria-label":"Notifications paused",className:"self-center text-severity-warning hover:text-foreground",children:v.jsx(oa,{size:12})})}function hv(){const e=we(l=>l.projectId),i=we(l=>l.openProject),s=(mt(()=>_e.projects(),["projects"]).data??[]).filter(l=>l.id!==e).reduce((l,p)=>l+p.waiting,0);return v.jsxs("button",{onClick:()=>i(ls),className:"flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted hover:text-foreground",title:"Back to the global home: every project",children:["Change",s>0&&v.jsx("span",{className:"grid h-3.5 min-w-[0.875rem] place-items-center rounded-full bg-severity-warning px-1 text-[9px] font-semibold leading-none tabular-nums text-background",children:s})]})}function O2({onDrag:e,onReset:i}){const r=P.useRef(0);return v.jsx("div",{role:"separator","aria-orientation":"vertical",title:"Drag to resize, double-click to reset",className:"group relative w-1 shrink-0 cursor-col-resize bg-border/60 transition-colors hover:bg-primary/60",onDoubleClick:i,onPointerDown:s=>{s.preventDefault(),s.currentTarget.setPointerCapture(s.pointerId),r.current=s.clientX,document.body.style.userSelect="none"},onPointerMove:s=>{if(!s.currentTarget.hasPointerCapture(s.pointerId))return;const l=s.clientX-r.current;l&&(r.current=s.clientX,e(l))},onPointerUp:s=>{s.currentTarget.releasePointerCapture(s.pointerId),document.body.style.userSelect=""},onPointerCancel:()=>{document.body.style.userSelect=""},children:v.jsx("span",{className:"absolute inset-y-0 -left-1 -right-1"})})}function N2({tools:e}){const i=R4(e),r={};for(const l of i.mcp){const{server:p,tool:f}=T4(l.name),a=r[p]??(r[p]={count:0,errors:0,tools:[]});a.count+=l.count,a.errors+=l.errors,a.tools.push(`${f} ×${l.count}`)}const s=l=>l.map(p=>({key:p.name,label:p.name,value:p.count,note:p.errors?`${p.errors} failed`:void 0}));return v.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[v.jsx(Dt,{title:`Built-in tools (${i["built-in"].reduce((l,p)=>l+p.count,0)})`,children:v.jsx(os,{rows:s(i["built-in"]),format:String})}),v.jsx(Dt,{title:`MCP servers (${i.mcp.reduce((l,p)=>l+p.count,0)})`,description:"Calls grouped by server; hover a bar for its tools.",children:v.jsx(os,{rows:Object.entries(r).map(([l,p])=>({key:l,label:l,value:p.count,note:p.errors?`${p.errors} failed`:void 0,sublabel:p.tools.slice(0,3).join(", ")})),format:String,empty:"No MCP calls."})})]})}function g8({agent:e}){const[i,r]=P.useState(!1),s=Object.values(e.tools).reduce((l,p)=>l+p.count,0);return v.jsxs("div",{className:"rounded-md border",children:[v.jsxs("button",{className:"flex w-full items-center gap-2 px-2.5 py-2 text-left",onClick:()=>r(!i),style:{paddingLeft:10+(e.depth-1)*16},children:[i?v.jsx(zl,{size:13}):v.jsx(da,{size:13}),v.jsx(lS,{size:13,className:"shrink-0 text-muted-foreground"}),v.jsx("span",{className:"min-w-0 truncate font-mono text-[11px]",children:e.agentType}),v.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground",children:e.description}),v.jsxs("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:[s," calls · ",jn(ss(e.tokens))," tok"]})]}),i&&v.jsxs("div",{className:"grid gap-3 border-t p-3 md:grid-cols-2",children:[v.jsxs("div",{className:"space-y-1 text-[11px] text-muted-foreground",children:[v.jsxs("div",{children:["Model: ",e.model??"inherited",e.fork&&" · fork"]}),v.jsxs("div",{children:[qs(e.startedAt)," → ",qs(e.lastAt)]}),v.jsxs("div",{children:["Output ",jn(e.tokens.output)," · cache read ",jn(e.tokens.cacheRead)]})]}),v.jsx(os,{rows:Object.entries(e.tools).map(([l,p])=>({key:l,label:l,value:p.count})),format:String,limit:6,empty:"No tool calls."}),e.recent.length>0&&v.jsx("div",{className:"md:col-span-2",children:v.jsx(B2,{calls:e.recent.slice(-10)})})]})]})}function B2({calls:e}){return v.jsx("div",{className:"divide-y rounded-md border",children:[...e].reverse().map(i=>v.jsxs("div",{className:"flex items-baseline gap-2 px-2.5 py-1.5 text-[11px]",children:[v.jsx("span",{className:"hidden w-20 shrink-0 whitespace-nowrap tabular-nums text-muted-foreground sm:block",children:i.ts?new Date(i.ts).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}),v.jsx("span",{className:ye("max-w-[60%] shrink-0 truncate font-mono sm:max-w-none",i.error&&"text-severity-critical"),children:i.name.startsWith("mcp__")?i.name.replace(/^mcp__/,"mcp:"):i.name}),v.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:i.summary})]},i.id))})}function v8({data:e}){const i=e.detail;if(!i)return v.jsx("div",{className:"p-6 text-xs text-muted-foreground",children:"Claude has not written anything for this session yet."});const r=i.totals,s=Object.values(r.tools).reduce((l,p)=>l+p.count,0);return v.jsxs("div",{className:"space-y-3",children:[v.jsx(eC,{tokens:r.tokens}),v.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[v.jsx(Dt,{title:"Tokens by model",children:v.jsx(os,{rows:Object.entries(r.tokensByModel).filter(([,l])=>ss(l)>0).map(([l,p])=>({key:l,label:l,value:ss(p)}))})}),v.jsx(Dt,{title:"Skills & commands",children:v.jsx(os,{rows:Object.entries(i.skills).map(([l,p])=>({key:l,label:l,value:p})),format:String,empty:"No skills used."})}),v.jsx(Dt,{title:"Shape",children:v.jsxs("div",{className:"space-y-1 text-xs",children:[v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-muted-foreground",children:"Prompts"}),v.jsx("span",{className:"tabular-nums",children:e.session.turns??0})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-muted-foreground",children:"Tool calls (all agents)"}),v.jsx("span",{className:"tabular-nums",children:s})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-muted-foreground",children:"Subagents"}),v.jsx("span",{className:"tabular-nums",children:i.subagents.length})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-muted-foreground",children:"Branch"}),v.jsx("span",{className:"font-mono text-[11px]",children:e.session.gitBranch??"-"})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-muted-foreground",children:"Permission mode"}),v.jsx("span",{children:e.session.permissionMode??"-"})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-muted-foreground",children:"Claude Code"}),v.jsx("span",{children:e.session.version??"-"})]})]})})]}),v.jsx(N2,{tools:r.tools}),v.jsx(Dt,{title:`Subagents (${i.subagents.length})`,description:"Each one's own tokens and calls; a fork's inherited context is counted once, on its parent.",children:i.subagents.length?v.jsx("div",{className:"space-y-1.5",children:i.subagents.map(l=>v.jsx(g8,{agent:l},l.id))}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"No subagents."})}),v.jsx(Dt,{title:"Recent calls (main thread)",children:i.recent.length?v.jsx(B2,{calls:i.recent.slice(-40)}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"No tool calls yet."})})]})}function _8({temp:e,choice:i}){const[r,s]=P.useState(i.current);return v.jsxs("div",{className:"space-y-0.5 rounded-md border px-2.5 py-2",children:[v.jsx(Ih,{label:`Also clear its Claude temp folder (${sg(e.bytes)})`,checked:r,onCheckedChange:l=>{i.current=l,s(l)}}),v.jsx("div",{className:"truncate pl-6 font-mono text-[10px] text-muted-foreground",title:e.path,children:e.path})]})}function dv(e){const{view:i,sessions:r,go:s}=we.getState();if(i.kind!=="session"||!e.includes(i.id))return;const l=r.filter(h=>h.live||h.id===i.id),p=l.findIndex(h=>h.id===i.id),f=h=>!e.includes(h.id),a=l.slice(0,Math.max(p,0)).reverse().find(f)??l.slice(p+1).find(f);a&&s({kind:"session",id:a.id})}function fv(){const e=mn(),i=P.useRef(""),r=P.useRef(!0);return{rename:f=>(i.current=f.title,e({title:"Rename session",description:"Also shown in Claude Code's /resume.",body:v.jsx(pi,{autoFocus:!0,size:"md",defaultValue:f.title,onChange:a=>i.current=a.target.value,onFocus:a=>a.target.select()}),confirmLabel:"Rename",run:async()=>{await _e.renameSession(f.id,i.current),await we.getState().refreshSessions()}})),remove:async f=>{const a=await _e.deletionPlan(f.id).catch(d=>(we.getState().notify(d.message,"error"),null));if(!a)return!1;r.current=!0;const h=await e({title:`Delete "${f.title}" permanently?`,description:f.live?"It is running and will be stopped first. This cannot be undone.":"Removed from ~/.claude. This cannot be undone.",body:v.jsxs("div",{className:"space-y-2 text-xs",children:[a.files.length?v.jsx("div",{className:"divide-y rounded-md border",children:a.files.map(d=>v.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5",children:[v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"truncate font-mono text-[11px]",title:d.path,children:d.path}),v.jsx("div",{className:"text-[10px] text-muted-foreground",children:d.what})]}),v.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:sg(d.bytes)})]},d.path))}):v.jsx("div",{className:"text-muted-foreground",children:"No files on disk; only the hub's own record of it goes."}),a.temp&&v.jsx(_8,{temp:a.temp,choice:r}),v.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Also removed: its interactions and MCP suggestions in the hub. Kept: your prompt history (~/.claude/history.jsonl), which every project shares."})]}),confirmLabel:"Delete permanently",tone:"destructive",maxWidth:"max-w-xl",run:async()=>{await _e.deleteSession(f.id,r.current),await we.getState().refreshSessions(),we.getState().notify("Deleted.")}});if(h){const{view:d,go:m}=we.getState();d.kind==="session"&&d.id===f.id&&m({kind:"page",page:"overview"})}return h},stop:f=>e({title:`Stop "${f.title}"?`,description:"The conversation is kept for a later resume.",confirmLabel:"Stop",tone:"destructive",run:async()=>{await _e.killSession(f.id),dv([f.id])}})}}const x8=(e,i)=>JSON.stringify(e)===JSON.stringify(i),Jp=e=>e.variables.length?e:{...e,variables:[{name:"",value:""}]};function y8({sessionId:e,live:i,current:r}){const s=mn(),[l,p]=P.useState(()=>Jp(r));P.useEffect(()=>p(Jp(r)),[JSON.stringify(r)]);const f={notes:l.notes.trim(),variables:l.variables.map(m=>({name:m.name.trim(),value:m.value.trim()})).filter(m=>m.name)},a=!x8(f,r),h=(m,c)=>p({...l,variables:l.variables.map((_,y)=>y===m?{..._,...c}:_)}),d=()=>s({title:i?"Save and restart this session?":"Save this setup?",description:i?"Restarts it on the same conversation.":"Applies on the next resume.",confirmLabel:i?"Save & restart":"Save",tone:i?"destructive":"primary",run:async()=>{await _e.setSessionSetup(e,f),we.getState().notify(i?"Restarting with the new setup.":"Saved.")}});return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsx("h2",{className:"text-sm font-semibold",children:"Setup"}),v.jsx("p",{className:"truncate text-[11px] text-muted-foreground",children:"For this session only, appended to its system prompt. Applies at start-up."})]}),v.jsxs("div",{className:"flex gap-1.5",children:[v.jsx(ve,{disabled:!a,onClick:()=>p(Jp(r)),children:"Reset"}),v.jsx(ve,{variant:"primary",disabled:!a,onClick:()=>void d(),children:i?"Save & restart":"Save"})]})]}),v.jsxs("section",{className:"space-y-1.5",children:[v.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Notes"}),v.jsx(Zl,{rows:10,defaultMode:"edit",value:l.notes,onChange:m=>p({...l,notes:m})})]}),v.jsxs("section",{className:"space-y-1.5",children:[v.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Names"}),v.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Short names you use in this session and what each stands for, e.g. OUT → C:\\reports\\2026."}),l.variables.map((m,c)=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx(pi,{className:"w-48 shrink-0 font-mono",placeholder:"Name",value:m.name,onChange:_=>h(c,{name:_.target.value})}),v.jsx(pi,{className:"min-w-0 flex-1",placeholder:"What it stands for",value:m.value,onChange:_=>h(c,{value:_.target.value})}),v.jsx(ve,{variant:"ghost",size:"icon",title:"Remove",onClick:()=>p({...l,variables:l.variables.filter((_,y)=>y!==c)}),children:v.jsx(Nn,{size:13})})]},c)),v.jsxs(ve,{variant:"ghost",onClick:()=>p({...l,variables:[...l.variables,{name:"",value:""}]}),children:[v.jsx(fi,{size:12})," Add a name"]})]})]})}function pv({title:e,subtitle:i,badge:r,mono:s,defaultOpen:l,children:p}){const[f,a]=P.useState(!!l);return v.jsxs("div",{className:"rounded-md bg-muted/30",children:[v.jsxs("button",{onClick:()=>a(!f),className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-muted/50",children:[v.jsx(da,{size:13,className:ye("shrink-0 transition-transform",f&&"rotate-90")}),v.jsxs("span",{className:"min-w-0 flex-1",children:[v.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[v.jsx("span",{className:ye("min-w-0 truncate text-xs font-medium",s&&"font-mono"),title:typeof e=="string"?e:void 0,children:e}),r&&v.jsx("span",{className:"shrink-0",children:r})]}),i&&v.jsx("span",{className:"block truncate text-[11px] text-muted-foreground",children:i})]})]}),f&&v.jsx("div",{className:"bg-muted/20 px-3 py-2",children:p})]})}function ds(){return v.jsx(nt,{tone:"on",className:"px-1 py-0 text-[9px] leading-[14px]",title:"Applies to every project on this machine, not only this one.",children:"global"})}const b8=[{kind:"plugins",title:"Plugins"},{kind:"agents",title:"Agents"},{kind:"skills",title:"Skills"},{kind:"mcp",title:"MCP servers"}];function S8({on:e,disabled:i,onToggle:r}){return v.jsx("button",{role:"switch","aria-checked":e,disabled:i,onClick:r,className:ye("relative h-4 w-7 shrink-0 rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-40",e?"bg-primary":"bg-foreground/20"),children:v.jsx("span",{className:ye("absolute top-0.5 h-3 w-3 rounded-full bg-background transition-all",e?"left-3.5":"left-0.5")})})}function P2({catalog:e,value:i,onChange:r}){const[s,l]=P.useState(""),p=P.useMemo(()=>new Set(e.filter(m=>m.kind==="plugins"&&m.scope==="user").map(m=>m.id)),[e]),f=m=>m.scope==="user"||m.scope==="plugin"&&!!(m.plugin&&p.has(m.plugin)),a=m=>{const c=i[m.kind];r({...i,[m.kind]:c.includes(m.id)?c.filter(_=>_!==m.id):[...c,m.id]})},h=(m,c,_)=>{const y=new Set(_.map(S=>S.id)),E=i[m].filter(S=>!y.has(S));r({...i,[m]:c?E:[...E,...y]})},d=s.trim().toLowerCase();return v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"relative",children:[v.jsx(ng,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),v.jsx(pi,{value:s,onChange:m=>l(m.target.value),placeholder:"Filter",className:"pl-6"})]}),b8.map(({kind:m,title:c})=>{const _=e.filter(S=>S.kind===m);if(!_.length)return null;const y=d?_.filter(S=>`${S.label} ${S.description}`.toLowerCase().includes(d)):_,E=_.filter(S=>i[m].includes(S.id)||S.plugin&&i.plugins.includes(S.plugin)).length;return v.jsxs(pv,{title:c,badge:v.jsx(nt,{tone:E?"warning":"off",children:E?`${E} of ${_.length} off`:`${_.length} on`}),defaultOpen:!0,children:[v.jsxs("div",{className:"mb-1.5 flex gap-3 text-[11px] text-muted-foreground",children:[v.jsx("button",{className:"hover:text-foreground",onClick:()=>h(m,!0,y),children:"All on"}),v.jsx("button",{className:"hover:text-foreground",onClick:()=>h(m,!1,y),children:"All off"})]}),y.length?v.jsx("div",{className:"divide-y rounded-md border bg-background",children:y.map(S=>{const g=!!(S.plugin&&i.plugins.includes(S.plugin)),b=!g&&!i[m].includes(S.id);return v.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-1.5",children:[v.jsx(S8,{on:b,disabled:g,onToggle:()=>a(S)}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] text-foreground",children:S.label}),f(S)&&v.jsx(ds,{})]}),S.description&&v.jsx("div",{className:"truncate text-[10px] text-muted-foreground",children:S.description})]}),g?v.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:"off with its plugin"}):!S.leavesContext&&v.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground",title:"Turning this off blocks its use; Claude may still see it listed.",children:"blocks use only"}),v.jsx("span",{className:"hidden w-16 shrink-0 text-right text-[10px] text-muted-foreground sm:block",children:S.scope})]},S.id)})}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"No match."})]},m)})]})}function dh(e){return e.agents.length+e.skills.length+e.mcp.length+e.plugins.length}const w8=(e,i)=>JSON.stringify(e)===JSON.stringify(i);function C8({sessionId:e,live:i,current:r}){const s=mn(),l=mt(()=>_e.toolsetCatalog(),[]),p=mt(()=>_e.presets(),["jobs"]),[f,a]=P.useState(r),h=P.useRef("");P.useEffect(()=>a(r),[JSON.stringify(r)]);const d=!w8(f,r),m=()=>s({title:i?"Apply and restart this session?":"Save this toolset?",description:i?"Restarts it on the same conversation.":"Applies on the next resume.",confirmLabel:i?"Apply & restart":"Save",tone:i?"destructive":"primary",run:async()=>{await _e.setSessionToolset(e,f),we.getState().notify(i?"Restarting with the new toolset.":"Saved.")}}),c=()=>(h.current="",s({title:"Save as a preset",description:"Reusable by jobs and new sessions.",body:v.jsx(pi,{autoFocus:!0,placeholder:"Preset name, e.g. Frontend only",onChange:_=>h.current=_.target.value}),confirmLabel:"Save preset",run:async()=>{await _e.savePreset({name:h.current,toolset:f}),we.getState().notify("Preset saved."),p.reload()}}));return v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1 basis-48",children:[v.jsx("h2",{className:"text-sm font-semibold",children:"Toolset"}),v.jsxs("p",{className:"truncate text-[11px] text-muted-foreground",children:[dh(r)?`${dh(r)} turned off for this session.`:"Everything is on."," Applies at start-up."]})]}),v.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[p.data&&p.data.length>0&&v.jsxs(ta,{value:"",onValueChange:_=>{var E;const y=(E=p.data)==null?void 0:E.find(S=>S.id===_);y&&a(y.toolset)},className:"w-40",children:[v.jsx(Cn,{value:"",children:"Use a preset..."}),p.data.map(_=>v.jsxs(Cn,{value:_.id,children:[_.name,_.isDefault?" (default)":""]},_.id))]}),v.jsx(ve,{onClick:()=>void c(),children:"Save as preset"}),d&&v.jsx(ve,{onClick:()=>a(r),children:"Discard"}),v.jsx(ve,{variant:"primary",disabled:!d,onClick:()=>void m(),children:i?"Apply & restart":"Save"})]})]}),l.data?v.jsx(P2,{catalog:l.data,value:f,onChange:a}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."})]})}let I2=null;const E8=fetch("/api/file-icons/manifest").then(e=>e.ok?e.json():null).then(e=>I2=e).catch(()=>null);function k8(e,i,r,s){const l=i.toLowerCase(),p=(h,d)=>Object.hasOwn(h,d)?h[d]:void 0;if(r)return p(s?e.folderNamesExpanded:e.folderNames,l)??(s?e.folderExpanded:e.folder);const f=p(e.fileNames,l);if(f)return f;const a=l.split(".");for(let h=1;h<a.length;h++){const d=p(e.fileExtensions,a.slice(h).join("."));if(d)return d}return e.file}function z2({name:e,folder:i=!1,open:r=!1,size:s=14,className:l}){const[p,f]=P.useState(I2);if(P.useEffect(()=>{p||E8.then(a=>a&&f(a))},[p]),!p){const a=i?r?aa:eg:Jm;return v.jsx(a,{size:s-1,className:ye("shrink-0",l)})}return v.jsx("img",{src:`/api/file-icons/${k8(p,e,i,r)}.svg`,alt:"",width:s,height:s,draggable:!1,className:ye("shrink-0",l)})}var T8=Object.defineProperty,Ut=(e,i)=>T8(e,"name",{value:i,configurable:!0}),[mv,Q9]=yr("Tooltip",[_a]),Hh=_a(),R8="TooltipProvider",A8=700,Vm="tooltip.open",[L8,gv]=mv(R8),D8=Ut(e=>{const{__scopeTooltip:i,delayDuration:r=A8,skipDelayDuration:s=300,disableHoverableContent:l=!1,children:p}=e,f=P.useRef(!0),a=P.useRef(!1),h=P.useRef(0);return P.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),v.jsx(L8,{scope:i,isOpenDelayedRef:f,delayDuration:r,onOpen:P.useCallback(()=>{s<=0||(window.clearTimeout(h.current),f.current=!1)},[s]),onClose:P.useCallback(()=>{s<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>f.current=!0,s))},[s]),isPointerInTransitRef:a,onPointerInTransitChange:P.useCallback(d=>{a.current=d},[]),disableHoverableContent:l,children:p})},"TooltipProvider"),Wm="Tooltip",[M8,Jl]=mv(Wm),j8=Ut(e=>{const{__scopeTooltip:i,children:r,open:s,defaultOpen:l,onOpenChange:p,disableHoverableContent:f,delayDuration:a}=e,h=gv(Wm,e.__scopeTooltip),d=Hh(i),[m,c]=P.useState(null),[_,y]=P.useState(void 0),E=Fi(),S=P.useRef(0),g=f??h.disableHoverableContent,b=a??h.delayDuration,w=P.useRef(!1),[x,T]=Vs({prop:s,defaultProp:l??!1,onChange:Ut(M=>{M?(h.onOpen(),document.dispatchEvent(new CustomEvent(Vm))):h.onClose(),p==null||p(M)},"onChange"),caller:Wm}),D=P.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),R=P.useCallback(()=>{window.clearTimeout(S.current),S.current=0,w.current=!1,T(!0)},[T]),L=P.useCallback(()=>{window.clearTimeout(S.current),S.current=0,T(!1)},[T]),A=P.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{w.current=!0,T(!0),S.current=0},b)},[b,T]);P.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]);const j=_??E;return v.jsx(Eg,{...d,children:v.jsx(M8,{scope:i,contentId:j,setContentId:y,open:x,stateAttribute:D,trigger:m,onTriggerChange:c,onTriggerEnter:P.useCallback(()=>{h.isOpenDelayedRef.current?A():R()},[h.isOpenDelayedRef,A,R]),onTriggerLeave:P.useCallback(()=>{g?L():(window.clearTimeout(S.current),S.current=0)},[L,g]),onOpen:R,onClose:L,disableHoverableContent:g,children:r})})},"Tooltip"),Nb="TooltipTrigger",O8=P.forwardRef(Ut(function(i,r){const{__scopeTooltip:s,"aria-describedby":l,...p}=i,f=Jl(Nb,s),a=gv(Nb,s),h=Hh(s),d=P.useRef(null),m=ut(r,d,f.onTriggerChange),c=P.useRef(!1),_=P.useRef(!1),y=P.useCallback(()=>c.current=!1,[]);return P.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),v.jsx(kg,{asChild:!0,...h,children:v.jsx(wt.button,{"aria-describedby":f.open?Y2(l,f.contentId):l,"data-state":f.stateAttribute,...p,ref:m,onPointerMove:tt(i.onPointerMove,E=>{E.pointerType!=="touch"&&!_.current&&!a.isPointerInTransitRef.current&&(f.onTriggerEnter(),_.current=!0)}),onPointerLeave:tt(i.onPointerLeave,()=>{f.onTriggerLeave(),_.current=!1}),onPointerDown:tt(i.onPointerDown,()=>{f.open&&f.onClose(),c.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:tt(i.onFocus,()=>{c.current||f.onOpen()}),onBlur:tt(i.onBlur,f.onClose),onClick:tt(i.onClick,f.onClose)})})},"TooltipTrigger")),H2="TooltipPortal",[N8,B8]=mv(H2,{forceMount:void 0}),P8=Ut(e=>{const{__scopeTooltip:i,forceMount:r,children:s,container:l}=e,p=Jl(H2,i);return v.jsx(N8,{scope:i,forceMount:r,children:v.jsx(br,{present:r||p.open,children:v.jsx(yh,{asChild:!0,container:l,children:s})})})},"TooltipPortal"),Pl="TooltipContent",I8=P.forwardRef(Ut(function(i,r){const s=B8(Pl,i.__scopeTooltip),{forceMount:l=s.forceMount,side:p="top",...f}=i,a=Jl(Pl,i.__scopeTooltip);return v.jsx(br,{present:l||a.open,children:a.disableHoverableContent?v.jsx(F2,{side:p,...f,ref:r}):v.jsx(z8,{side:p,...f,ref:r})})},"TooltipContent")),z8=P.forwardRef(Ut(function(i,r){const s=Jl(Pl,i.__scopeTooltip),l=gv(Pl,i.__scopeTooltip),p=P.useRef(null),f=ut(r,p),[a,h]=P.useState(null),{trigger:d,onClose:m}=s,c=p.current,{onPointerInTransitChange:_}=l,y=P.useCallback(()=>{h(null),_(!1)},[_]),E=P.useCallback((S,g)=>{const b=S.currentTarget,w={x:S.clientX,y:S.clientY},x=U2(w,b.getBoundingClientRect()),T=$2(w,x),D=q2(g.getBoundingClientRect()),R=W2([...T,...D]);h(R),_(!0)},[_]);return P.useEffect(()=>()=>y(),[y]),P.useEffect(()=>{if(d&&c){const S=Ut(b=>E(b,c),"handleTriggerLeave"),g=Ut(b=>E(b,d),"handleContentLeave");return d.addEventListener("pointerleave",S),c.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerleave",S),c.removeEventListener("pointerleave",g)}}},[d,c,E,y]),P.useEffect(()=>{if(a){const S=Ut(g=>{const b=g.target,w={x:g.clientX,y:g.clientY},x=(d==null?void 0:d.contains(b))||(c==null?void 0:c.contains(b)),T=!V2(w,a);x?y():T&&(y(),m())},"handleTrackPointerGrace");return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,c,a,m,y]),v.jsx(F2,{...i,ref:f})},"TooltipContentHoverable")),H8=US("TooltipContent"),F2=P.forwardRef(Ut(function(i,r){const{__scopeTooltip:s,children:l,"aria-label":p,id:f,onEscapeKeyDown:a,onPointerDownOutside:h,...d}=i,m=Jl(Pl,s),c=Hh(s),{onClose:_}=m,[y,E]=P.useState(null),S=ut(r,E);fg(y),P.useEffect(()=>(document.addEventListener(Vm,_),()=>document.removeEventListener(Vm,_)),[_]),P.useEffect(()=>{if(m.trigger){const b=Ut(w=>{w.target instanceof Node&&w.target.contains(m.trigger)&&_()},"handleScroll");return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[m.trigger,_]);const{setContentId:g}=m;return $t(()=>(g(f),()=>{g(void 0)}),[f,g]),v.jsx(xh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:h,onFocusOutside:b=>b.preventDefault(),onDismiss:_,children:v.jsxs(Tg,{"data-state":m.stateAttribute,role:p?void 0:"tooltip",id:p?void 0:m.contentId,...c,...d,ref:S,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(H8,{children:l}),p?v.jsx(_6,{id:m.contentId,role:"tooltip",children:p}):null]})})},"TooltipContentImpl")),F8=P.forwardRef(Ut(function(i,r){const{__scopeTooltip:s,...l}=i,p=Hh(s);return v.jsx(NA,{...p,...l,ref:r})},"TooltipArrow"));function U2(e,i){const r=Math.abs(i.top-e.y),s=Math.abs(i.bottom-e.y),l=Math.abs(i.right-e.x),p=Math.abs(i.left-e.x);switch(Math.min(r,s,l,p)){case p:return"left";case l:return"right";case r:return"top";case s:return"bottom";default:throw new Error("unreachable")}}Ut(U2,"getExitSideFromRect");function $2(e,i,r=5){const s=[];switch(i){case"top":s.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":s.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":s.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":s.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return s}Ut($2,"getPaddedExitPoints");function q2(e){const{top:i,right:r,bottom:s,left:l}=e;return[{x:l,y:i},{x:r,y:i},{x:r,y:s},{x:l,y:s}]}Ut(q2,"getPointsFromRect");function V2(e,i){const{x:r,y:s}=e;let l=!1;for(let p=0,f=i.length-1;p<i.length;f=p++){const a=i[p],h=i[f],d=a.x,m=a.y,c=h.x,_=h.y;m>s!=_>s&&r<(c-d)*(s-m)/(_-m)+d&&(l=!l)}return l}Ut(V2,"isPointInPolygon");function W2(e){const i=e.slice();return i.sort((r,s)=>r.x<s.x?-1:r.x>s.x?1:r.y<s.y?-1:r.y>s.y?1:0),G2(i)}Ut(W2,"getHull");function G2(e){if(e.length<=1)return e.slice();const i=[];for(let s=0;s<e.length;s++){const l=e[s];for(;i.length>=2;){const p=i[i.length-1],f=i[i.length-2];if((p.x-f.x)*(l.y-f.y)>=(p.y-f.y)*(l.x-f.x))i.pop();else break}i.push(l)}i.pop();const r=[];for(let s=e.length-1;s>=0;s--){const l=e[s];for(;r.length>=2;){const p=r[r.length-1],f=r[r.length-2];if((p.x-f.x)*(l.y-f.y)>=(p.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}return r.pop(),i.length===1&&r.length===1&&i[0].x===r[0].x&&i[0].y===r[0].y?i:i.concat(r)}Ut(G2,"getHullPresorted");function Y2(...e){const i=new Set;for(const r of e)if(typeof r=="string")for(const s of String(r).trim().split(/\s+/))s&&i.add(s);return i.size>0?Array.from(i).join(" "):void 0}Ut(Y2,"concatAriaDescribedby");function cr({content:e,children:i,side:r="top",asChild:s=!1,className:l,wide:p}){return e?v.jsx(D8,{delayDuration:300,children:v.jsxs(j8,{children:[v.jsx(O8,{asChild:!0,children:s?i:v.jsx("span",{className:ye("inline-flex",l),children:i})}),v.jsx(P8,{children:v.jsxs(I8,{side:r,sideOffset:6,collisionPadding:8,className:ye("z-[100] rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background shadow-md","animate-in fade-in-0 zoom-in-95 dark:bg-secondary dark:text-foreground",p?"max-w-md":"max-w-xs"),children:[e,v.jsx(F8,{className:"fill-foreground dark:fill-secondary"})]})})]})}):v.jsx(v.Fragment,{children:i})}const Bb=()=>`clauder-hub:files-expanded:${we.getState().projectId}`,Pb="clauder-hub:files-show-ignored",X2=P.createContext(null),Fh=()=>P.useContext(X2);function Ib(e,i){try{const r=localStorage.getItem(e);return r===null?i:JSON.parse(r)}catch{return i}}function zb(e,i){try{localStorage.setItem(e,JSON.stringify(i))}catch{}}const K2=(e,i)=>e?`${e}/${i}`:i,Q2=e=>e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";async function Gm(e,i,r){const s=ur.getState().item;if(!s)return;if(s.mode==="copy"){await at(()=>Xt.copy(s.path,e))&&e&&r(e);return}const l=s.path.split("/").pop()??s.path,p=K2(e,l);if(p===s.path)return ur.getState().set(null);const f=await at(()=>Xt.rename(s.path,p));if(!f)return;ur.getState().set(null),en.getState().move(s.path,f.path),Bn.getState().rename(s.path,f.path),e&&r(e);const a=we.getState().view;a.kind==="file"&&(a.path===s.path||a.path.startsWith(`${s.path}/`))&&i({kind:"file",path:f.path+a.path.slice(s.path.length)})}function U8(){const[e,i]=P.useState(()=>Ib(Pb,!1)),[r,s]=P.useState(()=>new Set(Ib(Bb(),[]))),[l,p]=P.useState(0),[f,a]=P.useState(null),[h,d]=P.useState(null),m=ur(g=>g.item),c=we(g=>g.go);P.useEffect(()=>zb(Bb(),[...r]),[r]),P.useEffect(()=>{const g=()=>p(b=>b+1);return window.addEventListener("focus",g),()=>window.removeEventListener("focus",g)},[]);const _=(g,b)=>s(w=>{const x=new Set(w);return b??!x.has(g)?x.add(g):x.delete(g),x}),y={showIgnored:e,epoch:l,expanded:r,toggle:_,editing:f,setEditing:a,openMenu:(g,b,w)=>d({entry:g,x:b,y:w})},E=we(g=>{var b;return((b=g.health)==null?void 0:b.project)??"Project"}),S=g=>{g.defaultPrevented||(g.preventDefault(),d({entry:{name:E,path:"",kind:"dir",size:0,ignored:!1},x:g.clientX,y:g.clientY}))};return v.jsxs(X2.Provider,{value:y,children:[v.jsxs("div",{className:"flex min-h-full flex-col",onContextMenu:S,children:[v.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-0.5 bg-background px-3 pb-1",children:[v.jsx("div",{className:"flex-1 text-[10px] text-muted-foreground",children:"Project files"}),v.jsx(cr,{content:"New file",asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon","aria-label":"New file",onClick:()=>a({kind:"file",parent:""}),children:v.jsx(am,{size:13})})}),v.jsx(cr,{content:"New folder",asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon","aria-label":"New folder",onClick:()=>a({kind:"folder",parent:""}),children:v.jsx(cm,{size:13})})}),v.jsx(cr,{content:e?"Hide ignored":"Show ignored",asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon","aria-label":"Show ignored","aria-pressed":e,className:ye(e&&"bg-muted text-foreground"),onClick:()=>{i(!e),zb(Pb,!e)},children:e?v.jsx(Zm,{size:13}):v.jsx(E3,{size:13})})}),m&&v.jsx(cr,{content:`Paste ${m.path.split("/").pop()} into the project root`,asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon","aria-label":"Paste into the project root",onClick:()=>void Gm("",c,g=>_(g,!0)),children:v.jsx(om,{size:13})})}),v.jsx(cr,{content:"Refresh",asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon","aria-label":"Refresh",onClick:()=>p(l+1),children:v.jsx(vh,{size:13})})})]}),v.jsx("div",{className:"flex-1 px-2",children:v.jsx(Z2,{path:"",depth:0})})]}),h&&v.jsx(q8,{...h,onClose:()=>d(null)})]})}function Z2({path:e,depth:i}){const{showIgnored:r,epoch:s,editing:l}=Fh(),{data:p,error:f}=mt(()=>Xt.list(e,r),["files","sessions"],[e,r,s]),a=l&&l.kind!=="rename"&&l.parent===e?l.kind:null,h={paddingLeft:`${i*12+8}px`};return v.jsxs(v.Fragment,{children:[a&&v.jsx(J2,{depth:i,icon:a==="folder"?eg:Jm,initial:""}),f&&v.jsx("div",{className:"py-1 text-[11px] text-severity-critical",style:h,children:f}),!p&&!f&&v.jsx("div",{className:"py-1 text-[11px] text-muted-foreground",style:h,children:"Loading..."}),p&&!p.entries.length&&!a&&v.jsx("div",{className:"py-1 text-[11px] text-muted-foreground",style:h,children:"Empty"}),p==null?void 0:p.entries.map(d=>v.jsx($8,{entry:d,depth:i},d.path))]})}function $8({entry:e,depth:i}){const{expanded:r,toggle:s,editing:l,openMenu:p}=Fh(),f=we(y=>y.go),a=we(y=>y.view.kind==="file"&&y.view.path===e.path),h=en(y=>is(y.drafts[e.path])),d=ur(y=>{var E;return((E=y.item)==null?void 0:E.mode)==="cut"&&y.item.path===e.path}),m=e.kind==="dir"&&r.has(e.path),c=P.useRef({fired:!1}),_=()=>window.clearTimeout(c.current.timer);return(l==null?void 0:l.kind)==="rename"&&l.entry.path===e.path?v.jsx(J2,{depth:i,icon:e.kind==="dir"?eg:Jm,initial:e.name}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"relative",children:[v.jsxs("button",{onClick:()=>{c.current.fired||(e.kind==="dir"?s(e.path):f({kind:"file",path:e.path}))},onDoubleClick:()=>e.kind==="file"&&Bn.getState().pin(e.path),onContextMenu:y=>{y.preventDefault(),p(e,y.clientX,y.clientY)},onPointerDown:y=>{if(c.current.fired=!1,y.pointerType!=="touch")return;const{clientX:E,clientY:S}=y;window.clearTimeout(c.current.timer),c.current.timer=window.setTimeout(()=>{c.current.fired=!0,p(e,E,S)},500)},onPointerUp:_,onPointerLeave:_,onPointerCancel:_,title:e.path,className:ye("flex w-full select-none items-center gap-1.5 rounded-md py-1 pr-8 text-left text-xs transition-colors [-webkit-touch-callout:none] md:pr-2",a?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground",e.ignored&&"opacity-55",d&&"opacity-45"),style:{paddingLeft:`${i*12+4}px`},children:[e.kind==="dir"?m?v.jsx(zl,{size:11,className:"shrink-0"}):v.jsx(da,{size:11,className:"shrink-0"}):v.jsx("span",{className:"w-[11px] shrink-0"}),v.jsx(z2,{name:e.name,folder:e.kind==="dir",open:m}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name}),h&&v.jsx("span",{title:"Unsaved changes",className:"h-1.5 w-1.5 shrink-0 rounded-full bg-severity-warning"})]}),v.jsx("button",{"aria-label":"File actions",title:"File actions",onClick:y=>{const E=y.currentTarget.getBoundingClientRect();p(e,E.right-192,E.bottom+4)},className:"absolute right-1 top-0.5 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground md:hidden",children:v.jsx(fS,{size:13})})]}),m&&v.jsx(Z2,{path:e.path,depth:i+1})]})}function J2({depth:e,icon:i,initial:r}){const{editing:s,setEditing:l,toggle:p}=Fh(),f=we(c=>c.go),[a,h]=P.useState(r),d=P.useRef(!1),m=async()=>{const c=a.trim();if(d.current)return;if(!s||!c)return l(null);if(s.kind==="rename"&&/[\\/]/.test(c)){we.getState().notify("A name cannot contain / or \\. To move it, use Cut and Paste.","error");return}const _=s.kind==="rename"?Q2(s.entry.path):s.parent,y=c.startsWith("/")?c.replace(/^\/+/,""):K2(_,c);if(d.current=!0,s.kind==="rename"){const E=s.entry.path;if(y===E)return l(null);const S=await at(()=>Xt.rename(E,y));if(d.current=!1,!S)return;en.getState().move(E,S.path),Bn.getState().rename(E,S.path);const g=we.getState().view;g.kind==="file"&&(g.path===E||g.path.startsWith(`${E}/`))&&f({kind:"file",path:S.path+g.path.slice(E.length)})}else{const E=await at(()=>s.kind==="folder"?Xt.mkdir(y):Xt.create(y));if(d.current=!1,!E)return;s.kind==="file"?f({kind:"file",path:E.path}):p(E.path,!0)}l(null)};return v.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 pr-2",style:{paddingLeft:`${e*12+19}px`},children:[v.jsx(i,{size:13,className:"shrink-0 text-muted-foreground"}),v.jsx("input",{autoFocus:!0,value:a,onChange:c=>h(c.target.value),onFocus:c=>{const _=r.lastIndexOf(".");c.currentTarget.setSelectionRange(0,_>0?_:r.length)},onKeyDown:c=>{c.key==="Enter"&&m(),c.key==="Escape"&&l(null)},onBlur:()=>!d.current&&l(null),placeholder:(s==null?void 0:s.kind)==="folder"?"Folder name":"File name",spellCheck:!1,className:"min-w-0 flex-1 rounded border border-primary/60 bg-background px-1.5 py-0.5 text-xs focus:outline-none"})]})}function q8({entry:e,x:i,y:r,onClose:s}){const{setEditing:l,toggle:p}=Fh(),f=we(g=>g.go),a=we(g=>{var b;return((b=g.health)==null?void 0:b.projectRoot)??""}),h=ur(g=>g.item),d=a.includes("\\"),m=e.path==="",c=m?a:a?d?`${a}\\${e.path.replace(/\//g,"\\")}`:`${a}/${e.path}`:e.path,_=(g,b)=>{var w;return void((w=navigator.clipboard)==null?void 0:w.writeText(g).then(()=>we.getState().notify(`Copied the ${b}.`),()=>we.getState().notify("The browser did not allow copying.","error")))};P.useEffect(()=>{const g=()=>s(),b=w=>w.key==="Escape"&&s();return window.addEventListener("pointerdown",g),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),window.addEventListener("keydown",b),()=>{window.removeEventListener("pointerdown",g),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),window.removeEventListener("keydown",b)}},[s]);const y=async()=>{if(!await at(()=>Xt.remove(e.path),`Deleted ${e.name}.`))return;const{drafts:b,drop:w}=en.getState();for(const R of Object.keys(b))(R===e.path||R.startsWith(`${e.path}/`))&&w(R);const x=we.getState().view,T=x.kind==="file"?x.path:null,D=Bn.getState().close(P4(e.path),T);T&&D!==T?f(D?{kind:"file",path:D}:{kind:"page",page:"overview"}):x.kind==="file"&&(x.path===e.path||x.path.startsWith(`${e.path}/`))&&f({kind:"page",page:"overview"})},E=(g,b,w,x=!1)=>{const T=b;return v.jsxs("button",{onPointerDown:D=>{D.stopPropagation(),s(),window.setTimeout(w)},className:ye("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs",x?"text-severity-critical hover:bg-destructive/15":"hover:bg-muted"),children:[v.jsx(T,{size:13}),g]})},S=g=>()=>{p(e.path,!0),l({kind:g,parent:e.path})};return m?v.jsxs("div",{role:"menu",className:"fixed z-50 w-48 rounded-lg border bg-card p-1 shadow-lg",style:{left:Math.min(i,window.innerWidth-200),top:Math.max(8,Math.min(r,window.innerHeight-220))},onPointerDown:g=>g.stopPropagation(),children:[E("New file",am,()=>l({kind:"file",parent:""})),E("New folder",cm,()=>l({kind:"folder",parent:""})),h&&E("Paste",om,()=>void Gm("",f,g=>p(g,!0))),v.jsx("div",{className:"my-1 border-t"}),E("Copy Path",El,()=>_(c,"path")),E("Reveal in File Explorer",aa,()=>void at(()=>Xt.reveal("")))]}):v.jsxs("div",{role:"menu",className:"fixed z-50 w-48 rounded-lg border bg-card p-1 shadow-lg",style:{left:Math.min(i,window.innerWidth-200),top:Math.max(8,Math.min(r,window.innerHeight-380))},onPointerDown:g=>g.stopPropagation(),children:[e.kind==="file"?v.jsxs(v.Fragment,{children:[E("Open",ph,()=>f({kind:"file",path:e.path})),E("Open in new window",fa,()=>og({kind:"file",path:e.path}))]}):v.jsxs(v.Fragment,{children:[E("New file",am,S("file")),E("New folder",cm,S("folder"))]}),v.jsx("div",{className:"my-1 border-t"}),E("Cut",$3,()=>ur.getState().set({mode:"cut",path:e.path})),E("Copy",gh,()=>{ur.getState().set({mode:"copy",path:e.path}),at(()=>Xt.copyToClipboard(e.path),"Copied: paste it here, or with Ctrl+V in Slack, Teams or a mail.")}),h&&E(`Paste${e.kind==="dir"?" into folder":" here"}`,om,()=>void Gm(e.kind==="dir"?e.path:Q2(e.path),f,g=>p(g,!0))),v.jsx("div",{className:"my-1 border-t"}),E("Copy Path",El,()=>_(c,"path")),E("Copy Relative Path",El,()=>_(e.path,"relative path")),E("Reveal in File Explorer",aa,()=>void at(()=>Xt.reveal(e.path))),v.jsx("div",{className:"my-1 border-t"}),E("Rename",_r,()=>l({kind:"rename",entry:e})),v.jsx("div",{className:"my-1 border-t"}),E("Delete",xr,()=>void y(),!0)]})}const Hb=[{id:"operation",label:"Operation",items:[{page:"overview",label:"Overview",icon:M3},{page:"inbox",label:"Inbox",icon:as},{page:"automation",label:"Automation",icon:mh}]},{id:"project",label:"Project",items:[{page:"instructions",label:"Instructions",icon:y3},{page:"agents",label:"Agents",icon:lS},{page:"skills",label:"Skills",icon:ig},{page:"commands",label:"Commands",icon:w3},{page:"mcp-servers",label:"MCP servers",icon:Hl},{page:"hooks",label:"Hooks",icon:SS},{page:"plugins",label:"Plugins",icon:H3}]},{id:"settings",label:"Settings",items:[{page:"claude-settings",label:"Claude settings",icon:V3},{page:"channels",label:"Channels",icon:Fl},{page:"hub-prompts",label:"Hub prompts",icon:gS},{page:"mcp-suggestions",label:"MCP suggestions",icon:z3},{page:"presets",label:"Toolset presets",icon:tg},{page:"categories",label:"Task categories",icon:yS}]}];function Uh({session:e}){const i=e.status==="waiting"?"bg-severity-warning animate-status-pulse":e.status==="running"?"bg-success animate-status-pulse":e.status==="done"?"border border-success bg-transparent":"bg-muted-foreground/40";return v.jsx("span",{className:ye("inline-block h-2 w-2 shrink-0 rounded-full",i)})}const V8={manual:"hub",cron:"cron",webhook:"webhook",queue:"queue",external:"terminal"},Fb="clauder-hub:folded-groups",Ub="clauder-hub:sidebar-tab",W8="clauder-hub:history-hide-tasks",Ym="clauder:focus-sessions";function G8(e,i){const[r,s]=P.useState(()=>{try{const p=localStorage.getItem(e);return p===null?i:p==="1"}catch{return i}});return[r,p=>{s(p);try{localStorage.setItem(e,p?"1":"0")}catch{}}]}function Y8(){const[e,i]=P.useState(()=>{try{const s=localStorage.getItem(Ub);return s==="workspace"||s==="files"?s:"sessions"}catch{return"sessions"}});return[e,s=>{i(s);try{localStorage.setItem(Ub,s)}catch{}}]}function X8(){const[e,i]=P.useState(()=>{try{return new Set(JSON.parse(localStorage.getItem(Fb)??"[]"))}catch{return new Set}});return P.useEffect(()=>{try{localStorage.setItem(Fb,JSON.stringify([...e]))}catch{}},[e]),[e,s=>i(l=>{const p=new Set(l);return p.has(s)?p.delete(s):p.add(s),p})]}function e5(e){const i=we(p=>p.go),[r,s]=P.useState(!1);return{starting:r,newSession:async()=>{if(r)return;s(!0);const p=Math.max(80,Math.floor((window.innerWidth-e-40)/7.8)),f=Math.max(24,Math.floor((window.innerHeight-140)/17)),a=await at(()=>_e.startSession({cols:p,rows:f}));s(!1),a&&(await we.getState().refreshSessions(),i({kind:"session",id:a.sessionId}))}}}const K8=[{kind:"hub",label:"Hub task",icon:Ul},{kind:"create-job",label:"Create a job",icon:mh},{kind:"queue-run",label:"Queue a run",icon:la},{kind:"create-category",label:"New task category",icon:yS},{kind:"create-preset",label:"New toolset preset",icon:tg},{kind:"create-channel",label:"Add a channel",icon:Fl}];function t5({beside:e,size:i="sm",full:r=!1}){const{starting:s,newSession:l}=e5(e),{starting:p,start:f}=Ks(),[a,h]=P.useState(!1),d=s||p,m=c=>{h(!1),c()};return v.jsxs("div",{className:ye("flex",r&&"w-full"),children:[v.jsxs(ve,{variant:"primary",size:i,className:"flex-1 rounded-r-none",disabled:d,onClick:()=>void l(),"aria-label":"New session",children:[v.jsx(fi,{size:i==="md"?14:13})," ",d?"Starting...":"New session"]}),v.jsxs(Jw,{open:a,onOpenChange:h,align:"end",className:"w-56 p-1",trigger:v.jsx(ve,{variant:"primary",size:i,className:"rounded-l-none border-l border-primary-foreground/25 px-2",disabled:d,"aria-label":"More ways to start",title:"Plain session or hub task",children:v.jsx(zl,{size:14})}),children:[v.jsxs("button",{className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-muted",onClick:()=>m(l),children:[v.jsx(fi,{size:13})," New session"]}),v.jsx("div",{className:"mx-2 mb-0.5 mt-1.5 border-t pt-1.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Hub task"}),K8.map(c=>v.jsxs("button",{className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-muted",onClick:()=>m(()=>f(c.kind)),children:[v.jsx(c.icon,{size:13,className:"text-primary"})," ",c.label]},c.kind))]})]})}function Q8({onMenu:e}){const i=we(r=>r.health);return v.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-2 py-2",children:[v.jsx(ve,{variant:"ghost",size:"icon",onClick:e,"aria-label":"Open menu",title:"Menu",children:v.jsx(mS,{size:16})}),v.jsx(ua,{}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx(zh,{}),v.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[v.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:(i==null?void 0:i.project)??"..."}),v.jsx(hv,{})]})]}),v.jsx(t5,{beside:0})]})}function $b({width:e,collapsed:i,onToggle:r,drawer:s=!1}){const{sessions:l,open:p,view:f,go:a,health:h}=we(),[d,m]=P.useState(""),[c,_]=X8(),[y,E]=Y8(),{starting:S,newSession:g}=e5(s?0:i?48:Number(e)),b=P.useMemo(()=>{const I=d.trim().toLowerCase();return I?l.filter(B=>`${B.title} ${B.firstPrompt??""} ${B.id}`.toLowerCase().includes(I)):l},[l,d]),w=b.filter(I=>I.live),x=b.filter(I=>!I.live),[T,D]=G8(W8,!0),R=T?x.filter(I=>!I.purpose):x,[L,A]=P.useState(0),j=P.useRef(null);P.useEffect(()=>{const I=()=>{E("sessions"),A(B=>B+1),window.setTimeout(()=>{var B;return(B=j.current)==null?void 0:B.scrollIntoView({block:"nearest",behavior:"smooth"})},50)};return window.addEventListener(Ym,I),()=>window.removeEventListener(Ym,I)},[E]);const M=I=>f.kind==="page"&&f.page===I;return i?v.jsxs("aside",{className:"flex w-12 shrink-0 flex-col items-center gap-1 overflow-y-auto border-r py-3",children:[v.jsx(ua,{className:"mb-2"}),v.jsx(cr,{content:"New session",side:"right",asChild:!0,children:v.jsx(ve,{variant:"primary",size:"icon",disabled:S,onClick:()=>void g(),children:v.jsx(fi,{size:14})})}),Hb.map(I=>v.jsx("div",{className:"flex flex-col items-center gap-1 border-t pt-1",children:I.items.map(B=>v.jsx(cr,{content:`${I.label} · ${B.label}`,side:"right",asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon",className:ye(M(B.page)&&"bg-muted text-foreground"),onClick:()=>a({kind:"page",page:B.page}),children:v.jsx(B.icon,{size:15})})},B.page))},I.id)),v.jsx("div",{className:"flex-1"}),v.jsx(ve,{variant:"ghost",size:"icon",onClick:r,"aria-label":"Expand sidebar",children:v.jsx(uS,{size:15})})]}):v.jsxs("aside",{className:"flex shrink-0 flex-col",style:{width:e},children:[v.jsxs("div",{className:"flex items-center gap-2 px-3 pb-2 pt-3",children:[v.jsx(ua,{}),v.jsxs("div",{className:"min-w-0",children:[v.jsx(zh,{}),v.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[v.jsx(cr,{content:h==null?void 0:h.projectRoot,wide:!0,className:"min-w-0",children:v.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:(h==null?void 0:h.project)??"..."})}),v.jsx(hv,{})]})]}),s?v.jsx(ve,{variant:"ghost",size:"icon",className:"ml-auto",onClick:r,"aria-label":"Close menu",children:v.jsx(Nn,{size:15})}):v.jsx(ve,{variant:"ghost",size:"icon",className:"ml-auto",onClick:r,"aria-label":"Collapse sidebar",children:v.jsx(cS,{size:15})})]}),v.jsx("div",{className:"px-3 pb-2",children:v.jsx(t5,{beside:i?48:typeof e=="number"?e:280,size:"md",full:!0})}),v.jsx("div",{className:"mx-3 mb-2 flex rounded-md bg-muted p-0.5",children:[["sessions","Sessions",null],["workspace","Workspace",p.length?String(p.length):null],["files","Files",null]].map(([I,B,H])=>v.jsxs("button",{onClick:()=>E(I),className:ye("flex flex-1 items-center justify-center gap-1.5 rounded px-2 py-1 text-xs transition-colors",y===I?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[B,I==="sessions"&&w.length>0&&v.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-success",title:`${w.length} running`}),H&&v.jsx("span",{className:ye("rounded-full px-1.5 text-[10px] font-semibold",I==="workspace"?"bg-severity-warning text-background":"bg-success/20 text-success"),children:H})]},I))}),v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pb-3",children:y==="files"?v.jsx(U8,{}):y==="workspace"?v.jsx("nav",{className:"px-2",children:Hb.map(I=>{const B=c.has(I.id),H=I.items.some(U=>M(U.page));return v.jsxs("div",{className:"pb-1",children:[v.jsxs("button",{onClick:()=>_(I.id),className:"flex w-full items-center gap-1 px-2 pb-0.5 pt-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground",children:[B?v.jsx(da,{size:11}):v.jsx(zl,{size:11}),I.label,B&&I.id==="operation"&&p.length>0&&v.jsx("span",{className:"ml-auto rounded-full bg-severity-warning px-1.5 text-[10px] text-background",children:p.length})]}),(!B||H)&&I.items.filter(U=>!B||M(U.page)).map(U=>v.jsxs("button",{onClick:()=>a({kind:"page",page:U.page}),className:ye("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs transition-colors",M(U.page)?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[v.jsx(U.icon,{size:14}),U.label,U.page==="inbox"&&p.length>0&&v.jsx("span",{className:"ml-auto rounded-full bg-severity-warning px-1.5 text-[10px] font-semibold text-background",children:p.length})]},U.page))]},I.id)})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"sticky top-0 z-10 bg-background px-3 pb-1",children:v.jsxs("div",{className:"relative",children:[v.jsx(ng,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),v.jsx(pi,{value:d,onChange:I=>m(I.target.value),placeholder:"Search sessions",className:"pl-6"})]})}),v.jsxs("div",{className:"px-2",children:[v.jsx("div",{ref:j,children:v.jsx(qb,{title:`Live (${w.length})`,sessions:w,flash:L})}),v.jsx(qb,{title:`History (${R.length})`,sessions:R,action:v.jsxs("label",{className:"flex cursor-pointer select-none items-center gap-1",title:"Hide the hub's own configuration sessions",children:[v.jsx("input",{type:"checkbox",className:"h-3 w-3 accent-[hsl(var(--primary))]",checked:T,onChange:I=>D(I.target.checked)}),"Hide hub tasks"]})}),!b.length&&v.jsx("div",{className:"px-2 pt-3 text-xs text-muted-foreground",children:d?"No match.":"No sessions yet. Start one above."})]})]})})]})}function Z8({session:e,x:i,y:r,onClose:s}){const l=we(a=>a.go),p=fv();P.useEffect(()=>{const a=()=>s(),h=d=>d.key==="Escape"&&s();return window.addEventListener("pointerdown",a),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),window.addEventListener("keydown",h),()=>{window.removeEventListener("pointerdown",a),window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a),window.removeEventListener("keydown",h)}},[s]);const f=(a,h,d,m={})=>{const c=h;return v.jsxs("button",{disabled:m.disabled,title:m.hint,onPointerDown:_=>{_.stopPropagation(),!m.disabled&&(s(),d())},className:ye("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs disabled:cursor-not-allowed disabled:opacity-40",m.danger?"text-severity-critical hover:bg-destructive/15":"hover:bg-muted"),children:[v.jsx(c,{size:13}),a]})};return v.jsxs("div",{role:"menu",className:"fixed z-50 w-48 rounded-lg border bg-card p-1 shadow-lg",style:{left:Math.min(i,window.innerWidth-200),top:Math.min(r,window.innerHeight-270)},onPointerDown:a=>a.stopPropagation(),children:[f("Open",ph,()=>l({kind:"session",id:e.id})),f("Open in new window",fa,()=>og({kind:"session",id:e.id})),f("Rename",_r,()=>void p.rename(e)),v.jsx("div",{className:"my-1 border-t"}),e.quiet?f("Allow notifications",as,()=>void at(()=>_e.setSessionQuiet(e.id,!1),"Notifications back on for this session.")):f("Do not disturb",oa,()=>void at(()=>_e.setSessionQuiet(e.id,!0),"Nothing from this session goes out on a channel."),{hint:"Its questions still wait in the inbox; no channel hears of them"}),f(`Clear waiting${e.openInteractions?` (${e.openInteractions})`:""}`,N3,()=>void at(()=>_e.dismissWaiting(e.id),"Cleared."),{disabled:!e.openInteractions,hint:"Puts away what it waits on, unanswered; nothing is typed into it"}),v.jsx("div",{className:"my-1 border-t"}),e.live&&f("Stop",_h,()=>void p.stop(e),{hint:"Stops its terminal; the conversation is kept for a later resume"}),f("Delete permanently",xr,()=>void p.remove(e),{danger:!0,hint:e.live?"Stops it first":void 0})]})}function qb({title:e,sessions:i,action:r,flash:s=0}){const{view:l,go:p}=we(),[f,a]=P.useState(null),h=P.useRef({fired:!1}),d=(c,_)=>{if(h.current.fired=!1,_.pointerType!=="touch")return;const{clientX:y,clientY:E}=_;window.clearTimeout(h.current.timer),h.current.timer=window.setTimeout(()=>{h.current.fired=!0,a({session:c,x:y,y:E})},500)},m=()=>window.clearTimeout(h.current.timer);return!i.length&&!r?null:v.jsxs("div",{className:ye("mt-3 rounded-md",s>0&&"sessions-flash"),children:[f&&v.jsx(Z8,{...f,onClose:()=>a(null)}),v.jsxs("div",{className:"flex items-center justify-between gap-2 px-2 pb-1 text-[10px] text-muted-foreground",children:[v.jsx("span",{children:e}),r]}),v.jsx("div",{className:"space-y-0.5",children:i.map(c=>{const _=l.kind==="session"&&l.id===c.id;return v.jsxs("div",{className:"relative",children:[v.jsxs("button",{onClick:()=>!h.current.fired&&p({kind:"session",id:c.id}),onContextMenu:y=>{y.preventDefault(),a({session:c,x:y.clientX,y:y.clientY})},onPointerDown:y=>d(c,y),onPointerUp:m,onPointerLeave:m,onPointerCancel:m,className:ye("block w-full select-none rounded-md px-2 py-1.5 pr-8 text-left transition-colors [-webkit-touch-callout:none] md:select-auto md:pr-2",_?"bg-muted":"hover:bg-muted/60"),children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Uh,{session:c}),v.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:c.title}),c.purpose&&v.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 rounded bg-primary/15 px-1 text-[9px] font-medium text-primary",title:`Hub task: ${c.purpose.title}`,children:[v.jsx(Ul,{size:9})," task"]}),c.quiet&&v.jsx("span",{className:"shrink-0 text-muted-foreground",title:"Do not disturb: no channel hears from it",children:v.jsx(oa,{size:11})}),c.openInteractions>0&&v.jsx("span",{className:"grid h-4 min-w-[1rem] shrink-0 place-items-center rounded-full bg-severity-warning px-1 text-[10px] font-semibold leading-none text-background",children:c.openInteractions})]}),v.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5 pl-4 text-[10px] text-muted-foreground",children:[v.jsx("span",{children:V8[c.origin]}),v.jsx("span",{children:"·"}),v.jsx("span",{children:$l(c.lastAt)}),c.tokens&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsxs("span",{children:[jn(ss(c.tokens))," tok"]})]}),c.diskBytes?v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsx("span",{title:"On disk: transcript, subagents, file snapshots and temp folder",children:sg(c.diskBytes)})]}):null]})]}),v.jsx("button",{"aria-label":"Session actions",title:"Session actions",onClick:y=>{const E=y.currentTarget.getBoundingClientRect();a({session:c,x:E.right-192,y:E.bottom+4})},className:"absolute right-1 top-1 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground md:hidden",children:v.jsx(fS,{size:14})})]},c.id)})})]},s)}var em={exports:{}},Vb;function J8(){return Vb||(Vb=1,(function(e,i){(function(r,s){e.exports=s()})(self,(()=>(()=>{var r={};return(()=>{var s=r;Object.defineProperty(s,"__esModule",{value:!0}),s.FitAddon=void 0,s.FitAddon=class{activate(l){this._terminal=l}dispose(){}fit(){const l=this.proposeDimensions();if(!l||!this._terminal||isNaN(l.cols)||isNaN(l.rows))return;const p=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(p._renderService.clear(),this._terminal.resize(l.cols,l.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const l=this._terminal._core,p=l._renderService.dimensions;if(p.css.cell.width===0||p.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:l.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(a.getPropertyValue("height")),d=Math.max(0,parseInt(a.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),c=h-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),_=d-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(_/p.css.cell.width)),rows:Math.max(1,Math.floor(c/p.css.cell.height))}}}})(),r})()))})(em)),em.exports}var e9=J8(),Qu={exports:{}},t9=Qu.exports,Wb;function n9(){return Wb||(Wb=1,(function(e,i){(function(r,s){e.exports=s()})(t9,(()=>(()=>{var r={433:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV11=void 0;const d=h(938),m=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],c=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],_=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],y=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let E;function S(g,b){let w,x=0,T=b.length-1;if(g<b[0][0]||g>b[T][1])return!1;for(;T>=x;)if(w=x+T>>1,g>b[w][1])x=w+1;else{if(!(g<b[w][0]))return!0;T=w-1}return!1}a.UnicodeV11=class{constructor(){if(this.version="11",!E){E=new Uint8Array(65536),E.fill(1),E[0]=0,E.fill(0,1,32),E.fill(0,127,160);for(let g=0;g<m.length;++g)E.fill(0,m[g][0],m[g][1]+1);for(let g=0;g<_.length;++g)E.fill(2,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?E[g]:S(g,c)?0:S(g,y)?2:1}charProperties(g,b){let w=this.wcwidth(g),x=w===0&&b!==0;if(x){const T=d.UnicodeService.extractWidth(b);T===0?x=!1:T>w&&(w=T)}return d.UnicodeService.createPropertyValue(0,w,x)}}},345:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const m=[];for(let c=0;c<this._listeners.length;c++)m.push(this._listeners[c]);for(let c=0;c<m.length;c++)m[c].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(h,d){return h((m=>d.fire(m)))},a.runAndSubscribe=function(h,d){return d(void 0),h((m=>d(m)))}},490:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const d=h(938),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let y=0;y<m.length;++y)_.fill(0,m[y][0],m[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?_[y]:(function(E,S){let g,b=0,w=S.length-1;if(E<S[0][0]||E>S[w][1])return!1;for(;w>=b;)if(g=b+w>>1,E>S[g][1])b=g+1;else{if(!(E<S[g][0]))return!0;w=g-1}return!1})(y,c)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,E){let S=this.wcwidth(y),g=S===0&&E!==0;if(g){const b=d.UnicodeService.extractWidth(E);b===0?g=!1:b>S&&(S=b)}return d.UnicodeService.createPropertyValue(0,S,g)}}},938:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const d=h(345),m=h(490);class c{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,E,S=!1){return(16777215&y)<<3|(3&E)<<1|(S?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new m.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let E=0,S=0;const g=y.length;for(let b=0;b<g;++b){let w=y.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=g)return E+this.wcwidth(w);const D=y.charCodeAt(b);56320<=D&&D<=57343?w=1024*(w-55296)+D-56320+65536:E+=this.wcwidth(D)}const x=this.charProperties(w,S);let T=c.extractWidth(x);c.extractShouldJoin(x)&&(T-=c.extractWidth(S)),E+=T,S=x}return E}charProperties(y,E){return this._activeProvider.charProperties(y,E)}}a.UnicodeService=c}},s={};function l(f){var a=s[f];if(a!==void 0)return a.exports;var h=s[f]={exports:{}};return r[f](h,h.exports,l),h.exports}var p={};return(()=>{var f=p;Object.defineProperty(f,"__esModule",{value:!0}),f.Unicode11Addon=void 0;const a=l(433);f.Unicode11Addon=class{activate(h){h.unicode.register(new a.UnicodeV11)}dispose(){}}})(),p})()))})(Qu)),Qu.exports}var i9=n9(),tm={exports:{}},Gb;function r9(){return Gb||(Gb=1,(function(e,i){(function(r,s){e.exports=s()})(self,(()=>(()=>{var r={6:(f,a)=>{function h(m){try{const c=new URL(m),_=c.password&&c.username?`${c.protocol}//${c.username}:${c.password}@${c.host}`:c.username?`${c.protocol}//${c.username}@${c.host}`:`${c.protocol}//${c.host}`;return m.toLocaleLowerCase().startsWith(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(m,c,_,y={}){this._terminal=m,this._regex=c,this._handler=_,this._options=y}provideLinks(m,c){const _=d.computeLink(m,this._regex,this._terminal,this._handler);c(this._addCallbacks(_))}_addCallbacks(m){return m.map((c=>(c.leave=this._options.leave,c.hover=(_,y)=>{if(this._options.hover){const{range:E}=c;this._options.hover(_,y,E)}},c)))}};class d{static computeLink(c,_,y,E){const S=new RegExp(_.source,(_.flags||"")+"g"),[g,b]=d._getWindowedLineStrings(c-1,y),w=g.join("");let x;const T=[];for(;x=S.exec(w);){const D=x[0];if(!h(D))continue;const[R,L]=d._mapStrIdx(y,b,0,x.index),[A,j]=d._mapStrIdx(y,R,L,D.length);if(R===-1||L===-1||A===-1||j===-1)continue;const M={start:{x:L+1,y:R+1},end:{x:j,y:A+1}};T.push({range:M,text:D,activate:E})}return T}static _getWindowedLineStrings(c,_){let y,E=c,S=c,g=0,b="";const w=[];if(y=_.buffer.active.getLine(c)){const x=y.translateToString(!0);if(y.isWrapped&&x[0]!==" "){for(g=0;(y=_.buffer.active.getLine(--E))&&g<2048&&(b=y.translateToString(!0),g+=b.length,w.push(b),y.isWrapped&&b.indexOf(" ")===-1););w.reverse()}for(w.push(x),g=0;(y=_.buffer.active.getLine(++S))&&y.isWrapped&&g<2048&&(b=y.translateToString(!0),g+=b.length,w.push(b),b.indexOf(" ")===-1););}return[w,E]}static _mapStrIdx(c,_,y,E){const S=c.buffer.active,g=S.getNullCell();let b=y;for(;E;){const w=S.getLine(_);if(!w)return[-1,-1];for(let x=b;x<w.length;++x){w.getCell(x,g);const T=g.getChars();if(g.getWidth()&&(E-=T.length||1,x===w.length-1&&T==="")){const D=S.getLine(_+1);D&&D.isWrapped&&(D.getCell(0,g),g.getWidth()===2&&(E+=1))}if(E<0)return[_,x]}_++,b=0}return[_,b]}}a.LinkComputer=d}},s={};function l(f){var a=s[f];if(a!==void 0)return a.exports;var h=s[f]={exports:{}};return r[f](h,h.exports,l),h.exports}var p={};return(()=>{var f=p;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=l(6),h=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(m,c){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(m=d,c={}){this._handler=m,this._options=c}activate(m){this._terminal=m;const c=this._options,_=c.urlRegex||h;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,_,this._handler,c))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),p})()))})(tm)),tm.exports}var s9=r9(),nm={exports:{}},Yb;function o9(){return Yb||(Yb=1,(function(e,i){(function(r,s){e.exports=s()})(self,(()=>(()=>{var r={965:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const d=h(374),m=h(509),c=h(855),_=h(859),y=h(381),E=11,S=E*Float32Array.BYTES_PER_ELEMENT;let g,b=0,w=0,x=0;class T extends _.Disposable{constructor(R,L,A,j){super(),this._terminal=R,this._gl=L,this._dimensions=A,this._optionsService=j,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const M=this._gl;m.TextureAtlas.maxAtlasPages===void 0&&(m.TextureAtlas.maxAtlasPages=Math.min(32,(0,d.throwIfFalsy)(M.getParameter(M.MAX_TEXTURE_IMAGE_UNITS))),m.TextureAtlas.maxTextureSize=(0,d.throwIfFalsy)(M.getParameter(M.MAX_TEXTURE_SIZE))),this._program=(0,d.throwIfFalsy)((0,y.createProgram)(M,`#version 300 es
|
|
528
|
-
layout (location = 0) in vec2 a_unitquad;
|
|
529
|
-
layout (location = 1) in vec2 a_cellpos;
|
|
530
|
-
layout (location = 2) in vec2 a_offset;
|
|
531
|
-
layout (location = 3) in vec2 a_size;
|
|
532
|
-
layout (location = 4) in float a_texpage;
|
|
533
|
-
layout (location = 5) in vec2 a_texcoord;
|
|
534
|
-
layout (location = 6) in vec2 a_texsize;
|
|
535
|
-
|
|
536
|
-
uniform mat4 u_projection;
|
|
537
|
-
uniform vec2 u_resolution;
|
|
538
|
-
|
|
539
|
-
out vec2 v_texcoord;
|
|
540
|
-
flat out int v_texpage;
|
|
541
|
-
|
|
542
|
-
void main() {
|
|
543
|
-
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
544
|
-
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
545
|
-
v_texpage = int(a_texpage);
|
|
546
|
-
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
547
|
-
}`,(function(Y){let Q="";for(let K=1;K<Y;K++)Q+=` else if (v_texpage == ${K}) { outColor = texture(u_texture[${K}], v_texcoord); }`;return`#version 300 es
|
|
548
|
-
precision lowp float;
|
|
549
|
-
|
|
550
|
-
in vec2 v_texcoord;
|
|
551
|
-
flat in int v_texpage;
|
|
552
|
-
|
|
553
|
-
uniform sampler2D u_texture[${Y}];
|
|
554
|
-
|
|
555
|
-
out vec4 outColor;
|
|
556
|
-
|
|
557
|
-
void main() {
|
|
558
|
-
if (v_texpage == 0) {
|
|
559
|
-
outColor = texture(u_texture[0], v_texcoord);
|
|
560
|
-
} ${Q}
|
|
561
|
-
}`})(m.TextureAtlas.maxAtlasPages))),this.register((0,_.toDisposable)((()=>M.deleteProgram(this._program)))),this._projectionLocation=(0,d.throwIfFalsy)(M.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,d.throwIfFalsy)(M.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,d.throwIfFalsy)(M.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=M.createVertexArray(),M.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),B=M.createBuffer();this.register((0,_.toDisposable)((()=>M.deleteBuffer(B)))),M.bindBuffer(M.ARRAY_BUFFER,B),M.bufferData(M.ARRAY_BUFFER,I,M.STATIC_DRAW),M.enableVertexAttribArray(0),M.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const H=new Uint8Array([0,1,2,3]),U=M.createBuffer();this.register((0,_.toDisposable)((()=>M.deleteBuffer(U)))),M.bindBuffer(M.ELEMENT_ARRAY_BUFFER,U),M.bufferData(M.ELEMENT_ARRAY_BUFFER,H,M.STATIC_DRAW),this._attributesBuffer=(0,d.throwIfFalsy)(M.createBuffer()),this.register((0,_.toDisposable)((()=>M.deleteBuffer(this._attributesBuffer)))),M.bindBuffer(M.ARRAY_BUFFER,this._attributesBuffer),M.enableVertexAttribArray(2),M.vertexAttribPointer(2,2,M.FLOAT,!1,S,0),M.vertexAttribDivisor(2,1),M.enableVertexAttribArray(3),M.vertexAttribPointer(3,2,M.FLOAT,!1,S,2*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(3,1),M.enableVertexAttribArray(4),M.vertexAttribPointer(4,1,M.FLOAT,!1,S,4*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(4,1),M.enableVertexAttribArray(5),M.vertexAttribPointer(5,2,M.FLOAT,!1,S,5*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(5,1),M.enableVertexAttribArray(6),M.vertexAttribPointer(6,2,M.FLOAT,!1,S,7*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(6,1),M.enableVertexAttribArray(1),M.vertexAttribPointer(1,2,M.FLOAT,!1,S,9*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(1,1),M.useProgram(this._program);const W=new Int32Array(m.TextureAtlas.maxAtlasPages);for(let Y=0;Y<m.TextureAtlas.maxAtlasPages;Y++)W[Y]=Y;M.uniform1iv(this._textureLocation,W),M.uniformMatrix4fv(this._projectionLocation,!1,y.PROJECTION_MATRIX),this._atlasTextures=[];for(let Y=0;Y<m.TextureAtlas.maxAtlasPages;Y++){const Q=new y.GLTexture((0,d.throwIfFalsy)(M.createTexture()));this.register((0,_.toDisposable)((()=>M.deleteTexture(Q.texture)))),M.activeTexture(M.TEXTURE0+Y),M.bindTexture(M.TEXTURE_2D,Q.texture),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,1,1,0,M.RGBA,M.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[Y]=Q}M.enable(M.BLEND),M.blendFunc(M.SRC_ALPHA,M.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(R,L,A,j,M,I,B,H,U){this._updateCell(this._vertices.attributes,R,L,A,j,M,I,B,H,U)}_updateCell(R,L,A,j,M,I,B,H,U,W){b=(A*this._terminal.cols+L)*E,j!==c.NULL_CELL_CODE&&j!==void 0?this._atlas&&(g=H&&H.length>1?this._atlas.getRasterizedGlyphCombinedChar(H,M,I,B,!1):this._atlas.getRasterizedGlyph(j,M,I,B,!1),w=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),M!==W&&g.offset.x>w?(x=g.offset.x-w,R[b]=-(g.offset.x-x)+this._dimensions.device.char.left,R[b+1]=-g.offset.y+this._dimensions.device.char.top,R[b+2]=(g.size.x-x)/this._dimensions.device.canvas.width,R[b+3]=g.size.y/this._dimensions.device.canvas.height,R[b+4]=g.texturePage,R[b+5]=g.texturePositionClipSpace.x+x/this._atlas.pages[g.texturePage].canvas.width,R[b+6]=g.texturePositionClipSpace.y,R[b+7]=g.sizeClipSpace.x-x/this._atlas.pages[g.texturePage].canvas.width,R[b+8]=g.sizeClipSpace.y):(R[b]=-g.offset.x+this._dimensions.device.char.left,R[b+1]=-g.offset.y+this._dimensions.device.char.top,R[b+2]=g.size.x/this._dimensions.device.canvas.width,R[b+3]=g.size.y/this._dimensions.device.canvas.height,R[b+4]=g.texturePage,R[b+5]=g.texturePositionClipSpace.x,R[b+6]=g.texturePositionClipSpace.y,R[b+7]=g.sizeClipSpace.x,R[b+8]=g.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,d.allowRescaling)(j,U,g.size.x,this._dimensions.device.cell.width)&&(R[b+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):R.fill(0,b,b+E-1-2)}clear(){const R=this._terminal,L=R.cols*R.rows*E;this._vertices.count!==L?this._vertices.attributes=new Float32Array(L):this._vertices.attributes.fill(0);let A=0;for(;A<this._vertices.attributesBuffers.length;A++)this._vertices.count!==L?this._vertices.attributesBuffers[A]=new Float32Array(L):this._vertices.attributesBuffers[A].fill(0);this._vertices.count=L,A=0;for(let j=0;j<R.rows;j++)for(let M=0;M<R.cols;M++)this._vertices.attributes[A+9]=M/R.cols,this._vertices.attributes[A+10]=j/R.rows,A+=E}handleResize(){const R=this._gl;R.useProgram(this._program),R.viewport(0,0,R.canvas.width,R.canvas.height),R.uniform2f(this._resolutionLocation,R.canvas.width,R.canvas.height),this.clear()}render(R){if(!this._atlas)return;const L=this._gl;L.useProgram(this._program),L.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const A=this._vertices.attributesBuffers[this._activeBuffer];let j=0;for(let M=0;M<R.lineLengths.length;M++){const I=M*this._terminal.cols*E,B=this._vertices.attributes.subarray(I,I+R.lineLengths[M]*E);A.set(B,j),j+=B.length}L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.bufferData(L.ARRAY_BUFFER,A.subarray(0,j),L.STREAM_DRAW);for(let M=0;M<this._atlas.pages.length;M++)this._atlas.pages[M].version!==this._atlasTextures[M].version&&this._bindAtlasPageTexture(L,this._atlas,M);L.drawElementsInstanced(L.TRIANGLE_STRIP,4,L.UNSIGNED_BYTE,0,j/E)}setAtlas(R){this._atlas=R;for(const L of this._atlasTextures)L.version=-1}_bindAtlasPageTexture(R,L,A){R.activeTexture(R.TEXTURE0+A),R.bindTexture(R.TEXTURE_2D,this._atlasTextures[A].texture),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),R.texImage2D(R.TEXTURE_2D,0,R.RGBA,R.RGBA,R.UNSIGNED_BYTE,L.pages[A].canvas),R.generateMipmap(R.TEXTURE_2D),this._atlasTextures[A].version=L.pages[A].version}setDimensions(R){this._dimensions=R}}a.GlyphRenderer=T},742:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const d=h(374),m=h(859),c=h(310),_=h(381),y=8*Float32Array.BYTES_PER_ELEMENT;class E{constructor(){this.attributes=new Float32Array(160),this.count=0}}let S=0,g=0,b=0,w=0,x=0,T=0,D=0;class R extends m.Disposable{constructor(A,j,M,I){super(),this._terminal=A,this._gl=j,this._dimensions=M,this._themeService=I,this._vertices=new E,this._verticesCursor=new E;const B=this._gl;this._program=(0,d.throwIfFalsy)((0,_.createProgram)(B,`#version 300 es
|
|
562
|
-
layout (location = 0) in vec2 a_position;
|
|
563
|
-
layout (location = 1) in vec2 a_size;
|
|
564
|
-
layout (location = 2) in vec4 a_color;
|
|
565
|
-
layout (location = 3) in vec2 a_unitquad;
|
|
566
|
-
|
|
567
|
-
uniform mat4 u_projection;
|
|
568
|
-
|
|
569
|
-
out vec4 v_color;
|
|
570
|
-
|
|
571
|
-
void main() {
|
|
572
|
-
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
573
|
-
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
574
|
-
v_color = a_color;
|
|
575
|
-
}`,`#version 300 es
|
|
576
|
-
precision lowp float;
|
|
577
|
-
|
|
578
|
-
in vec4 v_color;
|
|
579
|
-
|
|
580
|
-
out vec4 outColor;
|
|
581
|
-
|
|
582
|
-
void main() {
|
|
583
|
-
outColor = v_color;
|
|
584
|
-
}`)),this.register((0,m.toDisposable)((()=>B.deleteProgram(this._program)))),this._projectionLocation=(0,d.throwIfFalsy)(B.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=B.createVertexArray(),B.bindVertexArray(this._vertexArrayObject);const H=new Float32Array([0,0,1,0,0,1,1,1]),U=B.createBuffer();this.register((0,m.toDisposable)((()=>B.deleteBuffer(U)))),B.bindBuffer(B.ARRAY_BUFFER,U),B.bufferData(B.ARRAY_BUFFER,H,B.STATIC_DRAW),B.enableVertexAttribArray(3),B.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const W=new Uint8Array([0,1,2,3]),Y=B.createBuffer();this.register((0,m.toDisposable)((()=>B.deleteBuffer(Y)))),B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,Y),B.bufferData(B.ELEMENT_ARRAY_BUFFER,W,B.STATIC_DRAW),this._attributesBuffer=(0,d.throwIfFalsy)(B.createBuffer()),this.register((0,m.toDisposable)((()=>B.deleteBuffer(this._attributesBuffer)))),B.bindBuffer(B.ARRAY_BUFFER,this._attributesBuffer),B.enableVertexAttribArray(0),B.vertexAttribPointer(0,2,B.FLOAT,!1,y,0),B.vertexAttribDivisor(0,1),B.enableVertexAttribArray(1),B.vertexAttribPointer(1,2,B.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),B.vertexAttribDivisor(1,1),B.enableVertexAttribArray(2),B.vertexAttribPointer(2,4,B.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),B.vertexAttribDivisor(2,1),this._updateCachedColors(I.colors),this.register(this._themeService.onChangeColors((Q=>{this._updateCachedColors(Q),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(A){const j=this._gl;j.useProgram(this._program),j.bindVertexArray(this._vertexArrayObject),j.uniformMatrix4fv(this._projectionLocation,!1,_.PROJECTION_MATRIX),j.bindBuffer(j.ARRAY_BUFFER,this._attributesBuffer),j.bufferData(j.ARRAY_BUFFER,A.attributes,j.DYNAMIC_DRAW),j.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,j.UNSIGNED_BYTE,0,A.count)}handleResize(){this._updateViewportRectangle()}setDimensions(A){this._dimensions=A}_updateCachedColors(A){this._bgFloat=this._colorToFloat32Array(A.background),this._cursorFloat=this._colorToFloat32Array(A.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(A){const j=this._terminal,M=this._vertices;let I,B,H,U,W,Y,Q,K,z,O,G,Z=1;for(I=0;I<j.rows;I++){for(H=-1,U=0,W=0,Y=!1,B=0;B<j.cols;B++)Q=(I*j.cols+B)*c.RENDER_MODEL_INDICIES_PER_CELL,K=A.cells[Q+c.RENDER_MODEL_BG_OFFSET],z=A.cells[Q+c.RENDER_MODEL_FG_OFFSET],O=!!(67108864&z),(K!==U||z!==W&&(Y||O))&&((U!==0||Y&&W!==0)&&(G=8*Z++,this._updateRectangle(M,G,W,U,H,B,I)),H=B,U=K,W=z,Y=O);(U!==0||Y&&W!==0)&&(G=8*Z++,this._updateRectangle(M,G,W,U,H,j.cols,I))}M.count=Z}updateCursor(A){const j=this._verticesCursor,M=A.cursor;if(!M||M.style==="block")return void(j.count=0);let I,B=0;M.style!=="bar"&&M.style!=="outline"||(I=8*B++,this._addRectangleFloat(j.attributes,I,M.x*this._dimensions.device.cell.width,M.y*this._dimensions.device.cell.height,M.style==="bar"?M.dpr*M.cursorWidth:M.dpr,this._dimensions.device.cell.height,this._cursorFloat)),M.style!=="underline"&&M.style!=="outline"||(I=8*B++,this._addRectangleFloat(j.attributes,I,M.x*this._dimensions.device.cell.width,(M.y+1)*this._dimensions.device.cell.height-M.dpr,M.width*this._dimensions.device.cell.width,M.dpr,this._cursorFloat)),M.style==="outline"&&(I=8*B++,this._addRectangleFloat(j.attributes,I,M.x*this._dimensions.device.cell.width,M.y*this._dimensions.device.cell.height,M.width*this._dimensions.device.cell.width,M.dpr,this._cursorFloat),I=8*B++,this._addRectangleFloat(j.attributes,I,(M.x+M.width)*this._dimensions.device.cell.width-M.dpr,M.y*this._dimensions.device.cell.height,M.dpr,this._dimensions.device.cell.height,this._cursorFloat)),j.count=B}_updateRectangle(A,j,M,I,B,H,U){if(67108864&M)switch(50331648&M){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&M].rgba;break;case 50331648:S=(16777215&M)<<8;break;default:S=this._themeService.colors.foreground.rgba}else switch(50331648&I){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&I].rgba;break;case 50331648:S=(16777215&I)<<8;break;default:S=this._themeService.colors.background.rgba}A.attributes.length<j+4&&(A.attributes=(0,_.expandFloat32Array)(A.attributes,this._terminal.rows*this._terminal.cols*8)),g=B*this._dimensions.device.cell.width,b=U*this._dimensions.device.cell.height,w=(S>>24&255)/255,x=(S>>16&255)/255,T=(S>>8&255)/255,D=1,this._addRectangle(A.attributes,j,g,b,(H-B)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,w,x,T,D)}_addRectangle(A,j,M,I,B,H,U,W,Y,Q){A[j]=M/this._dimensions.device.canvas.width,A[j+1]=I/this._dimensions.device.canvas.height,A[j+2]=B/this._dimensions.device.canvas.width,A[j+3]=H/this._dimensions.device.canvas.height,A[j+4]=U,A[j+5]=W,A[j+6]=Y,A[j+7]=Q}_addRectangleFloat(A,j,M,I,B,H,U){A[j]=M/this._dimensions.device.canvas.width,A[j+1]=I/this._dimensions.device.canvas.height,A[j+2]=B/this._dimensions.device.canvas.width,A[j+3]=H/this._dimensions.device.canvas.height,A[j+4]=U[0],A[j+5]=U[1],A[j+6]=U[2],A[j+7]=U[3]}_colorToFloat32Array(A){return new Float32Array([(A.rgba>>24&255)/255,(A.rgba>>16&255)/255,(A.rgba>>8&255)/255,(255&A.rgba)/255])}}a.RectangleRenderer=R},310:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const d=h(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,d.createSelectionRenderModel)()}resize(m,c){const _=m*c*a.RENDER_MODEL_INDICIES_PER_CELL;_!==this.cells.length&&(this.cells=new Uint32Array(_),this.lineLengths=new Uint32Array(c))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const d=h(820),m=h(274),c=h(627),_=h(457),y=h(56),E=h(374),S=h(345),g=h(859),b=h(147),w=h(782),x=h(855),T=h(965),D=h(742),R=h(310),L=h(733);class A extends g.Disposable{constructor(B,H,U,W,Y,Q,K,z,O){super(),this._terminal=B,this._characterJoinerService=H,this._charSizeService=U,this._coreBrowserService=W,this._coreService=Y,this._decorationService=Q,this._optionsService=K,this._themeService=z,this._cursorBlinkStateManager=new g.MutableDisposable,this._charAtlasDisposable=this.register(new g.MutableDisposable),this._observerDisposable=this.register(new g.MutableDisposable),this._model=new R.RenderModel,this._workCell=new w.CellData,this._workCell2=new w.CellData,this._rectangleRenderer=this.register(new g.MutableDisposable),this._glyphRenderer=this.register(new g.MutableDisposable),this._onChangeTextureAtlas=this.register(new S.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new S.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new S.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new S.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new m.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new L.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,K,this._themeService)],this.dimensions=(0,E.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(K.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const G={antialias:!1,depth:!1,preserveDrawingBuffer:O};if(this._gl=this._canvas.getContext("webgl2",G),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,d.addDisposableDomListener)(this._canvas,"webglcontextlost",(Z=>{console.log("webglcontextlost event received"),Z.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(Z)}),3e3)}))),this.register((0,d.addDisposableDomListener)(this._canvas,"webglcontextrestored",(Z=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,c.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((Z,F)=>this._setCanvasDevicePixelDimensions(Z,F))),this.register(this._coreBrowserService.onWindowChange((Z=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,Z,((F,V)=>this._setCanvasDevicePixelDimensions(F,V)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,g.toDisposable)((()=>{var Z;for(const F of this._renderLayers)F.dispose();(Z=this._canvas.parentElement)==null||Z.removeChild(this._canvas),(0,c.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var B;return(B=this._charAtlas)==null?void 0:B.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(B,H){var U,W,Y,Q;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const K of this._renderLayers)K.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(U=this._rectangleRenderer.value)==null||U.setDimensions(this.dimensions),(W=this._rectangleRenderer.value)==null||W.handleResize(),(Y=this._glyphRenderer.value)==null||Y.setDimensions(this.dimensions),(Q=this._glyphRenderer.value)==null||Q.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var B;for(const H of this._renderLayers)H.handleBlur(this._terminal);(B=this._cursorBlinkStateManager.value)==null||B.pause(),this._requestRedrawViewport()}handleFocus(){var B;for(const H of this._renderLayers)H.handleFocus(this._terminal);(B=this._cursorBlinkStateManager.value)==null||B.resume(),this._requestRedrawViewport()}handleSelectionChanged(B,H,U){for(const W of this._renderLayers)W.handleSelectionChanged(this._terminal,B,H,U);this._model.selection.update(this._core,B,H,U),this._requestRedrawViewport()}handleCursorMove(){var B;for(const H of this._renderLayers)H.handleCursorMove(this._terminal);(B=this._cursorBlinkStateManager.value)==null||B.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new D.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new T.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var H;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const B=(0,c.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==B&&(this._onChangeTextureAtlas.fire(B.pages[0].canvas),this._charAtlasDisposable.value=(0,g.getDisposeArrayDisposable)([(0,S.forwardEvent)(B.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,S.forwardEvent)(B.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=B,this._charAtlas.warmUp(),(H=this._glyphRenderer.value)==null||H.setAtlas(this._charAtlas)}_clearModel(B){var H;this._model.clear(),B&&((H=this._glyphRenderer.value)==null||H.clear())}clearTextureAtlas(){var B;(B=this._charAtlas)==null||B.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var B;this._clearModel(!0);for(const H of this._renderLayers)H.reset(this._terminal);(B=this._cursorBlinkStateManager.value)==null||B.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(B){return-1}deregisterCharacterJoiner(B){return!1}renderRows(B,H){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const U of this._renderLayers)U.handleGridChanged(this._terminal,B,H);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(B,H),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new _.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(B,H){const U=this._core;let W,Y,Q,K,z,O,G,Z,F,V,ne,le,X,$,oe=this._workCell;B=M(B,U.rows-1,0),H=M(H,U.rows-1,0);const ee=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ue=ee-U.buffer.ydisp,he=Math.min(this._terminal.buffer.active.cursorX,U.cols-1);let Se=-1;const be=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Re=!1;for(Y=B;Y<=H;Y++)for(Q=Y+U.buffer.ydisp,K=U.buffer.lines.get(Q),this._model.lineLengths[Y]=0,z=this._characterJoinerService.getJoinedCharacters(Q),X=0;X<U.cols;X++)if(W=this._cellColorResolver.result.bg,K.loadCell(X,oe),X===0&&(W=this._cellColorResolver.result.bg),O=!1,G=X,z.length>0&&X===z[0][0]&&(O=!0,Z=z.shift(),oe=new j(oe,K.translateToString(!0,Z[0],Z[1]),Z[1]-Z[0]),G=Z[1]-1),F=oe.getChars(),V=oe.getCode(),le=(Y*U.cols+X)*R.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(oe,X,Q,this.dimensions.device.cell.width),be&&Q===ee&&(X===he&&(this._model.cursor={x:he,y:ue,width:oe.getWidth(),style:this._coreBrowserService.isFocused?U.options.cursorStyle||"block":U.options.cursorInactiveStyle,cursorWidth:U.options.cursorWidth,dpr:this._devicePixelRatio},Se=he+oe.getWidth()-1),X>=he&&X<=Se&&(this._coreBrowserService.isFocused&&(U.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&U.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),V!==x.NULL_CELL_CODE&&(this._model.lineLengths[Y]=X+1),(this._model.cells[le]!==V||this._model.cells[le+R.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[le+R.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[le+R.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Re=!0,F.length>1&&(V|=R.COMBINED_CHAR_BIT_MASK),this._model.cells[le]=V,this._model.cells[le+R.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[le+R.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[le+R.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ne=oe.getWidth(),this._glyphRenderer.value.updateCell(X,Y,V,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,F,ne,W),O))for(oe=this._workCell,X++;X<G;X++)$=(Y*U.cols+X)*R.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(X,Y,x.NULL_CELL_CODE,0,0,0,x.NULL_CELL_CHAR,0,0),this._model.cells[$]=x.NULL_CELL_CODE,this._model.cells[$+R.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[$+R.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[$+R.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Re&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(B,H){this._canvas.width===B&&this._canvas.height===H||(this._canvas.width=B,this._canvas.height=H,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const B=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:B,end:B})}}a.WebglRenderer=A;class j extends b.AttributeData{constructor(B,H,U){super(),this.content=0,this.combinedData="",this.fg=B.fg,this.bg=B.bg,this.combinedData=H,this._width=U}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(B){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function M(I,B,H=0){return Math.max(Math.min(I,B),H)}a.JoinedCellData=j},381:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const d=h(374);function m(c,_,y){const E=(0,d.throwIfFalsy)(c.createShader(_));if(c.shaderSource(E,y),c.compileShader(E),c.getShaderParameter(E,c.COMPILE_STATUS))return E;console.error(c.getShaderInfoLog(E)),c.deleteShader(E)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(c,_,y){const E=(0,d.throwIfFalsy)(c.createProgram());if(c.attachShader(E,(0,d.throwIfFalsy)(m(c,c.VERTEX_SHADER,_))),c.attachShader(E,(0,d.throwIfFalsy)(m(c,c.FRAGMENT_SHADER,y))),c.linkProgram(E),c.getProgramParameter(E,c.LINK_STATUS))return E;console.error(c.getProgramInfoLog(E)),c.deleteProgram(E)},a.createShader=m,a.expandFloat32Array=function(c,_){const y=Math.min(2*c.length,_),E=new Float32Array(y);for(let S=0;S<c.length;S++)E[S]=c[S];return E},a.GLTexture=class{constructor(c){this.texture=c,this.version=-1}}},592:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const d=h(627),m=h(237),c=h(374),_=h(859);class y extends _.Disposable{constructor(S,g,b,w,x,T,D,R){super(),this._container=g,this._alpha=x,this._coreBrowserService=T,this._optionsService=D,this._themeService=R,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${b}-layer`),this._canvas.style.zIndex=w.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((L=>{this._refreshCharAtlas(S,L),this.reset(S)}))),this.register((0,_.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,c.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(S){}handleFocus(S){}handleCursorMove(S){}handleGridChanged(S,g,b){}handleSelectionChanged(S,g,b,w=!1){}_setTransparency(S,g){if(g===this._alpha)return;const b=this._canvas;this._alpha=g,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,b),this._refreshCharAtlas(S,this._themeService.colors),this.handleGridChanged(S,0,S.rows-1)}_refreshCharAtlas(S,g){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,d.acquireTextureAtlas)(S,this._optionsService.rawOptions,g,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(S,g){this._deviceCellWidth=g.device.cell.width,this._deviceCellHeight=g.device.cell.height,this._deviceCharWidth=g.device.char.width,this._deviceCharHeight=g.device.char.height,this._deviceCharLeft=g.device.char.left,this._deviceCharTop=g.device.char.top,this._canvas.width=g.device.canvas.width,this._canvas.height=g.device.canvas.height,this._canvas.style.width=`${g.css.canvas.width}px`,this._canvas.style.height=`${g.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(S,this._themeService.colors)}_fillBottomLineAtCells(S,g,b=1){this._ctx.fillRect(S*this._deviceCellWidth,(g+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,b*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(S,g,b,w){this._alpha?this._ctx.clearRect(S*this._deviceCellWidth,g*this._deviceCellHeight,b*this._deviceCellWidth,w*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(S*this._deviceCellWidth,g*this._deviceCellHeight,b*this._deviceCellWidth,w*this._deviceCellHeight))}_fillCharTrueColor(S,g,b,w){this._ctx.font=this._getFont(S,!1,!1),this._ctx.textBaseline=m.TEXT_BASELINE,this._clipCell(b,w,g.getWidth()),this._ctx.fillText(g.getChars(),b*this._deviceCellWidth+this._deviceCharLeft,w*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(S,g,b){this._ctx.beginPath(),this._ctx.rect(S*this._deviceCellWidth,g*this._deviceCellHeight,b*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(S,g,b){return`${b?"italic":""} ${g?S.options.fontWeightBold:S.options.fontWeight} ${S.options.fontSize*this._coreBrowserService.dpr}px ${S.options.fontFamily}`}}a.BaseRenderLayer=y},733:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const d=h(197),m=h(237),c=h(592);class _ extends c.BaseRenderLayer{constructor(E,S,g,b,w,x,T){super(g,E,"link",S,!0,w,x,T),this.register(b.onShowLinkUnderline((D=>this._handleShowLinkUnderline(D)))),this.register(b.onHideLinkUnderline((D=>this._handleHideLinkUnderline(D))))}resize(E,S){super.resize(E,S),this._state=void 0}reset(E){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const E=this._state.y2-this._state.y1-1;E>0&&this._clearCells(0,this._state.y1+1,this._state.cols,E),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(E){if(E.fg===m.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:E.fg!==void 0&&(0,d.is256Color)(E.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[E.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,E.y1===E.y2)this._fillBottomLineAtCells(E.x1,E.y1,E.x2-E.x1);else{this._fillBottomLineAtCells(E.x1,E.y1,E.cols-E.x1);for(let S=E.y1+1;S<E.y2;S++)this._fillBottomLineAtCells(0,S,E.cols);this._fillBottomLineAtCells(0,E.y2,E.x2)}this._state=E}_handleHideLinkUnderline(E){this._clearCurrentLink()}}a.LinkRenderLayer=_},820:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(h,d,m,c){h.addEventListener(d,m,c);let _=!1;return{dispose:()=>{_||(_=!0,h.removeEventListener(d,m,c))}}}},274:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const d=h(855),m=h(160),c=h(374);let _,y=0,E=0,S=!1,g=!1,b=!1,w=0;a.CellColorResolver=class{constructor(x,T,D,R,L,A){this._terminal=x,this._optionService=T,this._selectionRenderModel=D,this._decorationService=R,this._coreBrowserService=L,this._themeService=A,this.result={fg:0,bg:0,ext:0}}resolve(x,T,D,R){if(this.result.bg=x.bg,this.result.fg=x.fg,this.result.ext=268435456&x.bg?x.extended.ext:0,E=0,y=0,g=!1,S=!1,b=!1,_=this._themeService.colors,w=0,x.getCode()!==d.NULL_CELL_CODE&&x.extended.underlineStyle===4){const L=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));w=T*R%(2*Math.round(L))}if(this._decorationService.forEachDecorationAtCell(T,D,"bottom",(L=>{L.backgroundColorRGB&&(E=L.backgroundColorRGB.rgba>>8&16777215,g=!0),L.foregroundColorRGB&&(y=L.foregroundColorRGB.rgba>>8&16777215,S=!0)})),b=this._selectionRenderModel.isCellSelected(this._terminal,T,D),b){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:E=(16777215&this.result.fg)<<8|255;break;default:E=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:E=(16777215&this.result.bg)<<8|255}E=m.rgba.blend(E,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else E=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(g=!0,_.selectionForeground&&(y=_.selectionForeground.rgba>>8&16777215,S=!0),(0,c.treatGlyphAsBackgroundColor)(x.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}y=m.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}S=!0}}this._decorationService.forEachDecorationAtCell(T,D,"top",(L=>{L.backgroundColorRGB&&(E=L.backgroundColorRGB.rgba>>8&16777215,g=!0),L.foregroundColorRGB&&(y=L.foregroundColorRGB.rgba>>8&16777215,S=!0)})),g&&(E=b?-16777216&x.bg&-134217729|E|50331648:-16777216&x.bg|E|50331648),S&&(y=-16777216&x.fg&-67108865|y|50331648),67108864&this.result.fg&&(g&&!S&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&_.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,S=!0),!g&&S&&(E=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&_.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,g=!0)),_=void 0,this.result.bg=g?E:this.result.bg,this.result.fg=S?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=w<<29&3758096384}}},627:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const d=h(509),m=h(197),c=[];a.acquireTextureAtlas=function(_,y,E,S,g,b,w,x){const T=(0,m.generateConfig)(S,g,b,w,y,E,x);for(let L=0;L<c.length;L++){const A=c[L],j=A.ownedBy.indexOf(_);if(j>=0){if((0,m.configEquals)(A.config,T))return A.atlas;A.ownedBy.length===1?(A.atlas.dispose(),c.splice(L,1)):A.ownedBy.splice(j,1);break}}for(let L=0;L<c.length;L++){const A=c[L];if((0,m.configEquals)(A.config,T))return A.ownedBy.push(_),A.atlas}const D=_._core,R={atlas:new d.TextureAtlas(document,T,D.unicodeService),config:T,ownedBy:[_]};return c.push(R),R.atlas},a.removeTerminalFromCache=function(_){for(let y=0;y<c.length;y++){const E=c[y].ownedBy.indexOf(_);if(E!==-1){c[y].ownedBy.length===1?(c[y].atlas.dispose(),c.splice(y,1)):c[y].ownedBy.splice(E,1);break}}}},197:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const d=h(160);a.generateConfig=function(m,c,_,y,E,S,g){const b={foreground:S.foreground,background:S.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:S.ansi.slice(),contrastCache:S.contrastCache,halfContrastCache:S.halfContrastCache};return{customGlyphs:E.customGlyphs,devicePixelRatio:g,letterSpacing:E.letterSpacing,lineHeight:E.lineHeight,deviceCellWidth:m,deviceCellHeight:c,deviceCharWidth:_,deviceCharHeight:y,fontFamily:E.fontFamily,fontSize:E.fontSize,fontWeight:E.fontWeight,fontWeightBold:E.fontWeightBold,allowTransparency:E.allowTransparency,drawBoldTextInBrightColors:E.drawBoldTextInBrightColors,minimumContrastRatio:E.minimumContrastRatio,colors:b}},a.configEquals=function(m,c){for(let _=0;_<m.colors.ansi.length;_++)if(m.colors.ansi[_].rgba!==c.colors.ansi[_].rgba)return!1;return m.devicePixelRatio===c.devicePixelRatio&&m.customGlyphs===c.customGlyphs&&m.lineHeight===c.lineHeight&&m.letterSpacing===c.letterSpacing&&m.fontFamily===c.fontFamily&&m.fontSize===c.fontSize&&m.fontWeight===c.fontWeight&&m.fontWeightBold===c.fontWeightBold&&m.allowTransparency===c.allowTransparency&&m.deviceCharWidth===c.deviceCharWidth&&m.deviceCharHeight===c.deviceCharHeight&&m.drawBoldTextInBrightColors===c.drawBoldTextInBrightColors&&m.minimumContrastRatio===c.minimumContrastRatio&&m.colors.foreground.rgba===c.colors.foreground.rgba&&m.colors.background.rgba===c.colors.background.rgba},a.is256Color=function(m){return(50331648&m)==16777216||(50331648&m)==33554432}},237:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const d=h(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(h,d){this._renderCallback=h,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(h=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)}),h)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const d=h(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const m={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(S,g)=>`M0,${.5-g} L1,${.5-g} M0,${.5+g} L1,${.5+g}`},"║":{1:(S,g)=>`M${.5-S},0 L${.5-S},1 M${.5+S},0 L${.5+S},1`},"╒":{1:(S,g)=>`M.5,1 L.5,${.5-g} L1,${.5-g} M.5,${.5+g} L1,${.5+g}`},"╓":{1:(S,g)=>`M${.5-S},1 L${.5-S},.5 L1,.5 M${.5+S},.5 L${.5+S},1`},"╔":{1:(S,g)=>`M1,${.5-g} L${.5-S},${.5-g} L${.5-S},1 M1,${.5+g} L${.5+S},${.5+g} L${.5+S},1`},"╕":{1:(S,g)=>`M0,${.5-g} L.5,${.5-g} L.5,1 M0,${.5+g} L.5,${.5+g}`},"╖":{1:(S,g)=>`M${.5+S},1 L${.5+S},.5 L0,.5 M${.5-S},.5 L${.5-S},1`},"╗":{1:(S,g)=>`M0,${.5+g} L${.5-S},${.5+g} L${.5-S},1 M0,${.5-g} L${.5+S},${.5-g} L${.5+S},1`},"╘":{1:(S,g)=>`M.5,0 L.5,${.5+g} L1,${.5+g} M.5,${.5-g} L1,${.5-g}`},"╙":{1:(S,g)=>`M1,.5 L${.5-S},.5 L${.5-S},0 M${.5+S},.5 L${.5+S},0`},"╚":{1:(S,g)=>`M1,${.5-g} L${.5+S},${.5-g} L${.5+S},0 M1,${.5+g} L${.5-S},${.5+g} L${.5-S},0`},"╛":{1:(S,g)=>`M0,${.5+g} L.5,${.5+g} L.5,0 M0,${.5-g} L.5,${.5-g}`},"╜":{1:(S,g)=>`M0,.5 L${.5+S},.5 L${.5+S},0 M${.5-S},.5 L${.5-S},0`},"╝":{1:(S,g)=>`M0,${.5-g} L${.5-S},${.5-g} L${.5-S},0 M0,${.5+g} L${.5+S},${.5+g} L${.5+S},0`},"╞":{1:(S,g)=>`M.5,0 L.5,1 M.5,${.5-g} L1,${.5-g} M.5,${.5+g} L1,${.5+g}`},"╟":{1:(S,g)=>`M${.5-S},0 L${.5-S},1 M${.5+S},0 L${.5+S},1 M${.5+S},.5 L1,.5`},"╠":{1:(S,g)=>`M${.5-S},0 L${.5-S},1 M1,${.5+g} L${.5+S},${.5+g} L${.5+S},1 M1,${.5-g} L${.5+S},${.5-g} L${.5+S},0`},"╡":{1:(S,g)=>`M.5,0 L.5,1 M0,${.5-g} L.5,${.5-g} M0,${.5+g} L.5,${.5+g}`},"╢":{1:(S,g)=>`M0,.5 L${.5-S},.5 M${.5-S},0 L${.5-S},1 M${.5+S},0 L${.5+S},1`},"╣":{1:(S,g)=>`M${.5+S},0 L${.5+S},1 M0,${.5+g} L${.5-S},${.5+g} L${.5-S},1 M0,${.5-g} L${.5-S},${.5-g} L${.5-S},0`},"╤":{1:(S,g)=>`M0,${.5-g} L1,${.5-g} M0,${.5+g} L1,${.5+g} M.5,${.5+g} L.5,1`},"╥":{1:(S,g)=>`M0,.5 L1,.5 M${.5-S},.5 L${.5-S},1 M${.5+S},.5 L${.5+S},1`},"╦":{1:(S,g)=>`M0,${.5-g} L1,${.5-g} M0,${.5+g} L${.5-S},${.5+g} L${.5-S},1 M1,${.5+g} L${.5+S},${.5+g} L${.5+S},1`},"╧":{1:(S,g)=>`M.5,0 L.5,${.5-g} M0,${.5-g} L1,${.5-g} M0,${.5+g} L1,${.5+g}`},"╨":{1:(S,g)=>`M0,.5 L1,.5 M${.5-S},.5 L${.5-S},0 M${.5+S},.5 L${.5+S},0`},"╩":{1:(S,g)=>`M0,${.5+g} L1,${.5+g} M0,${.5-g} L${.5-S},${.5-g} L${.5-S},0 M1,${.5-g} L${.5+S},${.5-g} L${.5+S},0`},"╪":{1:(S,g)=>`M.5,0 L.5,1 M0,${.5-g} L1,${.5-g} M0,${.5+g} L1,${.5+g}`},"╫":{1:(S,g)=>`M0,.5 L1,.5 M${.5-S},0 L${.5-S},1 M${.5+S},0 L${.5+S},1`},"╬":{1:(S,g)=>`M0,${.5+g} L${.5-S},${.5+g} L${.5-S},1 M1,${.5+g} L${.5+S},${.5+g} L${.5+S},1 M0,${.5-g} L${.5-S},${.5-g} L${.5-S},0 M1,${.5-g} L${.5+S},${.5-g} L${.5+S},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:(S,g)=>`M.5,1 L.5,${.5+g/.15*.5} C.5,${.5+g/.15*.5},.5,.5,1,.5`},"╮":{1:(S,g)=>`M.5,1 L.5,${.5+g/.15*.5} C.5,${.5+g/.15*.5},.5,.5,0,.5`},"╯":{1:(S,g)=>`M.5,0 L.5,${.5-g/.15*.5} C.5,${.5-g/.15*.5},.5,.5,0,.5`},"╰":{1:(S,g)=>`M.5,0 L.5,${.5-g/.15*.5} C.5,${.5-g/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(S,g,b,w,x,T,D,R){const L=a.blockElementDefinitions[g];if(L)return(function(I,B,H,U,W,Y){for(let Q=0;Q<B.length;Q++){const K=B[Q],z=W/8,O=Y/8;I.fillRect(H+K.x*z,U+K.y*O,K.w*z,K.h*O)}})(S,L,b,w,x,T),!0;const A=m[g];if(A)return(function(I,B,H,U,W,Y){let Q=c.get(B);Q||(Q=new Map,c.set(B,Q));const K=I.fillStyle;if(typeof K!="string")throw new Error(`Unexpected fillStyle type "${K}"`);let z=Q.get(K);if(!z){const O=B[0].length,G=B.length,Z=I.canvas.ownerDocument.createElement("canvas");Z.width=O,Z.height=G;const F=(0,d.throwIfFalsy)(Z.getContext("2d")),V=new ImageData(O,G);let ne,le,X,$;if(K.startsWith("#"))ne=parseInt(K.slice(1,3),16),le=parseInt(K.slice(3,5),16),X=parseInt(K.slice(5,7),16),$=K.length>7&&parseInt(K.slice(7,9),16)||1;else{if(!K.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${K}" when drawing pattern glyph`);[ne,le,X,$]=K.substring(5,K.length-1).split(",").map((oe=>parseFloat(oe)))}for(let oe=0;oe<G;oe++)for(let ee=0;ee<O;ee++)V.data[4*(oe*O+ee)]=ne,V.data[4*(oe*O+ee)+1]=le,V.data[4*(oe*O+ee)+2]=X,V.data[4*(oe*O+ee)+3]=B[oe][ee]*(255*$);F.putImageData(V,0,0),z=(0,d.throwIfFalsy)(I.createPattern(Z,null)),Q.set(K,z)}I.fillStyle=z,I.fillRect(H,U,W,Y)})(S,A,b,w,x,T),!0;const j=a.boxDrawingDefinitions[g];if(j)return(function(I,B,H,U,W,Y,Q){I.strokeStyle=I.fillStyle;for(const[K,z]of Object.entries(B)){let O;I.beginPath(),I.lineWidth=Q*Number.parseInt(K),O=typeof z=="function"?z(.15,.15/Y*W):z;for(const G of O.split(" ")){const Z=G[0],F=y[Z];if(!F){console.error(`Could not find drawing instructions for "${Z}"`);continue}const V=G.substring(1).split(",");V[0]&&V[1]&&F(I,E(V,W,Y,H,U,!0,Q))}I.stroke(),I.closePath()}})(S,j,b,w,x,T,R),!0;const M=a.powerlineDefinitions[g];return!!M&&((function(I,B,H,U,W,Y,Q,K){const z=new Path2D;z.rect(H,U,W,Y),I.clip(z),I.beginPath();const O=Q/12;I.lineWidth=K*O;for(const G of B.d.split(" ")){const Z=G[0],F=y[Z];if(!F){console.error(`Could not find drawing instructions for "${Z}"`);continue}const V=G.substring(1).split(",");V[0]&&V[1]&&F(I,E(V,W,Y,H,U,!1,K,(B.leftPadding??0)*(O/2),(B.rightPadding??0)*(O/2)))}B.type===1?(I.strokeStyle=I.fillStyle,I.stroke()):I.fill(),I.closePath()})(S,M,b,w,x,T,D,R),!0)};const c=new Map;function _(S,g,b=0){return Math.max(Math.min(S,g),b)}const y={C:(S,g)=>S.bezierCurveTo(g[0],g[1],g[2],g[3],g[4],g[5]),L:(S,g)=>S.lineTo(g[0],g[1]),M:(S,g)=>S.moveTo(g[0],g[1])};function E(S,g,b,w,x,T,D,R=0,L=0){const A=S.map((j=>parseFloat(j)||parseInt(j)));if(A.length<2)throw new Error("Too few arguments for instruction");for(let j=0;j<A.length;j+=2)A[j]*=g-R*D-L*D,T&&A[j]!==0&&(A[j]=_(Math.round(A[j]+.5)-.5,g,0)),A[j]+=w+R*D;for(let j=1;j<A.length;j+=2)A[j]*=b,T&&A[j]!==0&&(A[j]=_(Math.round(A[j]+.5)-.5,b,0)),A[j]+=x;return A}},56:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const d=h(859);a.observeDevicePixelDimensions=function(m,c,_){let y=new c.ResizeObserver((E=>{const S=E.find((w=>w.target===m));if(!S)return;if(!("devicePixelContentBoxSize"in S))return y==null||y.disconnect(),void(y=void 0);const g=S.devicePixelContentBoxSize[0].inlineSize,b=S.devicePixelContentBoxSize[0].blockSize;g>0&&b>0&&_(g,b)}));try{y.observe(m,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,d.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(f,a)=>{function h(m){return 57508<=m&&m<=57558}function d(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=h,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=d,a.allowRescaling=function(m,c,_,y){return c===1&&_>Math.ceil(1.5*y)&&m!==void 0&&m>255&&!d(m)&&!h(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return h(m)||(function(c){return 9472<=c&&c<=9631})(m)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(m,c,_=0){return(m-(2*Math.round(c)-_))%(2*Math.round(c))}},296:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,c,_,y=!1){if(this.selectionStart=c,this.selectionEnd=_,!c||!_||c[0]===_[0]&&c[1]===_[1])return void this.clear();const E=m.buffers.active.ydisp,S=c[1]-E,g=_[1]-E,b=Math.max(S,0),w=Math.min(g,m.rows-1);b>=m.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=S,this.viewportEndRow=g,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=c[0],this.endCol=_[0])}isCellSelected(m,c,_){return!!this.hasSelection&&(_-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&_>=this.viewportCappedStartRow&&c<this.endCol&&_<=this.viewportCappedEndRow:c<this.startCol&&_>=this.viewportCappedStartRow&&c>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new h}},509:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const d=h(237),m=h(860),c=h(374),_=h(160),y=h(345),E=h(485),S=h(385),g=h(147),b=h(855),w={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 x;class T{get pages(){return this._pages}constructor(j,M,I){this._document=j,this._config=M,this._unicodeService=I,this._didWarmUp=!1,this._cacheMap=new E.FourKeyMap,this._cacheMapCombined=new E.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new g.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new y.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new y.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=L(j,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,c.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const j of this.pages)j.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const j=new S.IdleTaskQueue;for(let M=33;M<126;M++)j.enqueue((()=>{if(!this._cacheMap.get(M,b.DEFAULT_COLOR,b.DEFAULT_COLOR,b.DEFAULT_EXT)){const I=this._drawToCache(M,b.DEFAULT_COLOR,b.DEFAULT_COLOR,b.DEFAULT_EXT);this._cacheMap.set(M,b.DEFAULT_COLOR,b.DEFAULT_COLOR,b.DEFAULT_EXT,I)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const j of this._pages)j.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(T.maxAtlasPages&&this._pages.length>=Math.max(4,T.maxAtlasPages)){const M=this._pages.filter((Q=>2*Q.canvas.width<=(T.maxTextureSize||4096))).sort(((Q,K)=>K.canvas.width!==Q.canvas.width?K.canvas.width-Q.canvas.width:K.percentageUsed-Q.percentageUsed));let I=-1,B=0;for(let Q=0;Q<M.length;Q++)if(M[Q].canvas.width!==B)I=Q,B=M[Q].canvas.width;else if(Q-I==3)break;const H=M.slice(I,I+4),U=H.map((Q=>Q.glyphs[0].texturePage)).sort(((Q,K)=>Q>K?1:-1)),W=this.pages.length-H.length,Y=this._mergePages(H,W);Y.version++;for(let Q=U.length-1;Q>=0;Q--)this._deletePage(U[Q]);this.pages.push(Y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(Y.canvas)}const j=new D(this._document,this._textureSize);return this._pages.push(j),this._activePages.push(j),this._onAddTextureAtlasCanvas.fire(j.canvas),j}_mergePages(j,M){const I=2*j[0].canvas.width,B=new D(this._document,I,j);for(const[H,U]of j.entries()){const W=H*U.canvas.width%I,Y=Math.floor(H/2)*U.canvas.height;B.ctx.drawImage(U.canvas,W,Y);for(const K of U.glyphs)K.texturePage=M,K.sizeClipSpace.x=K.size.x/I,K.sizeClipSpace.y=K.size.y/I,K.texturePosition.x+=W,K.texturePosition.y+=Y,K.texturePositionClipSpace.x=K.texturePosition.x/I,K.texturePositionClipSpace.y=K.texturePosition.y/I;this._onRemoveTextureAtlasCanvas.fire(U.canvas);const Q=this._activePages.indexOf(U);Q!==-1&&this._activePages.splice(Q,1)}return B}_deletePage(j){this._pages.splice(j,1);for(let M=j;M<this._pages.length;M++){const I=this._pages[M];for(const B of I.glyphs)B.texturePage--;I.version++}}getRasterizedGlyphCombinedChar(j,M,I,B,H){return this._getFromCacheMap(this._cacheMapCombined,j,M,I,B,H)}getRasterizedGlyph(j,M,I,B,H){return this._getFromCacheMap(this._cacheMap,j,M,I,B,H)}_getFromCacheMap(j,M,I,B,H,U=!1){return x=j.get(M,I,B,H),x||(x=this._drawToCache(M,I,B,H,U),j.set(M,I,B,H,x)),x}_getColorFromAnsiIndex(j){if(j>=this._config.colors.ansi.length)throw new Error("No color found for idx "+j);return this._config.colors.ansi[j]}_getBackgroundColor(j,M,I,B){if(this._config.allowTransparency)return _.NULL_COLOR;let H;switch(j){case 16777216:case 33554432:H=this._getColorFromAnsiIndex(M);break;case 50331648:const U=g.AttributeData.toColorRGB(M);H=_.channels.toColor(U[0],U[1],U[2]);break;default:H=I?_.color.opaque(this._config.colors.foreground):this._config.colors.background}return H}_getForegroundColor(j,M,I,B,H,U,W,Y,Q,K){const z=this._getMinimumContrastColor(j,M,I,B,H,U,W,Q,Y,K);if(z)return z;let O;switch(H){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&Q&&U<8&&(U+=8),O=this._getColorFromAnsiIndex(U);break;case 50331648:const G=g.AttributeData.toColorRGB(U);O=_.channels.toColor(G[0],G[1],G[2]);break;default:O=W?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(O=_.color.opaque(O)),Y&&(O=_.color.multiplyOpacity(O,d.DIM_OPACITY)),O}_resolveBackgroundRgba(j,M,I){switch(j){case 16777216:case 33554432:return this._getColorFromAnsiIndex(M).rgba;case 50331648:return M<<8;default:return I?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(j,M,I,B){switch(j){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&B&&M<8&&(M+=8),this._getColorFromAnsiIndex(M).rgba;case 50331648:return M<<8;default:return I?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(j,M,I,B,H,U,W,Y,Q,K){if(this._config.minimumContrastRatio===1||K)return;const z=this._getContrastCache(Q),O=z.getColor(j,B);if(O!==void 0)return O||void 0;const G=this._resolveBackgroundRgba(M,I,W),Z=this._resolveForegroundRgba(H,U,W,Y),F=_.rgba.ensureContrastRatio(G,Z,this._config.minimumContrastRatio/(Q?2:1));if(!F)return void z.setColor(j,B,null);const V=_.channels.toColor(F>>24&255,F>>16&255,F>>8&255);return z.setColor(j,B,V),V}_getContrastCache(j){return j?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(j,M,I,B,H=!1){const U=typeof j=="number"?String.fromCharCode(j):j,W=Math.min(this._config.deviceCellWidth*Math.max(U.length,2)+4,this._textureSize);this._tmpCanvas.width<W&&(this._tmpCanvas.width=W);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=I,this._workAttributeData.bg=M,this._workAttributeData.extended.ext=B,this._workAttributeData.isInvisible())return w;const Q=!!this._workAttributeData.isBold(),K=!!this._workAttributeData.isInverse(),z=!!this._workAttributeData.isDim(),O=!!this._workAttributeData.isItalic(),G=!!this._workAttributeData.isUnderline(),Z=!!this._workAttributeData.isStrikethrough(),F=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),ne=this._workAttributeData.getFgColorMode(),le=this._workAttributeData.getBgColor(),X=this._workAttributeData.getBgColorMode();if(K){const Te=V;V=le,le=Te;const Ve=ne;ne=X,X=Ve}const $=this._getBackgroundColor(X,le,K,z);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const oe=Q?this._config.fontWeightBold:this._config.fontWeight,ee=O?"italic":"";this._tmpCtx.font=`${ee} ${oe} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const ue=U.length===1&&(0,c.isPowerlineGlyph)(U.charCodeAt(0)),he=U.length===1&&(0,c.isRestrictedPowerlineGlyph)(U.charCodeAt(0)),Se=this._getForegroundColor(M,X,le,I,ne,V,K,z,Q,(0,c.treatGlyphAsBackgroundColor)(U.charCodeAt(0)));this._tmpCtx.fillStyle=Se.css;const be=he?0:4;let Re=!1;this._config.customGlyphs!==!1&&(Re=(0,m.tryDrawCustomChar)(this._tmpCtx,U,be,be,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,Ee=!ue;if(qe=typeof j=="number"?this._unicodeService.wcwidth(j):this._unicodeService.getStringCellWidth(j),G){this._tmpCtx.save();const Te=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ve=Te%2==1?.5:0;if(this._tmpCtx.lineWidth=Te,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ee=!1,this._tmpCtx.strokeStyle=`rgb(${g.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ee=!1;let De=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&De<8&&(De+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(De).css}this._tmpCtx.beginPath();const gt=be,rt=Math.ceil(be+this._config.deviceCharHeight)-Ve-(H?2*Te:0),fe=rt+Te,ge=rt+2*Te;let Le=this._workAttributeData.getUnderlineVariantOffset();for(let De=0;De<qe;De++){this._tmpCtx.save();const Fe=gt+De*this._config.deviceCellWidth,Me=gt+(De+1)*this._config.deviceCellWidth,Tt=Fe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Fe,rt),this._tmpCtx.lineTo(Me,rt),this._tmpCtx.moveTo(Fe,ge),this._tmpCtx.lineTo(Me,ge);break;case 3:const qt=Te<=1?ge:Math.ceil(be+this._config.deviceCharHeight-Te/2)-Ve,En=Te<=1?rt:Math.ceil(be+this._config.deviceCharHeight+Te/2)-Ve,Zn=new Path2D;Zn.rect(Fe,rt,this._config.deviceCellWidth,ge-rt),this._tmpCtx.clip(Zn),this._tmpCtx.moveTo(Fe-this._config.deviceCellWidth/2,fe),this._tmpCtx.bezierCurveTo(Fe-this._config.deviceCellWidth/2,En,Fe,En,Fe,fe),this._tmpCtx.bezierCurveTo(Fe,qt,Tt,qt,Tt,fe),this._tmpCtx.bezierCurveTo(Tt,En,Me,En,Me,fe),this._tmpCtx.bezierCurveTo(Me,qt,Me+this._config.deviceCellWidth/2,qt,Me+this._config.deviceCellWidth/2,fe);break;case 4:const Jn=Le===0?0:Le>=Te?2*Te-Le:Te-Le;Le>=Te||Jn===0?(this._tmpCtx.setLineDash([Math.round(Te),Math.round(Te)]),this._tmpCtx.moveTo(Fe+Jn,rt),this._tmpCtx.lineTo(Me,rt)):(this._tmpCtx.setLineDash([Math.round(Te),Math.round(Te)]),this._tmpCtx.moveTo(Fe,rt),this._tmpCtx.lineTo(Fe+Jn,rt),this._tmpCtx.moveTo(Fe+Jn+Te,rt),this._tmpCtx.lineTo(Me,rt)),Le=(0,c.computeNextVariantOffset)(Me-Fe,Te,Le);break;case 5:const Js=.6,Vt=.3,Wt=Me-Fe,ei=Math.floor(Js*Wt),vn=Math.floor(Vt*Wt),eo=Wt-ei-vn;this._tmpCtx.setLineDash([ei,vn,eo]),this._tmpCtx.moveTo(Fe,rt),this._tmpCtx.lineTo(Me,rt);break;default:this._tmpCtx.moveTo(Fe,rt),this._tmpCtx.lineTo(Me,rt)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Re&&this._config.fontSize>=12&&!this._config.allowTransparency&&U!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const De=this._tmpCtx.measureText(U);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in De&&De.actualBoundingBoxDescent>0){this._tmpCtx.save();const Fe=new Path2D;Fe.rect(gt,rt-Math.ceil(Te/2),this._config.deviceCellWidth*qe,ge-rt+Math.ceil(Te/2)),this._tmpCtx.clip(Fe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=$.css,this._tmpCtx.strokeText(U,be,be+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(F){const Te=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ve=Te%2==1?.5:0;this._tmpCtx.lineWidth=Te,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(be,be+Ve),this._tmpCtx.lineTo(be+this._config.deviceCharWidth*qe,be+Ve),this._tmpCtx.stroke()}if(Re||this._tmpCtx.fillText(U,be,be+this._config.deviceCharHeight),U==="_"&&!this._config.allowTransparency){let Te=R(this._tmpCtx.getImageData(be,be,this._config.deviceCellWidth,this._config.deviceCellHeight),$,Se,Ee);if(Te)for(let Ve=1;Ve<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(U,be,be+this._config.deviceCharHeight-Ve),Te=R(this._tmpCtx.getImageData(be,be,this._config.deviceCellWidth,this._config.deviceCellHeight),$,Se,Ee),Te);Ve++);}if(Z){const Te=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ve=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Te,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(be,be+Math.floor(this._config.deviceCharHeight/2)-Ve),this._tmpCtx.lineTo(be+this._config.deviceCharWidth*qe,be+Math.floor(this._config.deviceCharHeight/2)-Ve),this._tmpCtx.stroke()}this._tmpCtx.restore();const ze=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Mt;if(Mt=this._config.allowTransparency?(function(Te){for(let Ve=0;Ve<Te.data.length;Ve+=4)if(Te.data[Ve+3]>0)return!1;return!0})(ze):R(ze,$,Se,Ee),Mt)return w;const $e=this._findGlyphBoundingBox(ze,this._workBoundingBox,W,he,Re,be);let Be,Ie;for(;;){if(this._activePages.length===0){const Te=this._createNewPage();Be=Te,Ie=Te.currentRow,Ie.height=$e.size.y;break}Be=this._activePages[this._activePages.length-1],Ie=Be.currentRow;for(const Te of this._activePages)$e.size.y<=Te.currentRow.height&&(Be=Te,Ie=Te.currentRow);for(let Te=this._activePages.length-1;Te>=0;Te--)for(const Ve of this._activePages[Te].fixedRows)Ve.height<=Ie.height&&$e.size.y<=Ve.height&&(Be=this._activePages[Te],Ie=Ve);if(Ie.y+$e.size.y>=Be.canvas.height||Ie.height>$e.size.y+2){let Te=!1;if(Be.currentRow.y+Be.currentRow.height+$e.size.y>=Be.canvas.height){let Ve;for(const gt of this._activePages)if(gt.currentRow.y+gt.currentRow.height+$e.size.y<gt.canvas.height){Ve=gt;break}if(Ve)Be=Ve;else if(T.maxAtlasPages&&this._pages.length>=T.maxAtlasPages&&Ie.y+$e.size.y<=Be.canvas.height&&Ie.height>=$e.size.y&&Ie.x+$e.size.x<=Be.canvas.width)Te=!0;else{const gt=this._createNewPage();Be=gt,Ie=gt.currentRow,Ie.height=$e.size.y,Te=!0}}Te||(Be.currentRow.height>0&&Be.fixedRows.push(Be.currentRow),Ie={x:0,y:Be.currentRow.y+Be.currentRow.height,height:$e.size.y},Be.fixedRows.push(Ie),Be.currentRow={x:0,y:Ie.y+Ie.height,height:0})}if(Ie.x+$e.size.x<=Be.canvas.width)break;Ie===Be.currentRow?(Ie.x=0,Ie.y+=Ie.height,Ie.height=0):Be.fixedRows.splice(Be.fixedRows.indexOf(Ie),1)}return $e.texturePage=this._pages.indexOf(Be),$e.texturePosition.x=Ie.x,$e.texturePosition.y=Ie.y,$e.texturePositionClipSpace.x=Ie.x/Be.canvas.width,$e.texturePositionClipSpace.y=Ie.y/Be.canvas.height,$e.sizeClipSpace.x/=Be.canvas.width,$e.sizeClipSpace.y/=Be.canvas.height,Ie.height=Math.max(Ie.height,$e.size.y),Ie.x+=$e.size.x,Be.ctx.putImageData(ze,$e.texturePosition.x-this._workBoundingBox.left,$e.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,$e.size.x,$e.size.y),Be.addGlyph($e),Be.version++,$e}_findGlyphBoundingBox(j,M,I,B,H,U){M.top=0;const W=B?this._config.deviceCellHeight:this._tmpCanvas.height,Y=B?this._config.deviceCellWidth:I;let Q=!1;for(let K=0;K<W;K++){for(let z=0;z<Y;z++){const O=K*this._tmpCanvas.width*4+4*z+3;if(j.data[O]!==0){M.top=K,Q=!0;break}}if(Q)break}M.left=0,Q=!1;for(let K=0;K<U+Y;K++){for(let z=0;z<W;z++){const O=z*this._tmpCanvas.width*4+4*K+3;if(j.data[O]!==0){M.left=K,Q=!0;break}}if(Q)break}M.right=Y,Q=!1;for(let K=U+Y-1;K>=U;K--){for(let z=0;z<W;z++){const O=z*this._tmpCanvas.width*4+4*K+3;if(j.data[O]!==0){M.right=K,Q=!0;break}}if(Q)break}M.bottom=W,Q=!1;for(let K=W-1;K>=0;K--){for(let z=0;z<Y;z++){const O=K*this._tmpCanvas.width*4+4*z+3;if(j.data[O]!==0){M.bottom=K,Q=!0;break}}if(Q)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:M.right-M.left+1,y:M.bottom-M.top+1},sizeClipSpace:{x:M.right-M.left+1,y:M.bottom-M.top+1},offset:{x:-M.left+U+(B||H?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-M.top+U+(B||H?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=T;class D{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(j){this._glyphs.push(j),this._usedPixels+=j.size.x*j.size.y}constructor(j,M,I){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],I)for(const B of I)this._glyphs.push(...B.glyphs),this._usedPixels+=B._usedPixels;this.canvas=L(j,M,M),this.ctx=(0,c.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 R(A,j,M,I){const B=j.rgba>>>24,H=j.rgba>>>16&255,U=j.rgba>>>8&255,W=M.rgba>>>24,Y=M.rgba>>>16&255,Q=M.rgba>>>8&255,K=Math.floor((Math.abs(B-W)+Math.abs(H-Y)+Math.abs(U-Q))/12);let z=!0;for(let O=0;O<A.data.length;O+=4)A.data[O]===B&&A.data[O+1]===H&&A.data[O+2]===U||I&&Math.abs(A.data[O]-B)+Math.abs(A.data[O+1]-H)+Math.abs(A.data[O+2]-U)<K?A.data[O+3]=0:z=!1;return z}function L(A,j,M){const I=A.createElement("canvas");return I.width=j,I.height=M,I}},160:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let h=0,d=0,m=0,c=0;var _,y,E,S,g;function b(x){const T=x.toString(16);return T.length<2?"0"+T:T}function w(x,T){return x<T?(T+.05)/(x+.05):(x+.05)/(T+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(x){x.toCss=function(T,D,R,L){return L!==void 0?`#${b(T)}${b(D)}${b(R)}${b(L)}`:`#${b(T)}${b(D)}${b(R)}`},x.toRgba=function(T,D,R,L=255){return(T<<24|D<<16|R<<8|L)>>>0},x.toColor=function(T,D,R,L){return{css:x.toCss(T,D,R,L),rgba:x.toRgba(T,D,R,L)}}})(_||(a.channels=_={})),(function(x){function T(D,R){return c=Math.round(255*R),[h,d,m]=g.toChannels(D.rgba),{css:_.toCss(h,d,m,c),rgba:_.toRgba(h,d,m,c)}}x.blend=function(D,R){if(c=(255&R.rgba)/255,c===1)return{css:R.css,rgba:R.rgba};const L=R.rgba>>24&255,A=R.rgba>>16&255,j=R.rgba>>8&255,M=D.rgba>>24&255,I=D.rgba>>16&255,B=D.rgba>>8&255;return h=M+Math.round((L-M)*c),d=I+Math.round((A-I)*c),m=B+Math.round((j-B)*c),{css:_.toCss(h,d,m),rgba:_.toRgba(h,d,m)}},x.isOpaque=function(D){return(255&D.rgba)==255},x.ensureContrastRatio=function(D,R,L){const A=g.ensureContrastRatio(D.rgba,R.rgba,L);if(A)return _.toColor(A>>24&255,A>>16&255,A>>8&255)},x.opaque=function(D){const R=(255|D.rgba)>>>0;return[h,d,m]=g.toChannels(R),{css:_.toCss(h,d,m),rgba:R}},x.opacity=T,x.multiplyOpacity=function(D,R){return c=255&D.rgba,T(D,c*R/255)},x.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(y||(a.color=y={})),(function(x){let T,D;try{const R=document.createElement("canvas");R.width=1,R.height=1;const L=R.getContext("2d",{willReadFrequently:!0});L&&(T=L,T.globalCompositeOperation="copy",D=T.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(R){if(R.match(/#[\da-f]{3,8}/i))switch(R.length){case 4:return h=parseInt(R.slice(1,2).repeat(2),16),d=parseInt(R.slice(2,3).repeat(2),16),m=parseInt(R.slice(3,4).repeat(2),16),_.toColor(h,d,m);case 5:return h=parseInt(R.slice(1,2).repeat(2),16),d=parseInt(R.slice(2,3).repeat(2),16),m=parseInt(R.slice(3,4).repeat(2),16),c=parseInt(R.slice(4,5).repeat(2),16),_.toColor(h,d,m,c);case 7:return{css:R,rgba:(parseInt(R.slice(1),16)<<8|255)>>>0};case 9:return{css:R,rgba:parseInt(R.slice(1),16)>>>0}}const L=R.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(L)return h=parseInt(L[1]),d=parseInt(L[2]),m=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),_.toColor(h,d,m,c);if(!T||!D)throw new Error("css.toColor: Unsupported css format");if(T.fillStyle=D,T.fillStyle=R,typeof T.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(T.fillRect(0,0,1,1),[h,d,m,c]=T.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(h,d,m,c),css:R}}})(E||(a.css=E={})),(function(x){function T(D,R,L){const A=D/255,j=R/255,M=L/255;return .2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}x.relativeLuminance=function(D){return T(D>>16&255,D>>8&255,255&D)},x.relativeLuminance2=T})(S||(a.rgb=S={})),(function(x){function T(R,L,A){const j=R>>24&255,M=R>>16&255,I=R>>8&255;let B=L>>24&255,H=L>>16&255,U=L>>8&255,W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));for(;W<A&&(B>0||H>0||U>0);)B-=Math.max(0,Math.ceil(.1*B)),H-=Math.max(0,Math.ceil(.1*H)),U-=Math.max(0,Math.ceil(.1*U)),W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));return(B<<24|H<<16|U<<8|255)>>>0}function D(R,L,A){const j=R>>24&255,M=R>>16&255,I=R>>8&255;let B=L>>24&255,H=L>>16&255,U=L>>8&255,W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));for(;W<A&&(B<255||H<255||U<255);)B=Math.min(255,B+Math.ceil(.1*(255-B))),H=Math.min(255,H+Math.ceil(.1*(255-H))),U=Math.min(255,U+Math.ceil(.1*(255-U))),W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));return(B<<24|H<<16|U<<8|255)>>>0}x.blend=function(R,L){if(c=(255&L)/255,c===1)return L;const A=L>>24&255,j=L>>16&255,M=L>>8&255,I=R>>24&255,B=R>>16&255,H=R>>8&255;return h=I+Math.round((A-I)*c),d=B+Math.round((j-B)*c),m=H+Math.round((M-H)*c),_.toRgba(h,d,m)},x.ensureContrastRatio=function(R,L,A){const j=S.relativeLuminance(R>>8),M=S.relativeLuminance(L>>8);if(w(j,M)<A){if(M<j){const H=T(R,L,A),U=w(j,S.relativeLuminance(H>>8));if(U<A){const W=D(R,L,A);return U>w(j,S.relativeLuminance(W>>8))?H:W}return H}const I=D(R,L,A),B=w(j,S.relativeLuminance(I>>8));if(B<A){const H=T(R,L,A);return B>w(j,S.relativeLuminance(H>>8))?I:H}return I}},x.reduceLuminance=T,x.increaseLuminance=D,x.toChannels=function(R){return[R>>24&255,R>>16&255,R>>8&255,255&R]}})(g||(a.rgba=g={})),a.toPaddedHex=b,a.contrastRatio=w},345:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const m=[];for(let c=0;c<this._listeners.length;c++)m.push(this._listeners[c]);for(let c=0;c<m.length;c++)m[c].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(h,d){return h((m=>d.fire(m)))},a.runAndSubscribe=function(h,d){return d(void 0),h((m=>d(m)))}},859:(f,a)=>{function h(d){for(const m of d)m.dispose();d.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var m;this._isDisposed||d===this._value||((m=this._value)==null||m.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}},a.toDisposable=function(d){return{dispose:d}},a.disposeArray=h,a.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},485:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(m,c,_){this._data[m]||(this._data[m]={}),this._data[m][c]=_}get(m,c){return this._data[m]?this._data[m][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=h,a.FourKeyMap=class{constructor(){this._data=new h}set(d,m,c,_,y){this._data.get(d,m)||this._data.set(d,m,new h),this._data.get(d,m).set(c,_,y)}get(d,m,c,_){var y;return(y=this._data.get(d,m))==null?void 0:y.get(c,_)}clear(){this._data.clear()}}},399:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const h=a.isNode?"node":navigator.userAgent,d=a.isNode?"node":navigator.platform;a.isFirefox=h.includes("Firefox"),a.isLegacyEdge=h.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(h),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=h.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),a.isIpad=d==="iPad",a.isIphone=d==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),a.isLinux=d.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(h)},385:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const d=h(399);class m{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let E=0,S=0,g=y.timeRemaining(),b=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),S=Math.max(E,S),b=y.timeRemaining(),1.5*S>b)return g-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(g-E))}ms`),void this._start();g=b}this.clear()}}class c extends m{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const E=Date.now()+y;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=c,a.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},147:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new h;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,_=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=_}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=d},782:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const d=h(133),m=h(855),c=h(147);class _ extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const S=new _;return S.setFromCharData(E),S}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(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const g=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=g&&g<=56319){const b=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(g-55296)+b-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},855:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},a.utf32ToString=function(h,d=0,m=h.length){let c="";for(let _=d;_<m;++_){let y=h[_];y>65535?(y-=65536,c+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):c+=String.fromCharCode(y)}return c},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const m=h.length;if(!m)return 0;let c=0,_=0;if(this._interim){const y=h.charCodeAt(_++);56320<=y&&y<=57343?d[c++]=1024*(this._interim-55296)+y-56320+65536:(d[c++]=this._interim,d[c++]=y),this._interim=0}for(let y=_;y<m;++y){const E=h.charCodeAt(y);if(55296<=E&&E<=56319){if(++y>=m)return this._interim=E,c;const S=h.charCodeAt(y);56320<=S&&S<=57343?d[c++]=1024*(E-55296)+S-56320+65536:(d[c++]=E,d[c++]=S)}else E!==65279&&(d[c++]=E)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const m=h.length;if(!m)return 0;let c,_,y,E,S=0,g=0,b=0;if(this.interim[0]){let T=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let R,L=0;for(;(R=63&this.interim[++L])&&L<4;)D<<=6,D|=R;const A=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,j=A-L;for(;b<j;){if(b>=m)return 0;if(R=h[b++],(192&R)!=128){b--,T=!0;break}this.interim[L++]=R,D<<=6,D|=63&R}T||(A===2?D<128?b--:d[S++]=D:A===3?D<2048||D>=55296&&D<=57343||D===65279||(d[S++]=D):D<65536||D>1114111||(d[S++]=D)),this.interim.fill(0)}const w=m-4;let x=b;for(;x<m;){for(;!(!(x<w)||128&(c=h[x])||128&(_=h[x+1])||128&(y=h[x+2])||128&(E=h[x+3]));)d[S++]=c,d[S++]=_,d[S++]=y,d[S++]=E,x+=4;if(c=h[x++],c<128)d[S++]=c;else if((224&c)==192){if(x>=m)return this.interim[0]=c,S;if(_=h[x++],(192&_)!=128){x--;continue}if(g=(31&c)<<6|63&_,g<128){x--;continue}d[S++]=g}else if((240&c)==224){if(x>=m)return this.interim[0]=c,S;if(_=h[x++],(192&_)!=128){x--;continue}if(x>=m)return this.interim[0]=c,this.interim[1]=_,S;if(y=h[x++],(192&y)!=128){x--;continue}if(g=(15&c)<<12|(63&_)<<6|63&y,g<2048||g>=55296&&g<=57343||g===65279)continue;d[S++]=g}else if((248&c)==240){if(x>=m)return this.interim[0]=c,S;if(_=h[x++],(192&_)!=128){x--;continue}if(x>=m)return this.interim[0]=c,this.interim[1]=_,S;if(y=h[x++],(192&y)!=128){x--;continue}if(x>=m)return this.interim[0]=c,this.interim[1]=_,this.interim[2]=y,S;if(E=h[x++],(192&E)!=128){x--;continue}if(g=(7&c)<<18|(63&_)<<12|(63&y)<<6|63&E,g<65536||g>1114111)continue;d[S++]=g}}return S}}},776:function(f,a,h){var d=this&&this.__decorate||function(g,b,w,x){var T,D=arguments.length,R=D<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(g,b,w,x);else for(var L=g.length-1;L>=0;L--)(T=g[L])&&(R=(D<3?T(R):D>3?T(b,w,R):T(b,w))||R);return D>3&&R&&Object.defineProperty(b,w,R),R},m=this&&this.__param||function(g,b){return function(w,x){b(w,x,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=h(859),_=h(97),y={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,S=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(g){super(),this._optionsService=g,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(g){for(let b=0;b<g.length;b++)typeof g[b]=="function"&&(g[b]=g[b]())}_log(g,b,w){this._evalLazyOptionalParams(w),g.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,...w)}trace(g,...b){var w;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.trace.bind(this._optionsService.options.logger))??console.log,g,b)}debug(g,...b){var w;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.debug.bind(this._optionsService.options.logger))??console.log,g,b)}info(g,...b){var w;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.info.bind(this._optionsService.options.logger))??console.info,g,b)}warn(g,...b){var w;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.warn.bind(this._optionsService.options.logger))??console.warn,g,b)}error(g,...b){var w;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.error.bind(this._optionsService.options.logger))??console.error,g,b)}};a.LogService=S=d([m(0,_.IOptionsService)],S),a.setTraceLogger=function(g){E=g},a.traceCall=function(g,b,w){if(typeof w.value!="function")throw new Error("not supported");const x=w.value;w.value=function(...T){if(E.logLevel!==_.LogLevelEnum.TRACE)return x.apply(this,T);E.trace(`GlyphRenderer#${x.name}(${T.map((R=>JSON.stringify(R))).join(", ")})`);const D=x.apply(this,T);return E.trace(`GlyphRenderer#${x.name} return`,D),D}}},726:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const h="di$target",d="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[d]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const c=function(_,y,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,g,b){g[h]===g?g[d].push({id:S,index:b}):(g[d]=[{id:S,index:b}],g[h]=g)})(c,_,E)};return c.toString=()=>m,a.serviceRegistry.set(m,c),c}},97:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const d=h(726);var m;a.IBufferService=(0,d.createDecorator)("BufferService"),a.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),a.ICoreService=(0,d.createDecorator)("CoreService"),a.ICharsetService=(0,d.createDecorator)("CharsetService"),a.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(m||(a.LogLevelEnum=m={})),a.ILogService=(0,d.createDecorator)("LogService"),a.IOptionsService=(0,d.createDecorator)("OptionsService"),a.IOscLinkService=(0,d.createDecorator)("OscLinkService"),a.IUnicodeService=(0,d.createDecorator)("UnicodeService"),a.IDecorationService=(0,d.createDecorator)("DecorationService")}},s={};function l(f){var a=s[f];if(a!==void 0)return a.exports;var h=s[f]={exports:{}};return r[f].call(h.exports,h,h.exports,l),h.exports}var p={};return(()=>{var f=p;Object.defineProperty(f,"__esModule",{value:!0}),f.WebglAddon=void 0;const a=l(345),h=l(859),d=l(399),m=l(666),c=l(776);class _ extends h.Disposable{constructor(E){if(d.isSafari&&(0,d.getSafariVersion)()<16){const S={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",S))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=E,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(E){const S=E._core;if(!E.element)return void this.register(S.onWillOpen((()=>this.activate(E))));this._terminal=E;const g=S.coreService,b=S.optionsService,w=S,x=w._renderService,T=w._characterJoinerService,D=w._charSizeService,R=w._coreBrowserService,L=w._decorationService,A=w._logService,j=w._themeService;(0,c.setTraceLogger)(A),this._renderer=this.register(new m.WebglRenderer(E,T,D,R,g,L,b,j,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),x.setRenderer(this._renderer),this.register((0,h.toDisposable)((()=>{const M=this._terminal._core._renderService;M.setRenderer(this._terminal._core._createRenderer()),M.handleResize(E.cols,E.rows)})))}get textureAtlas(){var E;return(E=this._renderer)==null?void 0:E.textureAtlas}clearTextureAtlas(){var E;(E=this._renderer)==null||E.clearTextureAtlas()}}f.WebglAddon=_})(),p})()))})(nm)),nm.exports}var a9=o9(),im={exports:{}},Xb;function l9(){return Xb||(Xb=1,(function(e,i){(function(r,s){e.exports=s()})(globalThis,(()=>(()=>{var r={4567:function(f,a,h){var d=this&&this.__decorate||function(w,x,T,D){var R,L=arguments.length,A=L<3?x:D===null?D=Object.getOwnPropertyDescriptor(x,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,x,T,D);else for(var j=w.length-1;j>=0;j--)(R=w[j])&&(A=(L<3?R(A):L>3?R(x,T,A):R(x,T))||A);return L>3&&A&&Object.defineProperty(x,T,A),A},m=this&&this.__param||function(w,x){return function(T,D){x(T,D,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const c=h(9042),_=h(9924),y=h(844),E=h(4725),S=h(2585),g=h(3656);let b=a.AccessibilityManager=class extends y.Disposable{constructor(w,x,T,D){super(),this._terminal=w,this._coreBrowserService=T,this._renderService=D,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 R=0;R<this._terminal.rows;R++)this._rowElements[R]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[R]);if(this._topBoundaryFocusListener=R=>this._handleBoundaryFocus(R,0),this._bottomBoundaryFocusListener=R=>this._handleBoundaryFocus(R,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new _.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((R=>this._handleResize(R.rows)))),this.register(this._terminal.onRender((R=>this._refreshRows(R.start,R.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((R=>this._handleChar(R)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
585
|
-
`)))),this.register(this._terminal.onA11yTab((R=>this._handleTab(R)))),this.register(this._terminal.onKey((R=>this._handleKey(R.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,g.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(w){for(let x=0;x<w;x++)this._handleChar(" ")}_handleChar(w){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===`
|
|
586
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,x){this._liveRegionDebouncer.refresh(w,x,this._terminal.rows)}_renderRows(w,x){const T=this._terminal.buffer,D=T.lines.length.toString();for(let R=w;R<=x;R++){const L=T.lines.get(T.ydisp+R),A=[],j=(L==null?void 0:L.translateToString(!0,void 0,void 0,A))||"",M=(T.ydisp+R+1).toString(),I=this._rowElements[R];I&&(j.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=j,this._rowColumns.set(I,A)),I.setAttribute("aria-posinset",M),I.setAttribute("aria-setsize",D))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,x){const T=w.target,D=this._rowElements[x===0?1:this._rowElements.length-2];if(T.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==D)return;let R,L;if(x===0?(R=T,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(R=this._rowElements.shift(),L=T,this._rowContainer.removeChild(R)),R.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const A=this._createAccessibilityTreeNode();this._rowElements.unshift(A),this._rowContainer.insertAdjacentElement("afterbegin",A)}else{const A=this._createAccessibilityTreeNode();this._rowElements.push(A),this._rowContainer.appendChild(A)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){var j;if(this._rowElements.length===0)return;const w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:w.anchorNode,offset:w.anchorOffset},T={node:w.focusNode,offset:w.focusOffset};if((x.node.compareDocumentPosition(T.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===T.node&&x.offset>T.offset)&&([x,T]=[T,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.node))return;const D=this._rowElements.slice(-1)[0];if(T.node.compareDocumentPosition(D)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(T={node:D,offset:((j=D.textContent)==null?void 0:j.length)??0}),!this._rowContainer.contains(T.node))return;const R=({node:M,offset:I})=>{const B=M instanceof Text?M.parentNode:M;let H=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(H))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(B);if(!U)return console.warn("columns is null. Race condition?"),null;let W=I<U.length?U[I]:U.slice(-1)[0]+1;return W>=this._terminal.cols&&(++H,W=0),{row:H,column:W}},L=R(x),A=R(T);if(L&&A){if(L.row>A.row||L.row===A.row&&L.column>=A.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(A.row-L.row)*this._terminal.cols-L.column+A.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);for(;this._rowElements.length>w;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_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 w=0;w<this._terminal.rows;w++)this._refreshRowDimensions(this._rowElements[w])}}_refreshRowDimensions(w){w.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=b=d([m(1,S.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],b)},3614:(f,a)=>{function h(_){return _.replace(/\r?\n/g,"\r")}function d(_,y){return y?"\x1B[200~"+_+"\x1B[201~":_}function m(_,y,E,S){_=d(_=h(_),E.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(_,!0),y.value=""}function c(_,y,E){const S=E.getBoundingClientRect(),g=_.clientX-S.left-10,b=_.clientY-S.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${g}px`,y.style.top=`${b}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=h,a.bracketTextForPaste=d,a.copyHandler=function(_,y){_.clipboardData&&_.clipboardData.setData("text/plain",y.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,y,E,S){_.stopPropagation(),_.clipboardData&&m(_.clipboardData.getData("text/plain"),y,E,S)},a.paste=m,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(_,y,E,S,g){c(_,y,E),g&&S.rightClickSelect(_),y.value=S.selectionText,y.select()}},7239:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const d=h(1505);a.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(m,c,_){this._css.set(m,c,_)}getCss(m,c){return this._css.get(m,c)}setColor(m,c,_){this._color.set(m,c,_)}getColor(m,c){return this._color.get(m,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(h,d,m,c){h.addEventListener(d,m,c);let _=!1;return{dispose:()=>{_||(_=!0,h.removeEventListener(d,m,c))}}}},3551:function(f,a,h){var d=this&&this.__decorate||function(b,w,x,T){var D,R=arguments.length,L=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,x):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(b,w,x,T);else for(var A=b.length-1;A>=0;A--)(D=b[A])&&(L=(R<3?D(L):R>3?D(w,x,L):D(w,x))||L);return R>3&&L&&Object.defineProperty(w,x,L),L},m=this&&this.__param||function(b,w){return function(x,T){w(x,T,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=h(3656),_=h(8460),y=h(844),E=h(2585),S=h(4725);let g=a.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(b,w,x,T,D){super(),this._element=b,this._mouseService=w,this._renderService=x,this._bufferService=T,this._linkProviderService=D,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var R;this._lastMouseEvent=void 0,(R=this._activeProviderReplies)==null||R.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(b){this._lastMouseEvent=b;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;const x=b.composedPath();for(let T=0;T<x.length;T++){const D=x[T];if(D.classList.contains("xterm"))break;if(D.classList.contains("xterm-hover"))return}this._lastBufferCell&&w.x===this._lastBufferCell.x&&w.y===this._lastBufferCell.y||(this._handleHover(w),this._lastBufferCell=w)}_handleHover(b){if(this._activeLine!==b.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(b,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,b)||(this._clearCurrentLink(),this._askForLink(b,!0))}_askForLink(b,w){var T,D;this._activeProviderReplies&&w||((T=this._activeProviderReplies)==null||T.forEach((R=>{R==null||R.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[R,L]of this._linkProviderService.linkProviders.entries())w?(D=this._activeProviderReplies)!=null&&D.get(R)&&(x=this._checkLinkProviderResult(R,b,x)):L.provideLinks(b.y,(A=>{var M,I;if(this._isMouseOut)return;const j=A==null?void 0:A.map((B=>({link:B})));(M=this._activeProviderReplies)==null||M.set(R,j),x=this._checkLinkProviderResult(R,b,x),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,w){const x=new Set;for(let T=0;T<w.size;T++){const D=w.get(T);if(D)for(let R=0;R<D.length;R++){const L=D[R],A=L.link.range.start.y<b?0:L.link.range.start.x,j=L.link.range.end.y>b?this._bufferService.cols:L.link.range.end.x;for(let M=A;M<=j;M++){if(x.has(M)){D.splice(R--,1);break}x.add(M)}}}}_checkLinkProviderResult(b,w,x){var R;if(!this._activeProviderReplies)return x;const T=this._activeProviderReplies.get(b);let D=!1;for(let L=0;L<b;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(D=!0);if(!D&&T){const L=T.find((A=>this._linkAtPosition(A.link,w)));L&&(x=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let L=0;L<this._activeProviderReplies.size;L++){const A=(R=this._activeProviderReplies.get(L))==null?void 0:R.find((j=>this._linkAtPosition(j.link,w)));if(A){x=!0,this._handleNewLink(A);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,w){this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(b.link,w)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,T;return(T=(x=this._currentLink)==null?void 0:x.state)==null?void 0:T.decorations.pointerCursor},set:x=>{var T;(T=this._currentLink)!=null&&T.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,T;return(T=(x=this._currentLink)==null?void 0:x.state)==null?void 0:T.decorations.underline},set:x=>{var T,D,R;(T=this._currentLink)!=null&&T.state&&((R=(D=this._currentLink)==null?void 0:D.state)==null?void 0:R.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const T=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,D=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=T&&this._currentLink.link.range.end.y<=D&&(this._clearCurrentLink(T,D),this._lastMouseEvent)){const R=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);R&&this._askForLink(R,!1)}}))))}_linkHover(b,w,x){var T;(T=this._currentLink)!=null&&T.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(x,w.text)}_fireUnderlineEvent(b,w){const x=b.range,T=this._bufferService.buffer.ydisp,D=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-T-1,x.end.x,x.end.y-T-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(D)}_linkLeave(b,w,x){var T;(T=this._currentLink)!=null&&T.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(x,w.text)}_linkAtPosition(b,w){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,T=b.range.end.y*this._bufferService.cols+b.range.end.x,D=w.y*this._bufferService.cols+w.x;return x<=D&&D<=T}_positionFromMouseEvent(b,w,x){const T=x.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(T)return{x:T[0],y:T[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,w,x,T,D){return{x1:b,y1:w,x2:x,y2:T,cols:this._bufferService.cols,fg:D}}};a.Linkifier=g=d([m(1,S.IMouseService),m(2,S.IRenderService),m(3,E.IBufferService),m(4,S.ILinkProviderService)],g)},9042:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,a,h){var d=this&&this.__decorate||function(S,g,b,w){var x,T=arguments.length,D=T<3?g:w===null?w=Object.getOwnPropertyDescriptor(g,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,g,b,w);else for(var R=S.length-1;R>=0;R--)(x=S[R])&&(D=(T<3?x(D):T>3?x(g,b,D):x(g,b))||D);return T>3&&D&&Object.defineProperty(g,b,D),D},m=this&&this.__param||function(S,g){return function(b,w){g(b,w,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=h(511),_=h(2585);let y=a.OscLinkProvider=class{constructor(S,g,b){this._bufferService=S,this._optionsService=g,this._oscLinkService=b}provideLinks(S,g){var j;const b=this._bufferService.buffer.lines.get(S-1);if(!b)return void g(void 0);const w=[],x=this._optionsService.rawOptions.linkHandler,T=new c.CellData,D=b.getTrimmedLength();let R=-1,L=-1,A=!1;for(let M=0;M<D;M++)if(L!==-1||b.hasContent(M)){if(b.loadCell(M,T),T.hasExtendedAttrs()&&T.extended.urlId){if(L===-1){L=M,R=T.extended.urlId;continue}A=T.extended.urlId!==R}else L!==-1&&(A=!0);if(A||L!==-1&&M===D-1){const I=(j=this._oscLinkService.getLinkData(R))==null?void 0:j.uri;if(I){const B={start:{x:L+1,y:S},end:{x:M+(A||M!==D-1?0:1),y:S}};let H=!1;if(!(x!=null&&x.allowNonHttpProtocols))try{const U=new URL(I);["http:","https:"].includes(U.protocol)||(H=!0)}catch{H=!0}H||w.push({text:I,range:B,activate:(U,W)=>x?x.activate(U,W,B):E(0,W),hover:(U,W)=>{var Y;return(Y=x==null?void 0:x.hover)==null?void 0:Y.call(x,U,W,B)},leave:(U,W)=>{var Y;return(Y=x==null?void 0:x.leave)==null?void 0:Y.call(x,U,W,B)}})}A=!1,T.hasExtendedAttrs()&&T.extended.urlId?(L=M,R=T.extended.urlId):(L=-1,R=-1)}}g(w)}};function E(S,g){if(confirm(`Do you want to navigate to ${g}?
|
|
587
|
-
|
|
588
|
-
WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=g}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=y=d([m(0,_.IBufferService),m(1,_.IOptionsService),m(2,_.IOscLinkService)],y)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,d,m){this._rowCount=m,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,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 h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const d=h(3614),m=h(3656),c=h(3551),_=h(9042),y=h(3730),E=h(1680),S=h(3107),g=h(5744),b=h(2950),w=h(1296),x=h(428),T=h(4269),D=h(5114),R=h(8934),L=h(3230),A=h(9312),j=h(4725),M=h(6731),I=h(8055),B=h(8969),H=h(8460),U=h(844),W=h(6114),Y=h(8437),Q=h(2584),K=h(7399),z=h(5941),O=h(9074),G=h(2585),Z=h(5435),F=h(4567),V=h(779);class ne extends B.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(X={}){super(X),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new H.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new H.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new H.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new H.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new H.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new H.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new H.EventEmitter),this._onBlur=this.register(new H.EventEmitter),this._onA11yCharEmitter=this.register(new H.EventEmitter),this._onA11yTabEmitter=this.register(new H.EventEmitter),this._onWillOpen=this.register(new H.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(G.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(j.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows((($,oe)=>this.refresh($,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport(($=>this._reportWindowsOptions($)))),this.register(this._inputHandler.onColor(($=>this._handleColorEvent($)))),this.register((0,H.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,H.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(($=>this._afterResize($.cols,$.rows)))),this.register((0,U.toDisposable)((()=>{var $,oe;this._customKeyEventHandler=void 0,(oe=($=this.element)==null?void 0:$.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(X){if(this._themeService)for(const $ of X){let oe,ee="";switch($.index){case 256:oe="foreground",ee="10";break;case 257:oe="background",ee="11";break;case 258:oe="cursor",ee="12";break;default:oe="ansi",ee="4;"+$.index}switch($.type){case 0:const ue=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Q.C0.ESC}]${ee};${(0,z.toRgbString)(ue)}${Q.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((he=>he.ansi[$.index]=I.channels.toColor(...$.color)));else{const he=oe;this._themeService.modifyColors((Se=>Se[he]=I.channels.toColor(...$.color)))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(X){X?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(X){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var X;return(X=this.textarea)==null?void 0:X.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Q.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 X=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(X);if(!$)return;const oe=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,ue=$.getWidth(oe),he=this._renderService.dimensions.css.cell.width*ue,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,be=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=be+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=he+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",($=>{this.hasSelection()&&(0,d.copyHandler)($,this._selectionService)})));const X=$=>(0,d.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",X)),this.register((0,m.addDisposableDomListener)(this.element,"paste",X)),W.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",($=>{$.button===2&&(0,d.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",($=>{(0,d.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",($=>{$.button===1&&(0,d.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(X=>this._keyUp(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(X=>this._keyDown(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(X=>this._keyPress(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(X=>this._compositionHelper.compositionupdate(X)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(X=>this._inputEvent(X)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(X){var oe;if(!X)throw new Error("Terminal requires a parent element.");if(X.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=X.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"),X.appendChild(this.element);const $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(ee=>this.updateCursorStyle(ee)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),W.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(D.CoreBrowserService,this.textarea,X.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(j.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(ee=>this._handleTextAreaFocus(ee)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(j.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(M.ThemeService),this._instantiationService.setService(j.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(T.CharacterJoinerService),this._instantiationService.setService(j.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(j.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ee=>this._onRender.fire(ee)))),this.onResize((ee=>this._renderService.resize(ee.cols,ee.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(R.MouseService),this._instantiationService.setService(j.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild($);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.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(A.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(j.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ee=>this._renderService.handleSelectionChanged(ee.start,ee.end,ee.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ee=>{this.textarea.value=ee,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ee=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(ee=>this._selectionService.handleMouseDown(ee)))),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(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ee=>this._handleScreenReaderModeOptionChange(ee)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ee=>{!this._overviewRulerRenderer&&ee&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(g.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const X=this,$=this.element;function oe(he){const Se=X._mouseService.getMouseReportCoords(he,X.screenElement);if(!Se)return!1;let be,Re;switch(he.overrideType||he.type){case"mousemove":Re=32,he.buttons===void 0?(be=3,he.button!==void 0&&(be=he.button<3?he.button:3)):be=1&he.buttons?0:4&he.buttons?1:2&he.buttons?2:3;break;case"mouseup":Re=0,be=he.button<3?he.button:3;break;case"mousedown":Re=1,be=he.button<3?he.button:3;break;case"wheel":if(X._customWheelEventHandler&&X._customWheelEventHandler(he)===!1||X.viewport.getLinesScrolled(he)===0)return!1;Re=he.deltaY<0?0:1,be=4;break;default:return!1}return!(Re===void 0||be===void 0||be>4)&&X.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:be,action:Re,ctrl:he.ctrlKey,alt:he.altKey,shift:he.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ue={mouseup:he=>(oe(he),he.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(he)),wheel:he=>(oe(he),this.cancel(he,!0)),mousedrag:he=>{he.buttons&&oe(he)},mousemove:he=>{he.buttons||oe(he)}};this.register(this.coreMouseService.onProtocolChange((he=>{he?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(he)),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&he?ee.mousemove||($.addEventListener("mousemove",ue.mousemove),ee.mousemove=ue.mousemove):($.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&he?ee.wheel||($.addEventListener("wheel",ue.wheel,{passive:!1}),ee.wheel=ue.wheel):($.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&he?ee.mouseup||(ee.mouseup=ue.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&he?ee.mousedrag||(ee.mousedrag=ue.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)($,"mousedown",(he=>{if(he.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(he))return oe(he),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(he)}))),this.register((0,m.addDisposableDomListener)($,"wheel",(he=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(he)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(he);if(Se===0)return;const be=Q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(he.deltaY<0?"A":"B");let Re="";for(let qe=0;qe<Math.abs(Se);qe++)Re+=be;return this.coreService.triggerDataEvent(Re,!0),this.cancel(he,!0)}return this.viewport.handleWheel(he)?this.cancel(he):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)($,"touchstart",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(he),this.cancel(he)}),{passive:!0})),this.register((0,m.addDisposableDomListener)($,"touchmove",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(he)?void 0:this.cancel(he)}),{passive:!1}))}refresh(X,$){var oe;(oe=this._renderService)==null||oe.refreshRows(X,$)}updateCursorStyle(X){var $;($=this._selectionService)!=null&&$.shouldColumnSelect(X)?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(X,$,oe=0){var ee;oe===1?(super.scrollLines(X,$,oe),this.refresh(0,this.rows-1)):(ee=this.viewport)==null||ee.scrollLines(X)}paste(X){(0,d.paste)(X,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(X){this._customKeyEventHandler=X}attachCustomWheelEventHandler(X){this._customWheelEventHandler=X}registerLinkProvider(X){return this._linkProviderService.registerLinkProvider(X)}registerCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(X);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(X)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(X){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)}registerDecoration(X){return this._decorationService.registerDecoration(X)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(X,$,oe){this._selectionService.setSelection(X,$,oe)}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 X;(X=this._selectionService)==null||X.clearSelection()}selectAll(){var X;(X=this._selectionService)==null||X.selectAll()}selectLines(X,$){var oe;(oe=this._selectionService)==null||oe.selectLines(X,$)}_keyDown(X){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&X.altKey;if(!$&&!this._compositionHelper.keydown(X))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||X.key!=="Dead"&&X.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,K.evaluateKeyboardEvent)(X,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),oe.type===3||oe.type===2){const ee=this.rows-1;return this.scrollLines(oe.type===2?-ee:ee),this.cancel(X,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(oe.cancel&&this.cancel(X,!0),!oe.key||!!(X.key&&!X.ctrlKey&&!X.altKey&&!X.metaKey&&X.key.length===1&&X.key.charCodeAt(0)>=65&&X.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Q.C0.ETX&&oe.key!==Q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||X.altKey||X.ctrlKey?this.cancel(X,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(X,$){const oe=X.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||X.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||X.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?oe:oe&&(!$.keyCode||$.keyCode>47)}_keyUp(X){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||((function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18})(X)||this.focus(),this.updateCursorStyle(X),this._keyPressHandled=!1)}_keyPress(X){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)$=X.charCode;else if(X.which===null||X.which===void 0)$=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;$=X.which}return!(!$||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(X){if(X.data&&X.inputType==="insertText"&&(!X.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=X.data;return this.coreService.triggerDataEvent($,!0),this.cancel(X),!0}return!1}resize(X,$){X!==this.cols||$!==this.rows?super.resize(X,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(X,$){var oe,ee;(oe=this._charSizeService)==null||oe.measure(),(ee=this.viewport)==null||ee.syncScrollArea(!0)}clear(){var X;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let $=1;$<this.rows;$++)this.buffer.lines.push(this.buffer.getBlankLine(Y.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(X=this.viewport)==null||X.reset(),this.refresh(0,this.rows-1)}}reset(){var $,oe;this.options.rows=this.rows,this.options.cols=this.cols;const X=this._customKeyEventHandler;this._setup(),super.reset(),($=this._selectionService)==null||$.reset(),this._decorationService.reset(),(oe=this.viewport)==null||oe.reset(),this._customKeyEventHandler=X,this.refresh(0,this.rows-1)}clearTextureAtlas(){var X;(X=this._renderService)==null||X.clearTextureAtlas()}_reportFocus(){var X;(X=this.element)!=null&&X.classList.contains("focus")?this.coreService.triggerDataEvent(Q.C0.ESC+"[I"):this.coreService.triggerDataEvent(Q.C0.ESC+"[O")}_reportWindowsOptions(X){if(this._renderService)switch(X){case Z.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.C0.ESC}[4;${oe};${$}t`);break;case Z.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ee=this._renderService.dimensions.css.cell.width.toFixed(0),ue=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.C0.ESC}[6;${ue};${ee}t`)}}cancel(X,$){if(this.options.cancelEvents||$)return X.preventDefault(),X.stopPropagation(),!1}}a.Terminal=ne},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(h,d=1e3){this._renderCallback=h,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,d,m){this._rowCount=m,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const c=Date.now();if(c-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=c,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=c-this._lastRefreshMs,y=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d)}}},1680:function(f,a,h){var d=this&&this.__decorate||function(b,w,x,T){var D,R=arguments.length,L=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,x):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(b,w,x,T);else for(var A=b.length-1;A>=0;A--)(D=b[A])&&(L=(R<3?D(L):R>3?D(w,x,L):D(w,x))||L);return R>3&&L&&Object.defineProperty(w,x,L),L},m=this&&this.__param||function(b,w){return function(x,T){w(x,T,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=h(3656),_=h(4725),y=h(8460),E=h(844),S=h(2585);let g=a.Viewport=class extends E.Disposable{constructor(b,w,x,T,D,R,L,A){super(),this._viewportElement=b,this._scrollArea=w,this._bufferService=x,this._optionsService=T,this._charSizeService=D,this._renderService=R,this._coreBrowserService=L,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 y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((j=>this._activeBuffer=j.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((j=>this._renderDimensions=j))),this._handleThemeChange(A.colors),this.register(A.onChangeColors((j=>this._handleThemeChange(j)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,w){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&x<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)}handleWheel(b){const w=this._getPixelsScrolled(b);return w!==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+w:this._smoothScrollState.target+=w,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}scrollLines(b){if(b!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const w=b*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+w,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:b,suppressScrollEvent:!1})}_getPixelsScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?w*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._currentRowHeight*this._bufferService.rows),w}getBufferElements(b,w){var A;let x,T="";const D=[],R=w??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let j=b;j<R;j++){const M=L.get(j);if(!M)continue;const I=(A=L.get(j+1))==null?void 0:A.isWrapped;if(T+=M.translateToString(!I),!I||j===L.length-1){const B=document.createElement("div");B.textContent=T,D.push(B),T.length>0&&(x=B),T=""}}return{bufferElements:D,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(b,w){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&w.altKey||x==="ctrl"&&w.ctrlKey||x==="shift"&&w.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))}};a.Viewport=g=d([m(2,S.IBufferService),m(3,S.IOptionsService),m(4,_.ICharSizeService),m(5,_.IRenderService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],g)},3107:function(f,a,h){var d=this&&this.__decorate||function(S,g,b,w){var x,T=arguments.length,D=T<3?g:w===null?w=Object.getOwnPropertyDescriptor(g,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,g,b,w);else for(var R=S.length-1;R>=0;R--)(x=S[R])&&(D=(T<3?x(D):T>3?x(g,b,D):x(g,b))||D);return T>3&&D&&Object.defineProperty(g,b,D),D},m=this&&this.__param||function(S,g){return function(b,w){g(b,w,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=h(4725),_=h(844),y=h(2585);let E=a.BufferDecorationRenderer=class extends _.Disposable{constructor(S,g,b,w,x){super(),this._screenElement=S,this._bufferService=g,this._coreBrowserService=b,this._decorationService=w,this._renderService=x,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((T=>this._removeDecoration(T)))),this.register((0,_.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const S of this._decorationService.decorations)this._renderDecoration(S);this._dimensionsChanged=!1}_renderDecoration(S){this._refreshStyle(S),this._dimensionsChanged&&this._refreshXPosition(S)}_createElement(S){var w;const g=this._coreBrowserService.mainDocument.createElement("div");g.classList.add("xterm-decoration"),g.classList.toggle("xterm-decoration-top-layer",((w=S==null?void 0:S.options)==null?void 0:w.layer)==="top"),g.style.width=`${Math.round((S.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,g.style.height=(S.options.height||1)*this._renderService.dimensions.css.cell.height+"px",g.style.top=(S.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",g.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const b=S.options.x??0;return b&&b>this._bufferService.cols&&(g.style.display="none"),this._refreshXPosition(S,g),g}_refreshStyle(S){const g=S.marker.line-this._bufferService.buffers.active.ydisp;if(g<0||g>=this._bufferService.rows)S.element&&(S.element.style.display="none",S.onRenderEmitter.fire(S.element));else{let b=this._decorationElements.get(S);b||(b=this._createElement(S),S.element=b,this._decorationElements.set(S,b),this._container.appendChild(b),S.onDispose((()=>{this._decorationElements.delete(S),b.remove()}))),b.style.top=g*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",S.onRenderEmitter.fire(b)}}_refreshXPosition(S,g=S.element){if(!g)return;const b=S.options.x??0;(S.options.anchor||"left")==="right"?g.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":g.style.left=b?b*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(S){var g;(g=this._decorationElements.get(S))==null||g.remove(),this._decorationElements.delete(S),S.dispose()}};a.BufferDecorationRenderer=E=d([m(1,y.IBufferService),m(2,c.ICoreBrowserService),m(3,y.IDecorationService),m(4,c.IRenderService)],E)},5871:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(h){if(h.options.overviewRulerOptions){for(const d of this._zones)if(d.color===h.options.overviewRulerOptions.color&&d.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,h.marker.line))return;if(this._lineAdjacentToZone(d,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(d,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,d){return d>=h.startBufferLine&&d<=h.endBufferLine}_lineAdjacentToZone(h,d,m){return d>=h.startBufferLine-this._linePadding[m||"full"]&&d<=h.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(h,d){h.startBufferLine=Math.min(h.startBufferLine,d),h.endBufferLine=Math.max(h.endBufferLine,d)}}},5744:function(f,a,h){var d=this&&this.__decorate||function(x,T,D,R){var L,A=arguments.length,j=A<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,D):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,T,D,R);else for(var M=x.length-1;M>=0;M--)(L=x[M])&&(j=(A<3?L(j):A>3?L(T,D,j):L(T,D))||j);return A>3&&j&&Object.defineProperty(T,D,j),j},m=this&&this.__param||function(x,T){return function(D,R){T(D,R,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const c=h(5871),_=h(4725),y=h(844),E=h(2585),S={full:0,left:0,center:0,right:0},g={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0};let w=a.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,T,D,R,L,A,j){var I;super(),this._viewportElement=x,this._screenElement=T,this._bufferService=D,this._decorationService=R,this._renderService=L,this._optionsService=A,this._coreBrowserService=j,this._colorZoneStore=new c.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const M=this._canvas.getContext("2d");if(!M)throw new Error("Ctx cannot be null");this._ctx=M,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var B;(B=this._canvas)==null||B.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 x=Math.floor(this._canvas.width/3),T=Math.ceil(this._canvas.width/3);g.full=this._canvas.width,g.left=x,g.center=T,g.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=g.left,b.right=g.left+g.center}_refreshDrawHeightConstants(){S.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,T=Math.round(Math.max(Math.min(x,12),6)*this._coreBrowserService.dpr);S.left=T,S.center=T,S.right=T}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.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 T of this._decorationService.decorations)this._colorZoneStore.addDecoration(T);this._ctx.lineWidth=1;const x=this._colorZoneStore.zones;for(const T of x)T.position!=="full"&&this._renderColorZone(T);for(const T of x)T.position==="full"&&this._renderColorZone(T);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-S[x.position||"full"]/2),g[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+S[x.position||"full"]))}_queueRefresh(x,T){this._shouldUpdateDimensions=x||this._shouldUpdateDimensions,this._shouldUpdateAnchor=T||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=w=d([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,_.IRenderService),m(5,E.IOptionsService),m(6,_.ICoreBrowserService)],w)},2950:function(f,a,h){var d=this&&this.__decorate||function(S,g,b,w){var x,T=arguments.length,D=T<3?g:w===null?w=Object.getOwnPropertyDescriptor(g,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,g,b,w);else for(var R=S.length-1;R>=0;R--)(x=S[R])&&(D=(T<3?x(D):T>3?x(g,b,D):x(g,b))||D);return T>3&&D&&Object.defineProperty(g,b,D),D},m=this&&this.__param||function(S,g){return function(b,w){g(b,w,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=h(4725),_=h(2585),y=h(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,g,b,w,x,T){this._textarea=S,this._compositionView=g,this._bufferService=b,this._optionsService=w,this._coreService=x,this._renderService=T,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(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const g={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let b;this._isSendingComposition=!1,g.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(g.start,g.end):this._textarea.value.substring(g.start),b.length>0&&this._coreService.triggerDataEvent(b,!0)}}),0)}else{this._isSendingComposition=!1;const g=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(g,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const g=this._textarea.value,b=g.replace(S,"");this._dataAlreadySent=b,g.length>S.length?this._coreService.triggerDataEvent(b,!0):g.length<S.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):g.length===S.length&&g!==S&&this._coreService.triggerDataEvent(g,!0)}}),0)}updateCompositionElements(S){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const g=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),b=this._renderService.dimensions.css.cell.height,w=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,x=g*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=x+"px",this._compositionView.style.top=w+"px",this._compositionView.style.height=b+"px",this._compositionView.style.lineHeight=b+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const T=this._compositionView.getBoundingClientRect();this._textarea.style.left=x+"px",this._textarea.style.top=w+"px",this._textarea.style.width=Math.max(T.width,1)+"px",this._textarea.style.height=Math.max(T.height,1)+"px",this._textarea.style.lineHeight=T.height+"px"}S||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=E=d([m(2,_.IBufferService),m(3,_.IOptionsService),m(4,_.ICoreService),m(5,c.IRenderService)],E)},9806:(f,a)=>{function h(d,m,c){const _=c.getBoundingClientRect(),y=d.getComputedStyle(c),E=parseInt(y.getPropertyValue("padding-left")),S=parseInt(y.getPropertyValue("padding-top"));return[m.clientX-_.left-E,m.clientY-_.top-S]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=h,a.getCoords=function(d,m,c,_,y,E,S,g,b){if(!E)return;const w=h(d,m,c);return w?(w[0]=Math.ceil((w[0]+(b?S/2:0))/S),w[1]=Math.ceil(w[1]/g),w[0]=Math.min(Math.max(w[0],1),_+(b?1:0)),w[1]=Math.min(Math.max(w[1],1),y),w):void 0}},9504:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const d=h(2584);function m(g,b,w,x){const T=g-c(g,w),D=b-c(b,w),R=Math.abs(T-D)-(function(L,A,j){let M=0;const I=L-c(L,j),B=A-c(A,j);for(let H=0;H<Math.abs(I-B);H++){const U=_(L,A)==="A"?-1:1,W=j.buffer.lines.get(I+U*H);W!=null&&W.isWrapped&&M++}return M})(g,b,w);return S(R,E(_(g,b),x))}function c(g,b){let w=0,x=b.buffer.lines.get(g),T=x==null?void 0:x.isWrapped;for(;T&&g>=0&&g<b.rows;)w++,x=b.buffer.lines.get(--g),T=x==null?void 0:x.isWrapped;return w}function _(g,b){return g>b?"A":"B"}function y(g,b,w,x,T,D){let R=g,L=b,A="";for(;R!==w||L!==x;)R+=T?1:-1,T&&R>D.cols-1?(A+=D.buffer.translateBufferLineToString(L,!1,g,R),R=0,g=0,L++):!T&&R<0&&(A+=D.buffer.translateBufferLineToString(L,!1,0,g+1),R=D.cols-1,g=R,L--);return A+D.buffer.translateBufferLineToString(L,!1,g,R)}function E(g,b){const w=b?"O":"[";return d.C0.ESC+w+g}function S(g,b){g=Math.floor(g);let w="";for(let x=0;x<g;x++)w+=b;return w}a.moveToCellSequence=function(g,b,w,x){const T=w.buffer.x,D=w.buffer.y;if(!w.buffer.hasScrollback)return(function(A,j,M,I,B,H){return m(j,I,B,H).length===0?"":S(y(A,j,A,j-c(j,B),!1,B).length,E("D",H))})(T,D,0,b,w,x)+m(D,b,w,x)+(function(A,j,M,I,B,H){let U;U=m(j,I,B,H).length>0?I-c(I,B):j;const W=I,Y=(function(Q,K,z,O,G,Z){let F;return F=m(z,O,G,Z).length>0?O-c(O,G):K,Q<z&&F<=O||Q>=z&&F<O?"C":"D"})(A,j,M,I,B,H);return S(y(A,U,M,W,Y==="C",B).length,E(Y,H))})(T,D,g,b,w,x);let R;if(D===b)return R=T>g?"D":"C",S(Math.abs(T-g),E(R,x));R=D>b?"D":"C";const L=Math.abs(D-b);return S((function(A,j){return j.cols-A})(D>b?g:T,w)+(L-1)*w.cols+1+((D>b?T:g)-1),E(R,x))}},1296:function(f,a,h){var d=this&&this.__decorate||function(H,U,W,Y){var Q,K=arguments.length,z=K<3?U:Y===null?Y=Object.getOwnPropertyDescriptor(U,W):Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(H,U,W,Y);else for(var O=H.length-1;O>=0;O--)(Q=H[O])&&(z=(K<3?Q(z):K>3?Q(U,W,z):Q(U,W))||z);return K>3&&z&&Object.defineProperty(U,W,z),z},m=this&&this.__param||function(H,U){return function(W,Y){U(W,Y,H)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=h(3787),_=h(2550),y=h(2223),E=h(6171),S=h(6052),g=h(4725),b=h(8055),w=h(8460),x=h(844),T=h(2585),D="xterm-dom-renderer-owner-",R="xterm-rows",L="xterm-fg-",A="xterm-bg-",j="xterm-focus",M="xterm-selection";let I=1,B=a.DomRenderer=class extends x.Disposable{constructor(H,U,W,Y,Q,K,z,O,G,Z,F,V,ne){super(),this._terminal=H,this._document=U,this._element=W,this._screenElement=Y,this._viewportElement=Q,this._helperContainer=K,this._linkifier2=z,this._charSizeService=G,this._optionsService=Z,this._bufferService=F,this._coreBrowserService=V,this._themeService=ne,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,S.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(R),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(M),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((le=>this._injectCss(le)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(c.DomRendererRowFactory,document),this._element.classList.add(D+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((le=>this._handleLinkHover(le)))),this.register(this._linkifier2.onHideLinkUnderline((le=>this._handleLinkLeave(le)))),this.register((0,x.toDisposable)((()=>{this._element.classList.remove(D+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new _.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const H=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*H,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*H),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/H),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/H),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 W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${R} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(H){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${R} { color: ${H.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${R} .xterm-dim { color: ${b.color.multiplyOpacity(H.foreground,.5).css};}`,U+=`${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 W=`blink_underline_${this._terminalClass}`,Y=`blink_bar_${this._terminalClass}`,Q=`blink_block_${this._terminalClass}`;U+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${Y} { 50% { box-shadow: none; }}`,U+=`@keyframes ${Q} { 0% { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css}; } 50% { background-color: inherit; color: ${H.cursor.css}; }}`,U+=`${this._terminalSelector} .${R}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${R}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${R}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-block { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css};}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${H.cursor.css} !important; color: ${H.cursorAccent.css} !important;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${H.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${H.cursor.css} inset;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${H.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${M} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${M} div { position: absolute; background-color: ${H.selectionBackgroundOpaque.css};}${this._terminalSelector} .${M} div { position: absolute; background-color: ${H.selectionInactiveBackgroundOpaque.css};}`;for(const[K,z]of H.ansi.entries())U+=`${this._terminalSelector} .${L}${K} { color: ${z.css}; }${this._terminalSelector} .${L}${K}.xterm-dim { color: ${b.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${A}${K} { background-color: ${z.css}; }`;U+=`${this._terminalSelector} .${L}${y.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(H.background).css}; }${this._terminalSelector} .${L}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(H.background),.5).css}; }${this._terminalSelector} .${A}${y.INVERTED_DEFAULT_COLOR} { background-color: ${H.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const H=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${H}px`,this._rowFactory.defaultSpacing=H}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(H,U){for(let W=this._rowElements.length;W<=U;W++){const Y=this._document.createElement("div");this._rowContainer.appendChild(Y),this._rowElements.push(Y)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(H,U){this._refreshRowElements(H,U),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(j),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(j),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(H,U,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(H,U,W),this.renderRows(0,this._bufferService.rows-1),!H||!U)return;this._selectionRenderModel.update(this._terminal,H,U,W);const Y=this._selectionRenderModel.viewportStartRow,Q=this._selectionRenderModel.viewportEndRow,K=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(K>=this._bufferService.rows||z<0)return;const O=this._document.createDocumentFragment();if(W){const G=H[0]>U[0];O.appendChild(this._createSelectionElement(K,G?U[0]:H[0],G?H[0]:U[0],z-K+1))}else{const G=Y===K?H[0]:0,Z=K===Q?U[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(K,G,Z));const F=z-K-1;if(O.appendChild(this._createSelectionElement(K+1,0,this._bufferService.cols,F)),K!==z){const V=Q===z?U[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(z,0,V))}}this._selectionContainer.appendChild(O)}_createSelectionElement(H,U,W,Y=1){const Q=this._document.createElement("div"),K=U*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*(W-U);return K+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-K),Q.style.height=Y*this.dimensions.css.cell.height+"px",Q.style.top=H*this.dimensions.css.cell.height+"px",Q.style.left=`${K}px`,Q.style.width=`${z}px`,Q}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 H of this._rowElements)H.replaceChildren()}renderRows(H,U){const W=this._bufferService.buffer,Y=W.ybase+W.y,Q=Math.min(W.x,this._bufferService.cols-1),K=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let G=H;G<=U;G++){const Z=G+W.ydisp,F=this._rowElements[G],V=W.lines.get(Z);if(!F||!V)break;F.replaceChildren(...this._rowFactory.createRow(V,Z,Z===Y,z,O,Q,K,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${D}${this._terminalClass}`}_handleLinkHover(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!0)}_handleLinkLeave(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!1)}_setCellUnderline(H,U,W,Y,Q,K){W<0&&(H=0),Y<0&&(U=0);const z=this._bufferService.rows-1;W=Math.max(Math.min(W,z),0),Y=Math.max(Math.min(Y,z),0),Q=Math.min(Q,this._bufferService.cols);const O=this._bufferService.buffer,G=O.ybase+O.y,Z=Math.min(O.x,Q-1),F=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,ne=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=W;le<=Y;++le){const X=le+O.ydisp,$=this._rowElements[le],oe=O.lines.get(X);if(!$||!oe)break;$.replaceChildren(...this._rowFactory.createRow(oe,X,X===G,V,ne,Z,F,this.dimensions.css.cell.width,this._widthCache,K?le===W?H:0:-1,K?(le===Y?U:Q)-1:-1))}}};a.DomRenderer=B=d([m(7,T.IInstantiationService),m(8,g.ICharSizeService),m(9,T.IOptionsService),m(10,T.IBufferService),m(11,g.ICoreBrowserService),m(12,g.IThemeService)],B)},3787:function(f,a,h){var d=this&&this.__decorate||function(R,L,A,j){var M,I=arguments.length,B=I<3?L:j===null?j=Object.getOwnPropertyDescriptor(L,A):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(R,L,A,j);else for(var H=R.length-1;H>=0;H--)(M=R[H])&&(B=(I<3?M(B):I>3?M(L,A,B):M(L,A))||B);return I>3&&B&&Object.defineProperty(L,A,B),B},m=this&&this.__param||function(R,L){return function(A,j){L(A,j,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=h(2223),_=h(643),y=h(511),E=h(2585),S=h(8055),g=h(4725),b=h(4269),w=h(6171),x=h(3734);let T=a.DomRendererRowFactory=class{constructor(R,L,A,j,M,I,B){this._document=R,this._characterJoinerService=L,this._optionsService=A,this._coreBrowserService=j,this._coreService=M,this._decorationService=I,this._themeService=B,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(R,L,A){this._selectionStart=R,this._selectionEnd=L,this._columnSelectMode=A}createRow(R,L,A,j,M,I,B,H,U,W,Y){const Q=[],K=this._characterJoinerService.getJoinedCharacters(L),z=this._themeService.colors;let O,G=R.getNoBgTrimmedLength();A&&G<I+1&&(G=I+1);let Z=0,F="",V=0,ne=0,le=0,X=!1,$=0,oe=!1,ee=0;const ue=[],he=W!==-1&&Y!==-1;for(let Se=0;Se<G;Se++){R.loadCell(Se,this._workCell);let be=this._workCell.getWidth();if(be===0)continue;let Re=!1,qe=Se,Ee=this._workCell;if(K.length>0&&Se===K[0][0]){Re=!0;const Me=K.shift();Ee=new b.JoinedCellData(this._workCell,R.translateToString(!0,Me[0],Me[1]),Me[1]-Me[0]),qe=Me[1]-1,be=Ee.getWidth()}const ze=this._isCellInSelection(Se,L),Mt=A&&Se===I,$e=he&&Se>=W&&Se<=Y;let Be=!1;this._decorationService.forEachDecorationAtCell(Se,L,void 0,(Me=>{Be=!0}));let Ie=Ee.getChars()||_.WHITESPACE_CELL_CHAR;if(Ie===" "&&(Ee.isUnderline()||Ee.isOverline())&&(Ie=" "),ee=be*H-U.get(Ie,Ee.isBold(),Ee.isItalic()),O){if(Z&&(ze&&oe||!ze&&!oe&&Ee.bg===V)&&(ze&&oe&&z.selectionForeground||Ee.fg===ne)&&Ee.extended.ext===le&&$e===X&&ee===$&&!Mt&&!Re&&!Be){Ee.isInvisible()?F+=_.WHITESPACE_CELL_CHAR:F+=Ie,Z++;continue}Z&&(O.textContent=F),O=this._document.createElement("span"),Z=0,F=""}else O=this._document.createElement("span");if(V=Ee.bg,ne=Ee.fg,le=Ee.extended.ext,X=$e,$=ee,oe=ze,Re&&I>=Se&&I<=qe&&(I=Se),!this._coreService.isCursorHidden&&Mt&&this._coreService.isCursorInitialized){if(ue.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&ue.push("xterm-cursor-blink"),ue.push(j==="bar"?"xterm-cursor-bar":j==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(M)switch(M){case"outline":ue.push("xterm-cursor-outline");break;case"block":ue.push("xterm-cursor-block");break;case"bar":ue.push("xterm-cursor-bar");break;case"underline":ue.push("xterm-cursor-underline")}}if(Ee.isBold()&&ue.push("xterm-bold"),Ee.isItalic()&&ue.push("xterm-italic"),Ee.isDim()&&ue.push("xterm-dim"),F=Ee.isInvisible()?_.WHITESPACE_CELL_CHAR:Ee.getChars()||_.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(ue.push(`xterm-underline-${Ee.extended.underlineStyle}`),F===" "&&(F=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Me=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Me<8&&(Me+=8),O.style.textDecorationColor=z.ansi[Me].css}Ee.isOverline()&&(ue.push("xterm-overline"),F===" "&&(F=" ")),Ee.isStrikethrough()&&ue.push("xterm-strikethrough"),$e&&(O.style.textDecoration="underline");let Te=Ee.getFgColor(),Ve=Ee.getFgColorMode(),gt=Ee.getBgColor(),rt=Ee.getBgColorMode();const fe=!!Ee.isInverse();if(fe){const Me=Te;Te=gt,gt=Me;const Tt=Ve;Ve=rt,rt=Tt}let ge,Le,De,Fe=!1;switch(this._decorationService.forEachDecorationAtCell(Se,L,void 0,(Me=>{Me.options.layer!=="top"&&Fe||(Me.backgroundColorRGB&&(rt=50331648,gt=Me.backgroundColorRGB.rgba>>8&16777215,ge=Me.backgroundColorRGB),Me.foregroundColorRGB&&(Ve=50331648,Te=Me.foregroundColorRGB.rgba>>8&16777215,Le=Me.foregroundColorRGB),Fe=Me.options.layer==="top")})),!Fe&&ze&&(ge=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,gt=ge.rgba>>8&16777215,rt=50331648,Fe=!0,z.selectionForeground&&(Ve=50331648,Te=z.selectionForeground.rgba>>8&16777215,Le=z.selectionForeground)),Fe&&ue.push("xterm-decoration-top"),rt){case 16777216:case 33554432:De=z.ansi[gt],ue.push(`xterm-bg-${gt}`);break;case 50331648:De=S.channels.toColor(gt>>16,gt>>8&255,255>),this._addStyle(O,`background-color:#${D((gt>>>0).toString(16),"0",6)}`);break;default:fe?(De=z.foreground,ue.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):De=z.background}switch(ge||Ee.isDim()&&(ge=S.color.multiplyOpacity(De,.5)),Ve){case 16777216:case 33554432:Ee.isBold()&&Te<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Te+=8),this._applyMinimumContrast(O,De,z.ansi[Te],Ee,ge,void 0)||ue.push(`xterm-fg-${Te}`);break;case 50331648:const Me=S.channels.toColor(Te>>16&255,Te>>8&255,255&Te);this._applyMinimumContrast(O,De,Me,Ee,ge,Le)||this._addStyle(O,`color:#${D(Te.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,De,z.foreground,Ee,ge,Le)||fe&&ue.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}ue.length&&(O.className=ue.join(" "),ue.length=0),Mt||Re||Be?O.textContent=F:Z++,ee!==this.defaultSpacing&&(O.style.letterSpacing=`${ee}px`),Q.push(O),Se=qe}return O&&Z&&(O.textContent=F),Q}_applyMinimumContrast(R,L,A,j,M,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(j.getCode()))return!1;const B=this._getContrastCache(j);let H;if(M||I||(H=B.getColor(L.rgba,A.rgba)),H===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(j.isDim()?2:1);H=S.color.ensureContrastRatio(M||L,I||A,U),B.setColor((M||L).rgba,(I||A).rgba,H??null)}return!!H&&(this._addStyle(R,`color:${H.css}`),!0)}_getContrastCache(R){return R.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(R,L){R.setAttribute("style",`${R.getAttribute("style")||""}${L};`)}_isCellInSelection(R,L){const A=this._selectionStart,j=this._selectionEnd;return!(!A||!j)&&(this._columnSelectMode?A[0]<=j[0]?R>=A[0]&&L>=A[1]&&R<j[0]&&L<=j[1]:R<A[0]&&L>=A[1]&&R>=j[0]&&L<=j[1]:L>A[1]&&L<j[1]||A[1]===j[1]&&L===A[1]&&R>=A[0]&&R<j[0]||A[1]<j[1]&&L===j[1]&&R<j[0]||A[1]<j[1]&&L===A[1]&&R>=A[0])}};function D(R,L,A){for(;R.length<A;)R=L+R;return R}a.DomRendererRowFactory=T=d([m(1,g.ICharacterJoinerService),m(2,E.IOptionsService),m(3,g.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,g.IThemeService)],T)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(h,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const m=h.createElement("span");m.classList.add("xterm-char-measure-element");const c=h.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const _=h.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const y=h.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[m,c,_,y],this._container.appendChild(m),this._container.appendChild(c),this._container.appendChild(_),this._container.appendChild(y),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(h,d,m,c){h===this._font&&d===this._fontSize&&m===this._weight&&c===this._weightBold||(this._font=h,this._fontSize=d,this._weight=m,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(h,d,m){let c=0;if(!d&&!m&&h.length===1&&(c=h.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const E=this._measure(h,0);return E>0&&(this._flat[c]=E),E}let _=h;d&&(_+="B"),m&&(_+="I");let y=this._holey.get(_);if(y===void 0){let E=0;d&&(E|=1),m&&(E|=2),y=this._measure(h,E),y>0&&this._holey.set(_,y)}return y}_measure(h,d){const m=this._measureElements[d];return m.textContent=h.repeat(32),m.offsetWidth/32}}},2223:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const d=h(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function h(m){return 57508<=m&&m<=57558}function d(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=h,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=d,a.allowRescaling=function(m,c,_,y){return c===1&&_>Math.ceil(1.5*y)&&m!==void 0&&m>255&&!d(m)&&!h(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return h(m)||(function(c){return 9472<=c&&c<=9631})(m)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(m,c,_=0){return(m-(2*Math.round(c)-_))%(2*Math.round(c))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,c,_,y=!1){if(this.selectionStart=c,this.selectionEnd=_,!c||!_||c[0]===_[0]&&c[1]===_[1])return void this.clear();const E=m.buffers.active.ydisp,S=c[1]-E,g=_[1]-E,b=Math.max(S,0),w=Math.min(g,m.rows-1);b>=m.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=S,this.viewportEndRow=g,this.viewportCappedStartRow=b,this.viewportCappedEndRow=w,this.startCol=c[0],this.endCol=_[0])}isCellSelected(m,c,_){return!!this.hasSelection&&(_-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&_>=this.viewportCappedStartRow&&c<this.endCol&&_<=this.viewportCappedEndRow:c<this.startCol&&_>=this.viewportCappedStartRow&&c>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new h}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,d=this.selectionEnd;return!(!h||!d)&&(h[1]>d[1]||h[1]===d[1]&&h[0]>d[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,h){var d=this&&this.__decorate||function(w,x,T,D){var R,L=arguments.length,A=L<3?x:D===null?D=Object.getOwnPropertyDescriptor(x,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,x,T,D);else for(var j=w.length-1;j>=0;j--)(R=w[j])&&(A=(L<3?R(A):L>3?R(x,T,A):R(x,T))||A);return L>3&&A&&Object.defineProperty(x,T,A),A},m=this&&this.__param||function(w,x){return function(T,D){x(T,D,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const c=h(2585),_=h(8460),y=h(844);let E=a.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,x,T){super(),this._optionsService=T,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new b(this._optionsService))}catch{this._measureStrategy=this.register(new g(w,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};a.CharSizeService=E=d([m(2,c.IOptionsService)],E);class S extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,T){x!==void 0&&x>0&&T!==void 0&&T>0&&(this._result.width=x,this._result.height=T)}}class g extends S{constructor(x,T,D){super(),this._document=x,this._parentElement=T,this._optionsService=D,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 b extends S{constructor(x){super(),this._optionsService=x,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const T=this._ctx.measureText("W");if(!("width"in T&&"fontBoundingBoxAscent"in T&&"fontBoundingBoxDescent"in T))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(f,a,h){var d=this&&this.__decorate||function(b,w,x,T){var D,R=arguments.length,L=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,x):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(b,w,x,T);else for(var A=b.length-1;A>=0;A--)(D=b[A])&&(L=(R<3?D(L):R>3?D(w,x,L):D(w,x))||L);return R>3&&L&&Object.defineProperty(w,x,L),L},m=this&&this.__param||function(b,w){return function(x,T){w(x,T,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=h(3734),_=h(643),y=h(511),E=h(2585);class S extends c.AttributeData{constructor(w,x,T){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=x,this._width=T}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=S;let g=a.CharacterJoinerService=class n5{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(w){const x={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(x),x.id}deregister(w){for(let x=0;x<this._characterJoiners.length;x++)if(this._characterJoiners[x].id===w)return this._characterJoiners.splice(x,1),!0;return!1}getJoinedCharacters(w){if(this._characterJoiners.length===0)return[];const x=this._bufferService.buffer.lines.get(w);if(!x||x.length===0)return[];const T=[],D=x.translateToString(!0);let R=0,L=0,A=0,j=x.getFg(0),M=x.getBg(0);for(let I=0;I<x.getTrimmedLength();I++)if(x.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==j||this._workCell.bg!==M){if(I-R>1){const B=this._getJoinedRanges(D,A,L,x,R);for(let H=0;H<B.length;H++)T.push(B[H])}R=I,A=L,j=this._workCell.fg,M=this._workCell.bg}L+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-R>1){const I=this._getJoinedRanges(D,A,L,x,R);for(let B=0;B<I.length;B++)T.push(I[B])}return T}_getJoinedRanges(w,x,T,D,R){const L=w.substring(x,T);let A=[];try{A=this._characterJoiners[0].handler(L)}catch(j){console.error(j)}for(let j=1;j<this._characterJoiners.length;j++)try{const M=this._characterJoiners[j].handler(L);for(let I=0;I<M.length;I++)n5._mergeRanges(A,M[I])}catch(M){console.error(M)}return this._stringRangesToCellRanges(A,D,R),A}_stringRangesToCellRanges(w,x,T){let D=0,R=!1,L=0,A=w[D];if(A){for(let j=T;j<this._bufferService.cols;j++){const M=x.getWidth(j),I=x.getString(j).length||_.WHITESPACE_CELL_CHAR.length;if(M!==0){if(!R&&A[0]<=L&&(A[0]=j,R=!0),A[1]<=L){if(A[1]=j,A=w[++D],!A)break;A[0]<=L?(A[0]=j,R=!0):R=!1}L+=I}}A&&(A[1]=this._bufferService.cols)}}static _mergeRanges(w,x){let T=!1;for(let D=0;D<w.length;D++){const R=w[D];if(T){if(x[1]<=R[0])return w[D-1][1]=x[1],w;if(x[1]<=R[1])return w[D-1][1]=Math.max(x[1],R[1]),w.splice(D,1),w;w.splice(D,1),D--}else{if(x[1]<=R[0])return w.splice(D,0,x),w;if(x[1]<=R[1])return R[0]=Math.min(x[0],R[0]),w;x[0]<R[1]&&(R[0]=Math.min(x[0],R[0]),T=!0)}}return T?w[w.length-1][1]=x[1]:w.push(x),w}};a.CharacterJoinerService=g=d([m(0,E.IBufferService)],g)},5114:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const d=h(844),m=h(8460),c=h(3656);class _ extends d.Disposable{constructor(S,g,b){super(),this._textarea=S,this._window=g,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((w=>this._screenDprMonitor.setWindow(w)))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(S){this._window!==S&&(this._window=S,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=_;class y extends d.Disposable{constructor(S){super(),this._parentWindow=S,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(S){this._parentWindow=S,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,c.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var S;this._outerListener&&((S=this._resolutionMediaMatchList)==null||S.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:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const d=h(844);class m extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const y=this.linkProviders.indexOf(_);y!==-1&&this.linkProviders.splice(y,1)}}}}a.LinkProviderService=m},8934:function(f,a,h){var d=this&&this.__decorate||function(E,S,g,b){var w,x=arguments.length,T=x<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(E,S,g,b);else for(var D=E.length-1;D>=0;D--)(w=E[D])&&(T=(x<3?w(T):x>3?w(S,g,T):w(S,g))||T);return x>3&&T&&Object.defineProperty(S,g,T),T},m=this&&this.__param||function(E,S){return function(g,b){S(g,b,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=h(4725),_=h(9806);let y=a.MouseService=class{constructor(E,S){this._renderService=E,this._charSizeService=S}getCoords(E,S,g,b,w){return(0,_.getCoords)(window,E,S,g,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(E,S){const g=(0,_.getCoordsRelativeToElement)(window,E,S);if(this._charSizeService.hasValidSize)return g[0]=Math.min(Math.max(g[0],0),this._renderService.dimensions.css.canvas.width-1),g[1]=Math.min(Math.max(g[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(g[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(g[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(g[0]),y:Math.floor(g[1])}}};a.MouseService=y=d([m(0,c.IRenderService),m(1,c.ICharSizeService)],y)},3230:function(f,a,h){var d=this&&this.__decorate||function(w,x,T,D){var R,L=arguments.length,A=L<3?x:D===null?D=Object.getOwnPropertyDescriptor(x,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,x,T,D);else for(var j=w.length-1;j>=0;j--)(R=w[j])&&(A=(L<3?R(A):L>3?R(x,T,A):R(x,T))||A);return L>3&&A&&Object.defineProperty(x,T,A),A},m=this&&this.__param||function(w,x){return function(T,D){x(T,D,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const c=h(6193),_=h(4725),y=h(8460),E=h(844),S=h(7226),g=h(2585);let b=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,x,T,D,R,L,A,j){super(),this._rowCount=w,this._charSizeService=D,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new S.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new c.RenderDebouncer(((M,I)=>this._renderRows(M,I)),A),this.register(this._renderDebouncer),this.register(A.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(L.onResize((()=>this._fullRefresh()))),this.register(L.buffers.onBufferActivate((()=>{var M;return(M=this._renderer.value)==null?void 0:M.clear()}))),this.register(T.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(R.onDecorationRegistered((()=>this._fullRefresh()))),this.register(R.onDecorationRemoved((()=>this._fullRefresh()))),this.register(T.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(L.cols,L.rows),this._fullRefresh()}))),this.register(T.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(L.buffer.y,L.buffer.y,!0)))),this.register(j.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(A.window,x),this.register(A.onWindowChange((M=>this._registerIntersectionObserver(M,x))))}_registerIntersectionObserver(w,x){if("IntersectionObserver"in w){const T=new w.IntersectionObserver((D=>this._handleIntersectionChange(D[D.length-1])),{threshold:0});T.observe(x),this._observerDisposable.value=(0,E.toDisposable)((()=>T.disconnect()))}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.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(w,x,T=!1){this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,x,this._rowCount))}_renderRows(w,x){this._renderer.value&&(w=Math.min(w,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(w,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:x}),this._onRender.fire({start:w,end:x}),this._isNextRenderRedrawOnly=!0)}resize(w,x){this._rowCount=x,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(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var w,x;this._renderer.value&&((x=(w=this._renderer.value).clearTextureAtlas)==null||x.call(w),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var T;return(T=this._renderer.value)==null?void 0:T.handleResize(w,x)})):this._renderer.value.handleResize(w,x),this._fullRefresh())}handleCharSizeChanged(){var w;(w=this._renderer.value)==null||w.handleCharSizeChanged()}handleBlur(){var w;(w=this._renderer.value)==null||w.handleBlur()}handleFocus(){var w;(w=this._renderer.value)==null||w.handleFocus()}handleSelectionChanged(w,x,T){var D;this._selectionState.start=w,this._selectionState.end=x,this._selectionState.columnSelectMode=T,(D=this._renderer.value)==null||D.handleSelectionChanged(w,x,T)}handleCursorMove(){var w;(w=this._renderer.value)==null||w.handleCursorMove()}clear(){var w;(w=this._renderer.value)==null||w.clear()}};a.RenderService=b=d([m(2,g.IOptionsService),m(3,_.ICharSizeService),m(4,g.IDecorationService),m(5,g.IBufferService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],b)},9312:function(f,a,h){var d=this&&this.__decorate||function(A,j,M,I){var B,H=arguments.length,U=H<3?j:I===null?I=Object.getOwnPropertyDescriptor(j,M):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(A,j,M,I);else for(var W=A.length-1;W>=0;W--)(B=A[W])&&(U=(H<3?B(U):H>3?B(j,M,U):B(j,M))||U);return H>3&&U&&Object.defineProperty(j,M,U),U},m=this&&this.__param||function(A,j){return function(M,I){j(M,I,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=h(9806),_=h(9504),y=h(456),E=h(4725),S=h(8460),g=h(844),b=h(6114),w=h(4841),x=h(511),T=h(2585),D=" ",R=new RegExp(D,"g");let L=a.SelectionService=class extends g.Disposable{constructor(A,j,M,I,B,H,U,W,Y){super(),this._element=A,this._screenElement=j,this._linkifier=M,this._bufferService=I,this._coreService=B,this._mouseService=H,this._optionsService=U,this._renderService=W,this._coreBrowserService=Y,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Q=>this._handleMouseMove(Q),this._mouseUpListener=Q=>this._handleMouseUp(Q),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Q=>this._handleTrim(Q))),this.register(this._bufferService.buffers.onBufferActivate((Q=>this._handleBufferActivate(Q)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,g.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 A=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!A||!j||A[0]===j[0]&&A[1]===j[1])}get selectionText(){const A=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;if(!A||!j)return"";const M=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(A[0]===j[0])return"";const B=A[0]<j[0]?A[0]:j[0],H=A[0]<j[0]?j[0]:A[0];for(let U=A[1];U<=j[1];U++){const W=M.translateBufferLineToString(U,!0,B,H);I.push(W)}}else{const B=A[1]===j[1]?j[0]:void 0;I.push(M.translateBufferLineToString(A[1],!0,A[0],B));for(let H=A[1]+1;H<=j[1]-1;H++){const U=M.lines.get(H),W=M.translateBufferLineToString(H,!0);U!=null&&U.isWrapped?I[I.length-1]+=W:I.push(W)}if(A[1]!==j[1]){const H=M.lines.get(j[1]),U=M.translateBufferLineToString(j[1],!0,0,j[0]);H&&H.isWrapped?I[I.length-1]+=U:I.push(U)}}return I.map((B=>B.replace(R," "))).join(b.isWindows?`\r
|
|
589
|
-
`:`
|
|
590
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(A){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&A&&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(A){const j=this._getMouseBufferCoords(A),M=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(M&&I&&j)&&this._areCoordsInSelection(j,M,I)}isCellInSelection(A,j){const M=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!M||!I)&&this._areCoordsInSelection([A,j],M,I)}_areCoordsInSelection(A,j,M){return A[1]>j[1]&&A[1]<M[1]||j[1]===M[1]&&A[1]===j[1]&&A[0]>=j[0]&&A[0]<M[0]||j[1]<M[1]&&A[1]===M[1]&&A[0]<M[0]||j[1]<M[1]&&A[1]===j[1]&&A[0]>=j[0]}_selectWordAtCursor(A,j){var B,H;const M=(H=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:H.range;if(M)return this._model.selectionStart=[M.start.x-1,M.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(M,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(A);return!!I&&(this._selectWordAt(I,j),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(A,j){this._model.clearSelection(),A=Math.max(A,0),j=Math.min(j,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,A],this._model.selectionEnd=[this._bufferService.cols,j],this.refresh(),this._onSelectionChange.fire()}_handleTrim(A){this._model.handleTrim(A)&&this.refresh()}_getMouseBufferCoords(A){const j=this._mouseService.getCoords(A,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(j)return j[0]--,j[1]--,j[1]+=this._bufferService.buffer.ydisp,j}_getMouseEventScrollAmount(A){let j=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,A,this._screenElement)[1];const M=this._renderService.dimensions.css.canvas.height;return j>=0&&j<=M?0:(j>M&&(j-=M),j=Math.min(Math.max(j,-50),50),j/=50,j/Math.abs(j)+Math.round(14*j))}shouldForceSelection(A){return b.isMac?A.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:A.shiftKey}handleMouseDown(A){if(this._mouseDownTimeStamp=A.timeStamp,(A.button!==2||!this.hasSelection)&&A.button===0){if(!this._enabled){if(!this.shouldForceSelection(A))return;A.stopPropagation()}A.preventDefault(),this._dragScrollAmount=0,this._enabled&&A.shiftKey?this._handleIncrementalClick(A):A.detail===1?this._handleSingleClick(A):A.detail===2?this._handleDoubleClick(A):A.detail===3&&this._handleTripleClick(A),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(A){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(A))}_handleSingleClick(A){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(A)?3:0,this._model.selectionStart=this._getMouseBufferCoords(A),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const j=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);j&&j.length!==this._model.selectionStart[0]&&j.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(A){this._selectWordAtCursor(A,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(A){const j=this._getMouseBufferCoords(A);j&&(this._activeSelectionMode=2,this._selectLineAt(j[1]))}shouldColumnSelect(A){return A.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(A){if(A.stopImmediatePropagation(),!this._model.selectionStart)return;const j=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(A),!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(A),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const M=this._bufferService.buffer;if(this._model.selectionEnd[1]<M.lines.length){const I=M.lines.get(this._model.selectionEnd[1]);I&&I.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}j&&j[0]===this._model.selectionEnd[0]&&j[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 A=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(A.ydisp+this._bufferService.rows,A.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=A.ydisp),this.refresh()}}_handleMouseUp(A){const j=A.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&j<500&&A.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const M=this._mouseService.getCoords(A,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(M&&M[0]!==void 0&&M[1]!==void 0){const I=(0,_.moveToCellSequence)(M[0]-1,M[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const A=this._model.finalSelectionStart,j=this._model.finalSelectionEnd,M=!(!A||!j||A[0]===j[0]&&A[1]===j[1]);M?A&&j&&(this._oldSelectionStart&&this._oldSelectionEnd&&A[0]===this._oldSelectionStart[0]&&A[1]===this._oldSelectionStart[1]&&j[0]===this._oldSelectionEnd[0]&&j[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(A,j,M)):this._oldHasSelection&&this._fireOnSelectionChange(A,j,M)}_fireOnSelectionChange(A,j,M){this._oldSelectionStart=A,this._oldSelectionEnd=j,this._oldHasSelection=M,this._onSelectionChange.fire()}_handleBufferActivate(A){this.clearSelection(),this._trimListener.dispose(),this._trimListener=A.activeBuffer.lines.onTrim((j=>this._handleTrim(j)))}_convertViewportColToCharacterIndex(A,j){let M=j;for(let I=0;j>=I;I++){const B=A.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?M--:B>1&&j!==I&&(M+=B-1)}return M}setSelection(A,j,M){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[A,j],this._model.selectionStartLength=M,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(A){this._isClickInSelection(A)||(this._selectWordAtCursor(A,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(A,j,M=!0,I=!0){if(A[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,H=B.lines.get(A[1]);if(!H)return;const U=B.translateBufferLineToString(A[1],!1);let W=this._convertViewportColToCharacterIndex(H,A[0]),Y=W;const Q=A[0]-W;let K=0,z=0,O=0,G=0;if(U.charAt(W)===" "){for(;W>0&&U.charAt(W-1)===" ";)W--;for(;Y<U.length&&U.charAt(Y+1)===" ";)Y++}else{let V=A[0],ne=A[0];H.getWidth(V)===0&&(K++,V--),H.getWidth(ne)===2&&(z++,ne++);const le=H.getString(ne).length;for(le>1&&(G+=le-1,Y+=le-1);V>0&&W>0&&!this._isCharWordSeparator(H.loadCell(V-1,this._workCell));){H.loadCell(V-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(K++,V--):X>1&&(O+=X-1,W-=X-1),W--,V--}for(;ne<H.length&&Y+1<U.length&&!this._isCharWordSeparator(H.loadCell(ne+1,this._workCell));){H.loadCell(ne+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,ne++):X>1&&(G+=X-1,Y+=X-1),Y++,ne++}}Y++;let Z=W+Q-K+O,F=Math.min(this._bufferService.cols,Y-W+K+z-O-G);if(j||U.slice(W,Y).trim()!==""){if(M&&Z===0&&H.getCodePoint(0)!==32){const V=B.lines.get(A[1]-1);if(V&&H.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const ne=this._getWordAt([this._bufferService.cols-1,A[1]-1],!1,!0,!1);if(ne){const le=this._bufferService.cols-ne.start;Z-=le,F+=le}}}if(I&&Z+F===this._bufferService.cols&&H.getCodePoint(this._bufferService.cols-1)!==32){const V=B.lines.get(A[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const ne=this._getWordAt([0,A[1]+1],!1,!1,!0);ne&&(F+=ne.length)}}return{start:Z,length:F}}}_selectWordAt(A,j){const M=this._getWordAt(A,j);if(M){for(;M.start<0;)M.start+=this._bufferService.cols,A[1]--;this._model.selectionStart=[M.start,A[1]],this._model.selectionStartLength=M.length}}_selectToWordAt(A){const j=this._getWordAt(A,!0);if(j){let M=A[1];for(;j.start<0;)j.start+=this._bufferService.cols,M--;if(!this._model.areSelectionValuesReversed())for(;j.start+j.length>this._bufferService.cols;)j.length-=this._bufferService.cols,M++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?j.start:j.start+j.length,M]}}_isCharWordSeparator(A){return A.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(A.getChars())>=0}_selectLineAt(A){const j=this._bufferService.buffer.getWrappedRangeForLine(A),M={start:{x:0,y:j.first},end:{x:this._bufferService.cols-1,y:j.last}};this._model.selectionStart=[0,j.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(M,this._bufferService.cols)}};a.SelectionService=L=d([m(3,T.IBufferService),m(4,T.ICoreService),m(5,E.IMouseService),m(6,T.IOptionsService),m(7,E.IRenderService),m(8,E.ICoreBrowserService)],L)},4725:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const d=h(8343);a.ICharSizeService=(0,d.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),a.IMouseService=(0,d.createDecorator)("MouseService"),a.IRenderService=(0,d.createDecorator)("RenderService"),a.ISelectionService=(0,d.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,d.createDecorator)("ThemeService"),a.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(f,a,h){var d=this&&this.__decorate||function(L,A,j,M){var I,B=arguments.length,H=B<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(L,A,j,M);else for(var U=L.length-1;U>=0;U--)(I=L[U])&&(H=(B<3?I(H):B>3?I(A,j,H):I(A,j))||H);return B>3&&H&&Object.defineProperty(A,j,H),H},m=this&&this.__param||function(L,A){return function(j,M){A(j,M,L)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=h(7239),_=h(8055),y=h(8460),E=h(844),S=h(2585),g=_.css.toColor("#ffffff"),b=_.css.toColor("#000000"),w=_.css.toColor("#ffffff"),x=_.css.toColor("#000000"),T={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const L=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],A=[0,95,135,175,215,255];for(let j=0;j<216;j++){const M=A[j/36%6|0],I=A[j/6%6|0],B=A[j%6];L.push({css:_.channels.toCss(M,I,B),rgba:_.channels.toRgba(M,I,B)})}for(let j=0;j<24;j++){const M=8+10*j;L.push({css:_.channels.toCss(M,M,M),rgba:_.channels.toRgba(M,M,M)})}return L})());let D=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(L){super(),this._optionsService=L,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:g,background:b,cursor:w,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:T,selectionBackgroundOpaque:_.color.blend(b,T),selectionInactiveBackgroundTransparent:T,selectionInactiveBackgroundOpaque:_.color.blend(b,T),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(L={}){const A=this._colors;if(A.foreground=R(L.foreground,g),A.background=R(L.background,b),A.cursor=R(L.cursor,w),A.cursorAccent=R(L.cursorAccent,x),A.selectionBackgroundTransparent=R(L.selectionBackground,T),A.selectionBackgroundOpaque=_.color.blend(A.background,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundTransparent=R(L.selectionInactiveBackground,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundOpaque=_.color.blend(A.background,A.selectionInactiveBackgroundTransparent),A.selectionForeground=L.selectionForeground?R(L.selectionForeground,_.NULL_COLOR):void 0,A.selectionForeground===_.NULL_COLOR&&(A.selectionForeground=void 0),_.color.isOpaque(A.selectionBackgroundTransparent)&&(A.selectionBackgroundTransparent=_.color.opacity(A.selectionBackgroundTransparent,.3)),_.color.isOpaque(A.selectionInactiveBackgroundTransparent)&&(A.selectionInactiveBackgroundTransparent=_.color.opacity(A.selectionInactiveBackgroundTransparent,.3)),A.ansi=a.DEFAULT_ANSI_COLORS.slice(),A.ansi[0]=R(L.black,a.DEFAULT_ANSI_COLORS[0]),A.ansi[1]=R(L.red,a.DEFAULT_ANSI_COLORS[1]),A.ansi[2]=R(L.green,a.DEFAULT_ANSI_COLORS[2]),A.ansi[3]=R(L.yellow,a.DEFAULT_ANSI_COLORS[3]),A.ansi[4]=R(L.blue,a.DEFAULT_ANSI_COLORS[4]),A.ansi[5]=R(L.magenta,a.DEFAULT_ANSI_COLORS[5]),A.ansi[6]=R(L.cyan,a.DEFAULT_ANSI_COLORS[6]),A.ansi[7]=R(L.white,a.DEFAULT_ANSI_COLORS[7]),A.ansi[8]=R(L.brightBlack,a.DEFAULT_ANSI_COLORS[8]),A.ansi[9]=R(L.brightRed,a.DEFAULT_ANSI_COLORS[9]),A.ansi[10]=R(L.brightGreen,a.DEFAULT_ANSI_COLORS[10]),A.ansi[11]=R(L.brightYellow,a.DEFAULT_ANSI_COLORS[11]),A.ansi[12]=R(L.brightBlue,a.DEFAULT_ANSI_COLORS[12]),A.ansi[13]=R(L.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),A.ansi[14]=R(L.brightCyan,a.DEFAULT_ANSI_COLORS[14]),A.ansi[15]=R(L.brightWhite,a.DEFAULT_ANSI_COLORS[15]),L.extendedAnsi){const j=Math.min(A.ansi.length-16,L.extendedAnsi.length);for(let M=0;M<j;M++)A.ansi[M+16]=R(L.extendedAnsi[M],a.DEFAULT_ANSI_COLORS[M+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(L){this._restoreColor(L),this._onChangeColors.fire(this.colors)}_restoreColor(L){if(L!==void 0)switch(L){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[L]=this._restoreColors.ansi[L]}else for(let A=0;A<this._restoreColors.ansi.length;++A)this._colors.ansi[A]=this._restoreColors.ansi[A]}modifyColors(L){L(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 R(L,A){if(L!==void 0)try{return _.css.toColor(L)}catch{}return A}a.ThemeService=D=d([m(0,S.IOptionsService)],D)},6349:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const d=h(8460),m=h(844);class c extends m.Disposable{constructor(y){super(),this._maxLength=y,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(y){if(this._maxLength===y)return;const E=new Array(y);for(let S=0;S<Math.min(y,this.length);S++)E[S]=this._array[this._getCyclicIndex(S)];this._array=E,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let E=this._length;E<y;E++)this._array[E]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,E){this._array[this._getCyclicIndex(y)]=E}push(y){this._array[this._getCyclicIndex(this._length)]=y,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(y,E,...S){if(E){for(let g=y;g<this._length-E;g++)this._array[this._getCyclicIndex(g)]=this._array[this._getCyclicIndex(g+E)];this._length-=E,this.onDeleteEmitter.fire({index:y,amount:E})}for(let g=this._length-1;g>=y;g--)this._array[this._getCyclicIndex(g+S.length)]=this._array[this._getCyclicIndex(g)];for(let g=0;g<S.length;g++)this._array[this._getCyclicIndex(y+g)]=S[g];if(S.length&&this.onInsertEmitter.fire({index:y,amount:S.length}),this._length+S.length>this._maxLength){const g=this._length+S.length-this._maxLength;this._startIndex+=g,this._length=this._maxLength,this.onTrimEmitter.fire(g)}else this._length+=S.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,E,S){if(!(E<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let b=E-1;b>=0;b--)this.set(y+b+S,this.get(y+b));const g=y+E+S-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let g=0;g<E;g++)this.set(y+g+S,this.get(y+g))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}a.CircularList=c},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function h(d,m=5){if(typeof d!="object")return d;const c=Array.isArray(d)?[]:{};for(const _ in d)c[_]=m<=1?d[_]:d[_]&&h(d[_],m-1);return c}},8055:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let h=0,d=0,m=0,c=0;var _,y,E,S,g;function b(x){const T=x.toString(16);return T.length<2?"0"+T:T}function w(x,T){return x<T?(T+.05)/(x+.05):(x+.05)/(T+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(x){x.toCss=function(T,D,R,L){return L!==void 0?`#${b(T)}${b(D)}${b(R)}${b(L)}`:`#${b(T)}${b(D)}${b(R)}`},x.toRgba=function(T,D,R,L=255){return(T<<24|D<<16|R<<8|L)>>>0},x.toColor=function(T,D,R,L){return{css:x.toCss(T,D,R,L),rgba:x.toRgba(T,D,R,L)}}})(_||(a.channels=_={})),(function(x){function T(D,R){return c=Math.round(255*R),[h,d,m]=g.toChannels(D.rgba),{css:_.toCss(h,d,m,c),rgba:_.toRgba(h,d,m,c)}}x.blend=function(D,R){if(c=(255&R.rgba)/255,c===1)return{css:R.css,rgba:R.rgba};const L=R.rgba>>24&255,A=R.rgba>>16&255,j=R.rgba>>8&255,M=D.rgba>>24&255,I=D.rgba>>16&255,B=D.rgba>>8&255;return h=M+Math.round((L-M)*c),d=I+Math.round((A-I)*c),m=B+Math.round((j-B)*c),{css:_.toCss(h,d,m),rgba:_.toRgba(h,d,m)}},x.isOpaque=function(D){return(255&D.rgba)==255},x.ensureContrastRatio=function(D,R,L){const A=g.ensureContrastRatio(D.rgba,R.rgba,L);if(A)return _.toColor(A>>24&255,A>>16&255,A>>8&255)},x.opaque=function(D){const R=(255|D.rgba)>>>0;return[h,d,m]=g.toChannels(R),{css:_.toCss(h,d,m),rgba:R}},x.opacity=T,x.multiplyOpacity=function(D,R){return c=255&D.rgba,T(D,c*R/255)},x.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(y||(a.color=y={})),(function(x){let T,D;try{const R=document.createElement("canvas");R.width=1,R.height=1;const L=R.getContext("2d",{willReadFrequently:!0});L&&(T=L,T.globalCompositeOperation="copy",D=T.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(R){if(R.match(/#[\da-f]{3,8}/i))switch(R.length){case 4:return h=parseInt(R.slice(1,2).repeat(2),16),d=parseInt(R.slice(2,3).repeat(2),16),m=parseInt(R.slice(3,4).repeat(2),16),_.toColor(h,d,m);case 5:return h=parseInt(R.slice(1,2).repeat(2),16),d=parseInt(R.slice(2,3).repeat(2),16),m=parseInt(R.slice(3,4).repeat(2),16),c=parseInt(R.slice(4,5).repeat(2),16),_.toColor(h,d,m,c);case 7:return{css:R,rgba:(parseInt(R.slice(1),16)<<8|255)>>>0};case 9:return{css:R,rgba:parseInt(R.slice(1),16)>>>0}}const L=R.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(L)return h=parseInt(L[1]),d=parseInt(L[2]),m=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),_.toColor(h,d,m,c);if(!T||!D)throw new Error("css.toColor: Unsupported css format");if(T.fillStyle=D,T.fillStyle=R,typeof T.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(T.fillRect(0,0,1,1),[h,d,m,c]=T.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(h,d,m,c),css:R}}})(E||(a.css=E={})),(function(x){function T(D,R,L){const A=D/255,j=R/255,M=L/255;return .2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}x.relativeLuminance=function(D){return T(D>>16&255,D>>8&255,255&D)},x.relativeLuminance2=T})(S||(a.rgb=S={})),(function(x){function T(R,L,A){const j=R>>24&255,M=R>>16&255,I=R>>8&255;let B=L>>24&255,H=L>>16&255,U=L>>8&255,W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));for(;W<A&&(B>0||H>0||U>0);)B-=Math.max(0,Math.ceil(.1*B)),H-=Math.max(0,Math.ceil(.1*H)),U-=Math.max(0,Math.ceil(.1*U)),W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));return(B<<24|H<<16|U<<8|255)>>>0}function D(R,L,A){const j=R>>24&255,M=R>>16&255,I=R>>8&255;let B=L>>24&255,H=L>>16&255,U=L>>8&255,W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));for(;W<A&&(B<255||H<255||U<255);)B=Math.min(255,B+Math.ceil(.1*(255-B))),H=Math.min(255,H+Math.ceil(.1*(255-H))),U=Math.min(255,U+Math.ceil(.1*(255-U))),W=w(S.relativeLuminance2(B,H,U),S.relativeLuminance2(j,M,I));return(B<<24|H<<16|U<<8|255)>>>0}x.blend=function(R,L){if(c=(255&L)/255,c===1)return L;const A=L>>24&255,j=L>>16&255,M=L>>8&255,I=R>>24&255,B=R>>16&255,H=R>>8&255;return h=I+Math.round((A-I)*c),d=B+Math.round((j-B)*c),m=H+Math.round((M-H)*c),_.toRgba(h,d,m)},x.ensureContrastRatio=function(R,L,A){const j=S.relativeLuminance(R>>8),M=S.relativeLuminance(L>>8);if(w(j,M)<A){if(M<j){const H=T(R,L,A),U=w(j,S.relativeLuminance(H>>8));if(U<A){const W=D(R,L,A);return U>w(j,S.relativeLuminance(W>>8))?H:W}return H}const I=D(R,L,A),B=w(j,S.relativeLuminance(I>>8));if(B<A){const H=T(R,L,A);return B>w(j,S.relativeLuminance(H>>8))?I:H}return I}},x.reduceLuminance=T,x.increaseLuminance=D,x.toChannels=function(R){return[R>>24&255,R>>16&255,R>>8&255,255&R]}})(g||(a.rgba=g={})),a.toPaddedHex=b,a.contrastRatio=w},8969:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const d=h(844),m=h(2585),c=h(4348),_=h(7866),y=h(744),E=h(7302),S=h(6975),g=h(8460),b=h(1753),w=h(1480),x=h(7994),T=h(9282),D=h(5435),R=h(5981),L=h(2660);let A=!1;class j extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new g.EventEmitter),this._onScroll.event((I=>{var B;(B=this._onScrollApi)==null||B.fire(I.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(I){for(const B in I)this.optionsService.options[B]=I[B]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new g.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new g.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new g.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new g.EventEmitter),this._instantiationService=new c.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(L.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new D.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,g.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,g.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,g.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,g.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((B=>{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((B=>{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 R.WriteBuffer(((B,H)=>this._inputHandler.parse(B,H)))),this.register((0,g.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,B){this._writeBuffer.write(I,B)}writeSync(I,B){this._logService.logLevel<=m.LogLevelEnum.WARN&&!A&&(this._logService.warn("writeSync is unreliable and will be removed soon."),A=!0),this._writeBuffer.writeSync(I,B)}input(I,B=!0){this.coreService.triggerDataEvent(I,B)}resize(I,B){isNaN(I)||isNaN(B)||(I=Math.max(I,y.MINIMUM_COLS),B=Math.max(B,y.MINIMUM_ROWS),this._bufferService.resize(I,B))}scroll(I,B=!1){this._bufferService.scroll(I,B)}scrollLines(I,B,H){this._bufferService.scrollLines(I,B,H)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const B=I-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(I,B){return this._inputHandler.registerEscHandler(I,B)}registerDcsHandler(I,B){return this._inputHandler.registerDcsHandler(I,B)}registerCsiHandler(I,B){return this._inputHandler.registerCsiHandler(I,B)}registerOscHandler(I,B){return this._inputHandler.registerOscHandler(I,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?I=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(T.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,T.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const B of I)B.dispose()}))}}}a.CoreTerminal=j},8460:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const m=[];for(let c=0;c<this._listeners.length;c++)m.push(this._listeners[c]);for(let c=0;c<m.length;c++)m[c].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(h,d){return h((m=>d.fire(m)))},a.runAndSubscribe=function(h,d){return d(void 0),h((m=>d(m)))}},5435:function(f,a,h){var d=this&&this.__decorate||function(K,z,O,G){var Z,F=arguments.length,V=F<3?z:G===null?G=Object.getOwnPropertyDescriptor(z,O):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(K,z,O,G);else for(var ne=K.length-1;ne>=0;ne--)(Z=K[ne])&&(V=(F<3?Z(V):F>3?Z(z,O,V):Z(z,O))||V);return F>3&&V&&Object.defineProperty(z,O,V),V},m=this&&this.__param||function(K,z){return function(O,G){z(O,G,K)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=h(2584),_=h(7116),y=h(2015),E=h(844),S=h(482),g=h(8437),b=h(8460),w=h(643),x=h(511),T=h(3734),D=h(2585),R=h(1480),L=h(6242),A=h(6351),j=h(5941),M={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function B(K,z){if(K>24)return z.setWinLines||!1;switch(K){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var H;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(H||(a.WindowsOptionsReportType=H={}));let U=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(z,O,G,Z,F,V,ne,le,X=new y.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=O,this._coreService=G,this._logService=Z,this._optionsService=F,this._oscLinkService=V,this._coreMouseService=ne,this._unicodeService=le,this._parser=X,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new x.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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(($=>this._activeBuffer=$.activeBuffer))),this._parser.setCsiHandlerFallback((($,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString($),params:oe.toArray()})})),this._parser.setEscHandlerFallback(($=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString($)})})),this._parser.setExecuteHandlerFallback(($=>{this._logService.debug("Unknown EXECUTE code: ",{code:$})})),this._parser.setOscHandlerFallback((($,oe,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:$,action:oe,data:ee})})),this._parser.setDcsHandlerFallback((($,oe,ee)=>{oe==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString($),action:oe,payload:ee})})),this._parser.setPrintHandler((($,oe,ee)=>this.print($,oe,ee))),this._parser.registerCsiHandler({final:"@"},($=>this.insertChars($))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},($=>this.scrollLeft($))),this._parser.registerCsiHandler({final:"A"},($=>this.cursorUp($))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},($=>this.scrollRight($))),this._parser.registerCsiHandler({final:"B"},($=>this.cursorDown($))),this._parser.registerCsiHandler({final:"C"},($=>this.cursorForward($))),this._parser.registerCsiHandler({final:"D"},($=>this.cursorBackward($))),this._parser.registerCsiHandler({final:"E"},($=>this.cursorNextLine($))),this._parser.registerCsiHandler({final:"F"},($=>this.cursorPrecedingLine($))),this._parser.registerCsiHandler({final:"G"},($=>this.cursorCharAbsolute($))),this._parser.registerCsiHandler({final:"H"},($=>this.cursorPosition($))),this._parser.registerCsiHandler({final:"I"},($=>this.cursorForwardTab($))),this._parser.registerCsiHandler({final:"J"},($=>this.eraseInDisplay($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},($=>this.eraseInDisplay($,!0))),this._parser.registerCsiHandler({final:"K"},($=>this.eraseInLine($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},($=>this.eraseInLine($,!0))),this._parser.registerCsiHandler({final:"L"},($=>this.insertLines($))),this._parser.registerCsiHandler({final:"M"},($=>this.deleteLines($))),this._parser.registerCsiHandler({final:"P"},($=>this.deleteChars($))),this._parser.registerCsiHandler({final:"S"},($=>this.scrollUp($))),this._parser.registerCsiHandler({final:"T"},($=>this.scrollDown($))),this._parser.registerCsiHandler({final:"X"},($=>this.eraseChars($))),this._parser.registerCsiHandler({final:"Z"},($=>this.cursorBackwardTab($))),this._parser.registerCsiHandler({final:"`"},($=>this.charPosAbsolute($))),this._parser.registerCsiHandler({final:"a"},($=>this.hPositionRelative($))),this._parser.registerCsiHandler({final:"b"},($=>this.repeatPrecedingCharacter($))),this._parser.registerCsiHandler({final:"c"},($=>this.sendDeviceAttributesPrimary($))),this._parser.registerCsiHandler({prefix:">",final:"c"},($=>this.sendDeviceAttributesSecondary($))),this._parser.registerCsiHandler({final:"d"},($=>this.linePosAbsolute($))),this._parser.registerCsiHandler({final:"e"},($=>this.vPositionRelative($))),this._parser.registerCsiHandler({final:"f"},($=>this.hVPosition($))),this._parser.registerCsiHandler({final:"g"},($=>this.tabClear($))),this._parser.registerCsiHandler({final:"h"},($=>this.setMode($))),this._parser.registerCsiHandler({prefix:"?",final:"h"},($=>this.setModePrivate($))),this._parser.registerCsiHandler({final:"l"},($=>this.resetMode($))),this._parser.registerCsiHandler({prefix:"?",final:"l"},($=>this.resetModePrivate($))),this._parser.registerCsiHandler({final:"m"},($=>this.charAttributes($))),this._parser.registerCsiHandler({final:"n"},($=>this.deviceStatus($))),this._parser.registerCsiHandler({prefix:"?",final:"n"},($=>this.deviceStatusPrivate($))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},($=>this.softReset($))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},($=>this.setCursorStyle($))),this._parser.registerCsiHandler({final:"r"},($=>this.setScrollRegion($))),this._parser.registerCsiHandler({final:"s"},($=>this.saveCursor($))),this._parser.registerCsiHandler({final:"t"},($=>this.windowOptions($))),this._parser.registerCsiHandler({final:"u"},($=>this.restoreCursor($))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},($=>this.insertColumns($))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},($=>this.deleteColumns($))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},($=>this.selectProtected($))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},($=>this.requestMode($,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},($=>this.requestMode($,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new L.OscHandler(($=>(this.setTitle($),this.setIconName($),!0)))),this._parser.registerOscHandler(1,new L.OscHandler(($=>this.setIconName($)))),this._parser.registerOscHandler(2,new L.OscHandler(($=>this.setTitle($)))),this._parser.registerOscHandler(4,new L.OscHandler(($=>this.setOrReportIndexedColor($)))),this._parser.registerOscHandler(8,new L.OscHandler(($=>this.setHyperlink($)))),this._parser.registerOscHandler(10,new L.OscHandler(($=>this.setOrReportFgColor($)))),this._parser.registerOscHandler(11,new L.OscHandler(($=>this.setOrReportBgColor($)))),this._parser.registerOscHandler(12,new L.OscHandler(($=>this.setOrReportCursorColor($)))),this._parser.registerOscHandler(104,new L.OscHandler(($=>this.restoreIndexedColor($)))),this._parser.registerOscHandler(110,new L.OscHandler(($=>this.restoreFgColor($)))),this._parser.registerOscHandler(111,new L.OscHandler(($=>this.restoreBgColor($)))),this._parser.registerOscHandler(112,new L.OscHandler(($=>this.restoreCursorColor($)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const $ in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:$},(()=>this.selectCharset("("+$))),this._parser.registerEscHandler({intermediates:")",final:$},(()=>this.selectCharset(")"+$))),this._parser.registerEscHandler({intermediates:"*",final:$},(()=>this.selectCharset("*"+$))),this._parser.registerEscHandler({intermediates:"+",final:$},(()=>this.selectCharset("+"+$))),this._parser.registerEscHandler({intermediates:"-",final:$},(()=>this.selectCharset("-"+$))),this._parser.registerEscHandler({intermediates:".",final:$},(()=>this.selectCharset("."+$))),this._parser.registerEscHandler({intermediates:"/",final:$},(()=>this.selectCharset("/"+$)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler(($=>(this._logService.error("Parsing error: ",$),$))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new A.DcsHandler((($,oe)=>this.requestStatusString($,oe))))}_preserveStack(z,O,G,Z){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=G,this._parseStack.position=Z}_logSlowResolvingAsync(z){this._logService.logLevel<=D.LogLevelEnum.WARN&&Promise.race([z,new Promise(((O,G)=>setTimeout((()=>G("#SLOW_TIMEOUT")),5e3)))]).catch((O=>{if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(z,O){let G,Z=this._activeBuffer.x,F=this._activeBuffer.y,V=0;const ne=this._parseStack.paused;if(ne){if(G=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(G),G;Z=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>I&&(V=this._parseStack.position+I)}if(this._logService.logLevel<=D.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,($=>String.fromCharCode($))).join("")}"`),typeof z=="string"?z.split("").map(($=>$.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(z.length,I))),ne||this._dirtyRowTracker.clearRange(),z.length>I)for(let $=V;$<z.length;$+=I){const oe=$+I<z.length?$+I:z.length,ee=typeof z=="string"?this._stringDecoder.decode(z.substring($,oe),this._parseBuffer):this._utf8Decoder.decode(z.subarray($,oe),this._parseBuffer);if(G=this._parser.parse(this._parseBuffer,ee))return this._preserveStack(Z,F,ee,$),this._logSlowResolvingAsync(G),G}else if(!ne){const $=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(G=this._parser.parse(this._parseBuffer,$))return this._preserveStack(Z,F,$,0),this._logSlowResolvingAsync(G),G}this._activeBuffer.x===Z&&this._activeBuffer.y===F||this._onCursorMove.fire();const le=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),X=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);X<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(X,this._bufferService.rows-1),Math.min(le,this._bufferService.rows-1))}print(z,O,G){let Z,F;const V=this._charsetService.charset,ne=this._optionsService.rawOptions.screenReaderMode,le=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,$=this._coreService.modes.insertMode,oe=this._curAttrData;let ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&G-O>0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let ue=this._parser.precedingJoinState;for(let he=O;he<G;++he){if(Z=z[he],Z<127&&V){const qe=V[String.fromCharCode(Z)];qe&&(Z=qe.charCodeAt(0))}const Se=this._unicodeService.charProperties(Z,ue);F=R.UnicodeService.extractWidth(Se);const be=R.UnicodeService.extractShouldJoin(Se),Re=be?R.UnicodeService.extractWidth(ue):0;if(ue=Se,ne&&this._onA11yChar.fire((0,S.stringFromCodePoint)(Z)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+F-Re>le){if(X){const qe=ee;let Ee=this._activeBuffer.x-Re;for(this._activeBuffer.x=Re,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),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Re>0&&ee instanceof g.BufferLine&&ee.copyCellsFrom(qe,Ee,0,Re,!1);Ee<le;)qe.setCellFromCodepoint(Ee++,0,1,oe)}else if(this._activeBuffer.x=le-1,F===2)continue}if(be&&this._activeBuffer.x){const qe=ee.getWidth(this._activeBuffer.x-1)?1:2;ee.addCodepointToCell(this._activeBuffer.x-qe,Z,F);for(let Ee=F-Re;--Ee>=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if($&&(ee.insertCells(this._activeBuffer.x,F-Re,this._activeBuffer.getNullCell(oe)),ee.getWidth(le-1)===2&&ee.setCellFromCodepoint(le-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,oe)),ee.setCellFromCodepoint(this._activeBuffer.x++,Z,F,oe),F>0)for(;--F;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=ue,this._activeBuffer.x<le&&G-O>0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,O){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,O):this._parser.registerCsiHandler(z,(G=>!B(G.params[0],this._optionsService.rawOptions.windowOptions)||O(G)))}registerDcsHandler(z,O){return this._parser.registerDcsHandler(z,new A.DcsHandler(O))}registerEscHandler(z,O){return this._parser.registerEscHandler(z,O)}registerOscHandler(z,O){return this._parser.registerOscHandler(z,new L.OscHandler(O))}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 z;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&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,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(z,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=z,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+O)}cursorUp(z){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const O=z.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=z.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=z.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const O=z.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,O,G,Z=!1,F=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.replaceCells(O,G,this._activeBuffer.getNullCell(this._eraseAttrData()),F),Z&&(V.isWrapped=!1)}_resetBufferLine(z,O=!1){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G&&(G.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),G.isWrapped=!1)}eraseInDisplay(z,O=!1){let G;switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:for(G=this._activeBuffer.y,this._dirtyRowTracker.markDirty(G),this._eraseInBufferLine(G++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);G<this._bufferService.rows;G++)this._resetBufferLine(G,O);this._dirtyRowTracker.markDirty(G);break;case 1:for(G=this._activeBuffer.y,this._dirtyRowTracker.markDirty(G),this._eraseInBufferLine(G,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(G+1).isWrapped=!1);G--;)this._resetBufferLine(G,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(G=this._bufferService.rows,this._dirtyRowTracker.markDirty(G-1);G--;)this._resetBufferLine(G,O);this._dirtyRowTracker.markDirty(0);break;case 3:const Z=this._activeBuffer.lines.length-this._bufferService.rows;Z>0&&(this._activeBuffer.lines.trimStart(Z),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Z,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Z,0),this._onScroll.fire(0))}return!0}eraseInLine(z,O=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,O);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,O)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(z){this._restrictCursor();let O=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=this._activeBuffer.ybase+this._activeBuffer.y,Z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-Z+1;for(;O--;)this._activeBuffer.lines.splice(F-1,1),this._activeBuffer.lines.splice(G,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(z){this._restrictCursor();let O=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=this._activeBuffer.ybase+this._activeBuffer.y;let Z;for(Z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Z=this._bufferService.rows-1+this._activeBuffer.ybase-Z;O--;)this._activeBuffer.lines.splice(G,1),this._activeBuffer.lines.splice(Z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let O=z.params[0]||1;for(;O--;)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(z){let O=z.params[0]||1;for(;O--;)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(g.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const O=this._parser.precedingJoinState;if(!O)return!0;const G=z.params[0]||1,Z=R.UnicodeService.extractWidth(O),F=this._activeBuffer.x-Z,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(F),ne=new Uint32Array(V.length*G);let le=0;for(let $=0;$<V.length;){const oe=V.codePointAt($)||0;ne[le++]=oe,$+=oe>65535?2:1}let X=le;for(let $=1;$<G;++$)ne.copyWithin(X,0,le),X+=le;return this.print(ne,0,X),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let O=0;O<z.length;O++)switch(z.params[O]){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(),z.params[O]===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(z,O){const G=this._coreService.decPrivateModes,{activeProtocol:Z,activeEncoding:F}=this._coreMouseService,V=this._coreService,{buffers:ne,cols:le}=this._bufferService,{active:X,alt:$}=ne,oe=this._optionsService.rawOptions,ee=be=>be?1:2,ue=z.params[0];return he=ue,Se=O?ue===2?4:ue===4?ee(V.modes.insertMode):ue===12?3:ue===20?ee(oe.convertEol):0:ue===1?ee(G.applicationCursorKeys):ue===3?oe.windowOptions.setWinLines?le===80?2:le===132?1:0:0:ue===6?ee(G.origin):ue===7?ee(G.wraparound):ue===8?3:ue===9?ee(Z==="X10"):ue===12?ee(oe.cursorBlink):ue===25?ee(!V.isCursorHidden):ue===45?ee(G.reverseWraparound):ue===66?ee(G.applicationKeypad):ue===67?4:ue===1e3?ee(Z==="VT200"):ue===1002?ee(Z==="DRAG"):ue===1003?ee(Z==="ANY"):ue===1004?ee(G.sendFocus):ue===1005?4:ue===1006?ee(F==="SGR"):ue===1015?4:ue===1016?ee(F==="SGR_PIXELS"):ue===1048?1:ue===47||ue===1047||ue===1049?ee(X===$):ue===2004?ee(G.bracketedPasteMode):0,V.triggerDataEvent(`${c.C0.ESC}[${O?"":"?"}${he};${Se}$y`),!0;var he,Se}_updateAttrColor(z,O,G,Z,F){return O===2?(z|=50331648,z&=-16777216,z|=T.AttributeData.fromColorRGB([G,Z,F])):O===5&&(z&=-50331904,z|=33554432|255&G),z}_extractColor(z,O,G){const Z=[0,0,-1,0,0,0];let F=0,V=0;do{if(Z[V+F]=z.params[O+V],z.hasSubParams(O+V)){const ne=z.getSubParams(O+V);let le=0;do Z[1]===5&&(F=1),Z[V+le+1+F]=ne[le];while(++le<ne.length&&le+V+1+F<Z.length);break}if(Z[1]===5&&V+F>=2||Z[1]===2&&V+F>=5)break;Z[1]&&(F=1)}while(++V+O<z.length&&V+F<Z.length);for(let ne=2;ne<Z.length;++ne)Z[ne]===-1&&(Z[ne]=0);switch(Z[0]){case 38:G.fg=this._updateAttrColor(G.fg,Z[1],Z[3],Z[4],Z[5]);break;case 48:G.bg=this._updateAttrColor(G.bg,Z[1],Z[3],Z[4],Z[5]);break;case 58:G.extended=G.extended.clone(),G.extended.underlineColor=this._updateAttrColor(G.extended.underlineColor,Z[1],Z[3],Z[4],Z[5])}return V}_processUnderline(z,O){O.extended=O.extended.clone(),(!~z||z>5)&&(z=1),O.extended.underlineStyle=z,O.fg|=268435456,z===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(z){z.fg=g.DEFAULT_ATTR_DATA.fg,z.bg=g.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=z.length;let G;const Z=this._curAttrData;for(let F=0;F<O;F++)G=z.params[F],G>=30&&G<=37?(Z.fg&=-50331904,Z.fg|=16777216|G-30):G>=40&&G<=47?(Z.bg&=-50331904,Z.bg|=16777216|G-40):G>=90&&G<=97?(Z.fg&=-50331904,Z.fg|=16777224|G-90):G>=100&&G<=107?(Z.bg&=-50331904,Z.bg|=16777224|G-100):G===0?this._processSGR0(Z):G===1?Z.fg|=134217728:G===3?Z.bg|=67108864:G===4?(Z.fg|=268435456,this._processUnderline(z.hasSubParams(F)?z.getSubParams(F)[0]:1,Z)):G===5?Z.fg|=536870912:G===7?Z.fg|=67108864:G===8?Z.fg|=1073741824:G===9?Z.fg|=2147483648:G===2?Z.bg|=134217728:G===21?this._processUnderline(2,Z):G===22?(Z.fg&=-134217729,Z.bg&=-134217729):G===23?Z.bg&=-67108865:G===24?(Z.fg&=-268435457,this._processUnderline(0,Z)):G===25?Z.fg&=-536870913:G===27?Z.fg&=-67108865:G===28?Z.fg&=-1073741825:G===29?Z.fg&=2147483647:G===39?(Z.fg&=-67108864,Z.fg|=16777215&g.DEFAULT_ATTR_DATA.fg):G===49?(Z.bg&=-67108864,Z.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):G===38||G===48||G===58?F+=this._extractColor(z,F,Z):G===53?Z.bg|=1073741824:G===55?Z.bg&=-1073741825:G===59?(Z.extended=Z.extended.clone(),Z.extended.underlineColor=-1,Z.updateExtended()):G===100?(Z.fg&=-67108864,Z.fg|=16777215&g.DEFAULT_ATTR_DATA.fg,Z.bg&=-67108864,Z.bg|=16777215&g.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",G);return!0}deviceStatus(z){switch(z.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,G=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${O};${G}R`)}return!0}deviceStatusPrivate(z){if(z.params[0]===6){const O=this._activeBuffer.y+1,G=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${O};${G}R`)}return!0}softReset(z){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=g.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(z){const O=z.params[0]||1;switch(O){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const G=O%2==1;return this._optionsService.options.cursorBlink=G,!0}setScrollRegion(z){const O=z.params[0]||1;let G;return(z.length<2||(G=z.params[1])>this._bufferService.rows||G===0)&&(G=this._bufferService.rows),G>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=G-1,this._setCursor(0,0)),!0}windowOptions(z){if(!B(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(H.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(H.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(z){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(z){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(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const O=[],G=z.split(";");for(;G.length>1;){const Z=G.shift(),F=G.shift();if(/^\d+$/.exec(Z)){const V=parseInt(Z);if(Q(V))if(F==="?")O.push({type:0,index:V});else{const ne=(0,j.parseColor)(F);ne&&O.push({type:1,index:V,color:ne})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(z){const O=z.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(z,O){this._getCurrentLinkId()&&this._finishHyperlink();const G=z.split(":");let Z;const F=G.findIndex((V=>V.startsWith("id=")));return F!==-1&&(Z=G[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Z,uri:O}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(z,O){const G=z.split(";");for(let Z=0;Z<G.length&&!(O>=this._specialColors.length);++Z,++O)if(G[Z]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const F=(0,j.parseColor)(G[Z]);F&&this._onColor.fire([{type:1,index:this._specialColors[O],color:F}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const O=[],G=z.split(";");for(let Z=0;Z<G.length;++Z)if(/^\d+$/.exec(G[Z])){const F=parseInt(G[Z]);Q(F)&&O.push({type:2,index:F})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(M[z[0]],_.CHARSETS[z[1]]||_.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,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=g.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=g.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new x.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const G=this._activeBuffer.ybase+this._activeBuffer.y+O,Z=this._activeBuffer.lines.get(G);Z&&(Z.fill(z),Z.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,O){const G=this._bufferService.buffer,Z=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${F}${c.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${G.scrollTop+1};${G.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[Z.cursorStyle]-(Z.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,O){this._dirtyRowTracker.markRangeDirty(z,O)}}a.InputHandler=W;let Y=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,z){K>z&&(U=K,K=z,z=U),K<this.start&&(this.start=K),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Q(K){return 0<=K&&K<256}Y=d([m(0,D.IBufferService)],Y)},844:(f,a)=>{function h(d){for(const m of d)m.dispose();d.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var m;this._isDisposed||d===this._value||((m=this._value)==null||m.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}},a.toDisposable=function(d){return{dispose:d}},a.disposeArray=h,a.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(m,c,_){this._data[m]||(this._data[m]={}),this._data[m][c]=_}get(m,c){return this._data[m]?this._data[m][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=h,a.FourKeyMap=class{constructor(){this._data=new h}set(d,m,c,_,y){this._data.get(d,m)||this._data.set(d,m,new h),this._data.get(d,m).set(c,_,y)}get(d,m,c,_){var y;return(y=this._data.get(d,m))==null?void 0:y.get(c,_)}clear(){this._data.clear()}}},6114:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const h=a.isNode?"node":navigator.userAgent,d=a.isNode?"node":navigator.platform;a.isFirefox=h.includes("Firefox"),a.isLegacyEdge=h.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(h),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=h.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),a.isIpad=d==="iPad",a.isIphone=d==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),a.isLinux=d.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(h)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let h=0;a.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(h=this._search(this._getKey(d)),this._array.splice(h,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const m=this._getKey(d);if(m===void 0||(h=this._search(m),h===-1)||this._getKey(this._array[h])!==m)return!1;do if(this._array[h]===d)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===m);return!1}*getKeyIterator(d){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===d)}forEachByKey(d,m){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do m(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===d)}values(){return[...this._array].values()}_search(d){let m=0,c=this._array.length-1;for(;c>=m;){let _=m+c>>1;const y=this._getKey(this._array[_]);if(y>d)c=_-1;else{if(!(y<d)){for(;_>0&&this._getKey(this._array[_-1])===d;)_--;return _}m=_+1}}return m}}},7226:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const d=h(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let E=0,S=0,g=y.timeRemaining(),b=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),S=Math.max(E,S),b=y.timeRemaining(),1.5*S>b)return g-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(g-E))}ms`),void this._start();g=b}this.clear()}}class c extends m{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const E=Date.now()+y;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=c,a.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const d=h(643);a.updateWindowsModeWrappedState=function(m){const c=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),_=c==null?void 0:c.get(m.cols-1),y=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);y&&_&&(y.isWrapped=_[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&_[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new h;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,_=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=_}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=d},9092:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const d=h(6349),m=h(7226),c=h(3734),_=h(8437),y=h(4634),E=h(511),S=h(643),g=h(4863),b=h(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(w,x,T){this._hasScrollback=w,this._optionsService=x,this._bufferService=T,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=b.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,x){return new _.BufferLine(this._bufferService.cols,this.getNullCell(w),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const w=this.ybase+this.y-this.ydisp;return w>=0&&w<this._rows}_getCorrectBufferLength(w){if(!this._hasScrollback)return w;const x=w+this._optionsService.rawOptions.scrollback;return x>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:x}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=_.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(w))}}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(w,x){const T=this.getNullCell(_.DEFAULT_ATTR_DATA);let D=0;const R=this._getCorrectBufferLength(x);if(R>this.lines.maxLength&&(this.lines.maxLength=R),this.lines.length>0){if(this._cols<w)for(let A=0;A<this.lines.length;A++)D+=+this.lines.get(A).resize(w,T);let L=0;if(this._rows<x)for(let A=this._rows;A<x;A++)this.lines.length<x+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.BufferLine(w,T)):this.ybase>0&&this.lines.length<=this.ybase+this.y+L+1?(this.ybase--,L++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(w,T)));else for(let A=this._rows;A>x;A--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(R<this.lines.maxLength){const A=this.lines.length-R;A>0&&(this.lines.trimStart(A),this.ybase=Math.max(this.ybase-A,0),this.ydisp=Math.max(this.ydisp-A,0),this.savedY=Math.max(this.savedY-A,0)),this.lines.maxLength=R}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,x-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(w,x),this._cols>w))for(let L=0;L<this.lines.length;L++)D+=+this.lines.get(L).resize(w,T);this._cols=w,this._rows=x,this._memoryCleanupQueue.clear(),D>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let x=0;for(;this._memoryCleanupPosition<this.lines.length;)if(x+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),x>100)return!0;return w}get _isReflowEnabled(){const w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,x){this._cols!==w&&(w>this._cols?this._reflowLarger(w,x):this._reflowSmaller(w,x))}_reflowLarger(w,x){const T=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(T.length>0){const D=(0,y.reflowLargerCreateNewLayout)(this.lines,T);(0,y.reflowLargerApplyNewLayout)(this.lines,D.layout),this._reflowLargerAdjustViewport(w,x,D.countRemoved)}}_reflowLargerAdjustViewport(w,x,T){const D=this.getNullCell(_.DEFAULT_ATTR_DATA);let R=T;for(;R-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<x&&this.lines.push(new _.BufferLine(w,D))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-T,0)}_reflowSmaller(w,x){const T=this.getNullCell(_.DEFAULT_ATTR_DATA),D=[];let R=0;for(let L=this.lines.length-1;L>=0;L--){let A=this.lines.get(L);if(!A||!A.isWrapped&&A.getTrimmedLength()<=w)continue;const j=[A];for(;A.isWrapped&&L>0;)A=this.lines.get(--L),j.unshift(A);const M=this.ybase+this.y;if(M>=L&&M<L+j.length)continue;const I=j[j.length-1].getTrimmedLength(),B=(0,y.reflowSmallerGetNewLineLengths)(j,this._cols,w),H=B.length-j.length;let U;U=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+H):Math.max(0,this.lines.length-this.lines.maxLength+H);const W=[];for(let G=0;G<H;G++){const Z=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);W.push(Z)}W.length>0&&(D.push({start:L+j.length+R,newLines:W}),R+=W.length),j.push(...W);let Y=B.length-1,Q=B[Y];Q===0&&(Y--,Q=B[Y]);let K=j.length-H-1,z=I;for(;K>=0;){const G=Math.min(z,Q);if(j[Y]===void 0)break;if(j[Y].copyCellsFrom(j[K],z-G,Q-G,G,!0),Q-=G,Q===0&&(Y--,Q=B[Y]),z-=G,z===0){K--;const Z=Math.max(K,0);z=(0,y.getWrappedLineTrimmedLength)(j,Z,this._cols)}}for(let G=0;G<j.length;G++)B[G]<w&&j[G].setCell(B[G],T);let O=H-U;for(;O-- >0;)this.ybase===0?this.y<x-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+R)-x&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+H,this.ybase+x-1)}if(D.length>0){const L=[],A=[];for(let Y=0;Y<this.lines.length;Y++)A.push(this.lines.get(Y));const j=this.lines.length;let M=j-1,I=0,B=D[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+R);let H=0;for(let Y=Math.min(this.lines.maxLength-1,j+R-1);Y>=0;Y--)if(B&&B.start>M+H){for(let Q=B.newLines.length-1;Q>=0;Q--)this.lines.set(Y--,B.newLines[Q]);Y++,L.push({index:M+1,amount:B.newLines.length}),H+=B.newLines.length,B=D[++I]}else this.lines.set(Y,A[M--]);let U=0;for(let Y=L.length-1;Y>=0;Y--)L[Y].index+=U,this.lines.onInsertEmitter.fire(L[Y]),U+=L[Y].amount;const W=Math.max(0,j+R-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(w,x,T=0,D){const R=this.lines.get(w);return R?R.translateToString(x,T,D):""}getWrappedRangeForLine(w){let x=w,T=w;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;T+1<this.lines.length&&this.lines.get(T+1).isWrapped;)T++;return{first:x,last:T}}setupTabStops(w){for(w!=null?this.tabs[w]||(w=this.prevStop(w)):(this.tabs={},w=0);w<this._cols;w+=this._optionsService.rawOptions.tabStopWidth)this.tabs[w]=!0}prevStop(w){for(w==null&&(w=this.x);!this.tabs[--w]&&w>0;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w<this._cols;);return w>=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let x=0;x<this.markers.length;x++)this.markers[x].line===w&&(this.markers[x].dispose(),this.markers.splice(x--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let w=0;w<this.markers.length;w++)this.markers[w].dispose(),this.markers.splice(w--,1);this._isClearing=!1}addMarker(w){const x=new g.Marker(w);return this.markers.push(x),x.register(this.lines.onTrim((T=>{x.line-=T,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((T=>{x.line>=T.index&&(x.line+=T.amount)}))),x.register(this.lines.onDelete((T=>{x.line>=T.index&&x.line<T.index+T.amount&&x.dispose(),x.line>T.index&&(x.line-=T.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const d=h(3734),m=h(511),c=h(643),_=h(482);a.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class E{constructor(g,b,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*g);const x=b||m.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let T=0;T<g;++T)this.setCell(T,x);this.length=g}get(g){const b=this._data[3*g+0],w=2097151&b;return[this._data[3*g+1],2097152&b?this._combined[g]:w?(0,_.stringFromCodePoint)(w):"",b>>22,2097152&b?this._combined[g].charCodeAt(this._combined[g].length-1):w]}set(g,b){this._data[3*g+1]=b[c.CHAR_DATA_ATTR_INDEX],b[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[g]=b[1],this._data[3*g+0]=2097152|g|b[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*g+0]=b[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[c.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(g){return this._data[3*g+0]>>22}hasWidth(g){return 12582912&this._data[3*g+0]}getFg(g){return this._data[3*g+1]}getBg(g){return this._data[3*g+2]}hasContent(g){return 4194303&this._data[3*g+0]}getCodePoint(g){const b=this._data[3*g+0];return 2097152&b?this._combined[g].charCodeAt(this._combined[g].length-1):2097151&b}isCombined(g){return 2097152&this._data[3*g+0]}getString(g){const b=this._data[3*g+0];return 2097152&b?this._combined[g]:2097151&b?(0,_.stringFromCodePoint)(2097151&b):""}isProtected(g){return 536870912&this._data[3*g+2]}loadCell(g,b){return y=3*g,b.content=this._data[y+0],b.fg=this._data[y+1],b.bg=this._data[y+2],2097152&b.content&&(b.combinedData=this._combined[g]),268435456&b.bg&&(b.extended=this._extendedAttrs[g]),b}setCell(g,b){2097152&b.content&&(this._combined[g]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[g]=b.extended),this._data[3*g+0]=b.content,this._data[3*g+1]=b.fg,this._data[3*g+2]=b.bg}setCellFromCodepoint(g,b,w,x){268435456&x.bg&&(this._extendedAttrs[g]=x.extended),this._data[3*g+0]=b|w<<22,this._data[3*g+1]=x.fg,this._data[3*g+2]=x.bg}addCodepointToCell(g,b,w){let x=this._data[3*g+0];2097152&x?this._combined[g]+=(0,_.stringFromCodePoint)(b):2097151&x?(this._combined[g]=(0,_.stringFromCodePoint)(2097151&x)+(0,_.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,w&&(x&=-12582913,x|=w<<22),this._data[3*g+0]=x}insertCells(g,b,w){if((g%=this.length)&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,w),b<this.length-g){const x=new m.CellData;for(let T=this.length-g-b-1;T>=0;--T)this.setCell(g+b+T,this.loadCell(g+T,x));for(let T=0;T<b;++T)this.setCell(g+T,w)}else for(let x=g;x<this.length;++x)this.setCell(x,w);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,w)}deleteCells(g,b,w){if(g%=this.length,b<this.length-g){const x=new m.CellData;for(let T=0;T<this.length-g-b;++T)this.setCell(g+T,this.loadCell(g+b+T,x));for(let T=this.length-b;T<this.length;++T)this.setCell(T,w)}else for(let x=g;x<this.length;++x)this.setCell(x,w);g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,w),this.getWidth(g)!==0||this.hasContent(g)||this.setCellFromCodepoint(g,0,1,w)}replaceCells(g,b,w,x=!1){if(x)for(g&&this.getWidth(g-1)===2&&!this.isProtected(g-1)&&this.setCellFromCodepoint(g-1,0,1,w),b<this.length&&this.getWidth(b-1)===2&&!this.isProtected(b)&&this.setCellFromCodepoint(b,0,1,w);g<b&&g<this.length;)this.isProtected(g)||this.setCell(g,w),g++;else for(g&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g-1,0,1,w),b<this.length&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b,0,1,w);g<b&&g<this.length;)this.setCell(g++,w)}resize(g,b){if(g===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const w=3*g;if(g>this.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{const x=new Uint32Array(w);x.set(this._data),this._data=x}for(let x=this.length;x<g;++x)this.setCell(x,b)}else{this._data=this._data.subarray(0,w);const x=Object.keys(this._combined);for(let D=0;D<x.length;D++){const R=parseInt(x[D],10);R>=g&&delete this._combined[R]}const T=Object.keys(this._extendedAttrs);for(let D=0;D<T.length;D++){const R=parseInt(T[D],10);R>=g&&delete this._extendedAttrs[R]}}return this.length=g,4*w*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const g=new Uint32Array(this._data.length);return g.set(this._data),this._data=g,1}return 0}fill(g,b=!1){if(b)for(let w=0;w<this.length;++w)this.isProtected(w)||this.setCell(w,g);else{this._combined={},this._extendedAttrs={};for(let w=0;w<this.length;++w)this.setCell(w,g)}}copyFrom(g){this.length!==g.length?this._data=new Uint32Array(g._data):this._data.set(g._data),this.length=g.length,this._combined={};for(const b in g._combined)this._combined[b]=g._combined[b];this._extendedAttrs={};for(const b in g._extendedAttrs)this._extendedAttrs[b]=g._extendedAttrs[b];this.isWrapped=g.isWrapped}clone(){const g=new E(0);g._data=new Uint32Array(this._data),g.length=this.length;for(const b in this._combined)g._combined[b]=this._combined[b];for(const b in this._extendedAttrs)g._extendedAttrs[b]=this._extendedAttrs[b];return g.isWrapped=this.isWrapped,g}getTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0])return g+(this._data[3*g+0]>>22);return 0}getNoBgTrimmedLength(){for(let g=this.length-1;g>=0;--g)if(4194303&this._data[3*g+0]||50331648&this._data[3*g+2])return g+(this._data[3*g+0]>>22);return 0}copyCellsFrom(g,b,w,x,T){const D=g._data;if(T)for(let L=x-1;L>=0;L--){for(let A=0;A<3;A++)this._data[3*(w+L)+A]=D[3*(b+L)+A];268435456&D[3*(b+L)+2]&&(this._extendedAttrs[w+L]=g._extendedAttrs[b+L])}else for(let L=0;L<x;L++){for(let A=0;A<3;A++)this._data[3*(w+L)+A]=D[3*(b+L)+A];268435456&D[3*(b+L)+2]&&(this._extendedAttrs[w+L]=g._extendedAttrs[b+L])}const R=Object.keys(g._combined);for(let L=0;L<R.length;L++){const A=parseInt(R[L],10);A>=b&&(this._combined[A-b+w]=g._combined[A])}}translateToString(g,b,w,x){b=b??0,w=w??this.length,g&&(w=Math.min(w,this.getTrimmedLength())),x&&(x.length=0);let T="";for(;b<w;){const D=this._data[3*b+0],R=2097151&D,L=2097152&D?this._combined[b]:R?(0,_.stringFromCodePoint)(R):c.WHITESPACE_CELL_CHAR;if(T+=L,x)for(let A=0;A<L.length;++A)x.push(b);b+=D>>22||1}return x&&x.push(b),T}}a.BufferLine=E},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(h,d){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return d*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(f,a)=>{function h(d,m,c){if(m===d.length-1)return d[m].getTrimmedLength();const _=!d[m].hasContent(c-1)&&d[m].getWidth(c-1)===1,y=d[m+1].getWidth(0)===2;return _&&y?c-1:c}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(d,m,c,_,y){const E=[];for(let S=0;S<d.length-1;S++){let g=S,b=d.get(++g);if(!b.isWrapped)continue;const w=[d.get(S)];for(;g<d.length&&b.isWrapped;)w.push(b),b=d.get(++g);if(_>=S&&_<g){S+=w.length-1;continue}let x=0,T=h(w,x,m),D=1,R=0;for(;D<w.length;){const A=h(w,D,m),j=A-R,M=c-T,I=Math.min(j,M);w[x].copyCellsFrom(w[D],R,T,I,!1),T+=I,T===c&&(x++,T=0),R+=I,R===A&&(D++,R=0),T===0&&x!==0&&w[x-1].getWidth(c-1)===2&&(w[x].copyCellsFrom(w[x-1],c-1,T++,1,!1),w[x-1].setCell(c-1,y))}w[x].replaceCells(T,c,y);let L=0;for(let A=w.length-1;A>0&&(A>x||w[A].getTrimmedLength()===0);A--)L++;L>0&&(E.push(S+w.length-L),E.push(L)),S+=w.length-1}return E},a.reflowLargerCreateNewLayout=function(d,m){const c=[];let _=0,y=m[_],E=0;for(let S=0;S<d.length;S++)if(y===S){const g=m[++_];d.onDeleteEmitter.fire({index:S-E,amount:g}),S+=g-1,E+=g,y=m[++_]}else c.push(S);return{layout:c,countRemoved:E}},a.reflowLargerApplyNewLayout=function(d,m){const c=[];for(let _=0;_<m.length;_++)c.push(d.get(m[_]));for(let _=0;_<c.length;_++)d.set(_,c[_]);d.length=m.length},a.reflowSmallerGetNewLineLengths=function(d,m,c){const _=[],y=d.map(((b,w)=>h(d,w,m))).reduce(((b,w)=>b+w));let E=0,S=0,g=0;for(;g<y;){if(y-g<c){_.push(y-g);break}E+=c;const b=h(d,S,m);E>b&&(E-=b,S++);const w=d[S].getWidth(E-1)===2;w&&E--;const x=w?c-1:c;_.push(x),g+=x}return _},a.getWrappedLineTrimmedLength=h},5295:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const d=h(8460),m=h(844),c=h(9092);class _ extends m.Disposable{constructor(E,S){super(),this._optionsService=E,this._bufferService=S,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 c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,S){this._normal.resize(E,S),this._alt.resize(E,S),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=_},511:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const d=h(482),m=h(643),c=h(3734);class _ extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const S=new _;return S.setFromCharData(E),S}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(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const g=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=g&&g<=56319){const b=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(g-55296)+b-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},643:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const d=h(8460),m=h(844);class c{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=c._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,m.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}a.Marker=c,c._nextId=1},7116:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(f,a)=>{var h,d,m;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
|
|
591
|
-
`,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL=""})(h||(a.C0=h={})),(function(c){c.PAD="",c.HOP="",c.BPH="",c.NBH="",c.IND="",c.NEL="
",c.SSA="",c.ESA="",c.HTS="",c.HTJ="",c.VTS="",c.PLD="",c.PLU="",c.RI="",c.SS2="",c.SS3="",c.DCS="",c.PU1="",c.PU2="",c.STS="",c.CCH="",c.MW="",c.SPA="",c.EPA="",c.SOS="",c.SGCI="",c.SCI="",c.CSI="",c.ST="",c.OSC="",c.PM="",c.APC=""})(d||(a.C1=d={})),(function(c){c.ST=`${h.ESC}\\`})(m||(a.C1_ESCAPED=m={}))},7399:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const d=h(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(c,_,y,E){const S={type:0,cancel:!1,key:void 0},g=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?S.key=_?d.C0.ESC+"OA":d.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?S.key=_?d.C0.ESC+"OD":d.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?S.key=_?d.C0.ESC+"OC":d.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(S.key=_?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:S.key=c.ctrlKey?"\b":d.C0.DEL,c.altKey&&(S.key=d.C0.ESC+S.key);break;case 9:if(c.shiftKey){S.key=d.C0.ESC+"[Z";break}S.key=d.C0.HT,S.cancel=!0;break;case 13:S.key=c.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,S.cancel=!0;break;case 27:S.key=d.C0.ESC,c.altKey&&(S.key=d.C0.ESC+d.C0.ESC),S.cancel=!0;break;case 37:if(c.metaKey)break;g?(S.key=d.C0.ESC+"[1;"+(g+1)+"D",S.key===d.C0.ESC+"[1;3D"&&(S.key=d.C0.ESC+(y?"b":"[1;5D"))):S.key=_?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(c.metaKey)break;g?(S.key=d.C0.ESC+"[1;"+(g+1)+"C",S.key===d.C0.ESC+"[1;3C"&&(S.key=d.C0.ESC+(y?"f":"[1;5C"))):S.key=_?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(c.metaKey)break;g?(S.key=d.C0.ESC+"[1;"+(g+1)+"A",y||S.key!==d.C0.ESC+"[1;3A"||(S.key=d.C0.ESC+"[1;5A")):S.key=_?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(c.metaKey)break;g?(S.key=d.C0.ESC+"[1;"+(g+1)+"B",y||S.key!==d.C0.ESC+"[1;3B"||(S.key=d.C0.ESC+"[1;5B")):S.key=_?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:c.shiftKey||c.ctrlKey||(S.key=d.C0.ESC+"[2~");break;case 46:S.key=g?d.C0.ESC+"[3;"+(g+1)+"~":d.C0.ESC+"[3~";break;case 36:S.key=g?d.C0.ESC+"[1;"+(g+1)+"H":_?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:S.key=g?d.C0.ESC+"[1;"+(g+1)+"F":_?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:c.shiftKey?S.type=2:c.ctrlKey?S.key=d.C0.ESC+"[5;"+(g+1)+"~":S.key=d.C0.ESC+"[5~";break;case 34:c.shiftKey?S.type=3:c.ctrlKey?S.key=d.C0.ESC+"[6;"+(g+1)+"~":S.key=d.C0.ESC+"[6~";break;case 112:S.key=g?d.C0.ESC+"[1;"+(g+1)+"P":d.C0.ESC+"OP";break;case 113:S.key=g?d.C0.ESC+"[1;"+(g+1)+"Q":d.C0.ESC+"OQ";break;case 114:S.key=g?d.C0.ESC+"[1;"+(g+1)+"R":d.C0.ESC+"OR";break;case 115:S.key=g?d.C0.ESC+"[1;"+(g+1)+"S":d.C0.ESC+"OS";break;case 116:S.key=g?d.C0.ESC+"[15;"+(g+1)+"~":d.C0.ESC+"[15~";break;case 117:S.key=g?d.C0.ESC+"[17;"+(g+1)+"~":d.C0.ESC+"[17~";break;case 118:S.key=g?d.C0.ESC+"[18;"+(g+1)+"~":d.C0.ESC+"[18~";break;case 119:S.key=g?d.C0.ESC+"[19;"+(g+1)+"~":d.C0.ESC+"[19~";break;case 120:S.key=g?d.C0.ESC+"[20;"+(g+1)+"~":d.C0.ESC+"[20~";break;case 121:S.key=g?d.C0.ESC+"[21;"+(g+1)+"~":d.C0.ESC+"[21~";break;case 122:S.key=g?d.C0.ESC+"[23;"+(g+1)+"~":d.C0.ESC+"[23~";break;case 123:S.key=g?d.C0.ESC+"[24;"+(g+1)+"~":d.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(y&&!E||!c.altKey||c.metaKey)!y||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?S.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(S.key=d.C0.US),c.key==="@"&&(S.key=d.C0.NUL)):c.keyCode===65&&(S.type=1);else{const b=m[c.keyCode],w=b==null?void 0:b[c.shiftKey?1:0];if(w)S.key=d.C0.ESC+w;else if(c.keyCode>=65&&c.keyCode<=90){const x=c.ctrlKey?c.keyCode-64:c.keyCode+32;let T=String.fromCharCode(x);c.shiftKey&&(T=T.toUpperCase()),S.key=d.C0.ESC+T}else if(c.keyCode===32)S.key=d.C0.ESC+(c.ctrlKey?d.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let x=c.code.slice(3,4);c.shiftKey||(x=x.toLowerCase()),S.key=d.C0.ESC+x,S.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?S.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?S.key=d.C0.NUL:c.keyCode>=51&&c.keyCode<=55?S.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?S.key=d.C0.DEL:c.keyCode===219?S.key=d.C0.ESC:c.keyCode===220?S.key=d.C0.FS:c.keyCode===221&&(S.key=d.C0.GS)}return S}},482:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},a.utf32ToString=function(h,d=0,m=h.length){let c="";for(let _=d;_<m;++_){let y=h[_];y>65535?(y-=65536,c+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):c+=String.fromCharCode(y)}return c},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const m=h.length;if(!m)return 0;let c=0,_=0;if(this._interim){const y=h.charCodeAt(_++);56320<=y&&y<=57343?d[c++]=1024*(this._interim-55296)+y-56320+65536:(d[c++]=this._interim,d[c++]=y),this._interim=0}for(let y=_;y<m;++y){const E=h.charCodeAt(y);if(55296<=E&&E<=56319){if(++y>=m)return this._interim=E,c;const S=h.charCodeAt(y);56320<=S&&S<=57343?d[c++]=1024*(E-55296)+S-56320+65536:(d[c++]=E,d[c++]=S)}else E!==65279&&(d[c++]=E)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const m=h.length;if(!m)return 0;let c,_,y,E,S=0,g=0,b=0;if(this.interim[0]){let T=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let R,L=0;for(;(R=63&this.interim[++L])&&L<4;)D<<=6,D|=R;const A=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,j=A-L;for(;b<j;){if(b>=m)return 0;if(R=h[b++],(192&R)!=128){b--,T=!0;break}this.interim[L++]=R,D<<=6,D|=63&R}T||(A===2?D<128?b--:d[S++]=D:A===3?D<2048||D>=55296&&D<=57343||D===65279||(d[S++]=D):D<65536||D>1114111||(d[S++]=D)),this.interim.fill(0)}const w=m-4;let x=b;for(;x<m;){for(;!(!(x<w)||128&(c=h[x])||128&(_=h[x+1])||128&(y=h[x+2])||128&(E=h[x+3]));)d[S++]=c,d[S++]=_,d[S++]=y,d[S++]=E,x+=4;if(c=h[x++],c<128)d[S++]=c;else if((224&c)==192){if(x>=m)return this.interim[0]=c,S;if(_=h[x++],(192&_)!=128){x--;continue}if(g=(31&c)<<6|63&_,g<128){x--;continue}d[S++]=g}else if((240&c)==224){if(x>=m)return this.interim[0]=c,S;if(_=h[x++],(192&_)!=128){x--;continue}if(x>=m)return this.interim[0]=c,this.interim[1]=_,S;if(y=h[x++],(192&y)!=128){x--;continue}if(g=(15&c)<<12|(63&_)<<6|63&y,g<2048||g>=55296&&g<=57343||g===65279)continue;d[S++]=g}else if((248&c)==240){if(x>=m)return this.interim[0]=c,S;if(_=h[x++],(192&_)!=128){x--;continue}if(x>=m)return this.interim[0]=c,this.interim[1]=_,S;if(y=h[x++],(192&y)!=128){x--;continue}if(x>=m)return this.interim[0]=c,this.interim[1]=_,this.interim[2]=y,S;if(E=h[x++],(192&E)!=128){x--;continue}if(g=(7&c)<<18|(63&_)<<12|(63&y)<<6|63&E,g<65536||g>1114111)continue;d[S++]=g}}return S}}},225:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const d=h(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let y=0;y<m.length;++y)_.fill(0,m[y][0],m[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?_[y]:(function(E,S){let g,b=0,w=S.length-1;if(E<S[0][0]||E>S[w][1])return!1;for(;w>=b;)if(g=b+w>>1,E>S[g][1])b=g+1;else{if(!(E<S[g][0]))return!0;w=g-1}return!1})(y,c)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,E){let S=this.wcwidth(y),g=S===0&&E!==0;if(g){const b=d.UnicodeService.extractWidth(E);b===0?g=!1:b>S&&(S=b)}return d.UnicodeService.createPropertyValue(0,S,g)}}},5981:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const d=h(8460),m=h(844);class c extends m.Disposable{constructor(y){super(),this._action=y,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(y,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const g=this._callbacks.shift();g&&g()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(E)}_innerWrite(y=0,E=!0){const S=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const g=this._writeBuffer[this._bufferOffset],b=this._action(g,E);if(b){const x=T=>Date.now()-S>=12?setTimeout((()=>this._innerWrite(0,T))):this._innerWrite(S,T);return void b.catch((T=>(queueMicrotask((()=>{throw T})),Promise.resolve(!1)))).then(x)}const w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=g.length,Date.now()-S>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=c},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const h=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function m(c,_){const y=c.toString(16),E=y.length<2?"0"+y:y;switch(_){case 4:return y[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(c){if(!c)return;let _=c.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const y=h.exec(_);if(y){const E=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/E*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/E*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/E*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),d.exec(_)&&[3,6,9,12].includes(_.length))){const y=_.length/3,E=[0,0,0];for(let S=0;S<3;++S){const g=parseInt(_.slice(y*S,y*S+y),16);E[S]=y===1?g<<4:y===2?g:y===3?g>>4:g>>8}return E}},a.toRgbString=function(c,_=16){const[y,E,S]=c;return`rgb:${m(y,_)}/${m(E,_)}/${m(S,_)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const d=h(482),m=h(8742),c=h(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(E,S){this._handlers[E]===void 0&&(this._handlers[E]=[]);const g=this._handlers[E];return g.push(S),{dispose:()=>{const b=g.indexOf(S);b!==-1&&g.splice(b,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(E,S){if(this.reset(),this._ident=E,this._active=this._handlers[E]||_,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(E,S,g){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(E,S,g);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(E,S,g))}unhook(E,S=!0){if(this._active.length){let g=!1,b=this._active.length-1,w=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,g=S,w=this._stack.fallThrough,this._stack.paused=!1),!w&&g===!1){for(;b>=0&&(g=this._active[b].unhook(E),g!==!0);b--)if(g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,g;b--}for(;b>=0;b--)if(g=this._active[b].unhook(!1),g instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,g}else this._handlerFb(this._ident,"UNHOOK",E);this._active=_,this._ident=0}};const y=new m.Params;y.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=y,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():y,this._data="",this._hitLimit=!1}put(E,S,g){this._hitLimit||(this._data+=(0,d.utf32ToString)(E,S,g),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let S=!1;if(this._hitLimit)S=!1;else if(E&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then((g=>(this._params=y,this._data="",this._hitLimit=!1,g)));return this._params=y,this._data="",this._hitLimit=!1,S}}},2015:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const d=h(844),m=h(8742),c=h(6242),_=h(6351);class y{constructor(b){this.table=new Uint8Array(b)}setDefault(b,w){this.table.fill(b<<4|w)}add(b,w,x,T){this.table[w<<8|b]=x<<4|T}addMany(b,w,x,T){for(let D=0;D<b.length;D++)this.table[w<<8|b[D]]=x<<4|T}}a.TransitionTable=y;const E=160;a.VT500_TRANSITION_TABLE=(function(){const g=new y(4095),b=Array.apply(null,Array(256)).map(((L,A)=>A)),w=(L,A)=>b.slice(L,A),x=w(32,127),T=w(0,24);T.push(25),T.push.apply(T,w(28,32));const D=w(0,14);let R;for(R in g.setDefault(1,0),g.addMany(x,0,2,0),D)g.addMany([24,26,153,154],R,3,0),g.addMany(w(128,144),R,3,0),g.addMany(w(144,152),R,3,0),g.add(156,R,0,0),g.add(27,R,11,1),g.add(157,R,4,8),g.addMany([152,158,159],R,0,7),g.add(155,R,11,3),g.add(144,R,11,9);return g.addMany(T,0,3,0),g.addMany(T,1,3,1),g.add(127,1,0,1),g.addMany(T,8,0,8),g.addMany(T,3,3,3),g.add(127,3,0,3),g.addMany(T,4,3,4),g.add(127,4,0,4),g.addMany(T,6,3,6),g.addMany(T,5,3,5),g.add(127,5,0,5),g.addMany(T,2,3,2),g.add(127,2,0,2),g.add(93,1,4,8),g.addMany(x,8,5,8),g.add(127,8,5,8),g.addMany([156,27,24,26,7],8,6,0),g.addMany(w(28,32),8,0,8),g.addMany([88,94,95],1,0,7),g.addMany(x,7,0,7),g.addMany(T,7,0,7),g.add(156,7,0,0),g.add(127,7,0,7),g.add(91,1,11,3),g.addMany(w(64,127),3,7,0),g.addMany(w(48,60),3,8,4),g.addMany([60,61,62,63],3,9,4),g.addMany(w(48,60),4,8,4),g.addMany(w(64,127),4,7,0),g.addMany([60,61,62,63],4,0,6),g.addMany(w(32,64),6,0,6),g.add(127,6,0,6),g.addMany(w(64,127),6,0,0),g.addMany(w(32,48),3,9,5),g.addMany(w(32,48),5,9,5),g.addMany(w(48,64),5,0,6),g.addMany(w(64,127),5,7,0),g.addMany(w(32,48),4,9,5),g.addMany(w(32,48),1,9,2),g.addMany(w(32,48),2,9,2),g.addMany(w(48,127),2,10,0),g.addMany(w(48,80),1,10,0),g.addMany(w(81,88),1,10,0),g.addMany([89,90,92],1,10,0),g.addMany(w(96,127),1,10,0),g.add(80,1,11,9),g.addMany(T,9,0,9),g.add(127,9,0,9),g.addMany(w(28,32),9,0,9),g.addMany(w(32,48),9,9,12),g.addMany(w(48,60),9,8,10),g.addMany([60,61,62,63],9,9,10),g.addMany(T,11,0,11),g.addMany(w(32,128),11,0,11),g.addMany(w(28,32),11,0,11),g.addMany(T,10,0,10),g.add(127,10,0,10),g.addMany(w(28,32),10,0,10),g.addMany(w(48,60),10,8,10),g.addMany([60,61,62,63],10,0,11),g.addMany(w(32,48),10,9,12),g.addMany(T,12,0,12),g.add(127,12,0,12),g.addMany(w(28,32),12,0,12),g.addMany(w(32,48),12,9,12),g.addMany(w(48,64),12,0,11),g.addMany(w(64,127),12,12,13),g.addMany(w(64,127),10,12,13),g.addMany(w(64,127),9,12,13),g.addMany(T,13,13,13),g.addMany(x,13,13,13),g.add(127,13,0,13),g.addMany([27,156,24,26],13,14,0),g.add(E,0,2,0),g.add(E,8,5,8),g.add(E,6,0,6),g.add(E,11,0,11),g.add(E,13,13,13),g})();class S extends d.Disposable{constructor(b=a.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,x,T)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,x)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,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 c.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(b,w=[64,126]){let x=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=b.prefix.charCodeAt(0),x&&60>x||x>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let D=0;D<b.intermediates.length;++D){const R=b.intermediates.charCodeAt(D);if(32>R||R>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=R}}if(b.final.length!==1)throw new Error("final must be a single byte");const T=b.final.charCodeAt(0);if(w[0]>T||T>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return x<<=8,x|=T,x}identToString(b){const w=[];for(;b;)w.push(String.fromCharCode(255&b)),b>>=8;return w.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,w){const x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const T=this._escHandlers[x];return T.push(w),{dispose:()=>{const D=T.indexOf(w);D!==-1&&T.splice(D,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,w){this._executeHandlers[b.charCodeAt(0)]=w}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,w){const x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const T=this._csiHandlers[x];return T.push(w),{dispose:()=>{const D=T.indexOf(w);D!==-1&&T.splice(D,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,w){return this._dcsParser.registerHandler(this._identifier(b),w)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,w){return this._oscParser.registerHandler(b,w)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}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(b,w,x,T,D){this._parseStack.state=b,this._parseStack.handlers=w,this._parseStack.handlerPos=x,this._parseStack.transition=T,this._parseStack.chunkPos=D}parse(b,w,x){let T,D=0,R=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const A=this._parseStack.handlers;let j=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&j>-1){for(;j>=0&&(T=A[j](this._params),T!==!0);j--)if(T instanceof Promise)return this._parseStack.handlerPos=j,T}this._parseStack.handlers=[];break;case 4:if(x===!1&&j>-1){for(;j>=0&&(T=A[j](),T!==!0);j--)if(T instanceof Promise)return this._parseStack.handlerPos=j,T}this._parseStack.handlers=[];break;case 6:if(D=b[this._parseStack.chunkPos],T=this._dcsParser.unhook(D!==24&&D!==26,x),T)return T;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(D=b[this._parseStack.chunkPos],T=this._oscParser.end(D!==24&&D!==26,x),T)return T;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let A=L;A<w;++A){switch(D=b[A],R=this._transitions.table[this.currentState<<8|(D<160?D:E)],R>>4){case 2:for(let H=A+1;;++H){if(H>=w||(D=b[H])<32||D>126&&D<E){this._printHandler(b,A,H),A=H-1;break}if(++H>=w||(D=b[H])<32||D>126&&D<E){this._printHandler(b,A,H),A=H-1;break}if(++H>=w||(D=b[H])<32||D>126&&D<E){this._printHandler(b,A,H),A=H-1;break}if(++H>=w||(D=b[H])<32||D>126&&D<E){this._printHandler(b,A,H),A=H-1;break}}break;case 3:this._executeHandlers[D]?this._executeHandlers[D]():this._executeHandlerFb(D),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:A,code:D,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const j=this._csiHandlers[this._collect<<8|D];let M=j?j.length-1:-1;for(;M>=0&&(T=j[M](this._params),T!==!0);M--)if(T instanceof Promise)return this._preserveStack(3,j,M,R,A),T;M<0&&this._csiHandlerFb(this._collect<<8|D,this._params),this.precedingJoinState=0;break;case 8:do switch(D){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(D-48)}while(++A<w&&(D=b[A])>47&&D<60);A--;break;case 9:this._collect<<=8,this._collect|=D;break;case 10:const I=this._escHandlers[this._collect<<8|D];let B=I?I.length-1:-1;for(;B>=0&&(T=I[B](),T!==!0);B--)if(T instanceof Promise)return this._preserveStack(4,I,B,R,A),T;B<0&&this._escHandlerFb(this._collect<<8|D),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|D,this._params);break;case 13:for(let H=A+1;;++H)if(H>=w||(D=b[H])===24||D===26||D===27||D>127&&D<E){this._dcsParser.put(b,A,H),A=H-1;break}break;case 14:if(T=this._dcsParser.unhook(D!==24&&D!==26),T)return this._preserveStack(6,[],0,R,A),T;D===27&&(R|=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 H=A+1;;H++)if(H>=w||(D=b[H])<32||D>127&&D<E){this._oscParser.put(b,A,H),A=H-1;break}break;case 6:if(T=this._oscParser.end(D!==24&&D!==26),T)return this._preserveStack(5,[],0,R,A),T;D===27&&(R|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&R}}}a.EscapeSequenceParser=S},6242:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const d=h(5770),m=h(482),c=[];a.OscParser=class{constructor(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,y){this._handlers[_]===void 0&&(this._handlers[_]=[]);const E=this._handlers[_];return E.push(y),{dispose:()=>{const S=E.indexOf(y);S!==-1&&E.splice(S,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,y,E){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(_,y,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(_,y,E))}start(){this.reset(),this._state=1}put(_,y,E){if(this._state!==3){if(this._state===1)for(;y<E;){const S=_[y++];if(S===59){this._state=2,this._start();break}if(S<48||57<S)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+S-48}this._state===2&&E-y>0&&this._put(_,y,E)}}end(_,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,S=this._active.length-1,g=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,E=y,g=this._stack.fallThrough,this._stack.paused=!1),!g&&E===!1){for(;S>=0&&(E=this._active[S].end(_),E!==!0);S--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,E;S--}for(;S>=0;S--)if(E=this._active[S].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",_);this._active=c,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,y,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(_,y,E),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let y=!1;if(this._hitLimit)y=!1;else if(_&&(y=this._handler(this._data),y instanceof Promise))return y.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,y}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const h=2147483647;class d{static fromArray(c){const _=new d;if(!c.length)return _;for(let y=Array.isArray(c[0])?1:0;y<c.length;++y){const E=c[y];if(Array.isArray(E))for(let S=0;S<E.length;++S)_.addSubParam(E[S]);else _.addParam(E)}return _}constructor(c=32,_=32){if(this.maxLength=c,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const c=new d(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){const c=[];for(let _=0;_<this.length;++_){c.push(this.params[_]);const y=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-y>0&&c.push(Array.prototype.slice.call(this._subParams,y,E))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>h?h:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>h?h:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){const _=this._subParamsIdx[c]>>8,y=255&this._subParamsIdx[c];return y-_>0?this._subParams.subarray(_,y):null}getSubParamsAll(){const c={};for(let _=0;_<this.length;++_){const y=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-y>0&&(c[_]=this._subParams.slice(y,E))}return c}addDigit(c){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,E=y[_-1];y[_-1]=~E?Math.min(10*E+c,h):c}}a.Params=d},5741:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,d){const m={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(m),d.dispose=()=>this._wrappedAddonDispose(m),d.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let d=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===h){d=m;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(d,1)}}},8771:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const d=h(3785),m=h(511);a.BufferApiView=class{constructor(c,_){this._buffer=c,this.type=_}init(c){return this._buffer=c,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(c){const _=this._buffer.lines.get(c);if(_)return new d.BufferLineApiView(_)}getNullCell(){return new m.CellData}}},3785:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const d=h(511);a.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,c){if(!(m<0||m>=this._line.length))return c?(this._line.loadCell(m,c),c):this._line.loadCell(m,new d.CellData)}translateToString(m,c,_){return this._line.translateToString(m,c,_)}}},8285:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const d=h(8771),m=h(8460),c=h(844);class _ extends c.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.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)}}a.BufferNamespaceApi=_},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,d){return this._core.registerCsiHandler(h,(m=>d(m.toArray())))}addCsiHandler(h,d){return this.registerCsiHandler(h,d)}registerDcsHandler(h,d){return this._core.registerDcsHandler(h,((m,c)=>d(m,c.toArray())))}addDcsHandler(h,d){return this.registerDcsHandler(h,d)}registerEscHandler(h,d){return this._core.registerEscHandler(h,d)}addEscHandler(h,d){return this.registerEscHandler(h,d)}registerOscHandler(h,d){return this._core.registerOscHandler(h,d)}addOscHandler(h,d){return this.registerOscHandler(h,d)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(f,a,h){var d=this&&this.__decorate||function(g,b,w,x){var T,D=arguments.length,R=D<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(g,b,w,x);else for(var L=g.length-1;L>=0;L--)(T=g[L])&&(R=(D<3?T(R):D>3?T(b,w,R):T(b,w))||R);return D>3&&R&&Object.defineProperty(b,w,R),R},m=this&&this.__param||function(g,b){return function(w,x){b(w,x,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=h(8460),_=h(844),y=h(5295),E=h(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let S=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(g){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(g.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(g.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(g,this))}resize(g,b){this.cols=g,this.rows=b,this.buffers.resize(g,b),this._onResize.fire({cols:g,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(g,b=!1){const w=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===g.fg&&x.getBg(0)===g.bg||(x=w.getBlankLine(g,b),this._cachedBlankLine=x),x.isWrapped=b;const T=w.ybase+w.scrollTop,D=w.ybase+w.scrollBottom;if(w.scrollTop===0){const R=w.lines.isFull;D===w.lines.length-1?R?w.lines.recycle().copyFrom(x):w.lines.push(x.clone()):w.lines.splice(D+1,0,x.clone()),R?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{const R=D-T+1;w.lines.shiftElements(T+1,R-1,-1),w.lines.set(D,x.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(g,b,w){const x=this.buffer;if(g<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else g+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const T=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+g,x.ybase),0),T!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};a.BufferService=S=d([m(0,E.IOptionsService)],S)},7994:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,d){this._charsets[h]=d,this.glevel===h&&(this.charset=d)}}},1753:function(f,a,h){var d=this&&this.__decorate||function(x,T,D,R){var L,A=arguments.length,j=A<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,D):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,T,D,R);else for(var M=x.length-1;M>=0;M--)(L=x[M])&&(j=(A<3?L(j):A>3?L(T,D,j):L(T,D))||j);return A>3&&j&&Object.defineProperty(T,D,j),j},m=this&&this.__param||function(x,T){return function(D,R){T(D,R,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const c=h(2585),_=h(8460),y=h(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function S(x,T){let D=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(D|=64,D|=x.action):(D|=3&x.button,4&x.button&&(D|=64),8&x.button&&(D|=128),x.action===32?D|=32:x.action!==0||T||(D|=3)),D}const g=String.fromCharCode,b={DEFAULT:x=>{const T=[S(x,!1)+32,x.col+32,x.row+32];return T[0]>255||T[1]>255||T[2]>255?"":`\x1B[M${g(T[0])}${g(T[1])}${g(T[2])}`},SGR:x=>{const T=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${S(x,!0)};${x.col};${x.row}${T}`},SGR_PIXELS:x=>{const T=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${S(x,!0)};${x.x};${x.y}${T}`}};let w=a.CoreMouseService=class extends y.Disposable{constructor(x,T){super(),this._bufferService=x,this._coreService=T,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const D of Object.keys(E))this.addProtocol(D,E[D]);for(const D of Object.keys(b))this.addEncoding(D,b[D]);this.reset()}addProtocol(x,T){this._protocols[x]=T}addEncoding(x,T){this._encodings[x]=T}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const T=this._encodings[this._activeEncoding](x);return T&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(T):this._coreService.triggerDataEvent(T,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,T,D){if(D){if(x.x!==T.x||x.y!==T.y)return!1}else if(x.col!==T.col||x.row!==T.row)return!1;return x.button===T.button&&x.action===T.action&&x.ctrl===T.ctrl&&x.alt===T.alt&&x.shift===T.shift}};a.CoreMouseService=w=d([m(0,c.IBufferService),m(1,c.ICoreService)],w)},6975:function(f,a,h){var d=this&&this.__decorate||function(w,x,T,D){var R,L=arguments.length,A=L<3?x:D===null?D=Object.getOwnPropertyDescriptor(x,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,x,T,D);else for(var j=w.length-1;j>=0;j--)(R=w[j])&&(A=(L<3?R(A):L>3?R(x,T,A):R(x,T))||A);return L>3&&A&&Object.defineProperty(x,T,A),A},m=this&&this.__param||function(w,x){return function(T,D){x(T,D,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const c=h(1439),_=h(8460),y=h(844),E=h(2585),S=Object.freeze({insertMode:!1}),g=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let b=a.CoreService=class extends y.Disposable{constructor(w,x,T){super(),this._bufferService=w,this._logService=x,this._optionsService=T,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,c.clone)(S),this.decPrivateModes=(0,c.clone)(g)}reset(){this.modes=(0,c.clone)(S),this.decPrivateModes=(0,c.clone)(g)}triggerDataEvent(w,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const T=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&T.ybase!==T.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,(()=>w.split("").map((D=>D.charCodeAt(0))))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,(()=>w.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(w))}};a.CoreService=b=d([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],b)},9074:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const d=h(8055),m=h(8460),c=h(844),_=h(6106);let y=0,E=0;class S extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList((w=>w==null?void 0:w.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,c.toDisposable)((()=>this.reset())))}registerDecoration(w){if(w.marker.isDisposed)return;const x=new g(w);if(x){const T=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),T.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,x,T){let D=0,R=0;for(const L of this._decorations.getKeyIterator(x))D=L.options.x??0,R=D+(L.options.width??1),w>=D&&w<R&&(!T||(L.options.layer??"bottom")===T)&&(yield L)}forEachDecorationAtCell(w,x,T,D){this._decorations.forEachByKey(x,(R=>{y=R.options.x??0,E=y+(R.options.width??1),w>=y&&w<E&&(!T||(R.options.layer??"bottom")===T)&&D(R)}))}}a.DecorationService=S;class g extends c.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(w){super(),this.options=w,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=w.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const d=h(2585),m=h(8343);class c{constructor(...y){this._entries=new Map;for(const[E,S]of y)this.set(E,S)}set(y,E){const S=this._entries.get(y);return this._entries.set(y,E),S}forEach(y){for(const[E,S]of this._entries.entries())y(E,S)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}a.ServiceCollection=c,a.InstantiationService=class{constructor(){this._services=new c,this._services.set(d.IInstantiationService,this)}setService(_,y){this._services.set(_,y)}getService(_){return this._services.get(_)}createInstance(_,...y){const E=(0,m.getServiceDependencies)(_).sort(((b,w)=>b.index-w.index)),S=[];for(const b of E){const w=this._services.get(b.id);if(!w)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${b.id}.`);S.push(w)}const g=E.length>0?E[0].index:y.length;if(y.length!==g)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${g+1} conflicts with ${y.length} static arguments`);return new _(...y,...S)}}},7866:function(f,a,h){var d=this&&this.__decorate||function(g,b,w,x){var T,D=arguments.length,R=D<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(g,b,w,x);else for(var L=g.length-1;L>=0;L--)(T=g[L])&&(R=(D<3?T(R):D>3?T(b,w,R):T(b,w))||R);return D>3&&R&&Object.defineProperty(b,w,R),R},m=this&&this.__param||function(g,b){return function(w,x){b(w,x,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=h(844),_=h(2585),y={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,S=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(g){super(),this._optionsService=g,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(g){for(let b=0;b<g.length;b++)typeof g[b]=="function"&&(g[b]=g[b]())}_log(g,b,w){this._evalLazyOptionalParams(w),g.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+b,...w)}trace(g,...b){var w;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.trace.bind(this._optionsService.options.logger))??console.log,g,b)}debug(g,...b){var w;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.debug.bind(this._optionsService.options.logger))??console.log,g,b)}info(g,...b){var w;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.info.bind(this._optionsService.options.logger))??console.info,g,b)}warn(g,...b){var w;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.warn.bind(this._optionsService.options.logger))??console.warn,g,b)}error(g,...b){var w;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((w=this._optionsService.options.logger)==null?void 0:w.error.bind(this._optionsService.options.logger))??console.error,g,b)}};a.LogService=S=d([m(0,_.IOptionsService)],S),a.setTraceLogger=function(g){E=g},a.traceCall=function(g,b,w){if(typeof w.value!="function")throw new Error("not supported");const x=w.value;w.value=function(...T){if(E.logLevel!==_.LogLevelEnum.TRACE)return x.apply(this,T);E.trace(`GlyphRenderer#${x.name}(${T.map((R=>JSON.stringify(R))).join(", ")})`);const D=x.apply(this,T);return E.trace(`GlyphRenderer#${x.name} return`,D),D}}},7302:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const d=h(8460),m=h(844),c=h(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:c.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends m.Disposable{constructor(S){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const g={...a.DEFAULT_OPTIONS};for(const b in S)if(b in g)try{const w=S[b];g[b]=this._sanitizeAndValidateOption(b,w)}catch(w){console.error(w)}this.rawOptions=g,this.options={...g},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(S,g){return this.onOptionChange((b=>{b===S&&g(this.rawOptions[S])}))}onMultipleOptionChange(S,g){return this.onOptionChange((b=>{S.indexOf(b)!==-1&&g()}))}_setupOptions(){const S=b=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},g=(b,w)=>{if(!(b in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);w=this._sanitizeAndValidateOption(b,w),this.rawOptions[b]!==w&&(this.rawOptions[b]=w,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const w={get:S.bind(this,b),set:g.bind(this,b)};Object.defineProperty(this.options,b,w)}}_sanitizeAndValidateOption(S,g){switch(S){case"cursorStyle":if(g||(g=a.DEFAULT_OPTIONS[S]),!(function(b){return b==="block"||b==="underline"||b==="bar"})(g))throw new Error(`"${g}" is not a valid value for ${S}`);break;case"wordSeparator":g||(g=a.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof g=="number"&&1<=g&&g<=1e3)break;g=_.includes(g)?g:a.DEFAULT_OPTIONS[S];break;case"cursorWidth":g=Math.floor(g);case"lineHeight":case"tabStopWidth":if(g<1)throw new Error(`${S} cannot be less than 1, value: ${g}`);break;case"minimumContrastRatio":g=Math.max(1,Math.min(21,Math.round(10*g)/10));break;case"scrollback":if((g=Math.min(g,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${g}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(g<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${g}`);break;case"rows":case"cols":if(!g&&g!==0)throw new Error(`${S} must be numeric, value: ${g}`);break;case"windowsPty":g=g??{}}return g}}a.OptionsService=y},2660:function(f,a,h){var d=this&&this.__decorate||function(y,E,S,g){var b,w=arguments.length,x=w<3?E:g===null?g=Object.getOwnPropertyDescriptor(E,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(y,E,S,g);else for(var T=y.length-1;T>=0;T--)(b=y[T])&&(x=(w<3?b(x):w>3?b(E,S,x):b(E,S))||x);return w>3&&x&&Object.defineProperty(E,S,x),x},m=this&&this.__param||function(y,E){return function(S,g){E(S,g,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const c=h(2585);let _=a.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const E=this._bufferService.buffer;if(y.id===void 0){const T=E.addMarker(E.ybase+E.y),D={data:y,id:this._nextId++,lines:[T]};return T.onDispose((()=>this._removeMarkerFromLink(D,T))),this._dataByLinkId.set(D.id,D),D.id}const S=y,g=this._getEntryIdKey(S),b=this._entriesWithId.get(g);if(b)return this.addLineToLink(b.id,E.ybase+E.y),b.id;const w=E.addMarker(E.ybase+E.y),x={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(x,w))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.id}addLineToLink(y,E){const S=this._dataByLinkId.get(y);if(S&&S.lines.every((g=>g.line!==E))){const g=this._bufferService.buffer.addMarker(E);S.lines.push(g),g.onDispose((()=>this._removeMarkerFromLink(S,g)))}}getLinkData(y){var E;return(E=this._dataByLinkId.get(y))==null?void 0:E.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,E){const S=y.lines.indexOf(E);S!==-1&&(y.lines.splice(S,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};a.OscLinkService=_=d([m(0,c.IBufferService)],_)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const h="di$target",d="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[d]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const c=function(_,y,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,g,b){g[h]===g?g[d].push({id:S,index:b}):(g[d]=[{id:S,index:b}],g[h]=g)})(c,_,E)};return c.toString=()=>m,a.serviceRegistry.set(m,c),c}},2585:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const d=h(8343);var m;a.IBufferService=(0,d.createDecorator)("BufferService"),a.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),a.ICoreService=(0,d.createDecorator)("CoreService"),a.ICharsetService=(0,d.createDecorator)("CharsetService"),a.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(m||(a.LogLevelEnum=m={})),a.ILogService=(0,d.createDecorator)("LogService"),a.IOptionsService=(0,d.createDecorator)("OptionsService"),a.IOscLinkService=(0,d.createDecorator)("OscLinkService"),a.IUnicodeService=(0,d.createDecorator)("UnicodeService"),a.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(f,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const d=h(8460),m=h(225);class c{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,E,S=!1){return(16777215&y)<<3|(3&E)<<1|(S?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new m.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let E=0,S=0;const g=y.length;for(let b=0;b<g;++b){let w=y.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=g)return E+this.wcwidth(w);const D=y.charCodeAt(b);56320<=D&&D<=57343?w=1024*(w-55296)+D-56320+65536:E+=this.wcwidth(D)}const x=this.charProperties(w,S);let T=c.extractWidth(x);c.extractShouldJoin(x)&&(T-=c.extractWidth(S)),E+=T,S=x}return E}charProperties(y,E){return this._activeProvider.charProperties(y,E)}}a.UnicodeService=c}},s={};function l(f){var a=s[f];if(a!==void 0)return a.exports;var h=s[f]={exports:{}};return r[f].call(h.exports,h,h.exports,l),h.exports}var p={};return(()=>{var f=p;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=l(9042),h=l(3236),d=l(844),m=l(5741),c=l(8285),_=l(7975),y=l(7090),E=["cols","rows"];class S extends d.Disposable{constructor(b){super(),this._core=this.register(new h.Terminal(b)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const w=T=>this._core.options[T],x=(T,D)=>{this._checkReadonlyOptions(T),this._core.options[T]=D};for(const T in this._core.options){const D={get:w.bind(this,T),set:x.bind(this,T)};Object.defineProperty(this._publicOptions,T,D)}}_checkReadonlyOptions(b){if(E.includes(b))throw new Error(`Option "${b}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new _.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.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 c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const b=this._core.coreService.decPrivateModes;let w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const w in b)this._publicOptions[w]=b[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,w=!0){this._core.input(b,w)}resize(b,w){this._verifyIntegers(b,w),this._core.resize(b,w)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,w,x){this._verifyIntegers(b,w,x),this._core.select(b,w,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,w){this._verifyIntegers(b,w),this._core.selectLines(b,w)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,w){this._core.write(b,w)}writeln(b,w){this._core.write(b),this._core.write(`\r
|
|
592
|
-
`,w)}paste(b){this._core.paste(b)}refresh(b,w){this._verifyIntegers(b,w),this._core.refresh(b,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return a}_verifyIntegers(...b){for(const w of b)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const w of b)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}f.Terminal=S})(),p})()))})(im)),im.exports}var c9=l9();const u9=/(?:[A-Za-z]:[\\/]|\.{1,2}[\\/]|[\\/])?(?:[\w.@-]+[\\/])+[\w.@-]+\.[A-Za-z0-9]{1,10}(?::\d+(?::\d+)?)?/g;function Xm(e){var s;let i=e;if(/^file:/i.test(i))try{i=decodeURIComponent(new URL(i).pathname).replace(/^\/([A-Za-z]:)/,"$1")}catch{return null}i=i.replace(/\\/g,"/").replace(/:\d+(?::\d+)?$/,"");const r=(s=we.getState().health)==null?void 0:s.projectRoot.replace(/\\/g,"/").replace(/\/$/,"");if(/^([A-Za-z]:)?\//.test(i)){if(!r||!i.toLowerCase().startsWith(`${r.toLowerCase()}/`))return null;i=i.slice(r.length+1)}return i=i.replace(/^(\.\/)+/,""),i&&!i.startsWith("../")?i:null}const Kb=new Map;function h9(e){const i=Kb.get(e);if(i&&Date.now()-i.at<3e4)return i.exists;const r=Xt.stat(e).then(s=>s.exists,()=>!1);return Kb.set(e,{at:Date.now(),exists:r}),r}function d9(e){var l;const i=[],r=(l=we.getState().health)==null?void 0:l.projectRoot.replace(/\\/g,"/").replace(/\/$/,"").toLowerCase(),s=e.replace(/\\/g,"/").toLowerCase();for(let p=r?s.indexOf(`${r}/`):-1;r&&p!==-1;p=s.indexOf(`${r}/`,p+1)){const f=/^[^\s:*?"<>|()]+(?::\d+(?::\d+)?)?/.exec(e.slice(p+r.length+1));f&&i.push({index:p,text:e.slice(p,p+r.length+1+f[0].length)})}for(const p of e.matchAll(u9)){const f=p.index;i.some(a=>f<a.index+a.text.length&&a.index<f+p[0].length)||/[a-z][\w+.-]*:\/{1,2}\S*$/i.test(e.slice(0,f))||i.push({index:f,text:p[0]})}return i}function Qb(e,i,r){if(!e.ctrlKey&&!e.metaKey)return!1;const s=Xm(i);if(!s)return!1;const{sessions:l,go:p}=we.getState(),f=l.find(a=>a.terminalId===r);return f&&O4(s,f.id),Bn.getState().pin(s),p({kind:"file",path:s}),!0}function f9({terminalId:e,onExit:i}){const r=P.useRef(null),[s,l]=P.useState("connecting");return P.useEffect(()=>{if(!r.current)return;const p=new c9.Terminal({cursorBlink:!0,fontFamily:'ui-monospace, "Cascadia Mono", Consolas, SFMono-Regular, Menlo, monospace',fontSize:13,scrollback:1e4,allowProposedApi:!0,rescaleOverlappingGlyphs:!0,linkHandler:{allowNonHttpProtocols:!0,activate:(y,E)=>{/^https?:/i.test(E)?window.open(E,"_blank","noopener"):Qb(y,E,e)}},theme:{background:"#141413",foreground:"#f5f4ee",cursor:"#d77757",selectionBackground:"#d7775755"}}),f=new e9.FitAddon;p.loadAddon(f),p.loadAddon(new s9.WebLinksAddon);const a=p.registerLinkProvider({provideLinks:(y,E)=>{var b;const S=((b=p.buffer.active.getLine(y-1))==null?void 0:b.translateToString(!0))??"",g=d9(S).filter(w=>Xm(w.text));if(!g.length)return E(void 0);Promise.all(g.map(w=>h9(Xm(w.text)))).then(w=>{const x=g.filter((T,D)=>w[D]).map(T=>({text:T.text,range:{start:{x:T.index+1,y},end:{x:T.index+T.text.length,y}},activate:(D,R)=>void Qb(D,R,e)}));E(x.length?x:void 0)})}});p.loadAddon(new i9.Unicode11Addon),p.unicode.activeVersion="11",p.open(r.current);try{const y=new a9.WebglAddon;y.onContextLoss(()=>y.dispose()),p.loadAddon(y)}catch{}f.fit(),p.attachCustomKeyEventHandler(y=>!(y.type==="keydown"&&y.ctrlKey&&!y.altKey&&!y.metaKey&&y.code==="KeyV"));const h=new WebSocket(`${location.protocol==="https:"?"wss":"ws"}://${location.host}/api/terminals/${e}`),d=y=>h.readyState===WebSocket.OPEN&&h.send(JSON.stringify(y)),m=()=>d({type:"resize",cols:p.cols,rows:p.rows});h.onopen=()=>{l("open"),m(),p.focus()},h.onmessage=y=>{const E=JSON.parse(y.data);E.type==="output"&&E.data&&p.write(E.data),E.type==="exit"&&(p.write(`\r
|
|
593
|
-
\x1B[2m[session ended, exit code ${E.code}]\x1B[0m\r
|
|
594
|
-
`),i==null||i())},h.onclose=()=>l("closed");const c=p.onData(y=>d({type:"input",data:y})),_=new ResizeObserver(()=>{try{f.fit(),m()}catch{}});return _.observe(r.current),()=>{_.disconnect(),a.dispose(),c.dispose(),h.close(),p.dispose()}},[e]),v.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden rounded-lg border bg-[#141413]",children:[v.jsx("div",{ref:r,className:"terminal-host h-full w-full",onContextMenu:p=>p.preventDefault()}),s==="connecting"&&v.jsx("div",{className:"absolute bottom-2 right-3 text-[11px] text-muted-foreground",children:"connecting..."}),s==="closed"&&v.jsx("div",{className:"absolute bottom-2 right-3 text-[11px] text-muted-foreground",children:"detached"})]})}function i5({trigger:e,title:i,icon:r,badge:s,description:l,open:p,onOpenChange:f,children:a}){return v.jsxs(yw,{open:p,onOpenChange:f,children:[v.jsx(hR,{asChild:!0,children:e}),v.jsxs(ww,{children:[v.jsx(Cw,{className:"fixed inset-0 z-50 bg-foreground/30 animate-in fade-in-0"}),v.jsxs(Ew,{className:"fixed inset-y-0 right-0 z-50 flex w-full max-w-xl flex-col border-l bg-card shadow-xl focus:outline-none animate-in slide-in-from-right",children:[v.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-4 py-3",children:[r,s,v.jsx(Tw,{className:"min-w-0 truncate text-sm font-semibold",children:i}),v.jsx(Rw,{className:"sr-only",children:l}),v.jsx(Aw,{asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon",className:"ml-auto","aria-label":"Close",children:v.jsx(Nn,{size:15})})})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:a})]})]})]})}function r5({id:e}){const i=we(x=>x.sessions.find(T=>T.id===e)),r=we(x=>x.transcriptTicks[e]??0),s=we(x=>x.ticks.interactions),[l,p]=P.useState(null),[f,a]=P.useState("terminal"),[h,d]=P.useState(!1),m=we(x=>x.windowed),c=mn(),_=fv(),[y,E]=P.useState("idle"),S=P.useRef(!1);if(P.useEffect(()=>{S.current||!i||(S.current=!0,!i.live&&(E("starting"),_e.resumeSession(e).then(()=>E("idle"),x=>{E("failed"),we.getState().notify(x.message,"error")})))},[e,i]),P.useEffect(()=>{p(null),d(!1),a("terminal")},[e]),P.useEffect(()=>{let x=!1;return _e.session(e).then(T=>!x&&p(T),()=>!x&&d(!0)),()=>{x=!0}},[e,r,s,i==null?void 0:i.status,i==null?void 0:i.terminalId]),!i&&h)return v.jsx(nn,{title:"This session is gone.",hint:"Its transcript may have been cleaned up by Claude Code.",className:"m-6"});if(!i)return v.jsx("div",{className:"p-6 text-xs text-muted-foreground",children:"Loading..."});const g=((l==null?void 0:l.interactions)??[]).filter(x=>x.status==="open"),b=()=>at(()=>_e.resumeSession(e)),w=()=>c({title:"Stop this session?",description:"The conversation is kept for a later resume.",confirmLabel:"Stop",tone:"destructive",run:async()=>{await _e.killSession(e),dv([e])}});return v.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[v.jsxs("header",{className:"flex items-center gap-3 border-b px-3 py-3 sm:px-5",children:[v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Uh,{session:i}),v.jsx("h1",{className:"truncate text-sm font-semibold",children:i.title})]}),v.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",children:[v.jsx(nt,{tone:i.status==="waiting"?"warning":i.status==="running"?"success":i.status==="done"?"on":"off",children:i.status}),v.jsx(nt,{tone:"off",children:i.origin==="external"?"started in a terminal":`from ${i.origin}`}),i.category&&v.jsxs(nt,{tone:"off",children:["category: ",i.category]}),i.purpose&&v.jsxs(nt,{tone:"on",icon:Ul,children:["hub task: ",i.purpose.title]}),v.jsx("span",{children:qs(i.startedAt)}),i.tokens&&v.jsxs("span",{children:["· ",jn(ss(i.tokens))," tokens"]}),v.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1 font-mono",title:"Claude Code session id",children:[v.jsx("span",{className:"truncate",children:i.id}),v.jsx(Dl,{text:i.id})]})]})]}),v.jsxs("div",{className:"flex shrink-0 gap-1.5",children:[v.jsx(ve,{variant:"ghost",size:"icon",title:"Rename","aria-label":"Rename",onClick:()=>void _.rename(i),children:v.jsx(_r,{size:13})}),v.jsx(ve,{variant:"ghost",size:"icon",title:i.live?"Stop and delete permanently":"Delete permanently","aria-label":"Delete permanently",onClick:()=>void _.remove(i),children:v.jsx(xr,{size:13})}),!m&&v.jsxs(ve,{variant:"ghost",title:"Open in a window of its own","aria-label":"New window",onClick:()=>og({kind:"session",id:e}),children:[v.jsx(fa,{size:12})," ",v.jsx("span",{className:"hidden sm:inline",children:"New window"})]}),i.live?v.jsxs(ve,{variant:"muted",title:"Stop","aria-label":"Stop",onClick:()=>void w(),children:[v.jsx(_h,{size:12})," ",v.jsx("span",{className:"hidden sm:inline",children:"Stop"})]}):v.jsxs(ve,{variant:"primary",title:"Resume here","aria-label":"Resume here",onClick:()=>void b(),children:[v.jsx(la,{size:12})," ",v.jsx("span",{className:"hidden sm:inline",children:"Resume here"})]})]})]}),v.jsx("div",{className:"no-scrollbar flex gap-1 overflow-x-auto border-b px-2 sm:px-4",children:[["terminal","Terminal"],["setup","Setup"],["activity","Activity"],["toolset","Toolset"],["interactions",`Interactions${l!=null&&l.interactions.length?` (${l.interactions.length})`:""}`]].map(([x,T])=>v.jsx("button",{onClick:()=>a(x),className:ye("shrink-0 whitespace-nowrap border-b-2 px-3 py-2 text-xs transition-colors",f===x?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:T},x))}),v.jsxs("div",{className:"min-h-0 flex-1 overflow-hidden",children:[v.jsxs("div",{className:ye("relative h-full p-2 sm:p-3",f!=="terminal"&&"hidden"),children:[v.jsxs("div",{className:"absolute right-4 top-4 z-10 flex gap-1.5 sm:right-5 sm:top-5",children:[v.jsx(m9,{items:g}),i.purpose&&(l==null?void 0:l.purposeNote)&&v.jsx(p9,{title:i.purpose.title,note:l.purposeNote})]}),i.terminalId?v.jsx(f9,{terminalId:i.terminalId},i.terminalId):v.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 rounded-lg border border-dashed",children:[y==="starting"?v.jsx("div",{className:"text-xs text-muted-foreground",children:"Starting the terminal..."}):v.jsxs(ve,{variant:"primary",size:"md",onClick:()=>void b(),children:[v.jsx(la,{size:13})," Start the terminal again"]}),i.done&&v.jsxs("div",{className:"card max-w-lg p-3 text-xs",children:[v.jsx("div",{className:"font-medium",children:i.done.summary}),Object.entries(i.done.deliverables??{}).map(([x,T])=>v.jsxs("div",{className:"mt-1 text-[11px]",children:[v.jsxs("span",{className:"font-medium",children:[x,": "]}),v.jsx("span",{className:"break-all text-muted-foreground",children:typeof T=="string"?T:JSON.stringify(T)})]},x))]})]})]}),f==="activity"&&v.jsx("div",{className:"h-full overflow-y-auto p-4",children:l?v.jsx(v8,{data:l}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."})}),f==="setup"&&v.jsx("div",{className:"h-full overflow-y-auto p-4",children:l?v.jsx(y8,{sessionId:e,live:i.live,current:l.setup}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."})}),f==="toolset"&&v.jsx("div",{className:"h-full overflow-y-auto p-4",children:l?v.jsx(C8,{sessionId:e,live:i.live,current:l.toolset}):v.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."})}),f==="interactions"&&v.jsx("div",{className:"h-full space-y-2 overflow-y-auto p-4",children:l!=null&&l.interactions.length?l.interactions.map(x=>v.jsx(Bl,{interaction:x},x.id)):v.jsx(nn,{title:"Nothing asked yet.",hint:"Permission requests, questions, ends of turns and MCP suggestions from this session land here and on every channel."})})]})]})}function p9({title:e,note:i}){return v.jsx(i5,{title:e,icon:v.jsx(Ul,{size:14,className:"shrink-0 text-primary"}),badge:v.jsx(nt,{tone:"on",children:"hub task"}),description:"Parameters, samples and API of this hub task.",trigger:v.jsxs(ve,{variant:"primary",className:"shadow-md",title:"What this hub task is for: parameters, samples, API",children:[v.jsx(x3,{size:12})," ",v.jsx("span",{className:"hidden sm:inline",children:"Params & samples"})]}),children:v.jsx(av,{className:"text-xs",children:i.replace(/^# .*\n+/,"")})})}function m9({items:e}){const[i,r]=P.useState(!1);return P.useEffect(()=>{i&&!e.length&&r(!1)},[i,e.length]),e.length?v.jsx(i5,{open:i,onOpenChange:r,title:`${e.length} waiting on you`,icon:v.jsx(as,{size:14,className:"shrink-0 text-severity-warning"}),description:"Questions and requests this session is waiting on.",trigger:v.jsxs(ve,{className:"bg-severity-warning text-background shadow-md hover:bg-severity-warning/90",title:"What this session is waiting on",children:[v.jsx(as,{size:12,className:"animate-status-pulse"})," ",e.length," ",v.jsx("span",{className:"hidden sm:inline",children:"waiting"})]}),children:v.jsx("div",{className:"space-y-2",children:e.map(s=>v.jsx(Bl,{interaction:s},s.id))})}):null}function s5(){const[e,i]=P.useState(null),[r,s]=P.useState(!1),[l,p]=P.useState(!1);P.useEffect(()=>{let m=!0;return _e.hub().then(c=>m&&i(c.claudeStatus)).catch(()=>{}),()=>{m=!1}},[]);const f=async()=>{s(!0);try{i(await _e.checkClaude())}catch{}finally{s(!1)}},a=(e==null?void 0:e.problem)??null,h=e===null;if(P.useEffect(()=>{if(!a&&!h)return;const m=setInterval(()=>void(a?f():_e.hub().then(c=>i(c.claudeStatus)).catch(()=>{})),a?3e4:5e3);return()=>clearInterval(m)},[a,h]),!(e!=null&&e.problem))return null;const d=()=>{var m;(m=navigator.clipboard)==null||m.writeText(e.fix??"").then(()=>{p(!0),setTimeout(()=>p(!1),1500)})};return v.jsxs("div",{role:"alert",className:"flex flex-wrap items-center gap-x-3 gap-y-2 border-b bg-destructive/15 px-5 py-2 text-xs",children:[v.jsx(bS,{size:14,className:"shrink-0 text-destructive"}),v.jsxs("span",{className:"min-w-0",children:[v.jsx("b",{children:e.message})," Sessions, runs and chat commands cannot start until then."]}),e.fix&&v.jsxs("span",{className:"flex items-center gap-1",children:["Run",v.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 font-mono",children:e.fix}),v.jsx(ve,{variant:"ghost",size:"icon",onClick:d,title:l?"Copied":"Copy","aria-label":"Copy the command",children:v.jsx(gh,{size:12})}),e.problem==="missing"?"in a terminal, then sign in with":"in a terminal on this machine.",e.problem==="missing"&&v.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 font-mono",children:"claude auth login"})]}),v.jsxs(ve,{variant:"muted",onClick:()=>void f(),disabled:r,className:"ml-auto",children:[v.jsx(vh,{size:12,className:r?"animate-spin":void 0}),r?"Checking...":"Check again"]})]})}const rm=[{page:"overview",label:"Projects",icon:j3},{page:"inbox",label:"Inbox",icon:L3},{page:"channels",label:"Channels",icon:Fl}];let Zb=null;function g9(){return Zb??(Zb=_e.folders().then(e=>e.home,()=>null)),Zb}function Jb(e,i){var r;(r=navigator.clipboard)==null||r.writeText(e).then(()=>we.getState().notify(`Copied the ${i}.`),()=>we.getState().notify("The browser did not allow copying.","error"))}function o5({project:e,x:i,y:r,onClose:s}){const l=we(m=>m.openProject),p=mn(),f=()=>at(()=>_e.setMuted(e.id,!e.muted),e.muted?`${e.name} is heard on the global channels again.`:`The global channels no longer hear from ${e.name}.`),a=()=>p({title:`Remove ${e.name} from the hub?`,description:"Its running sessions stop and its jobs no longer run. The folder and its saved settings stay.",confirmLabel:"Remove",tone:"destructive",run:async()=>{await _e.removeProject(e.id),we.getState().notify(`Removed ${e.name}. Opening its folder again brings it back as it was.`)}});P.useEffect(()=>{const m=()=>s(),c=_=>_.key==="Escape"&&s();return window.addEventListener("pointerdown",m),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),window.addEventListener("keydown",c),()=>{window.removeEventListener("pointerdown",m),window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m),window.removeEventListener("keydown",c)}},[s]);const h=async()=>{const m=await g9(),c=e.root,_=c.includes("\\")?"\\":"/",y=m&&c.toLowerCase().startsWith(`${m.replace(/[\\/]$/,"").toLowerCase()}${_}`);Jb(y?`~${_}${c.slice(m.replace(/[\\/]$/,"").length+1)}`:c,"relative path")},d=(m,c,_,y={})=>{const E=c;return v.jsxs("button",{title:y.hint,onPointerDown:S=>{S.stopPropagation(),s(),_()},className:ye("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs",y.danger?"text-severity-critical hover:bg-destructive/15":"hover:bg-muted"),children:[v.jsx(E,{size:13}),m]})};return v.jsxs("div",{role:"menu",className:"fixed z-50 w-56 rounded-lg border bg-card p-1 shadow-lg",style:{left:Math.min(i,window.innerWidth-232),top:Math.min(r,window.innerHeight-290)},onPointerDown:m=>m.stopPropagation(),children:[d("Open",ph,()=>l(e.id)),v.jsx("div",{className:"my-1 border-t"}),e.paused?d("Allow notifications",as,()=>void at(()=>_e.pauseNotificationsIn(e.id,!1),`Notifications from ${e.name} are back on.`)):d("Do not disturb",oa,()=>void at(()=>_e.pauseNotificationsIn(e.id,!0),`No channel hears from ${e.name} now.`),{hint:"Pauses every channel of this project, and the global ones for it; questions still wait in the inbox"}),d(e.muted?"Hear on global channels":"Mute on global channels",e.muted?Fl:W3,()=>void f(),{hint:"Only the global channels; the project's own channels are not changed"}),v.jsx("div",{className:"my-1 border-t"}),d("Copy Path",El,()=>Jb(e.root,"path")),d("Copy Relative Path",El,()=>void h(),{hint:"From your home folder, as ~/..."}),d("Reveal in File Explorer",aa,()=>void at(()=>_e.revealIn(e.id))),v.jsx("div",{className:"my-1 border-t"}),d("Remove from the hub",xr,()=>void a(),{danger:!0,hint:"The folder and its saved settings stay"})]})}function v9({project:e}){const i=we(a=>a.openProject),r=mn(),s=()=>at(()=>_e.setMuted(e.id,!e.muted),e.muted?`${e.name} is heard on the global channels again.`:`The global channels no longer hear from ${e.name}.`),l=()=>r({title:`Remove ${e.name} from the hub?`,description:"Its running sessions stop and its jobs no longer run. The folder and its saved settings stay.",confirmLabel:"Remove",tone:"destructive",run:async()=>{await _e.removeProject(e.id),we.getState().notify(`Removed ${e.name}. Opening its folder again brings it back as it was.`)}}),[p,f]=P.useState(null);return v.jsxs("div",{className:"card flex min-w-0 flex-col gap-2 p-3",onContextMenu:a=>{a.preventDefault(),f({x:a.clientX,y:a.clientY})},children:[p&&v.jsx(o5,{project:e,...p,onClose:()=>f(null)}),v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsxs("button",{onClick:()=>i(e.id),className:"min-w-0 flex-1 text-left",title:e.root,children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[v.jsx("span",{className:"truncate text-sm font-semibold hover:underline",children:e.name}),e.paused&&v.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 rounded bg-severity-warning/15 px-1 text-[9px] font-medium text-severity-warning",title:"Do not disturb: no channel hears from it",children:[v.jsx(oa,{size:9})," DND"]})]}),v.jsx("div",{className:"truncate text-[10px] text-muted-foreground",children:e.root})]}),v.jsx("button",{onClick:()=>void s(),title:e.muted?"Muted on the global channels: click to hear from it again":"Heard on the global channels: click to mute","aria-label":e.muted?`Unmute ${e.name}`:`Mute ${e.name}`,className:ye("shrink-0 rounded p-1 hover:bg-muted",e.muted?"text-muted-foreground":"text-foreground"),children:e.muted?v.jsx(oa,{size:13}):v.jsx(as,{size:13})}),v.jsx("button",{onClick:()=>void l(),title:"Remove from the hub","aria-label":`Remove ${e.name}`,className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",children:v.jsx(Nn,{size:13})})]}),v.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px]",children:[v.jsxs("span",{className:ye(e.waiting?"font-semibold text-severity-warning":"text-muted-foreground"),children:["⏳ ",e.waiting," waiting"]}),v.jsxs("span",{className:"text-muted-foreground",children:["▶️ ",e.running," running"]}),v.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",title:e.runningRun?`Running: ${e.runningRun}`:void 0,children:[v.jsx(O3,{size:11})," ",e.runningRun?"1 running, ":"",e.queued," queued"]})]}),v.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:[v.jsxs("span",{className:"flex min-w-0 max-w-full items-center gap-1 truncate",title:e.nextCron?`${e.nextCron.name}: ${qs(e.nextCron.at)}`:void 0,children:[v.jsx(mh,{size:11,className:"shrink-0"})," ",v.jsx("span",{className:"truncate",children:e.nextCron?`${e.nextCron.name} · ${qs(e.nextCron.at)}`:"no cron job"})]}),v.jsxs("span",{title:"Sent and written in the sessions active today, cache reads left out",children:[e.activeToday," active today · ",jn(e.tokensToday)," tokens"]})]})]})}function a5({children:e}){return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsx("div",{className:"mx-auto max-w-6xl space-y-4 p-5",children:e})})}function _9(){var s;const[e,i]=P.useState(!1),r=mt(()=>_e.globalOverview(),["projects","sessions","interactions","runs","jobs","channels"]);return v.jsxs(a5,{children:[v.jsx(Cr,{group:"Global",title:"Projects",description:"Every project in the hub, most recently opened first. The bell says whether the global channels hear from it.",action:v.jsxs(ve,{variant:"primary",onClick:()=>i(!0),children:[v.jsx(fi,{size:12})," Open folder..."]})}),v.jsx(j2,{open:e,onOpenChange:i}),(s=r.data)!=null&&s.length?v.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 xl:grid-cols-3",children:r.data.map(l=>v.jsx(v9,{project:l},l.id))}):v.jsx(nn,{variant:"inline",title:r.data?"No projects yet.":"Loading..."})]})}function x9(){var i;const e=mt(()=>_e.globalInbox(),["projects","interactions"]);return v.jsxs(a5,{children:[v.jsx(Cr,{group:"Global",title:"Inbox",description:"Everything waiting on you, in every project."}),(i=e.data)!=null&&i.length?v.jsx("div",{className:"space-y-2",children:e.data.map(r=>v.jsx(Bl,{interaction:r,project:r.project,showSession:!0},`${r.project.id}:${r.id}`))}):v.jsx(nn,{icon:as,title:e.data?"Nothing is waiting on you.":"Loading..."})]})}function eS({width:e,collapsed:i,onToggle:r,drawer:s=!1}){var w;const l=we(x=>x.view),p=we(x=>x.go),f=we(x=>x.openProject),a=we(x=>x.sessions),h=mt(()=>_e.projects(),["projects"]),d=mt(()=>_e.globalOverview(),["projects","channels"]),[m,c]=P.useState(null),[_,y]=P.useState(!1),S=((w=mt(()=>_e.globalInbox(),["projects","interactions"]).data)==null?void 0:w.length)??0,g=a.filter(x=>x.origin!=="external"||x.live).slice(0,10),b=x=>l.kind==="page"&&(l.page===x||x==="overview"&&!rm.some(T=>T.page===l.page));return i?v.jsxs("aside",{className:"flex w-12 shrink-0 flex-col items-center gap-1 overflow-y-auto border-r py-3",children:[v.jsx(ua,{className:"mb-2"}),rm.map(x=>v.jsx(cr,{content:`Global · ${x.label}`,side:"right",asChild:!0,children:v.jsx(ve,{variant:"ghost",size:"icon",className:ye(b(x.page)&&"bg-muted text-foreground"),onClick:()=>p({kind:"page",page:x.page}),children:v.jsx(x.icon,{size:15})})},x.page)),v.jsx("div",{className:"flex-1"}),v.jsx(ve,{variant:"ghost",size:"icon",onClick:r,"aria-label":"Expand sidebar",children:v.jsx(uS,{size:15})})]}):v.jsxs("aside",{className:"flex shrink-0 flex-col",style:{width:e},children:[v.jsxs("div",{className:"flex items-center gap-2 px-3 pb-2 pt-3",children:[v.jsx(ua,{}),v.jsxs("div",{className:"min-w-0",children:[v.jsx(zh,{}),v.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[v.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:"Global"}),v.jsx(hv,{})]})]}),v.jsx(ve,{variant:"ghost",size:"icon",className:"ml-auto",onClick:r,"aria-label":s?"Close menu":"Collapse sidebar",children:s?v.jsx(Nn,{size:15}):v.jsx(cS,{size:15})})]}),v.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pb-3",children:[v.jsx("nav",{className:"px-2",children:rm.map(x=>v.jsxs("button",{onClick:()=>p({kind:"page",page:x.page}),className:ye("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs transition-colors",b(x.page)?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[v.jsx(x.icon,{size:14}),x.label,x.page==="inbox"&&S>0&&v.jsx("span",{className:"ml-auto rounded-full bg-severity-warning px-1.5 text-[10px] font-semibold text-background",children:S})]},x.page))}),v.jsxs("div",{className:"mt-2 px-2",children:[v.jsxs("div",{className:"flex items-center px-2 pb-0.5 pt-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Projects",v.jsx("button",{onClick:()=>y(!0),title:"Open folder...","aria-label":"Add a project",className:"ml-auto rounded p-0.5 hover:bg-muted hover:text-foreground",children:v.jsx(fi,{size:12})})]}),m&&v.jsx(o5,{project:m.project,x:m.x,y:m.y,onClose:()=>c(null)}),(h.data??[]).map(x=>v.jsxs("button",{disabled:!x.exists,onClick:()=>f(x.id),onContextMenu:T=>{var R;T.preventDefault();const D=(R=d.data)==null?void 0:R.find(L=>L.id===x.id);c({project:{id:x.id,name:x.name,root:x.root,muted:D==null?void 0:D.muted,paused:D==null?void 0:D.paused},x:T.clientX,y:T.clientY})},title:x.root,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground disabled:opacity-50",children:[v.jsx(pS,{size:14,className:"shrink-0"}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.name}),x.waiting>0&&v.jsx("span",{className:"rounded-full bg-severity-warning px-1.5 text-[10px] font-semibold text-background",children:x.waiting}),x.running>0&&v.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px]",title:`${x.running} running`,children:[v.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-success"})," ",x.running]})]},x.id)),h.data&&!h.data.length&&v.jsx("div",{className:"px-2 py-1 text-[11px] text-muted-foreground",children:"No projects yet."})]}),g.length>0&&v.jsxs("div",{className:"mt-2 px-2",children:[v.jsx("div",{className:"px-2 pb-0.5 pt-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Hub tasks"}),g.map(x=>v.jsxs("button",{onClick:()=>p({kind:"session",id:x.id}),className:ye("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs transition-colors",l.kind==="session"&&l.id===x.id?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[v.jsx(Ul,{size:13,className:"shrink-0"}),v.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.title}),v.jsx(Uh,{session:x})]},x.id))]})]}),v.jsxs("div",{className:"border-t px-2 py-2",children:[v.jsxs(ve,{variant:"ghost",className:"w-full justify-start",onClick:()=>y(!0),children:[v.jsx(fi,{size:13})," Open folder..."]}),v.jsx(j2,{open:_,onOpenChange:y})]})]})}const tS="clauder-hub:global-sidebar-collapsed";function y9(){const e=we(h=>h.view),i=M2("clauder-hub:sidebar-width",280,{min:220,max:480}),r=D2("(min-width: 768px)"),[s,l]=P.useState(!1),[p,f]=P.useState(()=>{try{return localStorage.getItem(tS)==="1"}catch{return!1}});P.useEffect(()=>{document.title="Clauder Hub · Global"},[]),P.useEffect(()=>{try{localStorage.setItem(tS,p?"1":"0")}catch{}},[p]),P.useEffect(()=>l(!1),[e,r]);const a=e.kind==="session"?v.jsx(r5,{id:e.id},e.id):e.kind==="page"&&e.page==="inbox"?v.jsx(x9,{}):e.kind==="page"&&e.page==="channels"?v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsx("div",{className:"mx-auto max-w-6xl p-5",children:v.jsx(nC,{global:!0})})}):v.jsx(_9,{});return v.jsxs("div",{className:"flex h-screen overflow-hidden",children:[r&&v.jsx(eS,{width:i.width,collapsed:p,onToggle:()=>f(!p)}),r&&!p&&v.jsx(O2,{onDrag:i.resizeBy,onReset:i.reset}),!r&&v.jsxs(v.Fragment,{children:[s&&v.jsx("div",{className:"fixed inset-0 z-40 bg-foreground/40 animate-in fade-in-0",onClick:()=>l(!1)}),v.jsx("div",{inert:!s,className:ye("fixed inset-y-0 left-0 z-40 flex border-r bg-background transition-transform duration-200",s?"translate-x-0 shadow-xl":"-translate-x-full"),children:v.jsx(eS,{width:"min(280px, 85vw)",collapsed:!1,onToggle:()=>l(!1),drawer:!0})})]}),v.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[!r&&v.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-2 py-2",children:[v.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>l(!0),"aria-label":"Open menu",title:"Menu",children:v.jsx(mS,{size:16})}),v.jsx(ua,{}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx(zh,{}),v.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Global"})]})]}),v.jsx(s5,{}),v.jsx("div",{className:"min-h-0 flex-1",children:a})]})]})}function b9(){const e=we(s=>s.open),r=(mt(()=>_e.interactions(),["interactions"]).data??[]).filter(s=>s.status!=="open").slice(0,60);return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"space-y-4 p-5",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Operation"}),v.jsx("h1",{className:"text-base font-semibold",children:"Inbox"}),v.jsx("p",{className:"truncate text-xs text-muted-foreground",title:"What sessions are waiting on. The first answer wins, from anywhere.",children:"What sessions are waiting on. The first answer wins, from anywhere."})]}),e.length?v.jsx("div",{className:"space-y-2",children:e.map(s=>v.jsx(Bl,{interaction:s,showSession:!0},s.id))}):v.jsx(nn,{icon:as,title:"Nothing is waiting on you."}),r.length>0&&v.jsxs("div",{className:"space-y-2",children:[v.jsx("h2",{className:"pt-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Recent"}),r.map(s=>v.jsx(Bl,{interaction:s,showSession:!0,compact:!0},s.id))]})]})})}function S9(){var f;const e=mt(()=>_e.suggestions(),["mcp"]),i=mt(()=>_e.mcpSuggestionsEnabled(),["mcp"]),r=!!((f=i.data)!=null&&f.enabled),s=we(a=>a.go),l=(e.data??[]).filter(a=>a.status==="suggested"),p=(e.data??[]).filter(a=>a.status!=="suggested");return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"space-y-4 p-5",children:[v.jsx(Cr,{group:"Settings",title:"MCP suggestions",description:"Servers that blocked sessions asked for. Nothing installs without you.",action:v.jsxs(ve,{onClick:()=>s({kind:"page",page:"mcp-servers"}),children:[v.jsx(Hl,{size:12})," Configured servers"]})}),v.jsx(Dt,{title:"Suggest MCP servers",description:"When on, sessions are told they may stop and ask for a missing MCP server. Off: that part of the system prompt is left out. Applies to sessions started from now on.",action:v.jsx("button",{role:"switch","aria-checked":r,"aria-label":"Suggest MCP servers",disabled:!i.data,onClick:()=>void at(()=>_e.setMcpSuggestionsEnabled(!r),r?"MCP suggestions off.":"MCP suggestions on."),className:ye("relative h-5 w-9 shrink-0 rounded-full transition-colors",r?"bg-primary":"bg-foreground/20"),children:v.jsx("span",{className:ye("absolute top-0.5 h-4 w-4 rounded-full bg-background transition-all",r?"left-[18px]":"left-0.5")})}),children:null}),v.jsx(Dt,{title:`Waiting (${l.length})`,children:l.length?v.jsx("div",{className:"space-y-2",children:l.map(a=>v.jsx(nS,{suggestion:a},a.id))}):v.jsx(nn,{variant:"inline",title:"No session is waiting on an MCP server."})}),p.length>0&&v.jsx(Dt,{title:"History",children:v.jsx("div",{className:"space-y-2",children:p.map(a=>v.jsx(nS,{suggestion:a},a.id))})})]})})}function nS({suggestion:e}){const i=we(a=>a.go),r=mn(),s=e.status==="installed"?"success":e.status==="failed"?"critical":e.status==="suggested"?"warning":"off",l=()=>r({title:`Install '${e.name}'?`,description:"Adds it to this project's .mcp.json.",body:v.jsxs("div",{className:"space-y-2",children:[v.jsx("pre",{className:"whitespace-pre-wrap rounded bg-muted p-3 font-mono text-[11px]",children:e.runs}),v.jsx("p",{className:"text-[11px] text-muted-foreground",children:"If it succeeds, the session that asked is restarted on the same conversation so the server loads, and is told to continue."})]}),confirmLabel:"Run it",run:async()=>{const a=await _e.installSuggestion(e.id);we.getState().notify(a.status==="installed"?"Installed; the session is resuming.":"The install failed; see its output.",a.status==="installed"?"info":"error")}}),p=()=>r({title:`Carry on without '${e.name}'?`,description:"The session continues without it.",confirmLabel:"Skip it",run:()=>_e.skipSuggestion(e.id)}),f=()=>r({title:"Remove this suggestion from the history?",confirmLabel:"Remove",tone:"destructive",run:()=>_e.deleteSuggestion(e.id)});return v.jsxs("div",{className:"rounded-md border p-3",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx(Hl,{size:14,className:"shrink-0"}),v.jsx("span",{className:"min-w-0 break-all text-xs font-semibold",children:e.name}),v.jsx(nt,{tone:s,children:e.status}),v.jsxs("button",{className:"text-[11px] text-muted-foreground hover:underline",onClick:()=>i({kind:"session",id:e.sessionId}),children:["from session ",e.sessionId.slice(0,8)]}),v.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:$l(e.createdAt)})]}),v.jsx("div",{className:"mt-1.5 break-words text-xs text-muted-foreground",children:e.reason}),v.jsx("pre",{className:"mt-1.5 overflow-auto whitespace-pre-wrap rounded bg-muted p-2 font-mono text-[11px]",children:e.runs??e.command}),e.refused&&v.jsx("div",{className:"mt-1 text-[11px] text-severity-critical",children:e.refused}),e.output&&v.jsx("pre",{className:"mt-1.5 max-h-40 overflow-auto whitespace-pre-wrap rounded border p-2 font-mono text-[10px] text-muted-foreground",children:e.output}),v.jsxs("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[e.status==="suggested"&&v.jsxs(v.Fragment,{children:[v.jsxs(ve,{variant:"primary",disabled:!e.runs,onClick:()=>void l(),children:[v.jsx(C3,{size:12})," Install & resume"]}),v.jsxs(ve,{onClick:()=>void p(),children:[v.jsx(Nn,{size:12})," Skip"]})]}),e.docs&&v.jsx("a",{href:e.docs,target:"_blank",rel:"noreferrer",children:v.jsxs(ve,{variant:"ghost",children:[v.jsx(fa,{size:12})," Docs"]})}),e.status!=="suggested"&&v.jsx(ve,{variant:"ghost",className:"ml-auto",onClick:()=>void f(),children:v.jsx(xr,{size:12})})]})]})}function w9(){const e=mt(()=>_e.stats(),["sessions","transcript"]),i=mt(()=>_e.inventory(),["sessions"]),r=we(l=>l.sessions),s=e.data;return v.jsx("div",{className:"h-full overflow-y-auto",children:v.jsxs("div",{className:"space-y-4 p-5",children:[v.jsx(Cr,{group:"Operation",title:"Overview",description:"Stats from this project's Claude Code transcripts."}),v.jsxs("div",{className:"grid grid-cols-2 gap-2 md:grid-cols-4",children:[v.jsx(rs,{label:"Sessions",value:String((s==null?void 0:s.sessions)??"-")}),v.jsx(rs,{label:"Live now",value:String(r.filter(l=>l.live).length)}),v.jsx(rs,{label:"Waiting on you",value:String(r.filter(l=>l.status==="waiting").length)}),v.jsx(rs,{label:"Tool calls",value:s?jn(Object.values(s.tools).reduce((l,p)=>l+p.count,0)):"-"})]}),s&&v.jsx(eC,{tokens:s.tokens}),s&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[v.jsx(Dt,{title:"Output tokens per day",className:"lg:col-span-2",children:v.jsx(t6,{days:s.byDay,valueOf:l=>l.output,label:"output tokens"})}),v.jsx(Dt,{title:"Tokens by model",children:v.jsx(os,{rows:Object.entries(s.byModel).filter(([,l])=>ss(l)>0).map(([l,p])=>({key:l,label:l,value:ss(p)}))})})]}),v.jsx(N2,{tools:s.tools}),v.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[v.jsx(Dt,{title:"Subagents by type",description:"How often each was spawned, with its own tokens.",children:v.jsx(os,{rows:Object.entries(s.agents).map(([l,p])=>({key:l,label:l,value:p.count,sublabel:`${jn(ss(p.tokens))} tok`})),format:String,empty:"No subagents yet."})}),v.jsx(Dt,{title:"Skills & commands",children:v.jsx(os,{rows:Object.entries(s.skills).map(([l,p])=>({key:l,label:l,value:p})),format:String,empty:"No skills used yet."})})]})]}),e.error&&v.jsx("div",{className:"text-xs text-severity-critical",children:e.error}),i.data&&v.jsx(E9,{inventory:i.data})]})})}const C9=[{page:"agents",label:"Agents",count:e=>e.agents.length},{page:"skills",label:"Skills",count:e=>e.skills.length},{page:"commands",label:"Commands",count:e=>e.commands.length},{page:"mcp-servers",label:"MCP servers",count:e=>e.mcpServers.length},{page:"hooks",label:"Hooks",count:e=>e.hooks.length},{page:"plugins",label:"Plugins",count:e=>e.plugins.filter(i=>i.enabled).length}];function E9({inventory:e}){const i=we(r=>r.go);return v.jsx(Dt,{title:"What sessions can reach for",description:"All scopes together: this project, your user config and enabled plugins. Open one under Project.",children:v.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-6",children:C9.map(r=>v.jsxs("button",{onClick:()=>i({kind:"page",page:r.page}),className:"rounded-md border px-3 py-2 text-left transition-colors hover:bg-muted",children:[v.jsx("div",{className:"text-[11px] text-muted-foreground",children:r.label}),v.jsx("div",{className:"text-lg font-semibold tabular-nums",children:r.count(e)})]},r.page))})})}const k9={name:"",toolset:{agents:[],skills:[],mcp:[],plugins:[]},isDefault:!1};function T9(){const e=mt(()=>_e.presets(),["jobs"]),i=mt(()=>_e.toolsetCatalog(),[]),{starting:r,start:s}=Ks(),[l,p]=P.useState(null),[f,a]=P.useState(!1),h=_=>{p(_),a(_!==null)},d=e.data??[],m=l==="new"?null:d.find(_=>_.id===l)??d[0]??null,c=l==="new"||!d.length&&e.data!==null;return v.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[v.jsx("div",{className:"border-b px-5 py-4",children:v.jsx(Cr,{group:"Settings",title:"Toolset presets",description:"Named sets of agents, skills, MCP servers and plugins to turn off.",action:v.jsxs(ve,{variant:"primary",disabled:r,onClick:()=>void s("create-preset"),title:"Opens a Claude session to describe the preset",children:[v.jsx(fi,{size:12})," New preset"]})})}),v.jsxs("div",{className:"flex min-h-0 flex-1",children:[v.jsxs("div",{className:ye("w-full shrink-0 space-y-0.5 overflow-y-auto p-3 md:block md:w-56 md:border-r lg:w-72",f&&"hidden"),children:[d.map(_=>v.jsxs("button",{onClick:()=>h(_.id),className:ye("block w-full rounded-md px-2 py-1.5 text-left text-foreground",(m==null?void 0:m.id)===_.id&&!c?"bg-muted":"hover:bg-muted/60"),children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx(tg,{size:12,className:"shrink-0 text-muted-foreground"}),v.jsx("span",{className:"min-w-0 truncate text-xs",children:_.name}),_.isDefault&&v.jsx(nt,{tone:"on",children:"default"})]}),v.jsx("div",{className:"truncate pl-[18px] text-[10px] text-muted-foreground",children:dh(_.toolset)?`${dh(_.toolset)} turned off`:"everything on"})]},_.id)),!d.length&&v.jsx(nn,{variant:"inline",title:"No presets yet."})]}),v.jsxs("div",{className:ye("min-w-0 flex-1 overflow-y-auto p-4 md:block md:p-5",!f&&"hidden"),children:[v.jsx(Dg,{onClick:()=>a(!1)}),i.data&&(c||m)?v.jsx(R9,{preset:c?k9:m,catalog:i.data,onSaved:_=>{e.reload(),p(_)},onDeleted:()=>{e.reload(),h(null)}},c?"new":m.id):null]})]})]})}function R9({preset:e,catalog:i,onSaved:r,onDeleted:s}){const l=mn(),{starting:p,start:f}=Ks(),[a,h]=P.useState(e);P.useEffect(()=>h(e),[e]);const d=JSON.stringify(a)!==JSON.stringify(e),m=async()=>{const _=await at(()=>_e.savePreset(a),"Saved.");_&&r(_.id)},c=()=>l({title:`Delete the preset '${e.name}'?`,description:"Jobs using it fall back to the default.",confirmLabel:"Delete",tone:"destructive",run:async()=>{await _e.deletePreset(e.id),we.getState().notify("Deleted."),s()}});return v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[v.jsxs("div",{className:"flex min-w-0 flex-1 basis-48 items-center gap-3",children:[v.jsx(pi,{value:a.name,onChange:_=>h({...a,name:_.target.value}),placeholder:"Preset name",className:"max-w-xs",size:"md"}),v.jsx(Ih,{label:"Default for new sessions and jobs",checked:a.isDefault,onCheckedChange:_=>h({...a,isDefault:_})})]}),v.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.id&&v.jsxs(ve,{variant:"ghost",disabled:p,onClick:()=>void f("edit-preset",e.id),title:"Describe the change to Claude instead of flipping switches",children:[v.jsx(ig,{size:12})," Edit with Claude"]}),e.id&&v.jsxs(ve,{variant:"ghost",onClick:()=>void c(),children:[v.jsx(xr,{size:12})," Delete"]}),d&&e.id&&v.jsx(ve,{onClick:()=>h(e),children:"Discard"}),v.jsx(ve,{variant:"primary",disabled:!a.name.trim()||!d&&!!e.id,onClick:()=>void m(),children:"Save"})]})]}),v.jsx(P2,{catalog:i,value:a.toolset,onChange:_=>h({...a,toolset:_})})]})}function A9(e){if(e.params.length){const i=e.params.filter(r=>r.required).map(r=>r.name);return{icon:D3,text:i.length?`Needs ${i.join(", ")}`:"Optional settings"}}return e.auth==="oauth"?{icon:B3,text:"Sign in after adding"}:{icon:Il,text:"Nothing to set up"}}function L9(){var s;const e=mt(()=>_e.mcpCatalog(),["mcp"]),{starting:i,start:r}=Ks();return(s=e.data)!=null&&s.length?v.jsx(Dt,{title:"Recommended",description:"Common servers. Adding one opens a hub task that asks for what it needs.",action:v.jsxs(ve,{disabled:i,onClick:()=>void r("add-mcp"),title:"Opens a hub task to add any MCP server",children:[v.jsx(ig,{size:12})," Add another server"]}),children:v.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:e.data.map(l=>{const p=A9(l);return v.jsxs("div",{className:"flex flex-col rounded-md border p-3",children:[v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"truncate text-xs font-semibold",children:l.name}),v.jsx("div",{className:"truncate text-[10px] text-muted-foreground",children:l.vendor})]}),v.jsx(nt,{tone:"off",children:l.category})]}),v.jsx("p",{className:"mt-1.5 line-clamp-2 flex-1 text-[11px] text-muted-foreground",title:l.description,children:l.description}),v.jsxs("div",{className:"mt-2 flex items-center gap-1.5",children:[v.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1 truncate text-[10px] text-muted-foreground",title:p.text,children:[v.jsx(p.icon,{size:11,className:"shrink-0"})," ",v.jsx("span",{className:"truncate",children:p.text})]}),v.jsx("a",{href:l.docs,target:"_blank",rel:"noreferrer",title:"Docs",className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",children:v.jsx(fa,{size:12})}),l.installed?v.jsx(nt,{tone:"success",icon:Il,children:"added"}):v.jsxs(ve,{className:"shrink-0 bg-white text-neutral-900 hover:bg-white/85",disabled:i,onClick:()=>void r("add-mcp",l.id),children:[v.jsx(fi,{size:12})," Add"]})]})]},l.id)})})}):null}const D9=["user","project","local","plugin","built-in"],l5={project:"This project (shared, in the repo)",local:"This project (local, only on this machine)",user:"You (every project)",plugin:"Plugins","built-in":"Built into Claude Code"};function fh(e,i){var r;return e.scope==="user"?!0:e.scope==="plugin"&&((r=i.find(s=>s.id===e.plugin))==null?void 0:r.scope)==="user"}function $h(){return mt(()=>_e.inventory(),["sessions"])}function vv(){var l;const e=mt(()=>_e.presets(),["jobs"]),i=mt(()=>_e.toolsetCatalog(),["sessions"]);return!e.data||!i.data?null:{off:((l=e.data.find(p=>p.isDefault))==null?void 0:l.toolset)??{agents:[],skills:[],mcp:[],plugins:[]},mcpId:p=>{var f;return(f=i.data.find(a=>a.kind==="mcp"&&a.label===p))==null?void 0:f.id}}}function _v({defaults:e,kind:i,id:r,plugin:s}){if(!e||!r)return null;const l=!!(s&&e.off.plugins.includes(s));return v.jsx(Ih,{ariaLabel:`${r} in new sessions`,title:l?`Off with its plugin ${s}`:"On in new sessions (default preset)",disabled:l,checked:!l&&!e.off[i].includes(r),onCheckedChange:p=>void at(()=>_e.setDefaultItem(i,r,p),`${r} ${p?"on":"off"} in new sessions.`)})}function c5(e){return D9.map(i=>[i,e.filter(r=>r.scope===i)]).filter(([,i])=>i.length)}function u5({items:e,keyOf:i,render:r,detail:s,searchText:l,empty:p,leading:f}){var g;const[a,h]=P.useState(""),[d,m]=P.useState(null),[c,_]=P.useState(!1),y=P.useMemo(()=>{const b=a.trim().toLowerCase();return b?e.filter(w=>l(w).toLowerCase().includes(b)):e},[e,a,l]),E=c5(y),S=e.find(b=>i(b)===d)??((g=E[0])==null?void 0:g[1][0])??null;return e.length?v.jsxs("div",{className:"flex min-h-0 flex-1",children:[v.jsxs("div",{className:ye("w-full shrink-0 overflow-y-auto p-3 md:block md:w-60 md:border-r lg:w-80",c&&"hidden"),children:[v.jsxs("div",{className:"relative mb-2",children:[v.jsx(ng,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),v.jsx(pi,{value:a,onChange:b=>h(b.target.value),placeholder:`Filter ${e.length}`,className:"pl-6"})]}),v.jsx("div",{className:"space-y-1.5",children:E.map(([b,w])=>v.jsx(pv,{title:l5[b],badge:v.jsx(nt,{tone:"off",children:w.length}),defaultOpen:!0,children:w.map(x=>v.jsxs("div",{className:ye("flex items-center gap-1 rounded-md",f&&"pl-2",S&&i(S)===i(x)?"bg-muted":"hover:bg-muted/60"),children:[f==null?void 0:f(x),v.jsx("button",{onClick:()=>{m(i(x)),_(!0)},className:"block min-w-0 flex-1 px-2 py-1.5 text-left text-foreground",children:r(x)})]},i(x)))},b))}),!E.length&&v.jsx("div",{className:"px-1 text-xs text-muted-foreground",children:"No match."})]}),v.jsxs("div",{className:ye("min-w-0 flex-1 overflow-y-auto p-4 md:block md:p-5",!c&&"hidden"),children:[v.jsx(Dg,{onClick:()=>_(!1)}),S?s(S):null]})]}):v.jsx(nn,{title:p,className:"m-5"})}function ec({title:e,description:i,children:r}){return v.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[v.jsx("div",{className:"border-b px-5 py-4",children:v.jsx(Cr,{group:"Project",title:e,description:i})}),r]})}const iS={memory:"CLAUDE.md",rules:"Rule","auto-memory":"Auto memory"};function M9(){const e=mt(()=>_e.memory(),[]),i=(e.data??[]).filter(r=>r.group in iS);return v.jsx(ec,{title:"Instructions",description:"CLAUDE.md, rules and memory that every session loads.",children:e.data&&v.jsx(u5,{items:i,keyOf:r=>r.path,searchText:r=>r.label,empty:"No instruction files.",render:r=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx(k3,{size:12,className:"shrink-0"}),v.jsx("span",{className:ye("min-w-0 truncate font-mono text-[11px]",!r.exists&&"opacity-50"),children:r.label}),r.scope==="user"&&v.jsx(ds,{}),v.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-muted-foreground",children:r.exists?iS[r.group]:"new"})]}),detail:r=>v.jsx(R2,{path:r.path,title:r.label,badge:r.scope==="user"?v.jsx(ds,{}):null,onSaved:e.reload},r.path)})})}const j9={agents:{title:"Agents",description:"Subagents Claude can delegate to. Ticked ones are on in new sessions.",empty:"No agents defined. Claude still has its built-in ones (Explore, Plan, general-purpose)."},skills:{title:"Skills",description:"Instructions Claude loads when a task matches. Ticked ones are on in new sessions.",empty:"No skills installed."},commands:{title:"Commands",description:"Slash commands, typed as /name.",empty:"No custom commands."}};function sm({kind:e}){const i=$h(),r=vv(),s=j9[e];return v.jsx(ec,{title:s.title,description:s.description,children:i.data&&v.jsx(u5,{items:i.data[e],keyOf:l=>l.path||`${l.scope}:${l.name}`,searchText:l=>`${l.name} ${l.description}`,empty:s.empty,leading:e==="commands"?void 0:l=>v.jsx(_v,{defaults:r,kind:e,id:l.name,plugin:l.plugin}),render:l=>v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"min-w-0 truncate font-mono text-[11px]",children:e==="commands"?`/${l.name}`:l.name}),fh(l,i.data.plugins)&&v.jsx(ds,{})]}),l.description&&v.jsx("div",{className:"truncate text-[10px] text-muted-foreground",children:l.description})]}),detail:l=>v.jsxs("div",{className:"space-y-3",children:[l.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:l.description}),v.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[v.jsx(nt,{tone:"off",children:l.scope}),l.plugin&&v.jsx(nt,{tone:"off",children:l.plugin}),l.model&&v.jsxs(nt,{tone:"off",children:["model: ",l.model]})]}),l.scope==="built-in"?v.jsxs("div",{className:"space-y-1",children:[v.jsx("h2",{className:"font-mono text-sm font-semibold",children:l.name}),v.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Built into Claude Code, so there is no file to show or edit. It can be turned off per session in its Toolset tab, or in a preset."})]}):v.jsx(R2,{path:l.path,title:e==="commands"?`/${l.name}`:l.name,badge:fh(l,i.data.plugins)?v.jsx(ds,{}):null,subtitle:l.path,onSaved:i.reload},l.path)]})})})}function h5({items:e,row:i,empty:r,footer:s}){return v.jsxs("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto p-5",children:[!e.length&&v.jsx(nn,{title:r}),c5(e).map(([l,p])=>v.jsx(pv,{title:l5[l],badge:v.jsx(nt,{tone:"off",children:p.length}),defaultOpen:!0,children:v.jsx("div",{className:"divide-y rounded-md border bg-background",children:p.map((f,a)=>i(f,a))})},l)),s]})}function O9(){const e=$h(),i=vv();return v.jsx(ec,{title:"MCP servers",description:"Servers configured in files. claude.ai connectors are not listed.",children:e.data&&v.jsx(h5,{items:e.data.mcpServers,empty:"No MCP servers configured in files.",footer:v.jsx(L9,{}),row:r=>v.jsxs("div",{className:ye("flex items-center gap-2 px-3 py-2",r.disabled&&"opacity-50"),children:[v.jsx(_v,{defaults:i,kind:"mcp",id:i==null?void 0:i.mcpId(r.name),plugin:r.plugin}),v.jsx(Hl,{size:13,className:"shrink-0 text-muted-foreground"}),v.jsx("span",{className:"min-w-0 truncate font-mono text-[11px]",children:r.name}),fh(r,e.data.plugins)&&v.jsx(ds,{}),v.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] text-muted-foreground",title:r.target,children:r.target}),r.disabled&&v.jsx(nt,{tone:"off",children:"disabled"}),v.jsx(nt,{tone:"off",children:r.transport})]},`${r.scope}:${r.name}`)})})}function N9(){const e=$h();return v.jsx(ec,{title:"Hooks",description:"Your hooks, from settings files and plugins.",children:e.data&&v.jsx(h5,{items:e.data.hooks,empty:"No hooks configured.",row:(i,r)=>v.jsxs("div",{className:"px-3 py-2",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px]",children:[v.jsx("span",{className:"font-mono",children:i.event}),fh(i,e.data.plugins)&&v.jsx(ds,{}),i.matcher&&v.jsx(nt,{tone:"off",children:i.matcher}),v.jsx(nt,{tone:"off",children:i.type}),i.plugin&&v.jsx("span",{className:"text-muted-foreground",children:i.plugin.split("@")[0]})]}),v.jsx("div",{className:"mt-0.5 truncate font-mono text-[10px] text-muted-foreground",title:i.summary,children:i.summary})]},r)})})}function B9(){var l;const e=$h(),i=vv(),r=((l=e.data)==null?void 0:l.plugins)??[],s=p=>{const f=d=>d.filter(m=>m.plugin===p).length,a=e.data;return[[f(a.agents),"agents"],[f(a.skills),"skills"],[f(a.commands),"commands"],[a.mcpServers.filter(d=>d.plugin===p).length,"MCP"],[a.hooks.filter(d=>d.plugin===p).length,"hooks"]].filter(([d])=>d).map(([d,m])=>`${d} ${m}`).join(" · ")};return v.jsx(ec,{title:"Plugins",description:"Installed plugins and what each adds.",children:e.data&&v.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-5",children:r.length?v.jsx("div",{className:"divide-y rounded-md border",children:r.map(p=>v.jsxs("div",{className:ye("px-3 py-2",!p.enabled&&"opacity-50"),children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[p.enabled&&v.jsx(_v,{defaults:i,kind:"plugins",id:p.id}),v.jsx("span",{className:"min-w-0 break-all font-mono text-[11px]",children:p.id}),p.scope==="user"&&v.jsx(ds,{}),v.jsxs(nt,{tone:"off",children:["v",p.version]}),v.jsx(nt,{tone:p.enabled?"success":"off",children:p.enabled?"enabled":"disabled"}),v.jsx(nt,{tone:"off",children:p.scope})]}),v.jsx("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:s(p.id)||"Nothing this hub can list."})]},p.id))}):v.jsx(nn,{title:"No plugins installed."})})})}function d5(){const e=mn();return async i=>{if(!i.length)return;const{drafts:r,drop:s}=en.getState(),l=i.filter(_=>is(r[_]));if(l.length&&!await e({title:l.length===1?`Close ${l[0].split("/").pop()} without saving?`:`Close ${l.length} files without saving?`,description:"Their unsaved edits are lost.",body:l.length>1?v.jsx("div",{className:"space-y-0.5 font-mono text-[11px] text-muted-foreground",children:l.map(y=>v.jsx("div",{children:y},y))}):void 0,confirmLabel:"Discard and close",tone:"destructive"}))return;for(const _ of i)s(_);const{view:p,go:f,sessions:a}=we.getState(),h=p.kind==="file"?p.path:null,d=new Map(i.map(_=>[_,N4(_)])),m=Bn.getState().close(i,h);if(!h||m===h)return;const c=d.get(h);if(c&&a.some(_=>_.id===c))return f({kind:"session",id:c});f(m?{kind:"file",path:m}:{kind:"page",page:"overview"})}}function P9({path:e,x:i,y:r,onClose:s}){const l=Bn(h=>h.tabs),p=d5();P.useEffect(()=>{const h=()=>s(),d=m=>m.key==="Escape"&&s();return window.addEventListener("pointerdown",h),window.addEventListener("keydown",d),()=>{window.removeEventListener("pointerdown",h),window.removeEventListener("keydown",d)}},[s]);const f=l.findIndex(h=>h.path===e),a=[["Close",Nn,()=>void p([e])],["Close Others",Cl,()=>void p(l.filter(h=>h.path!==e).map(h=>h.path)),l.length<2],["Close to the Right",Cl,()=>void p(l.slice(f+1).map(h=>h.path)),f===l.length-1],["Close All",Cl,()=>void p(l.map(h=>h.path))],["Copy Relative Path",gh,()=>{var h;return void((h=navigator.clipboard)==null?void 0:h.writeText(e))}],["Reveal in File Explorer",aa,()=>void at(()=>Xt.reveal(e))]];return v.jsx("div",{role:"menu",className:"fixed z-50 w-48 rounded-lg border bg-card p-1 shadow-lg",style:{left:Math.min(i,window.innerWidth-200),top:Math.min(r,window.innerHeight-230)},onPointerDown:h=>h.stopPropagation(),children:a.map(([h,d,m,c],_)=>v.jsxs("button",{disabled:c,onClick:()=>{s(),m()},className:ye("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40",_===4&&"mt-1 border-t pt-2"),children:[v.jsx(d,{size:13}),h]},h))})}function I9({active:e}){const i=Bn(y=>y.tabs),{pin:r,reorder:s}=Bn.getState(),l=en(y=>y.drafts),p=we(y=>y.go),f=d5(),[a,h]=P.useState(null),[d,m]=P.useState(null),c=P.useRef(null);if(P.useEffect(()=>{var y,E;e&&((E=(y=c.current)==null?void 0:y.querySelector(`[data-path="${CSS.escape(e)}"]`))==null||E.scrollIntoView({block:"nearest",inline:"nearest"}))},[e,i.length]),!i.length)return null;const _=i.map(y=>y.path.split("/").pop()??y.path);return v.jsxs("div",{ref:c,className:"no-scrollbar flex shrink-0 overflow-x-auto border-b bg-muted/30",children:[a&&v.jsx(P9,{...a,onClose:()=>h(null)}),i.map((y,E)=>{const S=_[E],g=_.filter(T=>T===S).length>1,b=y.path.includes("/")?y.path.slice(0,y.path.lastIndexOf("/")):"",w=is(l[y.path]),x=y.path===e;return v.jsxs("div",{"data-path":y.path,draggable:!0,title:y.path,onClick:()=>p({kind:"file",path:y.path}),onDoubleClick:()=>r(y.path),onAuxClick:T=>{T.button===1&&(T.preventDefault(),f([y.path]))},onContextMenu:T=>{T.preventDefault(),h({path:y.path,x:T.clientX,y:T.clientY})},onDragStart:T=>{m(y.path),T.dataTransfer.effectAllowed="move"},onDragOver:T=>{!d||d===y.path||(T.preventDefault(),s(d,y.path))},onDragEnd:()=>m(null),className:ye("group flex max-w-[16rem] shrink-0 cursor-pointer select-none items-center gap-1.5 border-r border-t-2 px-3 py-1.5 text-xs transition-colors",x?"-mb-px border-t-primary bg-background text-foreground":"border-t-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground",d===y.path&&"opacity-50"),children:[v.jsx(z2,{name:S,size:13}),v.jsx("span",{className:ye("truncate",y.preview&&"italic"),children:S}),g&&b&&v.jsx("span",{className:"truncate text-[10px] text-muted-foreground",children:b}),v.jsx("button",{"aria-label":`Close ${S}`,title:"Close",onClick:T=>{T.stopPropagation(),f([y.path])},className:ye("grid h-4 w-4 shrink-0 place-items-center rounded hover:bg-muted",!w&&!x&&"invisible group-hover:visible"),children:w?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"h-2 w-2 rounded-full bg-foreground group-hover:hidden"}),v.jsx(Nn,{size:12,className:"hidden group-hover:block"})]}):v.jsx(Nn,{size:12})})]},y.path)})]})}function z9({x:e,y:i,items:r,onClose:s}){return P.useEffect(()=>{const l=()=>s(),p=f=>f.key==="Escape"&&s();return window.addEventListener("pointerdown",l),window.addEventListener("keydown",p),()=>{window.removeEventListener("pointerdown",l),window.removeEventListener("keydown",p)}},[s]),v.jsx("div",{role:"menu",className:"fixed z-50 w-44 rounded-lg border bg-card p-1 shadow-lg",style:{left:Math.min(e,window.innerWidth-184),top:Math.min(i,window.innerHeight-180)},onPointerDown:l=>l.stopPropagation(),children:r.map(([l,p,f,a,h])=>v.jsxs("button",{disabled:h,onClick:()=>{s(),f()},className:ye("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",a&&"mt-1 border-t pt-2"),children:[v.jsx(p,{size:13}),l]},l))})}function H9(){const e=we(_=>_.sessions),i=we(_=>_.view),r=we(_=>_.go),s=mn(),l=P.useRef(null),p=fv(),[f,a]=P.useState(null),h=e.filter(_=>_.live),d=i.kind==="session"?i.id:null;if(P.useEffect(()=>{var _,y;d&&((y=(_=l.current)==null?void 0:_.querySelector(`[data-session="${CSS.escape(d)}"]`))==null||y.scrollIntoView({block:"nearest",inline:"nearest"}))},[d,h.length]),!h.length)return null;const m=_=>p.stop(_),c=(_,y)=>s({title:`Stop ${y?"all ":""}${_.length} ${y?"running":"other"} terminal${_.length>1?"s":""}?`,description:"Their conversations are kept for a later resume.",body:v.jsx("div",{className:"space-y-0.5 text-[11px] text-muted-foreground",children:_.map(E=>v.jsx("div",{className:"truncate",children:E.title},E.id))}),confirmLabel:y?"Stop all":"Stop others",tone:"destructive",run:async()=>{await Promise.all(_.map(E=>_e.killSession(E.id))),dv(_.map(E=>E.id))}});return v.jsxs("div",{ref:l,className:"no-scrollbar flex shrink-0 overflow-x-auto border-b bg-muted/30",children:[f&&v.jsx(z9,{x:f.x,y:f.y,onClose:()=>a(null),items:[["Open",ph,()=>r({kind:"session",id:f.session.id})],["Rename",_r,()=>void p.rename(f.session)],["Close",Nn,()=>void m(f.session),!0],["Close Others",Cl,()=>void c(h.filter(_=>_.id!==f.session.id),!1),!1,h.length<2],["Close All",Cl,()=>void c(h,!0)]]}),v.jsx("div",{className:"flex shrink-0 items-center px-2 text-muted-foreground",title:"Running terminals",children:v.jsx(_S,{size:13})}),h.map(_=>{const y=_.id===d;return v.jsxs("div",{"data-session":_.id,title:_.status==="waiting"?`${_.title} (waiting on you)`:_.title,onClick:()=>r({kind:"session",id:_.id}),onContextMenu:E=>{E.preventDefault(),a({session:_,x:E.clientX,y:E.clientY})},onAuxClick:E=>{E.button===1&&(E.preventDefault(),m(_))},className:ye("group flex max-w-[16rem] shrink-0 cursor-pointer select-none items-center gap-1.5 border-r border-t-2 px-3 py-1.5 text-xs transition-colors",y?"-mb-px border-t-primary bg-background text-foreground":"border-t-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[v.jsx(Uh,{session:_}),v.jsx("span",{className:"truncate",children:_.title}),_.openInteractions>0&&v.jsx("span",{className:"grid h-4 min-w-[1rem] shrink-0 place-items-center rounded-full bg-severity-warning px-1 text-[10px] font-semibold leading-none text-background",children:_.openInteractions}),v.jsx("button",{"aria-label":`Stop ${_.title}`,title:"Stop this terminal",onClick:E=>{E.stopPropagation(),m(_)},className:ye("grid h-4 w-4 shrink-0 place-items-center rounded hover:bg-muted",!y&&"invisible group-hover:visible"),children:v.jsx(Nn,{size:12})})]},_.id)})]})}const rS="clauder-hub:sidebar-collapsed";function sS({text:e,failed:i}){const r=i?bS:hS;return v.jsxs("div",{role:i?"alert":"status",className:ye("fixed bottom-4 left-1/2 z-[60] flex max-w-[calc(100%-2rem)] -translate-x-1/2 items-center gap-2 rounded-xl px-3.5 py-2.5 text-xs opacity-85 shadow-lg shadow-black/25 transition-opacity animate-in fade-in-0 slide-in-from-bottom-2 hover:opacity-100 sm:max-w-lg",i?"bg-primary text-primary-foreground":"bg-success text-success-foreground"),children:[v.jsx(r,{size:15,className:"shrink-0"}),v.jsx("span",{className:"min-w-0 break-words",children:e})]})}const F9={overview:()=>v.jsx(w9,{}),inbox:()=>v.jsx(b9,{}),automation:()=>v.jsx(KA,{}),instructions:()=>v.jsx(M9,{}),agents:()=>v.jsx(sm,{kind:"agents"},"agents"),skills:()=>v.jsx(sm,{kind:"skills"},"skills"),commands:()=>v.jsx(sm,{kind:"commands"},"commands"),"mcp-servers":()=>v.jsx(O9,{}),hooks:()=>v.jsx(N9,{}),plugins:()=>v.jsx(B9,{}),channels:()=>v.jsx(nC,{}),"hub-prompts":()=>v.jsx(r8,{}),"claude-settings":()=>v.jsx(tL,{}),"mcp-suggestions":()=>v.jsx(S9,{}),presets:()=>v.jsx(T9,{}),categories:()=>v.jsx(i6,{})};function U9(){const{boot:e,view:i,toast:r,health:s,windowed:l,projectId:p}=we(),[f,a]=P.useState(null),h=M2("clauder-hub:sidebar-width",280,{min:220,max:480}),d=D2("(min-width: 768px)"),[m,c]=P.useState(!1),[_,y]=P.useState(()=>{try{return localStorage.getItem(rS)==="1"}catch{return!1}});P.useEffect(()=>{try{localStorage.setItem(rS,_?"1":"0")}catch{}},[_]),P.useEffect(()=>c(!1),[i,d]);const E=we(w=>w.sessions.some(x=>x.live)),S=Bn(w=>w.tabs.length>0),g=E||S;if(P.useEffect(()=>{if(!g)return;const w=x=>{x.preventDefault(),x.returnValue=""};return window.addEventListener("beforeunload",w),()=>window.removeEventListener("beforeunload",w)},[g]),P.useEffect(()=>{if(l)return;const w=x=>{!x.ctrlKey||x.altKey||x.metaKey||x.code!=="Backquote"||(x.preventDefault(),x.stopPropagation(),y(!1),d||c(!0),window.setTimeout(()=>window.dispatchEvent(new Event(Ym)),30))};return window.addEventListener("keydown",w,!0),()=>window.removeEventListener("keydown",w,!0)},[l,d]),P.useEffect(()=>{if(!m)return;const w=x=>x.key==="Escape"&&c(!1);return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[m]),P.useEffect(()=>{e().catch(w=>a(w.message))},[e]),P.useEffect(()=>{s&&(document.title=s.project)},[s]),!s)return v.jsx("div",{className:"grid h-screen place-items-center text-xs text-muted-foreground",children:"Opening the project..."});if(p===ls)return v.jsxs(yy,{children:[v.jsx(y9,{}),(f||r)&&v.jsx(sS,{text:f??(r==null?void 0:r.text),failed:!!f||(r==null?void 0:r.tone)==="error"})]});const b=i.kind==="session"?v.jsx(r5,{id:i.id},i.id):i.kind==="file"?v.jsx(t8,{path:i.path},i.path):F9[i.page]();return v.jsx(yy,{children:v.jsxs("div",{className:"flex h-screen overflow-hidden",children:[!l&&d&&v.jsx($b,{width:h.width,collapsed:_,onToggle:()=>y(!_)}),!l&&d&&!_&&v.jsx(O2,{onDrag:h.resizeBy,onReset:h.reset}),!l&&!d&&v.jsxs(v.Fragment,{children:[m&&v.jsx("div",{className:"fixed inset-0 z-40 bg-foreground/40 animate-in fade-in-0",onClick:()=>c(!1)}),v.jsx("div",{inert:!m,className:ye("fixed inset-y-0 left-0 z-40 flex border-r bg-background transition-transform duration-200",m?"translate-x-0 shadow-xl":"-translate-x-full"),children:v.jsx($b,{width:"min(280px, 85vw)",collapsed:!1,onToggle:()=>c(!1),drawer:!0})})]}),v.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[!l&&!d&&v.jsx(Q8,{onMenu:()=>c(!0)}),v.jsx(s5,{}),!l&&v.jsx(H9,{}),!l&&v.jsx(I9,{active:i.kind==="file"?i.path:null}),v.jsx("div",{className:"min-h-0 flex-1",children:b})]}),(f||r)&&v.jsx(sS,{text:f??(r==null?void 0:r.text),failed:!!f||(r==null?void 0:r.tone)==="error"})]},p)})}p3.createRoot(document.getElementById("root")).render(v.jsx(wl.StrictMode,{children:v.jsx(U9,{})}));export{wl as W,oL as _,Xt as f,Km as g,v as j,P as r,we as u};
|