vibe-coding-master 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/gateway/gateway-service.js +3 -3
- package/dist/backend/services/app-settings-service.js +9 -3
- package/dist/backend/services/translation-service.js +21 -5
- package/dist/shared/types/app-settings.js +10 -2
- package/dist-frontend/assets/index-C1FPjOXU.css +32 -0
- package/dist-frontend/assets/index-DFjuPlsk.js +92 -0
- package/dist-frontend/index.html +2 -2
- package/package.json +1 -1
- package/dist-frontend/assets/index-BraXqj3h.js +0 -92
- package/dist-frontend/assets/index-C83pgMtr.css +0 -32
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var I0=Object.defineProperty;var U0=(n,r,s)=>r in n?I0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Yp=(n,r,s)=>U0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))o(p);new MutationObserver(p=>{for(const _ of p)if(_.type==="childList")for(const f of _.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(p){const _={};return p.integrity&&(_.integrity=p.integrity),p.referrerPolicy&&(_.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?_.credentials="include":p.crossOrigin==="anonymous"?_.credentials="omit":_.credentials="same-origin",_}function o(p){if(p.ep)return;p.ep=!0;const _=s(p);fetch(p.href,_)}})();function sg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wc={exports:{}},$s={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Wp;function P0(){if(Wp)return $s;Wp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,p,_){var f=null;if(_!==void 0&&(f=""+_),p.key!==void 0&&(f=""+p.key),"key"in p){_={};for(var a in p)a!=="key"&&(_[a]=p[a])}else _=p;return p=_.ref,{$$typeof:n,type:o,key:f,ref:p!==void 0?p:null,props:_}}return $s.Fragment=r,$s.jsx=s,$s.jsxs=s,$s}var Kp;function F0(){return Kp||(Kp=1,Wc.exports=P0()),Wc.exports}var B=F0(),Kc={exports:{}},Be={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Xp;function q0(){if(Xp)return Be;Xp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),f=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),b=Symbol.iterator;function w(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function v(z,V,j){this.props=z,this.context=V,this.refs=S,this.updater=j||k}v.prototype.isReactComponent={},v.prototype.setState=function(z,V){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,V,"setState")},v.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function g(){}g.prototype=v.prototype;function y(z,V,j){this.props=z,this.context=V,this.refs=S,this.updater=j||k}var A=y.prototype=new g;A.constructor=y,x(A,v.prototype),A.isPureReactComponent=!0;var M=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function R(z,V,j){var ee=j.ref;return{$$typeof:n,type:z,key:V,ref:ee!==void 0?ee:null,props:j}}function N(z,V){return R(z.type,V,z.props)}function I(z){return typeof z=="object"&&z!==null&&z.$$typeof===n}function P(z){var V={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(j){return V[j]})}var F=/\/+/g;function Y(z,V){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):V.toString(36)}function K(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(D,D):(z.status="pending",z.then(function(V){z.status==="pending"&&(z.status="fulfilled",z.value=V)},function(V){z.status==="pending"&&(z.status="rejected",z.reason=V)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function G(z,V,j,ee,he){var ge=typeof z;(ge==="undefined"||ge==="boolean")&&(z=null);var W=!1;if(z===null)W=!0;else switch(ge){case"bigint":case"string":case"number":W=!0;break;case"object":switch(z.$$typeof){case n:case r:W=!0;break;case d:return W=z._init,G(W(z._payload),V,j,ee,he)}}if(W)return he=he(z),W=ee===""?"."+Y(z,0):ee,M(he)?(j="",W!=null&&(j=W.replace(F,"$&/")+"/"),G(he,V,j,"",function(J){return J})):he!=null&&(I(he)&&(he=N(he,j+(he.key==null||z&&z.key===he.key?"":(""+he.key).replace(F,"$&/")+"/")+W)),V.push(he)),1;W=0;var q=ee===""?".":ee+":";if(M(z))for(var ce=0;ce<z.length;ce++)ee=z[ce],ge=q+Y(ee,ce),W+=G(ee,V,j,ge,he);else if(ce=w(z),typeof ce=="function")for(z=ce.call(z),ce=0;!(ee=z.next()).done;)ee=ee.value,ge=q+Y(ee,ce++),W+=G(ee,V,j,ge,he);else if(ge==="object"){if(typeof z.then=="function")return G(K(z),V,j,ee,he);throw V=String(z),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return W}function $(z,V,j){if(z==null)return z;var ee=[],he=0;return G(z,ee,"","",function(ge){return V.call(j,ge,he++)}),ee}function Q(z){if(z._status===-1){var V=z._result;V=V(),V.then(function(j){(z._status===0||z._status===-1)&&(z._status=1,z._result=j)},function(j){(z._status===0||z._status===-1)&&(z._status=2,z._result=j)}),z._status===-1&&(z._status=0,z._result=V)}if(z._status===1)return z._result.default;throw z._result}var H=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},O={map:$,forEach:function(z,V,j){$(z,function(){V.apply(this,arguments)},j)},count:function(z){var V=0;return $(z,function(){V++}),V},toArray:function(z){return $(z,function(V){return V})||[]},only:function(z){if(!I(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Be.Activity=u,Be.Children=O,Be.Component=v,Be.Fragment=s,Be.Profiler=p,Be.PureComponent=y,Be.StrictMode=o,Be.Suspense=c,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Be.__COMPILER_RUNTIME={__proto__:null,c:function(z){return T.H.useMemoCache(z)}},Be.cache=function(z){return function(){return z.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(z,V,j){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ee=x({},z.props),he=z.key;if(V!=null)for(ge in V.key!==void 0&&(he=""+V.key),V)!E.call(V,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&V.ref===void 0||(ee[ge]=V[ge]);var ge=arguments.length-2;if(ge===1)ee.children=j;else if(1<ge){for(var W=Array(ge),q=0;q<ge;q++)W[q]=arguments[q+2];ee.children=W}return R(z.type,he,ee)},Be.createContext=function(z){return z={$$typeof:f,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:_,_context:z},z},Be.createElement=function(z,V,j){var ee,he={},ge=null;if(V!=null)for(ee in V.key!==void 0&&(ge=""+V.key),V)E.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(he[ee]=V[ee]);var W=arguments.length-2;if(W===1)he.children=j;else if(1<W){for(var q=Array(W),ce=0;ce<W;ce++)q[ce]=arguments[ce+2];he.children=q}if(z&&z.defaultProps)for(ee in W=z.defaultProps,W)he[ee]===void 0&&(he[ee]=W[ee]);return R(z,ge,he)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(z){return{$$typeof:a,render:z}},Be.isValidElement=I,Be.lazy=function(z){return{$$typeof:d,_payload:{_status:-1,_result:z},_init:Q}},Be.memo=function(z,V){return{$$typeof:h,type:z,compare:V===void 0?null:V}},Be.startTransition=function(z){var V=T.T,j={};T.T=j;try{var ee=z(),he=T.S;he!==null&&he(j,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(D,H)}catch(ge){H(ge)}finally{V!==null&&j.types!==null&&(V.types=j.types),T.T=V}},Be.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Be.use=function(z){return T.H.use(z)},Be.useActionState=function(z,V,j){return T.H.useActionState(z,V,j)},Be.useCallback=function(z,V){return T.H.useCallback(z,V)},Be.useContext=function(z){return T.H.useContext(z)},Be.useDebugValue=function(){},Be.useDeferredValue=function(z,V){return T.H.useDeferredValue(z,V)},Be.useEffect=function(z,V){return T.H.useEffect(z,V)},Be.useEffectEvent=function(z){return T.H.useEffectEvent(z)},Be.useId=function(){return T.H.useId()},Be.useImperativeHandle=function(z,V,j){return T.H.useImperativeHandle(z,V,j)},Be.useInsertionEffect=function(z,V){return T.H.useInsertionEffect(z,V)},Be.useLayoutEffect=function(z,V){return T.H.useLayoutEffect(z,V)},Be.useMemo=function(z,V){return T.H.useMemo(z,V)},Be.useOptimistic=function(z,V){return T.H.useOptimistic(z,V)},Be.useReducer=function(z,V,j){return T.H.useReducer(z,V,j)},Be.useRef=function(z){return T.H.useRef(z)},Be.useState=function(z){return T.H.useState(z)},Be.useSyncExternalStore=function(z,V,j){return T.H.useSyncExternalStore(z,V,j)},Be.useTransition=function(){return T.H.useTransition()},Be.version="19.2.6",Be}var Qp;function Ou(){return Qp||(Qp=1,Kc.exports=q0()),Kc.exports}var ue=Ou(),Xc={exports:{}},Ys={},Qc={exports:{}},Zc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Zp;function V0(){return Zp||(Zp=1,(function(n){function r(G,$){var Q=G.length;G.push($);e:for(;0<Q;){var H=Q-1>>>1,O=G[H];if(0<p(O,$))G[H]=$,G[Q]=O,Q=H;else break e}}function s(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var $=G[0],Q=G.pop();if(Q!==$){G[0]=Q;e:for(var H=0,O=G.length,z=O>>>1;H<z;){var V=2*(H+1)-1,j=G[V],ee=V+1,he=G[ee];if(0>p(j,Q))ee<O&&0>p(he,j)?(G[H]=he,G[ee]=Q,H=ee):(G[H]=j,G[V]=Q,H=V);else if(ee<O&&0>p(he,Q))G[H]=he,G[ee]=Q,H=ee;else break e}}return $}function p(G,$){var Q=G.sortIndex-$.sortIndex;return Q!==0?Q:G.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var _=performance;n.unstable_now=function(){return _.now()}}else{var f=Date,a=f.now();n.unstable_now=function(){return f.now()-a}}var c=[],h=[],d=1,u=null,b=3,w=!1,k=!1,x=!1,S=!1,v=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function A(G){for(var $=s(h);$!==null;){if($.callback===null)o(h);else if($.startTime<=G)o(h),$.sortIndex=$.expirationTime,r(c,$);else break;$=s(h)}}function M(G){if(x=!1,A(G),!k)if(s(c)!==null)k=!0,D||(D=!0,P());else{var $=s(h);$!==null&&K(M,$.startTime-G)}}var D=!1,T=-1,E=5,R=-1;function N(){return S?!0:!(n.unstable_now()-R<E)}function I(){if(S=!1,D){var G=n.unstable_now();R=G;var $=!0;try{e:{k=!1,x&&(x=!1,g(T),T=-1),w=!0;var Q=b;try{t:{for(A(G),u=s(c);u!==null&&!(u.expirationTime>G&&N());){var H=u.callback;if(typeof H=="function"){u.callback=null,b=u.priorityLevel;var O=H(u.expirationTime<=G);if(G=n.unstable_now(),typeof O=="function"){u.callback=O,A(G),$=!0;break t}u===s(c)&&o(c),A(G)}else o(c);u=s(c)}if(u!==null)$=!0;else{var z=s(h);z!==null&&K(M,z.startTime-G),$=!1}}break e}finally{u=null,b=Q,w=!1}$=void 0}}finally{$?P():D=!1}}}var P;if(typeof y=="function")P=function(){y(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Y=F.port2;F.port1.onmessage=I,P=function(){Y.postMessage(null)}}else P=function(){v(I,0)};function K(G,$){T=v(function(){G(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(G){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var Q=b;b=$;try{return G()}finally{b=Q}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(G,$){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Q=b;b=G;try{return $()}finally{b=Q}},n.unstable_scheduleCallback=function(G,$,Q){var H=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?H+Q:H):Q=H,G){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=Q+O,G={id:d++,callback:$,priorityLevel:G,startTime:Q,expirationTime:O,sortIndex:-1},Q>H?(G.sortIndex=Q,r(h,G),s(c)===null&&G===s(h)&&(x?(g(T),T=-1):x=!0,K(M,Q-H))):(G.sortIndex=O,r(c,G),k||w||(k=!0,D||(D=!0,P()))),G},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(G){var $=b;return function(){var Q=b;b=$;try{return G.apply(this,arguments)}finally{b=Q}}}})(Zc)),Zc}var Jp;function G0(){return Jp||(Jp=1,Qc.exports=V0()),Qc.exports}var Jc={exports:{}},jt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var em;function $0(){if(em)return jt;em=1;var n=Ou();function r(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},p=Symbol.for("react.portal");function _(c,h,d){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:u==null?null:""+u,children:c,containerInfo:h,implementation:d}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,jt.createPortal=function(c,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return _(c,h,null,d)},jt.flushSync=function(c){var h=f.T,d=o.p;try{if(f.T=null,o.p=2,c)return c()}finally{f.T=h,o.p=d,o.d.f()}},jt.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(c,h))},jt.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},jt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var d=h.as,u=a(d,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?o.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:b,fetchPriority:w}):d==="script"&&o.d.X(c,{crossOrigin:u,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},jt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=a(h.as,h.crossOrigin);o.d.M(c,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(c)},jt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,u=a(d,h.crossOrigin);o.d.L(c,d,{crossOrigin:u,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},jt.preloadModule=function(c,h){if(typeof c=="string")if(h){var d=a(h.as,h.crossOrigin);o.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(c)},jt.requestFormReset=function(c){o.d.r(c)},jt.unstable_batchedUpdates=function(c,h){return c(h)},jt.useFormState=function(c,h,d){return f.H.useFormState(c,h,d)},jt.useFormStatus=function(){return f.H.useHostTransitionStatus()},jt.version="19.2.6",jt}var tm;function Y0(){if(tm)return Jc.exports;tm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Jc.exports=$0(),Jc.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var nm;function W0(){if(nm)return Ys;nm=1;var n=G0(),r=Ou(),s=Y0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function a(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(_(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=_(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var m=i.return;if(m===null)break;var C=m.alternate;if(C===null){if(l=m.return,l!==null){i=l;continue}break}if(m.child===C.child){for(C=m.child;C;){if(C===i)return c(m),e;if(C===l)return c(m),t;C=C.sibling}throw Error(o(188))}if(i.return!==l.return)i=m,l=C;else{for(var L=!1,U=m.child;U;){if(U===i){L=!0,i=m,l=C;break}if(U===l){L=!0,l=m,i=C;break}U=U.sibling}if(!L){for(U=C.child;U;){if(U===i){L=!0,i=C,l=m;break}if(U===l){L=!0,l=C,i=m;break}U=U.sibling}if(!L)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),y=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case v:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case y:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case E:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var K=Array.isArray,G=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},H=[],O=-1;function z(e){return{current:e}}function V(e){0>O||(e.current=H[O],H[O]=null,O--)}function j(e,t){O++,H[O]=e.current,e.current=t}var ee=z(null),he=z(null),ge=z(null),W=z(null);function q(e,t){switch(j(ge,t),j(he,e),j(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gp(t),e=_p(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ee),j(ee,e)}function ce(){V(ee),V(he),V(ge)}function J(e){e.memoizedState!==null&&j(W,e);var t=ee.current,i=_p(t,e.type);t!==i&&(j(he,e),j(ee,i))}function ie(e){he.current===e&&(V(ee),V(he)),W.current===e&&(V(W),Fs._currentValue=Q)}var pe,be;function Ce(e){if(pe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||"",be=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+pe+e+be}var Ye=!1;function ot(e,t){if(!e||Ye)return"";Ye=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(oe){var le=oe}Reflect.construct(e,[],_e)}else{try{_e.call()}catch(oe){le=oe}e.call(_e.prototype)}}else{try{throw Error()}catch(oe){le=oe}(_e=e())&&typeof _e.catch=="function"&&_e.catch(function(){})}}catch(oe){if(oe&&le&&typeof oe.stack=="string")return[oe.stack,le.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=l.DetermineComponentFrameRoot(),L=C[0],U=C[1];if(L&&U){var X=L.split(`
|
|
44
|
+
`),se=U.split(`
|
|
45
|
+
`);for(m=l=0;l<X.length&&!X[l].includes("DetermineComponentFrameRoot");)l++;for(;m<se.length&&!se[m].includes("DetermineComponentFrameRoot");)m++;if(l===X.length||m===se.length)for(l=X.length-1,m=se.length-1;1<=l&&0<=m&&X[l]!==se[m];)m--;for(;1<=l&&0<=m;l--,m--)if(X[l]!==se[m]){if(l!==1||m!==1)do if(l--,m--,0>m||X[l]!==se[m]){var de=`
|
|
46
|
+
`+X[l].replace(" at new "," at ");return e.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",e.displayName)),de}while(1<=l&&0<=m);break}}}finally{Ye=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ce(i):""}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return e.child!==t&&t!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return ot(e.type,!1);case 11:return ot(e.type.render,!1);case 1:return ot(e.type,!0);case 31:return Ce("Activity");default:return""}}function Dt(e){try{var t="",i=null;do t+=Me(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var kt=Object.prototype.hasOwnProperty,Ut=n.unstable_scheduleCallback,qt=n.unstable_cancelCallback,Zt=n.unstable_shouldYield,mt=n.unstable_requestPaint,Ge=n.unstable_now,ut=n.unstable_getCurrentPriorityLevel,fe=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,xe=n.unstable_NormalPriority,ae=n.unstable_LowPriority,De=n.unstable_IdlePriority,Te=n.log,He=n.unstable_setDisableYieldValue,Qe=null,Ze=null;function Rt(e){if(typeof Te=="function"&&He(e),Ze&&typeof Ze.setStrictMode=="function")try{Ze.setStrictMode(Qe,e)}catch{}}var Je=Math.clz32?Math.clz32:Ji,un=Math.log,Jt=Math.LN2;function Ji(e){return e>>>=0,e===0?32:31-(un(e)/Jt|0)|0}var er=256,tr=262144,nr=4194304;function Bn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ir(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var m=0,C=e.suspendedLanes,L=e.pingedLanes;e=e.warmLanes;var U=l&134217727;return U!==0?(l=U&~C,l!==0?m=Bn(l):(L&=U,L!==0?m=Bn(L):i||(i=U&~e,i!==0&&(m=Bn(i))))):(U=l&~C,U!==0?m=Bn(U):L!==0?m=Bn(L):i||(i=l&~e,i!==0&&(m=Bn(i)))),m===0?0:t!==0&&t!==m&&(t&C)===0&&(C=m&-m,i=t&-t,C>=i||C===32&&(i&4194048)!==0)?t:m}function Cn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ri(){var e=nr;return nr<<=1,(nr&62914560)===0&&(nr=4194304),e}function Mi(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function es(e,t,i,l,m,C){var L=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var U=e.entanglements,X=e.expirationTimes,se=e.hiddenUpdates;for(i=L&~i;0<i;){var de=31-Je(i),_e=1<<de;U[de]=0,X[de]=-1;var le=se[de];if(le!==null)for(se[de]=null,de=0;de<le.length;de++){var oe=le[de];oe!==null&&(oe.lane&=-536870913)}i&=~_e}l!==0&&sr(e,l,0),C!==0&&m===0&&e.tag!==0&&(e.suspendedLanes|=C&~(L&~t))}function sr(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Je(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function nt(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Je(i),m=1<<l;m&t|e[l]&t&&(e[l]|=t),i&=~m}}function ol(e,t){var i=t&-t;return i=(i&42)!==0?1:ts(i),(i&(e.suspendedLanes|t))!==0?0:i}function ts(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ns(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function cl(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Up(e.type))}function lr(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var wn=Math.random().toString(36).slice(2),ne="__reactFiber$"+wn,Se="__reactProps$"+wn,ht="__reactContainer$"+wn,Nt="__reactEvents$"+wn,T_="__reactListeners$"+wn,D_="__reactHandles$"+wn,nh="__reactResources$"+wn,is="__reactMarker$"+wn;function Ia(e){delete e[ne],delete e[Se],delete e[Nt],delete e[T_],delete e[D_]}function ar(e){var t=e[ne];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ht]||i[ne]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=xp(e);e!==null;){if(i=e[ne])return i;e=xp(e)}return t}e=i,i=e.parentNode}return null}function or(e){if(e=e[ne]||e[ht]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function cr(e){var t=e[nh];return t||(t=e[nh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function At(e){e[is]=!0}var ih=new Set,rh={};function Oi(e,t){ur(e,t),ur(e+"Capture",t)}function ur(e,t){for(rh[e]=t,e=0;e<t.length;e++)ih.add(t[e])}var R_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),sh={},lh={};function M_(e){return kt.call(lh,e)?!0:kt.call(sh,e)?!1:R_.test(e)?lh[e]=!0:(sh[e]=!0,!1)}function ul(e,t,i){if(M_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function hl(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Nn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ah(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function L_(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var m=l.get,C=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return m.call(this)},set:function(L){i=""+L,C.call(this,L)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(L){i=""+L},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ua(e){if(!e._valueTracker){var t=ah(e)?"checked":"value";e._valueTracker=L_(e,t,""+e[t])}}function oh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=ah(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function fl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var O_=/[\n"\\]/g;function fn(e){return e.replace(O_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Pa(e,t,i,l,m,C,L,U){e.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?e.type=L:e.removeAttribute("type"),t!=null?L==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):L!=="submit"&&L!=="reset"||e.removeAttribute("value"),t!=null?Fa(e,L,hn(t)):i!=null?Fa(e,L,hn(i)):l!=null&&e.removeAttribute("value"),m==null&&C!=null&&(e.defaultChecked=!!C),m!=null&&(e.checked=m&&typeof m!="function"&&typeof m!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+hn(U):e.removeAttribute("name")}function ch(e,t,i,l,m,C,L,U){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.type=C),t!=null||i!=null){if(!(C!=="submit"&&C!=="reset"||t!=null)){Ua(e);return}i=i!=null?""+hn(i):"",t=t!=null?""+hn(t):i,U||t===e.value||(e.value=t),e.defaultValue=t}l=l??m,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=U?e.checked:!!l,e.defaultChecked=!!l,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(e.name=L),Ua(e)}function Fa(e,t,i){t==="number"&&fl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function hr(e,t,i,l){if(e=e.options,t){t={};for(var m=0;m<i.length;m++)t["$"+i[m]]=!0;for(i=0;i<e.length;i++)m=t.hasOwnProperty("$"+e[i].value),e[i].selected!==m&&(e[i].selected=m),m&&l&&(e[i].defaultSelected=!0)}else{for(i=""+hn(i),t=null,m=0;m<e.length;m++){if(e[m].value===i){e[m].selected=!0,l&&(e[m].defaultSelected=!0);return}t!==null||e[m].disabled||(t=e[m])}t!==null&&(t.selected=!0)}}function uh(e,t,i){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+hn(i):""}function hh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(K(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=hn(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),Ua(e)}function fr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var B_=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 fh(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||B_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function dh(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var m in t)l=t[m],t.hasOwnProperty(m)&&i[m]!==l&&fh(e,m,l)}else for(var C in t)t.hasOwnProperty(C)&&fh(e,C,t[C])}function qa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var N_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),j_=/^[\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 dl(e){return j_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function jn(){}var Va=null;function Ga(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dr=null,pr=null;function ph(e){var t=or(e);if(t&&(e=t.stateNode)){var i=e[Se]||null;e:switch(e=t.stateNode,t.type){case"input":if(Pa(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+fn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var m=l[Se]||null;if(!m)throw Error(o(90));Pa(l,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&oh(l)}break e;case"textarea":uh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&hr(e,!!i.multiple,t,!1)}}}var $a=!1;function mh(e,t,i){if($a)return e(t,i);$a=!0;try{var l=e(t);return l}finally{if($a=!1,(dr!==null||pr!==null)&&(ea(),dr&&(t=dr,e=pr,pr=dr=null,ph(t),e)))for(t=0;t<e.length;t++)ph(e[t])}}function ss(e,t){var i=e.stateNode;if(i===null)return null;var l=i[Se]||null;if(l===null)return null;i=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ya=!1;if(zn)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Ya=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Ya=!1}var ti=null,Wa=null,pl=null;function gh(){if(pl)return pl;var e,t=Wa,i=t.length,l,m="value"in ti?ti.value:ti.textContent,C=m.length;for(e=0;e<i&&t[e]===m[e];e++);var L=i-e;for(l=1;l<=L&&t[i-l]===m[C-l];l++);return pl=m.slice(e,1<l?1-l:void 0)}function ml(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gl(){return!0}function _h(){return!1}function Vt(e){function t(i,l,m,C,L){this._reactName=i,this._targetInst=m,this.type=l,this.nativeEvent=C,this.target=L,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(i=e[U],this[U]=i?i(C):C[U]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?gl:_h,this.isPropagationStopped=_h,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=gl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=gl)},persist:function(){},isPersistent:gl}),t}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_l=Vt(Bi),as=u({},Bi,{view:0,detail:0}),z_=Vt(as),Ka,Xa,os,vl=u({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Za,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==os&&(os&&e.type==="mousemove"?(Ka=e.screenX-os.screenX,Xa=e.screenY-os.screenY):Xa=Ka=0,os=e),Ka)},movementY:function(e){return"movementY"in e?e.movementY:Xa}}),vh=Vt(vl),H_=u({},vl,{dataTransfer:0}),I_=Vt(H_),U_=u({},as,{relatedTarget:0}),Qa=Vt(U_),P_=u({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),F_=Vt(P_),q_=u({},Bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),V_=Vt(q_),G_=u({},Bi,{data:0}),yh=Vt(G_),$_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y_={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"},W_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function K_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W_[e])?!!t[e]:!1}function Za(){return K_}var X_=u({},as,{key:function(e){if(e.key){var t=$_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ml(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Za,charCode:function(e){return e.type==="keypress"?ml(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ml(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Q_=Vt(X_),Z_=u({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sh=Vt(Z_),J_=u({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Za}),ev=Vt(J_),tv=u({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),nv=Vt(tv),iv=u({},vl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),rv=Vt(iv),sv=u({},Bi,{newState:0,oldState:0}),lv=Vt(sv),av=[9,13,27,32],Ja=zn&&"CompositionEvent"in window,cs=null;zn&&"documentMode"in document&&(cs=document.documentMode);var ov=zn&&"TextEvent"in window&&!cs,bh=zn&&(!Ja||cs&&8<cs&&11>=cs),Ch=" ",wh=!1;function xh(e,t){switch(e){case"keyup":return av.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mr=!1;function cv(e,t){switch(e){case"compositionend":return Eh(t);case"keypress":return t.which!==32?null:(wh=!0,Ch);case"textInput":return e=t.data,e===Ch&&wh?null:e;default:return null}}function uv(e,t){if(mr)return e==="compositionend"||!Ja&&xh(e,t)?(e=gh(),pl=Wa=ti=null,mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bh&&t.locale!=="ko"?null:t.data;default:return null}}var hv={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 kh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hv[e.type]:t==="textarea"}function Ah(e,t,i,l){dr?pr?pr.push(l):pr=[l]:dr=l,t=aa(t,"onChange"),0<t.length&&(i=new _l("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var us=null,hs=null;function fv(e){up(e,0)}function yl(e){var t=rs(e);if(oh(t))return e}function Th(e,t){if(e==="change")return t}var Dh=!1;if(zn){var eo;if(zn){var to="oninput"in document;if(!to){var Rh=document.createElement("div");Rh.setAttribute("oninput","return;"),to=typeof Rh.oninput=="function"}eo=to}else eo=!1;Dh=eo&&(!document.documentMode||9<document.documentMode)}function Mh(){us&&(us.detachEvent("onpropertychange",Lh),hs=us=null)}function Lh(e){if(e.propertyName==="value"&&yl(hs)){var t=[];Ah(t,hs,e,Ga(e)),mh(fv,t)}}function dv(e,t,i){e==="focusin"?(Mh(),us=t,hs=i,us.attachEvent("onpropertychange",Lh)):e==="focusout"&&Mh()}function pv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yl(hs)}function mv(e,t){if(e==="click")return yl(t)}function gv(e,t){if(e==="input"||e==="change")return yl(t)}function _v(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:_v;function fs(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var m=i[l];if(!kt.call(t,m)||!en(e[m],t[m]))return!1}return!0}function Oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bh(e,t){var i=Oh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Oh(i)}}function Nh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=fl(e.document)}return t}function no(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var vv=zn&&"documentMode"in document&&11>=document.documentMode,gr=null,io=null,ds=null,ro=!1;function zh(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ro||gr==null||gr!==fl(l)||(l=gr,"selectionStart"in l&&no(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ds&&fs(ds,l)||(ds=l,l=aa(io,"onSelect"),0<l.length&&(t=new _l("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=gr)))}function Ni(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var _r={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},so={},Hh={};zn&&(Hh=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function ji(e){if(so[e])return so[e];if(!_r[e])return e;var t=_r[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Hh)return so[e]=t[i];return e}var Ih=ji("animationend"),Uh=ji("animationiteration"),Ph=ji("animationstart"),yv=ji("transitionrun"),Sv=ji("transitionstart"),bv=ji("transitioncancel"),Fh=ji("transitionend"),qh=new Map,lo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");lo.push("scrollEnd");function xn(e,t){qh.set(e,t),Oi(t,[e])}var Sl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},dn=[],vr=0,ao=0;function bl(){for(var e=vr,t=ao=vr=0;t<e;){var i=dn[t];dn[t++]=null;var l=dn[t];dn[t++]=null;var m=dn[t];dn[t++]=null;var C=dn[t];if(dn[t++]=null,l!==null&&m!==null){var L=l.pending;L===null?m.next=m:(m.next=L.next,L.next=m),l.pending=m}C!==0&&Vh(i,m,C)}}function Cl(e,t,i,l){dn[vr++]=e,dn[vr++]=t,dn[vr++]=i,dn[vr++]=l,ao|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function oo(e,t,i,l){return Cl(e,t,i,l),wl(e)}function zi(e,t){return Cl(e,null,null,t),wl(e)}function Vh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var m=!1,C=e.return;C!==null;)C.childLanes|=i,l=C.alternate,l!==null&&(l.childLanes|=i),C.tag===22&&(e=C.stateNode,e===null||e._visibility&1||(m=!0)),e=C,C=C.return;return e.tag===3?(C=e.stateNode,m&&t!==null&&(m=31-Je(i),e=C.hiddenUpdates,l=e[m],l===null?e[m]=[t]:l.push(t),t.lane=i|536870912),C):null}function wl(e){if(50<Ns)throw Ns=0,vc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yr={};function Cv(e,t,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,i,l){return new Cv(e,t,i,l)}function co(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hn(e,t){var i=e.alternate;return i===null?(i=tn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Gh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xl(e,t,i,l,m,C){var L=0;if(l=e,typeof e=="function")co(e)&&(L=1);else if(typeof e=="string")L=A0(e,i,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=tn(31,i,t,m),e.elementType=R,e.lanes=C,e;case x:return Hi(i.children,m,C,t);case S:L=8,m|=24;break;case v:return e=tn(12,i,t,m|2),e.elementType=v,e.lanes=C,e;case M:return e=tn(13,i,t,m),e.elementType=M,e.lanes=C,e;case D:return e=tn(19,i,t,m),e.elementType=D,e.lanes=C,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y:L=10;break e;case g:L=9;break e;case A:L=11;break e;case T:L=14;break e;case E:L=16,l=null;break e}L=29,i=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=tn(L,i,t,m),t.elementType=e,t.type=l,t.lanes=C,t}function Hi(e,t,i,l){return e=tn(7,e,l,t),e.lanes=i,e}function uo(e,t,i){return e=tn(6,e,null,t),e.lanes=i,e}function $h(e){var t=tn(18,null,null,0);return t.stateNode=e,t}function ho(e,t,i){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yh=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var i=Yh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Dt(t)},Yh.set(e,t),t)}return{value:e,source:t,stack:Dt(t)}}var Sr=[],br=0,El=null,ps=0,mn=[],gn=0,ni=null,Tn=1,Dn="";function In(e,t){Sr[br++]=ps,Sr[br++]=El,El=e,ps=t}function Wh(e,t,i){mn[gn++]=Tn,mn[gn++]=Dn,mn[gn++]=ni,ni=e;var l=Tn;e=Dn;var m=32-Je(l)-1;l&=~(1<<m),i+=1;var C=32-Je(t)+m;if(30<C){var L=m-m%5;C=(l&(1<<L)-1).toString(32),l>>=L,m-=L,Tn=1<<32-Je(t)+m|i<<m|l,Dn=C+e}else Tn=1<<C|i<<m|l,Dn=e}function fo(e){e.return!==null&&(In(e,1),Wh(e,1,0))}function po(e){for(;e===El;)El=Sr[--br],Sr[br]=null,ps=Sr[--br],Sr[br]=null;for(;e===ni;)ni=mn[--gn],mn[gn]=null,Dn=mn[--gn],mn[gn]=null,Tn=mn[--gn],mn[gn]=null}function Kh(e,t){mn[gn++]=Tn,mn[gn++]=Dn,mn[gn++]=ni,Tn=t.id,Dn=t.overflow,ni=e}var Mt=null,ft=null,Ve=!1,ii=null,_n=!1,mo=Error(o(519));function ri(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ms(pn(t,e)),mo}function Xh(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[ne]=e,t[Se]=l,i){case"dialog":Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":case"embed":Ue("load",t);break;case"video":case"audio":for(i=0;i<zs.length;i++)Ue(zs[i],t);break;case"source":Ue("error",t);break;case"img":case"image":case"link":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"input":Ue("invalid",t),ch(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ue("invalid",t);break;case"textarea":Ue("invalid",t),hh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||pp(t.textContent,i)?(l.popover!=null&&(Ue("beforetoggle",t),Ue("toggle",t)),l.onScroll!=null&&Ue("scroll",t),l.onScrollEnd!=null&&Ue("scrollend",t),l.onClick!=null&&(t.onclick=jn),t=!0):t=!1,t||ri(e,!0)}function Qh(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Mt=Mt.return}}function Cr(e){if(e!==Mt)return!1;if(!Ve)return Qh(e),Ve=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Oc(e.type,e.memoizedProps)),i=!i),i&&ft&&ri(e),Qh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ft=wp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ft=wp(e)}else t===27?(t=ft,vi(e.type)?(e=Hc,Hc=null,ft=e):ft=t):ft=Mt?yn(e.stateNode.nextSibling):null;return!0}function Ii(){ft=Mt=null,Ve=!1}function go(){var e=ii;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),ii=null),e}function ms(e){ii===null?ii=[e]:ii.push(e)}var _o=z(null),Ui=null,Un=null;function si(e,t,i){j(_o,t._currentValue),t._currentValue=i}function Pn(e){e._currentValue=_o.current,V(_o)}function vo(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function yo(e,t,i,l){var m=e.child;for(m!==null&&(m.return=e);m!==null;){var C=m.dependencies;if(C!==null){var L=m.child;C=C.firstContext;e:for(;C!==null;){var U=C;C=m;for(var X=0;X<t.length;X++)if(U.context===t[X]){C.lanes|=i,U=C.alternate,U!==null&&(U.lanes|=i),vo(C.return,i,e),l||(L=null);break e}C=U.next}}else if(m.tag===18){if(L=m.return,L===null)throw Error(o(341));L.lanes|=i,C=L.alternate,C!==null&&(C.lanes|=i),vo(L,i,e),L=null}else L=m.child;if(L!==null)L.return=m;else for(L=m;L!==null;){if(L===e){L=null;break}if(m=L.sibling,m!==null){m.return=L.return,L=m;break}L=L.return}m=L}}function wr(e,t,i,l){e=null;for(var m=t,C=!1;m!==null;){if(!C){if((m.flags&524288)!==0)C=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var L=m.alternate;if(L===null)throw Error(o(387));if(L=L.memoizedProps,L!==null){var U=m.type;en(m.pendingProps.value,L.value)||(e!==null?e.push(U):e=[U])}}else if(m===W.current){if(L=m.alternate,L===null)throw Error(o(387));L.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(e!==null?e.push(Fs):e=[Fs])}m=m.return}e!==null&&yo(t,e,i,l),t.flags|=262144}function kl(e){for(e=e.firstContext;e!==null;){if(!en(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pi(e){Ui=e,Un=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Zh(Ui,e)}function Al(e,t){return Ui===null&&Pi(e),Zh(e,t)}function Zh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Un===null){if(e===null)throw Error(o(308));Un=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Un=Un.next=t;return i}var wv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},xv=n.unstable_scheduleCallback,Ev=n.unstable_NormalPriority,St={$$typeof:y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function So(){return{controller:new wv,data:new Map,refCount:0}}function gs(e){e.refCount--,e.refCount===0&&xv(Ev,function(){e.controller.abort()})}var _s=null,bo=0,xr=0,Er=null;function kv(e,t){if(_s===null){var i=_s=[];bo=0,xr=xc(),Er={status:"pending",value:void 0,then:function(l){i.push(l)}}}return bo++,t.then(Jh,Jh),t}function Jh(){if(--bo===0&&_s!==null){Er!==null&&(Er.status="fulfilled");var e=_s;_s=null,xr=0,Er=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Av(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(m){i.push(m)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var m=0;m<i.length;m++)(0,i[m])(t)},function(m){for(l.status="rejected",l.reason=m,m=0;m<i.length;m++)(0,i[m])(void 0)}),l}var ef=G.S;G.S=function(e,t){Hd=Ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&kv(e,t),ef!==null&&ef(e,t)};var Fi=z(null);function Co(){var e=Fi.current;return e!==null?e:lt.pooledCache}function Tl(e,t){t===null?j(Fi,Fi.current):j(Fi,t.pool)}function tf(){var e=Co();return e===null?null:{parent:St._currentValue,pool:e}}var kr=Error(o(460)),wo=Error(o(474)),Dl=Error(o(542)),Rl={then:function(){}};function nf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(jn,jn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lf(e),e;default:if(typeof t.status=="string")t.then(jn,jn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var m=t;m.status="fulfilled",m.value=l}},function(l){if(t.status==="pending"){var m=t;m.status="rejected",m.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lf(e),e}throw Vi=t,kr}}function qi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Vi=i,kr):i}}var Vi=null;function sf(){if(Vi===null)throw Error(o(459));var e=Vi;return Vi=null,e}function lf(e){if(e===kr||e===Dl)throw Error(o(483))}var Ar=null,vs=0;function Ml(e){var t=vs;return vs+=1,Ar===null&&(Ar=[]),rf(Ar,e,t)}function ys(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ll(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function af(e){function t(te,Z){if(e){var re=te.deletions;re===null?(te.deletions=[Z],te.flags|=16):re.push(Z)}}function i(te,Z){if(!e)return null;for(;Z!==null;)t(te,Z),Z=Z.sibling;return null}function l(te){for(var Z=new Map;te!==null;)te.key!==null?Z.set(te.key,te):Z.set(te.index,te),te=te.sibling;return Z}function m(te,Z){return te=Hn(te,Z),te.index=0,te.sibling=null,te}function C(te,Z,re){return te.index=re,e?(re=te.alternate,re!==null?(re=re.index,re<Z?(te.flags|=67108866,Z):re):(te.flags|=67108866,Z)):(te.flags|=1048576,Z)}function L(te){return e&&te.alternate===null&&(te.flags|=67108866),te}function U(te,Z,re,me){return Z===null||Z.tag!==6?(Z=uo(re,te.mode,me),Z.return=te,Z):(Z=m(Z,re),Z.return=te,Z)}function X(te,Z,re,me){var Re=re.type;return Re===x?de(te,Z,re.props.children,me,re.key):Z!==null&&(Z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===E&&qi(Re)===Z.type)?(Z=m(Z,re.props),ys(Z,re),Z.return=te,Z):(Z=xl(re.type,re.key,re.props,null,te.mode,me),ys(Z,re),Z.return=te,Z)}function se(te,Z,re,me){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==re.containerInfo||Z.stateNode.implementation!==re.implementation?(Z=ho(re,te.mode,me),Z.return=te,Z):(Z=m(Z,re.children||[]),Z.return=te,Z)}function de(te,Z,re,me,Re){return Z===null||Z.tag!==7?(Z=Hi(re,te.mode,me,Re),Z.return=te,Z):(Z=m(Z,re),Z.return=te,Z)}function _e(te,Z,re){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=uo(""+Z,te.mode,re),Z.return=te,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return re=xl(Z.type,Z.key,Z.props,null,te.mode,re),ys(re,Z),re.return=te,re;case k:return Z=ho(Z,te.mode,re),Z.return=te,Z;case E:return Z=qi(Z),_e(te,Z,re)}if(K(Z)||P(Z))return Z=Hi(Z,te.mode,re,null),Z.return=te,Z;if(typeof Z.then=="function")return _e(te,Ml(Z),re);if(Z.$$typeof===y)return _e(te,Al(te,Z),re);Ll(te,Z)}return null}function le(te,Z,re,me){var Re=Z!==null?Z.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Re!==null?null:U(te,Z,""+re,me);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return re.key===Re?X(te,Z,re,me):null;case k:return re.key===Re?se(te,Z,re,me):null;case E:return re=qi(re),le(te,Z,re,me)}if(K(re)||P(re))return Re!==null?null:de(te,Z,re,me,null);if(typeof re.then=="function")return le(te,Z,Ml(re),me);if(re.$$typeof===y)return le(te,Z,Al(te,re),me);Ll(te,re)}return null}function oe(te,Z,re,me,Re){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return te=te.get(re)||null,U(Z,te,""+me,Re);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case w:return te=te.get(me.key===null?re:me.key)||null,X(Z,te,me,Re);case k:return te=te.get(me.key===null?re:me.key)||null,se(Z,te,me,Re);case E:return me=qi(me),oe(te,Z,re,me,Re)}if(K(me)||P(me))return te=te.get(re)||null,de(Z,te,me,Re,null);if(typeof me.then=="function")return oe(te,Z,re,Ml(me),Re);if(me.$$typeof===y)return oe(te,Z,re,Al(Z,me),Re);Ll(Z,me)}return null}function Ee(te,Z,re,me){for(var Re=null,We=null,ke=Z,je=Z=0,qe=null;ke!==null&&je<re.length;je++){ke.index>je?(qe=ke,ke=null):qe=ke.sibling;var Ke=le(te,ke,re[je],me);if(Ke===null){ke===null&&(ke=qe);break}e&&ke&&Ke.alternate===null&&t(te,ke),Z=C(Ke,Z,je),We===null?Re=Ke:We.sibling=Ke,We=Ke,ke=qe}if(je===re.length)return i(te,ke),Ve&&In(te,je),Re;if(ke===null){for(;je<re.length;je++)ke=_e(te,re[je],me),ke!==null&&(Z=C(ke,Z,je),We===null?Re=ke:We.sibling=ke,We=ke);return Ve&&In(te,je),Re}for(ke=l(ke);je<re.length;je++)qe=oe(ke,te,je,re[je],me),qe!==null&&(e&&qe.alternate!==null&&ke.delete(qe.key===null?je:qe.key),Z=C(qe,Z,je),We===null?Re=qe:We.sibling=qe,We=qe);return e&&ke.forEach(function(wi){return t(te,wi)}),Ve&&In(te,je),Re}function Oe(te,Z,re,me){if(re==null)throw Error(o(151));for(var Re=null,We=null,ke=Z,je=Z=0,qe=null,Ke=re.next();ke!==null&&!Ke.done;je++,Ke=re.next()){ke.index>je?(qe=ke,ke=null):qe=ke.sibling;var wi=le(te,ke,Ke.value,me);if(wi===null){ke===null&&(ke=qe);break}e&&ke&&wi.alternate===null&&t(te,ke),Z=C(wi,Z,je),We===null?Re=wi:We.sibling=wi,We=wi,ke=qe}if(Ke.done)return i(te,ke),Ve&&In(te,je),Re;if(ke===null){for(;!Ke.done;je++,Ke=re.next())Ke=_e(te,Ke.value,me),Ke!==null&&(Z=C(Ke,Z,je),We===null?Re=Ke:We.sibling=Ke,We=Ke);return Ve&&In(te,je),Re}for(ke=l(ke);!Ke.done;je++,Ke=re.next())Ke=oe(ke,te,je,Ke.value,me),Ke!==null&&(e&&Ke.alternate!==null&&ke.delete(Ke.key===null?je:Ke.key),Z=C(Ke,Z,je),We===null?Re=Ke:We.sibling=Ke,We=Ke);return e&&ke.forEach(function(H0){return t(te,H0)}),Ve&&In(te,je),Re}function st(te,Z,re,me){if(typeof re=="object"&&re!==null&&re.type===x&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case w:e:{for(var Re=re.key;Z!==null;){if(Z.key===Re){if(Re=re.type,Re===x){if(Z.tag===7){i(te,Z.sibling),me=m(Z,re.props.children),me.return=te,te=me;break e}}else if(Z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===E&&qi(Re)===Z.type){i(te,Z.sibling),me=m(Z,re.props),ys(me,re),me.return=te,te=me;break e}i(te,Z);break}else t(te,Z);Z=Z.sibling}re.type===x?(me=Hi(re.props.children,te.mode,me,re.key),me.return=te,te=me):(me=xl(re.type,re.key,re.props,null,te.mode,me),ys(me,re),me.return=te,te=me)}return L(te);case k:e:{for(Re=re.key;Z!==null;){if(Z.key===Re)if(Z.tag===4&&Z.stateNode.containerInfo===re.containerInfo&&Z.stateNode.implementation===re.implementation){i(te,Z.sibling),me=m(Z,re.children||[]),me.return=te,te=me;break e}else{i(te,Z);break}else t(te,Z);Z=Z.sibling}me=ho(re,te.mode,me),me.return=te,te=me}return L(te);case E:return re=qi(re),st(te,Z,re,me)}if(K(re))return Ee(te,Z,re,me);if(P(re)){if(Re=P(re),typeof Re!="function")throw Error(o(150));return re=Re.call(re),Oe(te,Z,re,me)}if(typeof re.then=="function")return st(te,Z,Ml(re),me);if(re.$$typeof===y)return st(te,Z,Al(te,re),me);Ll(te,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Z!==null&&Z.tag===6?(i(te,Z.sibling),me=m(Z,re),me.return=te,te=me):(i(te,Z),me=uo(re,te.mode,me),me.return=te,te=me),L(te)):i(te,Z)}return function(te,Z,re,me){try{vs=0;var Re=st(te,Z,re,me);return Ar=null,Re}catch(ke){if(ke===kr||ke===Dl)throw ke;var We=tn(29,ke,null,te.mode);return We.lanes=me,We.return=te,We}finally{}}}var Gi=af(!0),of=af(!1),li=!1;function xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function oi(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Xe&2)!==0){var m=l.pending;return m===null?t.next=t:(t.next=m.next,m.next=t),l.pending=t,t=wl(e),Vh(e,null,i),t}return Cl(e,l,t,i),wl(e)}function Ss(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,nt(e,i)}}function ko(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var m=null,C=null;if(i=i.firstBaseUpdate,i!==null){do{var L={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};C===null?m=C=L:C=C.next=L,i=i.next}while(i!==null);C===null?m=C=t:C=C.next=t}else m=C=t;i={baseState:l.baseState,firstBaseUpdate:m,lastBaseUpdate:C,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Ao=!1;function bs(){if(Ao){var e=Er;if(e!==null)throw e}}function Cs(e,t,i,l){Ao=!1;var m=e.updateQueue;li=!1;var C=m.firstBaseUpdate,L=m.lastBaseUpdate,U=m.shared.pending;if(U!==null){m.shared.pending=null;var X=U,se=X.next;X.next=null,L===null?C=se:L.next=se,L=X;var de=e.alternate;de!==null&&(de=de.updateQueue,U=de.lastBaseUpdate,U!==L&&(U===null?de.firstBaseUpdate=se:U.next=se,de.lastBaseUpdate=X))}if(C!==null){var _e=m.baseState;L=0,de=se=X=null,U=C;do{var le=U.lane&-536870913,oe=le!==U.lane;if(oe?(Fe&le)===le:(l&le)===le){le!==0&&le===xr&&(Ao=!0),de!==null&&(de=de.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Ee=e,Oe=U;le=t;var st=i;switch(Oe.tag){case 1:if(Ee=Oe.payload,typeof Ee=="function"){_e=Ee.call(st,_e,le);break e}_e=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Oe.payload,le=typeof Ee=="function"?Ee.call(st,_e,le):Ee,le==null)break e;_e=u({},_e,le);break e;case 2:li=!0}}le=U.callback,le!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[le]:oe.push(le))}else oe={lane:le,tag:U.tag,payload:U.payload,callback:U.callback,next:null},de===null?(se=de=oe,X=_e):de=de.next=oe,L|=le;if(U=U.next,U===null){if(U=m.shared.pending,U===null)break;oe=U,U=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);de===null&&(X=_e),m.baseState=X,m.firstBaseUpdate=se,m.lastBaseUpdate=de,C===null&&(m.shared.lanes=0),di|=L,e.lanes=L,e.memoizedState=_e}}function cf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function uf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)cf(i[e],t)}var Tr=z(null),Ol=z(0);function hf(e,t){e=Xn,j(Ol,e),j(Tr,t),Xn=e|t.baseLanes}function To(){j(Ol,Xn),j(Tr,Tr.current)}function Do(){Xn=Ol.current,V(Tr),V(Ol)}var nn=z(null),vn=null;function ci(e){var t=e.alternate;j(vt,vt.current&1),j(nn,e),vn===null&&(t===null||Tr.current!==null||t.memoizedState!==null)&&(vn=e)}function Ro(e){j(vt,vt.current),j(nn,e),vn===null&&(vn=e)}function ff(e){e.tag===22?(j(vt,vt.current),j(nn,e),vn===null&&(vn=e)):ui()}function ui(){j(vt,vt.current),j(nn,nn.current)}function rn(e){V(nn),vn===e&&(vn=null),V(vt)}var vt=z(0);function Bl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||jc(i)||zc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,Ne=null,it=null,bt=null,Nl=!1,Dr=!1,$i=!1,jl=0,ws=0,Rr=null,Tv=0;function gt(){throw Error(o(321))}function Mo(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!en(e[i],t[i]))return!1;return!0}function Lo(e,t,i,l,m,C){return Fn=C,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Kf:Yo,$i=!1,C=i(l,m),$i=!1,Dr&&(C=pf(t,i,l,m)),df(e),C}function df(e){G.H=ks;var t=it!==null&&it.next!==null;if(Fn=0,bt=it=Ne=null,Nl=!1,ws=0,Rr=null,t)throw Error(o(300));e===null||Ct||(e=e.dependencies,e!==null&&kl(e)&&(Ct=!0))}function pf(e,t,i,l){Ne=e;var m=0;do{if(Dr&&(Rr=null),ws=0,Dr=!1,25<=m)throw Error(o(301));if(m+=1,bt=it=null,e.updateQueue!=null){var C=e.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}G.H=Xf,C=t(i,l)}while(Dr);return C}function Dv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?xs(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Oo(){var e=jl!==0;return jl=0,e}function Bo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function No(e){if(Nl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nl=!1}Fn=0,bt=it=Ne=null,Dr=!1,ws=jl=0,Rr=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Ne.memoizedState=bt=e:bt=bt.next=e,bt}function yt(){if(it===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=bt===null?Ne.memoizedState:bt.next;if(t!==null)bt=t,it=e;else{if(e===null)throw Ne.alternate===null?Error(o(467)):Error(o(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},bt===null?Ne.memoizedState=bt=e:bt=bt.next=e}return bt}function zl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xs(e){var t=ws;return ws+=1,Rr===null&&(Rr=[]),e=rf(Rr,e,t),t=Ne,(bt===null?t.memoizedState:bt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Kf:Yo),e}function Hl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xs(e);if(e.$$typeof===y)return Lt(e)}throw Error(o(438,String(e)))}function jo(e){var t=null,i=Ne.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=Ne.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(m){return m.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=zl(),Ne.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=N;return t.index++,i}function qn(e,t){return typeof t=="function"?t(e):t}function Il(e){var t=yt();return zo(t,it,e)}function zo(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var m=e.baseQueue,C=l.pending;if(C!==null){if(m!==null){var L=m.next;m.next=C.next,C.next=L}t.baseQueue=m=C,l.pending=null}if(C=e.baseState,m===null)e.memoizedState=C;else{t=m.next;var U=L=null,X=null,se=t,de=!1;do{var _e=se.lane&-536870913;if(_e!==se.lane?(Fe&_e)===_e:(Fn&_e)===_e){var le=se.revertLane;if(le===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),_e===xr&&(de=!0);else if((Fn&le)===le){se=se.next,le===xr&&(de=!0);continue}else _e={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=_e,L=C):X=X.next=_e,Ne.lanes|=le,di|=le;_e=se.action,$i&&i(C,_e),C=se.hasEagerState?se.eagerState:i(C,_e)}else le={lane:_e,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=le,L=C):X=X.next=le,Ne.lanes|=_e,di|=_e;se=se.next}while(se!==null&&se!==t);if(X===null?L=C:X.next=U,!en(C,e.memoizedState)&&(Ct=!0,de&&(i=Er,i!==null)))throw i;e.memoizedState=C,e.baseState=L,e.baseQueue=X,l.lastRenderedState=C}return m===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ho(e){var t=yt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,m=i.pending,C=t.memoizedState;if(m!==null){i.pending=null;var L=m=m.next;do C=e(C,L.action),L=L.next;while(L!==m);en(C,t.memoizedState)||(Ct=!0),t.memoizedState=C,t.baseQueue===null&&(t.baseState=C),i.lastRenderedState=C}return[C,l]}function mf(e,t,i){var l=Ne,m=yt(),C=Ve;if(C){if(i===void 0)throw Error(o(407));i=i()}else i=t();var L=!en((it||m).memoizedState,i);if(L&&(m.memoizedState=i,Ct=!0),m=m.queue,Po(vf.bind(null,l,m,e),[e]),m.getSnapshot!==t||L||bt!==null&&bt.memoizedState.tag&1){if(l.flags|=2048,Mr(9,{destroy:void 0},_f.bind(null,l,m,i,t),null),lt===null)throw Error(o(349));C||(Fn&127)!==0||gf(l,t,i)}return i}function gf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ne.updateQueue,t===null?(t=zl(),Ne.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function _f(e,t,i,l){t.value=i,t.getSnapshot=l,yf(t)&&Sf(e)}function vf(e,t,i){return i(function(){yf(t)&&Sf(e)})}function yf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!en(e,i)}catch{return!0}}function Sf(e){var t=zi(e,2);t!==null&&Kt(t,e,2)}function Io(e){var t=Pt();if(typeof e=="function"){var i=e;if(e=i(),$i){Rt(!0);try{i()}finally{Rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:e},t}function bf(e,t,i,l){return e.baseState=i,zo(e,it,typeof l=="function"?l:qn)}function Rv(e,t,i,l,m){if(Fl(e))throw Error(o(485));if(e=t.action,e!==null){var C={payload:m,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){C.listeners.push(L)}};G.T!==null?i(!0):C.isTransition=!1,l(C),i=t.pending,i===null?(C.next=t.pending=C,Cf(t,C)):(C.next=i.next,t.pending=i.next=C)}}function Cf(e,t){var i=t.action,l=t.payload,m=e.state;if(t.isTransition){var C=G.T,L={};G.T=L;try{var U=i(m,l),X=G.S;X!==null&&X(L,U),wf(e,t,U)}catch(se){Uo(e,t,se)}finally{C!==null&&L.types!==null&&(C.types=L.types),G.T=C}}else try{C=i(m,l),wf(e,t,C)}catch(se){Uo(e,t,se)}}function wf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){xf(e,t,l)},function(l){return Uo(e,t,l)}):xf(e,t,i)}function xf(e,t,i){t.status="fulfilled",t.value=i,Ef(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Cf(e,i)))}function Uo(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Ef(t),t=t.next;while(t!==l)}e.action=null}function Ef(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kf(e,t){return t}function Af(e,t){if(Ve){var i=lt.formState;if(i!==null){e:{var l=Ne;if(Ve){if(ft){t:{for(var m=ft,C=_n;m.nodeType!==8;){if(!C){m=null;break t}if(m=yn(m.nextSibling),m===null){m=null;break t}}C=m.data,m=C==="F!"||C==="F"?m:null}if(m){ft=yn(m.nextSibling),l=m.data==="F!";break e}}ri(l)}l=!1}l&&(t=i[0])}}return i=Pt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kf,lastRenderedState:t},i.queue=l,i=$f.bind(null,Ne,l),l.dispatch=i,l=Io(!1),C=$o.bind(null,Ne,!1,l.queue),l=Pt(),m={state:t,dispatch:null,action:e,pending:null},l.queue=m,i=Rv.bind(null,Ne,m,C,i),m.dispatch=i,l.memoizedState=e,[t,i,!1]}function Tf(e){var t=yt();return Df(t,it,e)}function Df(e,t,i){if(t=zo(e,t,kf)[0],e=Il(qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=xs(t)}catch(L){throw L===kr?Dl:L}else l=t;t=yt();var m=t.queue,C=m.dispatch;return i!==t.memoizedState&&(Ne.flags|=2048,Mr(9,{destroy:void 0},Mv.bind(null,m,i),null)),[l,C,e]}function Mv(e,t){e.action=t}function Rf(e){var t=yt(),i=it;if(i!==null)return Df(t,i,e);yt(),t=t.memoizedState,i=yt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Mr(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=zl(),Ne.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Mf(){return yt().memoizedState}function Ul(e,t,i,l){var m=Pt();Ne.flags|=e,m.memoizedState=Mr(1|t,{destroy:void 0},i,l===void 0?null:l)}function Pl(e,t,i,l){var m=yt();l=l===void 0?null:l;var C=m.memoizedState.inst;it!==null&&l!==null&&Mo(l,it.memoizedState.deps)?m.memoizedState=Mr(t,C,i,l):(Ne.flags|=e,m.memoizedState=Mr(1|t,C,i,l))}function Lf(e,t){Ul(8390656,8,e,t)}function Po(e,t){Pl(2048,8,e,t)}function Lv(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=zl(),Ne.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Of(e){var t=yt().memoizedState;return Lv({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Bf(e,t){return Pl(4,2,e,t)}function Nf(e,t){return Pl(4,4,e,t)}function jf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zf(e,t,i){i=i!=null?i.concat([e]):null,Pl(4,4,jf.bind(null,t,e),i)}function Fo(){}function Hf(e,t){var i=yt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Mo(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function If(e,t){var i=yt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Mo(t,l[1]))return l[0];if(l=e(),$i){Rt(!0);try{e()}finally{Rt(!1)}}return i.memoizedState=[l,t],l}function qo(e,t,i){return i===void 0||(Fn&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ud(),Ne.lanes|=e,di|=e,i)}function Uf(e,t,i,l){return en(i,t)?i:Tr.current!==null?(e=qo(e,i,l),en(e,t)||(Ct=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Fe&261930)===0?(Ct=!0,e.memoizedState=i):(e=Ud(),Ne.lanes|=e,di|=e,t)}function Pf(e,t,i,l,m){var C=$.p;$.p=C!==0&&8>C?C:8;var L=G.T,U={};G.T=U,$o(e,!1,t,i);try{var X=m(),se=G.S;if(se!==null&&se(U,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=Av(X,l);Es(e,t,de,an(e))}else Es(e,t,l,an(e))}catch(_e){Es(e,t,{then:function(){},status:"rejected",reason:_e},an())}finally{$.p=C,L!==null&&U.types!==null&&(L.types=U.types),G.T=L}}function Ov(){}function Vo(e,t,i,l){if(e.tag!==5)throw Error(o(476));var m=Ff(e).queue;Pf(e,m,t,Q,i===null?Ov:function(){return qf(e),i(l)})}function Ff(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:Q},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function qf(e){var t=Ff(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},an())}function Go(){return Lt(Fs)}function Vf(){return yt().memoizedState}function Gf(){return yt().memoizedState}function Bv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=an();e=ai(i);var l=oi(t,e,i);l!==null&&(Kt(l,t,i),Ss(l,t,i)),t={cache:So()},e.payload=t;return}t=t.return}}function Nv(e,t,i){var l=an();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Fl(e)?Yf(t,i):(i=oo(e,t,i,l),i!==null&&(Kt(i,e,l),Wf(i,t,l)))}function $f(e,t,i){var l=an();Es(e,t,i,l)}function Es(e,t,i,l){var m={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Fl(e))Yf(t,m);else{var C=e.alternate;if(e.lanes===0&&(C===null||C.lanes===0)&&(C=t.lastRenderedReducer,C!==null))try{var L=t.lastRenderedState,U=C(L,i);if(m.hasEagerState=!0,m.eagerState=U,en(U,L))return Cl(e,t,m,0),lt===null&&bl(),!1}catch{}finally{}if(i=oo(e,t,m,l),i!==null)return Kt(i,e,l),Wf(i,t,l),!0}return!1}function $o(e,t,i,l){if(l={lane:2,revertLane:xc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Fl(e)){if(t)throw Error(o(479))}else t=oo(e,i,l,2),t!==null&&Kt(t,e,2)}function Fl(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Yf(e,t){Dr=Nl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Wf(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,nt(e,i)}}var ks={readContext:Lt,use:Hl,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};ks.useEffectEvent=gt;var Kf={readContext:Lt,use:Hl,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Lf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ul(4194308,4,jf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){Ul(4,2,e,t)},useMemo:function(e,t){var i=Pt();t=t===void 0?null:t;var l=e();if($i){Rt(!0);try{e()}finally{Rt(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Pt();if(i!==void 0){var m=i(t);if($i){Rt(!0);try{i(t)}finally{Rt(!1)}}}else m=t;return l.memoizedState=l.baseState=m,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:m},l.queue=e,e=e.dispatch=Nv.bind(null,Ne,e),[l.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,i=$f.bind(null,Ne,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Fo,useDeferredValue:function(e,t){var i=Pt();return qo(i,e,t)},useTransition:function(){var e=Io(!1);return e=Pf.bind(null,Ne,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=Ne,m=Pt();if(Ve){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),lt===null)throw Error(o(349));(Fe&127)!==0||gf(l,t,i)}m.memoizedState=i;var C={value:i,getSnapshot:t};return m.queue=C,Lf(vf.bind(null,l,C,e),[e]),l.flags|=2048,Mr(9,{destroy:void 0},_f.bind(null,l,C,i,t),null),i},useId:function(){var e=Pt(),t=lt.identifierPrefix;if(Ve){var i=Dn,l=Tn;i=(l&~(1<<32-Je(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=jl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Tv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Go,useFormState:Af,useActionState:Af,useOptimistic:function(e){var t=Pt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=$o.bind(null,Ne,!0,i),i.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Pt().memoizedState=Bv.bind(null,Ne)},useEffectEvent:function(e){var t=Pt(),i={impl:e};return t.memoizedState=i,function(){if((Xe&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Yo={readContext:Lt,use:Hl,useCallback:Hf,useContext:Lt,useEffect:Po,useImperativeHandle:zf,useInsertionEffect:Bf,useLayoutEffect:Nf,useMemo:If,useReducer:Il,useRef:Mf,useState:function(){return Il(qn)},useDebugValue:Fo,useDeferredValue:function(e,t){var i=yt();return Uf(i,it.memoizedState,e,t)},useTransition:function(){var e=Il(qn)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:xs(e),t]},useSyncExternalStore:mf,useId:Vf,useHostTransitionStatus:Go,useFormState:Tf,useActionState:Tf,useOptimistic:function(e,t){var i=yt();return bf(i,it,e,t)},useMemoCache:jo,useCacheRefresh:Gf};Yo.useEffectEvent=Of;var Xf={readContext:Lt,use:Hl,useCallback:Hf,useContext:Lt,useEffect:Po,useImperativeHandle:zf,useInsertionEffect:Bf,useLayoutEffect:Nf,useMemo:If,useReducer:Ho,useRef:Mf,useState:function(){return Ho(qn)},useDebugValue:Fo,useDeferredValue:function(e,t){var i=yt();return it===null?qo(i,e,t):Uf(i,it.memoizedState,e,t)},useTransition:function(){var e=Ho(qn)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:xs(e),t]},useSyncExternalStore:mf,useId:Vf,useHostTransitionStatus:Go,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var i=yt();return it!==null?bf(i,it,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:jo,useCacheRefresh:Gf};Xf.useEffectEvent=Of;function Wo(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Ko={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=an(),m=ai(l);m.payload=t,i!=null&&(m.callback=i),t=oi(e,m,l),t!==null&&(Kt(t,e,l),Ss(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=an(),m=ai(l);m.tag=1,m.payload=t,i!=null&&(m.callback=i),t=oi(e,m,l),t!==null&&(Kt(t,e,l),Ss(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=an(),l=ai(i);l.tag=2,t!=null&&(l.callback=t),t=oi(e,l,i),t!==null&&(Kt(t,e,i),Ss(t,e,i))}};function Qf(e,t,i,l,m,C,L){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,C,L):t.prototype&&t.prototype.isPureReactComponent?!fs(i,l)||!fs(m,C):!0}function Zf(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&Ko.enqueueReplaceState(t,t.state,null)}function Yi(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var m in e)i[m]===void 0&&(i[m]=e[m])}return i}function Jf(e){Sl(e)}function ed(e){console.error(e)}function td(e){Sl(e)}function ql(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function nd(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Xo(e,t,i){return i=ai(i),i.tag=3,i.payload={element:null},i.callback=function(){ql(e,t)},i}function id(e){return e=ai(e),e.tag=3,e}function rd(e,t,i,l){var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var C=l.value;e.payload=function(){return m(C)},e.callback=function(){nd(t,i,l)}}var L=i.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(e.callback=function(){nd(t,i,l),typeof m!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var U=l.stack;this.componentDidCatch(l.value,{componentStack:U!==null?U:""})})}function jv(e,t,i,l,m){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&wr(t,i,m,!0),i=nn.current,i!==null){switch(i.tag){case 31:case 13:return vn===null?ta():i.alternate===null&&_t===0&&(_t=3),i.flags&=-257,i.flags|=65536,i.lanes=m,l===Rl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),bc(e,l,m)),!1;case 22:return i.flags|=65536,l===Rl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),bc(e,l,m)),!1}throw Error(o(435,i.tag))}return bc(e,l,m),ta(),!1}if(Ve)return t=nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=m,l!==mo&&(e=Error(o(422),{cause:l}),ms(pn(e,i)))):(l!==mo&&(t=Error(o(423),{cause:l}),ms(pn(t,i))),e=e.current.alternate,e.flags|=65536,m&=-m,e.lanes|=m,l=pn(l,i),m=Xo(e.stateNode,l,m),ko(e,m),_t!==4&&(_t=2)),!1;var C=Error(o(520),{cause:l});if(C=pn(C,i),Bs===null?Bs=[C]:Bs.push(C),_t!==4&&(_t=2),t===null)return!0;l=pn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=m&-m,i.lanes|=e,e=Xo(i.stateNode,l,e),ko(i,e),!1;case 1:if(t=i.type,C=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(pi===null||!pi.has(C))))return i.flags|=65536,m&=-m,i.lanes|=m,m=id(m),rd(m,e,i,l),ko(i,m),!1}i=i.return}while(i!==null);return!1}var Qo=Error(o(461)),Ct=!1;function Ot(e,t,i,l){t.child=e===null?of(t,null,i,l):Gi(t,e.child,i,l)}function sd(e,t,i,l,m){i=i.render;var C=t.ref;if("ref"in l){var L={};for(var U in l)U!=="ref"&&(L[U]=l[U])}else L=l;return Pi(t),l=Lo(e,t,i,L,C,m),U=Oo(),e!==null&&!Ct?(Bo(e,t,m),Vn(e,t,m)):(Ve&&U&&fo(t),t.flags|=1,Ot(e,t,l,m),t.child)}function ld(e,t,i,l,m){if(e===null){var C=i.type;return typeof C=="function"&&!co(C)&&C.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=C,ad(e,t,C,l,m)):(e=xl(i.type,null,l,t,t.mode,m),e.ref=t.ref,e.return=t,t.child=e)}if(C=e.child,!sc(e,m)){var L=C.memoizedProps;if(i=i.compare,i=i!==null?i:fs,i(L,l)&&e.ref===t.ref)return Vn(e,t,m)}return t.flags|=1,e=Hn(C,l),e.ref=t.ref,e.return=t,t.child=e}function ad(e,t,i,l,m){if(e!==null){var C=e.memoizedProps;if(fs(C,l)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=l=C,sc(e,m))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,Vn(e,t,m)}return Zo(e,t,i,l,m)}function od(e,t,i,l){var m=l.children,C=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(C=C!==null?C.baseLanes|i:i,e!==null){for(l=t.child=e.child,m=0;l!==null;)m=m|l.lanes|l.childLanes,l=l.sibling;l=m&~C}else l=0,t.child=null;return cd(e,t,C,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Tl(t,C!==null?C.cachePool:null),C!==null?hf(t,C):To(),ff(t);else return l=t.lanes=536870912,cd(e,t,C!==null?C.baseLanes|i:i,i,l)}else C!==null?(Tl(t,C.cachePool),hf(t,C),ui(),t.memoizedState=null):(e!==null&&Tl(t,null),To(),ui());return Ot(e,t,m,i),t.child}function As(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cd(e,t,i,l,m){var C=Co();return C=C===null?null:{parent:St._currentValue,pool:C},t.memoizedState={baseLanes:i,cachePool:C},e!==null&&Tl(t,null),To(),ff(t),e!==null&&wr(e,t,l,!0),t.childLanes=m,null}function Vl(e,t){return t=$l({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ud(e,t,i){return Gi(t,e.child,null,i),e=Vl(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function zv(e,t,i){var l=t.pendingProps,m=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=Vl(t,l),t.lanes=536870912,As(null,e);if(Ro(t),(e=ft)?(e=Cp(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ni!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},i=$h(e),i.return=t,t.child=i,Mt=t,ft=null)):e=null,e===null)throw ri(t);return t.lanes=536870912,null}return Vl(t,l)}var C=e.memoizedState;if(C!==null){var L=C.dehydrated;if(Ro(t),m)if(t.flags&256)t.flags&=-257,t=ud(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ct||wr(e,t,i,!1),m=(i&e.childLanes)!==0,Ct||m){if(l=lt,l!==null&&(L=ol(l,i),L!==0&&L!==C.retryLane))throw C.retryLane=L,zi(e,L),Kt(l,e,L),Qo;ta(),t=ud(e,t,i)}else e=C.treeContext,ft=yn(L.nextSibling),Mt=t,Ve=!0,ii=null,_n=!1,e!==null&&Kh(t,e),t=Vl(t,l),t.flags|=4096;return t}return e=Hn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Zo(e,t,i,l,m){return Pi(t),i=Lo(e,t,i,l,void 0,m),l=Oo(),e!==null&&!Ct?(Bo(e,t,m),Vn(e,t,m)):(Ve&&l&&fo(t),t.flags|=1,Ot(e,t,i,m),t.child)}function hd(e,t,i,l,m,C){return Pi(t),t.updateQueue=null,i=pf(t,l,i,m),df(e),l=Oo(),e!==null&&!Ct?(Bo(e,t,C),Vn(e,t,C)):(Ve&&l&&fo(t),t.flags|=1,Ot(e,t,i,C),t.child)}function fd(e,t,i,l,m){if(Pi(t),t.stateNode===null){var C=yr,L=i.contextType;typeof L=="object"&&L!==null&&(C=Lt(L)),C=new i(l,C),t.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=Ko,t.stateNode=C,C._reactInternals=t,C=t.stateNode,C.props=l,C.state=t.memoizedState,C.refs={},xo(t),L=i.contextType,C.context=typeof L=="object"&&L!==null?Lt(L):yr,C.state=t.memoizedState,L=i.getDerivedStateFromProps,typeof L=="function"&&(Wo(t,i,L,l),C.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(L=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),L!==C.state&&Ko.enqueueReplaceState(C,C.state,null),Cs(t,l,C,m),bs(),C.state=t.memoizedState),typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){C=t.stateNode;var U=t.memoizedProps,X=Yi(i,U);C.props=X;var se=C.context,de=i.contextType;L=yr,typeof de=="object"&&de!==null&&(L=Lt(de));var _e=i.getDerivedStateFromProps;de=typeof _e=="function"||typeof C.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,de||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(U||se!==L)&&Zf(t,C,l,L),li=!1;var le=t.memoizedState;C.state=le,Cs(t,l,C,m),bs(),se=t.memoizedState,U||le!==se||li?(typeof _e=="function"&&(Wo(t,i,_e,l),se=t.memoizedState),(X=li||Qf(t,i,X,l,le,se,L))?(de||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(t.flags|=4194308)):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=se),C.props=l,C.state=se,C.context=L,l=X):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{C=t.stateNode,Eo(e,t),L=t.memoizedProps,de=Yi(i,L),C.props=de,_e=t.pendingProps,le=C.context,se=i.contextType,X=yr,typeof se=="object"&&se!==null&&(X=Lt(se)),U=i.getDerivedStateFromProps,(se=typeof U=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(L!==_e||le!==X)&&Zf(t,C,l,X),li=!1,le=t.memoizedState,C.state=le,Cs(t,l,C,m),bs();var oe=t.memoizedState;L!==_e||le!==oe||li||e!==null&&e.dependencies!==null&&kl(e.dependencies)?(typeof U=="function"&&(Wo(t,i,U,l),oe=t.memoizedState),(de=li||Qf(t,i,de,l,le,oe,X)||e!==null&&e.dependencies!==null&&kl(e.dependencies))?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(l,oe,X),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(l,oe,X)),typeof C.componentDidUpdate=="function"&&(t.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=oe),C.props=l,C.state=oe,C.context=X,l=de):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),l=!1)}return C=l,Gl(e,t),l=(t.flags&128)!==0,C||l?(C=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:C.render(),t.flags|=1,e!==null&&l?(t.child=Gi(t,e.child,null,m),t.child=Gi(t,null,i,m)):Ot(e,t,i,m),t.memoizedState=C.state,e=t.child):e=Vn(e,t,m),e}function dd(e,t,i,l){return Ii(),t.flags|=256,Ot(e,t,i,l),t.child}var Jo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:tf()}}function tc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=ln),e}function pd(e,t,i){var l=t.pendingProps,m=!1,C=(t.flags&128)!==0,L;if((L=C)||(L=e!==null&&e.memoizedState===null?!1:(vt.current&2)!==0),L&&(m=!0,t.flags&=-129),L=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(m?ci(t):ui(),(e=ft)?(e=Cp(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ni!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},i=$h(e),i.return=t,t.child=i,Mt=t,ft=null)):e=null,e===null)throw ri(t);return zc(e)?t.lanes=32:t.lanes=536870912,null}var U=l.children;return l=l.fallback,m?(ui(),m=t.mode,U=$l({mode:"hidden",children:U},m),l=Hi(l,m,i,null),U.return=t,l.return=t,U.sibling=l,t.child=U,l=t.child,l.memoizedState=ec(i),l.childLanes=tc(e,L,i),t.memoizedState=Jo,As(null,l)):(ci(t),nc(t,U))}var X=e.memoizedState;if(X!==null&&(U=X.dehydrated,U!==null)){if(C)t.flags&256?(ci(t),t.flags&=-257,t=ic(e,t,i)):t.memoizedState!==null?(ui(),t.child=e.child,t.flags|=128,t=null):(ui(),U=l.fallback,m=t.mode,l=$l({mode:"visible",children:l.children},m),U=Hi(U,m,i,null),U.flags|=2,l.return=t,U.return=t,l.sibling=U,t.child=l,Gi(t,e.child,null,i),l=t.child,l.memoizedState=ec(i),l.childLanes=tc(e,L,i),t.memoizedState=Jo,t=As(null,l));else if(ci(t),zc(U)){if(L=U.nextSibling&&U.nextSibling.dataset,L)var se=L.dgst;L=se,l=Error(o(419)),l.stack="",l.digest=L,ms({value:l,source:null,stack:null}),t=ic(e,t,i)}else if(Ct||wr(e,t,i,!1),L=(i&e.childLanes)!==0,Ct||L){if(L=lt,L!==null&&(l=ol(L,i),l!==0&&l!==X.retryLane))throw X.retryLane=l,zi(e,l),Kt(L,e,l),Qo;jc(U)||ta(),t=ic(e,t,i)}else jc(U)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ft=yn(U.nextSibling),Mt=t,Ve=!0,ii=null,_n=!1,e!==null&&Kh(t,e),t=nc(t,l.children),t.flags|=4096);return t}return m?(ui(),U=l.fallback,m=t.mode,X=e.child,se=X.sibling,l=Hn(X,{mode:"hidden",children:l.children}),l.subtreeFlags=X.subtreeFlags&65011712,se!==null?U=Hn(se,U):(U=Hi(U,m,i,null),U.flags|=2),U.return=t,l.return=t,l.sibling=U,t.child=l,As(null,l),l=t.child,U=e.child.memoizedState,U===null?U=ec(i):(m=U.cachePool,m!==null?(X=St._currentValue,m=m.parent!==X?{parent:X,pool:X}:m):m=tf(),U={baseLanes:U.baseLanes|i,cachePool:m}),l.memoizedState=U,l.childLanes=tc(e,L,i),t.memoizedState=Jo,As(e.child,l)):(ci(t),i=e.child,e=i.sibling,i=Hn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(L=t.deletions,L===null?(t.deletions=[e],t.flags|=16):L.push(e)),t.child=i,t.memoizedState=null,i)}function nc(e,t){return t=$l({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function $l(e,t){return e=tn(22,e,null,t),e.lanes=0,e}function ic(e,t,i){return Gi(t,e.child,null,i),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function md(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),vo(e.return,t,i)}function rc(e,t,i,l,m,C){var L=e.memoizedState;L===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:m,treeForkCount:C}:(L.isBackwards=t,L.rendering=null,L.renderingStartTime=0,L.last=l,L.tail=i,L.tailMode=m,L.treeForkCount=C)}function gd(e,t,i){var l=t.pendingProps,m=l.revealOrder,C=l.tail;l=l.children;var L=vt.current,U=(L&2)!==0;if(U?(L=L&1|2,t.flags|=128):L&=1,j(vt,L),Ot(e,t,l,i),l=Ve?ps:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&md(e,i,t);else if(e.tag===19)md(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(m){case"forwards":for(i=t.child,m=null;i!==null;)e=i.alternate,e!==null&&Bl(e)===null&&(m=i),i=i.sibling;i=m,i===null?(m=t.child,t.child=null):(m=i.sibling,i.sibling=null),rc(t,!1,m,i,C,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,m=t.child,t.child=null;m!==null;){if(e=m.alternate,e!==null&&Bl(e)===null){t.child=m;break}e=m.sibling,m.sibling=i,i=m,m=e}rc(t,!0,i,null,C,l);break;case"together":rc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Vn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),di|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(wr(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=Hn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Hn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function sc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&kl(e)))}function Hv(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),si(t,St,e.memoizedState.cache),Ii();break;case 27:case 5:J(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:si(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ro(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ci(t),t.flags|=128,null):(i&t.child.childLanes)!==0?pd(e,t,i):(ci(t),e=Vn(e,t,i),e!==null?e.sibling:null);ci(t);break;case 19:var m=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(wr(e,t,i,!1),l=(i&t.childLanes)!==0),m){if(l)return gd(e,t,i);t.flags|=128}if(m=t.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),j(vt,vt.current),l)break;return null;case 22:return t.lanes=0,od(e,t,i,t.pendingProps);case 24:si(t,St,e.memoizedState.cache)}return Vn(e,t,i)}function _d(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!sc(e,i)&&(t.flags&128)===0)return Ct=!1,Hv(e,t,i);Ct=(e.flags&131072)!==0}else Ct=!1,Ve&&(t.flags&1048576)!==0&&Wh(t,ps,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=qi(t.elementType),t.type=e,typeof e=="function")co(e)?(l=Yi(e,l),t.tag=1,t=fd(null,t,e,l,i)):(t.tag=0,t=Zo(null,t,e,l,i));else{if(e!=null){var m=e.$$typeof;if(m===A){t.tag=11,t=sd(null,t,e,l,i);break e}else if(m===T){t.tag=14,t=ld(null,t,e,l,i);break e}}throw t=Y(e)||e,Error(o(306,t,""))}}return t;case 0:return Zo(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,m=Yi(l,t.pendingProps),fd(e,t,l,m,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var C=t.memoizedState;m=C.element,Eo(e,t),Cs(t,l,null,i);var L=t.memoizedState;if(l=L.cache,si(t,St,l),l!==C.cache&&yo(t,[St],i,!0),bs(),l=L.element,C.isDehydrated)if(C={element:l,isDehydrated:!1,cache:L.cache},t.updateQueue.baseState=C,t.memoizedState=C,t.flags&256){t=dd(e,t,l,i);break e}else if(l!==m){m=pn(Error(o(424)),t),ms(m),t=dd(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ft=yn(e.firstChild),Mt=t,Ve=!0,ii=null,_n=!0,i=of(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ii(),l===m){t=Vn(e,t,i);break e}Ot(e,t,l,i)}t=t.child}return t;case 26:return Gl(e,t),e===null?(i=Tp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ve||(i=t.type,e=t.pendingProps,l=oa(ge.current).createElement(i),l[ne]=t,l[Se]=e,Bt(l,i,e),At(l),t.stateNode=l):t.memoizedState=Tp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),e===null&&Ve&&(l=t.stateNode=Ep(t.type,t.pendingProps,ge.current),Mt=t,_n=!0,m=ft,vi(t.type)?(Hc=m,ft=yn(l.firstChild)):ft=m),Ot(e,t,t.pendingProps.children,i),Gl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((m=l=ft)&&(l=p0(l,t.type,t.pendingProps,_n),l!==null?(t.stateNode=l,Mt=t,ft=yn(l.firstChild),_n=!1,m=!0):m=!1),m||ri(t)),J(t),m=t.type,C=t.pendingProps,L=e!==null?e.memoizedProps:null,l=C.children,Oc(m,C)?l=null:L!==null&&Oc(m,L)&&(t.flags|=32),t.memoizedState!==null&&(m=Lo(e,t,Dv,null,null,i),Fs._currentValue=m),Gl(e,t),Ot(e,t,l,i),t.child;case 6:return e===null&&Ve&&((e=i=ft)&&(i=m0(i,t.pendingProps,_n),i!==null?(t.stateNode=i,Mt=t,ft=null,e=!0):e=!1),e||ri(t)),null;case 13:return pd(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Gi(t,null,l,i):Ot(e,t,l,i),t.child;case 11:return sd(e,t,t.type,t.pendingProps,i);case 7:return Ot(e,t,t.pendingProps,i),t.child;case 8:return Ot(e,t,t.pendingProps.children,i),t.child;case 12:return Ot(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,si(t,t.type,l.value),Ot(e,t,l.children,i),t.child;case 9:return m=t.type._context,l=t.pendingProps.children,Pi(t),m=Lt(m),l=l(m),t.flags|=1,Ot(e,t,l,i),t.child;case 14:return ld(e,t,t.type,t.pendingProps,i);case 15:return ad(e,t,t.type,t.pendingProps,i);case 19:return gd(e,t,i);case 31:return zv(e,t,i);case 22:return od(e,t,i,t.pendingProps);case 24:return Pi(t),l=Lt(St),e===null?(m=Co(),m===null&&(m=lt,C=So(),m.pooledCache=C,C.refCount++,C!==null&&(m.pooledCacheLanes|=i),m=C),t.memoizedState={parent:l,cache:m},xo(t),si(t,St,m)):((e.lanes&i)!==0&&(Eo(e,t),Cs(t,null,null,i),bs()),m=e.memoizedState,C=t.memoizedState,m.parent!==l?(m={parent:l,cache:l},t.memoizedState=m,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=m),si(t,St,l)):(l=C.cache,si(t,St,l),l!==m.cache&&yo(t,[St],i,!0))),Ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Gn(e){e.flags|=4}function lc(e,t,i,l,m){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(m&335544128)===m)if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw Vi=Rl,wo}else e.flags&=-16777217}function vd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Op(t))if(Vd())e.flags|=8192;else throw Vi=Rl,wo}function Yl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ri():536870912,e.lanes|=t,Nr|=t)}function Ts(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags&65011712,l|=m.flags&65011712,m.return=e,m=m.sibling;else for(m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags,l|=m.flags,m.return=e,m=m.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Iv(e,t,i){var l=t.pendingProps;switch(po(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Pn(St),ce(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Cr(t)?Gn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,go())),dt(t),null;case 26:var m=t.type,C=t.memoizedState;return e===null?(Gn(t),C!==null?(dt(t),vd(t,C)):(dt(t),lc(t,m,null,l,i))):C?C!==e.memoizedState?(Gn(t),dt(t),vd(t,C)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Gn(t),dt(t),lc(t,m,e,l,i)),null;case 27:if(ie(t),i=ge.current,m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Gn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return dt(t),null}e=ee.current,Cr(t)?Xh(t):(e=Ep(m,l,i),t.stateNode=e,Gn(t))}return dt(t),null;case 5:if(ie(t),m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Gn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return dt(t),null}if(C=ee.current,Cr(t))Xh(t);else{var L=oa(ge.current);switch(C){case 1:C=L.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:C=L.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":C=L.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":C=L.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":C=L.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof l.is=="string"?L.createElement("select",{is:l.is}):L.createElement("select"),l.multiple?C.multiple=!0:l.size&&(C.size=l.size);break;default:C=typeof l.is=="string"?L.createElement(m,{is:l.is}):L.createElement(m)}}C[ne]=t,C[Se]=l;e:for(L=t.child;L!==null;){if(L.tag===5||L.tag===6)C.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===t)break e;for(;L.sibling===null;){if(L.return===null||L.return===t)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}t.stateNode=C;e:switch(Bt(C,m,l),m){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Gn(t)}}return dt(t),lc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Gn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ge.current,Cr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,m=Mt,m!==null)switch(m.tag){case 27:case 5:l=m.memoizedProps}e[ne]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||pp(e.nodeValue,i)),e||ri(t,!0)}else e=oa(e).createTextNode(l),e[ne]=t,t.stateNode=e}return dt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=Cr(t),i!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[ne]=t}else Ii(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else i=go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return dt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(m=Cr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!m)throw Error(o(318));if(m=t.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[ne]=t}else Ii(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),m=!1}else m=go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=m),m=!0;if(!m)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,m=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(m=l.alternate.memoizedState.cachePool.pool),C=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(C=l.memoizedState.cachePool.pool),C!==m&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Yl(t,t.updateQueue),dt(t),null);case 4:return ce(),e===null&&Tc(t.stateNode.containerInfo),dt(t),null;case 10:return Pn(t.type),dt(t),null;case 19:if(V(vt),l=t.memoizedState,l===null)return dt(t),null;if(m=(t.flags&128)!==0,C=l.rendering,C===null)if(m)Ts(l,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(C=Bl(e),C!==null){for(t.flags|=128,Ts(l,!1),e=C.updateQueue,t.updateQueue=e,Yl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Gh(i,e),i=i.sibling;return j(vt,vt.current&1|2),Ve&&In(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ge()>Zl&&(t.flags|=128,m=!0,Ts(l,!1),t.lanes=4194304)}else{if(!m)if(e=Bl(C),e!==null){if(t.flags|=128,m=!0,e=e.updateQueue,t.updateQueue=e,Yl(t,e),Ts(l,!0),l.tail===null&&l.tailMode==="hidden"&&!C.alternate&&!Ve)return dt(t),null}else 2*Ge()-l.renderingStartTime>Zl&&i!==536870912&&(t.flags|=128,m=!0,Ts(l,!1),t.lanes=4194304);l.isBackwards?(C.sibling=t.child,t.child=C):(e=l.last,e!==null?e.sibling=C:t.child=C,l.last=C)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ge(),e.sibling=null,i=vt.current,j(vt,m?i&1|2:i&1),Ve&&In(t,l.treeForkCount),e):(dt(t),null);case 22:case 23:return rn(t),Do(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),i=t.updateQueue,i!==null&&Yl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&V(Fi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Pn(St),dt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Uv(e,t){switch(po(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(St),ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(o(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(vt),null;case 4:return ce(),null;case 10:return Pn(t.type),null;case 22:case 23:return rn(t),Do(),e!==null&&V(Fi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pn(St),null;case 25:return null;default:return null}}function yd(e,t){switch(po(t),t.tag){case 3:Pn(St),ce();break;case 26:case 27:case 5:ie(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:V(vt);break;case 10:Pn(t.type);break;case 22:case 23:rn(t),Do(),e!==null&&V(Fi);break;case 24:Pn(St)}}function Ds(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var m=l.next;i=m;do{if((i.tag&e)===e){l=void 0;var C=i.create,L=i.inst;l=C(),L.destroy=l}i=i.next}while(i!==m)}}catch(U){tt(t,t.return,U)}}function hi(e,t,i){try{var l=t.updateQueue,m=l!==null?l.lastEffect:null;if(m!==null){var C=m.next;l=C;do{if((l.tag&e)===e){var L=l.inst,U=L.destroy;if(U!==void 0){L.destroy=void 0,m=t;var X=i,se=U;try{se()}catch(de){tt(m,X,de)}}}l=l.next}while(l!==C)}}catch(de){tt(t,t.return,de)}}function Sd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{uf(t,i)}catch(l){tt(e,e.return,l)}}}function bd(e,t,i){i.props=Yi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){tt(e,t,l)}}function Rs(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(m){tt(e,t,m)}}function Rn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(m){tt(e,t,m)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(m){tt(e,t,m)}else i.current=null}function Cd(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(m){tt(e,e.return,m)}}function ac(e,t,i){try{var l=e.stateNode;o0(l,e.type,i,t),l[Se]=t}catch(m){tt(e,e.return,m)}}function wd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&vi(e.type)||e.tag===4}function oc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&vi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=jn));else if(l!==4&&(l===27&&vi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,i),e=e.sibling;e!==null;)cc(e,t,i),e=e.sibling}function Wl(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&vi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Wl(e,t,i),e=e.sibling;e!==null;)Wl(e,t,i),e=e.sibling}function xd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,m=t.attributes;m.length;)t.removeAttributeNode(m[0]);Bt(t,l,i),t[ne]=e,t[Se]=i}catch(C){tt(e,e.return,C)}}var $n=!1,wt=!1,uc=!1,Ed=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function Pv(e,t){if(e=e.containerInfo,Mc=ma,e=jh(e),no(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var m=l.anchorOffset,C=l.focusNode;l=l.focusOffset;try{i.nodeType,C.nodeType}catch{i=null;break e}var L=0,U=-1,X=-1,se=0,de=0,_e=e,le=null;t:for(;;){for(var oe;_e!==i||m!==0&&_e.nodeType!==3||(U=L+m),_e!==C||l!==0&&_e.nodeType!==3||(X=L+l),_e.nodeType===3&&(L+=_e.nodeValue.length),(oe=_e.firstChild)!==null;)le=_e,_e=oe;for(;;){if(_e===e)break t;if(le===i&&++se===m&&(U=L),le===C&&++de===l&&(X=L),(oe=_e.nextSibling)!==null)break;_e=le,le=_e.parentNode}_e=oe}i=U===-1||X===-1?null:{start:U,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(Lc={focusedElem:e,selectionRange:i},ma=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){switch(t=Tt,C=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)m=e[i],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&C!==null){e=void 0,i=t,m=C.memoizedProps,C=C.memoizedState,l=i.stateNode;try{var Ee=Yi(i.type,m);e=l.getSnapshotBeforeUpdate(Ee,C),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){tt(i,i.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Nc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Tt=e;break}Tt=t.return}}function kd(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(e,i),l&4&&Ds(5,i);break;case 1:if(Wn(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(L){tt(i,i.return,L)}else{var m=Yi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(m,t,e.__reactInternalSnapshotBeforeUpdate)}catch(L){tt(i,i.return,L)}}l&64&&Sd(i),l&512&&Rs(i,i.return);break;case 3:if(Wn(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{uf(e,t)}catch(L){tt(i,i.return,L)}}break;case 27:t===null&&l&4&&xd(i);case 26:case 5:Wn(e,i),t===null&&l&4&&Cd(i),l&512&&Rs(i,i.return);break;case 12:Wn(e,i);break;case 31:Wn(e,i),l&4&&Dd(e,i);break;case 13:Wn(e,i),l&4&&Rd(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Xv.bind(null,i),g0(e,i))));break;case 22:if(l=i.memoizedState!==null||$n,!l){t=t!==null&&t.memoizedState!==null||wt,m=$n;var C=wt;$n=l,(wt=t)&&!C?Kn(e,i,(i.subtreeFlags&8772)!==0):Wn(e,i),$n=m,wt=C}break;case 30:break;default:Wn(e,i)}}function Ad(e){var t=e.alternate;t!==null&&(e.alternate=null,Ad(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ia(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,Gt=!1;function Yn(e,t,i){for(i=i.child;i!==null;)Td(e,t,i),i=i.sibling}function Td(e,t,i){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(Qe,i)}catch{}switch(i.tag){case 26:wt||Rn(i,t),Yn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:wt||Rn(i,t);var l=pt,m=Gt;vi(i.type)&&(pt=i.stateNode,Gt=!1),Yn(e,t,i),Is(i.stateNode),pt=l,Gt=m;break;case 5:wt||Rn(i,t);case 6:if(l=pt,m=Gt,pt=null,Yn(e,t,i),pt=l,Gt=m,pt!==null)if(Gt)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(i.stateNode)}catch(C){tt(i,t,C)}else try{pt.removeChild(i.stateNode)}catch(C){tt(i,t,C)}break;case 18:pt!==null&&(Gt?(e=pt,Sp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),qr(e)):Sp(pt,i.stateNode));break;case 4:l=pt,m=Gt,pt=i.stateNode.containerInfo,Gt=!0,Yn(e,t,i),pt=l,Gt=m;break;case 0:case 11:case 14:case 15:hi(2,i,t),wt||hi(4,i,t),Yn(e,t,i);break;case 1:wt||(Rn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&bd(i,t,l)),Yn(e,t,i);break;case 21:Yn(e,t,i);break;case 22:wt=(l=wt)||i.memoizedState!==null,Yn(e,t,i),wt=l;break;default:Yn(e,t,i)}}function Dd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qr(e)}catch(i){tt(t,t.return,i)}}}function Rd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qr(e)}catch(i){tt(t,t.return,i)}}function Fv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ed),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ed),t;default:throw Error(o(435,e.tag))}}function Kl(e,t){var i=Fv(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var m=Qv.bind(null,e,l);l.then(m,m)}})}function $t(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var m=i[l],C=e,L=t,U=L;e:for(;U!==null;){switch(U.tag){case 27:if(vi(U.type)){pt=U.stateNode,Gt=!1;break e}break;case 5:pt=U.stateNode,Gt=!1;break e;case 3:case 4:pt=U.stateNode.containerInfo,Gt=!0;break e}U=U.return}if(pt===null)throw Error(o(160));Td(C,L,m),pt=null,Gt=!1,C=m.alternate,C!==null&&(C.return=null),m.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Md(t,e),t=t.sibling}var En=null;function Md(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(t,e),Yt(e),l&4&&(hi(3,e,e.return),Ds(3,e),hi(5,e,e.return));break;case 1:$t(t,e),Yt(e),l&512&&(wt||i===null||Rn(i,i.return)),l&64&&$n&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var m=En;if($t(t,e),Yt(e),l&512&&(wt||i===null||Rn(i,i.return)),l&4){var C=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,m=m.ownerDocument||m;t:switch(l){case"title":C=m.getElementsByTagName("title")[0],(!C||C[is]||C[ne]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=m.createElement(l),m.head.insertBefore(C,m.querySelector("head > title"))),Bt(C,l,i),C[ne]=e,At(C),l=C;break e;case"link":var L=Mp("link","href",m).get(l+(i.href||""));if(L){for(var U=0;U<L.length;U++)if(C=L[U],C.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&C.getAttribute("rel")===(i.rel==null?null:i.rel)&&C.getAttribute("title")===(i.title==null?null:i.title)&&C.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){L.splice(U,1);break t}}C=m.createElement(l),Bt(C,l,i),m.head.appendChild(C);break;case"meta":if(L=Mp("meta","content",m).get(l+(i.content||""))){for(U=0;U<L.length;U++)if(C=L[U],C.getAttribute("content")===(i.content==null?null:""+i.content)&&C.getAttribute("name")===(i.name==null?null:i.name)&&C.getAttribute("property")===(i.property==null?null:i.property)&&C.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&C.getAttribute("charset")===(i.charSet==null?null:i.charSet)){L.splice(U,1);break t}}C=m.createElement(l),Bt(C,l,i),m.head.appendChild(C);break;default:throw Error(o(468,l))}C[ne]=e,At(C),l=C}e.stateNode=l}else Lp(m,e.type,e.stateNode);else e.stateNode=Rp(m,l,e.memoizedProps);else C!==l?(C===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):C.count--,l===null?Lp(m,e.type,e.stateNode):Rp(m,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ac(e,e.memoizedProps,i.memoizedProps)}break;case 27:$t(t,e),Yt(e),l&512&&(wt||i===null||Rn(i,i.return)),i!==null&&l&4&&ac(e,e.memoizedProps,i.memoizedProps);break;case 5:if($t(t,e),Yt(e),l&512&&(wt||i===null||Rn(i,i.return)),e.flags&32){m=e.stateNode;try{fr(m,"")}catch(Ee){tt(e,e.return,Ee)}}l&4&&e.stateNode!=null&&(m=e.memoizedProps,ac(e,m,i!==null?i.memoizedProps:m)),l&1024&&(uc=!0);break;case 6:if($t(t,e),Yt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(Ee){tt(e,e.return,Ee)}}break;case 3:if(ha=null,m=En,En=ca(t.containerInfo),$t(t,e),En=m,Yt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{qr(t.containerInfo)}catch(Ee){tt(e,e.return,Ee)}uc&&(uc=!1,Ld(e));break;case 4:l=En,En=ca(e.stateNode.containerInfo),$t(t,e),Yt(e),En=l;break;case 12:$t(t,e),Yt(e);break;case 31:$t(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Kl(e,l)));break;case 13:$t(t,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Ql=Ge()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Kl(e,l)));break;case 22:m=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,se=$n,de=wt;if($n=se||m,wt=de||X,$t(t,e),wt=de,$n=se,Yt(e),l&8192)e:for(t=e.stateNode,t._visibility=m?t._visibility&-2:t._visibility|1,m&&(i===null||X||$n||wt||Wi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(C=X.stateNode,m)L=C.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{U=X.stateNode;var _e=X.memoizedProps.style,le=_e!=null&&_e.hasOwnProperty("display")?_e.display:null;U.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Ee){tt(X,X.return,Ee)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=m?"":X.memoizedProps}catch(Ee){tt(X,X.return,Ee)}}}else if(t.tag===18){if(i===null){X=t;try{var oe=X.stateNode;m?bp(oe,!0):bp(X.stateNode,!1)}catch(Ee){tt(X,X.return,Ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Kl(e,i))));break;case 19:$t(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Kl(e,l)));break;case 30:break;case 21:break;default:$t(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(wd(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var m=i.stateNode,C=oc(e);Wl(e,C,m);break;case 5:var L=i.stateNode;i.flags&32&&(fr(L,""),i.flags&=-33);var U=oc(e);Wl(e,U,L);break;case 3:case 4:var X=i.stateNode.containerInfo,se=oc(e);cc(e,se,X);break;default:throw Error(o(161))}}catch(de){tt(e,e.return,de)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ld(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ld(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kd(e,t.alternate,t),t=t.sibling}function Wi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:hi(4,t,t.return),Wi(t);break;case 1:Rn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&bd(t,t.return,i),Wi(t);break;case 27:Is(t.stateNode);case 26:case 5:Rn(t,t.return),Wi(t);break;case 22:t.memoizedState===null&&Wi(t);break;case 30:Wi(t);break;default:Wi(t)}e=e.sibling}}function Kn(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,m=e,C=t,L=C.flags;switch(C.tag){case 0:case 11:case 15:Kn(m,C,i),Ds(4,C);break;case 1:if(Kn(m,C,i),l=C,m=l.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(se){tt(l,l.return,se)}if(l=C,m=l.updateQueue,m!==null){var U=l.stateNode;try{var X=m.shared.hiddenCallbacks;if(X!==null)for(m.shared.hiddenCallbacks=null,m=0;m<X.length;m++)cf(X[m],U)}catch(se){tt(l,l.return,se)}}i&&L&64&&Sd(C),Rs(C,C.return);break;case 27:xd(C);case 26:case 5:Kn(m,C,i),i&&l===null&&L&4&&Cd(C),Rs(C,C.return);break;case 12:Kn(m,C,i);break;case 31:Kn(m,C,i),i&&L&4&&Dd(m,C);break;case 13:Kn(m,C,i),i&&L&4&&Rd(m,C);break;case 22:C.memoizedState===null&&Kn(m,C,i),Rs(C,C.return);break;case 30:break;default:Kn(m,C,i)}t=t.sibling}}function hc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&gs(i))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e))}function kn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Od(e,t,i,l),t=t.sibling}function Od(e,t,i,l){var m=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,i,l),m&2048&&Ds(9,t);break;case 1:kn(e,t,i,l);break;case 3:kn(e,t,i,l),m&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e)));break;case 12:if(m&2048){kn(e,t,i,l),e=t.stateNode;try{var C=t.memoizedProps,L=C.id,U=C.onPostCommit;typeof U=="function"&&U(L,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){tt(t,t.return,X)}}else kn(e,t,i,l);break;case 31:kn(e,t,i,l);break;case 13:kn(e,t,i,l);break;case 23:break;case 22:C=t.stateNode,L=t.alternate,t.memoizedState!==null?C._visibility&2?kn(e,t,i,l):Ms(e,t):C._visibility&2?kn(e,t,i,l):(C._visibility|=2,Lr(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),m&2048&&hc(L,t);break;case 24:kn(e,t,i,l),m&2048&&fc(t.alternate,t);break;default:kn(e,t,i,l)}}function Lr(e,t,i,l,m){for(m=m&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var C=e,L=t,U=i,X=l,se=L.flags;switch(L.tag){case 0:case 11:case 15:Lr(C,L,U,X,m),Ds(8,L);break;case 23:break;case 22:var de=L.stateNode;L.memoizedState!==null?de._visibility&2?Lr(C,L,U,X,m):Ms(C,L):(de._visibility|=2,Lr(C,L,U,X,m)),m&&se&2048&&hc(L.alternate,L);break;case 24:Lr(C,L,U,X,m),m&&se&2048&&fc(L.alternate,L);break;default:Lr(C,L,U,X,m)}t=t.sibling}}function Ms(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,m=l.flags;switch(l.tag){case 22:Ms(i,l),m&2048&&hc(l.alternate,l);break;case 24:Ms(i,l),m&2048&&fc(l.alternate,l);break;default:Ms(i,l)}t=t.sibling}}var Ls=8192;function Or(e,t,i){if(e.subtreeFlags&Ls)for(e=e.child;e!==null;)Bd(e,t,i),e=e.sibling}function Bd(e,t,i){switch(e.tag){case 26:Or(e,t,i),e.flags&Ls&&e.memoizedState!==null&&T0(i,En,e.memoizedState,e.memoizedProps);break;case 5:Or(e,t,i);break;case 3:case 4:var l=En;En=ca(e.stateNode.containerInfo),Or(e,t,i),En=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ls,Ls=16777216,Or(e,t,i),Ls=l):Or(e,t,i));break;default:Or(e,t,i)}}function Nd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Os(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Tt=l,zd(l,e)}Nd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jd(e),e=e.sibling}function jd(e){switch(e.tag){case 0:case 11:case 15:Os(e),e.flags&2048&&hi(9,e,e.return);break;case 3:Os(e);break;case 12:Os(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xl(e)):Os(e);break;default:Os(e)}}function Xl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Tt=l,zd(l,e)}Nd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:hi(8,t,t.return),Xl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Xl(t));break;default:Xl(t)}e=e.sibling}}function zd(e,t){for(;Tt!==null;){var i=Tt;switch(i.tag){case 0:case 11:case 15:hi(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:gs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Tt=l;else e:for(i=e;Tt!==null;){l=Tt;var m=l.sibling,C=l.return;if(Ad(l),l===i){Tt=null;break e}if(m!==null){m.return=C,Tt=m;break e}Tt=C}}}var qv={getCacheForType:function(e){var t=Lt(St),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Lt(St).controller.signal}},Vv=typeof WeakMap=="function"?WeakMap:Map,Xe=0,lt=null,Ie=null,Fe=0,et=0,sn=null,fi=!1,Br=!1,dc=!1,Xn=0,_t=0,di=0,Ki=0,pc=0,ln=0,Nr=0,Bs=null,Wt=null,mc=!1,Ql=0,Hd=0,Zl=1/0,Jl=null,pi=null,Et=0,mi=null,jr=null,Qn=0,gc=0,_c=null,Id=null,Ns=0,vc=null;function an(){return(Xe&2)!==0&&Fe!==0?Fe&-Fe:G.T!==null?xc():cl()}function Ud(){if(ln===0)if((Fe&536870912)===0||Ve){var e=tr;tr<<=1,(tr&3932160)===0&&(tr=262144),ln=e}else ln=536870912;return e=nn.current,e!==null&&(e.flags|=32),ln}function Kt(e,t,i){(e===lt&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(zr(e,0),gi(e,Fe,ln,!1)),Li(e,i),((Xe&2)===0||e!==lt)&&(e===lt&&((Xe&2)===0&&(Ki|=i),_t===4&&gi(e,Fe,ln,!1)),Mn(e))}function Pd(e,t,i){if((Xe&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Cn(e,t),m=l?Yv(e,t):Sc(e,t,!0),C=l;do{if(m===0){Br&&!l&&gi(e,t,0,!1);break}else{if(i=e.current.alternate,C&&!Gv(i)){m=Sc(e,t,!1),C=!1;continue}if(m===2){if(C=t,e.errorRecoveryDisabledLanes&C)var L=0;else L=e.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){t=L;e:{var U=e;m=Bs;var X=U.current.memoizedState.isDehydrated;if(X&&(zr(U,L).flags|=256),L=Sc(U,L,!1),L!==2){if(dc&&!X){U.errorRecoveryDisabledLanes|=C,Ki|=C,m=4;break e}C=Wt,Wt=m,C!==null&&(Wt===null?Wt=C:Wt.push.apply(Wt,C))}m=L}if(C=!1,m!==2)continue}}if(m===1){zr(e,0),gi(e,t,0,!0);break}e:{switch(l=e,C=m,C){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:gi(l,t,ln,!fi);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(m=Ql+300-Ge(),10<m)){if(gi(l,t,ln,!fi),ir(l,0,!0)!==0)break e;Qn=t,l.timeoutHandle=vp(Fd.bind(null,l,i,Wt,Jl,mc,t,ln,Ki,Nr,fi,C,"Throttled",-0,0),m);break e}Fd(l,i,Wt,Jl,mc,t,ln,Ki,Nr,fi,C,null,-0,0)}}break}while(!0);Mn(e)}function Fd(e,t,i,l,m,C,L,U,X,se,de,_e,le,oe){if(e.timeoutHandle=-1,_e=t.subtreeFlags,_e&8192||(_e&16785408)===16785408){_e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jn},Bd(t,C,_e);var Ee=(C&62914560)===C?Ql-Ge():(C&4194048)===C?Hd-Ge():0;if(Ee=D0(_e,Ee),Ee!==null){Qn=C,e.cancelPendingCommit=Ee(Xd.bind(null,e,t,C,i,l,m,L,U,X,de,_e,null,le,oe)),gi(e,C,L,!se);return}}Xd(e,t,C,i,l,m,L,U,X)}function Gv(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var m=i[l],C=m.getSnapshot;m=m.value;try{if(!en(C(),m))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gi(e,t,i,l){t&=~pc,t&=~Ki,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var m=t;0<m;){var C=31-Je(m),L=1<<C;l[C]=-1,m&=~L}i!==0&&sr(e,i,t)}function ea(){return(Xe&6)===0?(js(0),!1):!0}function yc(){if(Ie!==null){if(et===0)var e=Ie.return;else e=Ie,Un=Ui=null,No(e),Ar=null,vs=0,e=Ie;for(;e!==null;)yd(e.alternate,e),e=e.return;Ie=null}}function zr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,h0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Qn=0,yc(),lt=e,Ie=i=Hn(e.current,null),Fe=t,et=0,sn=null,fi=!1,Br=Cn(e,t),dc=!1,Nr=ln=pc=Ki=di=_t=0,Wt=Bs=null,mc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var m=31-Je(l),C=1<<m;t|=e[m],l&=~C}return Xn=t,bl(),i}function qd(e,t){Ne=null,G.H=ks,t===kr||t===Dl?(t=sf(),et=3):t===wo?(t=sf(),et=4):et=t===Qo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,Ie===null&&(_t=1,ql(e,pn(t,e.current)))}function Vd(){var e=nn.current;return e===null?!0:(Fe&4194048)===Fe?vn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===vn:!1}function Gd(){var e=G.H;return G.H=ks,e===null?ks:e}function $d(){var e=G.A;return G.A=qv,e}function ta(){_t=4,fi||(Fe&4194048)!==Fe&&nn.current!==null||(Br=!0),(di&134217727)===0&&(Ki&134217727)===0||lt===null||gi(lt,Fe,ln,!1)}function Sc(e,t,i){var l=Xe;Xe|=2;var m=Gd(),C=$d();(lt!==e||Fe!==t)&&(Jl=null,zr(e,t)),t=!1;var L=_t;e:do try{if(et!==0&&Ie!==null){var U=Ie,X=sn;switch(et){case 8:yc(),L=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(t=!0);var se=et;if(et=0,sn=null,Hr(e,U,X,se),i&&Br){L=0;break e}break;default:se=et,et=0,sn=null,Hr(e,U,X,se)}}$v(),L=_t;break}catch(de){qd(e,de)}while(!0);return t&&e.shellSuspendCounter++,Un=Ui=null,Xe=l,G.H=m,G.A=C,Ie===null&&(lt=null,Fe=0,bl()),L}function $v(){for(;Ie!==null;)Yd(Ie)}function Yv(e,t){var i=Xe;Xe|=2;var l=Gd(),m=$d();lt!==e||Fe!==t?(Jl=null,Zl=Ge()+500,zr(e,t)):Br=Cn(e,t);e:do try{if(et!==0&&Ie!==null){t=Ie;var C=sn;t:switch(et){case 1:et=0,sn=null,Hr(e,t,C,1);break;case 2:case 9:if(nf(C)){et=0,sn=null,Wd(t);break}t=function(){et!==2&&et!==9||lt!==e||(et=7),Mn(e)},C.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:nf(C)?(et=0,sn=null,Wd(t)):(et=0,sn=null,Hr(e,t,C,7));break;case 5:var L=null;switch(Ie.tag){case 26:L=Ie.memoizedState;case 5:case 27:var U=Ie;if(L?Op(L):U.stateNode.complete){et=0,sn=null;var X=U.sibling;if(X!==null)Ie=X;else{var se=U.return;se!==null?(Ie=se,na(se)):Ie=null}break t}}et=0,sn=null,Hr(e,t,C,5);break;case 6:et=0,sn=null,Hr(e,t,C,6);break;case 8:yc(),_t=6;break e;default:throw Error(o(462))}}Wv();break}catch(de){qd(e,de)}while(!0);return Un=Ui=null,G.H=l,G.A=m,Xe=i,Ie!==null?0:(lt=null,Fe=0,bl(),_t)}function Wv(){for(;Ie!==null&&!Zt();)Yd(Ie)}function Yd(e){var t=_d(e.alternate,e,Xn);e.memoizedProps=e.pendingProps,t===null?na(e):Ie=t}function Wd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=hd(i,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=hd(i,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:No(t);default:yd(i,t),t=Ie=Gh(t,Xn),t=_d(i,t,Xn)}e.memoizedProps=e.pendingProps,t===null?na(e):Ie=t}function Hr(e,t,i,l){Un=Ui=null,No(t),Ar=null,vs=0;var m=t.return;try{if(jv(e,m,t,i,Fe)){_t=1,ql(e,pn(i,e.current)),Ie=null;return}}catch(C){if(m!==null)throw Ie=m,C;_t=1,ql(e,pn(i,e.current)),Ie=null;return}t.flags&32768?(Ve||l===1?e=!0:Br||(Fe&536870912)!==0?e=!1:(fi=e=!0,(l===2||l===9||l===3||l===6)&&(l=nn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Kd(t,e)):na(t)}function na(e){var t=e;do{if((t.flags&32768)!==0){Kd(t,fi);return}e=t.return;var i=Iv(t.alternate,t,Xn);if(i!==null){Ie=i;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);_t===0&&(_t=5)}function Kd(e,t){do{var i=Uv(e.alternate,e);if(i!==null){i.flags&=32767,Ie=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ie=e;return}Ie=e=i}while(e!==null);_t=6,Ie=null}function Xd(e,t,i,l,m,C,L,U,X){e.cancelPendingCommit=null;do ia();while(Et!==0);if((Xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(C=t.lanes|t.childLanes,C|=ao,es(e,i,C,L,U,X),e===lt&&(Ie=lt=null,Fe=0),jr=t,mi=e,Qn=i,gc=C,_c=m,Id=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zv(xe,function(){return tp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,m=$.p,$.p=2,L=Xe,Xe|=4;try{Pv(e,t,i)}finally{Xe=L,$.p=m,G.T=l}}Et=1,Qd(),Zd(),Jd()}}function Qd(){if(Et===1){Et=0;var e=mi,t=jr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var l=$.p;$.p=2;var m=Xe;Xe|=4;try{Md(t,e);var C=Lc,L=jh(e.containerInfo),U=C.focusedElem,X=C.selectionRange;if(L!==U&&U&&U.ownerDocument&&Nh(U.ownerDocument.documentElement,U)){if(X!==null&&no(U)){var se=X.start,de=X.end;if(de===void 0&&(de=se),"selectionStart"in U)U.selectionStart=se,U.selectionEnd=Math.min(de,U.value.length);else{var _e=U.ownerDocument||document,le=_e&&_e.defaultView||window;if(le.getSelection){var oe=le.getSelection(),Ee=U.textContent.length,Oe=Math.min(X.start,Ee),st=X.end===void 0?Oe:Math.min(X.end,Ee);!oe.extend&&Oe>st&&(L=st,st=Oe,Oe=L);var te=Bh(U,Oe),Z=Bh(U,st);if(te&&Z&&(oe.rangeCount!==1||oe.anchorNode!==te.node||oe.anchorOffset!==te.offset||oe.focusNode!==Z.node||oe.focusOffset!==Z.offset)){var re=_e.createRange();re.setStart(te.node,te.offset),oe.removeAllRanges(),Oe>st?(oe.addRange(re),oe.extend(Z.node,Z.offset)):(re.setEnd(Z.node,Z.offset),oe.addRange(re))}}}}for(_e=[],oe=U;oe=oe.parentNode;)oe.nodeType===1&&_e.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<_e.length;U++){var me=_e[U];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}ma=!!Mc,Lc=Mc=null}finally{Xe=m,$.p=l,G.T=i}}e.current=t,Et=2}}function Zd(){if(Et===2){Et=0;var e=mi,t=jr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var l=$.p;$.p=2;var m=Xe;Xe|=4;try{kd(e,t.alternate,t)}finally{Xe=m,$.p=l,G.T=i}}Et=3}}function Jd(){if(Et===4||Et===3){Et=0,mt();var e=mi,t=jr,i=Qn,l=Id;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,jr=mi=null,ep(e,e.pendingLanes));var m=e.pendingLanes;if(m===0&&(pi=null),ns(i),t=t.stateNode,Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(Qe,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=G.T,m=$.p,$.p=2,G.T=null;try{for(var C=e.onRecoverableError,L=0;L<l.length;L++){var U=l[L];C(U.value,{componentStack:U.stack})}}finally{G.T=t,$.p=m}}(Qn&3)!==0&&ia(),Mn(e),m=e.pendingLanes,(i&261930)!==0&&(m&42)!==0?e===vc?Ns++:(Ns=0,vc=e):Ns=0,js(0)}}function ep(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gs(t)))}function ia(){return Qd(),Zd(),Jd(),tp()}function tp(){if(Et!==5)return!1;var e=mi,t=gc;gc=0;var i=ns(Qn),l=G.T,m=$.p;try{$.p=32>i?32:i,G.T=null,i=_c,_c=null;var C=mi,L=Qn;if(Et=0,jr=mi=null,Qn=0,(Xe&6)!==0)throw Error(o(331));var U=Xe;if(Xe|=4,jd(C.current),Od(C,C.current,L,i),Xe=U,js(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(Qe,C)}catch{}return!0}finally{$.p=m,G.T=l,ep(e,t)}}function np(e,t,i){t=pn(i,t),t=Xo(e.stateNode,t,2),e=oi(e,t,2),e!==null&&(Li(e,2),Mn(e))}function tt(e,t,i){if(e.tag===3)np(e,e,i);else for(;t!==null;){if(t.tag===3){np(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(pi===null||!pi.has(l))){e=pn(i,e),i=id(2),l=oi(t,i,2),l!==null&&(rd(i,l,t,e),Li(l,2),Mn(l));break}}t=t.return}}function bc(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new Vv;var m=new Set;l.set(t,m)}else m=l.get(t),m===void 0&&(m=new Set,l.set(t,m));m.has(i)||(dc=!0,m.add(i),e=Kv.bind(null,e,t,i),t.then(e,e))}function Kv(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lt===e&&(Fe&i)===i&&(_t===4||_t===3&&(Fe&62914560)===Fe&&300>Ge()-Ql?(Xe&2)===0&&zr(e,0):pc|=i,Nr===Fe&&(Nr=0)),Mn(e)}function ip(e,t){t===0&&(t=Ri()),e=zi(e,t),e!==null&&(Li(e,t),Mn(e))}function Xv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),ip(e,i)}function Qv(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,m=e.memoizedState;m!==null&&(i=m.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),ip(e,i)}function Zv(e,t){return Ut(e,t)}var ra=null,Ir=null,Cc=!1,sa=!1,wc=!1,_i=0;function Mn(e){e!==Ir&&e.next===null&&(Ir===null?ra=Ir=e:Ir=Ir.next=e),sa=!0,Cc||(Cc=!0,e0())}function js(e,t){if(!wc&&sa){wc=!0;do for(var i=!1,l=ra;l!==null;){if(e!==0){var m=l.pendingLanes;if(m===0)var C=0;else{var L=l.suspendedLanes,U=l.pingedLanes;C=(1<<31-Je(42|e)+1)-1,C&=m&~(L&~U),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(i=!0,ap(l,C))}else C=Fe,C=ir(l,l===lt?C:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(C&3)===0||Cn(l,C)||(i=!0,ap(l,C));l=l.next}while(i);wc=!1}}function Jv(){rp()}function rp(){sa=Cc=!1;var e=0;_i!==0&&u0()&&(e=_i);for(var t=Ge(),i=null,l=ra;l!==null;){var m=l.next,C=sp(l,t);C===0?(l.next=null,i===null?ra=m:i.next=m,m===null&&(Ir=i)):(i=l,(e!==0||(C&3)!==0)&&(sa=!0)),l=m}Et!==0&&Et!==5||js(e),_i!==0&&(_i=0)}function sp(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,m=e.expirationTimes,C=e.pendingLanes&-62914561;0<C;){var L=31-Je(C),U=1<<L,X=m[L];X===-1?((U&i)===0||(U&l)!==0)&&(m[L]=rr(U,t)):X<=t&&(e.expiredLanes|=U),C&=~U}if(t=lt,i=Fe,i=ir(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&qt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Cn(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&qt(l),ns(i)){case 2:case 8:i=ve;break;case 32:i=xe;break;case 268435456:i=De;break;default:i=xe}return l=lp.bind(null,e),i=Ut(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&qt(l),e.callbackPriority=2,e.callbackNode=null,2}function lp(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ia()&&e.callbackNode!==i)return null;var l=Fe;return l=ir(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Pd(e,l,t),sp(e,Ge()),e.callbackNode!=null&&e.callbackNode===i?lp.bind(null,e):null)}function ap(e,t){if(ia())return null;Pd(e,t,!0)}function e0(){f0(function(){(Xe&6)!==0?Ut(fe,Jv):rp()})}function xc(){if(_i===0){var e=xr;e===0&&(e=er,er<<=1,(er&261888)===0&&(er=256)),_i=e}return _i}function op(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:dl(""+e)}function cp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function t0(e,t,i,l,m){if(t==="submit"&&i&&i.stateNode===m){var C=op((m[Se]||null).action),L=l.submitter;L&&(t=(t=L[Se]||null)?op(t.formAction):L.getAttribute("formAction"),t!==null&&(C=t,L=null));var U=new _l("action","action",null,l,m);e.push({event:U,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(_i!==0){var X=L?cp(m,L):new FormData(m);Vo(i,{pending:!0,data:X,method:m.method,action:C},null,X)}}else typeof C=="function"&&(U.preventDefault(),X=L?cp(m,L):new FormData(m),Vo(i,{pending:!0,data:X,method:m.method,action:C},C,X))},currentTarget:m}]})}}for(var Ec=0;Ec<lo.length;Ec++){var kc=lo[Ec],n0=kc.toLowerCase(),i0=kc[0].toUpperCase()+kc.slice(1);xn(n0,"on"+i0)}xn(Ih,"onAnimationEnd"),xn(Uh,"onAnimationIteration"),xn(Ph,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(yv,"onTransitionRun"),xn(Sv,"onTransitionStart"),xn(bv,"onTransitionCancel"),xn(Fh,"onTransitionEnd"),ur("onMouseEnter",["mouseout","mouseover"]),ur("onMouseLeave",["mouseout","mouseover"]),ur("onPointerEnter",["pointerout","pointerover"]),ur("onPointerLeave",["pointerout","pointerover"]),Oi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Oi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Oi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Oi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Oi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Oi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zs="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(" "),r0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zs));function up(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],m=l.event;l=l.listeners;e:{var C=void 0;if(t)for(var L=l.length-1;0<=L;L--){var U=l[L],X=U.instance,se=U.currentTarget;if(U=U.listener,X!==C&&m.isPropagationStopped())break e;C=U,m.currentTarget=se;try{C(m)}catch(de){Sl(de)}m.currentTarget=null,C=X}else for(L=0;L<l.length;L++){if(U=l[L],X=U.instance,se=U.currentTarget,U=U.listener,X!==C&&m.isPropagationStopped())break e;C=U,m.currentTarget=se;try{C(m)}catch(de){Sl(de)}m.currentTarget=null,C=X}}}}function Ue(e,t){var i=t[Nt];i===void 0&&(i=t[Nt]=new Set);var l=e+"__bubble";i.has(l)||(hp(t,e,2,!1),i.add(l))}function Ac(e,t,i){var l=0;t&&(l|=4),hp(i,e,l,t)}var la="_reactListening"+Math.random().toString(36).slice(2);function Tc(e){if(!e[la]){e[la]=!0,ih.forEach(function(i){i!=="selectionchange"&&(r0.has(i)||Ac(i,!1,e),Ac(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[la]||(t[la]=!0,Ac("selectionchange",!1,t))}}function hp(e,t,i,l){switch(Up(t)){case 2:var m=L0;break;case 8:m=O0;break;default:m=qc}i=m.bind(null,t,i,e),m=void 0,!Ya||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(m=!0),l?m!==void 0?e.addEventListener(t,i,{capture:!0,passive:m}):e.addEventListener(t,i,!0):m!==void 0?e.addEventListener(t,i,{passive:m}):e.addEventListener(t,i,!1)}function Dc(e,t,i,l,m){var C=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var L=l.tag;if(L===3||L===4){var U=l.stateNode.containerInfo;if(U===m)break;if(L===4)for(L=l.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===m)return;L=L.return}for(;U!==null;){if(L=ar(U),L===null)return;if(X=L.tag,X===5||X===6||X===26||X===27){l=C=L;continue e}U=U.parentNode}}l=l.return}mh(function(){var se=C,de=Ga(i),_e=[];e:{var le=qh.get(e);if(le!==void 0){var oe=_l,Ee=e;switch(e){case"keypress":if(ml(i)===0)break e;case"keydown":case"keyup":oe=Q_;break;case"focusin":Ee="focus",oe=Qa;break;case"focusout":Ee="blur",oe=Qa;break;case"beforeblur":case"afterblur":oe=Qa;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=I_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=ev;break;case Ih:case Uh:case Ph:oe=F_;break;case Fh:oe=nv;break;case"scroll":case"scrollend":oe=z_;break;case"wheel":oe=rv;break;case"copy":case"cut":case"paste":oe=V_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Sh;break;case"toggle":case"beforetoggle":oe=lv}var Oe=(t&4)!==0,st=!Oe&&(e==="scroll"||e==="scrollend"),te=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var Z=se,re;Z!==null;){var me=Z;if(re=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||re===null||te===null||(me=ss(Z,te),me!=null&&Oe.push(Hs(Z,me,re))),st)break;Z=Z.return}0<Oe.length&&(le=new oe(le,Ee,null,i,de),_e.push({event:le,listeners:Oe}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",le&&i!==Va&&(Ee=i.relatedTarget||i.fromElement)&&(ar(Ee)||Ee[ht]))break e;if((oe||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,oe?(Ee=i.relatedTarget||i.toElement,oe=se,Ee=Ee?ar(Ee):null,Ee!==null&&(st=_(Ee),Oe=Ee.tag,Ee!==st||Oe!==5&&Oe!==27&&Oe!==6)&&(Ee=null)):(oe=null,Ee=se),oe!==Ee)){if(Oe=vh,me="onMouseLeave",te="onMouseEnter",Z="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=Sh,me="onPointerLeave",te="onPointerEnter",Z="pointer"),st=oe==null?le:rs(oe),re=Ee==null?le:rs(Ee),le=new Oe(me,Z+"leave",oe,i,de),le.target=st,le.relatedTarget=re,me=null,ar(de)===se&&(Oe=new Oe(te,Z+"enter",Ee,i,de),Oe.target=re,Oe.relatedTarget=st,me=Oe),st=me,oe&&Ee)t:{for(Oe=s0,te=oe,Z=Ee,re=0,me=te;me;me=Oe(me))re++;me=0;for(var Re=Z;Re;Re=Oe(Re))me++;for(;0<re-me;)te=Oe(te),re--;for(;0<me-re;)Z=Oe(Z),me--;for(;re--;){if(te===Z||Z!==null&&te===Z.alternate){Oe=te;break t}te=Oe(te),Z=Oe(Z)}Oe=null}else Oe=null;oe!==null&&fp(_e,le,oe,Oe,!1),Ee!==null&&st!==null&&fp(_e,st,Ee,Oe,!0)}}e:{if(le=se?rs(se):window,oe=le.nodeName&&le.nodeName.toLowerCase(),oe==="select"||oe==="input"&&le.type==="file")var We=Th;else if(kh(le))if(Dh)We=gv;else{We=pv;var ke=dv}else oe=le.nodeName,!oe||oe.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&qa(se.elementType)&&(We=Th):We=mv;if(We&&(We=We(e,se))){Ah(_e,We,i,de);break e}ke&&ke(e,le,se),e==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Fa(le,"number",le.value)}switch(ke=se?rs(se):window,e){case"focusin":(kh(ke)||ke.contentEditable==="true")&&(gr=ke,io=se,ds=null);break;case"focusout":ds=io=gr=null;break;case"mousedown":ro=!0;break;case"contextmenu":case"mouseup":case"dragend":ro=!1,zh(_e,i,de);break;case"selectionchange":if(vv)break;case"keydown":case"keyup":zh(_e,i,de)}var je;if(Ja)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else mr?xh(e,i)&&(qe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(qe="onCompositionStart");qe&&(bh&&i.locale!=="ko"&&(mr||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&mr&&(je=gh()):(ti=de,Wa="value"in ti?ti.value:ti.textContent,mr=!0)),ke=aa(se,qe),0<ke.length&&(qe=new yh(qe,e,null,i,de),_e.push({event:qe,listeners:ke}),je?qe.data=je:(je=Eh(i),je!==null&&(qe.data=je)))),(je=ov?cv(e,i):uv(e,i))&&(qe=aa(se,"onBeforeInput"),0<qe.length&&(ke=new yh("onBeforeInput","beforeinput",null,i,de),_e.push({event:ke,listeners:qe}),ke.data=je)),t0(_e,e,se,i,de)}up(_e,t)})}function Hs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function aa(e,t){for(var i=t+"Capture",l=[];e!==null;){var m=e,C=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||C===null||(m=ss(e,i),m!=null&&l.unshift(Hs(e,m,C)),m=ss(e,t),m!=null&&l.push(Hs(e,m,C))),e.tag===3)return l;e=e.return}return[]}function s0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fp(e,t,i,l,m){for(var C=t._reactName,L=[];i!==null&&i!==l;){var U=i,X=U.alternate,se=U.stateNode;if(U=U.tag,X!==null&&X===l)break;U!==5&&U!==26&&U!==27||se===null||(X=se,m?(se=ss(i,C),se!=null&&L.unshift(Hs(i,se,X))):m||(se=ss(i,C),se!=null&&L.push(Hs(i,se,X)))),i=i.return}L.length!==0&&e.push({event:t,listeners:L})}var l0=/\r\n?/g,a0=/\u0000|\uFFFD/g;function dp(e){return(typeof e=="string"?e:""+e).replace(l0,`
|
|
49
|
+
`).replace(a0,"")}function pp(e,t){return t=dp(t),dp(e)===t}function rt(e,t,i,l,m,C){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||fr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&fr(e,""+l);break;case"className":hl(e,"class",l);break;case"tabIndex":hl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":hl(e,i,l);break;case"style":dh(e,l,C);break;case"data":if(t!=="object"){hl(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=dl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(i==="formAction"?(t!=="input"&&rt(e,t,"name",m.name,m,null),rt(e,t,"formEncType",m.formEncType,m,null),rt(e,t,"formMethod",m.formMethod,m,null),rt(e,t,"formTarget",m.formTarget,m,null)):(rt(e,t,"encType",m.encType,m,null),rt(e,t,"method",m.method,m,null),rt(e,t,"target",m.target,m,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=dl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=jn);break;case"onScroll":l!=null&&Ue("scroll",e);break;case"onScrollEnd":l!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(m.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=dl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),ul(e,"popover",l);break;case"xlinkActuate":Nn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Nn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Nn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Nn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Nn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Nn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ul(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=N_.get(i)||i,ul(e,i,l))}}function Rc(e,t,i,l,m,C){switch(i){case"style":dh(e,l,C);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(m.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?fr(e,l):(typeof l=="number"||typeof l=="bigint")&&fr(e,""+l);break;case"onScroll":l!=null&&Ue("scroll",e);break;case"onScrollEnd":l!=null&&Ue("scrollend",e);break;case"onClick":l!=null&&(e.onclick=jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(m=i.endsWith("Capture"),t=i.slice(2,m?i.length-7:void 0),C=e[Se]||null,C=C!=null?C[i]:null,typeof C=="function"&&e.removeEventListener(t,C,m),typeof l=="function")){typeof C!="function"&&C!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,m);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):ul(e,i,l)}}}function Bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var l=!1,m=!1,C;for(C in i)if(i.hasOwnProperty(C)){var L=i[C];if(L!=null)switch(C){case"src":l=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,C,L,i,null)}}m&&rt(e,t,"srcSet",i.srcSet,i,null),l&&rt(e,t,"src",i.src,i,null);return;case"input":Ue("invalid",e);var U=C=L=m=null,X=null,se=null;for(l in i)if(i.hasOwnProperty(l)){var de=i[l];if(de!=null)switch(l){case"name":m=de;break;case"type":L=de;break;case"checked":X=de;break;case"defaultChecked":se=de;break;case"value":C=de;break;case"defaultValue":U=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:rt(e,t,l,de,i,null)}}ch(e,C,U,X,se,L,m,!1);return;case"select":Ue("invalid",e),l=L=C=null;for(m in i)if(i.hasOwnProperty(m)&&(U=i[m],U!=null))switch(m){case"value":C=U;break;case"defaultValue":L=U;break;case"multiple":l=U;default:rt(e,t,m,U,i,null)}t=C,i=L,e.multiple=!!l,t!=null?hr(e,!!l,t,!1):i!=null&&hr(e,!!l,i,!0);return;case"textarea":Ue("invalid",e),C=m=l=null;for(L in i)if(i.hasOwnProperty(L)&&(U=i[L],U!=null))switch(L){case"value":l=U;break;case"defaultValue":m=U;break;case"children":C=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:rt(e,t,L,U,i,null)}hh(e,l,m,C);return;case"option":for(X in i)if(i.hasOwnProperty(X)&&(l=i[X],l!=null))switch(X){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:rt(e,t,X,l,i,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(l=0;l<zs.length;l++)Ue(zs[l],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in i)if(i.hasOwnProperty(se)&&(l=i[se],l!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,se,l,i,null)}return;default:if(qa(t)){for(de in i)i.hasOwnProperty(de)&&(l=i[de],l!==void 0&&Rc(e,t,de,l,i,void 0));return}}for(U in i)i.hasOwnProperty(U)&&(l=i[U],l!=null&&rt(e,t,U,l,i,null))}function o0(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,C=null,L=null,U=null,X=null,se=null,de=null;for(oe in i){var _e=i[oe];if(i.hasOwnProperty(oe)&&_e!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=_e;default:l.hasOwnProperty(oe)||rt(e,t,oe,null,l,_e)}}for(var le in l){var oe=l[le];if(_e=i[le],l.hasOwnProperty(le)&&(oe!=null||_e!=null))switch(le){case"type":C=oe;break;case"name":m=oe;break;case"checked":se=oe;break;case"defaultChecked":de=oe;break;case"value":L=oe;break;case"defaultValue":U=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:oe!==_e&&rt(e,t,le,oe,l,_e)}}Pa(e,L,U,X,se,de,C,m);return;case"select":oe=L=U=le=null;for(C in i)if(X=i[C],i.hasOwnProperty(C)&&X!=null)switch(C){case"value":break;case"multiple":oe=X;default:l.hasOwnProperty(C)||rt(e,t,C,null,l,X)}for(m in l)if(C=l[m],X=i[m],l.hasOwnProperty(m)&&(C!=null||X!=null))switch(m){case"value":le=C;break;case"defaultValue":U=C;break;case"multiple":L=C;default:C!==X&&rt(e,t,m,C,l,X)}t=U,i=L,l=oe,le!=null?hr(e,!!i,le,!1):!!l!=!!i&&(t!=null?hr(e,!!i,t,!0):hr(e,!!i,i?[]:"",!1));return;case"textarea":oe=le=null;for(U in i)if(m=i[U],i.hasOwnProperty(U)&&m!=null&&!l.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:rt(e,t,U,null,l,m)}for(L in l)if(m=l[L],C=i[L],l.hasOwnProperty(L)&&(m!=null||C!=null))switch(L){case"value":le=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==C&&rt(e,t,L,m,l,C)}uh(e,le,oe);return;case"option":for(var Ee in i)if(le=i[Ee],i.hasOwnProperty(Ee)&&le!=null&&!l.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:rt(e,t,Ee,null,l,le)}for(X in l)if(le=l[X],oe=i[X],l.hasOwnProperty(X)&&le!==oe&&(le!=null||oe!=null))switch(X){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:rt(e,t,X,le,l,oe)}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 Oe in i)le=i[Oe],i.hasOwnProperty(Oe)&&le!=null&&!l.hasOwnProperty(Oe)&&rt(e,t,Oe,null,l,le);for(se in l)if(le=l[se],oe=i[se],l.hasOwnProperty(se)&&le!==oe&&(le!=null||oe!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:rt(e,t,se,le,l,oe)}return;default:if(qa(t)){for(var st in i)le=i[st],i.hasOwnProperty(st)&&le!==void 0&&!l.hasOwnProperty(st)&&Rc(e,t,st,void 0,l,le);for(de in l)le=l[de],oe=i[de],!l.hasOwnProperty(de)||le===oe||le===void 0&&oe===void 0||Rc(e,t,de,le,l,oe);return}}for(var te in i)le=i[te],i.hasOwnProperty(te)&&le!=null&&!l.hasOwnProperty(te)&&rt(e,t,te,null,l,le);for(_e in l)le=l[_e],oe=i[_e],!l.hasOwnProperty(_e)||le===oe||le==null&&oe==null||rt(e,t,_e,le,l,oe)}function mp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function c0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var m=i[l],C=m.transferSize,L=m.initiatorType,U=m.duration;if(C&&U&&mp(L)){for(L=0,U=m.responseEnd,l+=1;l<i.length;l++){var X=i[l],se=X.startTime;if(se>U)break;var de=X.transferSize,_e=X.initiatorType;de&&mp(_e)&&(X=X.responseEnd,L+=de*(X<U?1:(U-se)/(X-se)))}if(--l,t+=8*(C+L)/(m.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Mc=null,Lc=null;function oa(e){return e.nodeType===9?e:e.ownerDocument}function gp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _p(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Oc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bc=null;function u0(){var e=window.event;return e&&e.type==="popstate"?e===Bc?!1:(Bc=e,!0):(Bc=null,!1)}var vp=typeof setTimeout=="function"?setTimeout:void 0,h0=typeof clearTimeout=="function"?clearTimeout:void 0,yp=typeof Promise=="function"?Promise:void 0,f0=typeof queueMicrotask=="function"?queueMicrotask:typeof yp<"u"?function(e){return yp.resolve(null).then(e).catch(d0)}:vp;function d0(e){setTimeout(function(){throw e})}function vi(e){return e==="head"}function Sp(e,t){var i=t,l=0;do{var m=i.nextSibling;if(e.removeChild(i),m&&m.nodeType===8)if(i=m.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(m),qr(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Is(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Is(i);for(var C=i.firstChild;C;){var L=C.nextSibling,U=C.nodeName;C[is]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&C.rel.toLowerCase()==="stylesheet"||i.removeChild(C),C=L}}else i==="body"&&Is(e.ownerDocument.body);i=m}while(i);qr(t)}function bp(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Nc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Nc(i),Ia(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function p0(e,t,i,l){for(;e.nodeType===1;){var m=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[is])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(C=e.getAttribute("rel"),C==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(C!==m.rel||e.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||e.getAttribute("title")!==(m.title==null?null:m.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(C=e.getAttribute("src"),(C!==(m.src==null?null:m.src)||e.getAttribute("type")!==(m.type==null?null:m.type)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&C&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var C=m.name==null?null:""+m.name;if(m.type==="hidden"&&e.getAttribute("name")===C)return e}else return e;if(e=yn(e.nextSibling),e===null)break}return null}function m0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=yn(e.nextSibling),e===null))return null;return e}function Cp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=yn(e.nextSibling),e===null))return null;return e}function jc(e){return e.data==="$?"||e.data==="$~"}function zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function g0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hc=null;function wp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return yn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function xp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Ep(e,t,i){switch(t=oa(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Is(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ia(e)}var Sn=new Map,kp=new Set;function ca(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zn=$.d;$.d={f:_0,r:v0,D:y0,C:S0,L:b0,m:C0,X:x0,S:w0,M:E0};function _0(){var e=Zn.f(),t=ea();return e||t}function v0(e){var t=or(e);t!==null&&t.tag===5&&t.type==="form"?qf(t):Zn.r(e)}var Ur=typeof document>"u"?null:document;function Ap(e,t,i){var l=Ur;if(l&&typeof t=="string"&&t){var m=fn(t);m='link[rel="'+e+'"][href="'+m+'"]',typeof i=="string"&&(m+='[crossorigin="'+i+'"]'),kp.has(m)||(kp.add(m),e={rel:e,crossOrigin:i,href:t},l.querySelector(m)===null&&(t=l.createElement("link"),Bt(t,"link",e),At(t),l.head.appendChild(t)))}}function y0(e){Zn.D(e),Ap("dns-prefetch",e,null)}function S0(e,t){Zn.C(e,t),Ap("preconnect",e,t)}function b0(e,t,i){Zn.L(e,t,i);var l=Ur;if(l&&e&&t){var m='link[rel="preload"][as="'+fn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(m+='[imagesrcset="'+fn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(m+='[imagesizes="'+fn(i.imageSizes)+'"]')):m+='[href="'+fn(e)+'"]';var C=m;switch(t){case"style":C=Pr(e);break;case"script":C=Fr(e)}Sn.has(C)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Sn.set(C,e),l.querySelector(m)!==null||t==="style"&&l.querySelector(Us(C))||t==="script"&&l.querySelector(Ps(C))||(t=l.createElement("link"),Bt(t,"link",e),At(t),l.head.appendChild(t)))}}function C0(e,t){Zn.m(e,t);var i=Ur;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",m='link[rel="modulepreload"][as="'+fn(l)+'"][href="'+fn(e)+'"]',C=m;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=Fr(e)}if(!Sn.has(C)&&(e=u({rel:"modulepreload",href:e},t),Sn.set(C,e),i.querySelector(m)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ps(C)))return}l=i.createElement("link"),Bt(l,"link",e),At(l),i.head.appendChild(l)}}}function w0(e,t,i){Zn.S(e,t,i);var l=Ur;if(l&&e){var m=cr(l).hoistableStyles,C=Pr(e);t=t||"default";var L=m.get(C);if(!L){var U={loading:0,preload:null};if(L=l.querySelector(Us(C)))U.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Sn.get(C))&&Ic(e,i);var X=L=l.createElement("link");At(X),Bt(X,"link",e),X._p=new Promise(function(se,de){X.onload=se,X.onerror=de}),X.addEventListener("load",function(){U.loading|=1}),X.addEventListener("error",function(){U.loading|=2}),U.loading|=4,ua(L,t,l)}L={type:"stylesheet",instance:L,count:1,state:U},m.set(C,L)}}}function x0(e,t){Zn.X(e,t);var i=Ur;if(i&&e){var l=cr(i).hoistableScripts,m=Fr(e),C=l.get(m);C||(C=i.querySelector(Ps(m)),C||(e=u({src:e,async:!0},t),(t=Sn.get(m))&&Uc(e,t),C=i.createElement("script"),At(C),Bt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(m,C))}}function E0(e,t){Zn.M(e,t);var i=Ur;if(i&&e){var l=cr(i).hoistableScripts,m=Fr(e),C=l.get(m);C||(C=i.querySelector(Ps(m)),C||(e=u({src:e,async:!0,type:"module"},t),(t=Sn.get(m))&&Uc(e,t),C=i.createElement("script"),At(C),Bt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(m,C))}}function Tp(e,t,i,l){var m=(m=ge.current)?ca(m):null;if(!m)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Pr(i.href),i=cr(m).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Pr(i.href);var C=cr(m).hoistableStyles,L=C.get(e);if(L||(m=m.ownerDocument||m,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(e,L),(C=m.querySelector(Us(e)))&&!C._p&&(L.instance=C,L.state.loading=5),Sn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Sn.set(e,i),C||k0(m,e,i,L.state))),t&&l===null)throw Error(o(528,""));return L}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Fr(i),i=cr(m).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Pr(e){return'href="'+fn(e)+'"'}function Us(e){return'link[rel="stylesheet"]['+e+"]"}function Dp(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function k0(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Bt(t,"link",i),At(t),e.head.appendChild(t))}function Fr(e){return'[src="'+fn(e)+'"]'}function Ps(e){return"script[async]"+e}function Rp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+fn(i.href)+'"]');if(l)return t.instance=l,At(l),l;var m=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),At(l),Bt(l,"style",m),ua(l,i.precedence,e),t.instance=l;case"stylesheet":m=Pr(i.href);var C=e.querySelector(Us(m));if(C)return t.state.loading|=4,t.instance=C,At(C),C;l=Dp(i),(m=Sn.get(m))&&Ic(l,m),C=(e.ownerDocument||e).createElement("link"),At(C);var L=C;return L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Bt(C,"link",l),t.state.loading|=4,ua(C,i.precedence,e),t.instance=C;case"script":return C=Fr(i.src),(m=e.querySelector(Ps(C)))?(t.instance=m,At(m),m):(l=i,(m=Sn.get(C))&&(l=u({},i),Uc(l,m)),e=e.ownerDocument||e,m=e.createElement("script"),At(m),Bt(m,"link",l),e.head.appendChild(m),t.instance=m);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ua(l,i.precedence,e));return t.instance}function ua(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=l.length?l[l.length-1]:null,C=m,L=0;L<l.length;L++){var U=l[L];if(U.dataset.precedence===t)C=U;else if(C!==m)break}C?C.parentNode.insertBefore(e,C.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ic(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ha=null;function Mp(e,t,i){if(ha===null){var l=new Map,m=ha=new Map;m.set(i,l)}else m=ha,l=m.get(i),l||(l=new Map,m.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),m=0;m<i.length;m++){var C=i[m];if(!(C[is]||C[ne]||e==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var L=C.getAttribute(t)||"";L=e+L;var U=l.get(L);U?U.push(C):l.set(L,[C])}}return l}function Lp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function A0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Op(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function T0(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var m=Pr(l.href),C=t.querySelector(Us(m));if(C){t=C._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fa.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=C,At(C);return}C=t.ownerDocument||t,l=Dp(l),(m=Sn.get(m))&&Ic(l,m),C=C.createElement("link"),At(C);var L=C;L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Bt(C,"link",l),i.instance=C}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=fa.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Pc=0;function D0(e,t){return e.stylesheets&&e.count===0&&pa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&pa(e,e.stylesheets),e.unsuspend){var C=e.unsuspend;e.unsuspend=null,C()}},6e4+t);0<e.imgBytes&&Pc===0&&(Pc=62500*c0());var m=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pa(e,e.stylesheets),e.unsuspend)){var C=e.unsuspend;e.unsuspend=null,C()}},(e.imgBytes>Pc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(m)}}:null}function fa(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var da=null;function pa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,da=new Map,t.forEach(R0,e),da=null,fa.call(e))}function R0(e,t){if(!(t.state.loading&4)){var i=da.get(e);if(i)var l=i.get(null);else{i=new Map,da.set(e,i);for(var m=e.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<m.length;C++){var L=m[C];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(i.set(L.dataset.precedence,L),l=L)}l&&i.set(null,l)}m=t.instance,L=m.getAttribute("data-precedence"),C=i.get(L)||l,C===l&&i.set(null,m),i.set(L,m),this.count++,l=fa.bind(this),m.addEventListener("load",l),m.addEventListener("error",l),C?C.parentNode.insertBefore(m,C.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(m,e.firstChild)),t.state.loading|=4}}var Fs={$$typeof:y,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function M0(e,t,i,l,m,C,L,U,X){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mi(0),this.hiddenUpdates=Mi(null),this.identifierPrefix=l,this.onUncaughtError=m,this.onCaughtError=C,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Bp(e,t,i,l,m,C,L,U,X,se,de,_e){return e=new M0(e,t,i,L,X,se,de,_e,U),t=1,C===!0&&(t|=24),C=tn(3,null,null,t),e.current=C,C.stateNode=e,t=So(),t.refCount++,e.pooledCache=t,t.refCount++,C.memoizedState={element:l,isDehydrated:i,cache:t},xo(C),e}function Np(e){return e?(e=yr,e):yr}function jp(e,t,i,l,m,C){m=Np(m),l.context===null?l.context=m:l.pendingContext=m,l=ai(t),l.payload={element:i},C=C===void 0?null:C,C!==null&&(l.callback=C),i=oi(e,l,t),i!==null&&(Kt(i,e,t),Ss(i,e,t))}function zp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Fc(e,t){zp(e,t),(e=e.alternate)&&zp(e,t)}function Hp(e){if(e.tag===13||e.tag===31){var t=zi(e,67108864);t!==null&&Kt(t,e,67108864),Fc(e,67108864)}}function Ip(e){if(e.tag===13||e.tag===31){var t=an();t=ts(t);var i=zi(e,t);i!==null&&Kt(i,e,t),Fc(e,t)}}var ma=!0;function L0(e,t,i,l){var m=G.T;G.T=null;var C=$.p;try{$.p=2,qc(e,t,i,l)}finally{$.p=C,G.T=m}}function O0(e,t,i,l){var m=G.T;G.T=null;var C=$.p;try{$.p=8,qc(e,t,i,l)}finally{$.p=C,G.T=m}}function qc(e,t,i,l){if(ma){var m=Vc(l);if(m===null)Dc(e,t,l,ga,i),Pp(e,l);else if(N0(m,e,t,i,l))l.stopPropagation();else if(Pp(e,l),t&4&&-1<B0.indexOf(e)){for(;m!==null;){var C=or(m);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var L=Bn(C.pendingLanes);if(L!==0){var U=C;for(U.pendingLanes|=2,U.entangledLanes|=2;L;){var X=1<<31-Je(L);U.entanglements[1]|=X,L&=~X}Mn(C),(Xe&6)===0&&(Zl=Ge()+500,js(0))}}break;case 31:case 13:U=zi(C,2),U!==null&&Kt(U,C,2),ea(),Fc(C,2)}if(C=Vc(l),C===null&&Dc(e,t,l,ga,i),C===m)break;m=C}m!==null&&l.stopPropagation()}else Dc(e,t,l,null,i)}}function Vc(e){return e=Ga(e),Gc(e)}var ga=null;function Gc(e){if(ga=null,e=ar(e),e!==null){var t=_(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=a(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ga=e,null}function Up(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ut()){case fe:return 2;case ve:return 8;case xe:case ae:return 32;case De:return 268435456;default:return 32}default:return 32}}var $c=!1,yi=null,Si=null,bi=null,qs=new Map,Vs=new Map,Ci=[],B0="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 Pp(e,t){switch(e){case"focusin":case"focusout":yi=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(t.pointerId)}}function Gs(e,t,i,l,m,C){return e===null||e.nativeEvent!==C?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:C,targetContainers:[m]},t!==null&&(t=or(t),t!==null&&Hp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,m!==null&&t.indexOf(m)===-1&&t.push(m),e)}function N0(e,t,i,l,m){switch(t){case"focusin":return yi=Gs(yi,e,t,i,l,m),!0;case"dragenter":return Si=Gs(Si,e,t,i,l,m),!0;case"mouseover":return bi=Gs(bi,e,t,i,l,m),!0;case"pointerover":var C=m.pointerId;return qs.set(C,Gs(qs.get(C)||null,e,t,i,l,m)),!0;case"gotpointercapture":return C=m.pointerId,Vs.set(C,Gs(Vs.get(C)||null,e,t,i,l,m)),!0}return!1}function Fp(e){var t=ar(e.target);if(t!==null){var i=_(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,lr(e.priority,function(){Ip(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,lr(e.priority,function(){Ip(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _a(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Vc(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Va=l,i.target.dispatchEvent(l),Va=null}else return t=or(i),t!==null&&Hp(t),e.blockedOn=i,!1;t.shift()}return!0}function qp(e,t,i){_a(e)&&i.delete(t)}function j0(){$c=!1,yi!==null&&_a(yi)&&(yi=null),Si!==null&&_a(Si)&&(Si=null),bi!==null&&_a(bi)&&(bi=null),qs.forEach(qp),Vs.forEach(qp)}function va(e,t){e.blockedOn===t&&(e.blockedOn=null,$c||($c=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,j0)))}var ya=null;function Vp(e){ya!==e&&(ya=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ya===e&&(ya=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],m=e[t+2];if(typeof l!="function"){if(Gc(l||i)===null)continue;break}var C=or(i);C!==null&&(e.splice(t,3),t-=3,Vo(C,{pending:!0,data:m,method:i.method,action:l},l,m))}}))}function qr(e){function t(X){return va(X,e)}yi!==null&&va(yi,e),Si!==null&&va(Si,e),bi!==null&&va(bi,e),qs.forEach(t),Vs.forEach(t);for(var i=0;i<Ci.length;i++){var l=Ci[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ci.length&&(i=Ci[0],i.blockedOn===null);)Fp(i),i.blockedOn===null&&Ci.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var m=i[l],C=i[l+1],L=m[Se]||null;if(typeof C=="function")L||Vp(i);else if(L){var U=null;if(C&&C.hasAttribute("formAction")){if(m=C,L=C[Se]||null)U=L.formAction;else if(Gc(m)!==null)continue}else U=L.action;typeof U=="function"?i[l+1]=U:(i.splice(l,3),l-=3),Vp(i)}}}function Gp(){function e(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(L){return m=L})},focusReset:"manual",scroll:"manual"})}function t(){m!==null&&(m(),m=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,m=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),m!==null&&(m(),m=null)}}}function Yc(e){this._internalRoot=e}Sa.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=an();jp(i,l,e,t,null,null)},Sa.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jp(e.current,2,null,e,null,null),ea(),t[ht]=null}};function Sa(e){this._internalRoot=e}Sa.prototype.unstable_scheduleHydration=function(e){if(e){var t=cl();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ci.length&&t!==0&&t<Ci[i].priority;i++);Ci.splice(i,0,e),i===0&&Fp(e)}};var $p=r.version;if($p!=="19.2.6")throw Error(o(527,$p,"19.2.6"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var z0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ba.isDisabled&&ba.supportsFiber)try{Qe=ba.inject(z0),Ze=ba}catch{}}return Ys.createRoot=function(e,t){if(!p(e))throw Error(o(299));var i=!1,l="",m=Jf,C=ed,L=td;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(m=t.onUncaughtError),t.onCaughtError!==void 0&&(C=t.onCaughtError),t.onRecoverableError!==void 0&&(L=t.onRecoverableError)),t=Bp(e,1,!1,null,null,i,l,null,m,C,L,Gp),e[ht]=t.current,Tc(e),new Yc(t)},Ys.hydrateRoot=function(e,t,i){if(!p(e))throw Error(o(299));var l=!1,m="",C=Jf,L=ed,U=td,X=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(m=i.identifierPrefix),i.onUncaughtError!==void 0&&(C=i.onUncaughtError),i.onCaughtError!==void 0&&(L=i.onCaughtError),i.onRecoverableError!==void 0&&(U=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=Bp(e,1,!0,t,i??null,l,m,X,C,L,U,Gp),t.context=Np(null),i=t.current,l=an(),l=ts(l),m=ai(l),m.callback=null,oi(i,m,l),i=l,t.current.lanes=i,Li(t,i),Mn(t),e[ht]=t.current,Tc(e),new Sa(t)},Ys.version="19.2.6",Ys}var im;function K0(){if(im)return Xc.exports;im=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Xc.exports=W0(),Xc.exports}var X0=K0();const Qr=function(n,r){let p=n;const _=Zs[r];let f=null,a=0,c=null;const h=[],d={},u=function(T,E){a=p*4+17,f=(function(R){const N=new Array(R);for(let I=0;I<R;I+=1){N[I]=new Array(R);for(let P=0;P<R;P+=1)N[I][P]=null}return N})(a),b(0,0),b(a-7,0),b(0,a-7),x(),k(),v(T,E),p>=7&&S(T),c==null&&(c=A(p,_,h)),g(c,E)},b=function(T,E){for(let R=-1;R<=7;R+=1)if(!(T+R<=-1||a<=T+R))for(let N=-1;N<=7;N+=1)E+N<=-1||a<=E+N||(0<=R&&R<=6&&(N==0||N==6)||0<=N&&N<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=N&&N<=4?f[T+R][E+N]=!0:f[T+R][E+N]=!1)},w=function(){let T=0,E=0;for(let R=0;R<8;R+=1){u(!0,R);const N=Ei.getLostPoint(d);(R==0||T>N)&&(T=N,E=R)}return E},k=function(){for(let T=8;T<a-8;T+=1)f[T][6]==null&&(f[T][6]=T%2==0);for(let T=8;T<a-8;T+=1)f[6][T]==null&&(f[6][T]=T%2==0)},x=function(){const T=Ei.getPatternPosition(p);for(let E=0;E<T.length;E+=1)for(let R=0;R<T.length;R+=1){const N=T[E],I=T[R];if(f[N][I]==null)for(let P=-2;P<=2;P+=1)for(let F=-2;F<=2;F+=1)P==-2||P==2||F==-2||F==2||P==0&&F==0?f[N+P][I+F]=!0:f[N+P][I+F]=!1}},S=function(T){const E=Ei.getBCHTypeNumber(p);for(let R=0;R<18;R+=1){const N=!T&&(E>>R&1)==1;f[Math.floor(R/3)][R%3+a-8-3]=N}for(let R=0;R<18;R+=1){const N=!T&&(E>>R&1)==1;f[R%3+a-8-3][Math.floor(R/3)]=N}},v=function(T,E){const R=_<<3|E,N=Ei.getBCHTypeInfo(R);for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<6?f[I][8]=P:I<8?f[I+1][8]=P:f[a-15+I][8]=P}for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<8?f[8][a-I-1]=P:I<9?f[8][15-I-1+1]=P:f[8][15-I-1]=P}f[a-8][8]=!T},g=function(T,E){let R=-1,N=a-1,I=7,P=0;const F=Ei.getMaskFunction(E);for(let Y=a-1;Y>0;Y-=2)for(Y==6&&(Y-=1);;){for(let K=0;K<2;K+=1)if(f[N][Y-K]==null){let G=!1;P<T.length&&(G=(T[P]>>>I&1)==1),F(N,Y-K)&&(G=!G),f[N][Y-K]=G,I-=1,I==-1&&(P+=1,I=7)}if(N+=R,N<0||a<=N){N-=R,R=-R;break}}},y=function(T,E){let R=0,N=0,I=0;const P=new Array(E.length),F=new Array(E.length);for(let $=0;$<E.length;$+=1){const Q=E[$].dataCount,H=E[$].totalCount-Q;N=Math.max(N,Q),I=Math.max(I,H),P[$]=new Array(Q);for(let j=0;j<P[$].length;j+=1)P[$][j]=255&T.getBuffer()[j+R];R+=Q;const O=Ei.getErrorCorrectPolynomial(H),V=nl(P[$],O.getLength()-1).mod(O);F[$]=new Array(O.getLength()-1);for(let j=0;j<F[$].length;j+=1){const ee=j+V.getLength()-F[$].length;F[$][j]=ee>=0?V.getAt(ee):0}}let Y=0;for(let $=0;$<E.length;$+=1)Y+=E[$].totalCount;const K=new Array(Y);let G=0;for(let $=0;$<N;$+=1)for(let Q=0;Q<E.length;Q+=1)$<P[Q].length&&(K[G]=P[Q][$],G+=1);for(let $=0;$<I;$+=1)for(let Q=0;Q<E.length;Q+=1)$<F[Q].length&&(K[G]=F[Q][$],G+=1);return K},A=function(T,E,R){const N=rm.getRSBlocks(T,E),I=sm();for(let F=0;F<R.length;F+=1){const Y=R[F];I.put(Y.getMode(),4),I.put(Y.getLength(),Ei.getLengthInBits(Y.getMode(),T)),Y.write(I)}let P=0;for(let F=0;F<N.length;F+=1)P+=N[F].dataCount;if(I.getLengthInBits()>P*8)throw"code length overflow. ("+I.getLengthInBits()+">"+P*8+")";for(I.getLengthInBits()+4<=P*8&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=P*8||(I.put(236,8),I.getLengthInBits()>=P*8));)I.put(17,8);return y(I,N)};d.addData=function(T,E){E=E||"Byte";let R=null;switch(E){case"Numeric":R=Q0(T);break;case"Alphanumeric":R=Z0(T);break;case"Byte":R=J0(T);break;case"Kanji":R=e1(T);break;default:throw"mode:"+E}h.push(R),c=null},d.isDark=function(T,E){if(T<0||a<=T||E<0||a<=E)throw T+","+E;return f[T][E]},d.getModuleCount=function(){return a},d.make=function(){if(p<1){let T=1;for(;T<40;T++){const E=rm.getRSBlocks(T,_),R=sm();for(let I=0;I<h.length;I++){const P=h[I];R.put(P.getMode(),4),R.put(P.getLength(),Ei.getLengthInBits(P.getMode(),T)),P.write(R)}let N=0;for(let I=0;I<E.length;I++)N+=E[I].dataCount;if(R.getLengthInBits()<=N*8)break}p=T}u(!1,w())},d.createTableTag=function(T,E){T=T||2,E=typeof E>"u"?T*4:E;let R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+E+"px;",R+='">',R+="<tbody>";for(let N=0;N<d.getModuleCount();N+=1){R+="<tr>";for(let I=0;I<d.getModuleCount();I+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+T+"px;",R+=" height: "+T+"px;",R+=" background-color: ",R+=d.isDark(N,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return R+="</tbody>",R+="</table>",R},d.createSvgTag=function(T,E,R,N){let I={};typeof arguments[0]=="object"&&(I=arguments[0],T=I.cellSize,E=I.margin,R=I.alt,N=I.title),T=T||2,E=typeof E>"u"?T*4:E,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,N=typeof N=="string"?{text:N}:N||{},N.text=N.text||null,N.id=N.text?N.id||"qrcode-title":null;const P=d.getModuleCount()*T+E*2;let F,Y,K,G,$="",Q;for(Q="l"+T+",0 0,"+T+" -"+T+",0 0,-"+T+"z ",$+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',$+=I.scalable?"":' width="'+P+'px" height="'+P+'px"',$+=' viewBox="0 0 '+P+" "+P+'" ',$+=' preserveAspectRatio="xMinYMin meet"',$+=N.text||R.text?' role="img" aria-labelledby="'+M([N.id,R.id].join(" ").trim())+'"':"",$+=">",$+=N.text?'<title id="'+M(N.id)+'">'+M(N.text)+"</title>":"",$+=R.text?'<description id="'+M(R.id)+'">'+M(R.text)+"</description>":"",$+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',$+='<path d="',K=0;K<d.getModuleCount();K+=1)for(G=K*T+E,F=0;F<d.getModuleCount();F+=1)d.isDark(K,F)&&(Y=F*T+E,$+="M"+Y+","+G+Q);return $+='" stroke="transparent" fill="black"/>',$+="</svg>",$},d.createDataURL=function(T,E){T=T||2,E=typeof E>"u"?T*4:E;const R=d.getModuleCount()*T+E*2,N=E,I=R-E;return r1(R,R,function(P,F){if(N<=P&&P<I&&N<=F&&F<I){const Y=Math.floor((P-N)/T),K=Math.floor((F-N)/T);return d.isDark(K,Y)?0:1}else return 1})},d.createImgTag=function(T,E,R){T=T||2,E=typeof E>"u"?T*4:E;const N=d.getModuleCount()*T+E*2;let I="";return I+="<img",I+=' src="',I+=d.createDataURL(T,E),I+='"',I+=' width="',I+=N,I+='"',I+=' height="',I+=N,I+='"',R&&(I+=' alt="',I+=M(R),I+='"'),I+="/>",I};const M=function(T){let E="";for(let R=0;R<T.length;R+=1){const N=T.charAt(R);switch(N){case"<":E+="<";break;case">":E+=">";break;case"&":E+="&";break;case'"':E+=""";break;default:E+=N;break}}return E},D=function(T){T=typeof T>"u"?2:T;const R=d.getModuleCount()*1+T*2,N=T,I=R-T;let P,F,Y,K,G;const $={"██":"█","█ ":"▀"," █":"▄"," ":" "},Q={"██":"▀","█ ":"▀"," █":" "," ":" "};let H="";for(P=0;P<R;P+=2){for(Y=Math.floor((P-N)/1),K=Math.floor((P+1-N)/1),F=0;F<R;F+=1)G="█",N<=F&&F<I&&N<=P&&P<I&&d.isDark(Y,Math.floor((F-N)/1))&&(G=" "),N<=F&&F<I&&N<=P+1&&P+1<I&&d.isDark(K,Math.floor((F-N)/1))?G+=" ":G+="█",H+=T<1&&P+1>=I?Q[G]:$[G];H+=`
|
|
50
|
+
`}return R%2&&T>0?H.substring(0,H.length-R-1)+Array(R+1).join("▀"):H.substring(0,H.length-1)};return d.createASCII=function(T,E){if(T=T||1,T<2)return D(E);T-=1,E=typeof E>"u"?T*2:E;const R=d.getModuleCount()*T+E*2,N=E,I=R-E;let P,F,Y,K;const G=Array(T+1).join("██"),$=Array(T+1).join(" ");let Q="",H="";for(P=0;P<R;P+=1){for(Y=Math.floor((P-N)/T),H="",F=0;F<R;F+=1)K=1,N<=F&&F<I&&N<=P&&P<I&&d.isDark(Y,Math.floor((F-N)/T))&&(K=0),H+=K?G:$;for(Y=0;Y<T;Y+=1)Q+=H+`
|
|
51
|
+
`}return Q.substring(0,Q.length-1)},d.renderTo2dContext=function(T,E){E=E||2;const R=d.getModuleCount();for(let N=0;N<R;N++)for(let I=0;I<R;I++)T.fillStyle=d.isDark(N,I)?"black":"white",T.fillRect(I*E,N*E,E,E)},d};Qr.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const o=n.charCodeAt(s);r.push(o&255)}return r};Qr.createStringToBytes=function(n,r){const s=(function(){const p=n1(n),_=function(){const c=p.read();if(c==-1)throw"eof";return c};let f=0;const a={};for(;;){const c=p.read();if(c==-1)break;const h=_(),d=_(),u=_(),b=String.fromCharCode(c<<8|h),w=d<<8|u;a[b]=w,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(p){const _=[];for(let f=0;f<p.length;f+=1){const a=p.charCodeAt(f);if(a<128)_.push(a);else{const c=s[p.charAt(f)];typeof c=="number"?(c&255)==c?_.push(c):(_.push(c>>>8),_.push(c&255)):_.push(o)}}return _}};const zt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Zs={L:1,M:0,Q:3,H:2},xi={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ei=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,o=21522,p={},_=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return p.getBCHTypeInfo=function(f){let a=f<<10;for(;_(a)-_(r)>=0;)a^=r<<_(a)-_(r);return(f<<10|a)^o},p.getBCHTypeNumber=function(f){let a=f<<12;for(;_(a)-_(s)>=0;)a^=s<<_(a)-_(s);return f<<12|a},p.getPatternPosition=function(f){return n[f-1]},p.getMaskFunction=function(f){switch(f){case xi.PATTERN000:return function(a,c){return(a+c)%2==0};case xi.PATTERN001:return function(a,c){return a%2==0};case xi.PATTERN010:return function(a,c){return c%3==0};case xi.PATTERN011:return function(a,c){return(a+c)%3==0};case xi.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case xi.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case xi.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case xi.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+f}},p.getErrorCorrectPolynomial=function(f){let a=nl([1],0);for(let c=0;c<f;c+=1)a=a.multiply(nl([1,Ai.gexp(c)],0));return a},p.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case zt.MODE_NUMBER:return 10;case zt.MODE_ALPHA_NUM:return 9;case zt.MODE_8BIT_BYTE:return 8;case zt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case zt.MODE_NUMBER:return 12;case zt.MODE_ALPHA_NUM:return 11;case zt.MODE_8BIT_BYTE:return 16;case zt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case zt.MODE_NUMBER:return 14;case zt.MODE_ALPHA_NUM:return 13;case zt.MODE_8BIT_BYTE:return 16;case zt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},p.getLostPoint=function(f){const a=f.getModuleCount();let c=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1){let w=0;const k=f.isDark(u,b);for(let x=-1;x<=1;x+=1)if(!(u+x<0||a<=u+x))for(let S=-1;S<=1;S+=1)b+S<0||a<=b+S||x==0&&S==0||k==f.isDark(u+x,b+S)&&(w+=1);w>5&&(c+=3+w-5)}for(let u=0;u<a-1;u+=1)for(let b=0;b<a-1;b+=1){let w=0;f.isDark(u,b)&&(w+=1),f.isDark(u+1,b)&&(w+=1),f.isDark(u,b+1)&&(w+=1),f.isDark(u+1,b+1)&&(w+=1),(w==0||w==4)&&(c+=3)}for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(u,b)&&!f.isDark(u,b+1)&&f.isDark(u,b+2)&&f.isDark(u,b+3)&&f.isDark(u,b+4)&&!f.isDark(u,b+5)&&f.isDark(u,b+6)&&(c+=40);for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(b,u)&&!f.isDark(b+1,u)&&f.isDark(b+2,u)&&f.isDark(b+3,u)&&f.isDark(b+4,u)&&!f.isDark(b+5,u)&&f.isDark(b+6,u)&&(c+=40);let h=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1)f.isDark(b,u)&&(h+=1);const d=Math.abs(100*h/a/a-50)/5;return c+=d*10,c},p})(),Ai=(function(){const n=new Array(256),r=new Array(256);for(let o=0;o<8;o+=1)n[o]=1<<o;for(let o=8;o<256;o+=1)n[o]=n[o-4]^n[o-5]^n[o-6]^n[o-8];for(let o=0;o<255;o+=1)r[n[o]]=o;const s={};return s.glog=function(o){if(o<1)throw"glog("+o+")";return r[o]},s.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return n[o]},s})(),nl=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let p=0;for(;p<n.length&&n[p]==0;)p+=1;const _=new Array(n.length-p+r);for(let f=0;f<n.length-p;f+=1)_[f]=n[f+p];return _})(),o={};return o.getAt=function(p){return s[p]},o.getLength=function(){return s.length},o.multiply=function(p){const _=new Array(o.getLength()+p.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<p.getLength();a+=1)_[f+a]^=Ai.gexp(Ai.glog(o.getAt(f))+Ai.glog(p.getAt(a)));return nl(_,0)},o.mod=function(p){if(o.getLength()-p.getLength()<0)return o;const _=Ai.glog(o.getAt(0))-Ai.glog(p.getAt(0)),f=new Array(o.getLength());for(let a=0;a<o.getLength();a+=1)f[a]=o.getAt(a);for(let a=0;a<p.getLength();a+=1)f[a]^=Ai.gexp(Ai.glog(p.getAt(a))+_);return nl(f,0).mod(p)},o},rm=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(p,_){const f={};return f.totalCount=p,f.dataCount=_,f},s={},o=function(p,_){switch(_){case Zs.L:return n[(p-1)*4+0];case Zs.M:return n[(p-1)*4+1];case Zs.Q:return n[(p-1)*4+2];case Zs.H:return n[(p-1)*4+3];default:return}};return s.getRSBlocks=function(p,_){const f=o(p,_);if(typeof f>"u")throw"bad rs block @ typeNumber:"+p+"/errorCorrectionLevel:"+_;const a=f.length/3,c=[];for(let h=0;h<a;h+=1){const d=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let w=0;w<d;w+=1)c.push(r(u,b))}return c},s})(),sm=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const p=Math.floor(o/8);return(n[p]>>>7-o%8&1)==1},s.put=function(o,p){for(let _=0;_<p;_+=1)s.putBit((o>>>p-_-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const p=Math.floor(r/8);n.length<=p&&n.push(0),o&&(n[p]|=128>>>r%8),r+=1},s},Q0=function(n){const r=zt.MODE_NUMBER,s=n,o={};o.getMode=function(){return r},o.getLength=function(f){return s.length},o.write=function(f){const a=s;let c=0;for(;c+2<a.length;)f.put(p(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?f.put(p(a.substring(c,c+1)),4):a.length-c==2&&f.put(p(a.substring(c,c+2)),7))};const p=function(f){let a=0;for(let c=0;c<f.length;c+=1)a=a*10+_(f.charAt(c));return a},_=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},Z0=function(n){const r=zt.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(_){return s.length},o.write=function(_){const f=s;let a=0;for(;a+1<f.length;)_.put(p(f.charAt(a))*45+p(f.charAt(a+1)),11),a+=2;a<f.length&&_.put(p(f.charAt(a)),6)};const p=function(_){if("0"<=_&&_<="9")return _.charCodeAt(0)-48;if("A"<=_&&_<="Z")return _.charCodeAt(0)-65+10;switch(_){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+_}};return o},J0=function(n){const r=zt.MODE_8BIT_BYTE,s=Qr.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(p){return s.length},o.write=function(p){for(let _=0;_<s.length;_+=1)p.put(s[_],8)},o},e1=function(n){const r=zt.MODE_KANJI,s=Qr.stringToBytes;(function(_,f){const a=s(_);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),p={};return p.getMode=function(){return r},p.getLength=function(_){return~~(o.length/2)},p.write=function(_){const f=o;let a=0;for(;a+1<f.length;){let c=(255&f[a])<<8|255&f[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),_.put(c,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},p},lg=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,o,p){o=o||0,p=p||s.length;for(let _=0;_<p;_+=1)r.writeByte(s[_+o])},r.writeString=function(s){for(let o=0;o<s.length;o+=1)r.writeByte(s.charCodeAt(o))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let o=0;o<n.length;o+=1)o>0&&(s+=","),s+=n[o];return s+="]",s},r},t1=function(){let n=0,r=0,s=0,o="";const p={},_=function(a){o+=String.fromCharCode(f(a&63))},f=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return p.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)_(n>>>r-6),r-=6},p.flush=function(){if(r>0&&(_(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let c=0;c<a;c+=1)o+="="}},p.toString=function(){return o},p},n1=function(n){const r=n;let s=0,o=0,p=0;const _={};_.read=function(){for(;p<8;){if(s>=r.length){if(p==0)return-1;throw"unexpected end of file./"+p}const c=r.charAt(s);if(s+=1,c=="=")return p=0,-1;if(c.match(/^\s$/))continue;o=o<<6|f(c.charCodeAt(0)),p+=6}const a=o>>>p-8&255;return p-=8,a};const f=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return _},i1=function(n,r){const s=n,o=r,p=new Array(n*r),_={};_.setPixel=function(h,d,u){p[d*s+h]=u},_.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(o),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(o),h.writeByte(0);const d=2,u=a(d);h.writeByte(d);let b=0;for(;u.length-b>255;)h.writeByte(255),h.writeBytes(u,b,255),b+=255;h.writeByte(u.length-b),h.writeBytes(u,b,u.length-b),h.writeByte(0),h.writeString(";")};const f=function(h){const d=h;let u=0,b=0;const w={};return w.write=function(k,x){if(k>>>x)throw"length over";for(;u+x>=8;)d.writeByte(255&(k<<u|b)),x-=8-u,k>>>=8-u,b=0,u=0;b=k<<u|b,u=u+x},w.flush=function(){u>0&&d.writeByte(b)},w},a=function(h){const d=1<<h,u=(1<<h)+1;let b=h+1;const w=c();for(let g=0;g<d;g+=1)w.add(String.fromCharCode(g));w.add(String.fromCharCode(d)),w.add(String.fromCharCode(u));const k=lg(),x=f(k);x.write(d,b);let S=0,v=String.fromCharCode(p[S]);for(S+=1;S<p.length;){const g=String.fromCharCode(p[S]);S+=1,w.contains(v+g)?v=v+g:(x.write(w.indexOf(v),b),w.size()<4095&&(w.size()==1<<b&&(b+=1),w.add(v+g)),v=g)}return x.write(w.indexOf(v),b),x.write(u,b),x.flush(),k.toByteArray()},c=function(){const h={};let d=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=d,d+=1},u.size=function(){return d},u.indexOf=function(b){return h[b]},u.contains=function(b){return typeof h[b]<"u"},u};return _},r1=function(n,r,s){const o=i1(n,r);for(let a=0;a<r;a+=1)for(let c=0;c<n;c+=1)o.setPixel(c,a,s(c,a));const p=lg();o.write(p);const _=t1(),f=p.toByteArray();for(let a=0;a<f.length;a+=1)_.writeByte(f[a]);return _.flush(),"data:image/gif;base64,"+_};Qr.stringToBytes;const Wr=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],ag={name:"codex-reviewer",label:"Codex Reviewer",commandAgent:"codex-reviewer",dispatchable:!1},og={name:"codex-translator",label:"Codex Translator",commandAgent:"codex-translator",dispatchable:!1},cg=[ag,og],Bu=[...Wr,...cg],s1=Wr.map(n=>n.name),l1=cg.map(n=>n.name);Bu.map(n=>n.name);Bu.filter(n=>n.dispatchable).map(n=>n.name);function Nu(n){return l1.includes(n)}const a1="zh-CN",ug=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}];function o1(){const n={};for(const r of s1)n[r]={permissionMode:"default",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function c1({sidebar:n,children:r}){const[s,o]=ue.useState(!1);return B.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[B.jsxs("aside",{className:"app-sidebar",children:[B.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(p=>!p)}),B.jsx("div",{className:"sidebar-content",children:n})]}),B.jsx("main",{className:"app-main",children:r})]})}function u1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const h1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,f1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d1={};function lm(n,r){return(d1.jsx?f1:h1).test(n)}const p1=/[ \t\n\f\r]/g;function m1(n){return typeof n=="object"?n.type==="text"?am(n.value):!1:am(n)}function am(n){return n.replace(p1,"")===""}class sl{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}sl.prototype.normal={};sl.prototype.property={};sl.prototype.space=void 0;function hg(n,r){const s={},o={};for(const p of n)Object.assign(s,p.property),Object.assign(o,p.normal);return new sl(s,o,r)}function Su(n){return n.toLowerCase()}class Qt{constructor(r,s){this.attribute=s,this.property=r}}Qt.prototype.attribute="";Qt.prototype.booleanish=!1;Qt.prototype.boolean=!1;Qt.prototype.commaOrSpaceSeparated=!1;Qt.prototype.commaSeparated=!1;Qt.prototype.defined=!1;Qt.prototype.mustUseProperty=!1;Qt.prototype.number=!1;Qt.prototype.overloadedBoolean=!1;Qt.prototype.property="";Qt.prototype.spaceSeparated=!1;Qt.prototype.space=void 0;let g1=0;const ze=Zi(),xt=Zi(),bu=Zi(),ye=Zi(),ct=Zi(),Kr=Zi(),on=Zi();function Zi(){return 2**++g1}const Cu=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:xt,commaOrSpaceSeparated:on,commaSeparated:Kr,number:ye,overloadedBoolean:bu,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),eu=Object.keys(Cu);class ju extends Qt{constructor(r,s,o,p){let _=-1;if(super(r,s),om(this,"space",p),typeof o=="number")for(;++_<eu.length;){const f=eu[_];om(this,eu[_],(o&Cu[f])===Cu[f])}}}ju.prototype.defined=!0;function om(n,r,s){s&&(n[r]=s)}function Zr(n){const r={},s={};for(const[o,p]of Object.entries(n.properties)){const _=new ju(o,n.transform(n.attributes||{},o),p,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(_.mustUseProperty=!0),r[o]=_,s[Su(o)]=o,s[Su(_.attribute)]=o}return new sl(r,s,n.space)}const fg=Zr({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:ct,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:ye,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:ct,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:xt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function dg(n,r){return r in n?n[r]:r}function pg(n,r){return dg(n,r.toLowerCase())}const _1=Zr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kr,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:ct,autoFocus:ze,autoPlay:ze,blocking:ct,capture:null,charSet:null,checked:ze,cite:null,className:ct,cols:ye,colSpan:null,content:null,contentEditable:xt,controls:ze,controlsList:ct,coords:ye|Kr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:bu,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:ct,height:ye,hidden:bu,high:ye,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:ct,itemRef:ct,itemScope:ze,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ye,pattern:null,ping:ct,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:ct,required:ze,reversed:ze,rows:ye,rowSpan:ye,sandbox:ct,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:xt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:pg}),v1=Zr({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",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:on,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:ct,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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,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:Kr,g2:Kr,glyphName:Kr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,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:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,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:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:dg}),mg=Zr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),gg=Zr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pg}),_g=Zr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),y1={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"},S1=/[A-Z]/g,cm=/-[a-z]/g,b1=/^data[-\w.:]+$/i;function C1(n,r){const s=Su(r);let o=r,p=Qt;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&b1.test(r)){if(r.charAt(4)==="-"){const _=r.slice(5).replace(cm,x1);o="data"+_.charAt(0).toUpperCase()+_.slice(1)}else{const _=r.slice(4);if(!cm.test(_)){let f=_.replace(S1,w1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}p=ju}return new p(o,r)}function w1(n){return"-"+n.toLowerCase()}function x1(n){return n.charAt(1).toUpperCase()}const E1=hg([fg,_1,mg,gg,_g],"html"),zu=hg([fg,v1,mg,gg,_g],"svg");function k1(n){return n.join(" ").trim()}var Vr={},tu,um;function A1(){if(um)return tu;um=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,p=/^:\s*/,_=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
52
|
+
`,h="/",d="*",u="",b="comment",w="declaration";function k(S,v){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];v=v||{};var g=1,y=1;function A(Y){var K=Y.match(r);K&&(g+=K.length);var G=Y.lastIndexOf(c);y=~G?Y.length-G:y+Y.length}function M(){var Y={line:g,column:y};return function(K){return K.position=new D(Y),R(),K}}function D(Y){this.start=Y,this.end={line:g,column:y},this.source=v.source}D.prototype.content=S;function T(Y){var K=new Error(v.source+":"+g+":"+y+": "+Y);if(K.reason=Y,K.filename=v.source,K.line=g,K.column=y,K.source=S,!v.silent)throw K}function E(Y){var K=Y.exec(S);if(K){var G=K[0];return A(G),S=S.slice(G.length),K}}function R(){E(s)}function N(Y){var K;for(Y=Y||[];K=I();)K!==!1&&Y.push(K);return Y}function I(){var Y=M();if(!(h!=S.charAt(0)||d!=S.charAt(1))){for(var K=2;u!=S.charAt(K)&&(d!=S.charAt(K)||h!=S.charAt(K+1));)++K;if(K+=2,u===S.charAt(K-1))return T("End of comment missing");var G=S.slice(2,K-2);return y+=2,A(G),S=S.slice(K),y+=2,Y({type:b,comment:G})}}function P(){var Y=M(),K=E(o);if(K){if(I(),!E(p))return T("property missing ':'");var G=E(_),$=Y({type:w,property:x(K[0].replace(n,u)),value:G?x(G[0].replace(n,u)):u});return E(f),$}}function F(){var Y=[];N(Y);for(var K;K=P();)K!==!1&&(Y.push(K),N(Y));return Y}return R(),F()}function x(S){return S?S.replace(a,u):u}return tu=k,tu}var hm;function T1(){if(hm)return Vr;hm=1;var n=Vr&&Vr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.default=s;const r=n(A1());function s(o,p){let _=null;if(!o||typeof o!="string")return _;const f=(0,r.default)(o),a=typeof p=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:d}=c;a?p(h,d,c):d&&(_=_||{},_[h]=d)}),_}return Vr}var Ws={},fm;function D1(){if(fm)return Ws;fm=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,p=/^-(ms)-/,_=function(h){return!h||s.test(h)||n.test(h)},f=function(h,d){return d.toUpperCase()},a=function(h,d){return"".concat(d,"-")},c=function(h,d){return d===void 0&&(d={}),_(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(p,a):h=h.replace(o,a),h.replace(r,f))};return Ws.camelCase=c,Ws}var Ks,dm;function R1(){if(dm)return Ks;dm=1;var n=Ks&&Ks.__importDefault||function(p){return p&&p.__esModule?p:{default:p}},r=n(T1()),s=D1();function o(p,_){var f={};return!p||typeof p!="string"||(0,r.default)(p,function(a,c){a&&c&&(f[(0,s.camelCase)(a,_)]=c)}),f}return o.default=o,Ks=o,Ks}var M1=R1();const L1=sg(M1),vg=yg("end"),Hu=yg("start");function yg(n){return r;function r(s){const o=s&&s.position&&s.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function O1(n){const r=Hu(n),s=vg(n);if(r&&s)return{start:r,end:s}}function Js(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?pm(n.position):"start"in n||"end"in n?pm(n):"line"in n||"column"in n?wu(n):""}function wu(n){return mm(n&&n.line)+":"+mm(n&&n.column)}function pm(n){return wu(n&&n.start)+"-"+wu(n&&n.end)}function mm(n){return n&&typeof n=="number"?n:1}class It extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let p="",_={},f=!1;if(s&&("line"in s&&"column"in s?_={place:s}:"start"in s&&"end"in s?_={place:s}:"type"in s?_={ancestors:[s],place:s.position}:_={...s}),typeof r=="string"?p=r:!_.cause&&r&&(f=!0,p=r.message,_.cause=r),!_.ruleId&&!_.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?_.ruleId=o:(_.source=o.slice(0,c),_.ruleId=o.slice(c+1))}if(!_.place&&_.ancestors&&_.ancestors){const c=_.ancestors[_.ancestors.length-1];c&&(_.place=c.position)}const a=_.place&&"start"in _.place?_.place.start:_.place;this.ancestors=_.ancestors||void 0,this.cause=_.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=p,this.line=a?a.line:void 0,this.name=Js(_.place)||"1:1",this.place=_.place||void 0,this.reason=this.message,this.ruleId=_.ruleId||void 0,this.source=_.source||void 0,this.stack=f&&_.cause&&typeof _.cause.stack=="string"?_.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}It.prototype.file="";It.prototype.name="";It.prototype.reason="";It.prototype.message="";It.prototype.stack="";It.prototype.column=void 0;It.prototype.line=void 0;It.prototype.ancestors=void 0;It.prototype.cause=void 0;It.prototype.fatal=void 0;It.prototype.place=void 0;It.prototype.ruleId=void 0;It.prototype.source=void 0;const Iu={}.hasOwnProperty,B1=new Map,N1=/[A-Z]/g,j1=new Set(["table","tbody","thead","tfoot","tr"]),z1=new Set(["td","th"]),Sg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function H1(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let o;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=$1(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=G1(s,r.jsx,r.jsxs)}const p={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:o,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?zu:E1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},_=bg(p,n,void 0);return _&&typeof _!="string"?_:p.create(n,p.Fragment,{children:_||void 0},void 0)}function bg(n,r,s){if(r.type==="element")return I1(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return U1(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return F1(n,r,s);if(r.type==="mdxjsEsm")return P1(n,r);if(r.type==="root")return q1(n,r,s);if(r.type==="text")return V1(n,r)}function I1(n,r,s){const o=n.schema;let p=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(p=zu,n.schema=p),n.ancestors.push(r);const _=wg(n,r.tagName,!1),f=Y1(n,r);let a=Pu(n,r);return j1.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!m1(c):!0})),Cg(n,f,_,r),Uu(f,a),n.ancestors.pop(),n.schema=o,n.create(r,_,f,s)}function U1(n,r){if(r.data&&r.data.estree&&n.evaluater){const o=r.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}il(n,r.position)}function P1(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);il(n,r.position)}function F1(n,r,s){const o=n.schema;let p=o;r.name==="svg"&&o.space==="html"&&(p=zu,n.schema=p),n.ancestors.push(r);const _=r.name===null?n.Fragment:wg(n,r.name,!0),f=W1(n,r),a=Pu(n,r);return Cg(n,f,_,r),Uu(f,a),n.ancestors.pop(),n.schema=o,n.create(r,_,f,s)}function q1(n,r,s){const o={};return Uu(o,Pu(n,r)),n.create(r,n.Fragment,o,s)}function V1(n,r){return r.value}function Cg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function Uu(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function G1(n,r,s){return o;function o(p,_,f,a){const h=Array.isArray(f.children)?s:r;return a?h(_,f,a):h(_,f)}}function $1(n,r){return s;function s(o,p,_,f){const a=Array.isArray(_.children),c=Hu(o);return r(p,_,f,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function Y1(n,r){const s={};let o,p;for(p in r.properties)if(p!=="children"&&Iu.call(r.properties,p)){const _=K1(n,p,r.properties[p]);if(_){const[f,a]=_;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&z1.has(r.tagName)?o=a:s[f]=a}}if(o){const _=s.style||(s.style={});_[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function W1(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const _=o.data.estree.body[0];_.type;const f=_.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else il(n,r.position);else{const p=o.name;let _;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const a=o.value.data.estree.body[0];a.type,_=n.evaluater.evaluateExpression(a.expression)}else il(n,r.position);else _=o.value===null?!0:o.value;s[p]=_}return s}function Pu(n,r){const s=[];let o=-1;const p=n.passKeys?new Map:B1;for(;++o<r.children.length;){const _=r.children[o];let f;if(n.passKeys){const c=_.type==="element"?_.tagName:_.type==="mdxJsxFlowElement"||_.type==="mdxJsxTextElement"?_.name:void 0;if(c){const h=p.get(c)||0;f=c+"-"+h,p.set(c,h+1)}}const a=bg(n,_,f);a!==void 0&&s.push(a)}return s}function K1(n,r,s){const o=C1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?u1(s):k1(s)),o.property==="style"){let p=typeof s=="object"?s:X1(n,String(s));return n.stylePropertyNameCase==="css"&&(p=Q1(p)),["style",p]}return[n.elementAttributeNameCase==="react"&&o.space?y1[o.property]||o.property:o.attribute,s]}}function X1(n,r){try{return L1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,p=new It("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw p.file=n.filePath||void 0,p.url=Sg+"#cannot-parse-style-attribute",p}}function wg(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const p=r.split(".");let _=-1,f;for(;++_<p.length;){const a=lm(p[_])?{type:"Identifier",name:p[_]}:{type:"Literal",value:p[_]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(_&&a.type==="Literal"),optional:!1}:a}o=f}else o=lm(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const p=o.value;return Iu.call(n.components,p)?n.components[p]:p}if(n.evaluater)return n.evaluater.evaluateExpression(o);il(n)}function il(n,r){const s=new It("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=Sg+"#cannot-handle-mdx-estrees-without-createevaluater",s}function Q1(n){const r={};let s;for(s in n)Iu.call(n,s)&&(r[Z1(s)]=n[s]);return r}function Z1(n){let r=n.replace(N1,J1);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function J1(n){return"-"+n.toLowerCase()}const nu={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"]},ey={};function Fu(n,r){const s=ey,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,p=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return xg(n,o,p)}function xg(n,r,s){if(ty(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return gm(n.children,r,s)}return Array.isArray(n)?gm(n,r,s):""}function gm(n,r,s){const o=[];let p=-1;for(;++p<n.length;)o[p]=xg(n[p],r,s);return o.join("")}function ty(n){return!!(n&&typeof n=="object")}const _m=document.createElement("i");function qu(n){const r="&"+n+";";_m.innerHTML=r;const s=_m.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function cn(n,r,s,o){const p=n.length;let _=0,f;if(r<0?r=-r>p?0:p+r:r=r>p?p:r,s=s>0?s:0,o.length<1e4)f=Array.from(o),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);_<o.length;)f=o.slice(_,_+1e4),f.unshift(r,0),n.splice(...f),_+=1e4,r+=1e4}function bn(n,r){return n.length>0?(cn(n,n.length,0,r),n):r}const vm={}.hasOwnProperty;function Eg(n){const r={};let s=-1;for(;++s<n.length;)ny(r,n[s]);return r}function ny(n,r){let s;for(s in r){const p=(vm.call(n,s)?n[s]:void 0)||(n[s]={}),_=r[s];let f;if(_)for(f in _){vm.call(p,f)||(p[f]=[]);const a=_[f];iy(p[f],Array.isArray(a)?a:a?[a]:[])}}}function iy(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);cn(n,0,0,o)}function kg(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function An(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ft=Di(/[A-Za-z]/),Ht=Di(/[\dA-Za-z]/),ry=Di(/[#-'*+\--9=?A-Z^-~]/);function Da(n){return n!==null&&(n<32||n===127)}const xu=Di(/\d/),sy=Di(/[\dA-Fa-f]/),ly=Di(/[!-/:-@[-`{-~]/);function Le(n){return n!==null&&n<-2}function at(n){return n!==null&&(n<0||n===32)}function Pe(n){return n===-2||n===-1||n===32}const Ba=Di(new RegExp("\\p{P}|\\p{S}","u")),Qi=Di(/\s/);function Di(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function Jr(n){const r=[];let s=-1,o=0,p=0;for(;++s<n.length;){const _=n.charCodeAt(s);let f="";if(_===37&&Ht(n.charCodeAt(s+1))&&Ht(n.charCodeAt(s+2)))p=2;else if(_<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(_))||(f=String.fromCharCode(_));else if(_>55295&&_<57344){const a=n.charCodeAt(s+1);_<56320&&a>56319&&a<57344?(f=String.fromCharCode(_,a),p=1):f="�"}else f=String.fromCharCode(_);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+p+1,f=""),p&&(s+=p,p=0)}return r.join("")+n.slice(o)}function $e(n,r,s,o){const p=o?o-1:Number.POSITIVE_INFINITY;let _=0;return f;function f(c){return Pe(c)?(n.enter(s),a(c)):r(c)}function a(c){return Pe(c)&&_++<p?(n.consume(c),a):(n.exit(s),r(c))}}const ay={tokenize:oy};function oy(n){const r=n.attempt(this.parser.constructs.contentInitial,o,p);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),$e(n,r,"linePrefix")}function p(a){return n.enter("paragraph"),_(a)}function _(a){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(a)}function f(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Le(a)?(n.consume(a),n.exit("chunkText"),_):(n.consume(a),f)}}const cy={tokenize:uy},ym={tokenize:hy};function uy(n){const r=this,s=[];let o=0,p,_,f;return a;function a(y){if(o<s.length){const A=s[o];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(y)}return h(y)}function c(y){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,p&&g();const A=r.events.length;let M=A,D;for(;M--;)if(r.events[M][0]==="exit"&&r.events[M][1].type==="chunkFlow"){D=r.events[M][1].end;break}v(o);let T=A;for(;T<r.events.length;)r.events[T][1].end={...D},T++;return cn(r.events,M+1,0,r.events.slice(A)),r.events.length=T,h(y)}return a(y)}function h(y){if(o===s.length){if(!p)return b(y);if(p.currentConstruct&&p.currentConstruct.concrete)return k(y);r.interrupt=!!(p.currentConstruct&&!p._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(ym,d,u)(y)}function d(y){return p&&g(),v(o),b(y)}function u(y){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,k(y)}function b(y){return r.containerState={},n.attempt(ym,w,k)(y)}function w(y){return o++,s.push([r.currentConstruct,r.containerState]),b(y)}function k(y){if(y===null){p&&g(),v(0),n.consume(y);return}return p=p||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:p,contentType:"flow",previous:_}),x(y)}function x(y){if(y===null){S(n.exit("chunkFlow"),!0),v(0),n.consume(y);return}return Le(y)?(n.consume(y),S(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(y),x)}function S(y,A){const M=r.sliceStream(y);if(A&&M.push(null),y.previous=_,_&&(_.next=y),_=y,p.defineSkip(y.start),p.write(M),r.parser.lazy[y.start.line]){let D=p.events.length;for(;D--;)if(p.events[D][1].start.offset<f&&(!p.events[D][1].end||p.events[D][1].end.offset>f))return;const T=r.events.length;let E=T,R,N;for(;E--;)if(r.events[E][0]==="exit"&&r.events[E][1].type==="chunkFlow"){if(R){N=r.events[E][1].end;break}R=!0}for(v(o),D=T;D<r.events.length;)r.events[D][1].end={...N},D++;cn(r.events,E+1,0,r.events.slice(T)),r.events.length=D}}function v(y){let A=s.length;for(;A-- >y;){const M=s[A];r.containerState=M[1],M[0].exit.call(r,n)}s.length=y}function g(){p.write([null]),_=void 0,p=void 0,r.containerState._closeFlow=void 0}}function hy(n,r,s){return $e(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xr(n){if(n===null||at(n)||Qi(n))return 1;if(Ba(n))return 2}function Na(n,r,s){const o=[];let p=-1;for(;++p<n.length;){const _=n[p].resolveAll;_&&!o.includes(_)&&(r=_(r,s),o.push(_))}return r}const Eu={name:"attention",resolveAll:fy,tokenize:dy};function fy(n,r){let s=-1,o,p,_,f,a,c,h,d;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(o=s;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&r.sliceSerialize(n[o][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[o][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;c=n[o][1].end.offset-n[o][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const u={...n[o][1].end},b={...n[s][1].start};Sm(u,-c),Sm(b,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[o][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:b},_={type:c>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},p={type:c>1?"strong":"emphasis",start:{...f.start},end:{...a.end}},n[o][1].end={...f.start},n[s][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=bn(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=bn(h,[["enter",p,r],["enter",f,r],["exit",f,r],["enter",_,r]]),h=bn(h,Na(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=bn(h,[["exit",_,r],["enter",a,r],["exit",a,r],["exit",p,r]]),n[s][1].end.offset-n[s][1].start.offset?(d=2,h=bn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):d=0,cn(n,o-1,s-o+3,h),s=o+h.length-d-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function dy(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,p=Xr(o);let _;return f;function f(c){return _=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===_)return n.consume(c),a;const h=n.exit("attentionSequence"),d=Xr(c),u=!d||d===2&&p||s.includes(c),b=!p||p===2&&d||s.includes(o);return h._open=!!(_===42?u:u&&(p||!b)),h._close=!!(_===42?b:b&&(d||!u)),r(c)}}function Sm(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const py={name:"autolink",tokenize:my};function my(n,r,s){let o=0;return p;function p(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),_}function _(w){return Ft(w)?(n.consume(w),f):w===64?s(w):h(w)}function f(w){return w===43||w===45||w===46||Ht(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,c):(w===43||w===45||w===46||Ht(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function c(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):w===null||w===32||w===60||Da(w)?s(w):(n.consume(w),c)}function h(w){return w===64?(n.consume(w),d):ry(w)?(n.consume(w),h):s(w)}function d(w){return Ht(w)?u(w):s(w)}function u(w){return w===46?(n.consume(w),o=0,d):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):b(w)}function b(w){if((w===45||Ht(w))&&o++<63){const k=w===45?b:u;return n.consume(w),k}return s(w)}}const ll={partial:!0,tokenize:gy};function gy(n,r,s){return o;function o(_){return Pe(_)?$e(n,p,"linePrefix")(_):p(_)}function p(_){return _===null||Le(_)?r(_):s(_)}}const Ag={continuation:{tokenize:vy},exit:yy,name:"blockQuote",tokenize:_y};function _y(n,r,s){const o=this;return p;function p(f){if(f===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),_}return s(f)}function _(f){return Pe(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function vy(n,r,s){const o=this;return p;function p(f){return Pe(f)?$e(n,_,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):_(f)}function _(f){return n.attempt(Ag,r,s)(f)}}function yy(n){n.exit("blockQuote")}const Tg={name:"characterEscape",tokenize:Sy};function Sy(n,r,s){return o;function o(_){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(_),n.exit("escapeMarker"),p}function p(_){return ly(_)?(n.enter("characterEscapeValue"),n.consume(_),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(_)}}const Dg={name:"characterReference",tokenize:by};function by(n,r,s){const o=this;let p=0,_,f;return a;function a(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),_=31,f=Ht,d(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),_=6,f=sy,d):(n.enter("characterReferenceValue"),_=7,f=xu,d(u))}function d(u){if(u===59&&p){const b=n.exit("characterReferenceValue");return f===Ht&&!qu(o.sliceSerialize(b))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&p++<_?(n.consume(u),d):s(u)}}const bm={partial:!0,tokenize:wy},Cm={concrete:!0,name:"codeFenced",tokenize:Cy};function Cy(n,r,s){const o=this,p={partial:!0,tokenize:M};let _=0,f=0,a;return c;function c(D){return h(D)}function h(D){const T=o.events[o.events.length-1];return _=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),d(D)}function d(D){return D===a?(f++,n.consume(D),d):f<3?s(D):(n.exit("codeFencedFenceSequence"),Pe(D)?$e(n,u,"whitespace")(D):u(D))}function u(D){return D===null||Le(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check(bm,x,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):Pe(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),$e(n,w,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),b)}function w(D){return D===null||Le(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(D))}function k(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===a?s(D):(n.consume(D),k)}function x(D){return n.attempt(p,A,S)(D)}function S(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),v}function v(D){return _>0&&Pe(D)?$e(n,g,"linePrefix",_+1)(D):g(D)}function g(D){return D===null||Le(D)?n.check(bm,x,A)(D):(n.enter("codeFlowValue"),y(D))}function y(D){return D===null||Le(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),y)}function A(D){return n.exit("codeFenced"),r(D)}function M(D,T,E){let R=0;return N;function N(K){return D.enter("lineEnding"),D.consume(K),D.exit("lineEnding"),I}function I(K){return D.enter("codeFencedFence"),Pe(K)?$e(D,P,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):P(K)}function P(K){return K===a?(D.enter("codeFencedFenceSequence"),F(K)):E(K)}function F(K){return K===a?(R++,D.consume(K),F):R>=f?(D.exit("codeFencedFenceSequence"),Pe(K)?$e(D,Y,"whitespace")(K):Y(K)):E(K)}function Y(K){return K===null||Le(K)?(D.exit("codeFencedFence"),T(K)):E(K)}}}function wy(n,r,s){const o=this;return p;function p(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),_)}function _(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const iu={name:"codeIndented",tokenize:Ey},xy={partial:!0,tokenize:ky};function Ey(n,r,s){const o=this;return p;function p(h){return n.enter("codeIndented"),$e(n,_,"linePrefix",5)(h)}function _(h){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):Le(h)?n.attempt(xy,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Le(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function c(h){return n.exit("codeIndented"),r(h)}}function ky(n,r,s){const o=this;return p;function p(f){return o.parser.lazy[o.now().line]?s(f):Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),p):$e(n,_,"linePrefix",5)(f)}function _(f){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):Le(f)?p(f):s(f)}}const Ay={name:"codeText",previous:Dy,resolve:Ty,tokenize:Ry};function Ty(n){let r=n.length-4,s=3,o,p;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(o=s;++o<r;)if(n[o][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(o=s-1,r++;++o<=r;)p===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(p=o):(o===r||n[o][1].type==="lineEnding")&&(n[p][1].type="codeTextData",o!==p+2&&(n[p][1].end=n[o-1][1].end,n.splice(p+2,o-p-2),r-=o-p-2,o=p+2),p=void 0);return n}function Dy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ry(n,r,s){let o=0,p,_;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),a(u)}function a(u){return u===96?(n.consume(u),o++,a):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(_=n.enter("codeTextSequence"),p=0,d(u)):Le(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||Le(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function d(u){return u===96?(n.consume(u),p++,d):p===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(_.type="codeTextData",h(u))}}class My{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const o=s??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(r,o):r>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,s,o){const p=s||0;this.setCursor(Math.trunc(r));const _=this.right.splice(this.right.length-p,Number.POSITIVE_INFINITY);return o&&Xs(this.left,o),_.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Xs(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Xs(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);Xs(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Xs(this.left,s.reverse())}}}function Xs(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function Rg(n){const r={};let s=-1,o,p,_,f,a,c,h;const d=new My(n);for(;++s<d.length;){for(;s in r;)s=r[s];if(o=d.get(s),s&&o[1].type==="chunkFlow"&&d.get(s-1)[1].type==="listItemPrefix"&&(c=o[1]._tokenizer.events,_=0,_<c.length&&c[_][1].type==="lineEndingBlank"&&(_+=2),_<c.length&&c[_][1].type==="content"))for(;++_<c.length&&c[_][1].type!=="content";)c[_][1].type==="chunkText"&&(c[_][1]._isInFirstContentOfListItem=!0,_++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,Ly(d,s)),s=r[s],h=!0);else if(o[1]._container){for(_=s,p=void 0;_--;)if(f=d.get(_),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(p&&(d.get(p)[1].type="lineEndingBlank"),f[1].type="lineEnding",p=_);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;p&&(o[1].end={...d.get(p)[1].start},a=d.slice(p,s),a.unshift(o),d.splice(p,s-p+1,a))}}return cn(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function Ly(n,r){const s=n.get(r)[1],o=n.get(r)[2];let p=r-1;const _=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,c=[],h={};let d,u,b=-1,w=s,k=0,x=0;const S=[x];for(;w;){for(;n.get(++p)[1]!==w;);_.push(p),w._tokenizer||(d=o.sliceStream(w),w.next||d.push(null),u&&f.defineSkip(w.start),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(d),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=w,w=w.next}for(w=s;++b<a.length;)a[b][0]==="exit"&&a[b-1][0]==="enter"&&a[b][1].type===a[b-1][1].type&&a[b][1].start.line!==a[b][1].end.line&&(x=b+1,S.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(f.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),b=S.length;b--;){const v=a.slice(S[b],S[b+1]),g=_.pop();c.push([g,g+v.length-1]),n.splice(g,2,v)}for(c.reverse(),b=-1;++b<c.length;)h[k+c[b][0]]=k+c[b][1],k+=c[b][1]-c[b][0]-1;return h}const Oy={resolve:Ny,tokenize:jy},By={partial:!0,tokenize:zy};function Ny(n){return Rg(n),n}function jy(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),p(a)}function p(a){return a===null?_(a):Le(a)?n.check(By,f,_)(a):(n.consume(a),p)}function _(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function f(a){return n.consume(a),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,p}}function zy(n,r,s){const o=this;return p;function p(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),$e(n,_,"linePrefix")}function _(f){if(f===null||Le(f))return s(f);const a=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):n.interrupt(o.parser.constructs.flow,s,r)(f)}}function Mg(n,r,s,o,p,_,f,a,c){const h=c||Number.POSITIVE_INFINITY;let d=0;return u;function u(v){return v===60?(n.enter(o),n.enter(p),n.enter(_),n.consume(v),n.exit(_),b):v===null||v===32||v===41||Da(v)?s(v):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(v))}function b(v){return v===62?(n.enter(_),n.consume(v),n.exit(_),n.exit(p),n.exit(o),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(v))}function w(v){return v===62?(n.exit("chunkString"),n.exit(a),b(v)):v===null||v===60||Le(v)?s(v):(n.consume(v),v===92?k:w)}function k(v){return v===60||v===62||v===92?(n.consume(v),w):w(v)}function x(v){return!d&&(v===null||v===41||at(v))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(v)):d<h&&v===40?(n.consume(v),d++,x):v===41?(n.consume(v),d--,x):v===null||v===32||v===40||Da(v)?s(v):(n.consume(v),v===92?S:x)}function S(v){return v===40||v===41||v===92?(n.consume(v),x):x(v)}}function Lg(n,r,s,o,p,_){const f=this;let a=0,c;return h;function h(w){return n.enter(o),n.enter(p),n.consume(w),n.exit(p),n.enter(_),d}function d(w){return a>999||w===null||w===91||w===93&&!c||w===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?s(w):w===93?(n.exit(_),n.enter(p),n.consume(w),n.exit(p),n.exit(o),r):Le(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),d):(n.enter("chunkString",{contentType:"string"}),u(w))}function u(w){return w===null||w===91||w===93||Le(w)||a++>999?(n.exit("chunkString"),d(w)):(n.consume(w),c||(c=!Pe(w)),w===92?b:u)}function b(w){return w===91||w===92||w===93?(n.consume(w),a++,u):u(w)}}function Og(n,r,s,o,p,_){let f;return a;function a(b){return b===34||b===39||b===40?(n.enter(o),n.enter(p),n.consume(b),n.exit(p),f=b===40?41:b,c):s(b)}function c(b){return b===f?(n.enter(p),n.consume(b),n.exit(p),n.exit(o),r):(n.enter(_),h(b))}function h(b){return b===f?(n.exit(_),c(f)):b===null?s(b):Le(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),$e(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===f||b===null||Le(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:d)}function u(b){return b===f||b===92?(n.consume(b),d):d(b)}}function el(n,r){let s;return o;function o(p){return Le(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),s=!0,o):Pe(p)?$e(n,o,s?"linePrefix":"lineSuffix")(p):r(p)}}const Hy={name:"definition",tokenize:Uy},Iy={partial:!0,tokenize:Py};function Uy(n,r,s){const o=this;let p;return _;function _(w){return n.enter("definition"),f(w)}function f(w){return Lg.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return p=An(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),c):s(w)}function c(w){return at(w)?el(n,h)(w):h(w)}function h(w){return Mg(n,d,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(Iy,u,u)(w)}function u(w){return Pe(w)?$e(n,b,"whitespace")(w):b(w)}function b(w){return w===null||Le(w)?(n.exit("definition"),o.parser.defined.push(p),r(w)):s(w)}}function Py(n,r,s){return o;function o(a){return at(a)?el(n,p)(a):s(a)}function p(a){return Og(n,_,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function _(a){return Pe(a)?$e(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Le(a)?r(a):s(a)}}const Fy={name:"hardBreakEscape",tokenize:qy};function qy(n,r,s){return o;function o(_){return n.enter("hardBreakEscape"),n.consume(_),p}function p(_){return Le(_)?(n.exit("hardBreakEscape"),r(_)):s(_)}}const Vy={name:"headingAtx",resolve:Gy,tokenize:$y};function Gy(n,r){let s=n.length-2,o=3,p,_;return n[o][1].type==="whitespace"&&(o+=2),s-2>o&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(o===s-1||s-4>o&&n[s-2][1].type==="whitespace")&&(s-=o+1===s?2:4),s>o&&(p={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},_={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},cn(n,o,s-o+1,[["enter",p,r],["enter",_,r],["exit",_,r],["exit",p,r]])),n}function $y(n,r,s){let o=0;return p;function p(d){return n.enter("atxHeading"),_(d)}function _(d){return n.enter("atxHeadingSequence"),f(d)}function f(d){return d===35&&o++<6?(n.consume(d),f):d===null||at(d)?(n.exit("atxHeadingSequence"),a(d)):s(d)}function a(d){return d===35?(n.enter("atxHeadingSequence"),c(d)):d===null||Le(d)?(n.exit("atxHeading"),r(d)):Pe(d)?$e(n,a,"whitespace")(d):(n.enter("atxHeadingText"),h(d))}function c(d){return d===35?(n.consume(d),c):(n.exit("atxHeadingSequence"),a(d))}function h(d){return d===null||d===35||at(d)?(n.exit("atxHeadingText"),a(d)):(n.consume(d),h)}}const Yy=["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"],wm=["pre","script","style","textarea"],Wy={concrete:!0,name:"htmlFlow",resolveTo:Qy,tokenize:Zy},Ky={partial:!0,tokenize:eS},Xy={partial:!0,tokenize:Jy};function Qy(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Zy(n,r,s){const o=this;let p,_,f,a,c;return h;function h(j){return d(j)}function d(j){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(j),u}function u(j){return j===33?(n.consume(j),b):j===47?(n.consume(j),_=!0,x):j===63?(n.consume(j),p=3,o.interrupt?r:O):Ft(j)?(n.consume(j),f=String.fromCharCode(j),S):s(j)}function b(j){return j===45?(n.consume(j),p=2,w):j===91?(n.consume(j),p=5,a=0,k):Ft(j)?(n.consume(j),p=4,o.interrupt?r:O):s(j)}function w(j){return j===45?(n.consume(j),o.interrupt?r:O):s(j)}function k(j){const ee="CDATA[";return j===ee.charCodeAt(a++)?(n.consume(j),a===ee.length?o.interrupt?r:P:k):s(j)}function x(j){return Ft(j)?(n.consume(j),f=String.fromCharCode(j),S):s(j)}function S(j){if(j===null||j===47||j===62||at(j)){const ee=j===47,he=f.toLowerCase();return!ee&&!_&&wm.includes(he)?(p=1,o.interrupt?r(j):P(j)):Yy.includes(f.toLowerCase())?(p=6,ee?(n.consume(j),v):o.interrupt?r(j):P(j)):(p=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(j):_?g(j):y(j))}return j===45||Ht(j)?(n.consume(j),f+=String.fromCharCode(j),S):s(j)}function v(j){return j===62?(n.consume(j),o.interrupt?r:P):s(j)}function g(j){return Pe(j)?(n.consume(j),g):N(j)}function y(j){return j===47?(n.consume(j),N):j===58||j===95||Ft(j)?(n.consume(j),A):Pe(j)?(n.consume(j),y):N(j)}function A(j){return j===45||j===46||j===58||j===95||Ht(j)?(n.consume(j),A):M(j)}function M(j){return j===61?(n.consume(j),D):Pe(j)?(n.consume(j),M):y(j)}function D(j){return j===null||j===60||j===61||j===62||j===96?s(j):j===34||j===39?(n.consume(j),c=j,T):Pe(j)?(n.consume(j),D):E(j)}function T(j){return j===c?(n.consume(j),c=null,R):j===null||Le(j)?s(j):(n.consume(j),T)}function E(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||at(j)?M(j):(n.consume(j),E)}function R(j){return j===47||j===62||Pe(j)?y(j):s(j)}function N(j){return j===62?(n.consume(j),I):s(j)}function I(j){return j===null||Le(j)?P(j):Pe(j)?(n.consume(j),I):s(j)}function P(j){return j===45&&p===2?(n.consume(j),G):j===60&&p===1?(n.consume(j),$):j===62&&p===4?(n.consume(j),z):j===63&&p===3?(n.consume(j),O):j===93&&p===5?(n.consume(j),H):Le(j)&&(p===6||p===7)?(n.exit("htmlFlowData"),n.check(Ky,V,F)(j)):j===null||Le(j)?(n.exit("htmlFlowData"),F(j)):(n.consume(j),P)}function F(j){return n.check(Xy,Y,V)(j)}function Y(j){return n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),K}function K(j){return j===null||Le(j)?F(j):(n.enter("htmlFlowData"),P(j))}function G(j){return j===45?(n.consume(j),O):P(j)}function $(j){return j===47?(n.consume(j),f="",Q):P(j)}function Q(j){if(j===62){const ee=f.toLowerCase();return wm.includes(ee)?(n.consume(j),z):P(j)}return Ft(j)&&f.length<8?(n.consume(j),f+=String.fromCharCode(j),Q):P(j)}function H(j){return j===93?(n.consume(j),O):P(j)}function O(j){return j===62?(n.consume(j),z):j===45&&p===2?(n.consume(j),O):P(j)}function z(j){return j===null||Le(j)?(n.exit("htmlFlowData"),V(j)):(n.consume(j),z)}function V(j){return n.exit("htmlFlow"),r(j)}}function Jy(n,r,s){const o=this;return p;function p(f){return Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),_):s(f)}function _(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function eS(n,r,s){return o;function o(p){return n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),n.attempt(ll,r,s)}}const tS={name:"htmlText",tokenize:nS};function nS(n,r,s){const o=this;let p,_,f;return a;function a(O){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(O),c}function c(O){return O===33?(n.consume(O),h):O===47?(n.consume(O),M):O===63?(n.consume(O),y):Ft(O)?(n.consume(O),E):s(O)}function h(O){return O===45?(n.consume(O),d):O===91?(n.consume(O),_=0,k):Ft(O)?(n.consume(O),g):s(O)}function d(O){return O===45?(n.consume(O),w):s(O)}function u(O){return O===null?s(O):O===45?(n.consume(O),b):Le(O)?(f=u,$(O)):(n.consume(O),u)}function b(O){return O===45?(n.consume(O),w):u(O)}function w(O){return O===62?G(O):O===45?b(O):u(O)}function k(O){const z="CDATA[";return O===z.charCodeAt(_++)?(n.consume(O),_===z.length?x:k):s(O)}function x(O){return O===null?s(O):O===93?(n.consume(O),S):Le(O)?(f=x,$(O)):(n.consume(O),x)}function S(O){return O===93?(n.consume(O),v):x(O)}function v(O){return O===62?G(O):O===93?(n.consume(O),v):x(O)}function g(O){return O===null||O===62?G(O):Le(O)?(f=g,$(O)):(n.consume(O),g)}function y(O){return O===null?s(O):O===63?(n.consume(O),A):Le(O)?(f=y,$(O)):(n.consume(O),y)}function A(O){return O===62?G(O):y(O)}function M(O){return Ft(O)?(n.consume(O),D):s(O)}function D(O){return O===45||Ht(O)?(n.consume(O),D):T(O)}function T(O){return Le(O)?(f=T,$(O)):Pe(O)?(n.consume(O),T):G(O)}function E(O){return O===45||Ht(O)?(n.consume(O),E):O===47||O===62||at(O)?R(O):s(O)}function R(O){return O===47?(n.consume(O),G):O===58||O===95||Ft(O)?(n.consume(O),N):Le(O)?(f=R,$(O)):Pe(O)?(n.consume(O),R):G(O)}function N(O){return O===45||O===46||O===58||O===95||Ht(O)?(n.consume(O),N):I(O)}function I(O){return O===61?(n.consume(O),P):Le(O)?(f=I,$(O)):Pe(O)?(n.consume(O),I):R(O)}function P(O){return O===null||O===60||O===61||O===62||O===96?s(O):O===34||O===39?(n.consume(O),p=O,F):Le(O)?(f=P,$(O)):Pe(O)?(n.consume(O),P):(n.consume(O),Y)}function F(O){return O===p?(n.consume(O),p=void 0,K):O===null?s(O):Le(O)?(f=F,$(O)):(n.consume(O),F)}function Y(O){return O===null||O===34||O===39||O===60||O===61||O===96?s(O):O===47||O===62||at(O)?R(O):(n.consume(O),Y)}function K(O){return O===47||O===62||at(O)?R(O):s(O)}function G(O){return O===62?(n.consume(O),n.exit("htmlTextData"),n.exit("htmlText"),r):s(O)}function $(O){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),Q}function Q(O){return Pe(O)?$e(n,H,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):H(O)}function H(O){return n.enter("htmlTextData"),f(O)}}const Vu={name:"labelEnd",resolveAll:lS,resolveTo:aS,tokenize:oS},iS={tokenize:cS},rS={tokenize:uS},sS={tokenize:hS};function lS(n){let r=-1;const s=[];for(;++r<n.length;){const o=n[r][1];if(s.push(n[r]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const p=o.type==="labelImage"?4:2;o.type="data",r+=p}}return n.length!==s.length&&cn(n,0,n.length,s),n}function aS(n,r){let s=n.length,o=0,p,_,f,a;for(;s--;)if(p=n[s][1],_){if(p.type==="link"||p.type==="labelLink"&&p._inactive)break;n[s][0]==="enter"&&p.type==="labelLink"&&(p._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(p.type==="labelImage"||p.type==="labelLink")&&!p._balanced&&(_=s,p.type!=="labelLink")){o=2;break}}else p.type==="labelEnd"&&(f=s);const c={type:n[_][1].type==="labelLink"?"link":"image",start:{...n[_][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[_][1].start},end:{...n[f][1].end}},d={type:"labelText",start:{...n[_+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",c,r],["enter",h,r]],a=bn(a,n.slice(_+1,_+o+3)),a=bn(a,[["enter",d,r]]),a=bn(a,Na(r.parser.constructs.insideSpan.null,n.slice(_+o+4,f-3),r)),a=bn(a,[["exit",d,r],n[f-2],n[f-1],["exit",h,r]]),a=bn(a,n.slice(f+1)),a=bn(a,[["exit",c,r]]),cn(n,_,n.length,a),n}function oS(n,r,s){const o=this;let p=o.events.length,_,f;for(;p--;)if((o.events[p][1].type==="labelImage"||o.events[p][1].type==="labelLink")&&!o.events[p][1]._balanced){_=o.events[p][1];break}return a;function a(b){return _?_._inactive?u(b):(f=o.parser.defined.includes(An(o.sliceSerialize({start:_.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),c):s(b)}function c(b){return b===40?n.attempt(iS,d,f?d:u)(b):b===91?n.attempt(rS,d,f?h:u)(b):f?d(b):u(b)}function h(b){return n.attempt(sS,d,u)(b)}function d(b){return r(b)}function u(b){return _._balanced=!0,s(b)}}function cS(n,r,s){return o;function o(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),p}function p(u){return at(u)?el(n,_)(u):_(u)}function _(u){return u===41?d(u):Mg(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return at(u)?el(n,c)(u):d(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?Og(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function h(u){return at(u)?el(n,d)(u):d(u)}function d(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function uS(n,r,s){const o=this;return p;function p(a){return Lg.call(o,n,_,f,"reference","referenceMarker","referenceString")(a)}function _(a){return o.parser.defined.includes(An(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?r(a):s(a)}function f(a){return s(a)}}function hS(n,r,s){return o;function o(_){return n.enter("reference"),n.enter("referenceMarker"),n.consume(_),n.exit("referenceMarker"),p}function p(_){return _===93?(n.enter("referenceMarker"),n.consume(_),n.exit("referenceMarker"),n.exit("reference"),r):s(_)}}const fS={name:"labelStartImage",resolveAll:Vu.resolveAll,tokenize:dS};function dS(n,r,s){const o=this;return p;function p(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),_}function _(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),f):s(a)}function f(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(a):r(a)}}const pS={name:"labelStartLink",resolveAll:Vu.resolveAll,tokenize:mS};function mS(n,r,s){const o=this;return p;function p(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),_}function _(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const ru={name:"lineEnding",tokenize:gS};function gS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),$e(n,r,"linePrefix")}}const Ta={name:"thematicBreak",tokenize:_S};function _S(n,r,s){let o=0,p;return _;function _(h){return n.enter("thematicBreak"),f(h)}function f(h){return p=h,a(h)}function a(h){return h===p?(n.enter("thematicBreakSequence"),c(h)):o>=3&&(h===null||Le(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===p?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),Pe(h)?$e(n,a,"whitespace")(h):a(h))}}const Xt={continuation:{tokenize:bS},exit:wS,name:"list",tokenize:SS},vS={partial:!0,tokenize:xS},yS={partial:!0,tokenize:CS};function SS(n,r,s){const o=this,p=o.events[o.events.length-1];let _=p&&p[1].type==="linePrefix"?p[2].sliceSerialize(p[1],!0).length:0,f=0;return a;function a(w){const k=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:xu(w)){if(o.containerState.type||(o.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),w===42||w===45?n.check(Ta,s,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(w)}return s(w)}function c(w){return xu(w)&&++f<10?(n.consume(w),c):(!o.interrupt||f<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):s(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,n.check(ll,o.interrupt?s:d,n.attempt(vS,b,u))}function d(w){return o.containerState.initialBlankLine=!0,_++,b(w)}function u(w){return Pe(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),b):s(w)}function b(w){return o.containerState.size=_+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(w)}}function bS(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(ll,p,_);function p(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,$e(n,r,"listItemIndent",o.containerState.size+1)(a)}function _(a){return o.containerState.furtherBlankLines||!Pe(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(yS,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,$e(n,n.attempt(Xt,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function CS(n,r,s){const o=this;return $e(n,p,"listItemIndent",o.containerState.size+1);function p(_){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?r(_):s(_)}}function wS(n){n.exit(this.containerState.type)}function xS(n,r,s){const o=this;return $e(n,p,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function p(_){const f=o.events[o.events.length-1];return!Pe(_)&&f&&f[1].type==="listItemPrefixWhitespace"?r(_):s(_)}}const xm={name:"setextUnderline",resolveTo:ES,tokenize:kS};function ES(n,r){let s=n.length,o,p,_;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(p=s)}else n[s][1].type==="content"&&n.splice(s,1),!_&&n[s][1].type==="definition"&&(_=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[p][1].type="setextHeadingText",_?(n.splice(p,0,["enter",f,r]),n.splice(_+1,0,["exit",n[o][1],r]),n[o][1].end={...n[_][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function kS(n,r,s){const o=this;let p;return _;function _(h){let d=o.events.length,u;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){u=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(n.enter("setextHeadingLine"),p=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===p?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),Pe(h)?$e(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Le(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const AS={tokenize:TS};function TS(n){const r=this,s=n.attempt(ll,o,n.attempt(this.parser.constructs.flowInitial,p,$e(n,n.attempt(this.parser.constructs.flow,p,n.attempt(Oy,p)),"linePrefix")));return s;function o(_){if(_===null){n.consume(_);return}return n.enter("lineEndingBlank"),n.consume(_),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function p(_){if(_===null){n.consume(_);return}return n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const DS={resolveAll:Ng()},RS=Bg("string"),MS=Bg("text");function Bg(n){return{resolveAll:Ng(n==="text"?LS:void 0),tokenize:r};function r(s){const o=this,p=this.parser.constructs[n],_=s.attempt(p,f,a);return f;function f(d){return h(d)?_(d):a(d)}function a(d){if(d===null){s.consume(d);return}return s.enter("data"),s.consume(d),c}function c(d){return h(d)?(s.exit("data"),_(d)):(s.consume(d),c)}function h(d){if(d===null)return!0;const u=p[d];let b=-1;if(u)for(;++b<u.length;){const w=u[b];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function Ng(n){return r;function r(s,o){let p=-1,_;for(;++p<=s.length;)_===void 0?s[p]&&s[p][1].type==="data"&&(_=p,p++):(!s[p]||s[p][1].type!=="data")&&(p!==_+2&&(s[_][1].end=s[p-1][1].end,s.splice(_+2,p-_-2),p=_+2),_=void 0);return n?n(s,o):s}}function LS(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const o=n[s-1][1],p=r.sliceStream(o);let _=p.length,f=-1,a=0,c;for(;_--;){const h=p[_];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)a++,f--;if(f)break;f=-1}else if(h===-2)c=!0,a++;else if(h!==-1){_++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:_?f:o.start._bufferIndex+f,_index:o.start._index+_,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const OS={42:Xt,43:Xt,45:Xt,48:Xt,49:Xt,50:Xt,51:Xt,52:Xt,53:Xt,54:Xt,55:Xt,56:Xt,57:Xt,62:Ag},BS={91:Hy},NS={[-2]:iu,[-1]:iu,32:iu},jS={35:Vy,42:Ta,45:[xm,Ta],60:Wy,61:xm,95:Ta,96:Cm,126:Cm},zS={38:Dg,92:Tg},HS={[-5]:ru,[-4]:ru,[-3]:ru,33:fS,38:Dg,42:Eu,60:[py,tS],91:pS,92:[Fy,Tg],93:Vu,95:Eu,96:Ay},IS={null:[Eu,DS]},US={null:[42,95]},PS={null:[]},FS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:US,contentInitial:BS,disable:PS,document:OS,flow:jS,flowInitial:NS,insideSpan:IS,string:zS,text:HS},Symbol.toStringTag,{value:"Module"}));function qS(n,r,s){let o={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const p={},_=[];let f=[],a=[];const c={attempt:T(M),check:T(D),consume:g,enter:y,exit:A,interrupt:T(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:b,sliceStream:w,write:u};let d=r.tokenize.call(h,c);return r.resolveAll&&_.push(r),h;function u(I){return f=bn(f,I),S(),f[f.length-1]!==null?[]:(E(r,0),h.events=Na(_,h.events,h),h.events)}function b(I,P){return GS(w(I),P)}function w(I){return VS(f,I)}function k(){const{_bufferIndex:I,_index:P,line:F,column:Y,offset:K}=o;return{_bufferIndex:I,_index:P,line:F,column:Y,offset:K}}function x(I){p[I.line]=I.column,N()}function S(){let I;for(;o._index<f.length;){const P=f[o._index];if(typeof P=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<P.length;)v(P.charCodeAt(o._bufferIndex));else v(P)}}function v(I){d=d(I)}function g(I){Le(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,N()):I!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=I}function y(I,P){const F=P||{};return F.type=I,F.start=k(),h.events.push(["enter",F,h]),a.push(F),F}function A(I){const P=a.pop();return P.end=k(),h.events.push(["exit",P,h]),P}function M(I,P){E(I,P.from)}function D(I,P){P.restore()}function T(I,P){return F;function F(Y,K,G){let $,Q,H,O;return Array.isArray(Y)?V(Y):"tokenize"in Y?V([Y]):z(Y);function z(ge){return W;function W(q){const ce=q!==null&&ge[q],J=q!==null&&ge.null,ie=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(J)?J:J?[J]:[]];return V(ie)(q)}}function V(ge){return $=ge,Q=0,ge.length===0?G:j(ge[Q])}function j(ge){return W;function W(q){return O=R(),H=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?he():ge.tokenize.call(P?Object.assign(Object.create(h),P):h,c,ee,he)(q)}}function ee(ge){return I(H,O),K}function he(ge){return O.restore(),++Q<$.length?j($[Q]):G}}}function E(I,P){I.resolveAll&&!_.includes(I)&&_.push(I),I.resolve&&cn(h.events,P,h.events.length-P,I.resolve(h.events.slice(P),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function R(){const I=k(),P=h.previous,F=h.currentConstruct,Y=h.events.length,K=Array.from(a);return{from:Y,restore:G};function G(){o=I,h.previous=P,h.currentConstruct=F,h.events.length=Y,a=K,N()}}function N(){o.line in p&&o.column<2&&(o.column=p[o.line],o.offset+=p[o.line]-1)}}function VS(n,r){const s=r.start._index,o=r.start._bufferIndex,p=r.end._index,_=r.end._bufferIndex;let f;if(s===p)f=[n[s].slice(o,_)];else{if(f=n.slice(s,p),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}_>0&&f.push(n[p].slice(0,_))}return f}function GS(n,r){let s=-1;const o=[];let p;for(;++s<n.length;){const _=n[s];let f;if(typeof _=="string")f=_;else switch(_){case-5:{f="\r";break}case-4:{f=`
|
|
53
|
+
`;break}case-3:{f=`\r
|
|
54
|
+
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&p)continue;f=" ";break}default:f=String.fromCharCode(_)}p=_===-2,o.push(f)}return o.join("")}function $S(n){const o={constructs:Eg([FS,...(n||{}).extensions||[]]),content:p(ay),defined:[],document:p(cy),flow:p(AS),lazy:{},string:p(RS),text:p(MS)};return o;function p(_){return f;function f(a){return qS(o,_,a)}}}function YS(n){for(;!Rg(n););return n}const Em=/[\0\t\n\r]/g;function WS(){let n=1,r="",s=!0,o;return p;function p(_,f,a){const c=[];let h,d,u,b,w;for(_=r+(typeof _=="string"?_.toString():new TextDecoder(f||void 0).decode(_)),u=0,r="",s&&(_.charCodeAt(0)===65279&&u++,s=void 0);u<_.length;){if(Em.lastIndex=u,h=Em.exec(_),b=h&&h.index!==void 0?h.index:_.length,w=_.charCodeAt(b),!h){r=_.slice(u);break}if(w===10&&u===b&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),u<b&&(c.push(_.slice(u,b)),n+=b-u),w){case 0:{c.push(65533),n++;break}case 9:{for(d=Math.ceil(n/4)*4,c.push(-2);n++<d;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:o=!0,n=1}u=b+1}return a&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}const KS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XS(n){return n.replace(KS,QS)}function QS(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const p=s.charCodeAt(1),_=p===120||p===88;return kg(s.slice(_?2:1),_?16:10)}return qu(s)||n}const jg={}.hasOwnProperty;function ZS(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),JS(s)(YS($S(s).document().write(WS()(n,r,!0))))}function JS(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:_(kt),autolinkProtocol:R,autolinkEmail:R,atxHeading:_(Ye),blockQuote:_(J),characterEscape:R,characterReference:R,codeFenced:_(ie),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:_(ie,f),codeText:_(pe,f),codeTextData:R,data:R,codeFlowValue:R,definition:_(be),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:_(Ce),hardBreakEscape:_(ot),hardBreakTrailing:_(ot),htmlFlow:_(Me,f),htmlFlowData:R,htmlText:_(Me,f),htmlTextData:R,image:_(Dt),label:f,link:_(kt),listItem:_(qt),listItemValue:b,listOrdered:_(Ut,u),listUnordered:_(Ut),paragraph:_(Zt),reference:j,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:_(Ye),strong:_(mt),thematicBreak:_(ut)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:ce,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ge,characterReference:W,codeFenced:c(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:N,codeIndented:c(v),codeText:c(K),codeTextData:N,data:N,definition:c(),definitionDestinationString:A,definitionLabelString:g,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(F),htmlFlowData:N,htmlText:c(Y),htmlTextData:N,image:c($),label:H,labelText:Q,lineEnding:I,link:c(G),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:O,resourceTitleString:z,resource:V,setextHeading:c(E),setextHeadingLineSequence:T,setextHeadingText:D,strong:c(),thematicBreak:c()}};zg(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(fe){let ve={type:"root",children:[]};const xe={stack:[ve],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:d,data:s},ae=[];let De=-1;for(;++De<fe.length;)if(fe[De][1].type==="listOrdered"||fe[De][1].type==="listUnordered")if(fe[De][0]==="enter")ae.push(De);else{const Te=ae.pop();De=p(fe,Te,De)}for(De=-1;++De<fe.length;){const Te=r[fe[De][0]];jg.call(Te,fe[De][1].type)&&Te[fe[De][1].type].call(Object.assign({sliceSerialize:fe[De][2].sliceSerialize},xe),fe[De][1])}if(xe.tokenStack.length>0){const Te=xe.tokenStack[xe.tokenStack.length-1];(Te[1]||km).call(xe,void 0,Te[0])}for(ve.position={start:ki(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:ki(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},De=-1;++De<r.transforms.length;)ve=r.transforms[De](ve)||ve;return ve}function p(fe,ve,xe){let ae=ve-1,De=-1,Te=!1,He,Qe,Ze,Rt;for(;++ae<=xe;){const Je=fe[ae];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?De++:De--,Rt=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(He&&!Rt&&!De&&!Ze&&(Ze=ae),Rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Rt=void 0}if(!De&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||De===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(He){let un=ae;for(Qe=void 0;un--;){const Jt=fe[un];if(Jt[1].type==="lineEnding"||Jt[1].type==="lineEndingBlank"){if(Jt[0]==="exit")continue;Qe&&(fe[Qe][1].type="lineEndingBlank",Te=!0),Jt[1].type="lineEnding",Qe=un}else if(!(Jt[1].type==="linePrefix"||Jt[1].type==="blockQuotePrefix"||Jt[1].type==="blockQuotePrefixWhitespace"||Jt[1].type==="blockQuoteMarker"||Jt[1].type==="listItemIndent"))break}Ze&&(!Qe||Ze<Qe)&&(He._spread=!0),He.end=Object.assign({},Qe?fe[Qe][1].start:Je[1].end),fe.splice(Qe||ae,0,["exit",He,Je[2]]),ae++,xe++}if(Je[1].type==="listItemPrefix"){const un={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};He=un,fe.splice(ae,0,["enter",un,Je[2]]),ae++,xe++,Ze=void 0,Rt=!0}}}return fe[ve][1]._spread=Te,xe}function _(fe,ve){return xe;function xe(ae){a.call(this,fe(ae),ae),ve&&ve.call(this,ae)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(fe,ve,xe){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([ve,xe||void 0]),fe.position={start:ki(ve.start),end:void 0}}function c(fe){return ve;function ve(xe){fe&&fe.call(this,xe),h.call(this,xe)}}function h(fe,ve){const xe=this.stack.pop(),ae=this.tokenStack.pop();if(ae)ae[0].type!==fe.type&&(ve?ve.call(this,fe,ae[0]):(ae[1]||km).call(this,fe,ae[0]));else throw new Error("Cannot close `"+fe.type+"` ("+Js({start:fe.start,end:fe.end})+"): it’s not open");xe.position.end=ki(fe.end)}function d(){return Fu(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function b(fe){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function w(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=fe}function k(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=fe}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe.replace(/(\r?\n|\r)$/g,"")}function g(fe){const ve=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ve,xe.identifier=An(this.sliceSerialize(fe)).toLowerCase()}function y(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.title=fe}function A(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.url=fe}function M(fe){const ve=this.stack[this.stack.length-1];if(!ve.depth){const xe=this.sliceSerialize(fe).length;ve.depth=xe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function T(fe){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function R(fe){const xe=this.stack[this.stack.length-1].children;let ae=xe[xe.length-1];(!ae||ae.type!=="text")&&(ae=Ge(),ae.position={start:ki(fe.start),end:void 0},xe.push(ae)),this.stack.push(ae)}function N(fe){const ve=this.stack.pop();ve.value+=this.sliceSerialize(fe),ve.position.end=ki(fe.end)}function I(fe){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ve.children[ve.children.length-1];xe.position.end=ki(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ve.type)&&(R.call(this,fe),N.call(this,fe))}function P(){this.data.atHardBreak=!0}function F(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function Y(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function K(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function G(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ve,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function $(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ve,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Q(fe){const ve=this.sliceSerialize(fe),xe=this.stack[this.stack.length-2];xe.label=XS(ve),xe.identifier=An(ve).toLowerCase()}function H(){const fe=this.stack[this.stack.length-1],ve=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const ae=fe.children;xe.children=ae}else xe.alt=ve}function O(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.url=fe}function z(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.title=fe}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ee(fe){const ve=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ve,xe.identifier=An(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function he(fe){this.data.characterReferenceType=fe.type}function ge(fe){const ve=this.sliceSerialize(fe),xe=this.data.characterReferenceType;let ae;xe?(ae=kg(ve,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ae=qu(ve);const De=this.stack[this.stack.length-1];De.value+=ae}function W(fe){const ve=this.stack.pop();ve.position.end=ki(fe.end)}function q(fe){N.call(this,fe);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(fe)}function ce(fe){N.call(this,fe);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(fe)}function J(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ce(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function ot(){return{type:"break"}}function Me(){return{type:"html",value:""}}function Dt(){return{type:"image",title:null,url:"",alt:null}}function kt(){return{type:"link",title:null,url:"",children:[]}}function Ut(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function qt(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Zt(){return{type:"paragraph",children:[]}}function mt(){return{type:"strong",children:[]}}function Ge(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function ki(n){return{line:n.line,column:n.column,offset:n.offset}}function zg(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?zg(n,o):eb(n,o)}}function eb(n,r){let s;for(s in r)if(jg.call(r,s))switch(s){case"canContainEols":{const o=r[s];o&&n[s].push(...o);break}case"transforms":{const o=r[s];o&&n[s].push(...o);break}case"enter":case"exit":{const o=r[s];o&&Object.assign(n[s],o);break}}}function km(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Js({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Js({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Js({start:r.start,end:r.end})+") is still open")}function tb(n){const r=this;r.parser=s;function s(o){return ZS(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function nb(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function ib(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
55
|
+
`}]}function rb(n,r){const s=r.value?r.value+`
|
|
56
|
+
`:"",o={},p=r.lang?r.lang.split(/\s+/):[];p.length>0&&(o.className=["language-"+p[0]]);let _={type:"element",tagName:"code",properties:o,children:[{type:"text",value:s}]};return r.meta&&(_.data={meta:r.meta}),n.patch(r,_),_=n.applyData(r,_),_={type:"element",tagName:"pre",properties:{},children:[_]},n.patch(r,_),_}function sb(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function lb(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function ab(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),p=Jr(o.toLowerCase()),_=n.footnoteOrder.indexOf(o);let f,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),f=n.footnoteOrder.length):f=_+1,a+=1,n.footnoteCounts.set(o,a);const c={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+p,id:s+"fnref-"+p+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(r,h),n.applyData(r,h)}function ob(n,r){const s={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function cb(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function Hg(n,r){const s=r.referenceType;let o="]";if(s==="collapsed"?o+="[]":s==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const p=n.all(r),_=p[0];_&&_.type==="text"?_.value="["+_.value:p.unshift({type:"text",value:"["});const f=p[p.length-1];return f&&f.type==="text"?f.value+=o:p.push({type:"text",value:o}),p}function ub(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Hg(n,r);const p={src:Jr(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(p.title=o.title);const _={type:"element",tagName:"img",properties:p,children:[]};return n.patch(r,_),n.applyData(r,_)}function hb(n,r){const s={src:Jr(r.url)};r.alt!==null&&r.alt!==void 0&&(s.alt=r.alt),r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return n.patch(r,o),n.applyData(r,o)}function fb(n,r){const s={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,s);const o={type:"element",tagName:"code",properties:{},children:[s]};return n.patch(r,o),n.applyData(r,o)}function db(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Hg(n,r);const p={href:Jr(o.url||"")};o.title!==null&&o.title!==void 0&&(p.title=o.title);const _={type:"element",tagName:"a",properties:p,children:n.all(r)};return n.patch(r,_),n.applyData(r,_)}function pb(n,r){const s={href:Jr(r.url)};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function mb(n,r,s){const o=n.all(r),p=s?gb(s):Ig(r),_={},f=[];if(typeof r.checked=="boolean"){const d=o[0];let u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},o.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),_.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const d=o[a];(p||a!==0||d.type!=="element"||d.tagName!=="p")&&f.push({type:"text",value:`
|
|
57
|
+
`}),d.type==="element"&&d.tagName==="p"&&!p?f.push(...d.children):f.push(d)}const c=o[o.length-1];c&&(p||c.type!=="element"||c.tagName!=="p")&&f.push({type:"text",value:`
|
|
58
|
+
`});const h={type:"element",tagName:"li",properties:_,children:f};return n.patch(r,h),n.applyData(r,h)}function gb(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let o=-1;for(;!r&&++o<s.length;)r=Ig(s[o])}return r}function Ig(n){const r=n.spread;return r??n.children.length>1}function _b(n,r){const s={},o=n.all(r);let p=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++p<o.length;){const f=o[p];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const _={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(o,!0)};return n.patch(r,_),n.applyData(r,_)}function vb(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function yb(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function Sb(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function bb(n,r){const s=n.all(r),o=s.shift(),p=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(r.children[0],f),p.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},a=Hu(r.children[1]),c=vg(r.children[r.children.length-1]);a&&c&&(f.position={start:a,end:c}),p.push(f)}const _={type:"element",tagName:"table",properties:{},children:n.wrap(p,!0)};return n.patch(r,_),n.applyData(r,_)}function Cb(n,r,s){const o=s?s.children:void 0,_=(o?o.indexOf(r):1)===0?"th":"td",f=s&&s.type==="table"?s.align:void 0,a=f?f.length:r.children.length;let c=-1;const h=[];for(;++c<a;){const u=r.children[c],b={},w=f?f[c]:void 0;w&&(b.align=w);let k={type:"element",tagName:_,properties:b,children:[]};u&&(k.children=n.all(u),n.patch(u,k),k=n.applyData(u,k)),h.push(k)}const d={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,d),n.applyData(r,d)}function wb(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const Am=9,Tm=32;function xb(n){const r=String(n),s=/\r?\n|\r/g;let o=s.exec(r),p=0;const _=[];for(;o;)_.push(Dm(r.slice(p,o.index),p>0,!0),o[0]),p=o.index+o[0].length,o=s.exec(r);return _.push(Dm(r.slice(p),p>0,!1)),_.join("")}function Dm(n,r,s){let o=0,p=n.length;if(r){let _=n.codePointAt(o);for(;_===Am||_===Tm;)o++,_=n.codePointAt(o)}if(s){let _=n.codePointAt(p-1);for(;_===Am||_===Tm;)p--,_=n.codePointAt(p-1)}return p>o?n.slice(o,p):""}function Eb(n,r){const s={type:"text",value:xb(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function kb(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const Ab={blockquote:nb,break:ib,code:rb,delete:sb,emphasis:lb,footnoteReference:ab,heading:ob,html:cb,imageReference:ub,image:hb,inlineCode:fb,linkReference:db,link:pb,listItem:mb,list:_b,paragraph:vb,root:yb,strong:Sb,table:bb,tableCell:wb,tableRow:Cb,text:Eb,thematicBreak:kb,toml:Ca,yaml:Ca,definition:Ca,footnoteDefinition:Ca};function Ca(){}const Ug=-1,ja=0,tl=1,Ra=2,Gu=3,$u=4,Yu=5,Wu=6,Pg=7,Fg=8,Tb=typeof self=="object"?self:globalThis,Rm=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new Tb[n](r)},Db=(n,r)=>{const s=(p,_)=>(n.set(_,p),p),o=p=>{if(n.has(p))return n.get(p);const[_,f]=r[p];switch(_){case ja:case Ug:return s(f,p);case tl:{const a=s([],p);for(const c of f)a.push(o(c));return a}case Ra:{const a=s({},p);for(const[c,h]of f)a[o(c)]=o(h);return a}case Gu:return s(new Date(f),p);case $u:{const{source:a,flags:c}=f;return s(new RegExp(a,c),p)}case Yu:{const a=s(new Map,p);for(const[c,h]of f)a.set(o(c),o(h));return a}case Wu:{const a=s(new Set,p);for(const c of f)a.add(o(c));return a}case Pg:{const{name:a,message:c}=f;return s(Rm(a,c),p)}case Fg:return s(BigInt(f),p);case"BigInt":return s(Object(BigInt(f)),p);case"ArrayBuffer":return s(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:a}=new Uint8Array(f);return s(new DataView(a),f)}}return s(Rm(_,f),p)};return o},Mm=n=>Db(new Map,n)(0),Gr="",{toString:Rb}={},{keys:Mb}=Object,Qs=n=>{const r=typeof n;if(r!=="object"||!n)return[ja,r];const s=Rb.call(n).slice(8,-1);switch(s){case"Array":return[tl,Gr];case"Object":return[Ra,Gr];case"Date":return[Gu,Gr];case"RegExp":return[$u,Gr];case"Map":return[Yu,Gr];case"Set":return[Wu,Gr];case"DataView":return[tl,s]}return s.includes("Array")?[tl,s]:s.includes("Error")?[Pg,s]:[Ra,s]},wa=([n,r])=>n===ja&&(r==="function"||r==="symbol"),Lb=(n,r,s,o)=>{const p=(f,a)=>{const c=o.push(f)-1;return s.set(a,c),c},_=f=>{if(s.has(f))return s.get(f);let[a,c]=Qs(f);switch(a){case ja:{let d=f;switch(c){case"bigint":a=Fg,d=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return p([Ug],f)}return p([a,d],f)}case tl:{if(c){let b=f;return c==="DataView"?b=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(b=new Uint8Array(f)),p([c,[...b]],f)}const d=[],u=p([a,d],f);for(const b of f)d.push(_(b));return u}case Ra:{if(c)switch(c){case"BigInt":return p([c,f.toString()],f);case"Boolean":case"Number":case"String":return p([c,f.valueOf()],f)}if(r&&"toJSON"in f)return _(f.toJSON());const d=[],u=p([a,d],f);for(const b of Mb(f))(n||!wa(Qs(f[b])))&&d.push([_(b),_(f[b])]);return u}case Gu:return p([a,f.toISOString()],f);case $u:{const{source:d,flags:u}=f;return p([a,{source:d,flags:u}],f)}case Yu:{const d=[],u=p([a,d],f);for(const[b,w]of f)(n||!(wa(Qs(b))||wa(Qs(w))))&&d.push([_(b),_(w)]);return u}case Wu:{const d=[],u=p([a,d],f);for(const b of f)(n||!wa(Qs(b)))&&d.push(_(b));return u}}const{message:h}=f;return p([a,{name:c,message:h}],f)};return _},Lm=(n,{json:r,lossy:s}={})=>{const o=[];return Lb(!(r||s),!!r,new Map,o)(n),o},Ma=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?Mm(Lm(n,r)):structuredClone(n):(n,r)=>Mm(Lm(n,r));function Ob(n,r){const s=[{type:"text",value:"↩"}];return r>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),s}function Bb(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function Nb(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||Ob,o=n.options.footnoteBackLabel||Bb,p=n.options.footnoteLabel||"Footnotes",_=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const d=n.all(h),u=String(h.identifier).toUpperCase(),b=Jr(u.toLowerCase());let w=0;const k=[],x=n.footnoteCounts.get(u);for(;x!==void 0&&++w<=x;){k.length>0&&k.push({type:"text",value:" "});let g=typeof s=="string"?s:s(c,w);typeof g=="string"&&(g={type:"text",value:g}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,w),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const S=d[d.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const g=S.children[S.children.length-1];g&&g.type==="text"?g.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else d.push(...k);const v={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:n.wrap(d,!0)};n.patch(h,v),a.push(v)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:_,properties:{...Ma(f),id:"footnote-label"},children:[{type:"text",value:p}]},{type:"text",value:`
|
|
59
|
+
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
|
|
60
|
+
`}]}}const za=(function(n){if(n==null)return Ib;if(typeof n=="function")return Ha(n);if(typeof n=="object")return Array.isArray(n)?jb(n):zb(n);if(typeof n=="string")return Hb(n);throw new Error("Expected function, string, or object as test")});function jb(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=za(n[s]);return Ha(o);function o(...p){let _=-1;for(;++_<r.length;)if(r[_].apply(this,p))return!0;return!1}}function zb(n){const r=n;return Ha(s);function s(o){const p=o;let _;for(_ in n)if(p[_]!==r[_])return!1;return!0}}function Hb(n){return Ha(r);function r(s){return s&&s.type===n}}function Ha(n){return r;function r(s,o,p){return!!(Ub(s)&&n.call(this,s,typeof o=="number"?o:void 0,p||void 0))}}function Ib(){return!0}function Ub(n){return n!==null&&typeof n=="object"&&"type"in n}const qg=[],Pb=!0,ku=!1,Fb="skip";function Vg(n,r,s,o){let p;typeof r=="function"&&typeof s!="function"?(o=s,s=r):p=r;const _=za(p),f=o?-1:1;a(n,void 0,[])();function a(c,h,d){const u=c&&typeof c=="object"?c:{};if(typeof u.type=="string"){const w=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(c.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=qg,k,x,S;if((!r||_(c,h,d[d.length-1]||void 0))&&(w=qb(s(c,d)),w[0]===ku))return w;if("children"in c&&c.children){const v=c;if(v.children&&w[0]!==Fb)for(x=(o?v.children.length:-1)+f,S=d.concat(v);x>-1&&x<v.children.length;){const g=v.children[x];if(k=a(g,x,S)(),k[0]===ku)return k;x=typeof k[1]=="number"?k[1]:x+f}}return w}}}function qb(n){return Array.isArray(n)?n:typeof n=="number"?[Pb,n]:n==null?qg:[n]}function Ku(n,r,s,o){let p,_,f;typeof r=="function"&&typeof s!="function"?(_=void 0,f=r,p=s):(_=r,f=s,p=o),Vg(n,_,a,p);function a(c,h){const d=h[h.length-1],u=d?d.children.indexOf(c):void 0;return f(c,u,d)}}const Au={}.hasOwnProperty,Vb={};function Gb(n,r){const s=r||Vb,o=new Map,p=new Map,_=new Map,f={...Ab,...s.handlers},a={all:h,applyData:Yb,definitionById:o,footnoteById:p,footnoteCounts:_,footnoteOrder:[],handlers:f,one:c,options:s,patch:$b,wrap:Kb};return Ku(n,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const u=d.type==="definition"?o:p,b=String(d.identifier).toUpperCase();u.has(b)||u.set(b,d)}}),a;function c(d,u){const b=d.type,w=a.handlers[b];if(Au.call(a.handlers,b)&&w)return w(a,d,u);if(a.options.passThrough&&a.options.passThrough.includes(b)){if("children"in d){const{children:x,...S}=d,v=Ma(S);return v.children=a.all(d),v}return Ma(d)}return(a.options.unknownHandler||Wb)(a,d,u)}function h(d){const u=[];if("children"in d){const b=d.children;let w=-1;for(;++w<b.length;){const k=a.one(b[w],d);if(k){if(w&&b[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Om(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=Om(x.value))}Array.isArray(k)?u.push(...k):u.push(k)}}}return u}}function $b(n,r){n.position&&(r.position=O1(n))}function Yb(n,r){let s=r;if(n&&n.data){const o=n.data.hName,p=n.data.hChildren,_=n.data.hProperties;if(typeof o=="string")if(s.type==="element")s.tagName=o;else{const f="children"in s?s.children:[s];s={type:"element",tagName:o,properties:{},children:f}}s.type==="element"&&_&&Object.assign(s.properties,Ma(_)),"children"in s&&s.children&&p!==null&&p!==void 0&&(s.children=p)}return s}function Wb(n,r){const s=r.data||{},o="value"in r&&!(Au.call(s,"hProperties")||Au.call(s,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function Kb(n,r){const s=[];let o=-1;for(r&&s.push({type:"text",value:`
|
|
61
|
+
`});++o<n.length;)o&&s.push({type:"text",value:`
|
|
62
|
+
`}),s.push(n[o]);return r&&n.length>0&&s.push({type:"text",value:`
|
|
63
|
+
`}),s}function Om(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Bm(n,r){const s=Gb(n,r),o=s.one(n,void 0),p=Nb(s),_=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return p&&_.children.push({type:"text",value:`
|
|
64
|
+
`},p),_}function Xb(n,r){return n&&"run"in n?async function(s,o){const p=Bm(s,{file:o,...r});await n.run(p,o)}:function(s,o){return Bm(s,{file:o,...n||r})}}function Nm(n){if(n)throw n}var su,jm;function Qb(){if(jm)return su;jm=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,p=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},_=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var d=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},f=function(h,d){s&&d.name==="__proto__"?s(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},a=function(h,d){if(d==="__proto__")if(n.call(h,d)){if(o)return o(h,d).value}else return;return h[d]};return su=function c(){var h,d,u,b,w,k,x=arguments[0],S=1,v=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<v;++S)if(h=arguments[S],h!=null)for(d in h)u=a(x,d),b=a(h,d),x!==b&&(g&&b&&(_(b)||(w=p(b)))?(w?(w=!1,k=u&&p(u)?u:[]):k=u&&_(u)?u:{},f(x,{name:d,newValue:c(g,k,b)})):typeof b<"u"&&f(x,{name:d,newValue:b}));return x},su}var Zb=Qb();const lu=sg(Zb);function Tu(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function Jb(){const n=[],r={run:s,use:o};return r;function s(...p){let _=-1;const f=p.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...p);function a(c,...h){const d=n[++_];let u=-1;if(c){f(c);return}for(;++u<p.length;)(h[u]===null||h[u]===void 0)&&(h[u]=p[u]);p=h,d?eC(d,a)(...h):f(null,...h)}}function o(p){if(typeof p!="function")throw new TypeError("Expected `middelware` to be a function, not "+p);return n.push(p),r}}function eC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let c;a&&f.push(p);try{c=n.apply(this,f)}catch(h){const d=h;if(a&&s)throw d;return p(d)}a||(c&&c.then&&typeof c.then=="function"?c.then(_,p):c instanceof Error?p(c):_(c))}function p(f,...a){s||(s=!0,r(f,...a))}function _(f){p(null,f)}}const Ln={basename:tC,dirname:nC,extname:iC,join:rC,sep:"/"};function tC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');al(n);let s=0,o=-1,p=n.length,_;if(r===void 0||r.length===0||r.length>n.length){for(;p--;)if(n.codePointAt(p)===47){if(_){s=p+1;break}}else o<0&&(_=!0,o=p+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;p--;)if(n.codePointAt(p)===47){if(_){s=p+1;break}}else f<0&&(_=!0,f=p+1),a>-1&&(n.codePointAt(p)===r.codePointAt(a--)?a<0&&(o=p):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function nC(n){if(al(n),n.length===0)return".";let r=-1,s=n.length,o;for(;--s;)if(n.codePointAt(s)===47){if(o){r=s;break}}else o||(o=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function iC(n){al(n);let r=n.length,s=-1,o=0,p=-1,_=0,f;for(;r--;){const a=n.codePointAt(r);if(a===47){if(f){o=r+1;break}continue}s<0&&(f=!0,s=r+1),a===46?p<0?p=r:_!==1&&(_=1):p>-1&&(_=-1)}return p<0||s<0||_===0||_===1&&p===s-1&&p===o+1?"":n.slice(p,s)}function rC(...n){let r=-1,s;for(;++r<n.length;)al(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":sC(s)}function sC(n){al(n);const r=n.codePointAt(0)===47;let s=lC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function lC(n,r){let s="",o=0,p=-1,_=0,f=-1,a,c;for(;++f<=n.length;){if(f<n.length)a=n.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(p===f-1||_===1))if(p!==f-1&&_===2){if(s.length<2||o!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",o=0):(s=s.slice(0,c),o=s.length-1-s.lastIndexOf("/")),p=f,_=0;continue}}else if(s.length>0){s="",o=0,p=f,_=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(p+1,f):s=n.slice(p+1,f),o=f-p-1;p=f,_=0}else a===46&&_>-1?_++:_=-1}return s}function al(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const aC={cwd:oC};function oC(){return"/"}function Du(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function cC(n){if(typeof n=="string")n=new URL(n);else if(!Du(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return uC(n)}function uC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const o=r.codePointAt(s+2);if(o===70||o===102){const p=new TypeError("File URL path must not include encoded / characters");throw p.code="ERR_INVALID_FILE_URL_PATH",p}}return decodeURIComponent(r)}const au=["history","path","basename","stem","extname","dirname"];class Gg{constructor(r){let s;r?Du(r)?s={path:r}:typeof r=="string"||hC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":aC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<au.length;){const _=au[o];_ in s&&s[_]!==void 0&&s[_]!==null&&(this[_]=_==="history"?[...s[_]]:s[_])}let p;for(p in s)au.includes(p)||(this[p]=s[p])}get basename(){return typeof this.path=="string"?Ln.basename(this.path):void 0}set basename(r){cu(r,"basename"),ou(r,"basename"),this.path=Ln.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Ln.dirname(this.path):void 0}set dirname(r){zm(this.basename,"dirname"),this.path=Ln.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Ln.extname(this.path):void 0}set extname(r){if(ou(r,"extname"),zm(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ln.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Du(r)&&(r=cC(r)),cu(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Ln.basename(this.path,this.extname):void 0}set stem(r){cu(r,"stem"),ou(r,"stem"),this.path=Ln.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const p=this.message(r,s,o);throw p.fatal=!0,p}info(r,s,o){const p=this.message(r,s,o);return p.fatal=void 0,p}message(r,s,o){const p=new It(r,s,o);return this.path&&(p.name=this.path+":"+p.name,p.file=this.path),p.fatal=!1,this.messages.push(p),p}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function ou(n,r){if(n&&n.includes(Ln.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Ln.sep+"`")}function cu(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function zm(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function hC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const fC=(function(n){const o=this.constructor.prototype,p=o[n],_=function(){return p.apply(_,arguments)};return Object.setPrototypeOf(_,o),_}),dC={}.hasOwnProperty;class Xu extends fC{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=Jb()}copy(){const r=new Xu;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(lu(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(fu("data",this.frozen),this.namespace[r]=s,this):dC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(fu("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const p=s.call(r,...o);typeof p=="function"&&this.transformers.use(p)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=xa(r),o=this.parser||this.Parser;return uu("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),uu("process",this.parser||this.Parser),hu("process",this.compiler||this.Compiler),s?p(void 0,s):new Promise(p);function p(_,f){const a=xa(r),c=o.parse(a);o.run(c,a,function(d,u,b){if(d||!u||!b)return h(d);const w=u,k=o.stringify(w,b);gC(k)?b.value=k:b.result=k,h(d,b)});function h(d,u){d||!u?f(d):_?_(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),uu("processSync",this.parser||this.Parser),hu("processSync",this.compiler||this.Compiler),this.process(r,p),Im("processSync","process",s),o;function p(_,f){s=!0,Nm(_),o=f}}run(r,s,o){Hm(r),this.freeze();const p=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?_(void 0,o):new Promise(_);function _(f,a){const c=xa(s);p.run(r,c,h);function h(d,u,b){const w=u||r;d?a(d):f?f(w):o(void 0,w,b)}}}runSync(r,s){let o=!1,p;return this.run(r,s,_),Im("runSync","run",o),p;function _(f,a){Nm(f),p=a,o=!0}}stringify(r,s){this.freeze();const o=xa(s),p=this.compiler||this.Compiler;return hu("stringify",p),Hm(r),p(r,o)}use(r,...s){const o=this.attachers,p=this.namespace;if(fu("use",this.frozen),r!=null)if(typeof r=="function")c(r,s);else if(typeof r=="object")Array.isArray(r)?a(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function _(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...u]=h;c(d,u)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(p.settings=lu(!0,p.settings,h.settings))}function a(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const u=h[d];_(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,d){let u=-1,b=-1;for(;++u<o.length;)if(o[u][0]===h){b=u;break}if(b===-1)o.push([h,...d]);else if(d.length>0){let[w,...k]=d;const x=o[b][1];Tu(x)&&Tu(w)&&(w=lu(!0,x,w)),o[b]=[h,w,...k]}}}}const pC=new Xu().freeze();function uu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function hu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function fu(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hm(n){if(!Tu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Im(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function xa(n){return mC(n)?n:new Gg(n)}function mC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function gC(n){return typeof n=="string"||_C(n)}function _C(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const vC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Um=[],Pm={allowDangerousHtml:!0},yC=/^(https?|ircs?|mailto|xmpp)$/i,SC=[{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 $g(n){const r=bC(n),s=CC(n);return wC(r.runSync(r.parse(s),s),n)}function bC(n){const r=n.rehypePlugins||Um,s=n.remarkPlugins||Um,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Pm}:Pm;return pC().use(tb).use(s).use(Xb,o).use(r)}function CC(n){const r=n.children||"",s=new Gg;return typeof r=="string"&&(s.value=r),s}function wC(n,r){const s=r.allowedElements,o=r.allowElement,p=r.components,_=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,c=r.urlTransform||xC;for(const d of SC)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+vC+d.id,void 0);return Ku(n,h),H1(n,{Fragment:B.Fragment,components:p,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function h(d,u,b){if(d.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:d.value},u;if(d.type==="element"){let w;for(w in nu)if(Object.hasOwn(nu,w)&&Object.hasOwn(d.properties,w)){const k=d.properties[w],x=nu[w];(x===null||x.includes(d.tagName))&&(d.properties[w]=c(String(k||""),w,d))}}if(d.type==="element"){let w=s?!s.includes(d.tagName):_?_.includes(d.tagName):!1;if(!w&&o&&typeof u=="number"&&(w=!o(d,u,b)),w&&b&&typeof u=="number")return a&&d.children?b.children.splice(u,1,...d.children):b.children.splice(u,1),u}}}function xC(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),p=n.indexOf("/");return r===-1||p!==-1&&r>p||s!==-1&&r>s||o!==-1&&r>o||yC.test(n.slice(0,r))?n:""}function Fm(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,p=s.indexOf(r);for(;p!==-1;)o++,p=s.indexOf(r,p+r.length);return o}function EC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function kC(n,r,s){const p=za((s||{}).ignore||[]),_=AC(r);let f=-1;for(;++f<_.length;)Vg(n,"text",a);function a(h,d){let u=-1,b;for(;++u<d.length;){const w=d[u],k=b?b.children:void 0;if(p(w,k?k.indexOf(w):void 0,b))return;b=w}if(b)return c(h,d)}function c(h,d){const u=d[d.length-1],b=_[f][0],w=_[f][1];let k=0;const S=u.children.indexOf(h);let v=!1,g=[];b.lastIndex=0;let y=b.exec(h.value);for(;y;){const A=y.index,M={index:y.index,input:y.input,stack:[...d,h]};let D=w(...y,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=A+1:(k!==A&&g.push({type:"text",value:h.value.slice(k,A)}),Array.isArray(D)?g.push(...D):D&&g.push(D),k=A+y[0].length,v=!0),!b.global)break;y=b.exec(h.value)}return v?(k<h.value.length&&g.push({type:"text",value:h.value.slice(k)}),u.children.splice(S,1,...g)):g=[h],S+g.length}}function AC(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<s.length;){const p=s[o];r.push([TC(p[0]),DC(p[1])])}return r}function TC(n){return typeof n=="string"?new RegExp(EC(n),"g"):n}function DC(n){return typeof n=="function"?n:function(){return n}}const du="phrasing",pu=["autolink","link","image","label"];function RC(){return{transforms:[zC],enter:{literalAutolink:LC,literalAutolinkEmail:mu,literalAutolinkHttp:mu,literalAutolinkWww:mu},exit:{literalAutolink:jC,literalAutolinkEmail:NC,literalAutolinkHttp:OC,literalAutolinkWww:BC}}}function MC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:du,notInConstruct:pu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:du,notInConstruct:pu},{character:":",before:"[ps]",after:"\\/",inConstruct:du,notInConstruct:pu}]}}function LC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function mu(n){this.config.enter.autolinkProtocol.call(this,n)}function OC(n){this.config.exit.autolinkProtocol.call(this,n)}function BC(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function NC(n){this.config.exit.autolinkEmail.call(this,n)}function jC(n){this.exit(n)}function zC(n){kC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IC]],{ignore:["link","linkReference"]})}function HC(n,r,s,o,p){let _="";if(!Yg(p)||(/^w/i.test(r)&&(s=r+s,r="",_="http://"),!UC(s)))return!1;const f=PC(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:_+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function IC(n,r,s,o){return!Yg(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function UC(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function PC(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],o=s.indexOf(")");const p=Fm(n,"(");let _=Fm(n,")");for(;o!==-1&&p>_;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),_++;return[n,s]}function Yg(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||Qi(s)||Ba(s))&&(!r||s!==47)}Wg.peek=XC;function FC(){this.buffer()}function qC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function VC(){this.buffer()}function GC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function $C(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=An(this.sliceSerialize(n)).toLowerCase(),s.label=r}function YC(n){this.exit(n)}function WC(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=An(this.sliceSerialize(n)).toLowerCase(),s.label=r}function KC(n){this.exit(n)}function XC(){return"["}function Wg(n,r,s,o){const p=s.createTracker(o);let _=p.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return _+=p.move(s.safe(s.associationId(n),{after:"]",before:_})),a(),f(),_+=p.move("]"),_}function QC(){return{enter:{gfmFootnoteCallString:FC,gfmFootnoteCall:qC,gfmFootnoteDefinitionLabelString:VC,gfmFootnoteDefinition:GC},exit:{gfmFootnoteCallString:$C,gfmFootnoteCall:YC,gfmFootnoteDefinitionLabelString:WC,gfmFootnoteDefinition:KC}}}function ZC(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:Wg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,p,_,f){const a=_.createTracker(f);let c=a.move("[^");const h=_.enter("footnoteDefinition"),d=_.enter("label");return c+=a.move(_.safe(_.associationId(o),{before:c,after:"]"})),d(),c+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),c+=a.move((r?`
|
|
65
|
+
`:" ")+_.indentLines(_.containerFlow(o,a.current()),r?Kg:JC))),h(),c}}function JC(n,r,s){return r===0?n:Kg(n,r,s)}function Kg(n,r,s){return(s?"":" ")+n}const ew=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xg.peek=sw;function tw(){return{canContainEols:["delete"],enter:{strikethrough:iw},exit:{strikethrough:rw}}}function nw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ew}],handlers:{delete:Xg}}}function iw(n){this.enter({type:"delete",children:[]},n)}function rw(n){this.exit(n)}function Xg(n,r,s,o){const p=s.createTracker(o),_=s.enter("strikethrough");let f=p.move("~~");return f+=s.containerPhrasing(n,{...p.current(),before:f,after:"~"}),f+=p.move("~~"),_(),f}function sw(){return"~"}function lw(n){return n.length}function aw(n,r){const s=r||{},o=(s.align||[]).concat(),p=s.stringLength||lw,_=[],f=[],a=[],c=[];let h=0,d=-1;for(;++d<n.length;){const x=[],S=[];let v=-1;for(n[d].length>h&&(h=n[d].length);++v<n[d].length;){const g=ow(n[d][v]);if(s.alignDelimiters!==!1){const y=p(g);S[v]=y,(c[v]===void 0||y>c[v])&&(c[v]=y)}x.push(g)}f[d]=x,a[d]=S}let u=-1;if(typeof o=="object"&&"length"in o)for(;++u<h;)_[u]=qm(o[u]);else{const x=qm(o);for(;++u<h;)_[u]=x}u=-1;const b=[],w=[];for(;++u<h;){const x=_[u];let S="",v="";x===99?(S=":",v=":"):x===108?S=":":x===114&&(v=":");let g=s.alignDelimiters===!1?1:Math.max(1,c[u]-S.length-v.length);const y=S+"-".repeat(g)+v;s.alignDelimiters!==!1&&(g=S.length+g+v.length,g>c[u]&&(c[u]=g),w[u]=g),b[u]=y}f.splice(1,0,b),a.splice(1,0,w),d=-1;const k=[];for(;++d<f.length;){const x=f[d],S=a[d];u=-1;const v=[];for(;++u<h;){const g=x[u]||"";let y="",A="";if(s.alignDelimiters!==!1){const M=c[u]-(S[u]||0),D=_[u];D===114?y=" ".repeat(M):D===99?M%2?(y=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(y=" ".repeat(M/2),A=y):A=" ".repeat(M)}s.delimiterStart!==!1&&!u&&v.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&g==="")&&(s.delimiterStart!==!1||u)&&v.push(" "),s.alignDelimiters!==!1&&v.push(y),v.push(g),s.alignDelimiters!==!1&&v.push(A),s.padding!==!1&&v.push(" "),(s.delimiterEnd!==!1||u!==h-1)&&v.push("|")}k.push(s.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return k.join(`
|
|
66
|
+
`)}function ow(n){return n==null?"":String(n)}function qm(n){const r=typeof n=="string"?n.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function cw(n,r,s,o){const p=s.enter("blockquote"),_=s.createTracker(o);_.move("> "),_.shift(2);const f=s.indentLines(s.containerFlow(n,_.current()),uw);return p(),f}function uw(n,r,s){return">"+(s?"":" ")+n}function hw(n,r){return Vm(n,r.inConstruct,!0)&&!Vm(n,r.notInConstruct,!1)}function Vm(n,r,s){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return s;let o=-1;for(;++o<r.length;)if(n.includes(r[o]))return!0;return!1}function Gm(n,r,s,o){let p=-1;for(;++p<s.unsafe.length;)if(s.unsafe[p].character===`
|
|
67
|
+
`&&hw(s.stack,s.unsafe[p]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
68
|
+
`}function fw(n,r){const s=String(n);let o=s.indexOf(r),p=o,_=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===p?++_>f&&(f=_):_=1,p=o+r.length,o=s.indexOf(r,p);return f}function dw(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function pw(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function mw(n,r,s,o){const p=pw(s),_=n.value||"",f=p==="`"?"GraveAccent":"Tilde";if(dw(n,s)){const u=s.enter("codeIndented"),b=s.indentLines(_,gw);return u(),b}const a=s.createTracker(o),c=p.repeat(Math.max(fw(_,p)+1,3)),h=s.enter("codeFenced");let d=a.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);d+=a.move(s.safe(n.lang,{before:d,after:" ",encode:["`"],...a.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);d+=a.move(" "),d+=a.move(s.safe(n.meta,{before:d,after:`
|
|
69
|
+
`,encode:["`"],...a.current()})),u()}return d+=a.move(`
|
|
70
|
+
`),_&&(d+=a.move(_+`
|
|
71
|
+
`)),d+=a.move(c),h(),d}function gw(n,r,s){return(s?"":" ")+n}function Qu(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function _w(n,r,s,o){const p=Qu(s),_=p==='"'?"Quote":"Apostrophe",f=s.enter("definition");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("[");return h+=c.move(s.safe(s.associationId(n),{before:h,after:"]",...c.current()})),h+=c.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":`
|
|
72
|
+
`,...c.current()}))),a(),n.title&&(a=s.enter(`title${_}`),h+=c.move(" "+p),h+=c.move(s.safe(n.title,{before:h,after:p,...c.current()})),h+=c.move(p),a()),f(),h}function vw(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function rl(n){return"&#x"+n.toString(16).toUpperCase()+";"}function La(n,r,s){const o=Xr(n),p=Xr(r);return o===void 0?p===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:p===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?p===void 0?{inside:!1,outside:!1}:p===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:p===void 0?{inside:!1,outside:!1}:p===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Qg.peek=yw;function Qg(n,r,s,o){const p=vw(s),_=s.enter("emphasis"),f=s.createTracker(o),a=f.move(p);let c=f.move(s.containerPhrasing(n,{after:p,before:a,...f.current()}));const h=c.charCodeAt(0),d=La(o.before.charCodeAt(o.before.length-1),h,p);d.inside&&(c=rl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=La(o.after.charCodeAt(0),u,p);b.inside&&(c=c.slice(0,-1)+rl(u));const w=f.move(p);return _(),s.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},a+c+w}function yw(n,r,s){return s.options.emphasis||"*"}function Sw(n,r){let s=!1;return Ku(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,ku}),!!((!n.depth||n.depth<3)&&Fu(n)&&(r.options.setext||s))}function bw(n,r,s,o){const p=Math.max(Math.min(6,n.depth||1),1),_=s.createTracker(o);if(Sw(n,s)){const d=s.enter("headingSetext"),u=s.enter("phrasing"),b=s.containerPhrasing(n,{..._.current(),before:`
|
|
73
|
+
`,after:`
|
|
74
|
+
`});return u(),d(),b+`
|
|
75
|
+
`+(p===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
76
|
+
`))+1))}const f="#".repeat(p),a=s.enter("headingAtx"),c=s.enter("phrasing");_.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
|
|
77
|
+
`,..._.current()});return/^[\t ]/.test(h)&&(h=rl(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),a(),h}Zg.peek=Cw;function Zg(n){return n.value||""}function Cw(){return"<"}Jg.peek=ww;function Jg(n,r,s,o){const p=Qu(s),_=p==='"'?"Quote":"Apostrophe",f=s.enter("image");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("![");return h+=c.move(s.safe(n.alt,{before:h,after:"]",...c.current()})),h+=c.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":")",...c.current()}))),a(),n.title&&(a=s.enter(`title${_}`),h+=c.move(" "+p),h+=c.move(s.safe(n.title,{before:h,after:p,...c.current()})),h+=c.move(p),a()),h+=c.move(")"),f(),h}function ww(){return"!"}e_.peek=xw;function e_(n,r,s,o){const p=n.referenceType,_=s.enter("imageReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("![");const h=s.safe(n.alt,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const d=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=d,_(),p==="full"||!h||h!==u?c+=a.move(u+"]"):p==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function xw(){return"!"}t_.peek=Ew;function t_(n,r,s){let o=n.value||"",p="`",_=-1;for(;new RegExp("(^|[^`])"+p+"([^`]|$)").test(o);)p+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++_<s.unsafe.length;){const f=s.unsafe[_],a=s.compilePattern(f);let c;if(f.atBreak)for(;c=a.exec(o);){let h=c.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(c.index+1)}}return p+o+p}function Ew(){return"`"}function n_(n,r){const s=Fu(n);return!!(!r.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(s===n.url||"mailto:"+s===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}i_.peek=kw;function i_(n,r,s,o){const p=Qu(s),_=p==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,c;if(n_(n,s)){const d=s.stack;s.stack=[],a=s.enter("autolink");let u=f.move("<");return u+=f.move(s.containerPhrasing(n,{before:u,after:">",...f.current()})),u+=f.move(">"),a(),s.stack=d,u}a=s.enter("link"),c=s.enter("label");let h=f.move("[");return h+=f.move(s.containerPhrasing(n,{before:h,after:"](",...f.current()})),h+=f.move("]("),c(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(c=s.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(s.safe(n.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=s.enter("destinationRaw"),h+=f.move(s.safe(n.url,{before:h,after:n.title?" ":")",...f.current()}))),c(),n.title&&(c=s.enter(`title${_}`),h+=f.move(" "+p),h+=f.move(s.safe(n.title,{before:h,after:p,...f.current()})),h+=f.move(p),c()),h+=f.move(")"),a(),h}function kw(n,r,s){return n_(n,s)?"<":"["}r_.peek=Aw;function r_(n,r,s,o){const p=n.referenceType,_=s.enter("linkReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("[");const h=s.containerPhrasing(n,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const d=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=d,_(),p==="full"||!h||h!==u?c+=a.move(u+"]"):p==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Aw(){return"["}function Zu(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function Tw(n){const r=Zu(n),s=n.options.bulletOther;if(!s)return r==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+s+"`) to be different");return s}function Dw(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function s_(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function Rw(n,r,s,o){const p=s.enter("list"),_=s.bulletCurrent;let f=n.ordered?Dw(s):Zu(s);const a=n.ordered?f==="."?")":".":Tw(s);let c=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const d=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&d&&(!d.children||!d.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(c=!0),s_(s)===f&&d){let u=-1;for(;++u<n.children.length;){const b=n.children[u];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(f=a),s.bulletCurrent=f;const h=s.containerFlow(n,o);return s.bulletLastUsed=f,s.bulletCurrent=_,p(),h}function Mw(n){const r=n.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function Lw(n,r,s,o){const p=Mw(s);let _=s.bulletCurrent||Zu(s);r&&r.type==="list"&&r.ordered&&(_=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+_);let f=_.length+1;(p==="tab"||p==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const a=s.createTracker(o);a.move(_+" ".repeat(f-_.length)),a.shift(f);const c=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,a.current()),d);return c(),h;function d(u,b,w){return b?(w?"":" ".repeat(f))+u:(w?_:_+" ".repeat(f-_.length))+u}}function Ow(n,r,s,o){const p=s.enter("paragraph"),_=s.enter("phrasing"),f=s.containerPhrasing(n,o);return _(),p(),f}const Bw=za(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Nw(n,r,s,o){return(n.children.some(function(f){return Bw(f)})?s.containerPhrasing:s.containerFlow).call(s,n,o)}function jw(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}l_.peek=zw;function l_(n,r,s,o){const p=jw(s),_=s.enter("strong"),f=s.createTracker(o),a=f.move(p+p);let c=f.move(s.containerPhrasing(n,{after:p,before:a,...f.current()}));const h=c.charCodeAt(0),d=La(o.before.charCodeAt(o.before.length-1),h,p);d.inside&&(c=rl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=La(o.after.charCodeAt(0),u,p);b.inside&&(c=c.slice(0,-1)+rl(u));const w=f.move(p+p);return _(),s.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},a+c+w}function zw(n,r,s){return s.options.strong||"*"}function Hw(n,r,s,o){return s.safe(n.value,o)}function Iw(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function Uw(n,r,s){const o=(s_(s)+(s.options.ruleSpaces?" ":"")).repeat(Iw(s));return s.options.ruleSpaces?o.slice(0,-1):o}const a_={blockquote:cw,break:Gm,code:mw,definition:_w,emphasis:Qg,hardBreak:Gm,heading:bw,html:Zg,image:Jg,imageReference:e_,inlineCode:t_,link:i_,linkReference:r_,list:Rw,listItem:Lw,paragraph:Ow,root:Nw,strong:l_,text:Hw,thematicBreak:Uw};function Pw(){return{enter:{table:Fw,tableData:$m,tableHeader:$m,tableRow:Vw},exit:{codeText:Gw,table:qw,tableData:gu,tableHeader:gu,tableRow:gu}}}function Fw(n){const r=n._align;this.enter({type:"table",align:r.map(function(s){return s==="none"?null:s}),children:[]},n),this.data.inTable=!0}function qw(n){this.exit(n),this.data.inTable=void 0}function Vw(n){this.enter({type:"tableRow",children:[]},n)}function gu(n){this.exit(n)}function $m(n){this.enter({type:"tableCell",children:[]},n)}function Gw(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,$w));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function $w(n,r){return r==="|"?r:n}function Yw(n){const r=n||{},s=r.tableCellPadding,o=r.tablePipeAlign,p=r.stringLength,_=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
78
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:f,tableCell:c,tableRow:a}};function f(w,k,x,S){return h(d(w,x,S),w.align)}function a(w,k,x,S){const v=u(w,x,S),g=h([v]);return g.slice(0,g.indexOf(`
|
|
79
|
+
`))}function c(w,k,x,S){const v=x.enter("tableCell"),g=x.enter("phrasing"),y=x.containerPhrasing(w,{...S,before:_,after:_});return g(),v(),y}function h(w,k){return aw(w,{align:k,alignDelimiters:o,padding:s,stringLength:p})}function d(w,k,x){const S=w.children;let v=-1;const g=[],y=k.enter("table");for(;++v<S.length;)g[v]=u(S[v],k,x);return y(),g}function u(w,k,x){const S=w.children;let v=-1;const g=[],y=k.enter("tableRow");for(;++v<S.length;)g[v]=c(S[v],w,k,x);return y(),g}function b(w,k,x){let S=a_.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Ww(){return{exit:{taskListCheckValueChecked:Ym,taskListCheckValueUnchecked:Ym,paragraph:Xw}}}function Kw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qw}}}function Ym(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function Xw(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const o=s.children[0];if(o&&o.type==="text"){const p=r.children;let _=-1,f;for(;++_<p.length;){const a=p[_];if(a.type==="paragraph"){f=a;break}}f===s&&(o.value=o.value.slice(1),o.value.length===0?s.children.shift():s.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,s.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function Qw(n,r,s,o){const p=n.children[0],_=typeof n.checked=="boolean"&&p&&p.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);_&&a.move(f);let c=a_.listItem(n,r,s,{...o,...a.current()});return _&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(d){return d+f}}function Zw(){return[RC(),QC(),tw(),Pw(),Ww()]}function Jw(n){return{extensions:[MC(),ZC(n),nw(),Yw(n),Kw()]}}const ex={tokenize:lx,partial:!0},o_={tokenize:ax,partial:!0},c_={tokenize:ox,partial:!0},u_={tokenize:cx,partial:!0},tx={tokenize:ux,partial:!0},h_={name:"wwwAutolink",tokenize:rx,previous:d_},f_={name:"protocolAutolink",tokenize:sx,previous:p_},ei={name:"emailAutolink",tokenize:ix,previous:m_},On={};function nx(){return{text:On}}let Xi=48;for(;Xi<123;)On[Xi]=ei,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);On[43]=ei;On[45]=ei;On[46]=ei;On[95]=ei;On[72]=[ei,f_];On[104]=[ei,f_];On[87]=[ei,h_];On[119]=[ei,h_];function ix(n,r,s){const o=this;let p,_;return f;function f(u){return!Ru(u)||!m_.call(o,o.previous)||Ju(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return Ru(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(tx,d,h)(u):u===45||u===95||Ht(u)?(_=!0,n.consume(u),c):d(u)}function h(u){return n.consume(u),p=!0,c}function d(u){return _&&p&&Ft(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function rx(n,r,s){const o=this;return p;function p(f){return f!==87&&f!==119||!d_.call(o,o.previous)||Ju(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(ex,n.attempt(o_,n.attempt(c_,_),s),s)(f))}function _(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function sx(n,r,s){const o=this;let p="",_=!1;return f;function f(u){return(u===72||u===104)&&p_.call(o,o.previous)&&!Ju(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),p+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(Ft(u)&&p.length<5)return p+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const b=p.toLowerCase();if(b==="http"||b==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),_?h:(_=!0,c)):s(u)}function h(u){return u===null||Da(u)||at(u)||Qi(u)||Ba(u)?s(u):n.attempt(o_,n.attempt(c_,d),s)(u)}function d(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function lx(n,r,s){let o=0;return p;function p(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),p):f===46&&o===3?(n.consume(f),_):s(f)}function _(f){return f===null?s(f):r(f)}}function ax(n,r,s){let o,p,_;return f;function f(h){return h===46||h===95?n.check(u_,c,a)(h):h===null||at(h)||Qi(h)||h!==45&&Ba(h)?c(h):(_=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(p=o,o=void 0),n.consume(h),f}function c(h){return p||o||!_?s(h):r(h)}}function ox(n,r){let s=0,o=0;return p;function p(f){return f===40?(s++,n.consume(f),p):f===41&&o<s?_(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?n.check(u_,r,_)(f):f===null||at(f)||Qi(f)?r(f):(n.consume(f),p)}function _(f){return f===41&&o++,n.consume(f),p}}function cx(n,r,s){return o;function o(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?(n.consume(a),o):a===38?(n.consume(a),_):a===93?(n.consume(a),p):a===60||a===null||at(a)||Qi(a)?r(a):s(a)}function p(a){return a===null||a===40||a===91||at(a)||Qi(a)?r(a):o(a)}function _(a){return Ft(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Ft(a)?(n.consume(a),f):s(a)}}function ux(n,r,s){return o;function o(_){return n.consume(_),p}function p(_){return Ht(_)?s(_):r(_)}}function d_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||at(n)}function p_(n){return!Ft(n)}function m_(n){return!(n===47||Ru(n))}function Ru(n){return n===43||n===45||n===46||n===95||Ht(n)}function Ju(n){let r=n.length,s=!1;for(;r--;){const o=n[r][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){s=!0;break}if(o._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const hx={tokenize:yx,partial:!0};function fx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gx,continuation:{tokenize:_x},exit:vx}},text:{91:{name:"gfmFootnoteCall",tokenize:mx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dx,resolveTo:px}}}}function dx(n,r,s){const o=this;let p=o.events.length;const _=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;p--;){const c=o.events[p][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!f||!f._balanced)return s(c);const h=An(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!_.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function px(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},p={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};p.end.column++,p.end.offset++,p.end._bufferIndex++;const _={type:"gfmFootnoteCallString",start:Object.assign({},p.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},_.start),end:Object.assign({},_.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",p,r],["exit",p,r],["enter",_,r],["enter",f,r],["exit",f,r],["exit",_,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function mx(n,r,s){const o=this,p=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let _=0,f;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(_>999||u===93&&!f||u===null||u===91||at(u))return s(u);if(u===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return p.includes(An(o.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return at(u)||(f=!0),_++,n.consume(u),u===92?d:h}function d(u){return u===91||u===92||u===93?(n.consume(u),_++,h):h(u)}}function gx(n,r,s){const o=this,p=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let _,f=0,a;return c;function c(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):s(k)}function d(k){if(f>999||k===93&&!a||k===null||k===91||at(k))return s(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return _=An(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return at(k)||(a=!0),f++,n.consume(k),k===92?u:d}function u(k){return k===91||k===92||k===93?(n.consume(k),f++,d):d(k)}function b(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),p.includes(_)||p.push(_),$e(n,w,"gfmFootnoteDefinitionWhitespace")):s(k)}function w(k){return r(k)}}function _x(n,r,s){return n.check(ll,r,n.attempt(hx,r,s))}function vx(n){n.exit("gfmFootnoteDefinition")}function yx(n,r,s){const o=this;return $e(n,p,"gfmFootnoteDefinitionIndent",5);function p(_){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(_):s(_)}}function Sx(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:_,resolveAll:p};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function p(f,a){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},b=[["enter",d,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",u,a]],w=a.parser.constructs.insideSpan.null;w&&cn(b,b.length,0,Na(w,f.slice(h+1,c),a)),cn(b,b.length,0,[["exit",u,a],["enter",f[c][1],a],["exit",f[c][1],a],["exit",d,a]]),cn(f,h-1,c-h+3,b),c=h+b.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function _(f,a,c){const h=this.previous,d=this.events;let u=0;return b;function b(k){return h===126&&d[d.length-1][1].type!=="characterEscape"?c(k):(f.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=Xr(h);if(k===126)return u>1?c(k):(f.consume(k),u++,w);if(u<2&&!s)return c(k);const S=f.exit("strikethroughSequenceTemporary"),v=Xr(k);return S._open=!v||v===2&&!!x,S._close=!x||x===2&&!!v,a(k)}}}class bx{constructor(){this.map=[]}add(r,s,o){Cx(this,r,s,o)}consume(r){if(this.map.sort(function(_,f){return _[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const o=[];for(;s>0;)s-=1,o.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];o.push(r.slice()),r.length=0;let p=o.pop();for(;p;){for(const _ of p)r.push(_);p=o.pop()}this.map.length=0}}function Cx(n,r,s,o){let p=0;if(!(s===0&&o.length===0)){for(;p<n.map.length;){if(n.map[p][0]===r){n.map[p][1]+=s,n.map[p][2].push(...o);return}p+=1}n.map.push([r,s,o])}}function wx(n,r){let s=!1;const o=[];for(;r<n.length;){const p=n[r];if(s){if(p[0]==="enter")p[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(p[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const _=o.length-1;o[_]=o[_]==="left"?"center":"right"}}else if(p[1].type==="tableDelimiterRow")break}else p[0]==="enter"&&p[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function xx(){return{flow:{null:{name:"table",tokenize:Ex,resolveAll:kx}}}}function Ex(n,r,s){const o=this;let p=0,_=0,f;return a;function a(N){let I=o.events.length-1;for(;I>-1;){const Y=o.events[I][1].type;if(Y==="lineEnding"||Y==="linePrefix")I--;else break}const P=I>-1?o.events[I][1].type:null,F=P==="tableHead"||P==="tableRow"?D:c;return F===D&&o.parser.lazy[o.now().line]?s(N):F(N)}function c(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(f=!0,_+=1),d(N)}function d(N){return N===null?s(N):Le(N)?_>1?(_=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):s(N):Pe(N)?$e(n,d,"whitespace")(N):(_+=1,f&&(f=!1,p+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),f=!0,d):(n.enter("data"),u(N)))}function u(N){return N===null||N===124||at(N)?(n.exit("data"),d(N)):(n.consume(N),N===92?b:u)}function b(N){return N===92||N===124?(n.consume(N),u):u(N)}function w(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?s(N):(n.enter("tableDelimiterRow"),f=!1,Pe(N)?$e(n,k,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):k(N))}function k(N){return N===45||N===58?S(N):N===124?(f=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):M(N)}function x(N){return Pe(N)?$e(n,S,"whitespace")(N):S(N)}function S(N){return N===58?(_+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),v):N===45?(_+=1,v(N)):N===null||Le(N)?A(N):M(N)}function v(N){return N===45?(n.enter("tableDelimiterFiller"),g(N)):M(N)}function g(N){return N===45?(n.consume(N),g):N===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),y):(n.exit("tableDelimiterFiller"),y(N))}function y(N){return Pe(N)?$e(n,A,"whitespace")(N):A(N)}function A(N){return N===124?k(N):N===null||Le(N)?!f||p!==_?M(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(N)):M(N)}function M(N){return s(N)}function D(N){return n.enter("tableRow"),T(N)}function T(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),T):N===null||Le(N)?(n.exit("tableRow"),r(N)):Pe(N)?$e(n,T,"whitespace")(N):(n.enter("data"),E(N))}function E(N){return N===null||N===124||at(N)?(n.exit("data"),T(N)):(n.consume(N),N===92?R:E)}function R(N){return N===92||N===124?(n.consume(N),E):E(N)}}function kx(n,r){let s=-1,o=!0,p=0,_=[0,0,0,0],f=[0,0,0,0],a=!1,c=0,h,d,u;const b=new bx;for(;++s<n.length;){const w=n[s],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,c!==0&&(Wm(b,r,c,h,d),d=void 0,c=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(s,0,[["enter",h,r]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,u=void 0,_=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(s,0,[["enter",d,r]])),p=k.type==="tableDelimiterRow"?2:d?3:1):p&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(_[1]!==0&&(f[0]=f[1],u=Ea(b,r,_,p,void 0,u),_=[0,0,0,0]),f[2]=s)):k.type==="tableCellDivider"&&(o?o=!1:(_[1]!==0&&(f[0]=f[1],u=Ea(b,r,_,p,void 0,u)),_=f,f=[_[1],s,0,0])):k.type==="tableHead"?(a=!0,c=s):k.type==="tableRow"||k.type==="tableDelimiterRow"?(c=s,_[1]!==0?(f[0]=f[1],u=Ea(b,r,_,p,s,u)):f[1]!==0&&(u=Ea(b,r,f,p,s,u)),p=0):p&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&Wm(b,r,c,h,d),b.consume(r.events),s=-1;++s<r.events.length;){const w=r.events[s];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=wx(r.events,s))}return n}function Ea(n,r,s,o,p,_){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(_.end=Object.assign({},$r(r.events,s[0])),n.add(s[0],0,[["exit",_,r]]));const c=$r(r.events,s[1]);if(_={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",_,r]]),s[2]!==0){const h=$r(r.events,s[2]),d=$r(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},d)};if(n.add(s[2],0,[["enter",u,r]]),o!==2){const b=r.events[s[2]],w=r.events[s[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",s[3]>s[2]+1){const k=s[2]+1,x=s[3]-s[2]-1;n.add(k,x,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return p!==void 0&&(_.end=Object.assign({},$r(r.events,p)),n.add(p,0,[["exit",_,r]]),_=void 0),_}function Wm(n,r,s,o,p){const _=[],f=$r(r.events,s);p&&(p.end=Object.assign({},f),_.push(["exit",p,r])),o.end=Object.assign({},f),_.push(["exit",o,r]),n.add(s+1,0,_)}function $r(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const Ax={name:"tasklistCheck",tokenize:Dx};function Tx(){return{text:{91:Ax}}}function Dx(n,r,s){const o=this;return p;function p(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),_)}function _(c){return at(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):s(c)}function a(c){return Le(c)?r(c):Pe(c)?n.check({tokenize:Rx},r,s)(c):s(c)}}function Rx(n,r,s){return $e(n,o,"whitespace");function o(p){return p===null?s(p):r(p)}}function Mx(n){return Eg([nx(),fx(),Sx(n),xx(),Tx()])}const Lx={};function g_(n){const r=this,s=n||Lx,o=r.data(),p=o.micromarkExtensions||(o.micromarkExtensions=[]),_=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);p.push(Mx(s)),_.push(Zw()),f.push(Jw(s))}const Ox=500,we={getAppPreferences(){return Ae("/api/settings/preferences")},updateAppPreferences(n){return Ae("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Ae("/api/diagnostics/runtime")},getCurrentProject(){return Ae("/api/projects/current")},pullCurrentProject(){return Ae("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Ae("/api/projects/recent")},connectProject(n){return Ae("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Ae("/api/tasks")},createTask(n){return Ae("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(){return Ae("/api/projects/harness")},applyHarness(){return Ae("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return Ae("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Ae("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},dispatchRoleCommand(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/round`)},getCodexReviewState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review`)},updateCodexReviewSettings(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestCodexReviewGate(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/request`,{method:"POST"})},retryCodexReviewGate(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/retry`,{method:"POST"})},skipCodexReviewGate(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideCodexReviewGate(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getCodexReviewReport(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/report`)},getTranslationSettings(){return Ae("/api/translation/settings")},updateTranslationSettings(n){return Ae("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return Ae("/api/translation/prompts")},testTranslationProvider(){return Ae("/api/translation/test",{method:"POST"})},startTranslationSession(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const o=new URLSearchParams({after:String(r)});return s!==void 0&&o.set("limit",String(s)),Ae(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},retryTranslation(n,r){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getCodexTranslationState(){return Ae("/api/translation/codex/state")},browseCodexTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return Ae(`/api/translation/codex/source-files${s}`)},createCodexFileTranslation(n){return Ae("/api/translation/codex/files",{method:"POST",body:JSON.stringify(n)})},readCodexFileTranslation(n){return Ae(`/api/translation/codex/files/${encodeURIComponent(n)}`)},createCodexBootstrap(n){return Ae("/api/translation/codex/bootstrap",{method:"POST",body:JSON.stringify(n)})},promoteCodexTranslation(n,r){return Ae(`/api/translation/codex/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Ae("/api/gateway/status")},updateGatewaySettings(n){return Ae("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Ae("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Ae("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Ae("/api/gateway/binding/reset",{method:"POST"})}};async function Ae(n,r={}){var p,_,f;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const o=await fetch(n,{...r,headers:s});if(!o.ok){const a=await o.json().catch(()=>null),c=(p=a==null?void 0:a.error)!=null&&p.hint?`${a.error.message} ${a.error.hint}`:((_=a==null?void 0:a.error)==null?void 0:_.message)??`Request failed: ${o.status}`,h=(f=a==null?void 0:a.error)==null?void 0:f.runtime,d=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${d}`)}return o.json()}function Bx({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:o,role:p,sessionId:_}){const[f,a]=ue.useState([]),[c,h]=ue.useState([]),[d,u]=ue.useState(""),[b,w]=ue.useState(!1),[k,x]=ue.useState("ready"),[S,v]=ue.useState(""),[g,y]=ue.useState(Date.now()),[A,M]=ue.useState(!1),[D,T]=ue.useState(""),[E,R]=ue.useState(0),N=ue.useRef(n),I=ue.useRef(1),P=ue.useRef(null);ue.useEffect(()=>{N.current=n},[n]),ue.useEffect(()=>{a([]),h([]),T(""),x("ready"),v(""),I.current=1;let j=!1,ee;const he=()=>{j||(ee=window.setTimeout(ge,N.current?200:1e3))},ge=async()=>{if(!j)try{const W=await we.pollTranslationSession(_,I.current);if(j)return;K(W.events),I.current=W.nextCursor,x(W.status),N.current&&v(Wx(new Date().toISOString()))}catch(W){j||T(W instanceof Error?W.message:"Translation poll failed.")}finally{he()}};return we.startTranslationSession(o,p).then(W=>{j||(x(W.status),I.current=W.nextCursor,ge())}).catch(W=>{j||T(W instanceof Error?W.message:"Translation start failed.")}),()=>{j=!0,ee!==void 0&&window.clearTimeout(ee),we.stopTranslationSession(_).catch(()=>{})}},[_,o,p]),ue.useEffect(()=>{if(!n)return;const j=P.current;if(!j)return;const ee=window.requestAnimationFrame(()=>{j.scrollTop=j.scrollHeight});return()=>window.cancelAnimationFrame(ee)},[n,E]);const F=Px(f);ue.useEffect(()=>{if(!F)return;y(Date.now());const j=window.setInterval(()=>y(Date.now()),250);return()=>window.clearInterval(j)},[F]);async function Y(j=!1){M(!0),T(""),w(!1);try{const ee=await we.translateUserInput(o,p,{text:d,mode:j?"auto-send":"review-before-send",useContext:!1,send:j});ee.sent?(u(""),w(!1)):(u(ee.englishPreview),w(!0))}catch(ee){T(ee instanceof Error?ee.message:"Translation failed.")}finally{M(!1)}}function K(j){if(j.length===0)return;for(const he of j)he.type==="status"?x(he.status):he.type==="error"?T(he.message):he.type==="failures"&&h(he.failures);const ee=j.filter(he=>he.type==="entry");ee.length>0&&(a(he=>{const ge=ee.reduce((q,ce)=>$x(q,ce.entry),he),W=qx(ge);return W.removedIds.size>0&&h(q=>q.filter(ce=>!W.removedIds.has(ce.translationId))),W.entries}),R(he=>he+1))}async function G(){if(d.trim()){M(!0),T("");try{await we.sendTranslatedInput(o,p,{englishText:d}),u(""),w(!1)}catch(j){T(j instanceof Error?j.message:"Failed to send English input.")}finally{M(!1)}}}function $(j){j.key!=="Enter"||j.shiftKey||j.nativeEvent.isComposing||(j.preventDefault(),!A&&d.trim()&&(b?G():Y(r)))}async function Q(){a([]),h([]),I.current=1,await we.clearTranslationSession(_).catch(j=>T(j.message))}async function H(){M(!0),T("");try{const j=await we.ignoreTranslationFailures(_);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function O(){M(!0),T("");try{const j=await we.retryTranslationFailures(_);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to retry translation failures.")}finally{M(!1)}}const z=Fx(f,k,g),V=c.length;return B.jsxs("aside",{className:"translation-panel",children:[B.jsxs("header",{className:"translation-panel-header",children:[B.jsxs("div",{className:"translation-panel-titlebar",children:[B.jsx("h2",{children:"Translation"}),B.jsxs("div",{className:"translation-panel-actions",children:[V>0?B.jsxs(B.Fragment,{children:[B.jsxs("button",{type:"button",disabled:A,onClick:()=>void H(),children:["Ignore ",V]}),B.jsxs("button",{type:"button",disabled:A,onClick:()=>void O(),children:["Retry ",V]})]}):null,B.jsx("button",{type:"button",onClick:()=>void Q(),children:"Clear"})]})]}),B.jsxs("div",{className:"translation-status-row",children:[B.jsxs("p",{children:["Codex · target ",Nx(s)," · ",z]}),B.jsx("p",{children:S?`poll ${S}`:"poll -"})]})]}),D?B.jsx("div",{className:"error-banner",children:D}):null,B.jsxs("div",{className:"translation-entry-list",ref:P,children:[f.length===0?B.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(j=>B.jsx(Ix,{entry:j},j.id))]}),B.jsx("div",{className:"translation-composer",children:B.jsxs("div",{className:"translation-composer-row",children:[B.jsx("textarea",{value:d,onChange:j=>{u(j.target.value),j.target.value.trim()||w(!1)},onKeyDown:$,placeholder:"输入中文,先翻译成英文工程指令..."}),B.jsx("div",{className:"translation-composer-actions",children:B.jsx("button",{type:"button",disabled:A||!b||!d.trim(),onClick:()=>void G(),children:"Send English"})})]})})]})}function Nx(n){var r;return((r=ug.find(s=>s.value===n))==null?void 0:r.label)??n}function jx({open:n,taskSlug:r,targetLanguage:s,onClose:o}){const[p,_]=ue.useState(!1),[f,a]=ue.useState(""),[c,h]=ue.useState(null),[d,u]=ue.useState(""),[b,w]=ue.useState(""),[k,x]=ue.useState(""),[S,v]=ue.useState(!1),[g,y]=ue.useState(null),[A,M]=ue.useState(""),[D,T]=ue.useState(""),[E,R]=ue.useState(""),[N,I]=ue.useState(!1);ue.useEffect(()=>{if(!n)return;let $=!1,Q;const H=async()=>{$||(await P(!0),$||(Q=window.setTimeout(H,2e3)))};return H(),()=>{$=!0,Q!==void 0&&window.clearTimeout(Q)}},[n,d]);async function P($=!1){try{const Q=await we.getCodexTranslationState();if(h(Q),!d&&Q.fileIndex.jobs[0])F(Q.fileIndex.jobs[0].id);else if($&&d){const H=await we.readCodexFileTranslation(d);w(H.output),x(H.report)}}catch(Q){a(Q instanceof Error?Q.message:"Failed to load file translations.")}}async function F($){u($),w(""),x("");try{const Q=await we.readCodexFileTranslation($);w(Q.output),x(Q.report)}catch(Q){a(Q instanceof Error?Q.message:"Failed to read translated file.")}}async function Y(){v(!0),await K(A,D)}async function K($="",Q=""){I(!0),a("");try{const H=await we.browseCodexTranslationSourceFiles({path:$,query:Q,limit:250});y(H),M(H.currentPath),T(Q)}catch(H){a(H instanceof Error?H.message:"Failed to browse source files.")}finally{I(!1)}}async function G($=E){const Q=$.trim();if(!(!Q||!r)){_(!0),a("");try{const H=await we.createCodexFileTranslation({taskSlug:r,sourcePath:Q,targetLanguage:s});v(!1),await P(),await F(H.id)}catch(H){a(H instanceof Error?H.message:"Failed to create file translation.")}finally{_(!1)}}}return n?B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:B.jsx(Hx,{busy:p,error:f,state:c,selectedJobId:d,output:b,report:k,onClose:()=>{v(!1),o()},onRefresh:()=>void P(),onSelectJob:$=>void F($),onTranslate:()=>void Y()})}),S?B.jsx(zx,{busy:p||N,state:g,currentPath:A,query:D,selectedPath:E,onBrowse:($,Q)=>void K($,Q),onClose:()=>v(!1),onQueryChange:T,onSelectPath:R,onTranslate:()=>void G()}):null]}):null}function zx({busy:n,state:r,currentPath:s,query:o,selectedPath:p,onBrowse:_,onClose:f,onQueryChange:a,onSelectPath:c,onTranslate:h}){const d=(r==null?void 0:r.entries)??[],u=d.filter(w=>w.type==="directory"),b=d.filter(w=>w.type==="file");return B.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:B.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Select Source File"}),B.jsx("p",{children:s||"."})]}),B.jsx("button",{type:"button",onClick:f,children:"Close"})]}),B.jsxs("div",{className:"translation-file-browser-controls",children:[B.jsxs("div",{className:"translation-file-browser-nav",children:[B.jsx("button",{type:"button",disabled:n||!s,onClick:()=>_((r==null?void 0:r.parentPath)??"",""),children:"Up"}),B.jsx("button",{type:"button",disabled:n||!s,onClick:()=>_("",""),children:"Root"})]}),B.jsxs("form",{className:"translation-file-browser-search",onSubmit:w=>{w.preventDefault(),_(s,o)},children:[B.jsx("input",{value:o,onChange:w=>a(w.target.value),placeholder:"Search files"}),B.jsx("button",{type:"submit",disabled:n,children:"Search"}),B.jsx("button",{type:"button",disabled:n||!o,onClick:()=>_(s,""),children:"Clear"})]})]}),B.jsxs("div",{className:"translation-file-browser-layout",children:[B.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?B.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&d.length===0?B.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?B.jsxs("div",{className:"translation-file-browser-group",children:[B.jsx("h3",{children:"Folders"}),u.map(w=>B.jsx(Km,{entry:w,selected:p===w.path,onBrowse:_,onSelectPath:c},w.path))]}):null,b.length>0?B.jsxs("div",{className:"translation-file-browser-group",children:[B.jsx("h3",{children:"Files"}),b.map(w=>B.jsx(Km,{entry:w,selected:p===w.path,onBrowse:_,onSelectPath:c},w.path))]}):null,r!=null&&r.truncated?B.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),B.jsxs("aside",{className:"translation-file-browser-selection",children:[B.jsxs("label",{children:[B.jsx("span",{children:"Source path"}),B.jsx("input",{value:p,onChange:w=>c(w.target.value)})]}),B.jsx("button",{type:"button",disabled:n||!p.trim(),onClick:h,children:"Translate File"})]})]})]})})}function Km({entry:n,selected:r,onBrowse:s,onSelectPath:o}){const p=n.type==="directory";return B.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>p?s(n.path,""):o(n.path),onDoubleClick:()=>p?s(n.path,""):void 0,children:[B.jsx("span",{children:p?"DIR":"FILE"}),B.jsx("strong",{children:n.name}),B.jsx("small",{children:n.path})]})}function Hx({busy:n,error:r,state:s,selectedJobId:o,output:p,report:_,onClose:f,onRefresh:a,onSelectJob:c,onTranslate:h}){const d=(s==null?void 0:s.fileIndex.jobs)??[],u=d.find(b=>b.id===o);return B.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[B.jsxs("header",{className:"file-translation-header",children:[B.jsxs("div",{children:[B.jsx("h2",{children:"File Translation"}),B.jsx("p",{children:"Codex · 中英互译"})]}),B.jsxs("div",{className:"file-translation-toolbar",children:[B.jsx("button",{type:"button",disabled:n,onClick:h,children:"Translate"}),B.jsx("button",{type:"button",disabled:n,onClick:a,children:"Refresh"}),B.jsx("button",{type:"button",onClick:f,children:"Close"})]})]}),r?B.jsx("div",{className:"error-banner",children:r}):null,s!=null&&s.memoryInitialized?null:B.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),B.jsxs("div",{className:"file-translation-layout",children:[B.jsxs("div",{className:"file-translation-list",children:[d.length===0?B.jsx("p",{className:"muted",children:"No translated files yet."}):null,d.map(b=>B.jsxs("button",{className:b.id===o?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>c(b.id),children:[B.jsx("strong",{children:b.sourcePath}),B.jsxs("span",{children:[b.status," · ",b.targetLanguage]})]},b.id))]}),B.jsx("div",{className:"file-translation-preview",children:u?B.jsxs(B.Fragment,{children:[B.jsxs("header",{children:[B.jsx("strong",{children:u.sourcePath}),B.jsx("span",{children:u.status})]}),B.jsx("div",{className:"translation-markdown",children:B.jsx($g,{remarkPlugins:[g_],children:p||_||"Translation output is not available yet."})})]}):B.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function Ix({entry:n}){if(n.sourceKind==="conversation-boundary")return B.jsx(Ux,{entry:n});const r=Gx(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",p=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return B.jsxs("article",{className:p,children:[s?B.jsx("pre",{children:r}):B.jsx("div",{className:"translation-markdown",children:B.jsx($g,{remarkPlugins:[g_],children:r})}),n.warning?B.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?B.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function Ux({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=Kx(n.occurredAt??n.createdAt);return B.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[B.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),B.jsx("span",{children:r}),B.jsxs("span",{children:["第 ",s," 轮"]}),B.jsx("time",{children:o}),B.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function Px(n){const r=n.find(eh);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function Fx(n,r,s){const o=n.find(eh);if(o)return`translating ${Yx(Math.max(0,s-Vx(o)))}`;const p=n.at(-1);return(p==null?void 0:p.status)==="failed"||r==="failed"?"error":r}function eh(n){return n.status==="queued"||n.status==="translating"}function qx(n){const r=n.length-Ox;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;eh(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function Vx(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function Gx(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function $x(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function Yx(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),o=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${o}`}function Wx(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function Kx(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function Xx(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}const Qx={role:"codex-reviewer",permissionMode:"default",model:"gpt-5.5",effort:"xhigh"};function Zx(n,r){const s=Wr.map(o=>({role:o.name,permissionMode:n.roles[o.name].permissionMode,model:n.roles[o.name].model,effort:n.roles[o.name].effort}));return r.codexReviewerEnabled&&s.push(Qx),s}const Jx=["architecture-plan","validation-adequacy","final-diff"];function e2({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return B.jsxs("section",{className:"event-log",children:[s?B.jsx("h2",{children:"Events"}):null,n.length===0?B.jsx("p",{className:"muted",children:"No terminal events yet."}):B.jsx("ol",{children:o.map((p,_)=>B.jsx("li",{children:p},`${p}-${_}`))})]})}var _u={exports:{}},Xm;function t2(){return Xm||(Xm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(p){this._terminal=p}dispose(){}fit(){const p=this.proposeDimensions();if(!p||!this._terminal||isNaN(p.cols)||isNaN(p.rows))return;const _=this._terminal._core;this._terminal.rows===p.rows&&this._terminal.cols===p.cols||(_._renderService.clear(),this._terminal.resize(p.cols,p.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const p=this._terminal._core,_=p._renderService.dimensions;if(_.css.cell.width===0||_.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:p.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),u=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),b=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(b/_.css.cell.width)),rows:Math.max(1,Math.floor(u/_.css.cell.height))}}}})(),s})()))})(_u)),_u.exports}var n2=t2(),vu={exports:{}},Qm;function i2(){return Qm||(Qm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(d){try{const u=new URL(d),b=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return d.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(d,u,b,w={}){this._terminal=d,this._regex=u,this._handler=b,this._options=w}provideLinks(d,u){const b=h.computeLink(d,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(d){return d.map((u=>(u.leave=this._options.leave,u.hover=(b,w)=>{if(this._options.hover){const{range:k}=u;this._options.hover(b,w,k)}},u)))}};class h{static computeLink(u,b,w,k){const x=new RegExp(b.source,(b.flags||"")+"g"),[S,v]=h._getWindowedLineStrings(u-1,w),g=S.join("");let y;const A=[];for(;y=x.exec(g);){const M=y[0];if(!c(M))continue;const[D,T]=h._mapStrIdx(w,v,0,y.index),[E,R]=h._mapStrIdx(w,D,T,M.length);if(D===-1||T===-1||E===-1||R===-1)continue;const N={start:{x:T+1,y:D+1},end:{x:R,y:E+1}};A.push({range:N,text:M,activate:k})}return A}static _getWindowedLineStrings(u,b){let w,k=u,x=u,S=0,v="";const g=[];if(w=b.buffer.active.getLine(u)){const y=w.translateToString(!0);if(w.isWrapped&&y[0]!==" "){for(S=0;(w=b.buffer.active.getLine(--k))&&S<2048&&(v=w.translateToString(!0),S+=v.length,g.push(v),w.isWrapped&&v.indexOf(" ")===-1););g.reverse()}for(g.push(y),S=0;(w=b.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(v=w.translateToString(!0),S+=v.length,g.push(v),v.indexOf(" ")===-1););}return[g,k]}static _mapStrIdx(u,b,w,k){const x=u.buffer.active,S=x.getNullCell();let v=w;for(;k;){const g=x.getLine(b);if(!g)return[-1,-1];for(let y=v;y<g.length;++y){g.getCell(y,S);const A=S.getChars();if(S.getWidth()&&(k-=A.length||1,y===g.length-1&&A==="")){const M=x.getLine(b+1);M&&M.isWrapped&&(M.getCell(0,S),S.getWidth()===2&&(k+=1))}if(k<0)return[b,y]}b++,v=0}return[b,v]}}a.LinkComputer=h}},o={};function p(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f](c,c.exports,p),c.exports}var _={};return(()=>{var f=_;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=p(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,u){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(d=h,u={}){this._handler=d,this._options=u}activate(d){this._terminal=d;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),_})()))})(vu)),vu.exports}var r2=i2(),yu={exports:{}},Zm;function s2(){return Zm||(Zm=1,(function(n,r){(function(s,o){n.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,E=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(y,A,E):D(y,A))||E);return T>3&&E&&Object.defineProperty(y,A,E),E},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),b=c(9924),w=c(844),k=c(4725),x=c(2585),S=c(3656);let v=a.AccessibilityManager=class extends w.Disposable{constructor(g,y,A,M){super(),this._terminal=g,this._coreBrowserService=A,this._renderService=M,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 D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,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 b.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((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
80
|
+
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,S.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(g){for(let y=0;y<g;y++)this._handleChar(" ")}_handleChar(g){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==g&&(this._charsToAnnounce+=g):this._charsToAnnounce+=g,g===`
|
|
81
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(g){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(g)||this._charsToConsume.push(g)}_refreshRows(g,y){this._liveRegionDebouncer.refresh(g,y,this._terminal.rows)}_renderRows(g,y){const A=this._terminal.buffer,M=A.lines.length.toString();for(let D=g;D<=y;D++){const T=A.lines.get(A.ydisp+D),E=[],R=(T==null?void 0:T.translateToString(!0,void 0,void 0,E))||"",N=(A.ydisp+D+1).toString(),I=this._rowElements[D];I&&(R.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=R,this._rowColumns.set(I,E)),I.setAttribute("aria-posinset",N),I.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(g,y){const A=g.target,M=this._rowElements[y===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,T;if(y===0?(D=A,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(D=this._rowElements.shift(),T=A,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),g.preventDefault(),g.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const g=document.getSelection();if(!g)return;if(g.isCollapsed)return void(this._rowContainer.contains(g.anchorNode)&&this._terminal.clearSelection());if(!g.anchorNode||!g.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:g.anchorNode,offset:g.anchorOffset},A={node:g.focusNode,offset:g.focusOffset};if((y.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===A.node&&y.offset>A.offset)&&([y,A]=[A,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const M=this._rowElements.slice(-1)[0];if(A.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(A={node:M,offset:((R=M.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(A.node))return;const D=({node:N,offset:I})=>{const P=N instanceof Text?N.parentNode:N;let F=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(P);if(!Y)return console.warn("columns is null. Race condition?"),null;let K=I<Y.length?Y[I]:Y.slice(-1)[0]+1;return K>=this._terminal.cols&&(++F,K=0),{row:F,column:K}},T=D(y),E=D(A);if(T&&E){if(T.row>E.row||T.row===E.row&&T.column>=E.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(E.row-T.row)*this._terminal.cols-T.column+E.column)}}_handleResize(g){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);for(;this._rowElements.length>g;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const g=this._coreBrowserService.mainDocument.createElement("div");return g.setAttribute("role","listitem"),g.tabIndex=-1,this._refreshRowDimensions(g),g}_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 g=0;g<this._terminal.rows;g++)this._refreshRowDimensions(this._rowElements[g])}}_refreshRowDimensions(g){g.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=v=h([d(1,x.IInstantiationService),d(2,k.ICoreBrowserService),d(3,k.IRenderService)],v)},3614:(f,a)=>{function c(b){return b.replace(/\r?\n/g,"\r")}function h(b,w){return w?"\x1B[200~"+b+"\x1B[201~":b}function d(b,w,k,x){b=h(b=c(b),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(b,!0),w.value=""}function u(b,w,k){const x=k.getBoundingClientRect(),S=b.clientX-x.left-10,v=b.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${S}px`,w.style.top=`${v}px`,w.style.zIndex="1000",w.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=c,a.bracketTextForPaste=h,a.copyHandler=function(b,w){b.clipboardData&&b.clipboardData.setData("text/plain",w.selectionText),b.preventDefault()},a.handlePasteEvent=function(b,w,k,x){b.stopPropagation(),b.clipboardData&&d(b.clipboardData.getData("text/plain"),w,k,x)},a.paste=d,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(b,w,k,x,S){u(b,w,k),S&&x.rightClickSelect(b),w.value=x.selectionText,w.select()}},7239:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=c(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(d,u,b){this._css.set(d,u,b)}getCss(d,u){return this._css.get(d,u)}setColor(d,u,b){this._color.set(d,u,b)}getColor(d,u){return this._color.get(d,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,h,d,u){c.addEventListener(h,d,u);let b=!1;return{dispose:()=>{b||(b=!0,c.removeEventListener(h,d,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(v,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,g,y,A);else for(var E=v.length-1;E>=0;E--)(M=v[E])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},d=this&&this.__param||function(v,g){return function(y,A){g(y,A,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),b=c(8460),w=c(844),k=c(2585),x=c(4725);let S=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(v,g,y,A,M){super(),this._element=v,this._mouseService=g,this._renderService=y,this._bufferService=A,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var D;this._lastMouseEvent=void 0,(D=this._activeProviderReplies)==null||D.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(v){this._lastMouseEvent=v;const g=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!g)return;this._isMouseOut=!1;const y=v.composedPath();for(let A=0;A<y.length;A++){const M=y[A];if(M.classList.contains("xterm"))break;if(M.classList.contains("xterm-hover"))return}this._lastBufferCell&&g.x===this._lastBufferCell.x&&g.y===this._lastBufferCell.y||(this._handleHover(g),this._lastBufferCell=g)}_handleHover(v){if(this._activeLine!==v.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(v,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,v)||(this._clearCurrentLink(),this._askForLink(v,!0))}_askForLink(v,g){var A,M;this._activeProviderReplies&&g||((A=this._activeProviderReplies)==null||A.forEach((D=>{D==null||D.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[D,T]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(y=this._checkLinkProviderResult(D,v,y)):T.provideLinks(v.y,(E=>{var N,I;if(this._isMouseOut)return;const R=E==null?void 0:E.map((P=>({link:P})));(N=this._activeProviderReplies)==null||N.set(D,R),y=this._checkLinkProviderResult(D,v,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,g){const y=new Set;for(let A=0;A<g.size;A++){const M=g.get(A);if(M)for(let D=0;D<M.length;D++){const T=M[D],E=T.link.range.start.y<v?0:T.link.range.start.x,R=T.link.range.end.y>v?this._bufferService.cols:T.link.range.end.x;for(let N=E;N<=R;N++){if(y.has(N)){M.splice(D--,1);break}y.add(N)}}}}_checkLinkProviderResult(v,g,y){var D;if(!this._activeProviderReplies)return y;const A=this._activeProviderReplies.get(v);let M=!1;for(let T=0;T<v;T++)this._activeProviderReplies.has(T)&&!this._activeProviderReplies.get(T)||(M=!0);if(!M&&A){const T=A.find((E=>this._linkAtPosition(E.link,g)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;T<this._activeProviderReplies.size;T++){const E=(D=this._activeProviderReplies.get(T))==null?void 0:D.find((R=>this._linkAtPosition(R.link,g)));if(E){y=!0,this._handleNewLink(E);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const g=this._positionFromMouseEvent(v,this._element,this._mouseService);g&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,g)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,g){this._currentLink&&this._lastMouseEvent&&(!v||!g||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=g)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._linkAtPosition(v.link,g)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.pointerCursor},set:y=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.underline},set:y=>{var A,M,D;(A=this._currentLink)!=null&&A.state&&((D=(M=this._currentLink)==null?void 0:M.state)==null?void 0:D.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const A=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=A&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(A,M),this._lastMouseEvent)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(v,g,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),g.hover&&g.hover(y,g.text)}_fireUnderlineEvent(v,g){const y=v.range,A=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-A-1,y.end.x,y.end.y-A-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(v,g,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),g.leave&&g.leave(y,g.text)}_linkAtPosition(v,g){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,A=v.range.end.y*this._bufferService.cols+v.range.end.x,M=g.y*this._bufferService.cols+g.x;return y<=M&&M<=A}_positionFromMouseEvent(v,g,y){const A=y.getCoords(v,g,this._bufferService.cols,this._bufferService.rows);if(A)return{x:A[0],y:A[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,g,y,A,M){return{x1:v,y1:g,x2:y,y2:A,cols:this._bufferService.cols,fg:M}}};a.Linkifier=S=h([d(1,x.IMouseService),d(2,x.IRenderService),d(3,k.IBufferService),d(4,x.ILinkProviderService)],S)},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,c){var h=this&&this.__decorate||function(x,S,v,g){var y,A=arguments.length,M=A<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,v,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(S,v,M):y(S,v))||M);return A>3&&M&&Object.defineProperty(S,v,M),M},d=this&&this.__param||function(x,S){return function(v,g){S(v,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),b=c(2585);let w=a.OscLinkProvider=class{constructor(x,S,v){this._bufferService=x,this._optionsService=S,this._oscLinkService=v}provideLinks(x,S){var R;const v=this._bufferService.buffer.lines.get(x-1);if(!v)return void S(void 0);const g=[],y=this._optionsService.rawOptions.linkHandler,A=new u.CellData,M=v.getTrimmedLength();let D=-1,T=-1,E=!1;for(let N=0;N<M;N++)if(T!==-1||v.hasContent(N)){if(v.loadCell(N,A),A.hasExtendedAttrs()&&A.extended.urlId){if(T===-1){T=N,D=A.extended.urlId;continue}E=A.extended.urlId!==D}else T!==-1&&(E=!0);if(E||T!==-1&&N===M-1){const I=(R=this._oscLinkService.getLinkData(D))==null?void 0:R.uri;if(I){const P={start:{x:T+1,y:x},end:{x:N+(E||N!==M-1?0:1),y:x}};let F=!1;if(!(y!=null&&y.allowNonHttpProtocols))try{const Y=new URL(I);["http:","https:"].includes(Y.protocol)||(F=!0)}catch{F=!0}F||g.push({text:I,range:P,activate:(Y,K)=>y?y.activate(Y,K,P):k(0,K),hover:(Y,K)=>{var G;return(G=y==null?void 0:y.hover)==null?void 0:G.call(y,Y,K,P)},leave:(Y,K)=>{var G;return(G=y==null?void 0:y.leave)==null?void 0:G.call(y,Y,K,P)}})}E=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=N,D=A.extended.urlId):(T=-1,D=-1)}}S(g)}};function k(x,S){if(confirm(`Do you want to navigate to ${S}?
|
|
82
|
+
|
|
83
|
+
WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=S}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([d(0,b.IBufferService),d(1,b.IOptionsService),d(2,b.IOscLinkService)],w)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,h){this._renderCallback=c,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,h,d){this._rowCount=d,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,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 c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=c(3614),d=c(3656),u=c(3551),b=c(9042),w=c(3730),k=c(1680),x=c(3107),S=c(5744),v=c(2950),g=c(1296),y=c(428),A=c(4269),M=c(5114),D=c(8934),T=c(3230),E=c(9312),R=c(4725),N=c(6731),I=c(8055),P=c(8969),F=c(8460),Y=c(844),K=c(6114),G=c(8437),$=c(2584),Q=c(7399),H=c(5941),O=c(9074),z=c(2585),V=c(5435),j=c(4567),ee=c(779);class he extends P.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(W={}){super(W),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,ce)=>this.refresh(q,ce)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,Y.toDisposable)((()=>{var q,ce;this._customKeyEventHandler=void 0,(ce=(q=this.element)==null?void 0:q.parentNode)==null||ce.removeChild(this.element)})))}_handleColorEvent(W){if(this._themeService)for(const q of W){let ce,J="";switch(q.index){case 256:ce="foreground",J="10";break;case 257:ce="background",J="11";break;case 258:ce="cursor",J="12";break;default:ce="ansi",J="4;"+q.index}switch(q.type){case 0:const ie=I.color.toColorRGB(ce==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[ce]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${J};${(0,H.toRgbString)(ie)}${$.C1_ESCAPED.ST}`);break;case 1:if(ce==="ansi")this._themeService.modifyColors((pe=>pe.ansi[q.index]=I.channels.toColor(...q.color)));else{const pe=ce;this._themeService.modifyColors((be=>be[pe]=I.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(W){W?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(W){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var W;return(W=this.textarea)==null?void 0:W.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const W=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(W);if(!q)return;const ce=Math.min(this.buffer.x,this.cols-1),J=this._renderService.dimensions.css.cell.height,ie=q.getWidth(ce),pe=this._renderService.dimensions.css.cell.width*ie,be=this.buffer.y*this._renderService.dimensions.css.cell.height,Ce=ce*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ce+"px",this.textarea.style.top=be+"px",this.textarea.style.width=pe+"px",this.textarea.style.height=J+"px",this.textarea.style.lineHeight=J+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const W=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",W)),this.register((0,d.addDisposableDomListener)(this.element,"paste",W)),K.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(W=>this._keyUp(W)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(W=>this._keyDown(W)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(W=>this._keyPress(W)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(W=>this._compositionHelper.compositionupdate(W)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(W=>this._inputEvent(W)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(W){var ce;if(!W)throw new Error("Terminal requires a parent element.");if(W.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ce=this.element)==null?void 0:ce.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=W.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"),W.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(J=>this.updateCursorStyle(J)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.promptLabel),K.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(M.CoreBrowserService,this.textarea,W.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(J=>this._handleTextAreaFocus(J)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((J=>this._onRender.fire(J)))),this.onResize((J=>this._renderService.resize(J.cols,J.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((J=>this.scrollLines(J.amount,J.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(E.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((J=>this.scrollLines(J.amount,J.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((J=>this._renderService.handleSelectionChanged(J.start,J.end,J.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((J=>{this.textarea.value=J,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((J=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(J=>this._selectionService.handleMouseDown(J)))),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(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(J=>this._handleScreenReaderModeOptionChange(J)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(J=>{!this._overviewRulerRenderer&&J&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(g.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const W=this,q=this.element;function ce(pe){const be=W._mouseService.getMouseReportCoords(pe,W.screenElement);if(!be)return!1;let Ce,Ye;switch(pe.overrideType||pe.type){case"mousemove":Ye=32,pe.buttons===void 0?(Ce=3,pe.button!==void 0&&(Ce=pe.button<3?pe.button:3)):Ce=1&pe.buttons?0:4&pe.buttons?1:2&pe.buttons?2:3;break;case"mouseup":Ye=0,Ce=pe.button<3?pe.button:3;break;case"mousedown":Ye=1,Ce=pe.button<3?pe.button:3;break;case"wheel":if(W._customWheelEventHandler&&W._customWheelEventHandler(pe)===!1||W.viewport.getLinesScrolled(pe)===0)return!1;Ye=pe.deltaY<0?0:1,Ce=4;break;default:return!1}return!(Ye===void 0||Ce===void 0||Ce>4)&&W.coreMouseService.triggerMouseEvent({col:be.col,row:be.row,x:be.x,y:be.y,button:Ce,action:Ye,ctrl:pe.ctrlKey,alt:pe.altKey,shift:pe.shiftKey})}const J={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ie={mouseup:pe=>(ce(pe),pe.buttons||(this._document.removeEventListener("mouseup",J.mouseup),J.mousedrag&&this._document.removeEventListener("mousemove",J.mousedrag)),this.cancel(pe)),wheel:pe=>(ce(pe),this.cancel(pe,!0)),mousedrag:pe=>{pe.buttons&&ce(pe)},mousemove:pe=>{pe.buttons||ce(pe)}};this.register(this.coreMouseService.onProtocolChange((pe=>{pe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(pe)),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&pe?J.mousemove||(q.addEventListener("mousemove",ie.mousemove),J.mousemove=ie.mousemove):(q.removeEventListener("mousemove",J.mousemove),J.mousemove=null),16&pe?J.wheel||(q.addEventListener("wheel",ie.wheel,{passive:!1}),J.wheel=ie.wheel):(q.removeEventListener("wheel",J.wheel),J.wheel=null),2&pe?J.mouseup||(J.mouseup=ie.mouseup):(this._document.removeEventListener("mouseup",J.mouseup),J.mouseup=null),4&pe?J.mousedrag||(J.mousedrag=ie.mousedrag):(this._document.removeEventListener("mousemove",J.mousedrag),J.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(q,"mousedown",(pe=>{if(pe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(pe))return ce(pe),J.mouseup&&this._document.addEventListener("mouseup",J.mouseup),J.mousedrag&&this._document.addEventListener("mousemove",J.mousedrag),this.cancel(pe)}))),this.register((0,d.addDisposableDomListener)(q,"wheel",(pe=>{if(!J.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(pe)===!1)return!1;if(!this.buffer.hasScrollback){const be=this.viewport.getLinesScrolled(pe);if(be===0)return;const Ce=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pe.deltaY<0?"A":"B");let Ye="";for(let ot=0;ot<Math.abs(be);ot++)Ye+=Ce;return this.coreService.triggerDataEvent(Ye,!0),this.cancel(pe,!0)}return this.viewport.handleWheel(pe)?this.cancel(pe):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(q,"touchstart",(pe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(pe),this.cancel(pe)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(q,"touchmove",(pe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(pe)?void 0:this.cancel(pe)}),{passive:!1}))}refresh(W,q){var ce;(ce=this._renderService)==null||ce.refreshRows(W,q)}updateCursorStyle(W){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(W)?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(W,q,ce=0){var J;ce===1?(super.scrollLines(W,q,ce),this.refresh(0,this.rows-1)):(J=this.viewport)==null||J.scrollLines(W)}paste(W){(0,h.paste)(W,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(W){this._customKeyEventHandler=W}attachCustomWheelEventHandler(W){this._customWheelEventHandler=W}registerLinkProvider(W){return this._linkProviderService.registerLinkProvider(W)}registerCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(W);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(W)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(W){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+W)}registerDecoration(W){return this._decorationService.registerDecoration(W)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(W,q,ce){this._selectionService.setSelection(W,q,ce)}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 W;(W=this._selectionService)==null||W.clearSelection()}selectAll(){var W;(W=this._selectionService)==null||W.selectAll()}selectLines(W,q){var ce;(ce=this._selectionService)==null||ce.selectLines(W,q)}_keyDown(W){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&W.altKey;if(!q&&!this._compositionHelper.keydown(W))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||W.key!=="Dead"&&W.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ce=(0,Q.evaluateKeyboardEvent)(W,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(W),ce.type===3||ce.type===2){const J=this.rows-1;return this.scrollLines(ce.type===2?-J:J),this.cancel(W,!0)}return ce.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,W)||(ce.cancel&&this.cancel(W,!0),!ce.key||!!(W.key&&!W.ctrlKey&&!W.altKey&&!W.metaKey&&W.key.length===1&&W.key.charCodeAt(0)>=65&&W.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ce.key!==$.C0.ETX&&ce.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ce.key,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(ce.key,!0),!this.optionsService.rawOptions.screenReaderMode||W.altKey||W.ctrlKey?this.cancel(W,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(W,q){const ce=W.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||W.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||W.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?ce:ce&&(!q.keyCode||q.keyCode>47)}_keyUp(W){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(W)||this.focus(),this.updateCursorStyle(W),this._keyPressHandled=!1)}_keyPress(W){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;if(this.cancel(W),W.charCode)q=W.charCode;else if(W.which===null||W.which===void 0)q=W.keyCode;else{if(W.which===0||W.charCode===0)return!1;q=W.which}return!(!q||(W.altKey||W.ctrlKey||W.metaKey)&&!this._isThirdLevelShift(this.browser,W)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(W){if(W.data&&W.inputType==="insertText"&&(!W.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=W.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(W),!0}return!1}resize(W,q){W!==this.cols||q!==this.rows?super.resize(W,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(W,q){var ce,J;(ce=this._charSizeService)==null||ce.measure(),(J=this.viewport)==null||J.syncScrollArea(!0)}clear(){var W;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(W=this.viewport)==null||W.reset(),this.refresh(0,this.rows-1)}}reset(){var q,ce;this.options.rows=this.rows,this.options.cols=this.cols;const W=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(ce=this.viewport)==null||ce.reset(),this._customKeyEventHandler=W,this.refresh(0,this.rows-1)}clearTextureAtlas(){var W;(W=this._renderService)==null||W.clearTextureAtlas()}_reportFocus(){var W;(W=this.element)!=null&&W.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(W){if(this._renderService)switch(W){case V.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),ce=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${ce};${q}t`);break;case V.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const J=this._renderService.dimensions.css.cell.width.toFixed(0),ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${ie};${J}t`)}}cancel(W,q){if(this.options.cancelEvents||q)return W.preventDefault(),W.stopPropagation(),!1}}a.Terminal=he},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,h=1e3){this._renderCallback=c,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,h,d){this._rowCount=d,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=u-this._lastRefreshMs,w=this._debounceThresholdMS-b;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h)}}},1680:function(f,a,c){var h=this&&this.__decorate||function(v,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,g,y,A);else for(var E=v.length-1;E>=0;E--)(M=v[E])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},d=this&&this.__param||function(v,g){return function(y,A){g(y,A,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),b=c(4725),w=c(8460),k=c(844),x=c(2585);let S=a.Viewport=class extends k.Disposable{constructor(v,g,y,A,M,D,T,E){super(),this._viewportElement=v,this._scrollArea=g,this._bufferService=y,this._optionsService=A,this._charSizeService=M,this._renderService=D,this._coreBrowserService=T,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.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(v){if(v)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 g=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==g&&(this._lastRecordedBufferHeight=g,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){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 g=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:g,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<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(v,g){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&y<this._lastRecordedBufferHeight)||(v.cancelable&&v.preventDefault(),!1)}handleWheel(v){const g=this._getPixelsScrolled(v);return g!==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+g:this._smoothScrollState.target+=g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=g,this._bubbleScroll(v,g))}scrollLines(v){if(v!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const g=v*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:v,suppressScrollEvent:!1})}_getPixelsScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let g=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_LINE?g*=this._currentRowHeight:v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._currentRowHeight*this._bufferService.rows),g}getBufferElements(v,g){var E;let y,A="";const M=[],D=g??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let R=v;R<D;R++){const N=T.get(R);if(!N)continue;const I=(E=T.get(R+1))==null?void 0:E.isWrapped;if(A+=N.translateToString(!I),!I||R===T.length-1){const P=document.createElement("div");P.textContent=A,M.push(P),A.length>0&&(y=P),A=""}}return{bufferElements:M,cursorElement:y}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let g=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(g/=this._currentRowHeight+0,this._wheelPartialScroll+=g,g=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._bufferService.rows),g}_applyScrollModifier(v,g){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&g.altKey||y==="ctrl"&&g.ctrlKey||y==="shift"&&g.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const g=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,g!==0&&(this._viewportElement.scrollTop+=g,this._bubbleScroll(v,g))}};a.Viewport=S=h([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,b.ICharSizeService),d(5,b.IRenderService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],S)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,S,v,g){var y,A=arguments.length,M=A<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,v,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(S,v,M):y(S,v))||M);return A>3&&M&&Object.defineProperty(S,v,M),M},d=this&&this.__param||function(x,S){return function(v,g){S(v,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),b=c(844),w=c(2585);let k=a.BufferDecorationRenderer=class extends b.Disposable{constructor(x,S,v,g,y){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=v,this._decorationService=g,this._renderService=y,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((A=>this._removeDecoration(A)))),this.register((0,b.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 x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var g;const S=this._coreBrowserService.mainDocument.createElement("div");S.classList.add("xterm-decoration"),S.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),S.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,S.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",S.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",S.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=x.options.x??0;return v&&v>this._bufferService.cols&&(S.style.display="none"),this._refreshXPosition(x,S),S}_refreshStyle(x){const S=x.marker.line-this._bufferService.buffers.active.ydisp;if(S<0||S>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let v=this._decorationElements.get(x);v||(v=this._createElement(x),x.element=v,this._decorationElements.set(x,v),this._container.appendChild(v),x.onDispose((()=>{this._decorationElements.delete(x),v.remove()}))),v.style.top=S*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(v)}}_refreshXPosition(x,S=x.element){if(!S)return;const v=x.options.x??0;(x.options.anchor||"left")==="right"?S.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":S.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var S;(S=this._decorationElements.get(x))==null||S.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=k=h([d(1,w.IBufferService),d(2,u.ICoreBrowserService),d(3,w.IDecorationService),d(4,u.IRenderService)],k)},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(c){if(c.options.overviewRulerOptions){for(const h of this._zones)if(h.color===c.options.overviewRulerOptions.color&&h.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,c.marker.line))return;if(this._lineAdjacentToZone(h,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(h,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,h){return h>=c.startBufferLine&&h<=c.endBufferLine}_lineAdjacentToZone(c,h,d){return h>=c.startBufferLine-this._linePadding[d||"full"]&&h<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,h){c.startBufferLine=Math.min(c.startBufferLine,h),c.endBufferLine=Math.max(c.endBufferLine,h)}}},5744:function(f,a,c){var h=this&&this.__decorate||function(y,A,M,D){var T,E=arguments.length,R=E<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,A,M,D);else for(var N=y.length-1;N>=0;N--)(T=y[N])&&(R=(E<3?T(R):E>3?T(A,M,R):T(A,M))||R);return E>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(y,A){return function(M,D){A(M,D,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),b=c(4725),w=c(844),k=c(2585),x={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let g=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,A,M,D,T,E,R){var I;super(),this._viewportElement=y,this._screenElement=A,this._bufferService=M,this._decorationService=D,this._renderService=T,this._optionsService=E,this._coreBrowserService=R,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var P;(P=this._canvas)==null||P.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const y=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=y,S.center=A,S.right=y,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=S.left,v.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=A,x.center=A,x.right=A}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.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 A of this._decorationService.decorations)this._colorZoneStore.addDecoration(A);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const A of y)A.position!=="full"&&this._renderColorZone(A);for(const A of y)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(v[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),S[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,A){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=A||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=g=h([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,b.IRenderService),d(5,k.IOptionsService),d(6,b.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,S,v,g){var y,A=arguments.length,M=A<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,v,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(S,v,M):y(S,v))||M);return A>3&&M&&Object.defineProperty(S,v,M),M},d=this&&this.__param||function(x,S){return function(v,g){S(v,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),b=c(2585),w=c(2584);let k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,S,v,g,y,A){this._textarea=x,this._compositionView=S,this._bufferService=v,this._optionsService=g,this._coreService=y,this._renderService=A,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(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const S={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,S.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(S.start,S.end):this._textarea.value.substring(S.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const S=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(S,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const S=this._textarea.value,v=S.replace(x,"");this._dataAlreadySent=v,S.length>x.length?this._coreService.triggerDataEvent(v,!0):S.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):S.length===x.length&&S!==x&&this._coreService.triggerDataEvent(S,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),v=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,y=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=y+"px",this._compositionView.style.top=g+"px",this._compositionView.style.height=v+"px",this._compositionView.style.lineHeight=v+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const A=this._compositionView.getBoundingClientRect();this._textarea.style.left=y+"px",this._textarea.style.top=g+"px",this._textarea.style.width=Math.max(A.width,1)+"px",this._textarea.style.height=Math.max(A.height,1)+"px",this._textarea.style.lineHeight=A.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=k=h([d(2,b.IBufferService),d(3,b.IOptionsService),d(4,b.ICoreService),d(5,u.IRenderService)],k)},9806:(f,a)=>{function c(h,d,u){const b=u.getBoundingClientRect(),w=h.getComputedStyle(u),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-b.left-k,d.clientY-b.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,d,u,b,w,k,x,S,v){if(!k)return;const g=c(h,d,u);return g?(g[0]=Math.ceil((g[0]+(v?x/2:0))/x),g[1]=Math.ceil(g[1]/S),g[0]=Math.min(Math.max(g[0],1),b+(v?1:0)),g[1]=Math.min(Math.max(g[1],1),w),g):void 0}},9504:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=c(2584);function d(S,v,g,y){const A=S-u(S,g),M=v-u(v,g),D=Math.abs(A-M)-(function(T,E,R){let N=0;const I=T-u(T,R),P=E-u(E,R);for(let F=0;F<Math.abs(I-P);F++){const Y=b(T,E)==="A"?-1:1,K=R.buffer.lines.get(I+Y*F);K!=null&&K.isWrapped&&N++}return N})(S,v,g);return x(D,k(b(S,v),y))}function u(S,v){let g=0,y=v.buffer.lines.get(S),A=y==null?void 0:y.isWrapped;for(;A&&S>=0&&S<v.rows;)g++,y=v.buffer.lines.get(--S),A=y==null?void 0:y.isWrapped;return g}function b(S,v){return S>v?"A":"B"}function w(S,v,g,y,A,M){let D=S,T=v,E="";for(;D!==g||T!==y;)D+=A?1:-1,A&&D>M.cols-1?(E+=M.buffer.translateBufferLineToString(T,!1,S,D),D=0,S=0,T++):!A&&D<0&&(E+=M.buffer.translateBufferLineToString(T,!1,0,S+1),D=M.cols-1,S=D,T--);return E+M.buffer.translateBufferLineToString(T,!1,S,D)}function k(S,v){const g=v?"O":"[";return h.C0.ESC+g+S}function x(S,v){S=Math.floor(S);let g="";for(let y=0;y<S;y++)g+=v;return g}a.moveToCellSequence=function(S,v,g,y){const A=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(E,R,N,I,P,F){return d(R,I,P,F).length===0?"":x(w(E,R,E,R-u(R,P),!1,P).length,k("D",F))})(A,M,0,v,g,y)+d(M,v,g,y)+(function(E,R,N,I,P,F){let Y;Y=d(R,I,P,F).length>0?I-u(I,P):R;const K=I,G=(function($,Q,H,O,z,V){let j;return j=d(H,O,z,V).length>0?O-u(O,z):Q,$<H&&j<=O||$>=H&&j<O?"C":"D"})(E,R,N,I,P,F);return x(w(E,Y,N,K,G==="C",P).length,k(G,F))})(A,M,S,v,g,y);let D;if(M===v)return D=A>S?"D":"C",x(Math.abs(A-S),k(D,y));D=M>v?"D":"C";const T=Math.abs(M-v);return x((function(E,R){return R.cols-E})(M>v?S:A,g)+(T-1)*g.cols+1+((M>v?A:S)-1),k(D,y))}},1296:function(f,a,c){var h=this&&this.__decorate||function(F,Y,K,G){var $,Q=arguments.length,H=Q<3?Y:G===null?G=Object.getOwnPropertyDescriptor(Y,K):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(F,Y,K,G);else for(var O=F.length-1;O>=0;O--)($=F[O])&&(H=(Q<3?$(H):Q>3?$(Y,K,H):$(Y,K))||H);return Q>3&&H&&Object.defineProperty(Y,K,H),H},d=this&&this.__param||function(F,Y){return function(K,G){Y(K,G,F)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),b=c(2550),w=c(2223),k=c(6171),x=c(6052),S=c(4725),v=c(8055),g=c(8460),y=c(844),A=c(2585),M="xterm-dom-renderer-owner-",D="xterm-rows",T="xterm-fg-",E="xterm-bg-",R="xterm-focus",N="xterm-selection";let I=1,P=a.DomRenderer=class extends y.Disposable{constructor(F,Y,K,G,$,Q,H,O,z,V,j,ee,he){super(),this._terminal=F,this._document=Y,this._element=K,this._screenElement=G,this._viewportElement=$,this._helperContainer=Q,this._linkifier2=H,this._charSizeService=z,this._optionsService=V,this._bufferService=j,this._coreBrowserService=ee,this._themeService=he,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new g.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),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(N),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ge=>this._injectCss(ge)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(M+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ge=>this._handleLinkHover(ge)))),this.register(this._linkifier2.onHideLinkUnderline((ge=>this._handleLinkLeave(ge)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(M+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new b.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Y,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${D} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${D} .xterm-dim { color: ${v.color.multiplyOpacity(F.foreground,.5).css};}`,Y+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const K=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${G} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${$} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,Y+=`${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[Q,H]of F.ansi.entries())Y+=`${this._terminalSelector} .${T}${Q} { color: ${H.css}; }${this._terminalSelector} .${T}${Q}.xterm-dim { color: ${v.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${E}${Q} { background-color: ${H.css}; }`;Y+=`${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(F.background).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${E}${w.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,Y){for(let K=this._rowElements.length;K<=Y;K++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,Y){this._refreshRowElements(F,Y),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,Y,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,Y,K),this.renderRows(0,this._bufferService.rows-1),!F||!Y)return;this._selectionRenderModel.update(this._terminal,F,Y,K);const G=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,Q=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(Q>=this._bufferService.rows||H<0)return;const O=this._document.createDocumentFragment();if(K){const z=F[0]>Y[0];O.appendChild(this._createSelectionElement(Q,z?Y[0]:F[0],z?F[0]:Y[0],H-Q+1))}else{const z=G===Q?F[0]:0,V=Q===$?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(Q,z,V));const j=H-Q-1;if(O.appendChild(this._createSelectionElement(Q+1,0,this._bufferService.cols,j)),Q!==H){const ee=$===H?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(H,0,ee))}}this._selectionContainer.appendChild(O)}_createSelectionElement(F,Y,K,G=1){const $=this._document.createElement("div"),Q=Y*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(K-Y);return Q+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-Q),$.style.height=G*this.dimensions.css.cell.height+"px",$.style.top=F*this.dimensions.css.cell.height+"px",$.style.left=`${Q}px`,$.style.width=`${H}px`,$}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const F of this._rowElements)F.replaceChildren()}renderRows(F,Y){const K=this._bufferService.buffer,G=K.ybase+K.y,$=Math.min(K.x,this._bufferService.cols-1),Q=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=F;z<=Y;z++){const V=z+K.ydisp,j=this._rowElements[z],ee=K.lines.get(V);if(!j||!ee)break;j.replaceChildren(...this._rowFactory.createRow(ee,V,V===G,H,O,$,Q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,Y,K,G,$,Q){K<0&&(F=0),G<0&&(Y=0);const H=this._bufferService.rows-1;K=Math.max(Math.min(K,H),0),G=Math.max(Math.min(G,H),0),$=Math.min($,this._bufferService.cols);const O=this._bufferService.buffer,z=O.ybase+O.y,V=Math.min(O.x,$-1),j=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ge=K;ge<=G;++ge){const W=ge+O.ydisp,q=this._rowElements[ge],ce=O.lines.get(W);if(!q||!ce)break;q.replaceChildren(...this._rowFactory.createRow(ce,W,W===z,ee,he,V,j,this.dimensions.css.cell.width,this._widthCache,Q?ge===K?F:0:-1,Q?(ge===G?Y:$)-1:-1))}}};a.DomRenderer=P=h([d(7,A.IInstantiationService),d(8,S.ICharSizeService),d(9,A.IOptionsService),d(10,A.IBufferService),d(11,S.ICoreBrowserService),d(12,S.IThemeService)],P)},3787:function(f,a,c){var h=this&&this.__decorate||function(D,T,E,R){var N,I=arguments.length,P=I<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(D,T,E,R);else for(var F=D.length-1;F>=0;F--)(N=D[F])&&(P=(I<3?N(P):I>3?N(T,E,P):N(T,E))||P);return I>3&&P&&Object.defineProperty(T,E,P),P},d=this&&this.__param||function(D,T){return function(E,R){T(E,R,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),b=c(643),w=c(511),k=c(2585),x=c(8055),S=c(4725),v=c(4269),g=c(6171),y=c(3734);let A=a.DomRendererRowFactory=class{constructor(D,T,E,R,N,I,P){this._document=D,this._characterJoinerService=T,this._optionsService=E,this._coreBrowserService=R,this._coreService=N,this._decorationService=I,this._themeService=P,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,T,E){this._selectionStart=D,this._selectionEnd=T,this._columnSelectMode=E}createRow(D,T,E,R,N,I,P,F,Y,K,G){const $=[],Q=this._characterJoinerService.getJoinedCharacters(T),H=this._themeService.colors;let O,z=D.getNoBgTrimmedLength();E&&z<I+1&&(z=I+1);let V=0,j="",ee=0,he=0,ge=0,W=!1,q=0,ce=!1,J=0;const ie=[],pe=K!==-1&&G!==-1;for(let be=0;be<z;be++){D.loadCell(be,this._workCell);let Ce=this._workCell.getWidth();if(Ce===0)continue;let Ye=!1,ot=be,Me=this._workCell;if(Q.length>0&&be===Q[0][0]){Ye=!0;const He=Q.shift();Me=new v.JoinedCellData(this._workCell,D.translateToString(!0,He[0],He[1]),He[1]-He[0]),ot=He[1]-1,Ce=Me.getWidth()}const Dt=this._isCellInSelection(be,T),kt=E&&be===I,Ut=pe&&be>=K&&be<=G;let qt=!1;this._decorationService.forEachDecorationAtCell(be,T,void 0,(He=>{qt=!0}));let Zt=Me.getChars()||b.WHITESPACE_CELL_CHAR;if(Zt===" "&&(Me.isUnderline()||Me.isOverline())&&(Zt=" "),J=Ce*F-Y.get(Zt,Me.isBold(),Me.isItalic()),O){if(V&&(Dt&&ce||!Dt&&!ce&&Me.bg===ee)&&(Dt&&ce&&H.selectionForeground||Me.fg===he)&&Me.extended.ext===ge&&Ut===W&&J===q&&!kt&&!Ye&&!qt){Me.isInvisible()?j+=b.WHITESPACE_CELL_CHAR:j+=Zt,V++;continue}V&&(O.textContent=j),O=this._document.createElement("span"),V=0,j=""}else O=this._document.createElement("span");if(ee=Me.bg,he=Me.fg,ge=Me.extended.ext,W=Ut,q=J,ce=Dt,Ye&&I>=be&&I<=ot&&(I=be),!this._coreService.isCursorHidden&&kt&&this._coreService.isCursorInitialized){if(ie.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&ie.push("xterm-cursor-blink"),ie.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ie.push("xterm-cursor-outline");break;case"block":ie.push("xterm-cursor-block");break;case"bar":ie.push("xterm-cursor-bar");break;case"underline":ie.push("xterm-cursor-underline")}}if(Me.isBold()&&ie.push("xterm-bold"),Me.isItalic()&&ie.push("xterm-italic"),Me.isDim()&&ie.push("xterm-dim"),j=Me.isInvisible()?b.WHITESPACE_CELL_CHAR:Me.getChars()||b.WHITESPACE_CELL_CHAR,Me.isUnderline()&&(ie.push(`xterm-underline-${Me.extended.underlineStyle}`),j===" "&&(j=" "),!Me.isUnderlineColorDefault()))if(Me.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Me.getUnderlineColor()).join(",")})`;else{let He=Me.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Me.isBold()&&He<8&&(He+=8),O.style.textDecorationColor=H.ansi[He].css}Me.isOverline()&&(ie.push("xterm-overline"),j===" "&&(j=" ")),Me.isStrikethrough()&&ie.push("xterm-strikethrough"),Ut&&(O.style.textDecoration="underline");let mt=Me.getFgColor(),Ge=Me.getFgColorMode(),ut=Me.getBgColor(),fe=Me.getBgColorMode();const ve=!!Me.isInverse();if(ve){const He=mt;mt=ut,ut=He;const Qe=Ge;Ge=fe,fe=Qe}let xe,ae,De,Te=!1;switch(this._decorationService.forEachDecorationAtCell(be,T,void 0,(He=>{He.options.layer!=="top"&&Te||(He.backgroundColorRGB&&(fe=50331648,ut=He.backgroundColorRGB.rgba>>8&16777215,xe=He.backgroundColorRGB),He.foregroundColorRGB&&(Ge=50331648,mt=He.foregroundColorRGB.rgba>>8&16777215,ae=He.foregroundColorRGB),Te=He.options.layer==="top")})),!Te&&Dt&&(xe=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,ut=xe.rgba>>8&16777215,fe=50331648,Te=!0,H.selectionForeground&&(Ge=50331648,mt=H.selectionForeground.rgba>>8&16777215,ae=H.selectionForeground)),Te&&ie.push("xterm-decoration-top"),fe){case 16777216:case 33554432:De=H.ansi[ut],ie.push(`xterm-bg-${ut}`);break;case 50331648:De=x.channels.toColor(ut>>16,ut>>8&255,255&ut),this._addStyle(O,`background-color:#${M((ut>>>0).toString(16),"0",6)}`);break;default:ve?(De=H.foreground,ie.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):De=H.background}switch(xe||Me.isDim()&&(xe=x.color.multiplyOpacity(De,.5)),Ge){case 16777216:case 33554432:Me.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(O,De,H.ansi[mt],Me,xe,void 0)||ie.push(`xterm-fg-${mt}`);break;case 50331648:const He=x.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(O,De,He,Me,xe,ae)||this._addStyle(O,`color:#${M(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,De,H.foreground,Me,xe,ae)||ve&&ie.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ie.length&&(O.className=ie.join(" "),ie.length=0),kt||Ye||qt?O.textContent=j:V++,J!==this.defaultSpacing&&(O.style.letterSpacing=`${J}px`),$.push(O),be=ot}return O&&V&&(O.textContent=j),$}_applyMinimumContrast(D,T,E,R,N,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,g.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const P=this._getContrastCache(R);let F;if(N||I||(F=P.getColor(T.rgba,E.rgba)),F===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);F=x.color.ensureContrastRatio(N||T,I||E,Y),P.setColor((N||T).rgba,(I||E).rgba,F??null)}return!!F&&(this._addStyle(D,`color:${F.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,T){D.setAttribute("style",`${D.getAttribute("style")||""}${T};`)}_isCellInSelection(D,T){const E=this._selectionStart,R=this._selectionEnd;return!(!E||!R)&&(this._columnSelectMode?E[0]<=R[0]?D>=E[0]&&T>=E[1]&&D<R[0]&&T<=R[1]:D<E[0]&&T>=E[1]&&D>=R[0]&&T<=R[1]:T>E[1]&&T<R[1]||E[1]===R[1]&&T===E[1]&&D>=E[0]&&D<R[0]||E[1]<R[1]&&T===R[1]&&D<R[0]||E[1]<R[1]&&T===E[1]&&D>=E[0])}};function M(D,T,E){for(;D.length<E;)D=T+D;return D}a.DomRendererRowFactory=A=h([d(1,S.ICharacterJoinerService),d(2,k.IOptionsService),d(3,S.ICoreBrowserService),d(4,k.ICoreService),d(5,k.IDecorationService),d(6,S.IThemeService)],A)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 d=c.createElement("span");d.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const b=c.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const w=c.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[d,u,b,w],this._container.appendChild(d),this._container.appendChild(u),this._container.appendChild(b),this._container.appendChild(w),h.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(c,h,d,u){c===this._font&&h===this._fontSize&&d===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,this._weight=d,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,h,d){let u=0;if(!h&&!d&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const k=this._measure(c,0);return k>0&&(this._flat[u]=k),k}let b=c;h&&(b+="B"),d&&(b+="I");let w=this._holey.get(b);if(w===void 0){let k=0;h&&(k|=1),d&&(k|=2),w=this._measure(c,k),w>0&&this._holey.set(b,w)}return w}_measure(c,h){const d=this._measureElements[h];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function c(d){return 57508<=d&&d<=57558}function h(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=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(d){if(!d)throw new Error("value must not be falsy");return d},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},a.isEmoji=h,a.allowRescaling=function(d,u,b,w){return u===1&&b>Math.ceil(1.5*w)&&d!==void 0&&d>255&&!h(d)&&!c(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},a.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(u){return 9472<=u&&u<=9631})(d)},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(d,u,b=0){return(d-(2*Math.round(u)-b))%(2*Math.round(u))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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(d,u,b,w=!1){if(this.selectionStart=u,this.selectionEnd=b,!u||!b||u[0]===b[0]&&u[1]===b[1])return void this.clear();const k=d.buffers.active.ydisp,x=u[1]-k,S=b[1]-k,v=Math.max(x,0),g=Math.min(S,d.rows-1);v>=d.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=v,this.viewportCappedEndRow=g,this.startCol=u[0],this.endCol=b[0])}isCellSelected(d,u,b){return!!this.hasSelection&&(b-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&b>=this.viewportCappedStartRow&&u<this.endCol&&b<=this.viewportCappedEndRow:u<this.startCol&&b>=this.viewportCappedStartRow&&u>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,h=this.selectionEnd;return!(!c||!h)&&(c[1]>h[1]||c[1]===h[1]&&c[0]>h[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,E=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(y,A,E):D(y,A))||E);return T>3&&E&&Object.defineProperty(y,A,E),E},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),b=c(8460),w=c(844);let k=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,y,A){super(),this._optionsService=A,this.width=0,this.height=0,this._onCharSizeChange=this.register(new b.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new S(g,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())}};a.CharSizeService=k=h([d(2,u.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,A){y!==void 0&&y>0&&A!==void 0&&A>0&&(this._result.width=y,this._result.height=A)}}class S extends x{constructor(y,A,M){super(),this._document=y,this._parentElement=A,this._optionsService=M,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 v extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const A=this._ctx.measureText("W");if(!("width"in A&&"fontBoundingBoxAscent"in A&&"fontBoundingBoxDescent"in A))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(f,a,c){var h=this&&this.__decorate||function(v,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(v,g,y,A);else for(var E=v.length-1;E>=0;E--)(M=v[E])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},d=this&&this.__param||function(v,g){return function(y,A){g(y,A,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),b=c(643),w=c(511),k=c(2585);class x extends u.AttributeData{constructor(g,y,A){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=y,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(g){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let S=a.CharacterJoinerService=class __{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(g){const y={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(y),y.id}deregister(g){for(let y=0;y<this._characterJoiners.length;y++)if(this._characterJoiners[y].id===g)return this._characterJoiners.splice(y,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const y=this._bufferService.buffer.lines.get(g);if(!y||y.length===0)return[];const A=[],M=y.translateToString(!0);let D=0,T=0,E=0,R=y.getFg(0),N=y.getBg(0);for(let I=0;I<y.getTrimmedLength();I++)if(y.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(I-D>1){const P=this._getJoinedRanges(M,E,T,y,D);for(let F=0;F<P.length;F++)A.push(P[F])}D=I,E=T,R=this._workCell.fg,N=this._workCell.bg}T+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const I=this._getJoinedRanges(M,E,T,y,D);for(let P=0;P<I.length;P++)A.push(I[P])}return A}_getJoinedRanges(g,y,A,M,D){const T=g.substring(y,A);let E=[];try{E=this._characterJoiners[0].handler(T)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const N=this._characterJoiners[R].handler(T);for(let I=0;I<N.length;I++)__._mergeRanges(E,N[I])}catch(N){console.error(N)}return this._stringRangesToCellRanges(E,M,D),E}_stringRangesToCellRanges(g,y,A){let M=0,D=!1,T=0,E=g[M];if(E){for(let R=A;R<this._bufferService.cols;R++){const N=y.getWidth(R),I=y.getString(R).length||b.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!D&&E[0]<=T&&(E[0]=R,D=!0),E[1]<=T){if(E[1]=R,E=g[++M],!E)break;E[0]<=T?(E[0]=R,D=!0):D=!1}T+=I}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(g,y){let A=!1;for(let M=0;M<g.length;M++){const D=g[M];if(A){if(y[1]<=D[0])return g[M-1][1]=y[1],g;if(y[1]<=D[1])return g[M-1][1]=Math.max(y[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(y[1]<=D[0])return g.splice(M,0,y),g;if(y[1]<=D[1])return D[0]=Math.min(y[0],D[0]),g;y[0]<D[1]&&(D[0]=Math.min(y[0],D[0]),A=!0)}}return A?g[g.length-1][1]=y[1]:g.push(y),g}};a.CharacterJoinerService=S=h([d(0,k.IBufferService)],S)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),d=c(8460),u=c(3656);class b extends h.Disposable{constructor(x,S,v){super(),this._textarea=x,this._window=S,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((g=>this._screenDprMonitor.setWindow(g)))),this.register((0,d.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(x){this._window!==x&&(this._window=x,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=b;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=c(844);class d extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(b){return this.linkProviders.push(b),{dispose:()=>{const w=this.linkProviders.indexOf(b);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=d},8934:function(f,a,c){var h=this&&this.__decorate||function(k,x,S,v){var g,y=arguments.length,A=y<3?x:v===null?v=Object.getOwnPropertyDescriptor(x,S):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,x,S,v);else for(var M=k.length-1;M>=0;M--)(g=k[M])&&(A=(y<3?g(A):y>3?g(x,S,A):g(x,S))||A);return y>3&&A&&Object.defineProperty(x,S,A),A},d=this&&this.__param||function(k,x){return function(S,v){x(S,v,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),b=c(9806);let w=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,S,v,g){return(0,b.getCoords)(window,k,x,S,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(k,x){const S=(0,b.getCoordsRelativeToElement)(window,k,x);if(this._charSizeService.hasValidSize)return S[0]=Math.min(Math.max(S[0],0),this._renderService.dimensions.css.canvas.width-1),S[1]=Math.min(Math.max(S[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(S[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(S[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(S[0]),y:Math.floor(S[1])}}};a.MouseService=w=h([d(0,u.IRenderService),d(1,u.ICharSizeService)],w)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,E=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(y,A,E):D(y,A))||E);return T>3&&E&&Object.defineProperty(y,A,E),E},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),b=c(4725),w=c(8460),k=c(844),x=c(7226),S=c(2585);let v=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,y,A,M,D,T,E,R){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new k.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((N,I)=>this._renderRows(N,I)),E),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.clear()}))),this.register(A.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(D.onDecorationRegistered((()=>this._fullRefresh()))),this.register(D.onDecorationRemoved((()=>this._fullRefresh()))),this.register(A.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(A.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(E.window,y),this.register(E.onWindowChange((N=>this._registerIntersectionObserver(N,y))))}_registerIntersectionObserver(g,y){if("IntersectionObserver"in g){const A=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});A.observe(y),this._observerDisposable.value=(0,k.toDisposable)((()=>A.disconnect()))}}_handleIntersectionChange(g){this._isPaused=g.isIntersecting===void 0?g.intersectionRatio===0:!g.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(g,y,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,y,this._rowCount))}_renderRows(g,y){this._renderer.value&&(g=Math.min(g,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(g,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:g,end:y}),this._onRender.fire({start:g,end:y}),this._isNextRenderRedrawOnly=!0)}resize(g,y){this._rowCount=y,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(g){this._renderer.value=g,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(g){return this._renderDebouncer.addRefreshCallback(g)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var g,y;this._renderer.value&&((y=(g=this._renderer.value).clearTextureAtlas)==null||y.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var A;return(A=this._renderer.value)==null?void 0:A.handleResize(g,y)})):this._renderer.value.handleResize(g,y),this._fullRefresh())}handleCharSizeChanged(){var g;(g=this._renderer.value)==null||g.handleCharSizeChanged()}handleBlur(){var g;(g=this._renderer.value)==null||g.handleBlur()}handleFocus(){var g;(g=this._renderer.value)==null||g.handleFocus()}handleSelectionChanged(g,y,A){var M;this._selectionState.start=g,this._selectionState.end=y,this._selectionState.columnSelectMode=A,(M=this._renderer.value)==null||M.handleSelectionChanged(g,y,A)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=v=h([d(2,S.IOptionsService),d(3,b.ICharSizeService),d(4,S.IDecorationService),d(5,S.IBufferService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],v)},9312:function(f,a,c){var h=this&&this.__decorate||function(E,R,N,I){var P,F=arguments.length,Y=F<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,N):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(E,R,N,I);else for(var K=E.length-1;K>=0;K--)(P=E[K])&&(Y=(F<3?P(Y):F>3?P(R,N,Y):P(R,N))||Y);return F>3&&Y&&Object.defineProperty(R,N,Y),Y},d=this&&this.__param||function(E,R){return function(N,I){R(N,I,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const u=c(9806),b=c(9504),w=c(456),k=c(4725),x=c(8460),S=c(844),v=c(6114),g=c(4841),y=c(511),A=c(2585),M=" ",D=new RegExp(M,"g");let T=a.SelectionService=class extends S.Disposable{constructor(E,R,N,I,P,F,Y,K,G){super(),this._element=E,this._screenElement=R,this._linkifier=N,this._bufferService=I,this._coreService=P,this._mouseService=F,this._optionsService=Y,this._renderService=K,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=$=>this._handleMouseMove($),this._mouseUpListener=$=>this._handleMouseUp($),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim(($=>this._handleTrim($))),this.register(this._bufferService.buffers.onBufferActivate(($=>this._handleBufferActivate($)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,S.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!E||!R||E[0]===R[0]&&E[1]===R[1])}get selectionText(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!E||!R)return"";const N=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(E[0]===R[0])return"";const P=E[0]<R[0]?E[0]:R[0],F=E[0]<R[0]?R[0]:E[0];for(let Y=E[1];Y<=R[1];Y++){const K=N.translateBufferLineToString(Y,!0,P,F);I.push(K)}}else{const P=E[1]===R[1]?R[0]:void 0;I.push(N.translateBufferLineToString(E[1],!0,E[0],P));for(let F=E[1]+1;F<=R[1]-1;F++){const Y=N.lines.get(F),K=N.translateBufferLineToString(F,!0);Y!=null&&Y.isWrapped?I[I.length-1]+=K:I.push(K)}if(E[1]!==R[1]){const F=N.lines.get(R[1]),Y=N.translateBufferLineToString(R[1],!0,0,R[0]);F&&F.isWrapped?I[I.length-1]+=Y:I.push(Y)}}return I.map((P=>P.replace(D," "))).join(v.isWindows?`\r
|
|
84
|
+
`:`
|
|
85
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&E&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(E){const R=this._getMouseBufferCoords(E),N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(N&&I&&R)&&this._areCoordsInSelection(R,N,I)}isCellInSelection(E,R){const N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!N||!I)&&this._areCoordsInSelection([E,R],N,I)}_areCoordsInSelection(E,R,N){return E[1]>R[1]&&E[1]<N[1]||R[1]===N[1]&&E[1]===R[1]&&E[0]>=R[0]&&E[0]<N[0]||R[1]<N[1]&&E[1]===N[1]&&E[0]<N[0]||R[1]<N[1]&&E[1]===R[1]&&E[0]>=R[0]}_selectWordAtCursor(E,R){var P,F;const N=(F=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:F.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(E);return!!I&&(this._selectWordAt(I,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,R){this._model.clearSelection(),E=Math.max(E,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const R=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(E){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=N?0:(R>N&&(R-=N),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(E){return v.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const R=this._getMouseBufferCoords(E);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(E){return E.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const N=this._bufferService.buffer;if(this._model.selectionEnd[1]<N.lines.length){const I=N.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]++}R&&R[0]===this._model.selectionEnd[0]&&R[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const E=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const R=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const I=(0,b.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,N=!(!E||!R||E[0]===R[0]&&E[1]===R[1]);N?E&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,R,N)):this._oldHasSelection&&this._fireOnSelectionChange(E,R,N)}_fireOnSelectionChange(E,R,N){this._oldSelectionStart=E,this._oldSelectionEnd=R,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(E,R){let N=R;for(let I=0;R>=I;I++){const P=E.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:P>1&&R!==I&&(N+=P-1)}return N}setSelection(E,R,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,R],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,R,N=!0,I=!0){if(E[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,F=P.lines.get(E[1]);if(!F)return;const Y=P.translateBufferLineToString(E[1],!1);let K=this._convertViewportColToCharacterIndex(F,E[0]),G=K;const $=E[0]-K;let Q=0,H=0,O=0,z=0;if(Y.charAt(K)===" "){for(;K>0&&Y.charAt(K-1)===" ";)K--;for(;G<Y.length&&Y.charAt(G+1)===" ";)G++}else{let ee=E[0],he=E[0];F.getWidth(ee)===0&&(Q++,ee--),F.getWidth(he)===2&&(H++,he++);const ge=F.getString(he).length;for(ge>1&&(z+=ge-1,G+=ge-1);ee>0&&K>0&&!this._isCharWordSeparator(F.loadCell(ee-1,this._workCell));){F.loadCell(ee-1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===0?(Q++,ee--):W>1&&(O+=W-1,K-=W-1),K--,ee--}for(;he<F.length&&G+1<Y.length&&!this._isCharWordSeparator(F.loadCell(he+1,this._workCell));){F.loadCell(he+1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,he++):W>1&&(z+=W-1,G+=W-1),G++,he++}}G++;let V=K+$-Q+O,j=Math.min(this._bufferService.cols,G-K+Q+H-O-z);if(R||Y.slice(K,G).trim()!==""){if(N&&V===0&&F.getCodePoint(0)!==32){const ee=P.lines.get(E[1]-1);if(ee&&F.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(he){const ge=this._bufferService.cols-he.start;V-=ge,j+=ge}}}if(I&&V+j===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const ee=P.lines.get(E[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const he=this._getWordAt([0,E[1]+1],!1,!1,!0);he&&(j+=he.length)}}return{start:V,length:j}}}_selectWordAt(E,R){const N=this._getWordAt(E,R);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[N.start,E[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(E){const R=this._getWordAt(E,!0);if(R){let N=E[1];for(;R.start<0;)R.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,N]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const R=this._bufferService.buffer.getWrappedRangeForLine(E),N={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,g.getRangeLength)(N,this._bufferService.cols)}};a.SelectionService=T=h([d(3,A.IBufferService),d(4,A.ICoreService),d(5,k.IMouseService),d(6,A.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],T)},4725:(f,a,c)=>{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 h=c(8343);a.ICharSizeService=(0,h.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),a.IMouseService=(0,h.createDecorator)("MouseService"),a.IRenderService=(0,h.createDecorator)("RenderService"),a.ISelectionService=(0,h.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,h.createDecorator)("ThemeService"),a.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(f,a,c){var h=this&&this.__decorate||function(T,E,R,N){var I,P=arguments.length,F=P<3?E:N===null?N=Object.getOwnPropertyDescriptor(E,R):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(T,E,R,N);else for(var Y=T.length-1;Y>=0;Y--)(I=T[Y])&&(F=(P<3?I(F):P>3?I(E,R,F):I(E,R))||F);return P>3&&F&&Object.defineProperty(E,R,F),F},d=this&&this.__param||function(T,E){return function(R,N){E(R,N,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),b=c(8055),w=c(8460),k=c(844),x=c(2585),S=b.css.toColor("#ffffff"),v=b.css.toColor("#000000"),g=b.css.toColor("#ffffff"),y=b.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let R=0;R<216;R++){const N=E[R/36%6|0],I=E[R/6%6|0],P=E[R%6];T.push({css:b.channels.toCss(N,I,P),rgba:b.channels.toRgba(N,I,P)})}for(let R=0;R<24;R++){const N=8+10*R;T.push({css:b.channels.toCss(N,N,N),rgba:b.channels.toRgba(N,N,N)})}return T})());let M=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:v,cursor:g,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:b.color.blend(v,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:b.color.blend(v,A),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(T={}){const E=this._colors;if(E.foreground=D(T.foreground,S),E.background=D(T.background,v),E.cursor=D(T.cursor,g),E.cursorAccent=D(T.cursorAccent,y),E.selectionBackgroundTransparent=D(T.selectionBackground,A),E.selectionBackgroundOpaque=b.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=D(T.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=b.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=T.selectionForeground?D(T.selectionForeground,b.NULL_COLOR):void 0,E.selectionForeground===b.NULL_COLOR&&(E.selectionForeground=void 0),b.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=b.color.opacity(E.selectionBackgroundTransparent,.3)),b.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=b.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=a.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=D(T.black,a.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=D(T.red,a.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=D(T.green,a.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=D(T.yellow,a.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=D(T.blue,a.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=D(T.magenta,a.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=D(T.cyan,a.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=D(T.white,a.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=D(T.brightBlack,a.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=D(T.brightRed,a.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=D(T.brightGreen,a.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=D(T.brightYellow,a.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=D(T.brightBlue,a.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=D(T.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=D(T.brightCyan,a.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=D(T.brightWhite,a.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const R=Math.min(E.ansi.length-16,T.extendedAnsi.length);for(let N=0;N<R;N++)E.ansi[N+16]=D(T.extendedAnsi[N],a.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){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[T]=this._restoreColors.ansi[T]}else for(let E=0;E<this._restoreColors.ansi.length;++E)this._colors.ansi[E]=this._restoreColors.ansi[E]}modifyColors(T){T(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 D(T,E){if(T!==void 0)try{return b.css.toColor(T)}catch{}return E}a.ThemeService=M=h([d(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),d=c(844);class u extends d.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.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(w){if(this._maxLength===w)return;const k=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)k[x]=this._array[this._getCyclicIndex(x)];this._array=k,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let k=this._length;k<w;k++)this._array[k]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,k){this._array[this._getCyclicIndex(w)]=k}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,k,...x){if(k){for(let S=w;S<this._length-k;S++)this._array[this._getCyclicIndex(S)]=this._array[this._getCyclicIndex(S+k)];this._length-=k,this.onDeleteEmitter.fire({index:w,amount:k})}for(let S=this._length-1;S>=w;S--)this._array[this._getCyclicIndex(S+x.length)]=this._array[this._getCyclicIndex(S)];for(let S=0;S<x.length;S++)this._array[this._getCyclicIndex(w+S)]=x[S];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const S=this._length+x.length-this._maxLength;this._startIndex+=S,this._length=this._maxLength,this.onTrimEmitter.fire(S)}else this._length+=x.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,k,x){if(!(k<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let v=k-1;v>=0;v--)this.set(w+v+x,this.get(w+v));const S=w+k+x-this._length;if(S>0)for(this._length+=S;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let S=0;S<k;S++)this.set(w+S+x,this.get(w+S))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=u},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(h,d=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const b in h)u[b]=d<=1?h[b]:h[b]&&c(h[b],d-1);return u}},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 c=0,h=0,d=0,u=0;var b,w,k,x,S;function v(y){const A=y.toString(16);return A.length<2?"0"+A:A}function g(y,A){return y<A?(A+.05)/(y+.05):(y+.05)/(A+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(y){y.toCss=function(A,M,D,T){return T!==void 0?`#${v(A)}${v(M)}${v(D)}${v(T)}`:`#${v(A)}${v(M)}${v(D)}`},y.toRgba=function(A,M,D,T=255){return(A<<24|M<<16|D<<8|T)>>>0},y.toColor=function(A,M,D,T){return{css:y.toCss(A,M,D,T),rgba:y.toRgba(A,M,D,T)}}})(b||(a.channels=b={})),(function(y){function A(M,D){return u=Math.round(255*D),[c,h,d]=S.toChannels(M.rgba),{css:b.toCss(c,h,d,u),rgba:b.toRgba(c,h,d,u)}}y.blend=function(M,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};const T=D.rgba>>24&255,E=D.rgba>>16&255,R=D.rgba>>8&255,N=M.rgba>>24&255,I=M.rgba>>16&255,P=M.rgba>>8&255;return c=N+Math.round((T-N)*u),h=I+Math.round((E-I)*u),d=P+Math.round((R-P)*u),{css:b.toCss(c,h,d),rgba:b.toRgba(c,h,d)}},y.isOpaque=function(M){return(255&M.rgba)==255},y.ensureContrastRatio=function(M,D,T){const E=S.ensureContrastRatio(M.rgba,D.rgba,T);if(E)return b.toColor(E>>24&255,E>>16&255,E>>8&255)},y.opaque=function(M){const D=(255|M.rgba)>>>0;return[c,h,d]=S.toChannels(D),{css:b.toCss(c,h,d),rgba:D}},y.opacity=A,y.multiplyOpacity=function(M,D){return u=255&M.rgba,A(M,u*D/255)},y.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(w||(a.color=w={})),(function(y){let A,M;try{const D=document.createElement("canvas");D.width=1,D.height=1;const T=D.getContext("2d",{willReadFrequently:!0});T&&(A=T,A.globalCompositeOperation="copy",M=A.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),d=parseInt(D.slice(3,4).repeat(2),16),b.toColor(c,h,d);case 5:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),d=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),b.toColor(c,h,d,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}const T=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return c=parseInt(T[1]),h=parseInt(T[2]),d=parseInt(T[3]),u=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),b.toColor(c,h,d,u);if(!A||!M)throw new Error("css.toColor: Unsupported css format");if(A.fillStyle=M,A.fillStyle=D,typeof A.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(A.fillRect(0,0,1,1),[c,h,d,u]=A.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(c,h,d,u),css:D}}})(k||(a.css=k={})),(function(y){function A(M,D,T){const E=M/255,R=D/255,N=T/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}y.relativeLuminance=function(M){return A(M>>16&255,M>>8&255,255&M)},y.relativeLuminance2=A})(x||(a.rgb=x={})),(function(y){function A(D,T,E){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,Y=T>>8&255,K=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));for(;K<E&&(P>0||F>0||Y>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),Y-=Math.max(0,Math.ceil(.1*Y)),K=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|Y<<8|255)>>>0}function M(D,T,E){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,Y=T>>8&255,K=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));for(;K<E&&(P<255||F<255||Y<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),F=Math.min(255,F+Math.ceil(.1*(255-F))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),K=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|Y<<8|255)>>>0}y.blend=function(D,T){if(u=(255&T)/255,u===1)return T;const E=T>>24&255,R=T>>16&255,N=T>>8&255,I=D>>24&255,P=D>>16&255,F=D>>8&255;return c=I+Math.round((E-I)*u),h=P+Math.round((R-P)*u),d=F+Math.round((N-F)*u),b.toRgba(c,h,d)},y.ensureContrastRatio=function(D,T,E){const R=x.relativeLuminance(D>>8),N=x.relativeLuminance(T>>8);if(g(R,N)<E){if(N<R){const F=A(D,T,E),Y=g(R,x.relativeLuminance(F>>8));if(Y<E){const K=M(D,T,E);return Y>g(R,x.relativeLuminance(K>>8))?F:K}return F}const I=M(D,T,E),P=g(R,x.relativeLuminance(I>>8));if(P<E){const F=A(D,T,E);return P>g(R,x.relativeLuminance(F>>8))?I:F}return I}},y.reduceLuminance=A,y.increaseLuminance=M,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(S||(a.rgba=S={})),a.toPaddedHex=v,a.contrastRatio=g},8969:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=c(844),d=c(2585),u=c(4348),b=c(7866),w=c(744),k=c(7302),x=c(6975),S=c(8460),v=c(1753),g=c(1480),y=c(7994),A=c(9282),M=c(5435),D=c(5981),T=c(2660);let E=!1;class R extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((I=>{var P;(P=this._onScrollApi)==null||P.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 P in I)this.optionsService.options[P]=I[P]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new S.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new S.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new S.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new S.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new S.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new S.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new k.OptionsService(I)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new M.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,S.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,S.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,S.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,S.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new D.WriteBuffer(((P,F)=>this._inputHandler.parse(P,F)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,P){this._writeBuffer.write(I,P)}writeSync(I,P){this._logService.logLevel<=d.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(I,P)}input(I,P=!0){this.coreService.triggerDataEvent(I,P)}resize(I,P){isNaN(I)||isNaN(P)||(I=Math.max(I,w.MINIMUM_COLS),P=Math.max(P,w.MINIMUM_ROWS),this._bufferService.resize(I,P))}scroll(I,P=!1){this._bufferService.scroll(I,P)}scrollLines(I,P,F){this._bufferService.scrollLines(I,P,F)}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 P=I-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(I,P){return this._inputHandler.registerEscHandler(I,P)}registerDcsHandler(I,P){return this._inputHandler.registerDcsHandler(I,P)}registerCsiHandler(I,P){return this._inputHandler.registerCsiHandler(I,P)}registerOscHandler(I,P){return this._inputHandler.registerOscHandler(I,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?I=P.backend==="conpty"&&P.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(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const P of I)P.dispose()}))}}}a.CoreTerminal=R},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=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){const d=[];for(let u=0;u<this._listeners.length;u++)d.push(this._listeners[u]);for(let u=0;u<d.length;u++)d[u].call(void 0,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,h){return c((d=>h.fire(d)))},a.runAndSubscribe=function(c,h){return h(void 0),c((d=>h(d)))}},5435:function(f,a,c){var h=this&&this.__decorate||function(Q,H,O,z){var V,j=arguments.length,ee=j<3?H:z===null?z=Object.getOwnPropertyDescriptor(H,O):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(Q,H,O,z);else for(var he=Q.length-1;he>=0;he--)(V=Q[he])&&(ee=(j<3?V(ee):j>3?V(H,O,ee):V(H,O))||ee);return j>3&&ee&&Object.defineProperty(H,O,ee),ee},d=this&&this.__param||function(Q,H){return function(O,z){H(O,z,Q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),b=c(7116),w=c(2015),k=c(844),x=c(482),S=c(8437),v=c(8460),g=c(643),y=c(511),A=c(3734),M=c(2585),D=c(1480),T=c(6242),E=c(6351),R=c(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function P(Q,H){if(Q>24)return H.setWinLines||!1;switch(Q){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var F;(function(Q){Q[Q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Q[Q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(a.WindowsOptionsReportType=F={}));let Y=0;class K extends k.Disposable{getAttrData(){return this._curAttrData}constructor(H,O,z,V,j,ee,he,ge,W=new w.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=O,this._coreService=z,this._logService=V,this._optionsService=j,this._oscLinkService=ee,this._coreMouseService=he,this._unicodeService=ge,this._parser=W,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.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 G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,ce)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:ce.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,ce,J)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:ce,data:J})})),this._parser.setDcsHandlerFallback(((q,ce,J)=>{ce==="HOOK"&&(J=J.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:ce,payload:J})})),this._parser.setPrintHandler(((q,ce,J)=>this.print(q,ce,J))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new T.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new T.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new T.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new T.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new T.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new T.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new T.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new T.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new T.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new T.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((q,ce)=>this.requestStatusString(q,ce))))}_preserveStack(H,O,z,V){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=z,this._parseStack.position=V}_logSlowResolvingAsync(H){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([H,new Promise(((O,z)=>setTimeout((()=>z("#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(H,O){let z,V=this._activeBuffer.x,j=this._activeBuffer.y,ee=0;const he=this._parseStack.paused;if(he){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(z),z;V=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>I&&(ee=this._parseStack.position+I)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(q=>String.fromCharCode(q))).join("")}"`),typeof H=="string"?H.split("").map((q=>q.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(H.length,I))),he||this._dirtyRowTracker.clearRange(),H.length>I)for(let q=ee;q<H.length;q+=I){const ce=q+I<H.length?q+I:H.length,J=typeof H=="string"?this._stringDecoder.decode(H.substring(q,ce),this._parseBuffer):this._utf8Decoder.decode(H.subarray(q,ce),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,J))return this._preserveStack(V,j,J,q),this._logSlowResolvingAsync(z),z}else if(!he){const q=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,q))return this._preserveStack(V,j,q,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===V&&this._activeBuffer.y===j||this._onCursorMove.fire();const ge=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),W=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);W<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(W,this._bufferService.rows-1),Math.min(ge,this._bufferService.rows-1))}print(H,O,z){let V,j;const ee=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ge=this._bufferService.cols,W=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,ce=this._curAttrData;let J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-O>0&&J.getWidth(this._activeBuffer.x-1)===2&&J.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ce);let ie=this._parser.precedingJoinState;for(let pe=O;pe<z;++pe){if(V=H[pe],V<127&&ee){const ot=ee[String.fromCharCode(V)];ot&&(V=ot.charCodeAt(0))}const be=this._unicodeService.charProperties(V,ie);j=D.UnicodeService.extractWidth(be);const Ce=D.UnicodeService.extractShouldJoin(be),Ye=Ce?D.UnicodeService.extractWidth(ie):0;if(ie=be,he&&this._onA11yChar.fire((0,x.stringFromCodePoint)(V)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+j-Ye>ge){if(W){const ot=J;let Me=this._activeBuffer.x-Ye;for(this._activeBuffer.x=Ye,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),J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&J instanceof S.BufferLine&&J.copyCellsFrom(ot,Me,0,Ye,!1);Me<ge;)ot.setCellFromCodepoint(Me++,0,1,ce)}else if(this._activeBuffer.x=ge-1,j===2)continue}if(Ce&&this._activeBuffer.x){const ot=J.getWidth(this._activeBuffer.x-1)?1:2;J.addCodepointToCell(this._activeBuffer.x-ot,V,j);for(let Me=j-Ye;--Me>=0;)J.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}else if(q&&(J.insertCells(this._activeBuffer.x,j-Ye,this._activeBuffer.getNullCell(ce)),J.getWidth(ge-1)===2&&J.setCellFromCodepoint(ge-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,ce)),J.setCellFromCodepoint(this._activeBuffer.x++,V,j,ce),j>0)for(;--j;)J.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}this._parser.precedingJoinState=ie,this._activeBuffer.x<ge&&z-O>0&&J.getWidth(this._activeBuffer.x)===0&&!J.hasContent(this._activeBuffer.x)&&J.setCellFromCodepoint(this._activeBuffer.x,0,1,ce),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,O){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,O):this._parser.registerCsiHandler(H,(z=>!P(z.params[0],this._optionsService.rawOptions.windowOptions)||O(z)))}registerDcsHandler(H,O){return this._parser.registerDcsHandler(H,new E.DcsHandler(O))}registerEscHandler(H,O){return this._parser.registerEscHandler(H,O)}registerOscHandler(H,O){return this._parser.registerOscHandler(H,new T.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 H;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&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.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 H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=H,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+O)}cursorUp(H){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const O=H.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=H.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=H.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const O=H.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,O,z,V=!1,j=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);ee.replaceCells(O,z,this._activeBuffer.getNullCell(this._eraseAttrData()),j),V&&(ee.isWrapped=!1)}_resetBufferLine(H,O=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),z.isWrapped=!1)}eraseInDisplay(H,O=!1){let z;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);z<this._bufferService.rows;z++)this._resetBufferLine(z,O);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,O);this._dirtyRowTracker.markDirty(0);break;case 3:const V=this._activeBuffer.lines.length-this._bufferService.rows;V>0&&(this._activeBuffer.lines.trimStart(V),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-V,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-V,0),this._onScroll.fire(0))}return!0}eraseInLine(H,O=!1){switch(this._restrictCursor(this._bufferService.cols),H.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(H){this._restrictCursor();let O=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-V+1;for(;O--;)this._activeBuffer.lines.splice(j-1,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}deleteLines(H){this._restrictCursor();let O=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y;let V;for(V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-V;O--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(V,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(H){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(H){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let O=H.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(H){let O=H.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(S.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(H.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(H){const O=this._parser.precedingJoinState;if(!O)return!0;const z=H.params[0]||1,V=D.UnicodeService.extractWidth(O),j=this._activeBuffer.x-V,ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(j),he=new Uint32Array(ee.length*z);let ge=0;for(let q=0;q<ee.length;){const ce=ee.codePointAt(q)||0;he[ge++]=ce,q+=ce>65535?2:1}let W=ge;for(let q=1;q<z;++q)he.copyWithin(W,0,ge),W+=ge;return this.print(he,0,W),!0}sendDeviceAttributesPrimary(H){return H.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(H){return H.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let O=0;O<H.length;O++)switch(H.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let O=0;O<H.length;O++)switch(H.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.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(H){for(let O=0;O<H.length;O++)switch(H.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let O=0;O<H.length;O++)switch(H.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(),H.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(H,O){const z=this._coreService.decPrivateModes,{activeProtocol:V,activeEncoding:j}=this._coreMouseService,ee=this._coreService,{buffers:he,cols:ge}=this._bufferService,{active:W,alt:q}=he,ce=this._optionsService.rawOptions,J=Ce=>Ce?1:2,ie=H.params[0];return pe=ie,be=O?ie===2?4:ie===4?J(ee.modes.insertMode):ie===12?3:ie===20?J(ce.convertEol):0:ie===1?J(z.applicationCursorKeys):ie===3?ce.windowOptions.setWinLines?ge===80?2:ge===132?1:0:0:ie===6?J(z.origin):ie===7?J(z.wraparound):ie===8?3:ie===9?J(V==="X10"):ie===12?J(ce.cursorBlink):ie===25?J(!ee.isCursorHidden):ie===45?J(z.reverseWraparound):ie===66?J(z.applicationKeypad):ie===67?4:ie===1e3?J(V==="VT200"):ie===1002?J(V==="DRAG"):ie===1003?J(V==="ANY"):ie===1004?J(z.sendFocus):ie===1005?4:ie===1006?J(j==="SGR"):ie===1015?4:ie===1016?J(j==="SGR_PIXELS"):ie===1048?1:ie===47||ie===1047||ie===1049?J(W===q):ie===2004?J(z.bracketedPasteMode):0,ee.triggerDataEvent(`${u.C0.ESC}[${O?"":"?"}${pe};${be}$y`),!0;var pe,be}_updateAttrColor(H,O,z,V,j){return O===2?(H|=50331648,H&=-16777216,H|=A.AttributeData.fromColorRGB([z,V,j])):O===5&&(H&=-50331904,H|=33554432|255&z),H}_extractColor(H,O,z){const V=[0,0,-1,0,0,0];let j=0,ee=0;do{if(V[ee+j]=H.params[O+ee],H.hasSubParams(O+ee)){const he=H.getSubParams(O+ee);let ge=0;do V[1]===5&&(j=1),V[ee+ge+1+j]=he[ge];while(++ge<he.length&&ge+ee+1+j<V.length);break}if(V[1]===5&&ee+j>=2||V[1]===2&&ee+j>=5)break;V[1]&&(j=1)}while(++ee+O<H.length&&ee+j<V.length);for(let he=2;he<V.length;++he)V[he]===-1&&(V[he]=0);switch(V[0]){case 38:z.fg=this._updateAttrColor(z.fg,V[1],V[3],V[4],V[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,V[1],V[3],V[4],V[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,V[1],V[3],V[4],V[5])}return ee}_processUnderline(H,O){O.extended=O.extended.clone(),(!~H||H>5)&&(H=1),O.extended.underlineStyle=H,O.fg|=268435456,H===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(H){H.fg=S.DEFAULT_ATTR_DATA.fg,H.bg=S.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=H.length;let z;const V=this._curAttrData;for(let j=0;j<O;j++)z=H.params[j],z>=30&&z<=37?(V.fg&=-50331904,V.fg|=16777216|z-30):z>=40&&z<=47?(V.bg&=-50331904,V.bg|=16777216|z-40):z>=90&&z<=97?(V.fg&=-50331904,V.fg|=16777224|z-90):z>=100&&z<=107?(V.bg&=-50331904,V.bg|=16777224|z-100):z===0?this._processSGR0(V):z===1?V.fg|=134217728:z===3?V.bg|=67108864:z===4?(V.fg|=268435456,this._processUnderline(H.hasSubParams(j)?H.getSubParams(j)[0]:1,V)):z===5?V.fg|=536870912:z===7?V.fg|=67108864:z===8?V.fg|=1073741824:z===9?V.fg|=2147483648:z===2?V.bg|=134217728:z===21?this._processUnderline(2,V):z===22?(V.fg&=-134217729,V.bg&=-134217729):z===23?V.bg&=-67108865:z===24?(V.fg&=-268435457,this._processUnderline(0,V)):z===25?V.fg&=-536870913:z===27?V.fg&=-67108865:z===28?V.fg&=-1073741825:z===29?V.fg&=2147483647:z===39?(V.fg&=-67108864,V.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):z===49?(V.bg&=-67108864,V.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?j+=this._extractColor(H,j,V):z===53?V.bg|=1073741824:z===55?V.bg&=-1073741825:z===59?(V.extended=V.extended.clone(),V.extended.underlineColor=-1,V.updateExtended()):z===100?(V.fg&=-67108864,V.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,V.bg&=-67108864,V.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${O};${z}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const O=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${O};${z}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=S.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(H){const O=H.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 z=O%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(H){const O=H.params[0]||1;let z;return(H.length<2||(z=H.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(H){if(!P(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22: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(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const O=[],z=H.split(";");for(;z.length>1;){const V=z.shift(),j=z.shift();if(/^\d+$/.exec(V)){const ee=parseInt(V);if($(ee))if(j==="?")O.push({type:0,index:ee});else{const he=(0,R.parseColor)(j);he&&O.push({type:1,index:ee,color:he})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(H){const O=H.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(H,O){this._getCurrentLinkId()&&this._finishHyperlink();const z=H.split(":");let V;const j=z.findIndex((ee=>ee.startsWith("id=")));return j!==-1&&(V=z[j].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:V,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(H,O){const z=H.split(";");for(let V=0;V<z.length&&!(O>=this._specialColors.length);++V,++O)if(z[V]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const j=(0,R.parseColor)(z[V]);j&&this._onColor.fire([{type:1,index:this._specialColors[O],color:j}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const O=[],z=H.split(";");for(let V=0;V<z.length;++V)if(/^\d+$/.exec(z[V])){const j=parseInt(z[V]);$(j)&&O.push({type:2,index:j})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(H){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(H){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(H){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,b.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(N[H[0]],b.CHARSETS[H[1]]||b.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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new y.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const z=this._activeBuffer.ybase+this._activeBuffer.y+O,V=this._activeBuffer.lines.get(z);V&&(V.fill(H),V.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,O){const z=this._bufferService.buffer,V=this._optionsService.rawOptions;return(j=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${j}${u.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[V.cursorStyle]-(V.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,O){this._dirtyRowTracker.markRangeDirty(H,O)}}a.InputHandler=K;let G=class{constructor(Q){this._bufferService=Q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Q){Q<this.start?this.start=Q:Q>this.end&&(this.end=Q)}markRangeDirty(Q,H){Q>H&&(Y=Q,Q=H,H=Y),Q<this.start&&(this.start=Q),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(Q){return 0<=Q&&Q<256}G=h([d(0,M.IBufferService)],G)},844:(f,a)=>{function c(h){for(const d of h)d.dispose();h.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 h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const d=this._disposables.indexOf(h);d!==-1&&this._disposables.splice(d,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var d;this._isDisposed||h===this._value||((d=this._value)==null||d.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},a.toDisposable=function(h){return{dispose:h}},a.disposeArray=c,a.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,u,b){this._data[d]||(this._data[d]={}),this._data[d][u]=b}get(d,u){return this._data[d]?this._data[d][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,d,u,b,w){this._data.get(h,d)||this._data.set(h,d,new c),this._data.get(h,d).set(u,b,w)}get(h,d,u,b){var w;return(w=this._data.get(h,d))==null?void 0:w.get(u,b)}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 c=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),a.isIpad=h==="iPad",a.isIphone=h==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),a.isLinux=h.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const d=this._getKey(h);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===d);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,d){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do d(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let d=0,u=this._array.length-1;for(;u>=d;){let b=d+u>>1;const w=this._getKey(this._array[b]);if(w>h)u=b-1;else{if(!(w<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}d=b+1}}return d}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let k=0,x=0,S=w.timeRemaining(),v=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),x=Math.max(k,x),v=w.timeRemaining(),1.5*x>v)return S-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-k))}ms`),void this._start();S=v}this.clear()}}class u extends d{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const k=Date.now()+w;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=c(643);a.updateWindowsModeWrappedState=function(d){const u=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),b=u==null?void 0:u.get(d.cols-1),w=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);w&&b&&(w.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=c;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,b=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=c(6349),d=c(7226),u=c(3734),b=c(8437),w=c(4634),k=c(511),x=c(643),S=c(4863),v=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,y,A){this._hasScrollback=g,this._optionsService=y,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(g){return g?(this._nullCell.fg=g.fg,this._nullCell.bg=g.bg,this._nullCell.extended=g.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(g){return g?(this._whitespaceCell.fg=g.fg,this._whitespaceCell.bg=g.bg,this._whitespaceCell.extended=g.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,y){return new b.BufferLine(this._bufferService.cols,this.getNullCell(g),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const g=this.ybase+this.y-this.ydisp;return g>=0&&g<this._rows}_getCorrectBufferLength(g){if(!this._hasScrollback)return g;const y=g+this._optionsService.rawOptions.scrollback;return y>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:y}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=b.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(g))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(g,y){const A=this.getNullCell(b.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<g)for(let E=0;E<this.lines.length;E++)M+=+this.lines.get(E).resize(g,A);let T=0;if(this._rows<y)for(let E=this._rows;E<y;E++)this.lines.length<y+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.BufferLine(g,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(g,A)));else for(let E=this._rows;E>y;E--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const E=this.lines.length-D;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=D}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(g,y),this._cols>g))for(let T=0;T<this.lines.length;T++)M+=+this.lines.get(T).resize(g,A);this._cols=g,this._rows=y,this._memoryCleanupQueue.clear(),M>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let g=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,g=!1);let y=0;for(;this._memoryCleanupPosition<this.lines.length;)if(y+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),y>100)return!0;return g}get _isReflowEnabled(){const g=this._optionsService.rawOptions.windowsPty;return g&&g.buildNumber?this._hasScrollback&&g.backend==="conpty"&&g.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(g,y){this._cols!==g&&(g>this._cols?this._reflowLarger(g,y):this._reflowSmaller(g,y))}_reflowLarger(g,y){const A=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(A.length>0){const M=(0,w.reflowLargerCreateNewLayout)(this.lines,A);(0,w.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(g,y,M.countRemoved)}}_reflowLargerAdjustViewport(g,y,A){const M=this.getNullCell(b.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<y&&this.lines.push(new b.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(g,y){const A=this.getNullCell(b.DEFAULT_ATTR_DATA),M=[];let D=0;for(let T=this.lines.length-1;T>=0;T--){let E=this.lines.get(T);if(!E||!E.isWrapped&&E.getTrimmedLength()<=g)continue;const R=[E];for(;E.isWrapped&&T>0;)E=this.lines.get(--T),R.unshift(E);const N=this.ybase+this.y;if(N>=T&&N<T+R.length)continue;const I=R[R.length-1].getTrimmedLength(),P=(0,w.reflowSmallerGetNewLineLengths)(R,this._cols,g),F=P.length-R.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+F):Math.max(0,this.lines.length-this.lines.maxLength+F);const K=[];for(let z=0;z<F;z++){const V=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);K.push(V)}K.length>0&&(M.push({start:T+R.length+D,newLines:K}),D+=K.length),R.push(...K);let G=P.length-1,$=P[G];$===0&&(G--,$=P[G]);let Q=R.length-F-1,H=I;for(;Q>=0;){const z=Math.min(H,$);if(R[G]===void 0)break;if(R[G].copyCellsFrom(R[Q],H-z,$-z,z,!0),$-=z,$===0&&(G--,$=P[G]),H-=z,H===0){Q--;const V=Math.max(Q,0);H=(0,w.getWrappedLineTrimmedLength)(R,V,this._cols)}}for(let z=0;z<R.length;z++)P[z]<g&&R[z].setCell(P[z],A);let O=F-Y;for(;O-- >0;)this.ybase===0?this.y<y-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-y&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+y-1)}if(M.length>0){const T=[],E=[];for(let G=0;G<this.lines.length;G++)E.push(this.lines.get(G));const R=this.lines.length;let N=R-1,I=0,P=M[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let F=0;for(let G=Math.min(this.lines.maxLength-1,R+D-1);G>=0;G--)if(P&&P.start>N+F){for(let $=P.newLines.length-1;$>=0;$--)this.lines.set(G--,P.newLines[$]);G++,T.push({index:N+1,amount:P.newLines.length}),F+=P.newLines.length,P=M[++I]}else this.lines.set(G,E[N--]);let Y=0;for(let G=T.length-1;G>=0;G--)T[G].index+=Y,this.lines.onInsertEmitter.fire(T[G]),Y+=T[G].amount;const K=Math.max(0,R+D-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(g,y,A=0,M){const D=this.lines.get(g);return D?D.translateToString(y,A,M):""}getWrappedRangeForLine(g){let y=g,A=g;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:y,last:A}}setupTabStops(g){for(g!=null?this.tabs[g]||(g=this.prevStop(g)):(this.tabs={},g=0);g<this._cols;g+=this._optionsService.rawOptions.tabStopWidth)this.tabs[g]=!0}prevStop(g){for(g==null&&(g=this.x);!this.tabs[--g]&&g>0;);return g>=this._cols?this._cols-1:g<0?0:g}nextStop(g){for(g==null&&(g=this.x);!this.tabs[++g]&&g<this._cols;);return g>=this._cols?this._cols-1:g<0?0:g}clearMarkers(g){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].line===g&&(this.markers[y].dispose(),this.markers.splice(y--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].dispose(),this.markers.splice(g--,1);this._isClearing=!1}addMarker(g){const y=new S.Marker(g);return this.markers.push(y),y.register(this.lines.onTrim((A=>{y.line-=A,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((A=>{y.line>=A.index&&(y.line+=A.amount)}))),y.register(this.lines.onDelete((A=>{y.line>=A.index&&y.line<A.index+A.amount&&y.dispose(),y.line>A.index&&(y.line-=A.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=c(3734),d=c(511),u=c(643),b=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(S,v,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const y=v||d.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let A=0;A<S;++A)this.setCell(A,y);this.length=S}get(S){const v=this._data[3*S+0],g=2097151&v;return[this._data[3*S+1],2097152&v?this._combined[S]:g?(0,b.stringFromCodePoint)(g):"",v>>22,2097152&v?this._combined[S].charCodeAt(this._combined[S].length-1):g]}set(S,v){this._data[3*S+1]=v[u.CHAR_DATA_ATTR_INDEX],v[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=v[1],this._data[3*S+0]=2097152|S|v[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=v[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(S){return this._data[3*S+0]>>22}hasWidth(S){return 12582912&this._data[3*S+0]}getFg(S){return this._data[3*S+1]}getBg(S){return this._data[3*S+2]}hasContent(S){return 4194303&this._data[3*S+0]}getCodePoint(S){const v=this._data[3*S+0];return 2097152&v?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&v}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const v=this._data[3*S+0];return 2097152&v?this._combined[S]:2097151&v?(0,b.stringFromCodePoint)(2097151&v):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,v){return w=3*S,v.content=this._data[w+0],v.fg=this._data[w+1],v.bg=this._data[w+2],2097152&v.content&&(v.combinedData=this._combined[S]),268435456&v.bg&&(v.extended=this._extendedAttrs[S]),v}setCell(S,v){2097152&v.content&&(this._combined[S]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[S]=v.extended),this._data[3*S+0]=v.content,this._data[3*S+1]=v.fg,this._data[3*S+2]=v.bg}setCellFromCodepoint(S,v,g,y){268435456&y.bg&&(this._extendedAttrs[S]=y.extended),this._data[3*S+0]=v|g<<22,this._data[3*S+1]=y.fg,this._data[3*S+2]=y.bg}addCodepointToCell(S,v,g){let y=this._data[3*S+0];2097152&y?this._combined[S]+=(0,b.stringFromCodePoint)(v):2097151&y?(this._combined[S]=(0,b.stringFromCodePoint)(2097151&y)+(0,b.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,g&&(y&=-12582913,y|=g<<22),this._data[3*S+0]=y}insertCells(S,v,g){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,g),v<this.length-S){const y=new d.CellData;for(let A=this.length-S-v-1;A>=0;--A)this.setCell(S+v+A,this.loadCell(S+A,y));for(let A=0;A<v;++A)this.setCell(S+A,g)}else for(let y=S;y<this.length;++y)this.setCell(y,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(S,v,g){if(S%=this.length,v<this.length-S){const y=new d.CellData;for(let A=0;A<this.length-S-v;++A)this.setCell(S+A,this.loadCell(S+v+A,y));for(let A=this.length-v;A<this.length;++A)this.setCell(A,g)}else for(let y=S;y<this.length;++y)this.setCell(y,g);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,g),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,g)}replaceCells(S,v,g,y=!1){if(y)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,g),v<this.length&&this.getWidth(v-1)===2&&!this.isProtected(v)&&this.setCellFromCodepoint(v,0,1,g);S<v&&S<this.length;)this.isProtected(S)||this.setCell(S,g),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,g),v<this.length&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v,0,1,g);S<v&&S<this.length;)this.setCell(S++,g)}resize(S,v){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const y=new Uint32Array(g);y.set(this._data),this._data=y}for(let y=this.length;y<S;++y)this.setCell(y,v)}else{this._data=this._data.subarray(0,g);const y=Object.keys(this._combined);for(let M=0;M<y.length;M++){const D=parseInt(y[M],10);D>=S&&delete this._combined[D]}const A=Object.keys(this._extendedAttrs);for(let M=0;M<A.length;M++){const D=parseInt(A[M],10);D>=S&&delete this._extendedAttrs[D]}}return this.length=S,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const S=new Uint32Array(this._data.length);return S.set(this._data),this._data=S,1}return 0}fill(S,v=!1){if(v)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,S);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,S)}}copyFrom(S){this.length!==S.length?this._data=new Uint32Array(S._data):this._data.set(S._data),this.length=S.length,this._combined={};for(const v in S._combined)this._combined[v]=S._combined[v];this._extendedAttrs={};for(const v in S._extendedAttrs)this._extendedAttrs[v]=S._extendedAttrs[v];this.isWrapped=S.isWrapped}clone(){const S=new k(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const v in this._combined)S._combined[v]=this._combined[v];for(const v in this._extendedAttrs)S._extendedAttrs[v]=this._extendedAttrs[v];return S.isWrapped=this.isWrapped,S}getTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0])return S+(this._data[3*S+0]>>22);return 0}getNoBgTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0]||50331648&this._data[3*S+2])return S+(this._data[3*S+0]>>22);return 0}copyCellsFrom(S,v,g,y,A){const M=S._data;if(A)for(let T=y-1;T>=0;T--){for(let E=0;E<3;E++)this._data[3*(g+T)+E]=M[3*(v+T)+E];268435456&M[3*(v+T)+2]&&(this._extendedAttrs[g+T]=S._extendedAttrs[v+T])}else for(let T=0;T<y;T++){for(let E=0;E<3;E++)this._data[3*(g+T)+E]=M[3*(v+T)+E];268435456&M[3*(v+T)+2]&&(this._extendedAttrs[g+T]=S._extendedAttrs[v+T])}const D=Object.keys(S._combined);for(let T=0;T<D.length;T++){const E=parseInt(D[T],10);E>=v&&(this._combined[E-v+g]=S._combined[E])}}translateToString(S,v,g,y){v=v??0,g=g??this.length,S&&(g=Math.min(g,this.getTrimmedLength())),y&&(y.length=0);let A="";for(;v<g;){const M=this._data[3*v+0],D=2097151&M,T=2097152&M?this._combined[v]:D?(0,b.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(A+=T,y)for(let E=0;E<T.length;++E)y.push(v);v+=M>>22||1}return y&&y.push(v),A}}a.BufferLine=k},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(f,a)=>{function c(h,d,u){if(d===h.length-1)return h[d].getTrimmedLength();const b=!h[d].hasContent(u-1)&&h[d].getWidth(u-1)===1,w=h[d+1].getWidth(0)===2;return b&&w?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,d,u,b,w){const k=[];for(let x=0;x<h.length-1;x++){let S=x,v=h.get(++S);if(!v.isWrapped)continue;const g=[h.get(x)];for(;S<h.length&&v.isWrapped;)g.push(v),v=h.get(++S);if(b>=x&&b<S){x+=g.length-1;continue}let y=0,A=c(g,y,d),M=1,D=0;for(;M<g.length;){const E=c(g,M,d),R=E-D,N=u-A,I=Math.min(R,N);g[y].copyCellsFrom(g[M],D,A,I,!1),A+=I,A===u&&(y++,A=0),D+=I,D===E&&(M++,D=0),A===0&&y!==0&&g[y-1].getWidth(u-1)===2&&(g[y].copyCellsFrom(g[y-1],u-1,A++,1,!1),g[y-1].setCell(u-1,w))}g[y].replaceCells(A,u,w);let T=0;for(let E=g.length-1;E>0&&(E>y||g[E].getTrimmedLength()===0);E--)T++;T>0&&(k.push(x+g.length-T),k.push(T)),x+=g.length-1}return k},a.reflowLargerCreateNewLayout=function(h,d){const u=[];let b=0,w=d[b],k=0;for(let x=0;x<h.length;x++)if(w===x){const S=d[++b];h.onDeleteEmitter.fire({index:x-k,amount:S}),x+=S-1,k+=S,w=d[++b]}else u.push(x);return{layout:u,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,d){const u=[];for(let b=0;b<d.length;b++)u.push(h.get(d[b]));for(let b=0;b<u.length;b++)h.set(b,u[b]);h.length=d.length},a.reflowSmallerGetNewLineLengths=function(h,d,u){const b=[],w=h.map(((v,g)=>c(h,g,d))).reduce(((v,g)=>v+g));let k=0,x=0,S=0;for(;S<w;){if(w-S<u){b.push(w-S);break}k+=u;const v=c(h,x,d);k>v&&(k-=v,x++);const g=h[x].getWidth(k-1)===2;g&&k--;const y=g?u-1:u;b.push(y),S+=y}return b},a.getWrappedLineTrimmedLength=c},5295:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=c(8460),d=c(844),u=c(9092);class b extends d.Disposable{constructor(k,x){super(),this._optionsService=k,this._bufferService=x,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(k,x){this._normal.resize(k,x),this._alt.resize(k,x),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}a.BufferSet=b},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),d=c(643),u=c(3734);class b extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new b;return x.setFromCharData(k),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const S=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const v=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(S-55296)+v-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=b},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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=c(8460),d=c(844);class u{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=u,u._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 c,h,d;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
86
|
+
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(c||(a.C0=c={})),(function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""})(h||(a.C1=h={})),(function(u){u.ST=`${c.ESC}\\`})(d||(a.C1_ESCAPED=d={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(2584),d={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(u,b,w,k){const x={type:0,cancel:!1,key:void 0},S=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":h.C0.DEL,u.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,u.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(w?"b":"[1;5D"))):x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(w?"f":"[1;5C"))):x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"A",w||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"B",w||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=S?h.C0.ESC+"[3;"+(S+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=S?h.C0.ESC+"[1;"+(S+1)+"H":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=S?h.C0.ESC+"[1;"+(S+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=h.C0.ESC+"[5;"+(S+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=h.C0.ESC+"[6;"+(S+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=S?h.C0.ESC+"[1;"+(S+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=S?h.C0.ESC+"[1;"+(S+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=S?h.C0.ESC+"[1;"+(S+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=S?h.C0.ESC+"[1;"+(S+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=S?h.C0.ESC+"[15;"+(S+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=S?h.C0.ESC+"[17;"+(S+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=S?h.C0.ESC+"[18;"+(S+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=S?h.C0.ESC+"[19;"+(S+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=S?h.C0.ESC+"[20;"+(S+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=S?h.C0.ESC+"[21;"+(S+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=S?h.C0.ESC+"[23;"+(S+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=S?h.C0.ESC+"[24;"+(S+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(w&&!k||!u.altKey||u.metaKey)!w||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=h.C0.US),u.key==="@"&&(x.key=h.C0.NUL)):u.keyCode===65&&(x.type=1);else{const v=d[u.keyCode],g=v==null?void 0:v[u.shiftKey?1:0];if(g)x.key=h.C0.ESC+g;else if(u.keyCode>=65&&u.keyCode<=90){const y=u.ctrlKey?u.keyCode-64:u.keyCode+32;let A=String.fromCharCode(y);u.shiftKey&&(A=A.toUpperCase()),x.key=h.C0.ESC+A}else if(u.keyCode===32)x.key=h.C0.ESC+(u.ctrlKey?h.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),x.key=h.C0.ESC+y,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=h.C0.DEL:u.keyCode===219?x.key=h.C0.ESC:u.keyCode===220?x.key=h.C0.FS:u.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,h=0,d=c.length){let u="";for(let b=h;b<d;++b){let w=c[b];w>65535?(w-=65536,u+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):u+=String.fromCharCode(w)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const d=c.length;if(!d)return 0;let u=0,b=0;if(this._interim){const w=c.charCodeAt(b++);56320<=w&&w<=57343?h[u++]=1024*(this._interim-55296)+w-56320+65536:(h[u++]=this._interim,h[u++]=w),this._interim=0}for(let w=b;w<d;++w){const k=c.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=d)return this._interim=k,u;const x=c.charCodeAt(w);56320<=x&&x<=57343?h[u++]=1024*(k-55296)+x-56320+65536:(h[u++]=k,h[u++]=x)}else k!==65279&&(h[u++]=k)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const d=c.length;if(!d)return 0;let u,b,w,k,x=0,S=0,v=0;if(this.interim[0]){let A=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let D,T=0;for(;(D=63&this.interim[++T])&&T<4;)M<<=6,M|=D;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=E-T;for(;v<R;){if(v>=d)return 0;if(D=c[v++],(192&D)!=128){v--,A=!0;break}this.interim[T++]=D,M<<=6,M|=63&D}A||(E===2?M<128?v--:h[x++]=M:E===3?M<2048||M>=55296&&M<=57343||M===65279||(h[x++]=M):M<65536||M>1114111||(h[x++]=M)),this.interim.fill(0)}const g=d-4;let y=v;for(;y<d;){for(;!(!(y<g)||128&(u=c[y])||128&(b=c[y+1])||128&(w=c[y+2])||128&(k=c[y+3]));)h[x++]=u,h[x++]=b,h[x++]=w,h[x++]=k,y+=4;if(u=c[y++],u<128)h[x++]=u;else if((224&u)==192){if(y>=d)return this.interim[0]=u,x;if(b=c[y++],(192&b)!=128){y--;continue}if(S=(31&u)<<6|63&b,S<128){y--;continue}h[x++]=S}else if((240&u)==224){if(y>=d)return this.interim[0]=u,x;if(b=c[y++],(192&b)!=128){y--;continue}if(y>=d)return this.interim[0]=u,this.interim[1]=b,x;if(w=c[y++],(192&w)!=128){y--;continue}if(S=(15&u)<<12|(63&b)<<6|63&w,S<2048||S>=55296&&S<=57343||S===65279)continue;h[x++]=S}else if((248&u)==240){if(y>=d)return this.interim[0]=u,x;if(b=c[y++],(192&b)!=128){y--;continue}if(y>=d)return this.interim[0]=u,this.interim[1]=b,x;if(w=c[y++],(192&w)!=128){y--;continue}if(y>=d)return this.interim[0]=u,this.interim[1]=b,this.interim[2]=w,x;if(k=c[y++],(192&k)!=128){y--;continue}if(S=(7&u)<<18|(63&b)<<12|(63&w)<<6|63&k,S<65536||S>1114111)continue;h[x++]=S}}return x}}},225:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;a.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let w=0;w<d.length;++w)b.fill(0,d[w][0],d[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?b[w]:(function(k,x){let S,v=0,g=x.length-1;if(k<x[0][0]||k>x[g][1])return!1;for(;g>=v;)if(S=v+g>>1,k>x[S][1])v=S+1;else{if(!(k<x[S][0]))return!0;g=S-1}return!1})(w,u)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,k){let x=this.wcwidth(w),S=x===0&&k!==0;if(S){const v=h.UnicodeService.extractWidth(k);v===0?S=!1:v>x&&(x=v)}return h.UnicodeService.createPropertyValue(0,x,S)}}},5981:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=c(8460),d=c(844);class u extends d.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const S=this._callbacks.shift();S&&S()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,k){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k)}_innerWrite(w=0,k=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const S=this._writeBuffer[this._bufferOffset],v=this._action(S,k);if(v){const y=A=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(x,A);return void v.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(y)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=S.length,Date.now()-x>=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=u},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\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})$/,h=/^[\da-f]+$/;function d(u,b){const w=u.toString(16),k=w.length<2?"0"+w:w;switch(b){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}a.parseColor=function(u){if(!u)return;let b=u.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const w=c.exec(b);if(w){const k=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/k*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/k*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/k*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const w=b.length/3,k=[0,0,0];for(let x=0;x<3;++x){const S=parseInt(b.slice(w*x,w*x+w),16);k[x]=w===1?S<<4:w===2?S:w===3?S>>4:S>>8}return k}},a.toRgbString=function(u,b=16){const[w,k,x]=u;return`rgb:${d(w,b)}/${d(k,b)}/${d(x,b)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=c(482),d=c(8742),u=c(5770),b=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const S=this._handlers[k];return S.push(x),{dispose:()=>{const v=S.indexOf(x);v!==-1&&S.splice(v,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||b,this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(k,x,S){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(k,x,S);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(k,x,S))}unhook(k,x=!0){if(this._active.length){let S=!1,v=this._active.length-1,g=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,S=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&S===!1){for(;v>=0&&(S=this._active[v].unhook(k),S!==!0);v--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,S;v--}for(;v>=0;v--)if(S=this._active[v].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",k);this._active=b,this._ident=0}};const w=new d.Params;w.addParam(0),a.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=w,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():w,this._data="",this._hitLimit=!1}put(k,x,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,S),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let x=!1;if(this._hitLimit)x=!1;else if(k&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((S=>(this._params=w,this._data="",this._hitLimit=!1,S)));return this._params=w,this._data="",this._hitLimit=!1,x}}},2015:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=c(844),d=c(8742),u=c(6242),b=c(6351);class w{constructor(v){this.table=new Uint8Array(v)}setDefault(v,g){this.table.fill(v<<4|g)}add(v,g,y,A){this.table[g<<8|v]=y<<4|A}addMany(v,g,y,A){for(let M=0;M<v.length;M++)this.table[g<<8|v[M]]=y<<4|A}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),v=Array.apply(null,Array(256)).map(((T,E)=>E)),g=(T,E)=>v.slice(T,E),y=g(32,127),A=g(0,24);A.push(25),A.push.apply(A,g(28,32));const M=g(0,14);let D;for(D in S.setDefault(1,0),S.addMany(y,0,2,0),M)S.addMany([24,26,153,154],D,3,0),S.addMany(g(128,144),D,3,0),S.addMany(g(144,152),D,3,0),S.add(156,D,0,0),S.add(27,D,11,1),S.add(157,D,4,8),S.addMany([152,158,159],D,0,7),S.add(155,D,11,3),S.add(144,D,11,9);return S.addMany(A,0,3,0),S.addMany(A,1,3,1),S.add(127,1,0,1),S.addMany(A,8,0,8),S.addMany(A,3,3,3),S.add(127,3,0,3),S.addMany(A,4,3,4),S.add(127,4,0,4),S.addMany(A,6,3,6),S.addMany(A,5,3,5),S.add(127,5,0,5),S.addMany(A,2,3,2),S.add(127,2,0,2),S.add(93,1,4,8),S.addMany(y,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(g(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(y,7,0,7),S.addMany(A,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(g(64,127),3,7,0),S.addMany(g(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(g(48,60),4,8,4),S.addMany(g(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(g(32,64),6,0,6),S.add(127,6,0,6),S.addMany(g(64,127),6,0,0),S.addMany(g(32,48),3,9,5),S.addMany(g(32,48),5,9,5),S.addMany(g(48,64),5,0,6),S.addMany(g(64,127),5,7,0),S.addMany(g(32,48),4,9,5),S.addMany(g(32,48),1,9,2),S.addMany(g(32,48),2,9,2),S.addMany(g(48,127),2,10,0),S.addMany(g(48,80),1,10,0),S.addMany(g(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(g(96,127),1,10,0),S.add(80,1,11,9),S.addMany(A,9,0,9),S.add(127,9,0,9),S.addMany(g(28,32),9,0,9),S.addMany(g(32,48),9,9,12),S.addMany(g(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(A,11,0,11),S.addMany(g(32,128),11,0,11),S.addMany(g(28,32),11,0,11),S.addMany(A,10,0,10),S.add(127,10,0,10),S.addMany(g(28,32),10,0,10),S.addMany(g(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(g(32,48),10,9,12),S.addMany(A,12,0,12),S.add(127,12,0,12),S.addMany(g(28,32),12,0,12),S.addMany(g(32,48),12,9,12),S.addMany(g(48,64),12,0,11),S.addMany(g(64,127),12,12,13),S.addMany(g(64,127),10,12,13),S.addMany(g(64,127),9,12,13),S.addMany(A,13,13,13),S.addMany(y,13,13,13),S.add(127,13,0,13),S.addMany([27,156,24,26],13,14,0),S.add(k,0,2,0),S.add(k,8,5,8),S.add(k,6,0,6),S.add(k,11,0,11),S.add(k,13,13,13),S})();class x extends h.Disposable{constructor(v=a.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,y,A)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,y)=>{},this._escHandlerFb=g=>{},this._errorHandlerFb=g=>g,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,g=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let M=0;M<v.intermediates.length;++M){const D=v.intermediates.charCodeAt(M);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(v.final.length!==1)throw new Error("final must be a single byte");const A=v.final.charCodeAt(0);if(g[0]>A||A>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return y<<=8,y|=A,y}identToString(v){const g=[];for(;v;)g.push(String.fromCharCode(255&v)),v>>=8;return g.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,g){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const A=this._escHandlers[y];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,g){this._executeHandlers[v.charCodeAt(0)]=g}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,g){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const A=this._csiHandlers[y];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,g){return this._dcsParser.registerHandler(this._identifier(v),g)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,g){return this._oscParser.registerHandler(v,g)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}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(v,g,y,A,M){this._parseStack.state=v,this._parseStack.handlers=g,this._parseStack.handlerPos=y,this._parseStack.transition=A,this._parseStack.chunkPos=M}parse(v,g,y){let A,M=0,D=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&R>-1){for(;R>=0&&(A=E[R](this._params),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 4:if(y===!1&&R>-1){for(;R>=0&&(A=E[R](),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 6:if(M=v[this._parseStack.chunkPos],A=this._dcsParser.unhook(M!==24&&M!==26,y),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=v[this._parseStack.chunkPos],A=this._oscParser.end(M!==24&&M!==26,y),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let E=T;E<g;++E){switch(M=v[E],D=this._transitions.table[this.currentState<<8|(M<160?M:k)],D>>4){case 2:for(let F=E+1;;++F){if(F>=g||(M=v[F])<32||M>126&&M<k){this._printHandler(v,E,F),E=F-1;break}if(++F>=g||(M=v[F])<32||M>126&&M<k){this._printHandler(v,E,F),E=F-1;break}if(++F>=g||(M=v[F])<32||M>126&&M<k){this._printHandler(v,E,F),E=F-1;break}if(++F>=g||(M=v[F])<32||M>126&&M<k){this._printHandler(v,E,F),E=F-1;break}}break;case 3:this._executeHandlers[M]?this._executeHandlers[M]():this._executeHandlerFb(M),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:E,code:M,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|M];let N=R?R.length-1:-1;for(;N>=0&&(A=R[N](this._params),A!==!0);N--)if(A instanceof Promise)return this._preserveStack(3,R,N,D,E),A;N<0&&this._csiHandlerFb(this._collect<<8|M,this._params),this.precedingJoinState=0;break;case 8:do switch(M){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(M-48)}while(++E<g&&(M=v[E])>47&&M<60);E--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const I=this._escHandlers[this._collect<<8|M];let P=I?I.length-1:-1;for(;P>=0&&(A=I[P](),A!==!0);P--)if(A instanceof Promise)return this._preserveStack(4,I,P,D,E),A;P<0&&this._escHandlerFb(this._collect<<8|M),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|M,this._params);break;case 13:for(let F=E+1;;++F)if(F>=g||(M=v[F])===24||M===26||M===27||M>127&&M<k){this._dcsParser.put(v,E,F),E=F-1;break}break;case 14:if(A=this._dcsParser.unhook(M!==24&&M!==26),A)return this._preserveStack(6,[],0,D,E),A;M===27&&(D|=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 F=E+1;;F++)if(F>=g||(M=v[F])<32||M>127&&M<k){this._oscParser.put(v,E,F),E=F-1;break}break;case 6:if(A=this._oscParser.end(M!==24&&M!==26),A)return this._preserveStack(5,[],0,D,E),A;M===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&D}}}a.EscapeSequenceParser=x},6242:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=c(5770),d=c(482),u=[];a.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(b,w){this._handlers[b]===void 0&&(this._handlers[b]=[]);const k=this._handlers[b];return k.push(w),{dispose:()=>{const x=k.indexOf(w);x!==-1&&k.splice(x,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,w,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,w,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(b,w,k))}start(){this.reset(),this._state=1}put(b,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){const x=b[w++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&k-w>0&&this._put(b,w,k)}}end(b,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,S=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=w,S=this._stack.fallThrough,this._stack.paused=!1),!S&&k===!1){for(;x>=0&&(k=this._active[x].end(b),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",b);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,w,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,w,k),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let w=!1;if(this._hitLimit)w=!1;else if(b&&(w=this._handler(this._data),w instanceof Promise))return w.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,w}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class h{static fromArray(u){const b=new h;if(!u.length)return b;for(let w=Array.isArray(u[0])?1:0;w<u.length;++w){const k=u[w];if(Array.isArray(k))for(let x=0;x<k.length;++x)b.addSubParam(k[x]);else b.addParam(k)}return b}constructor(u=32,b=32){if(this.maxLength=u,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new h(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let b=0;b<this.length;++b){u.push(this.params[b]);const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&u.push(Array.prototype.slice.call(this._subParams,w,k))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>c?c:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const b=this._subParamsIdx[u]>>8,w=255&this._subParamsIdx[u];return w-b>0?this._subParams.subarray(b,w):null}getSubParamsAll(){const u={};for(let b=0;b<this.length;++b){const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&(u[b]=this._subParams.slice(w,k))}return u}addDigit(u){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,k=w[b-1];w[b-1]=~k?Math.min(10*k+u,c):u}}a.Params=h},5741:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const d={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(d),h.dispose=()=>this._wrappedAddonDispose(d),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let d=0;d<this._addons.length;d++)if(this._addons[d]===c){h=d;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=c(3785),d=c(511);a.BufferApiView=class{constructor(u,b){this._buffer=u,this.type=b}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){const b=this._buffer.lines.get(u);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new d.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,u){if(!(d<0||d>=this._line.length))return u?(this._line.loadCell(d,u),u):this._line.loadCell(d,new h.CellData)}translateToString(d,u,b){return this._line.translateToString(d,u,b)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),d=c(8460),u=c(844);class b extends u.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.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=b},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(d=>h(d.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((d,u)=>h(d,u.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(f,a,c){var h=this&&this.__decorate||function(S,v,g,y){var A,M=arguments.length,D=M<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,g):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,v,g,y);else for(var T=S.length-1;T>=0;T--)(A=S[T])&&(D=(M<3?A(D):M>3?A(v,g,D):A(v,g))||D);return M>3&&D&&Object.defineProperty(v,g,D),D},d=this&&this.__param||function(S,v){return function(g,y){v(g,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),b=c(844),w=c(5295),k=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(S){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(S.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(S.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(S,this))}resize(S,v){this.cols=S,this.rows=v,this.buffers.resize(S,v),this._onResize.fire({cols:S,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,v=!1){const g=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===S.fg&&y.getBg(0)===S.bg||(y=g.getBlankLine(S,v),this._cachedBlankLine=y),y.isWrapped=v;const A=g.ybase+g.scrollTop,M=g.ybase+g.scrollBottom;if(g.scrollTop===0){const D=g.lines.isFull;M===g.lines.length-1?D?g.lines.recycle().copyFrom(y):g.lines.push(y.clone()):g.lines.splice(M+1,0,y.clone()),D?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{const D=M-A+1;g.lines.shiftElements(A+1,D-1,-1),g.lines.set(M,y.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(S,v,g){const y=this.buffer;if(S<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else S+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const A=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+S,y.ybase),0),A!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};a.BufferService=x=h([d(0,k.IOptionsService)],x)},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(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(f,a,c){var h=this&&this.__decorate||function(y,A,M,D){var T,E=arguments.length,R=E<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,A,M,D);else for(var N=y.length-1;N>=0;N--)(T=y[N])&&(R=(E<3?T(R):E>3?T(A,M,R):T(A,M))||R);return E>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(y,A){return function(M,D){A(M,D,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),b=c(8460),w=c(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,A){let M=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(M|=64,M|=y.action):(M|=3&y.button,4&y.button&&(M|=64),8&y.button&&(M|=128),y.action===32?M|=32:y.action!==0||A||(M|=3)),M}const S=String.fromCharCode,v={DEFAULT:y=>{const A=[x(y,!1)+32,y.col+32,y.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${S(A[0])}${S(A[1])}${S(A[2])}`},SGR:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${A}`},SGR_PIXELS:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${A}`}};let g=a.CoreMouseService=class extends w.Disposable{constructor(y,A){super(),this._bufferService=y,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const M of Object.keys(k))this.addProtocol(M,k[M]);for(const M of Object.keys(v))this.addEncoding(M,v[M]);this.reset()}addProtocol(y,A){this._protocols[y]=A}addEncoding(y,A){this._encodings[y]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const A=this._encodings[this._activeEncoding](y);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,A,M){if(M){if(y.x!==A.x||y.y!==A.y)return!1}else if(y.col!==A.col||y.row!==A.row)return!1;return y.button===A.button&&y.action===A.action&&y.ctrl===A.ctrl&&y.alt===A.alt&&y.shift===A.shift}};a.CoreMouseService=g=h([d(0,u.IBufferService),d(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,E=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(y,A,E):D(y,A))||E);return T>3&&E&&Object.defineProperty(y,A,E),E},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),b=c(8460),w=c(844),k=c(2585),x=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=a.CoreService=class extends w.Disposable{constructor(g,y,A){super(),this._bufferService=g,this._logService=y,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(S)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(S)}triggerDataEvent(g,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${g}"`,(()=>g.split("").map((M=>M.charCodeAt(0))))),this._onData.fire(g)}triggerBinaryEvent(g){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${g}"`,(()=>g.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=v=h([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],v)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),d=c(8460),u=c(844),b=c(6106);let w=0,k=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((g=>g==null?void 0:g.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;const y=new S(g);if(y){const A=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),A.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,y,A){let M=0,D=0;for(const T of this._decorations.getKeyIterator(y))M=T.options.x??0,D=M+(T.options.width??1),g>=M&&g<D&&(!A||(T.options.layer??"bottom")===A)&&(yield T)}forEachDecorationAtCell(g,y,A,M){this._decorations.forEachByKey(y,(D=>{w=D.options.x??0,k=w+(D.options.width??1),g>=w&&g<k&&(!A||(D.options.layer??"bottom")===A)&&M(D)}))}}a.DecorationService=x;class S extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(g){super(),this.options=g,this.onRenderEmitter=this.register(new d.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=g.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=c(2585),d=c(8343);class u{constructor(...w){this._entries=new Map;for(const[k,x]of w)this.set(k,x)}set(w,k){const x=this._entries.get(w);return this._entries.set(w,k),x}forEach(w){for(const[k,x]of this._entries.entries())w(k,x)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}a.ServiceCollection=u,a.InstantiationService=class{constructor(){this._services=new u,this._services.set(h.IInstantiationService,this)}setService(b,w){this._services.set(b,w)}getService(b){return this._services.get(b)}createInstance(b,...w){const k=(0,d.getServiceDependencies)(b).sort(((v,g)=>v.index-g.index)),x=[];for(const v of k){const g=this._services.get(v.id);if(!g)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${v.id}.`);x.push(g)}const S=k.length>0?k[0].index:w.length;if(w.length!==S)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${S+1} conflicts with ${w.length} static arguments`);return new b(...w,...x)}}},7866:function(f,a,c){var h=this&&this.__decorate||function(S,v,g,y){var A,M=arguments.length,D=M<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,g):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,v,g,y);else for(var T=S.length-1;T>=0;T--)(A=S[T])&&(D=(M<3?A(D):M>3?A(v,g,D):A(v,g))||D);return M>3&&D&&Object.defineProperty(v,g,D),D},d=this&&this.__param||function(S,v){return function(g,y){v(g,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),b=c(2585),w={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let k,x=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(S){super(),this._optionsService=S,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(S){for(let v=0;v<S.length;v++)typeof S[v]=="function"&&(S[v]=S[v]())}_log(S,v,g){this._evalLazyOptionalParams(g),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,...g)}trace(S,...v){var g;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,S,v)}debug(S,...v){var g;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,S,v)}info(S,...v){var g;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,S,v)}warn(S,...v){var g;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,S,v)}error(S,...v){var g;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,S,v)}};a.LogService=x=h([d(0,b.IOptionsService)],x),a.setTraceLogger=function(S){k=S},a.traceCall=function(S,v,g){if(typeof g.value!="function")throw new Error("not supported");const y=g.value;g.value=function(...A){if(k.logLevel!==b.LogLevelEnum.TRACE)return y.apply(this,A);k.trace(`GlyphRenderer#${y.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const M=y.apply(this,A);return k.trace(`GlyphRenderer#${y.name} return`,M),M}}},7302:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=c(8460),d=c(844),u=c(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:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const b=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...a.DEFAULT_OPTIONS};for(const v in x)if(v in S)try{const g=x[v];S[v]=this._sanitizeAndValidateOption(v,g)}catch(g){console.error(g)}this.rawOptions=S,this.options={...S},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,S){return this.onOptionChange((v=>{v===x&&S(this.rawOptions[x])}))}onMultipleOptionChange(x,S){return this.onOptionChange((v=>{x.indexOf(v)!==-1&&S()}))}_setupOptions(){const x=v=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},S=(v,g)=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);g=this._sanitizeAndValidateOption(v,g),this.rawOptions[v]!==g&&(this.rawOptions[v]=g,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const g={get:x.bind(this,v),set:S.bind(this,v)};Object.defineProperty(this.options,v,g)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=a.DEFAULT_OPTIONS[x]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(S))throw new Error(`"${S}" is not a valid value for ${x}`);break;case"wordSeparator":S||(S=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof S=="number"&&1<=S&&S<=1e3)break;S=b.includes(S)?S:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":S=Math.floor(S);case"lineHeight":case"tabStopWidth":if(S<1)throw new Error(`${x} cannot be less than 1, value: ${S}`);break;case"minimumContrastRatio":S=Math.max(1,Math.min(21,Math.round(10*S)/10));break;case"scrollback":if((S=Math.min(S,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${S}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(S<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${S}`);break;case"rows":case"cols":if(!S&&S!==0)throw new Error(`${x} must be numeric, value: ${S}`);break;case"windowsPty":S=S??{}}return S}}a.OptionsService=w},2660:function(f,a,c){var h=this&&this.__decorate||function(w,k,x,S){var v,g=arguments.length,y=g<3?k:S===null?S=Object.getOwnPropertyDescriptor(k,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(w,k,x,S);else for(var A=w.length-1;A>=0;A--)(v=w[A])&&(y=(g<3?v(y):g>3?v(k,x,y):v(k,x))||y);return g>3&&y&&Object.defineProperty(k,x,y),y},d=this&&this.__param||function(w,k){return function(x,S){k(x,S,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let b=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const k=this._bufferService.buffer;if(w.id===void 0){const A=k.addMarker(k.ybase+k.y),M={data:w,id:this._nextId++,lines:[A]};return A.onDispose((()=>this._removeMarkerFromLink(M,A))),this._dataByLinkId.set(M.id,M),M.id}const x=w,S=this._getEntryIdKey(x),v=this._entriesWithId.get(S);if(v)return this.addLineToLink(v.id,k.ybase+k.y),v.id;const g=k.addMarker(k.ybase+k.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(y,g))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(w,k){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((S=>S.line!==k))){const S=this._bufferService.buffer.addMarker(k);x.lines.push(S),S.onDispose((()=>this._removeMarkerFromLink(x,S)))}}getLinkData(w){var k;return(k=this._dataByLinkId.get(w))==null?void 0:k.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,k){const x=w.lines.indexOf(k);x!==-1&&(w.lines.splice(x,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};a.OscLinkService=b=h([d(0,u.IBufferService)],b)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(d){return d[h]||[]},a.createDecorator=function(d){if(a.serviceRegistry.has(d))return a.serviceRegistry.get(d);const u=function(b,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,S,v){S[c]===S?S[h].push({id:x,index:v}):(S[h]=[{id:x,index:v}],S[c]=S)})(u,b,k)};return u.toString=()=>d,a.serviceRegistry.set(d,u),u}},2585:(f,a,c)=>{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 h=c(8343);var d;a.IBufferService=(0,h.createDecorator)("BufferService"),a.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),a.ICoreService=(0,h.createDecorator)("CoreService"),a.ICharsetService=(0,h.createDecorator)("CharsetService"),a.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(d||(a.LogLevelEnum=d={})),a.ILogService=(0,h.createDecorator)("LogService"),a.IOptionsService=(0,h.createDecorator)("OptionsService"),a.IOscLinkService=(0,h.createDecorator)("OscLinkService"),a.IUnicodeService=(0,h.createDecorator)("UnicodeService"),a.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=c(8460),d=c(225);class u{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,k,x=!1){return(16777215&w)<<3|(3&k)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const w=new d.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let k=0,x=0;const S=w.length;for(let v=0;v<S;++v){let g=w.charCodeAt(v);if(55296<=g&&g<=56319){if(++v>=S)return k+this.wcwidth(g);const M=w.charCodeAt(v);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:k+=this.wcwidth(M)}const y=this.charProperties(g,x);let A=u.extractWidth(y);u.extractShouldJoin(y)&&(A-=u.extractWidth(x)),k+=A,x=y}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=u}},o={};function p(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f].call(c.exports,c,c.exports,p),c.exports}var _={};return(()=>{var f=_;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=p(9042),c=p(3236),h=p(844),d=p(5741),u=p(8285),b=p(7975),w=p(7090),k=["cols","rows"];class x extends h.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const g=A=>this._core.options[A],y=(A,M)=>{this._checkReadonlyOptions(A),this._core.options[A]=M};for(const A in this._core.options){const M={get:g.bind(this,A),set:y.bind(this,A)};Object.defineProperty(this._publicOptions,A,M)}}_checkReadonlyOptions(v){if(k.includes(v))throw new Error(`Option "${v}" 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 b.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let g="none";switch(this._core.coreMouseService.activeProtocol){case"X10":g="x10";break;case"VT200":g="vt200";break;case"DRAG":g="drag";break;case"ANY":g="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const g in v)this._publicOptions[g]=v[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,g=!0){this._core.input(v,g)}resize(v,g){this._verifyIntegers(v,g),this._core.resize(v,g)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,g,y){this._verifyIntegers(v,g,y),this._core.select(v,g,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,g){this._verifyIntegers(v,g),this._core.selectLines(v,g)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,g){this._core.write(v,g)}writeln(v,g){this._core.write(v),this._core.write(`\r
|
|
87
|
+
`,g)}paste(v){this._core.paste(v)}refresh(v,g){this._verifyIntegers(v,g),this._core.refresh(v,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return a}_verifyIntegers(...v){for(const g of v)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const g of v)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}f.Terminal=x})(),_})()))})(yu)),yu.exports}var l2=s2();class a2{constructor(r,s){Yp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(r)}`),this.socket.addEventListener("message",p=>{var f,a;const _=JSON.parse(p.data);_.type==="output"?s.onOutput(_.data):_.type==="error"?(f=s.onError)==null||f.call(s,_.message):(a=s.onStatus)==null||a.call(s,_)}),this.socket.addEventListener("error",()=>{var p;(p=s.onError)==null||p.call(s,"Terminal connection failed.")})}sendInput(r){this.send({type:"input",data:r})}resize(r,s){this.send({type:"resize",cols:r,rows:s})}close(){this.socket.close()}send(r){const s=JSON.stringify(r);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(s);return}this.socket.addEventListener("open",()=>this.socket.send(s),{once:!0})}}function v_({sessionId:n,active:r=!0,onEvent:s}){const o=ue.useRef(null),p=ue.useRef(null),_=ue.useRef(null),f=ue.useRef(null),a=ue.useRef(r),c=ue.useRef(s);function h(d={}){const u=o.current,b=p.current,w=_.current,k=f.current;if(!u||!b||!w||!k)return!1;const x=u.getBoundingClientRect();return x.width<o2||x.height<c2||(w.fit(),k.cols<u2||k.rows<h2)?!1:(b.resize(k.cols,k.rows),d.focus&&k.focus(),!0)}return ue.useEffect(()=>{c.current=s},[s]),ue.useEffect(()=>{a.current=r},[r]),ue.useEffect(()=>{if(!o.current)return;const d=new l2.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:f2}),u=new n2.FitAddon;d.loadAddon(u),d.loadAddon(new r2.WebLinksAddon),d.open(o.current),f.current=d,_.current=u;const b=new a2(n,{onOutput(y){d.write(y)},onStatus(y){var A;(A=c.current)==null||A.call(c,y.type)},onError(y){var A;d.writeln(`\r
|
|
88
|
+
[VCM] ${y}`),(A=c.current)==null||A.call(c,y)}});p.current=b;const w=d.onData(y=>{b.sendInput(y)});let k=0,x=0,S=0;const v=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},g=new ResizeObserver(()=>{v()});return g.observe(o.current),x=window.requestAnimationFrame(v),S=window.setTimeout(v,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),g.disconnect(),w.dispose(),b.close(),d.dispose(),p.current=null,f.current=null,_.current=null}},[n]),ue.useEffect(()=>{if(!r)return;const d=[],u=[];return d.push(window.requestAnimationFrame(()=>{h({focus:!0}),d.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of d)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),ue.useEffect(()=>{const d=()=>{a.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),B.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var d;return(d=f.current)==null?void 0:d.focus()}})}const o2=160,c2=80,u2=20,h2=5,f2={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"};function Yr({status:n}){return B.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function d2({status:n,bootstrapStatus:r,applyResult:s,busy:o=!1,onRefresh:p,onApply:_,onStartBootstrap:f}){const[a,c]=ue.useState(!1),h=r==null?void 0:r.session;return ue.useEffect(()=>{h||c(!1)},[h]),n?B.jsxs("section",{className:"harness-panel",children:[B.jsxs("div",{className:"harness-stage",children:[B.jsxs("div",{className:"harness-panel-header",children:[B.jsxs("div",{children:[B.jsx("strong",{children:"Fixed install"}),B.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),B.jsx("div",{className:"harness-actions",children:n.initialized?B.jsxs(B.Fragment,{children:[B.jsx("button",{type:"button",disabled:o,onClick:()=>void p(),children:"Refresh"}),n.needsApply?B.jsx("button",{type:"button",disabled:o,onClick:()=>void _(),children:"Update"}):null]}):B.jsx("button",{type:"button",disabled:o,onClick:()=>void _(),children:"Initialize"})})]}),n.initialized&&n.needsApply?B.jsxs(B.Fragment,{children:[B.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),B.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(d=>B.jsxs("li",{children:[B.jsx("span",{children:d.path}),B.jsx(Yr,{status:d.action})]},`${d.path}:${d.action}`))})]}):null]}),B.jsxs("div",{className:"harness-stage",children:[B.jsxs("div",{className:"harness-panel-header",children:[B.jsxs("div",{children:[B.jsx("strong",{children:"Bootstrap"}),B.jsx("p",{className:"muted",children:r?p2(r.status):"not loaded"})]}),B.jsx("div",{className:"harness-actions",children:B.jsx("button",{type:"button",disabled:o||!(r!=null&&r.canStart),onClick:()=>{c(!0),f()},children:"Run Bootstrap"})})]}),r?B.jsxs(B.Fragment,{children:[B.jsx("ol",{className:"harness-file-list",children:r.checks.map(d=>B.jsxs("li",{title:d.detail??d.path??"",children:[B.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),B.jsx(Yr,{status:d.status})]},d.key))}),h?B.jsxs("div",{className:"harness-bootstrap-session",children:[B.jsxs("div",{children:[B.jsx("span",{children:h.command}),B.jsx(Yr,{status:h.status})]}),B.jsx("button",{type:"button",onClick:()=>c(!0),children:"Open Terminal"})]}):null]}):B.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),s?B.jsxs("div",{className:"harness-result",children:[B.jsx("p",{children:s.message}),s.changedFiles.length>0?B.jsx("ul",{children:s.changedFiles.map(d=>B.jsxs("li",{children:[B.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?B.jsx("ul",{className:"warnings",children:n.warnings.map(d=>B.jsx("li",{children:d},d))}):null,r!=null&&r.warnings.length?B.jsx("ul",{className:"warnings",children:r.warnings.map(d=>B.jsx("li",{children:d},d))}):null,a&&h?B.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:B.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[B.jsxs("header",{className:"harness-bootstrap-modal-header",children:[B.jsxs("div",{children:[B.jsx("strong",{children:"Harness Bootstrap Terminal"}),B.jsx("p",{className:"muted",children:h.command})]}),B.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[B.jsx(Yr,{status:h.status}),B.jsx("button",{type:"button",onClick:()=>c(!1),children:"Close"})]})]}),B.jsx("div",{className:"harness-bootstrap-terminal",children:B.jsx(v_,{sessionId:h.id,active:a})})]})}):null]}):null}function p2(n){return n.replaceAll("_"," ")}function th(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function m2(n,r=6){const s=[...n].sort(v2).map((p,_)=>({message:p,sequence:_+1}));return[...r===null?s:s.slice(-r)].sort((p,_)=>_.sequence-p.sequence)}function g2({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:p=!0,showHeader:_=!0,onModeChange:f,onMarkAllDone:a}){const[c,h]=ue.useState(null),d=th(n),u=(r==null?void 0:r.mode)??"auto",b=m2(n,o);async function w(k){await y2(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return B.jsxs("section",{className:"message-panel",children:[_?B.jsxs("div",{className:"message-panel-header",children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Messages"}),B.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),p&&f?B.jsx("div",{className:"message-controls",children:B.jsxs("label",{className:"message-mode-toggle",children:[B.jsx("input",{type:"checkbox",checked:u==="auto",disabled:s,onChange:k=>f(k.target.checked?"auto":"manual")}),B.jsx("span",{children:"Auto orchestration"})]})}):null,p&&a?B.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?B.jsx("p",{className:"muted",children:"No role messages yet."}):B.jsx("ol",{className:"message-list",children:b.map(({message:k,sequence:x})=>B.jsxs("li",{className:"message-item",children:[B.jsxs("div",{className:"message-item-main",children:[B.jsxs("div",{className:"message-meta",children:[B.jsxs("span",{className:"message-sequence",children:["#",x]}),B.jsx("time",{dateTime:Oa(k),children:_2(Oa(k))}),B.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),B.jsx("span",{children:k.type})]}),B.jsx("p",{children:k.body}),k.failureReason?B.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?B.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),B.jsx("div",{className:"message-actions",children:B.jsx("button",{type:"button",disabled:s,onClick:()=>void w(k),children:c===k.id?"Copied":"Copy"})})]},k.id))})]})}function _2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Oa(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function v2(n,r){const s=Oa(n).localeCompare(Oa(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function y2(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function S2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[p,_]=ue.useState(n);ue.useEffect(()=>{n&&_(n)},[n]);async function f(a){a.preventDefault(),await o(p)}return B.jsx("form",{className:"repo-connect",onSubmit:f,children:B.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[B.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:p,onChange:a=>_(a.target.value),placeholder:"/path/to/repo"}),r.length>0?B.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&_(a.target.value)},children:[B.jsx("option",{value:"",children:"Recent"}),r.map(a=>B.jsx("option",{value:a,children:a},a))]}):null,B.jsx("button",{type:"submit",disabled:s||!p.trim(),children:"Connect"})]})})}function b2({tasks:n,activeTaskSlug:r,onSelect:s}){return B.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>B.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[B.jsx("span",{children:o.title||o.taskSlug}),B.jsx(Yr,{status:o.status})]},o.taskSlug))})}function C2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:p,orchestration:_,events:f,roundState:a,codexReview:c,translationEnabled:h,translationAutoSendEnabled:d,translationTargetLanguage:u,harnessStatus:b,harnessBootstrapStatus:w,harnessApplyResult:k,gatewayStatus:x,gatewayQrLogin:S,gatewayQrCheck:v,busy:g,onConnect:y,onRefreshConnectedRepository:A,onPullConnectedRepository:M,onRefreshHarness:D,onApplyHarness:T,onStartHarnessBootstrap:E,onRefreshGateway:R,onGatewayEnabledChange:N,onGatewayTranslationChange:I,onStartGatewayQrLogin:P,onResetGatewayBinding:F,onCodexGateEnabledChange:Y,onTranslationEnabledChange:K,onTranslationAutoSendChange:G,onTranslationTargetLanguageChange:$,onOpenFileTranslation:Q,onCreateTranslationBootstrap:H,onCreateTask:O,onSelectTask:z,themeMode:V,onThemeModeChange:j,flowPauseAlerts:ee,onFlowPauseAlertsChange:he,permissionRequestMode:ge,onPermissionRequestModeChange:W,launchTemplate:q,canSaveLaunchTemplate:ce,canOneClickStart:J,onSaveLaunchTemplate:ie,onOneClickStart:pe,onTryFlowPauseAlert:be,onMarkAllMessagesDone:Ce,onDeleteMessageHistory:Ye}){const[ot,Me]=ue.useState(""),[Dt,kt]=ue.useState(!0),[Ut,qt]=ue.useState(!1),[Zt,mt]=ue.useState(!1),[Ge,ut]=ue.useState(()=>o?null:"repository-path"),fe=th(p),ve=ot.trim(),xe=s.find(Te=>Te.taskSlug===o)??null;ue.useEffect(()=>{ut(Te=>o&&Te==="repository-path"?null:!o&&Te===null?"repository-path":Te)},[o]);function ae(Te,He){ut(He?Te:null)}async function De(Te){Te.preventDefault(),await O({taskSlug:ve,createWorktree:Dt}),Me(""),kt(!0)}return B.jsxs("div",{className:"project-dashboard",children:[B.jsx("header",{className:"brand-header",children:B.jsx("strong",{children:"VibeCodingMaster"})}),B.jsx(Jn,{title:"Repository Path",open:Ge==="repository-path",onOpenChange:Te=>ae("repository-path",Te),children:B.jsx(S2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:g,onConnect:y})}),n?B.jsx(Jn,{title:"Connected Repository",open:Ge==="connected-repository",onOpenChange:Te=>{ae("connected-repository",Te),Te&&A()},children:B.jsx(T2,{activeTask:xe,busy:g,project:n,onPull:M})}):null,B.jsx(Jn,{title:"Settings",open:Ge==="settings",onOpenChange:Te=>ae("settings",Te),children:B.jsxs("div",{className:"sidebar-settings",children:[B.jsxs("button",{"aria-label":`Theme mode: ${tg(V)}`,className:"settings-toggle theme-mode-toggle",disabled:g,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>j(L2(V)),children:[B.jsx("span",{children:"Theme"}),B.jsx("span",{children:tg(V)})]}),B.jsxs("button",{"aria-pressed":!(x!=null&&x.enabled)&&ee,className:!(x!=null&&x.enabled)&&ee?"settings-toggle is-active":"settings-toggle",disabled:g||(x==null?void 0:x.enabled),title:x!=null&&x.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>he(!ee),children:[B.jsx("span",{children:"Flow pause alert"}),B.jsx("span",{children:x!=null&&x.enabled?"off":ee?"on":"off"})]}),B.jsxs("button",{className:"settings-toggle",disabled:g||(x==null?void 0:x.enabled),title:x!=null&&x.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:be,children:[B.jsx("span",{children:"Try alert"}),B.jsx("span",{children:"test"})]}),B.jsxs("label",{className:"settings-select-row",children:[B.jsx("span",{children:"Permission requests"}),B.jsxs("select",{value:ge,disabled:g,onChange:Te=>W(Te.target.value),children:[B.jsx("option",{value:"off",children:"off"}),B.jsx("option",{value:"allowAll",children:"allow all"})]})]}),B.jsxs("button",{className:"settings-toggle",disabled:g||!ce,title:"Save the current four role launch settings",type:"button",onClick:ie,children:[B.jsx("span",{children:"Save launch template"}),B.jsx("span",{children:ce?"ready":"needs 4 sessions"})]}),J?B.jsxs("button",{className:"settings-toggle is-active",disabled:g,title:w2(q),type:"button",onClick:pe,children:[B.jsx("span",{children:"One-click start"}),B.jsx("span",{children:y_(q)})]}):null,o?B.jsxs(B.Fragment,{children:[B.jsxs("button",{type:"button",onClick:()=>qt(!0),children:[B.jsx("span",{children:"Messages"}),B.jsxs("span",{className:"muted",children:[fe.total," total"]})]}),B.jsxs("button",{type:"button",onClick:()=>mt(!0),children:[B.jsx("span",{children:"Events"}),B.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),B.jsx(Jn,{title:"Translation",open:Ge==="translation",onOpenChange:Te=>ae("translation",Te),children:B.jsx(x2,{busy:g,enabled:h,autoSendEnabled:d,targetLanguage:u,fileTranslationAvailable:!!(n&&o),onAutoSendChange:G,onCreateBootstrap:H,onEnabledChange:K,onTargetLanguageChange:$,onOpenFileTranslation:Q})}),n&&o?B.jsx(Jn,{title:"Codex Review Gates",open:Ge==="codex-review-gates",onOpenChange:Te=>ae("codex-review-gates",Te),children:B.jsx(E2,{busy:g,state:c,onGateEnabledChange:Y})}):null,B.jsx(Jn,{title:"Gateway",open:Ge==="gateway",onOpenChange:Te=>{ae("gateway",Te),Te&&R()},children:B.jsx(A2,{busy:g,qrCheck:v,qrLogin:S,status:x,onEnabledChange:N,onResetBinding:F,onStartQrLogin:P,onTranslationChange:I})}),n?B.jsx(Jn,{title:"VCM Harness",open:Ge==="vcm-harness",onOpenChange:Te=>ae("vcm-harness",Te),children:B.jsx(d2,{status:b,bootstrapStatus:w,applyResult:k,busy:g,onRefresh:D,onApply:T,onStartBootstrap:E})}):null,n?B.jsx(Jn,{title:"New Task",open:Ge==="new-task",onOpenChange:Te=>ae("new-task",Te),children:B.jsx("div",{className:"task-create",children:B.jsxs("form",{onSubmit:De,children:[B.jsx("input",{value:ot,onChange:Te=>Me(Te.target.value),placeholder:"task name"}),B.jsxs("label",{className:"task-create-option",children:[B.jsx("input",{type:"checkbox",checked:Dt,onChange:Te=>kt(Te.target.checked)}),B.jsx("span",{children:"Create worktree and branch"})]}),Dt?B.jsxs("div",{className:"task-create-preview",children:[B.jsxs("small",{children:["branch: ",ve?`feature/${ve}`:"feature/<task>"]}),B.jsxs("small",{children:["worktree: ",ve?`.claude/worktrees/${ve}`:".claude/worktrees/<task>"]})]}):B.jsx("div",{className:"task-create-preview",children:B.jsx("small",{children:"uses current repository path and current branch"})}),B.jsx("button",{type:"submit",disabled:g||!ve,children:"Create"})]})})}):null,s.length>0?B.jsx(Jn,{title:"Tasks",open:Ge==="tasks",onOpenChange:Te=>ae("tasks",Te),children:B.jsx(b2,{tasks:s,activeTaskSlug:o,onSelect:z})}):null,n&&xe?B.jsx(M2,{task:xe,roundState:a}):null,Ut?B.jsx(B2,{busy:g,messages:p,orchestration:_,onClose:()=>qt(!1),onMarkAllDone:()=>{o&&Ce(o)},onDeleteMessageHistory:()=>{o&&Ye(o)}}):null,Zt?B.jsx(O2,{events:f,onClose:()=>mt(!1)}):null]})}function y_(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function w2(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model} / ${o.effort}`).join("; ");return`Launch template: ${y_(n)}; ${r}`}function x2({autoSendEnabled:n,busy:r,enabled:s,fileTranslationAvailable:o,targetLanguage:p,onAutoSendChange:_,onCreateBootstrap:f,onEnabledChange:a,onTargetLanguageChange:c,onOpenFileTranslation:h}){return B.jsxs("div",{className:"sidebar-settings",children:[B.jsxs("button",{"aria-pressed":s,className:s?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>a(!s),children:[B.jsx("span",{children:"Conversation translation"}),B.jsx("span",{children:s?"on":"off"})]}),B.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>_(!n),children:[B.jsx("span",{children:"Auto-send"}),B.jsx("span",{children:n?"on":"off"})]}),B.jsxs("label",{className:"settings-select-row",children:[B.jsx("span",{children:"Language"}),B.jsx("select",{value:p,disabled:r,onChange:d=>c(d.target.value),children:ug.map(d=>B.jsx("option",{value:d.value,children:d.label},d.value))})]}),B.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open file translation":"Create or select a task first",type:"button",onClick:h,children:[B.jsx("span",{children:"File translation"}),B.jsx("span",{children:"open"})]}),B.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Run translation bootstrap":"Create or select a task first",type:"button",onClick:f,children:[B.jsx("span",{children:"Bootstrap"}),B.jsx("span",{children:"run"})]})]})}function E2({busy:n,onGateEnabledChange:r,state:s}){return B.jsx("div",{className:"sidebar-settings",children:Jx.map(o=>{const p=s==null?void 0:s.gates[o],_=!!(p!=null&&p.required);return B.jsxs("button",{"aria-pressed":_,className:_?"settings-toggle is-active":"settings-toggle",disabled:n||!s,title:p!=null&&p.status?`status: ${p.status}`:void 0,type:"button",onClick:()=>r(o,!_),children:[B.jsx("span",{children:k2(o)}),B.jsx("span",{children:_?"on":"off"})]},o)})})}function k2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function A2({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:p,qrCheck:_,qrLogin:f,status:a}){const c=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return B.jsxs("div",{className:"gateway-panel",children:[B.jsxs("div",{className:"gateway-actions",children:[B.jsxs("button",{"aria-pressed":!!(a!=null&&a.enabled),className:a!=null&&a.enabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a||!a.enabled&&!c,title:c?"Enable or disable PM messages and task-changing Gateway commands":"Scan and confirm iLink login first",type:"button",onClick:()=>a?r(!a.enabled):void 0,children:[B.jsx("span",{children:"Gateway"}),B.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),B.jsxs("button",{"aria-pressed":!!(a!=null&&a.translationEnabled),className:a!=null&&a.translationEnabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a,type:"button",onClick:()=>a?p(!a.translationEnabled):void 0,children:[B.jsx("span",{children:"Translation"}),B.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?B.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):B.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?B.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,_?B.jsxs("p",{className:"muted",children:["QR status: ",_.status,_.message?` · ${_.message}`:""]}):null]})}function T2({activeTask:n,busy:r,onPull:s,project:o}){const p=!!(n&&!n.worktreePath&&n.cleanupStatus!=="cleaned"),_=p?`Inline task "${n==null?void 0:n.taskSlug}" uses the base repository.`:o.pullDisabledReason,f=!!(o.canPull&&!p);return B.jsxs("div",{className:"project-summary",children:[B.jsxs("dl",{children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Base path"}),B.jsx("dd",{children:o.repoRoot})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Branch"}),B.jsx("dd",{children:D2(o)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Remote"}),B.jsx("dd",{children:o.upstreamBranch??"no upstream"})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Status"}),B.jsx("dd",{children:R2(o)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Commit"}),B.jsx("dd",{children:o.shortHeadCommit??o.headCommit??"unknown"})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Working tree"}),B.jsx("dd",{children:o.isDirty?"uncommitted changes":"clean"})]})]}),B.jsxs("div",{className:"connected-repo-actions",children:[B.jsx("button",{type:"button",disabled:r||!f,title:_??"Pull latest changes with git pull --ff-only",onClick:()=>void s(),children:"Pull"}),B.jsx("span",{className:"muted",children:o.checkedAt?`checked ${Mu(o.checkedAt)}`:"status not refreshed"})]}),_?B.jsx("p",{className:"muted",children:_}):null,o.warnings.length>0?B.jsx("ul",{className:"warnings",children:o.warnings.map(a=>B.jsx("li",{children:a},a))}):null]})}function D2(n){return n.branch||"unknown"}function R2(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function M2({roundState:n,task:r}){var d;const[s,o]=ue.useState(()=>Date.now()),p=!!(n!=null&&n.startedAt&&n.status==="running"),_=eg(r.createdAt,s),f=Jm(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=p&&n?Jm(n,n.currentRoundCcActiveMs,s):0,c=p&&(n!=null&&n.startedAt)?eg(n.startedAt,s):0,h=((d=r.title)==null?void 0:d.trim())||r.taskSlug;return ue.useEffect(()=>{const u=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(u)},[]),B.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[B.jsxs("div",{className:"task-status-dock-title",children:[B.jsx("strong",{title:h,children:h}),B.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),B.jsxs("dl",{className:"task-status-stats",children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Session start"}),B.jsx("dd",{children:Mu(r.createdAt)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Session total"}),B.jsx("dd",{children:ka(_)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Rounds"}),B.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Role runtime"}),B.jsx("dd",{children:ka(f)})]})]}),p&&n?B.jsxs("div",{className:"current-round-status",children:[B.jsxs("div",{className:"current-round-title",children:[B.jsx("span",{children:"Current Round"}),B.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),B.jsxs("dl",{className:"task-status-stats",children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Started"}),B.jsx("dd",{children:Mu(n.startedAt)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Total"}),B.jsx("dd",{children:ka(c)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Role runtime"}),B.jsx("dd",{children:ka(a)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Turn count"}),B.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function Jm(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const o=Date.parse(n.updatedAt);return Number.isFinite(o)?r+Math.max(0,s-o):r}function eg(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function Mu(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function ka(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),p=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?p>0?`${o}m ${p}s`:`${o}m`:`${p}s`}function L2(n){return n==="system"?"light":n==="light"?"dark":"system"}function tg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function O2({events:n,onClose:r}){return B.jsx("div",{className:"modal-backdrop",children:B.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Events"}),B.jsxs("p",{className:"muted",children:[n.length," total"]})]}),B.jsx("button",{type:"button",onClick:r,children:"Close"})]}),B.jsx(e2,{events:n,maxEvents:null,showHeader:!1})]})})}function B2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:p,onDeleteMessageHistory:_}){const f=th(r);function a(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
89
|
+
`))&&p()}function c(){window.confirm([`Delete ${f.total} message histor${f.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
|
|
90
|
+
`))&&_()}return B.jsx("div",{className:"modal-backdrop",children:B.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Messages"}),B.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),B.jsxs("div",{className:"modal-actions",children:[B.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),B.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),B.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),B.jsx(g2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function Jn({children:n,onOpenChange:r,open:s,title:o}){return B.jsxs("section",{className:"sidebar-section",children:[B.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[B.jsx("span",{children:o}),B.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?B.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function S_(n,r){return n.find(s=>s.role===r)}function N2({activeRole:n,roles:r=Bu,sessions:s,onSelect:o}){return B.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(p=>{const _=S_(s,p.name),f=(_==null?void 0:_.status)==="running"?_.activityStatus??"idle":(_==null?void 0:_.status)??"not_started";return B.jsxs("button",{className:p.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":p.name===n,onClick:()=>o(p.name),children:[B.jsx("span",{children:p.label}),B.jsx(Yr,{status:f})]},p.name)})})}const b_=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}],C_=[{value:"gpt-5.5",label:"GPT-5.5",description:"Strong Codex reviewer default"},{value:"default",label:"Default",description:"Codex account default"}],w_=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"},{value:"max",label:"Max",description:"Maximum reasoning"}],x_=[...w_,{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}],j2=x_;function z2({role:n,session:r,permissionMode:s,model:o,effort:p,busy:_=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:d,onStop:u,onRestart:b}){const w=(r==null?void 0:r.status)==="running",k=!!(r!=null&&r.claudeSessionId&&!w),x=!w&&!(r!=null&&r.claudeSessionId),S=Nu(n),v=!!(r&&r.permissionMode!==s),g=(r==null?void 0:r.model)??"default",y=!!(r&&g!==o),A=(r==null?void 0:r.effort)??"default",M=!!(r&&A!==p),D=S?C_:b_,T=S?w_:x_;return B.jsxs("div",{className:"session-controls",children:[S?null:B.jsxs("label",{className:"session-option-field permission-mode-field",children:[B.jsxs("span",{children:["Permission",B.jsx("small",{children:r?`current: ${r.permissionMode}${v?" / next launch":""}`:"applies on start"})]}),B.jsxs("select",{value:s,onChange:E=>f(E.target.value),children:[B.jsx("option",{value:"default",children:"默认"}),B.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),B.jsxs("label",{className:"session-option-field model-field",children:[B.jsxs("span",{children:["Model",B.jsx("small",{children:r?`current: ${H2(g,S)}${y?" / next launch":""}`:"applies on start"})]}),B.jsx("select",{value:o,onChange:E=>a(E.target.value),children:D.map(E=>B.jsx("option",{value:E.value,children:E.label},E.value))})]}),B.jsxs("label",{className:"session-option-field effort-field",children:[B.jsxs("span",{children:["Effort",B.jsx("small",{children:r?`current: ${I2(A)}${M?" / next launch":""}`:"applies on start"})]}),B.jsx("select",{value:p,onChange:E=>c(E.target.value),children:T.map(E=>B.jsx("option",{value:E.value,children:E.label},E.value))})]}),B.jsxs("div",{className:"session-toolbar",children:[B.jsx("button",{type:"button",disabled:_||!x,onClick:h,children:"Start"}),B.jsx("button",{type:"button",disabled:_||!k,onClick:d,children:"Resume"}),B.jsx("button",{type:"button",disabled:_||!r,onClick:b,children:"Restart"}),B.jsx("button",{type:"button",disabled:_||!r,onClick:u,children:"Stop"})]})]})}function H2(n,r){var s,o;return r?((s=C_.find(p=>p.value===n))==null?void 0:s.label)??n:((o=b_.find(p=>p.value===n))==null?void 0:o.label)??n}function I2(n){var r;return((r=j2.find(s=>s.value===n))==null?void 0:r.label)??n}function U2({role:n,session:r,permissionMode:s,model:o,effort:p,active:_=!0,busy:f,orchestrationMode:a,translationEnabled:c,translationAutoSendEnabled:h,translationTargetLanguage:d,onPermissionModeChange:u,onModelChange:b,onEffortChange:w,onOrchestrationModeChange:k,onStart:x,onResume:S,onStop:v,onRestart:g,onTerminalEvent:y}){const A=a==="auto",M=Nu(n);return B.jsxs("section",{className:"session-console",children:[B.jsxs("div",{className:"session-console-top",children:[B.jsx(z2,{role:n,session:r,permissionMode:s,model:o,effort:p,busy:f,onPermissionModeChange:u,onModelChange:b,onEffortChange:w,onStart:x,onResume:S,onStop:v,onRestart:g}),M?null:B.jsx("div",{className:"session-console-actions",children:B.jsx("button",{"aria-label":`Auto orchestration is ${A?"on":"off"}`,"aria-pressed":A,className:`translation-toggle${A?" is-active":""}`,disabled:f,type:"button",onClick:()=>k(A?"manual":"auto"),children:A?"✅ Auto orchestration":"× Auto orchestration"})})]}),(r==null?void 0:r.status)==="running"?B.jsx(P2,{active:_,onTerminalEvent:y,role:n,session:r,taskSlug:r.taskSlug,translationEnabled:!M&&c,translationAutoSendEnabled:h,translationTargetLanguage:d}):B.jsxs("div",{className:"terminal-empty",children:[B.jsx("strong",{children:n}),B.jsx("span",{children:M?r!=null&&r.claudeSessionId?`Resume this role to reconnect the ${n==="codex-translator"?"Codex Translator":"Codex Reviewer"} terminal.`:`Start this role to open an embedded ${n==="codex-translator"?"Codex Translator":"Codex Reviewer"} terminal.`:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function P2({active:n,onTerminalEvent:r,role:s,session:o,taskSlug:p,translationEnabled:_,translationAutoSendEnabled:f,translationTargetLanguage:a}){return B.jsxs("div",{className:_?"session-console-body has-translation":"session-console-body",children:[B.jsx("div",{className:"terminal-pane",children:B.jsx(v_,{sessionId:o.id,active:n,onEvent:r},o.id)}),_?B.jsx("div",{className:"translation-pane",children:B.jsx(Bx,{active:n,autoSendEnabled:f,targetLanguage:a,taskSlug:p,role:s,sessionId:o.id},o.id)}):null]})}function F2(n,r,s){var _;if(!n||s.mode!=="auto")return null;const o=new Map(n.map(f=>[f.id,f])),p=r.filter(f=>{var a;return f.dispatchingAt?((a=o.get(f.id))==null?void 0:a.dispatchingAt)!==f.dispatchingAt:!1});return p.length===0?null:((_=p.sort(q2)[p.length-1])==null?void 0:_.toRole)??null}function q2(n,r){const s=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",o=r.dispatchingAt??r.deliveredAt??r.acceptedAt??"";return s!==o?s.localeCompare(o):n.createdAt.localeCompare(r.createdAt)}const V2=2e3;function G2({task:n,activeRole:r,codexReviewerEnabled:s,translationEnabled:o,translationAutoSendEnabled:p,translationTargetLanguage:_,refreshNonce:f=0,onTaskChanged:a,onActiveRoleChange:c,onMessagesChanged:h,onOrchestrationChanged:d,onRoundStateChanged:u,onEventsChanged:b,onLaunchStateChanged:w}){const[k,x]=ue.useState(null),[S,v]=ue.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"default","codex-translator":"default"}),[g,y]=ue.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"gpt-5.5","codex-translator":"gpt-5.5"}),[A,M]=ue.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"xhigh","codex-translator":"xhigh"}),[D,T]=ue.useState(!1),[E,R]=ue.useState(""),[N,I]=ue.useState([]),[P,F]=ue.useState(null),Y=ue.useRef(null),K=!!(k!=null&&k.sessions.some(J=>J.role==="codex-reviewer")),G=!!(k!=null&&k.sessions.some(J=>J.role==="codex-translator")),$=s||K,Q=o||G,H=[...Wr,...$?[ag]:[],...Q?[og]:[]],O=ue.useCallback((J,ie)=>{var Ce;const pe=((Ce=Y.current)==null?void 0:Ce.taskSlug)===n.taskSlug?Y.current.messages:null,be=F2(pe,J,ie);Y.current={taskSlug:n.taskSlug,messages:J},F(ie),h==null||h(J),d==null||d(ie),be&&(c(be),he(`auto switched to ${be} before VCM dispatch`))},[c,h,d,n.taskSlug]),z=ue.useCallback((J,ie,pe,be)=>{x(J),O(ie,pe),u==null||u(be)},[O,u]),V=ue.useCallback(async()=>{const[J,ie,pe,be]=await Promise.all([we.getTaskStatus(n.taskSlug),we.listMessages(n.taskSlug),we.getOrchestrationState(n.taskSlug),we.getSessionRoundState(n.taskSlug)]);z(J,ie,pe,be)},[z,n.taskSlug]);ue.useEffect(()=>{V().catch(J=>R(J.message))},[V,f]),ue.useEffect(()=>{I([]),b==null||b([])},[b,n.taskSlug]),ue.useEffect(()=>{k&&!$&&r==="codex-reviewer"&&c("project-manager"),k&&!Q&&r==="codex-translator"&&c("project-manager")},[r,$,Q,c,k]),ue.useEffect(()=>{v(J=>{let ie=!1;const pe={...J};for(const be of(k==null?void 0:k.sessions)??[])pe[be.role]!==be.permissionMode&&(pe[be.role]=be.permissionMode,ie=!0);return ie?pe:J})},[k==null?void 0:k.sessions]),ue.useEffect(()=>{y(J=>{let ie=!1;const pe={...J};for(const be of(k==null?void 0:k.sessions)??[]){const Ce=be.model??"default";pe[be.role]!==Ce&&(pe[be.role]=Ce,ie=!0)}return ie?pe:J})},[k==null?void 0:k.sessions]),ue.useEffect(()=>{M(J=>{let ie=!1;const pe={...J};for(const be of(k==null?void 0:k.sessions)??[]){const Ce=be.effort??"default";pe[be.role]!==Ce&&(pe[be.role]=Ce,ie=!0)}return ie?pe:J})},[k==null?void 0:k.sessions]),ue.useEffect(()=>{const J=(k==null?void 0:k.sessions)??[],ie=J.filter(Ce=>!Nu(Ce.role)),pe=new Set(ie.map(Ce=>Ce.role)),be={};for(const Ce of Wr)be[Ce.name]={permissionMode:S[Ce.name],model:g[Ce.name],effort:A[Ce.name]};w==null||w({taskSlug:n.taskSlug,roles:be,autoOrchestration:((P==null?void 0:P.mode)??"auto")==="auto",statusLoaded:!!k,sessionCount:J.length,hasAnySession:J.length>0,allRolesHaveSession:Wr.every(Ce=>pe.has(Ce.name))})},[g,A,w,P==null?void 0:P.mode,S,k,n.taskSlug]),ue.useEffect(()=>{const J=window.setInterval(()=>{Promise.all([we.getTaskStatus(n.taskSlug),we.listMessages(n.taskSlug),we.getOrchestrationState(n.taskSlug),we.getSessionRoundState(n.taskSlug)]).then(([ie,pe,be,Ce])=>{z(ie,pe,be,Ce)}).catch(ie=>R(ie.message))},3e3);return()=>window.clearInterval(J)},[z,n.taskSlug]),ue.useEffect(()=>{let J=!1,ie=!1;const pe=window.setInterval(()=>{ie||(ie=!0,Promise.all([we.listMessages(n.taskSlug),we.getOrchestrationState(n.taskSlug)]).then(([be,Ce])=>{J||O(be,Ce)}).catch(be=>{J||R(be.message)}).finally(()=>{ie=!1}))},V2);return()=>{J=!0,window.clearInterval(pe)}},[O,n.taskSlug]);async function j(J){T(!0),R("");try{await J(),await V(),await a()}catch(ie){R(ie instanceof Error?ie.message:"Action failed.")}finally{T(!1)}}async function ee(){const J=n.worktreePath?[`Close task "${n.taskSlug}"?`,"","This is destructive:","- stops VCM-managed running role sessions for this task",`- deletes the task worktree: ${n.worktreePath}`,`- deletes the Git branch: ${n.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
91
|
+
`):[`Close task "${n.taskSlug}"?`,"","This task was created without a separate worktree/branch.","VCM will stop VCM-managed running role sessions for this task.","VCM will delete task/session/message/orchestration state only.","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
92
|
+
`);if(window.confirm(J)){T(!0),R("");try{await we.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),he(`closed ${n.taskSlug}`),await a()}catch(pe){R(pe instanceof Error?pe.message:"Close task failed.")}finally{T(!1)}}}function he(J){I(ie=>{const pe=[...ie,`${new Date().toLocaleTimeString()} ${J}`];return b==null||b(pe),pe})}function ge(J,ie){v(pe=>({...pe,[J]:ie}))}function W(J,ie){y(pe=>({...pe,[J]:ie}))}function q(J,ie){M(pe=>({...pe,[J]:ie}))}async function ce(J){T(!0),R("");try{const ie=await we.updateOrchestrationState(n.taskSlug,{mode:J});F(ie),d==null||d(ie),he(`auto orchestration ${J==="auto"?"enabled":"disabled"}`)}catch(ie){R(ie instanceof Error?ie.message:"Failed to update orchestration mode.")}finally{T(!1)}}return B.jsxs("div",{className:"task-workspace",children:[B.jsxs("header",{className:"workspace-header",children:[B.jsx("div",{className:"workspace-title-line",children:B.jsx("h1",{children:n.title||n.taskSlug})}),B.jsx(N2,{activeRole:r,roles:H,sessions:(k==null?void 0:k.sessions)??[],onSelect:c}),B.jsx("div",{className:"workspace-header-actions",children:B.jsx("button",{className:"danger-button",type:"button",disabled:D,onClick:()=>void ee(),children:"Close Task"})})]}),E?B.jsx("div",{className:"error-banner",children:E}):null,B.jsx("div",{className:"workspace-grid",children:B.jsx("div",{className:"workspace-main",children:B.jsx("div",{className:"role-console-stack",children:H.map(J=>{const ie=J.name,pe=ie===r,be=S_((k==null?void 0:k.sessions)??[],ie);return B.jsx("div",{className:pe?"role-console-panel is-active":"role-console-panel","aria-hidden":!pe,children:B.jsx(U2,{role:ie,session:be,permissionMode:S[ie],model:g[ie],effort:A[ie],active:pe,busy:D,orchestrationMode:(P==null?void 0:P.mode)??"auto",translationEnabled:o,translationAutoSendEnabled:p,translationTargetLanguage:_,onPermissionModeChange:Ce=>ge(ie,Ce),onModelChange:Ce=>W(ie,Ce),onEffortChange:Ce=>q(ie,Ce),onOrchestrationModeChange:Ce=>void ce(Ce),onStart:()=>void j(async()=>{await we.startRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:S[ie],model:g[ie],effort:A[ie]}),he(`started ${ie} with ${S[ie]} / ${g[ie]} / ${A[ie]}`)}),onResume:()=>void j(async()=>{await we.resumeRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:S[ie],model:g[ie],effort:A[ie]}),he(`resumed ${ie} with ${S[ie]} / ${g[ie]} / ${A[ie]}`)}),onStop:()=>void j(async()=>{await we.stopRoleSession(n.taskSlug,ie),he(`stopped ${ie}`)}),onRestart:()=>void j(async()=>{await we.restartRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:S[ie],model:g[ie],effort:A[ie]}),he(`restarted ${ie} with ${S[ie]} / ${g[ie]} / ${A[ie]}`)}),onTerminalEvent:Ce=>he(`${J.label}: ${Ce}`)})},ie)})})})})]})}const $2=120*1e3,ng=1400,Y2=3;function W2(){const[n,r]=ue.useState(null),[s,o]=ue.useState([]),[p,_]=ue.useState(null),[f,a]=ue.useState(null),[c,h]=ue.useState(null),[d,u]=ue.useState(null),[b,w]=ue.useState(null),[k,x]=ue.useState(null),[S,v]=ue.useState(!1),[g,y]=ue.useState([]),[A,M]=ue.useState(null),[D,T]=ue.useState(null),[E,R]=ue.useState(null),[N,I]=ue.useState(null),[P,F]=ue.useState(null),[Y,K]=ue.useState(null),[G,$]=ue.useState("project-manager"),[Q,H]=ue.useState("system"),[O,z]=ue.useState(!0),[V,j]=ue.useState("off"),[ee,he]=ue.useState(!1),[ge,W]=ue.useState(!1),[q,ce]=ue.useState(a1),[J,ie]=ue.useState(!1),[pe,be]=ue.useState(()=>o1()),[Ce,Ye]=ue.useState(null),[ot,Me]=ue.useState(0),[Dt,kt]=ue.useState(null),[Ut,qt]=ue.useState(!1),[Zt,mt]=ue.useState(!1),[Ge,ut]=ue.useState(""),fe=ue.useRef({}),ve=ue.useRef(null),xe=ue.useRef(""),ae=ue.useMemo(()=>Xx(g,A),[g,A]),De=(Ce==null?void 0:Ce.taskSlug)===(ae==null?void 0:ae.taskSlug)?Ce:null,Te=!!(De!=null&&De.statusLoaded&&De.allRolesHaveSession),He=!!(ae&&(De!=null&&De.statusLoaded)&&!De.hasAnySession),Qe=ue.useCallback(ne=>{H(ne.themeMode),z(ne.flowPauseAlerts),j(ne.permissionRequestMode),he(ne.translationEnabled),W(ne.translationAutoSendEnabled),ce(ne.translationTargetLanguage),be(ne.launchTemplate)},[]),Ze=ue.useCallback(()=>{ve.current!==null&&(window.clearInterval(ve.current),ve.current=null)},[]),Rt=ue.useCallback((ne={})=>{Ze(),ne.resetAudio&&eE(),Aa(),ve.current=window.setInterval(()=>{Aa()},ng)},[Ze]),Je=ue.useCallback(()=>{Ze(),kt(null);let ne=1;Aa(),ve.current=window.setInterval(()=>{ne+=1,Aa(),ne>=Y2&&ve.current!==null&&(window.clearInterval(ve.current),ve.current=null)},ng)},[Ze]),un=ue.useCallback((ne,Se=`manual-${Date.now()}`,ht={})=>{kt({id:Se,text:ne}),Rt(ht)},[Rt]),Jt=ue.useCallback(()=>{Ze(),kt(null)},[Ze]),Ji=ue.useCallback(()=>{Ze(),kt(null),z(!1)},[Ze]),er=ue.useCallback(ne=>{ae!=null&&ae.taskSlug&&T({taskSlug:ae.taskSlug,messages:ne})},[ae==null?void 0:ae.taskSlug]),tr=ue.useCallback(ne=>{ae!=null&&ae.taskSlug&&R({taskSlug:ae.taskSlug,orchestration:ne})},[ae==null?void 0:ae.taskSlug]),nr=ue.useCallback(ne=>{ae!=null&&ae.taskSlug&&I({taskSlug:ae.taskSlug,events:ne})},[ae==null?void 0:ae.taskSlug]),Bn=ue.useCallback(ne=>{if(!(ae!=null&&ae.taskSlug)||ne.taskSlug!==ae.taskSlug||(F({taskSlug:ne.taskSlug,roundState:ne}),ne.status!=="stopped"||!ne.roundId))return;const Se=Z2(ne);if(fe.current[ne.taskSlug]===Se||!O)return;const Nt=ne.activeRole??"role";Q2(ne)>=$2?un(`No new turn started after ${Nt} stopped.`,Se):Je(),fe.current[ne.taskSlug]=Se},[ae==null?void 0:ae.taskSlug,O,Je,un]),ir=ue.useCallback(ne=>{Ye(Se=>(Se==null?void 0:Se.taskSlug)===ne.taskSlug&&Se.statusLoaded===ne.statusLoaded&&Se.sessionCount===ne.sessionCount&&Se.hasAnySession===ne.hasAnySession&&Se.allRolesHaveSession===ne.allRolesHaveSession&&Se.autoOrchestration===ne.autoOrchestration&&JSON.stringify(Se.roles)===JSON.stringify(ne.roles)?Se:ne)},[]);async function Cn(){const ne=await we.listTasks();return y(ne),M(Se=>{var ht;return Se&&ne.some(Nt=>Nt.taskSlug===Se)?Se:((ht=ne[0])==null?void 0:ht.taskSlug)??null}),ne}async function rr(){const ne=await we.getHarnessStatus();return _(ne),ne}async function Ri(){const ne=await we.getHarnessBootstrapStatus();return a(ne),ne}async function Mi(){const ne=await we.getGatewayStatus();return u(ne),ne}async function Li(){const ne=await we.getRecentRepositoryPaths();return o(ne),ne}async function es(ne){const[Se,ht]=await Promise.all([we.listMessages(ne),we.getOrchestrationState(ne)]);T({taskSlug:ne,messages:Se}),R({taskSlug:ne,orchestration:ht})}async function sr(ne){const Se=await we.getCodexReviewState(ne);return K({taskSlug:ne,state:Se}),Se}ue.useEffect(()=>{Promise.all([we.getCurrentProject(),we.getRecentRepositoryPaths(),we.getAppPreferences(),we.getGatewayStatus()]).then(async([ne,Se,ht,Nt])=>{r(ne),o(Se),u(Nt),Qe(ht),ne&&await Promise.all([Cn(),rr(),Ri()])}).catch(ne=>ut(ne.message))},[Qe]),ue.useEffect(()=>{const ne=window.matchMedia("(prefers-color-scheme: dark)"),Se=()=>qt(ne.matches);return Se(),ne.addEventListener("change",Se),()=>ne.removeEventListener("change",Se)},[]),ue.useEffect(()=>()=>Ze(),[Ze]),ue.useEffect(()=>{const ne=Q==="system"?Ut?"dark":"light":Q;document.documentElement.dataset.theme=ne,document.documentElement.dataset.themeMode=Q},[Ut,Q]),ue.useEffect(()=>{!(d!=null&&d.enabled)||!O||(Ji(),we.updateAppPreferences({flowPauseAlerts:!1}).then(ne=>Qe(ne)).catch(ne=>ut(ne.message)))},[Qe,Ji,O,d==null?void 0:d.enabled]),ue.useEffect(()=>{if(!(d!=null&&d.enabled)||!n||!ae)return;const ne=`${n.repoRoot}:${ae.taskSlug}`;if(d.currentProjectId===n.repoRoot&&d.currentTaskSlug===ae.taskSlug){xe.current=ne;return}xe.current!==ne&&(xe.current=ne,we.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:ae.taskSlug}).then(Se=>u(Se)).catch(Se=>{xe.current===ne&&(xe.current=""),ut(Se.message)}))},[ae==null?void 0:ae.taskSlug,d==null?void 0:d.currentProjectId,d==null?void 0:d.currentTaskSlug,d==null?void 0:d.enabled,n==null?void 0:n.repoRoot]),ue.useEffect(()=>{if(!(ae!=null&&ae.taskSlug)){K(null);return}sr(ae.taskSlug).catch(ne=>ut(ne.message))},[ae==null?void 0:ae.taskSlug]),ue.useEffect(()=>{if(!(ae!=null&&ae.taskSlug))return;const ne=ae.taskSlug,Se=window.setInterval(()=>{sr(ne).catch(ht=>ut(ht.message))},3e3);return()=>window.clearInterval(Se)},[ae==null?void 0:ae.taskSlug]);async function nt(ne){mt(!0),ut("");try{await ne()}catch(Se){ut(Se instanceof Error?Se.message:"Action failed.")}finally{mt(!1)}}const ol=D&&D.taskSlug===(ae==null?void 0:ae.taskSlug)?D.messages:[],ts=E&&E.taskSlug===(ae==null?void 0:ae.taskSlug)?E.orchestration:null,ns=N&&N.taskSlug===(ae==null?void 0:ae.taskSlug)?N.events:[],cl=P&&P.taskSlug===(ae==null?void 0:ae.taskSlug)?P.roundState:null,lr=Y&&Y.taskSlug===(ae==null?void 0:ae.taskSlug)?Y.state:null,wn=!!(lr&&Object.values(lr.gates).some(ne=>ne.required));return B.jsxs(c1,{sidebar:B.jsx(C2,{project:n,recentRepositoryPaths:s,tasks:g,activeTaskSlug:(ae==null?void 0:ae.taskSlug)??null,messages:ol,orchestration:ts,events:ns,roundState:cl,codexReview:lr,translationEnabled:ee,translationAutoSendEnabled:ge,translationTargetLanguage:q,harnessStatus:p,harnessBootstrapStatus:f,harnessApplyResult:c,gatewayStatus:d,gatewayQrLogin:b,gatewayQrCheck:k,busy:Zt,onConnect:ne=>nt(async()=>{const Se=await we.connectProject({repoPath:ne});r(Se),h(null),await Promise.all([Cn(),rr(),Ri(),Li()])}),onRefreshConnectedRepository:()=>nt(async()=>{const ne=await we.getCurrentProject();r(ne)}),onPullConnectedRepository:()=>nt(async()=>{const ne=await we.pullCurrentProject();r(ne)}),onRefreshHarness:()=>nt(async()=>{h(null),await Promise.all([rr(),Ri()])}),onApplyHarness:()=>nt(async()=>{const ne=await we.applyHarness();h(ne),await Promise.all([rr(),Ri()])}),onStartHarnessBootstrap:()=>nt(async()=>{const ne=await we.startHarnessBootstrap();a(ne.status)}),onRefreshGateway:()=>nt(async()=>{await Mi()}),onGatewayEnabledChange:ne=>{nt(async()=>{const[Se,ht]=await Promise.all([we.updateGatewaySettings({enabled:ne,...ne&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(ae==null?void 0:ae.taskSlug)??null}:{}}),ne?we.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);ht&&Qe(ht),ne&&Ji(),u(Se)})},onGatewayTranslationChange:ne=>{nt(async()=>{const Se=await we.updateGatewaySettings({translationEnabled:ne});u(Se)})},onStartGatewayQrLogin:()=>{nt(async()=>{const ne=await we.startGatewayQrLogin();w(ne),x(null),v(!0),await Mi()})},onResetGatewayBinding:()=>{nt(async()=>{const ne=await we.resetGatewayBinding();u(ne),w(null),x(null),v(!1)})},onCodexGateEnabledChange:(ne,Se)=>{nt(async()=>{if(!ae)throw new Error("Create or select a task before changing Codex Review Gates.");const ht=await we.updateCodexReviewSettings(ae.taskSlug,{gates:{[ne]:Se}});K({taskSlug:ae.taskSlug,state:ht})})},onTranslationEnabledChange:ne=>{he(ne),nt(async()=>{const Se=await we.updateAppPreferences({translationEnabled:ne});Qe(Se)})},onTranslationAutoSendChange:ne=>{W(ne),nt(async()=>{const Se=await we.updateAppPreferences({translationAutoSendEnabled:ne});Qe(Se)})},onTranslationTargetLanguageChange:ne=>{ce(ne),nt(async()=>{const Se=await we.updateAppPreferences({translationTargetLanguage:ne});Qe(Se)})},onOpenFileTranslation:()=>ie(!0),onCreateTranslationBootstrap:()=>{nt(async()=>{if(!ae)throw new Error("Create or select a task before running Translation Bootstrap.");await we.createCodexBootstrap({taskSlug:ae.taskSlug,targetLanguage:q})})},onCreateTask:ne=>nt(async()=>{const Se=await we.createTask(ne);await Cn(),M(Se.taskSlug),await sr(Se.taskSlug)}),onSelectTask:M,themeMode:Q,onThemeModeChange:ne=>{H(ne),nt(async()=>{const Se=await we.updateAppPreferences({themeMode:ne});Qe(Se)})},flowPauseAlerts:O,onFlowPauseAlertsChange:ne=>{if(d!=null&&d.enabled){Ji();return}z(ne),ne&&J2(),nt(async()=>{const Se=await we.updateAppPreferences({flowPauseAlerts:ne});Qe(Se)})},permissionRequestMode:V,onPermissionRequestModeChange:ne=>{j(ne),nt(async()=>{const Se=await we.updateAppPreferences({permissionRequestMode:ne});Qe(Se)})},launchTemplate:pe,canSaveLaunchTemplate:Te,canOneClickStart:He,onSaveLaunchTemplate:()=>{nt(async()=>{if(!(De!=null&&De.allRolesHaveSession))throw new Error("Start all four role sessions before saving a launch template.");const ne=await we.updateAppPreferences({launchTemplate:{version:1,roles:De.roles,autoOrchestration:De.autoOrchestration}});Qe(ne)})},onOneClickStart:()=>{nt(async()=>{if(!ae)throw new Error("Create or select a task before one-click start.");if((await we.getTaskStatus(ae.taskSlug)).sessions.length>0)throw new Error("One-click start is only available before any role session has started.");const Se=await we.updateOrchestrationState(ae.taskSlug,{mode:pe.autoOrchestration?"auto":"manual"});R({taskSlug:ae.taskSlug,orchestration:Se});const ht=Zx(pe,{codexReviewerEnabled:wn});for(const Nt of ht)await we.startRoleSession(ae.taskSlug,Nt.role,{cols:100,rows:28,permissionMode:Nt.permissionMode,model:Nt.model,effort:Nt.effort});$("project-manager"),await es(ae.taskSlug),await Cn(),Me(Nt=>Nt+1)})},onTryFlowPauseAlert:()=>{un("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:ne=>{nt(async()=>{const Se=await we.markAllMessagesDone(ne);T({taskSlug:ne,messages:Se.messages}),await es(ne)})},onDeleteMessageHistory:ne=>{nt(async()=>{const Se=await we.deleteMessageHistory(ne);T({taskSlug:ne,messages:Se.messages}),await es(ne)})}}),children:[Ge?B.jsx("div",{className:"error-banner",children:Ge}):null,Dt?B.jsx("div",{className:"flow-pause-alert-backdrop",children:B.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[B.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),B.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),B.jsx("p",{id:"flow-pause-alert-body",children:Dt.text}),B.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),B.jsx("button",{type:"button",autoFocus:!0,onClick:Jt,children:"Confirm"})]})}):null,S&&b?B.jsx(K2,{busy:Zt,qrCheck:k,qrLogin:b,onCheck:()=>{nt(async()=>{const ne=await we.checkGatewayQrLogin();x(ne),(ne.status==="confirmed"||ne.status==="binded_redirect")&&v(!1),await Mi()})},onClose:()=>v(!1)}):null,n&&ae?B.jsx(G2,{task:ae,activeRole:G,codexReviewerEnabled:wn,translationEnabled:ee,translationAutoSendEnabled:ge,translationTargetLanguage:q,refreshNonce:ot,onTaskChanged:async()=>{await Cn()},onActiveRoleChange:$,onMessagesChanged:er,onOrchestrationChanged:tr,onRoundStateChanged:Bn,onEventsChanged:nr,onLaunchStateChanged:ir}):B.jsxs("section",{className:"empty-workspace",children:[B.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),B.jsx("p",{children:n?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]}),B.jsx(jx,{open:J,taskSlug:(ae==null?void 0:ae.taskSlug)??null,targetLanguage:q,onClose:()=>ie(!1)})]})}function K2({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:p}){const[_,f]=ue.useState(""),[a,c]=ue.useState("");return ue.useEffect(()=>{let h=!1;if(c(""),f(""),p.qrcodeUrl.startsWith("data:image/")){f(p.qrcodeUrl);return}try{const d=Qr(0,"M");d.addData(p.qrcodeUrl),d.make(),h||f(d.createDataURL(8,2))}catch(d){h||c(d instanceof Error?d.message:"Failed to render QR code.")}return()=>{h=!0}},[p.qrcodeUrl]),B.jsx("div",{className:"modal-backdrop",children:B.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),B.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),B.jsx("button",{type:"button",onClick:s,children:"Close"})]}),B.jsxs("div",{className:"gateway-qr-modal-body",children:[B.jsx("div",{className:"gateway-qr-code-frame",children:_?B.jsx("img",{alt:"Weixin Gateway QR login",src:_}):B.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),B.jsxs("dl",{className:"gateway-qr-meta",children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Status"}),B.jsx("dd",{children:(o==null?void 0:o.status)??p.status})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Expires"}),B.jsx("dd",{children:X2(p.expiresAt)})]}),o!=null&&o.message?B.jsxs("div",{children:[B.jsx("dt",{children:"Message"}),B.jsx("dd",{children:o.message})]}):null]})]}),B.jsx("footer",{children:B.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function X2(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let Ti=null;function Q2(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function Z2(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function J2(){const n=E_();return n?k_(n):!1}async function Aa(){const n=E_();if(!n||!await k_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),rg(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),rg(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function E_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Ti||Ti.state==="closed")&&(Ti=new n),Ti}catch{return null}}function eE(){Lu(Ti)}function Lu(n){Ti=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function k_(n){if(ig(n))return!0;try{await n.resume();const r=ig(n);return!r&&n===Ti&&Lu(n),r}catch{return n===Ti&&Lu(n),!1}}function ig(n){return n.state==="running"}function rg(n,r,s){const o=n.createGain(),p=n.createOscillator(),_=n.createOscillator(),f=s.startAt+s.duration;o.gain.setValueAtTime(1e-4,s.startAt),o.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,f),p.type="sine",p.frequency.setValueAtTime(s.frequency,s.startAt),_.type="triangle",_.frequency.setValueAtTime(s.frequency*2.01,s.startAt),p.connect(o),_.connect(o),o.connect(r),p.start(s.startAt),_.start(s.startAt),p.stop(f+.02),_.stop(f+.02)}const A_=document.getElementById("root");if(!A_)throw new Error("Missing #root element.");X0.createRoot(A_).render(B.jsx(ue.StrictMode,{children:B.jsx(W2,{})}));
|