vibe-coding-master 0.0.16 → 0.0.17

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.
@@ -1,4 +1,4 @@
1
- var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var Tp=(n,s,l)=>s0(n,typeof s!="symbol"?s+"":s,l);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))o(v);new MutationObserver(v=>{for(const b of v)if(b.type==="childList")for(const p of b.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function l(v){const b={};return v.integrity&&(b.integrity=v.integrity),v.referrerPolicy&&(b.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?b.credentials="include":v.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function o(v){if(v.ep)return;v.ep=!0;const b=l(v);fetch(v.href,b)}})();function B_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tu={exports:{}},ws={};/**
1
+ var i0=Object.defineProperty;var r0=(n,s,l)=>s in n?i0(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var Dp=(n,s,l)=>r0(n,typeof s!="symbol"?s+"":s,l);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))o(v);new MutationObserver(v=>{for(const b of v)if(b.type==="childList")for(const p of b.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function l(v){const b={};return v.integrity&&(b.integrity=v.integrity),v.referrerPolicy&&(b.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?b.credentials="include":v.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function o(v){if(v.ep)return;v.ep=!0;const b=l(v);fetch(v.href,b)}})();function B_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tu={exports:{}},ws={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,config
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Dp;function l0(){if(Dp)return ws;Dp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,v,b){var p=null;if(b!==void 0&&(p=""+b),v.key!==void 0&&(p=""+v.key),"key"in v){b={};for(var a in v)a!=="key"&&(b[a]=v[a])}else b=v;return v=b.ref,{$$typeof:n,type:o,key:p,ref:v!==void 0?v:null,props:b}}return ws.Fragment=s,ws.jsx=l,ws.jsxs=l,ws}var Rp;function a0(){return Rp||(Rp=1,Tu.exports=l0()),Tu.exports}var q=a0(),Du={exports:{}},Ae={};/**
9
+ */var Rp;function s0(){if(Rp)return ws;Rp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,v,b){var p=null;if(b!==void 0&&(p=""+b),v.key!==void 0&&(p=""+v.key),"key"in v){b={};for(var a in v)a!=="key"&&(b[a]=v[a])}else b=v;return v=b.ref,{$$typeof:n,type:o,key:p,ref:v!==void 0?v:null,props:b}}return ws.Fragment=s,ws.jsx=l,ws.jsxs=l,ws}var Lp;function l0(){return Lp||(Lp=1,Tu.exports=s0()),Tu.exports}var V=l0(),Du={exports:{}},Ae={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,config
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Lp;function o0(){if(Lp)return Ae;Lp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),p=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),C=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=C&&O[C]||O["@@iterator"],typeof O=="function"?O:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function m(O,P,H){this.props=O,this.context=P,this.refs=S,this.updater=H||k}m.prototype.isReactComponent={},m.prototype.setState=function(O,P){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,P,"setState")},m.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function d(){}d.prototype=m.prototype;function g(O,P,H){this.props=O,this.context=P,this.refs=S,this.updater=H||k}var E=g.prototype=new d;E.constructor=g,x(E,m.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function A(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function B(O,P,H){var ne=H.ref;return{$$typeof:n,type:O,key:P,ref:ne!==void 0?ne:null,props:H}}function N(O,P){return B(O.type,P,O.props)}function V(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function F(O){var P={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(H){return P[H]})}var U=/\/+/g;function Y(O,P){return typeof O=="object"&&O!==null&&O.key!=null?F(""+O.key):P.toString(36)}function $(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(A,A):(O.status="pending",O.then(function(P){O.status==="pending"&&(O.status="fulfilled",O.value=P)},function(P){O.status==="pending"&&(O.status="rejected",O.reason=P)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function G(O,P,H,ne,de){var pe=typeof O;(pe==="undefined"||pe==="boolean")&&(O=null);var K=!1;if(O===null)K=!0;else switch(pe){case"bigint":case"string":case"number":K=!0;break;case"object":switch(O.$$typeof){case n:case s:K=!0;break;case _:return K=O._init,G(K(O._payload),P,H,ne,de)}}if(K)return de=de(O),K=ne===""?"."+Y(O,0):ne,R(de)?(H="",K!=null&&(H=K.replace(U,"$&/")+"/"),G(de,P,H,"",function(Z){return Z})):de!=null&&(V(de)&&(de=N(de,H+(de.key==null||O&&O.key===de.key?"":(""+de.key).replace(U,"$&/")+"/")+K)),P.push(de)),1;K=0;var I=ne===""?".":ne+":";if(R(O))for(var ae=0;ae<O.length;ae++)ne=O[ae],pe=I+Y(ne,ae),K+=G(ne,P,H,pe,de);else if(ae=w(O),typeof ae=="function")for(O=ae.call(O),ae=0;!(ne=O.next()).done;)ne=ne.value,pe=I+Y(ne,ae++),K+=G(ne,P,H,pe,de);else if(pe==="object"){if(typeof O.then=="function")return G($(O),P,H,ne,de);throw P=String(O),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return K}function X(O,P,H){if(O==null)return O;var ne=[],de=0;return G(O,ne,"","",function(pe){return P.call(H,pe,de++)}),ne}function se(O){if(O._status===-1){var P=O._result;P=P(),P.then(function(H){(O._status===0||O._status===-1)&&(O._status=1,O._result=H)},function(H){(O._status===0||O._status===-1)&&(O._status=2,O._result=H)}),O._status===-1&&(O._status=0,O._result=P)}if(O._status===1)return O._result.default;throw O._result}var z=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},M={map:X,forEach:function(O,P,H){X(O,function(){P.apply(this,arguments)},H)},count:function(O){var P=0;return X(O,function(){P++}),P},toArray:function(O){return X(O,function(P){return P})||[]},only:function(O){if(!V(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ae.Activity=c,Ae.Children=M,Ae.Component=m,Ae.Fragment=l,Ae.Profiler=v,Ae.PureComponent=g,Ae.StrictMode=o,Ae.Suspense=u,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(O){return L.H.useMemoCache(O)}},Ae.cache=function(O){return function(){return O.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(O,P,H){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ne=x({},O.props),de=O.key;if(P!=null)for(pe in P.key!==void 0&&(de=""+P.key),P)!T.call(P,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&P.ref===void 0||(ne[pe]=P[pe]);var pe=arguments.length-2;if(pe===1)ne.children=H;else if(1<pe){for(var K=Array(pe),I=0;I<pe;I++)K[I]=arguments[I+2];ne.children=K}return B(O.type,de,ne)},Ae.createContext=function(O){return O={$$typeof:p,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:b,_context:O},O},Ae.createElement=function(O,P,H){var ne,de={},pe=null;if(P!=null)for(ne in P.key!==void 0&&(pe=""+P.key),P)T.call(P,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(de[ne]=P[ne]);var K=arguments.length-2;if(K===1)de.children=H;else if(1<K){for(var I=Array(K),ae=0;ae<K;ae++)I[ae]=arguments[ae+2];de.children=I}if(O&&O.defaultProps)for(ne in K=O.defaultProps,K)de[ne]===void 0&&(de[ne]=K[ne]);return B(O,pe,de)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(O){return{$$typeof:a,render:O}},Ae.isValidElement=V,Ae.lazy=function(O){return{$$typeof:_,_payload:{_status:-1,_result:O},_init:se}},Ae.memo=function(O,P){return{$$typeof:h,type:O,compare:P===void 0?null:P}},Ae.startTransition=function(O){var P=L.T,H={};L.T=H;try{var ne=O(),de=L.S;de!==null&&de(H,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(A,z)}catch(pe){z(pe)}finally{P!==null&&H.types!==null&&(P.types=H.types),L.T=P}},Ae.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ae.use=function(O){return L.H.use(O)},Ae.useActionState=function(O,P,H){return L.H.useActionState(O,P,H)},Ae.useCallback=function(O,P){return L.H.useCallback(O,P)},Ae.useContext=function(O){return L.H.useContext(O)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(O,P){return L.H.useDeferredValue(O,P)},Ae.useEffect=function(O,P){return L.H.useEffect(O,P)},Ae.useEffectEvent=function(O){return L.H.useEffectEvent(O)},Ae.useId=function(){return L.H.useId()},Ae.useImperativeHandle=function(O,P,H){return L.H.useImperativeHandle(O,P,H)},Ae.useInsertionEffect=function(O,P){return L.H.useInsertionEffect(O,P)},Ae.useLayoutEffect=function(O,P){return L.H.useLayoutEffect(O,P)},Ae.useMemo=function(O,P){return L.H.useMemo(O,P)},Ae.useOptimistic=function(O,P){return L.H.useOptimistic(O,P)},Ae.useReducer=function(O,P,H){return L.H.useReducer(O,P,H)},Ae.useRef=function(O){return L.H.useRef(O)},Ae.useState=function(O){return L.H.useState(O)},Ae.useSyncExternalStore=function(O,P,H){return L.H.useSyncExternalStore(O,P,H)},Ae.useTransition=function(){return L.H.useTransition()},Ae.version="19.2.6",Ae}var Mp;function hc(){return Mp||(Mp=1,Du.exports=o0()),Du.exports}var me=hc(),Ru={exports:{}},xs={},Lu={exports:{}},Mu={};/**
17
+ */var Mp;function a0(){if(Mp)return Ae;Mp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),p=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),C=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=C&&O[C]||O["@@iterator"],typeof O=="function"?O:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function _(O,I,H){this.props=O,this.context=I,this.refs=S,this.updater=H||k}_.prototype.isReactComponent={},_.prototype.setState=function(O,I){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,I,"setState")},_.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function d(){}d.prototype=_.prototype;function g(O,I,H){this.props=O,this.context=I,this.refs=S,this.updater=H||k}var E=g.prototype=new d;E.constructor=g,x(E,_.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function A(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function B(O,I,H){var ie=H.ref;return{$$typeof:n,type:O,key:I,ref:ie!==void 0?ie:null,props:H}}function N(O,I){return B(O.type,I,O.props)}function F(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function G(O){var I={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(H){return I[H]})}var q=/\/+/g;function $(O,I){return typeof O=="object"&&O!==null&&O.key!=null?G(""+O.key):I.toString(36)}function W(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(A,A):(O.status="pending",O.then(function(I){O.status==="pending"&&(O.status="fulfilled",O.value=I)},function(I){O.status==="pending"&&(O.status="rejected",O.reason=I)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function P(O,I,H,ie,pe){var de=typeof O;(de==="undefined"||de==="boolean")&&(O=null);var X=!1;if(O===null)X=!0;else switch(de){case"bigint":case"string":case"number":X=!0;break;case"object":switch(O.$$typeof){case n:case s:X=!0;break;case m:return X=O._init,P(X(O._payload),I,H,ie,pe)}}if(X)return pe=pe(O),X=ie===""?"."+$(O,0):ie,R(pe)?(H="",X!=null&&(H=X.replace(q,"$&/")+"/"),P(pe,I,H,"",function(Z){return Z})):pe!=null&&(F(pe)&&(pe=N(pe,H+(pe.key==null||O&&O.key===pe.key?"":(""+pe.key).replace(q,"$&/")+"/")+X)),I.push(pe)),1;X=0;var U=ie===""?".":ie+":";if(R(O))for(var ae=0;ae<O.length;ae++)ie=O[ae],de=U+$(ie,ae),X+=P(ie,I,H,de,pe);else if(ae=w(O),typeof ae=="function")for(O=ae.call(O),ae=0;!(ie=O.next()).done;)ie=ie.value,de=U+$(ie,ae++),X+=P(ie,I,H,de,pe);else if(de==="object"){if(typeof O.then=="function")return P(W(O),I,H,ie,pe);throw I=String(O),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return X}function Y(O,I,H){if(O==null)return O;var ie=[],pe=0;return P(O,ie,"","",function(de){return I.call(H,de,pe++)}),ie}function ee(O){if(O._status===-1){var I=O._result;I=I(),I.then(function(H){(O._status===0||O._status===-1)&&(O._status=1,O._result=H)},function(H){(O._status===0||O._status===-1)&&(O._status=2,O._result=H)}),O._status===-1&&(O._status=0,O._result=I)}if(O._status===1)return O._result.default;throw O._result}var z=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},M={map:Y,forEach:function(O,I,H){Y(O,function(){I.apply(this,arguments)},H)},count:function(O){var I=0;return Y(O,function(){I++}),I},toArray:function(O){return Y(O,function(I){return I})||[]},only:function(O){if(!F(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ae.Activity=c,Ae.Children=M,Ae.Component=_,Ae.Fragment=l,Ae.Profiler=v,Ae.PureComponent=g,Ae.StrictMode=o,Ae.Suspense=u,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(O){return L.H.useMemoCache(O)}},Ae.cache=function(O){return function(){return O.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(O,I,H){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ie=x({},O.props),pe=O.key;if(I!=null)for(de in I.key!==void 0&&(pe=""+I.key),I)!T.call(I,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&I.ref===void 0||(ie[de]=I[de]);var de=arguments.length-2;if(de===1)ie.children=H;else if(1<de){for(var X=Array(de),U=0;U<de;U++)X[U]=arguments[U+2];ie.children=X}return B(O.type,pe,ie)},Ae.createContext=function(O){return O={$$typeof:p,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:b,_context:O},O},Ae.createElement=function(O,I,H){var ie,pe={},de=null;if(I!=null)for(ie in I.key!==void 0&&(de=""+I.key),I)T.call(I,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(pe[ie]=I[ie]);var X=arguments.length-2;if(X===1)pe.children=H;else if(1<X){for(var U=Array(X),ae=0;ae<X;ae++)U[ae]=arguments[ae+2];pe.children=U}if(O&&O.defaultProps)for(ie in X=O.defaultProps,X)pe[ie]===void 0&&(pe[ie]=X[ie]);return B(O,de,pe)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(O){return{$$typeof:a,render:O}},Ae.isValidElement=F,Ae.lazy=function(O){return{$$typeof:m,_payload:{_status:-1,_result:O},_init:ee}},Ae.memo=function(O,I){return{$$typeof:h,type:O,compare:I===void 0?null:I}},Ae.startTransition=function(O){var I=L.T,H={};L.T=H;try{var ie=O(),pe=L.S;pe!==null&&pe(H,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(A,z)}catch(de){z(de)}finally{I!==null&&H.types!==null&&(I.types=H.types),L.T=I}},Ae.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ae.use=function(O){return L.H.use(O)},Ae.useActionState=function(O,I,H){return L.H.useActionState(O,I,H)},Ae.useCallback=function(O,I){return L.H.useCallback(O,I)},Ae.useContext=function(O){return L.H.useContext(O)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(O,I){return L.H.useDeferredValue(O,I)},Ae.useEffect=function(O,I){return L.H.useEffect(O,I)},Ae.useEffectEvent=function(O){return L.H.useEffectEvent(O)},Ae.useId=function(){return L.H.useId()},Ae.useImperativeHandle=function(O,I,H){return L.H.useImperativeHandle(O,I,H)},Ae.useInsertionEffect=function(O,I){return L.H.useInsertionEffect(O,I)},Ae.useLayoutEffect=function(O,I){return L.H.useLayoutEffect(O,I)},Ae.useMemo=function(O,I){return L.H.useMemo(O,I)},Ae.useOptimistic=function(O,I){return L.H.useOptimistic(O,I)},Ae.useReducer=function(O,I,H){return L.H.useReducer(O,I,H)},Ae.useRef=function(O){return L.H.useRef(O)},Ae.useState=function(O){return L.H.useState(O)},Ae.useSyncExternalStore=function(O,I,H){return L.H.useSyncExternalStore(O,I,H)},Ae.useTransition=function(){return L.H.useTransition()},Ae.version="19.2.6",Ae}var Op;function hc(){return Op||(Op=1,Du.exports=a0()),Du.exports}var me=hc(),Ru={exports:{}},xs={},Lu={exports:{}},Mu={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,config
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var Op;function u0(){return Op||(Op=1,(function(n){function s(G,X){var se=G.length;G.push(X);e:for(;0<se;){var z=se-1>>>1,M=G[z];if(0<v(M,X))G[z]=X,G[se]=M,se=z;else break e}}function l(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var X=G[0],se=G.pop();if(se!==X){G[0]=se;e:for(var z=0,M=G.length,O=M>>>1;z<O;){var P=2*(z+1)-1,H=G[P],ne=P+1,de=G[ne];if(0>v(H,se))ne<M&&0>v(de,H)?(G[z]=de,G[ne]=se,z=ne):(G[z]=H,G[P]=se,z=P);else if(ne<M&&0>v(de,se))G[z]=de,G[ne]=se,z=ne;else break e}}return X}function v(G,X){var se=G.sortIndex-X.sortIndex;return se!==0?se:G.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var p=Date,a=p.now();n.unstable_now=function(){return p.now()-a}}var u=[],h=[],_=1,c=null,C=3,w=!1,k=!1,x=!1,S=!1,m=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function E(G){for(var X=l(h);X!==null;){if(X.callback===null)o(h);else if(X.startTime<=G)o(h),X.sortIndex=X.expirationTime,s(u,X);else break;X=l(h)}}function R(G){if(x=!1,E(G),!k)if(l(u)!==null)k=!0,A||(A=!0,F());else{var X=l(h);X!==null&&$(R,X.startTime-G)}}var A=!1,L=-1,T=5,B=-1;function N(){return S?!0:!(n.unstable_now()-B<T)}function V(){if(S=!1,A){var G=n.unstable_now();B=G;var X=!0;try{e:{k=!1,x&&(x=!1,d(L),L=-1),w=!0;var se=C;try{t:{for(E(G),c=l(u);c!==null&&!(c.expirationTime>G&&N());){var z=c.callback;if(typeof z=="function"){c.callback=null,C=c.priorityLevel;var M=z(c.expirationTime<=G);if(G=n.unstable_now(),typeof M=="function"){c.callback=M,E(G),X=!0;break t}c===l(u)&&o(u),E(G)}else o(u);c=l(u)}if(c!==null)X=!0;else{var O=l(h);O!==null&&$(R,O.startTime-G),X=!1}}break e}finally{c=null,C=se,w=!1}X=void 0}}finally{X?F():A=!1}}}var F;if(typeof g=="function")F=function(){g(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Y=U.port2;U.port1.onmessage=V,F=function(){Y.postMessage(null)}}else F=function(){m(V,0)};function $(G,X){L=m(function(){G(n.unstable_now())},X)}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"):T=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(G){switch(C){case 1:case 2:case 3:var X=3;break;default:X=C}var se=C;C=X;try{return G()}finally{C=se}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(G,X){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var se=C;C=G;try{return X()}finally{C=se}},n.unstable_scheduleCallback=function(G,X,se){var z=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?z+se:z):se=z,G){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=se+M,G={id:_++,callback:X,priorityLevel:G,startTime:se,expirationTime:M,sortIndex:-1},se>z?(G.sortIndex=se,s(h,G),l(u)===null&&G===l(h)&&(x?(d(L),L=-1):x=!0,$(R,se-z))):(G.sortIndex=M,s(u,G),k||w||(k=!0,A||(A=!0,F()))),G},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(G){var X=C;return function(){var se=C;C=X;try{return G.apply(this,arguments)}finally{C=se}}}})(Mu)),Mu}var Bp;function c0(){return Bp||(Bp=1,Lu.exports=u0()),Lu.exports}var Ou={exports:{}},Tt={};/**
25
+ */var Bp;function o0(){return Bp||(Bp=1,(function(n){function s(P,Y){var ee=P.length;P.push(Y);e:for(;0<ee;){var z=ee-1>>>1,M=P[z];if(0<v(M,Y))P[z]=Y,P[ee]=M,ee=z;else break e}}function l(P){return P.length===0?null:P[0]}function o(P){if(P.length===0)return null;var Y=P[0],ee=P.pop();if(ee!==Y){P[0]=ee;e:for(var z=0,M=P.length,O=M>>>1;z<O;){var I=2*(z+1)-1,H=P[I],ie=I+1,pe=P[ie];if(0>v(H,ee))ie<M&&0>v(pe,H)?(P[z]=pe,P[ie]=ee,z=ie):(P[z]=H,P[I]=ee,z=I);else if(ie<M&&0>v(pe,ee))P[z]=pe,P[ie]=ee,z=ie;else break e}}return Y}function v(P,Y){var ee=P.sortIndex-Y.sortIndex;return ee!==0?ee:P.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var p=Date,a=p.now();n.unstable_now=function(){return p.now()-a}}var u=[],h=[],m=1,c=null,C=3,w=!1,k=!1,x=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function E(P){for(var Y=l(h);Y!==null;){if(Y.callback===null)o(h);else if(Y.startTime<=P)o(h),Y.sortIndex=Y.expirationTime,s(u,Y);else break;Y=l(h)}}function R(P){if(x=!1,E(P),!k)if(l(u)!==null)k=!0,A||(A=!0,G());else{var Y=l(h);Y!==null&&W(R,Y.startTime-P)}}var A=!1,L=-1,T=5,B=-1;function N(){return S?!0:!(n.unstable_now()-B<T)}function F(){if(S=!1,A){var P=n.unstable_now();B=P;var Y=!0;try{e:{k=!1,x&&(x=!1,d(L),L=-1),w=!0;var ee=C;try{t:{for(E(P),c=l(u);c!==null&&!(c.expirationTime>P&&N());){var z=c.callback;if(typeof z=="function"){c.callback=null,C=c.priorityLevel;var M=z(c.expirationTime<=P);if(P=n.unstable_now(),typeof M=="function"){c.callback=M,E(P),Y=!0;break t}c===l(u)&&o(u),E(P)}else o(u);c=l(u)}if(c!==null)Y=!0;else{var O=l(h);O!==null&&W(R,O.startTime-P),Y=!1}}break e}finally{c=null,C=ee,w=!1}Y=void 0}}finally{Y?G():A=!1}}}var G;if(typeof g=="function")G=function(){g(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,$=q.port2;q.port1.onmessage=F,G=function(){$.postMessage(null)}}else G=function(){_(F,0)};function W(P,Y){L=_(function(){P(n.unstable_now())},Y)}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(P){P.callback=null},n.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<P?Math.floor(1e3/P):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(P){switch(C){case 1:case 2:case 3:var Y=3;break;default:Y=C}var ee=C;C=Y;try{return P()}finally{C=ee}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(P,Y){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ee=C;C=P;try{return Y()}finally{C=ee}},n.unstable_scheduleCallback=function(P,Y,ee){var z=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?z+ee:z):ee=z,P){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ee+M,P={id:m++,callback:Y,priorityLevel:P,startTime:ee,expirationTime:M,sortIndex:-1},ee>z?(P.sortIndex=ee,s(h,P),l(u)===null&&P===l(h)&&(x?(d(L),L=-1):x=!0,W(R,ee-z))):(P.sortIndex=M,s(u,P),k||w||(k=!0,A||(A=!0,G()))),P},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(P){var Y=C;return function(){var ee=C;C=Y;try{return P.apply(this,arguments)}finally{C=ee}}}})(Mu)),Mu}var zp;function u0(){return zp||(zp=1,Lu.exports=o0()),Lu.exports}var Ou={exports:{}},Tt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,config
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var zp;function h0(){if(zp)return Tt;zp=1;var n=hc();function s(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)h+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},v=Symbol.for("react.portal");function b(u,h,_){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:v,key:c==null?null:""+c,children:u,containerInfo:h,implementation:_}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Tt.createPortal=function(u,h){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(s(299));return b(u,h,null,_)},Tt.flushSync=function(u){var h=p.T,_=o.p;try{if(p.T=null,o.p=2,u)return u()}finally{p.T=h,o.p=_,o.d.f()}},Tt.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Tt.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Tt.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var _=h.as,c=a(_,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;_==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:C,fetchPriority:w}):_==="script"&&o.d.X(u,{crossOrigin:c,integrity:C,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tt.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var _=a(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:_,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(u)},Tt.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var _=h.as,c=a(_,h.crossOrigin);o.d.L(u,_,{crossOrigin:c,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})}},Tt.preloadModule=function(u,h){if(typeof u=="string")if(h){var _=a(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:_,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(u)},Tt.requestFormReset=function(u){o.d.r(u)},Tt.unstable_batchedUpdates=function(u,h){return u(h)},Tt.useFormState=function(u,h,_){return p.H.useFormState(u,h,_)},Tt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Tt.version="19.2.6",Tt}var Hp;function f0(){if(Hp)return Ou.exports;Hp=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(s){console.error(s)}}return n(),Ou.exports=h0(),Ou.exports}/**
33
+ */var Hp;function c0(){if(Hp)return Tt;Hp=1;var n=hc();function s(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},v=Symbol.for("react.portal");function b(u,h,m){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:v,key:c==null?null:""+c,children:u,containerInfo:h,implementation:m}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Tt.createPortal=function(u,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(s(299));return b(u,h,null,m)},Tt.flushSync=function(u){var h=p.T,m=o.p;try{if(p.T=null,o.p=2,u)return u()}finally{p.T=h,o.p=m,o.d.f()}},Tt.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Tt.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Tt.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var m=h.as,c=a(m,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:C,fetchPriority:w}):m==="script"&&o.d.X(u,{crossOrigin:c,integrity:C,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tt.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=a(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(u)},Tt.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,c=a(m,h.crossOrigin);o.d.L(u,m,{crossOrigin:c,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})}},Tt.preloadModule=function(u,h){if(typeof u=="string")if(h){var m=a(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(u)},Tt.requestFormReset=function(u){o.d.r(u)},Tt.unstable_batchedUpdates=function(u,h){return u(h)},Tt.useFormState=function(u,h,m){return p.H.useFormState(u,h,m)},Tt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Tt.version="19.2.6",Tt}var Np;function h0(){if(Np)return Ou.exports;Np=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(s){console.error(s)}}return n(),Ou.exports=c0(),Ou.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,52 +38,53 @@ var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,config
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Np;function d0(){if(Np)return xs;Np=1;var n=c0(),s=hc(),l=f0();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 v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function b(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 p(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 u(e){if(b(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=b(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,r=t;;){var f=i.return;if(f===null)break;var y=f.alternate;if(y===null){if(r=f.return,r!==null){i=r;continue}break}if(f.child===y.child){for(y=f.child;y;){if(y===i)return u(f),e;if(y===r)return u(f),t;y=y.sibling}throw Error(o(188))}if(i.return!==r.return)i=f,r=y;else{for(var D=!1,j=f.child;j;){if(j===i){D=!0,i=f,r=y;break}if(j===r){D=!0,r=f,i=y;break}j=j.sibling}if(!D){for(j=y.child;j;){if(j===i){D=!0,i=y,r=f;break}if(j===r){D=!0,r=y,i=f;break}j=j.sibling}if(!D)throw Error(o(189))}}if(i.alternate!==r)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var c=Object.assign,C=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"),m=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var U=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case m:return"Profiler";case S:return"StrictMode";case R:return"Suspense";case A:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case g:return e.displayName||"Context";case d:return(e._context.displayName||"Context")+".Consumer";case E:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var $=Array.isArray,G=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},z=[],M=-1;function O(e){return{current:e}}function P(e){0>M||(e.current=z[M],z[M]=null,M--)}function H(e,t){M++,z[M]=e.current,e.current=t}var ne=O(null),de=O(null),pe=O(null),K=O(null);function I(e,t){switch(H(pe,t),H(de,e),H(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=Zd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(ne),H(ne,e)}function ae(){P(ne),P(de),P(pe)}function Z(e){e.memoizedState!==null&&H(K,e);var t=ne.current,i=Zd(t,e.type);t!==i&&(H(de,e),H(ne,i))}function ee(e){de.current===e&&(P(ne),P(de)),K.current===e&&(P(K),Ss._currentValue=se)}var oe,Se;function xe(e){if(oe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||"",Se=-1<i.stack.indexOf(`
41
+ */var jp;function f0(){if(jp)return xs;jp=1;var n=u0(),s=hc(),l=h0();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 v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function b(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 p(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 u(e){if(b(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=b(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,r=t;;){var f=i.return;if(f===null)break;var y=f.alternate;if(y===null){if(r=f.return,r!==null){i=r;continue}break}if(f.child===y.child){for(y=f.child;y;){if(y===i)return u(f),e;if(y===r)return u(f),t;y=y.sibling}throw Error(o(188))}if(i.return!==r.return)i=f,r=y;else{for(var D=!1,j=f.child;j;){if(j===i){D=!0,i=f,r=y;break}if(j===r){D=!0,r=f,i=y;break}j=j.sibling}if(!D){for(j=y.child;j;){if(j===i){D=!0,i=y,r=f;break}if(j===r){D=!0,r=y,i=f;break}j=j.sibling}if(!D)throw Error(o(189))}}if(i.alternate!==r)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var c=Object.assign,C=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"),_=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var q=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case R:return"Suspense";case A:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case g:return e.displayName||"Context";case d:return(e._context.displayName||"Context")+".Consumer";case E:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:$(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return $(e(t))}catch{}}return null}var W=Array.isArray,P=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},z=[],M=-1;function O(e){return{current:e}}function I(e){0>M||(e.current=z[M],z[M]=null,M--)}function H(e,t){M++,z[M]=e.current,e.current=t}var ie=O(null),pe=O(null),de=O(null),X=O(null);function U(e,t){switch(H(de,t),H(pe,e),H(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Jd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ie),H(ie,e)}function ae(){I(ie),I(pe),I(de)}function Z(e){e.memoizedState!==null&&H(X,e);var t=ie.current,i=Jd(t,e.type);t!==i&&(H(pe,e),H(ie,i))}function te(e){pe.current===e&&(I(ie),I(pe)),X.current===e&&(I(X),Ss._currentValue=ee)}var oe,Se;function xe(e){if(oe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||"",Se=-1<i.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+oe+e+Se}var Ye=!1;function at(e,t){if(!e||Ye)return"";Ye=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(le){var re=le}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(le){re=le}e.call(fe.prototype)}}else{try{throw Error()}catch(le){re=le}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(le){if(le&&re&&typeof le.stack=="string")return[le.stack,re.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=r.DetermineComponentFrameRoot(),D=y[0],j=y[1];if(D&&j){var W=D.split(`
44
- `),ie=j.split(`
45
- `);for(f=r=0;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;for(;f<ie.length&&!ie[f].includes("DetermineComponentFrameRoot");)f++;if(r===W.length||f===ie.length)for(r=W.length-1,f=ie.length-1;1<=r&&0<=f&&W[r]!==ie[f];)f--;for(;1<=r&&0<=f;r--,f--)if(W[r]!==ie[f]){if(r!==1||f!==1)do if(r--,f--,0>f||W[r]!==ie[f]){var ce=`
46
- `+W[r].replace(" at new "," at ");return e.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",e.displayName)),ce}while(1<=r&&0<=f);break}}}finally{Ye=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?xe(i):""}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return xe("Activity");default:return""}}function mn(e){try{var t="",i=null;do t+=ke(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
43
+ `+oe+e+Se}var Ye=!1;function at(e,t){if(!e||Ye)return"";Ye=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(le){var se=le}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(le){se=le}e.call(fe.prototype)}}else{try{throw Error()}catch(le){se=le}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(le){if(le&&se&&typeof le.stack=="string")return[le.stack,se.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=r.DetermineComponentFrameRoot(),D=y[0],j=y[1];if(D&&j){var K=D.split(`
44
+ `),re=j.split(`
45
+ `);for(f=r=0;r<K.length&&!K[r].includes("DetermineComponentFrameRoot");)r++;for(;f<re.length&&!re[f].includes("DetermineComponentFrameRoot");)f++;if(r===K.length||f===re.length)for(r=K.length-1,f=re.length-1;1<=r&&0<=f&&K[r]!==re[f];)f--;for(;1<=r&&0<=f;r--,f--)if(K[r]!==re[f]){if(r!==1||f!==1)do if(r--,f--,0>f||K[r]!==re[f]){var ce=`
46
+ `+K[r].replace(" at new "," at ");return e.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",e.displayName)),ce}while(1<=r&&0<=f);break}}}finally{Ye=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?xe(i):""}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return xe("Activity");default:return""}}function mn(e){try{var t="",i=null;do t+=ke(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
47
47
  Error generating stack: `+r.message+`
48
- `+r.stack}}var gn=Object.prototype.hasOwnProperty,vn=n.unstable_scheduleCallback,En=n.unstable_cancelCallback,Gn=n.unstable_shouldYield,At=n.unstable_requestPaint,ot=n.unstable_now,Ot=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,ge=n.unstable_UserBlockingPriority,be=n.unstable_NormalPriority,Te=n.unstable_LowPriority,Me=n.unstable_IdlePriority,mt=n.log,Pe=n.unstable_setDisableYieldValue,bt=null,gt=null;function Bt(e){if(typeof mt=="function"&&Pe(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(bt,e)}catch{}}var Ze=Math.clz32?Math.clz32:Vm,Yn=Math.log,hn=Math.LN2;function Vm(e){return e>>>=0,e===0?32:31-(Yn(e)/hn|0)|0}var Ns=256,js=262144,Us=4194304;function Si(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 Is(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var f=0,y=e.suspendedLanes,D=e.pingedLanes;e=e.warmLanes;var j=r&134217727;return j!==0?(r=j&~y,r!==0?f=Si(r):(D&=j,D!==0?f=Si(D):i||(i=j&~e,i!==0&&(f=Si(i))))):(j=r&~y,j!==0?f=Si(j):D!==0?f=Si(D):i||(i=r&~e,i!==0&&(f=Si(i)))),f===0?0:t!==0&&t!==f&&(t&y)===0&&(y=f&-f,i=t&-t,y>=i||y===32&&(i&4194048)!==0)?t:f}function Mr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Gm(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 Lc(){var e=Us;return Us<<=1,(Us&62914560)===0&&(Us=4194304),e}function _a(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Or(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ym(e,t,i,r,f,y){var D=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 j=e.entanglements,W=e.expirationTimes,ie=e.hiddenUpdates;for(i=D&~i;0<i;){var ce=31-Ze(i),fe=1<<ce;j[ce]=0,W[ce]=-1;var re=ie[ce];if(re!==null)for(ie[ce]=null,ce=0;ce<re.length;ce++){var le=re[ce];le!==null&&(le.lane&=-536870913)}i&=~fe}r!==0&&Mc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(D&~t))}function Mc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Oc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Ze(i),f=1<<r;f&t|e[r]&t&&(e[r]|=t),i&=~f}}function Bc(e,t){var i=t&-t;return i=(i&42)!==0?1:ma(i),(i&(e.suspendedLanes|t))!==0?0:i}function ma(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 ga(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zc(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:bp(e.type))}function Hc(e,t){var i=X.p;try{return X.p=e,t()}finally{X.p=i}}var Wn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Wn,zt="__reactProps$"+Wn,Ii="__reactContainer$"+Wn,va="__reactEvents$"+Wn,Wm="__reactListeners$"+Wn,Km="__reactHandles$"+Wn,Nc="__reactResources$"+Wn,Br="__reactMarker$"+Wn;function Sa(e){delete e[Ct],delete e[zt],delete e[va],delete e[Wm],delete e[Km]}function Pi(e){var t=e[Ct];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ii]||i[Ct]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=sp(e);e!==null;){if(i=e[Ct])return i;e=sp(e)}return t}e=i,i=e.parentNode}return null}function Fi(e){if(e=e[Ct]||e[Ii]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function qi(e){var t=e[Nc];return t||(t=e[Nc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Br]=!0}var jc=new Set,Uc={};function yi(e,t){Vi(e,t),Vi(e+"Capture",t)}function Vi(e,t){for(Uc[e]=t,e=0;e<t.length;e++)jc.add(t[e])}var Xm=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]*$"),Ic={},Pc={};function $m(e){return gn.call(Pc,e)?!0:gn.call(Ic,e)?!1:Xm.test(e)?Pc[e]=!0:(Ic[e]=!0,!1)}function Ps(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 r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Fs(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 kn(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qm(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,y=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(D){i=""+D,y.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ya(e){if(!e._valueTracker){var t=Fc(e)?"checked":"value";e._valueTracker=Qm(e,t,""+e[t])}}function qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=Fc(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function qs(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 Zm=/[\n"\\]/g;function en(e){return e.replace(Zm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ba(e,t,i,r,f,y,D,j){e.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.type=D:e.removeAttribute("type"),t!=null?D==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):D!=="submit"&&D!=="reset"||e.removeAttribute("value"),t!=null?Ca(e,D,Jt(t)):i!=null?Ca(e,D,Jt(i)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+Jt(j):e.removeAttribute("name")}function Vc(e,t,i,r,f,y,D,j){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||i!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){ya(e);return}i=i!=null?""+Jt(i):"",t=t!=null?""+Jt(t):i,j||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=j?e.checked:!!r,e.defaultChecked=!!r,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(e.name=D),ya(e)}function Ca(e,t,i){t==="number"&&qs(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Gi(e,t,i,r){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&r&&(e[i].defaultSelected=!0)}else{for(i=""+Jt(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Gc(e,t,i){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Jt(i):""}function Yc(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(o(92));if($(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Jt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),ya(e)}function Yi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Jm=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 Wc(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||Jm.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Kc(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in t)r=t[f],t.hasOwnProperty(f)&&i[f]!==r&&Wc(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&Wc(e,y,t[y])}function wa(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 eg=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"]]),tg=/^[\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 Vs(e){return tg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function An(){}var xa=null;function Ea(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,Ki=null;function Xc(e){var t=Fi(e);if(t&&(e=t.stateNode)){var i=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ba(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="'+en(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var f=r[zt]||null;if(!f)throw Error(o(90));ba(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&qc(r)}break e;case"textarea":Gc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Gi(e,!!i.multiple,t,!1)}}}var ka=!1;function $c(e,t,i){if(ka)return e(t,i);ka=!0;try{var r=e(t);return r}finally{if(ka=!1,(Wi!==null||Ki!==null)&&(Ll(),Wi&&(t=Wi,e=Ki,Ki=Wi=null,Xc(t),e)))for(t=0;t<e.length;t++)Xc(e[t])}}function Hr(e,t){var i=e.stateNode;if(i===null)return null;var r=i[zt]||null;if(r===null)return null;i=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Aa=!1;if(Tn)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){Aa=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Aa=!1}var Kn=null,Ta=null,Gs=null;function Qc(){if(Gs)return Gs;var e,t=Ta,i=t.length,r,f="value"in Kn?Kn.value:Kn.textContent,y=f.length;for(e=0;e<i&&t[e]===f[e];e++);var D=i-e;for(r=1;r<=D&&t[i-r]===f[y-r];r++);return Gs=f.slice(e,1<r?1-r:void 0)}function Ys(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 Ws(){return!0}function Zc(){return!1}function Ht(e){function t(i,r,f,y,D){this._reactName=i,this._targetInst=f,this.type=r,this.nativeEvent=y,this.target=D,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(i=e[j],this[j]=i?i(y):y[j]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ws:Zc,this.isPropagationStopped=Zc,this}return c(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=Ws)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),t}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ks=Ht(bi),jr=c({},bi,{view:0,detail:0}),ng=Ht(jr),Da,Ra,Ur,Xs=c({},jr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ma,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!==Ur&&(Ur&&e.type==="mousemove"?(Da=e.screenX-Ur.screenX,Ra=e.screenY-Ur.screenY):Ra=Da=0,Ur=e),Da)},movementY:function(e){return"movementY"in e?e.movementY:Ra}}),Jc=Ht(Xs),ig=c({},Xs,{dataTransfer:0}),rg=Ht(ig),sg=c({},jr,{relatedTarget:0}),La=Ht(sg),lg=c({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),ag=Ht(lg),og=c({},bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ug=Ht(og),cg=c({},bi,{data:0}),eh=Ht(cg),hg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fg={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"},dg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dg[e])?!!t[e]:!1}function Ma(){return pg}var _g=c({},jr,{key:function(e){if(e.key){var t=hg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ys(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ma,charCode:function(e){return e.type==="keypress"?Ys(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ys(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mg=Ht(_g),gg=c({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),th=Ht(gg),vg=c({},jr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ma}),Sg=Ht(vg),yg=c({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),bg=Ht(yg),Cg=c({},Xs,{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}),wg=Ht(Cg),xg=c({},bi,{newState:0,oldState:0}),Eg=Ht(xg),kg=[9,13,27,32],Oa=Tn&&"CompositionEvent"in window,Ir=null;Tn&&"documentMode"in document&&(Ir=document.documentMode);var Ag=Tn&&"TextEvent"in window&&!Ir,nh=Tn&&(!Oa||Ir&&8<Ir&&11>=Ir),ih=" ",rh=!1;function sh(e,t){switch(e){case"keyup":return kg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function Tg(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return t.which!==32?null:(rh=!0,ih);case"textInput":return e=t.data,e===ih&&rh?null:e;default:return null}}function Dg(e,t){if(Xi)return e==="compositionend"||!Oa&&sh(e,t)?(e=Qc(),Gs=Ta=Kn=null,Xi=!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 nh&&t.locale!=="ko"?null:t.data;default:return null}}var Rg={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 ah(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rg[e.type]:t==="textarea"}function oh(e,t,i,r){Wi?Ki?Ki.push(r):Ki=[r]:Wi=r,t=jl(t,"onChange"),0<t.length&&(i=new Ks("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var Pr=null,Fr=null;function Lg(e){Gd(e,0)}function $s(e){var t=zr(e);if(qc(t))return e}function uh(e,t){if(e==="change")return t}var ch=!1;if(Tn){var Ba;if(Tn){var za="oninput"in document;if(!za){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),za=typeof hh.oninput=="function"}Ba=za}else Ba=!1;ch=Ba&&(!document.documentMode||9<document.documentMode)}function fh(){Pr&&(Pr.detachEvent("onpropertychange",dh),Fr=Pr=null)}function dh(e){if(e.propertyName==="value"&&$s(Fr)){var t=[];oh(t,Fr,e,Ea(e)),$c(Lg,t)}}function Mg(e,t,i){e==="focusin"?(fh(),Pr=t,Fr=i,Pr.attachEvent("onpropertychange",dh)):e==="focusout"&&fh()}function Og(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(Fr)}function Bg(e,t){if(e==="click")return $s(t)}function zg(e,t){if(e==="input"||e==="change")return $s(t)}function Hg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:Hg;function qr(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var f=i[r];if(!gn.call(t,f)||!Vt(e[f],t[f]))return!1}return!0}function ph(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,t){var i=ph(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ph(i)}}function mh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qs(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=qs(e.document)}return t}function Ha(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 Ng=Tn&&"documentMode"in document&&11>=document.documentMode,$i=null,Na=null,Vr=null,ja=!1;function vh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ja||$i==null||$i!==qs(r)||(r=$i,"selectionStart"in r&&Ha(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&qr(Vr,r)||(Vr=r,r=jl(Na,"onSelect"),0<r.length&&(t=new Ks("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=$i)))}function Ci(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Qi={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},Ua={},Sh={};Tn&&(Sh=document.createElement("div").style,"AnimationEvent"in window||(delete Qi.animationend.animation,delete Qi.animationiteration.animation,delete Qi.animationstart.animation),"TransitionEvent"in window||delete Qi.transitionend.transition);function wi(e){if(Ua[e])return Ua[e];if(!Qi[e])return e;var t=Qi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Sh)return Ua[e]=t[i];return e}var yh=wi("animationend"),bh=wi("animationiteration"),Ch=wi("animationstart"),jg=wi("transitionrun"),Ug=wi("transitionstart"),Ig=wi("transitioncancel"),wh=wi("transitionend"),xh=new Map,Ia="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(" ");Ia.push("scrollEnd");function fn(e,t){xh.set(e,t),yi(t,[e])}var Qs=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)},tn=[],Zi=0,Pa=0;function Zs(){for(var e=Zi,t=Pa=Zi=0;t<e;){var i=tn[t];tn[t++]=null;var r=tn[t];tn[t++]=null;var f=tn[t];tn[t++]=null;var y=tn[t];if(tn[t++]=null,r!==null&&f!==null){var D=r.pending;D===null?f.next=f:(f.next=D.next,D.next=f),r.pending=f}y!==0&&Eh(i,f,y)}}function Js(e,t,i,r){tn[Zi++]=e,tn[Zi++]=t,tn[Zi++]=i,tn[Zi++]=r,Pa|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Fa(e,t,i,r){return Js(e,t,i,r),el(e)}function xi(e,t){return Js(e,null,null,t),el(e)}function Eh(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var f=!1,y=e.return;y!==null;)y.childLanes|=i,r=y.alternate,r!==null&&(r.childLanes|=i),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(f=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,f&&t!==null&&(f=31-Ze(i),e=y.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=i|536870912),y):null}function el(e){if(50<fs)throw fs=0,Zo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ji={};function Pg(e,t,i,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,i,r){return new Pg(e,t,i,r)}function qa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dn(e,t){var i=e.alternate;return i===null?(i=Gt(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 kh(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 tl(e,t,i,r,f,y){var D=0;if(r=e,typeof e=="function")qa(e)&&(D=1);else if(typeof e=="string")D=Yv(e,i,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=Gt(31,i,t,f),e.elementType=B,e.lanes=y,e;case x:return Ei(i.children,f,y,t);case S:D=8,f|=24;break;case m:return e=Gt(12,i,t,f|2),e.elementType=m,e.lanes=y,e;case R:return e=Gt(13,i,t,f),e.elementType=R,e.lanes=y,e;case A:return e=Gt(19,i,t,f),e.elementType=A,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:D=10;break e;case d:D=9;break e;case E:D=11;break e;case L:D=14;break e;case T:D=16,r=null;break e}D=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=Gt(D,i,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function Ei(e,t,i,r){return e=Gt(7,e,r,t),e.lanes=i,e}function Va(e,t,i){return e=Gt(6,e,null,t),e.lanes=i,e}function Ah(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function Ga(e,t,i){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Th=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var i=Th.get(e);return i!==void 0?i:(t={value:e,source:t,stack:mn(t)},Th.set(e,t),t)}return{value:e,source:t,stack:mn(t)}}var er=[],tr=0,nl=null,Gr=0,rn=[],sn=0,Xn=null,Sn=1,yn="";function Rn(e,t){er[tr++]=Gr,er[tr++]=nl,nl=e,Gr=t}function Dh(e,t,i){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Xn=e;var r=Sn;e=yn;var f=32-Ze(r)-1;r&=~(1<<f),i+=1;var y=32-Ze(t)+f;if(30<y){var D=f-f%5;y=(r&(1<<D)-1).toString(32),r>>=D,f-=D,Sn=1<<32-Ze(t)+f|i<<f|r,yn=y+e}else Sn=1<<y|i<<f|r,yn=e}function Ya(e){e.return!==null&&(Rn(e,1),Dh(e,1,0))}function Wa(e){for(;e===nl;)nl=er[--tr],er[tr]=null,Gr=er[--tr],er[tr]=null;for(;e===Xn;)Xn=rn[--sn],rn[sn]=null,yn=rn[--sn],rn[sn]=null,Sn=rn[--sn],rn[sn]=null}function Rh(e,t){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Sn=t.id,yn=t.overflow,Xn=e}var wt=null,nt=null,Ue=!1,$n=null,ln=!1,Ka=Error(o(519));function Qn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yr(nn(t,e)),Ka}function Lh(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[zt]=r,i){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(i=0;i<ps.length;i++)ze(ps[i],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),Vc(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),Yc(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||Xd(t.textContent,i)?(r.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),r.onScroll!=null&&ze("scroll",t),r.onScrollEnd!=null&&ze("scrollend",t),r.onClick!=null&&(t.onclick=An),t=!0):t=!1,t||Qn(e,!0)}function Mh(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:ln=!1;return;case 27:case 3:ln=!0;return;default:wt=wt.return}}function nr(e){if(e!==wt)return!1;if(!Ue)return Mh(e),Ue=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||du(e.type,e.memoizedProps)),i=!i),i&&nt&&Qn(e),Mh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=rp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=rp(e)}else t===27?(t=nt,hi(e.type)?(e=vu,vu=null,nt=e):nt=t):nt=wt?on(e.stateNode.nextSibling):null;return!0}function ki(){nt=wt=null,Ue=!1}function Xa(){var e=$n;return e!==null&&(It===null?It=e:It.push.apply(It,e),$n=null),e}function Yr(e){$n===null?$n=[e]:$n.push(e)}var $a=O(null),Ai=null,Ln=null;function Zn(e,t,i){H($a,t._currentValue),t._currentValue=i}function Mn(e){e._currentValue=$a.current,P($a)}function Qa(e,t,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===i)break;e=e.return}}function Za(e,t,i,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var y=f.dependencies;if(y!==null){var D=f.child;y=y.firstContext;e:for(;y!==null;){var j=y;y=f;for(var W=0;W<t.length;W++)if(j.context===t[W]){y.lanes|=i,j=y.alternate,j!==null&&(j.lanes|=i),Qa(y.return,i,e),r||(D=null);break e}y=j.next}}else if(f.tag===18){if(D=f.return,D===null)throw Error(o(341));D.lanes|=i,y=D.alternate,y!==null&&(y.lanes|=i),Qa(D,i,e),D=null}else D=f.child;if(D!==null)D.return=f;else for(D=f;D!==null;){if(D===e){D=null;break}if(f=D.sibling,f!==null){f.return=D.return,D=f;break}D=D.return}f=D}}function ir(e,t,i,r){e=null;for(var f=t,y=!1;f!==null;){if(!y){if((f.flags&524288)!==0)y=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var D=f.alternate;if(D===null)throw Error(o(387));if(D=D.memoizedProps,D!==null){var j=f.type;Vt(f.pendingProps.value,D.value)||(e!==null?e.push(j):e=[j])}}else if(f===K.current){if(D=f.alternate,D===null)throw Error(o(387));D.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ss):e=[Ss])}f=f.return}e!==null&&Za(t,e,i,r),t.flags|=262144}function il(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ti(e){Ai=e,Ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Oh(Ai,e)}function rl(e,t){return Ai===null&&Ti(e),Oh(e,t)}function Oh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ln===null){if(e===null)throw Error(o(308));Ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ln=Ln.next=t;return i}var Fg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},qg=n.unstable_scheduleCallback,Vg=n.unstable_NormalPriority,ht={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ja(){return{controller:new Fg,data:new Map,refCount:0}}function Wr(e){e.refCount--,e.refCount===0&&qg(Vg,function(){e.controller.abort()})}var Kr=null,eo=0,rr=0,sr=null;function Gg(e,t){if(Kr===null){var i=Kr=[];eo=0,rr=ru(),sr={status:"pending",value:void 0,then:function(r){i.push(r)}}}return eo++,t.then(Bh,Bh),t}function Bh(){if(--eo===0&&Kr!==null){sr!==null&&(sr.status="fulfilled");var e=Kr;Kr=null,rr=0,sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Yg(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),r}var zh=G.S;G.S=function(e,t){Sd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Gg(e,t),zh!==null&&zh(e,t)};var Di=O(null);function to(){var e=Di.current;return e!==null?e:Je.pooledCache}function sl(e,t){t===null?H(Di,Di.current):H(Di,t.pool)}function Hh(){var e=to();return e===null?null:{parent:ht._currentValue,pool:e}}var lr=Error(o(460)),no=Error(o(474)),ll=Error(o(542)),al={then:function(){}};function Nh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(An,An),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e;default:if(typeof t.status=="string")t.then(An,An);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=r}},function(r){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e}throw Li=t,lr}}function Ri(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Li=i,lr):i}}var Li=null;function Uh(){if(Li===null)throw Error(o(459));var e=Li;return Li=null,e}function Ih(e){if(e===lr||e===ll)throw Error(o(483))}var ar=null,Xr=0;function ol(e){var t=Xr;return Xr+=1,ar===null&&(ar=[]),jh(ar,e,t)}function $r(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ul(e,t){throw t.$$typeof===C?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ph(e){function t(J,Q){if(e){var te=J.deletions;te===null?(J.deletions=[Q],J.flags|=16):te.push(Q)}}function i(J,Q){if(!e)return null;for(;Q!==null;)t(J,Q),Q=Q.sibling;return null}function r(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function f(J,Q){return J=Dn(J,Q),J.index=0,J.sibling=null,J}function y(J,Q,te){return J.index=te,e?(te=J.alternate,te!==null?(te=te.index,te<Q?(J.flags|=67108866,Q):te):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function D(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function j(J,Q,te,he){return Q===null||Q.tag!==6?(Q=Va(te,J.mode,he),Q.return=J,Q):(Q=f(Q,te),Q.return=J,Q)}function W(J,Q,te,he){var Ce=te.type;return Ce===x?ce(J,Q,te.props.children,he,te.key):Q!==null&&(Q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===T&&Ri(Ce)===Q.type)?(Q=f(Q,te.props),$r(Q,te),Q.return=J,Q):(Q=tl(te.type,te.key,te.props,null,J.mode,he),$r(Q,te),Q.return=J,Q)}function ie(J,Q,te,he){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==te.containerInfo||Q.stateNode.implementation!==te.implementation?(Q=Ga(te,J.mode,he),Q.return=J,Q):(Q=f(Q,te.children||[]),Q.return=J,Q)}function ce(J,Q,te,he,Ce){return Q===null||Q.tag!==7?(Q=Ei(te,J.mode,he,Ce),Q.return=J,Q):(Q=f(Q,te),Q.return=J,Q)}function fe(J,Q,te){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Va(""+Q,J.mode,te),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return te=tl(Q.type,Q.key,Q.props,null,J.mode,te),$r(te,Q),te.return=J,te;case k:return Q=Ga(Q,J.mode,te),Q.return=J,Q;case T:return Q=Ri(Q),fe(J,Q,te)}if($(Q)||F(Q))return Q=Ei(Q,J.mode,te,null),Q.return=J,Q;if(typeof Q.then=="function")return fe(J,ol(Q),te);if(Q.$$typeof===g)return fe(J,rl(J,Q),te);ul(J,Q)}return null}function re(J,Q,te,he){var Ce=Q!==null?Q.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return Ce!==null?null:j(J,Q,""+te,he);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case w:return te.key===Ce?W(J,Q,te,he):null;case k:return te.key===Ce?ie(J,Q,te,he):null;case T:return te=Ri(te),re(J,Q,te,he)}if($(te)||F(te))return Ce!==null?null:ce(J,Q,te,he,null);if(typeof te.then=="function")return re(J,Q,ol(te),he);if(te.$$typeof===g)return re(J,Q,rl(J,te),he);ul(J,te)}return null}function le(J,Q,te,he,Ce){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return J=J.get(te)||null,j(Q,J,""+he,Ce);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case w:return J=J.get(he.key===null?te:he.key)||null,W(Q,J,he,Ce);case k:return J=J.get(he.key===null?te:he.key)||null,ie(Q,J,he,Ce);case T:return he=Ri(he),le(J,Q,te,he,Ce)}if($(he)||F(he))return J=J.get(te)||null,ce(Q,J,he,Ce,null);if(typeof he.then=="function")return le(J,Q,te,ol(he),Ce);if(he.$$typeof===g)return le(J,Q,te,rl(Q,he),Ce);ul(Q,he)}return null}function ve(J,Q,te,he){for(var Ce=null,qe=null,ye=Q,Re=Q=0,je=null;ye!==null&&Re<te.length;Re++){ye.index>Re?(je=ye,ye=null):je=ye.sibling;var Ve=re(J,ye,te[Re],he);if(Ve===null){ye===null&&(ye=je);break}e&&ye&&Ve.alternate===null&&t(J,ye),Q=y(Ve,Q,Re),qe===null?Ce=Ve:qe.sibling=Ve,qe=Ve,ye=je}if(Re===te.length)return i(J,ye),Ue&&Rn(J,Re),Ce;if(ye===null){for(;Re<te.length;Re++)ye=fe(J,te[Re],he),ye!==null&&(Q=y(ye,Q,Re),qe===null?Ce=ye:qe.sibling=ye,qe=ye);return Ue&&Rn(J,Re),Ce}for(ye=r(ye);Re<te.length;Re++)je=le(ye,J,Re,te[Re],he),je!==null&&(e&&je.alternate!==null&&ye.delete(je.key===null?Re:je.key),Q=y(je,Q,Re),qe===null?Ce=je:qe.sibling=je,qe=je);return e&&ye.forEach(function(mi){return t(J,mi)}),Ue&&Rn(J,Re),Ce}function Ee(J,Q,te,he){if(te==null)throw Error(o(151));for(var Ce=null,qe=null,ye=Q,Re=Q=0,je=null,Ve=te.next();ye!==null&&!Ve.done;Re++,Ve=te.next()){ye.index>Re?(je=ye,ye=null):je=ye.sibling;var mi=re(J,ye,Ve.value,he);if(mi===null){ye===null&&(ye=je);break}e&&ye&&mi.alternate===null&&t(J,ye),Q=y(mi,Q,Re),qe===null?Ce=mi:qe.sibling=mi,qe=mi,ye=je}if(Ve.done)return i(J,ye),Ue&&Rn(J,Re),Ce;if(ye===null){for(;!Ve.done;Re++,Ve=te.next())Ve=fe(J,Ve.value,he),Ve!==null&&(Q=y(Ve,Q,Re),qe===null?Ce=Ve:qe.sibling=Ve,qe=Ve);return Ue&&Rn(J,Re),Ce}for(ye=r(ye);!Ve.done;Re++,Ve=te.next())Ve=le(ye,J,Re,Ve.value,he),Ve!==null&&(e&&Ve.alternate!==null&&ye.delete(Ve.key===null?Re:Ve.key),Q=y(Ve,Q,Re),qe===null?Ce=Ve:qe.sibling=Ve,qe=Ve);return e&&ye.forEach(function(i0){return t(J,i0)}),Ue&&Rn(J,Re),Ce}function Qe(J,Q,te,he){if(typeof te=="object"&&te!==null&&te.type===x&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case w:e:{for(var Ce=te.key;Q!==null;){if(Q.key===Ce){if(Ce=te.type,Ce===x){if(Q.tag===7){i(J,Q.sibling),he=f(Q,te.props.children),he.return=J,J=he;break e}}else if(Q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===T&&Ri(Ce)===Q.type){i(J,Q.sibling),he=f(Q,te.props),$r(he,te),he.return=J,J=he;break e}i(J,Q);break}else t(J,Q);Q=Q.sibling}te.type===x?(he=Ei(te.props.children,J.mode,he,te.key),he.return=J,J=he):(he=tl(te.type,te.key,te.props,null,J.mode,he),$r(he,te),he.return=J,J=he)}return D(J);case k:e:{for(Ce=te.key;Q!==null;){if(Q.key===Ce)if(Q.tag===4&&Q.stateNode.containerInfo===te.containerInfo&&Q.stateNode.implementation===te.implementation){i(J,Q.sibling),he=f(Q,te.children||[]),he.return=J,J=he;break e}else{i(J,Q);break}else t(J,Q);Q=Q.sibling}he=Ga(te,J.mode,he),he.return=J,J=he}return D(J);case T:return te=Ri(te),Qe(J,Q,te,he)}if($(te))return ve(J,Q,te,he);if(F(te)){if(Ce=F(te),typeof Ce!="function")throw Error(o(150));return te=Ce.call(te),Ee(J,Q,te,he)}if(typeof te.then=="function")return Qe(J,Q,ol(te),he);if(te.$$typeof===g)return Qe(J,Q,rl(J,te),he);ul(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,Q!==null&&Q.tag===6?(i(J,Q.sibling),he=f(Q,te),he.return=J,J=he):(i(J,Q),he=Va(te,J.mode,he),he.return=J,J=he),D(J)):i(J,Q)}return function(J,Q,te,he){try{Xr=0;var Ce=Qe(J,Q,te,he);return ar=null,Ce}catch(ye){if(ye===lr||ye===ll)throw ye;var qe=Gt(29,ye,null,J.mode);return qe.lanes=he,qe.return=J,qe}finally{}}}var Mi=Ph(!0),Fh=Ph(!1),Jn=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ro(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 ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ti(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ge&2)!==0){var f=r.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),r.pending=t,t=el(e),Eh(e,null,i),t}return Js(e,r,t,i),el(e)}function Qr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Oc(e,i)}}function so(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var f=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var D={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};y===null?f=y=D:y=y.next=D,i=i.next}while(i!==null);y===null?f=y=t:y=y.next=t}else f=y=t;i={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:y,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var lo=!1;function Zr(){if(lo){var e=sr;if(e!==null)throw e}}function Jr(e,t,i,r){lo=!1;var f=e.updateQueue;Jn=!1;var y=f.firstBaseUpdate,D=f.lastBaseUpdate,j=f.shared.pending;if(j!==null){f.shared.pending=null;var W=j,ie=W.next;W.next=null,D===null?y=ie:D.next=ie,D=W;var ce=e.alternate;ce!==null&&(ce=ce.updateQueue,j=ce.lastBaseUpdate,j!==D&&(j===null?ce.firstBaseUpdate=ie:j.next=ie,ce.lastBaseUpdate=W))}if(y!==null){var fe=f.baseState;D=0,ce=ie=W=null,j=y;do{var re=j.lane&-536870913,le=re!==j.lane;if(le?(Ne&re)===re:(r&re)===re){re!==0&&re===rr&&(lo=!0),ce!==null&&(ce=ce.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var ve=e,Ee=j;re=t;var Qe=i;switch(Ee.tag){case 1:if(ve=Ee.payload,typeof ve=="function"){fe=ve.call(Qe,fe,re);break e}fe=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ee.payload,re=typeof ve=="function"?ve.call(Qe,fe,re):ve,re==null)break e;fe=c({},fe,re);break e;case 2:Jn=!0}}re=j.callback,re!==null&&(e.flags|=64,le&&(e.flags|=8192),le=f.callbacks,le===null?f.callbacks=[re]:le.push(re))}else le={lane:re,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ce===null?(ie=ce=le,W=fe):ce=ce.next=le,D|=re;if(j=j.next,j===null){if(j=f.shared.pending,j===null)break;le=j,j=le.next,le.next=null,f.lastBaseUpdate=le,f.shared.pending=null}}while(!0);ce===null&&(W=fe),f.baseState=W,f.firstBaseUpdate=ie,f.lastBaseUpdate=ce,y===null&&(f.shared.lanes=0),li|=D,e.lanes=D,e.memoizedState=fe}}function qh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Vh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)qh(i[e],t)}var or=O(null),cl=O(0);function Gh(e,t){e=Pn,H(cl,e),H(or,t),Pn=e|t.baseLanes}function ao(){H(cl,Pn),H(or,or.current)}function oo(){Pn=cl.current,P(or),P(cl)}var Yt=O(null),an=null;function ni(e){var t=e.alternate;H(ut,ut.current&1),H(Yt,e),an===null&&(t===null||or.current!==null||t.memoizedState!==null)&&(an=e)}function uo(e){H(ut,ut.current),H(Yt,e),an===null&&(an=e)}function Yh(e){e.tag===22?(H(ut,ut.current),H(Yt,e),an===null&&(an=e)):ii()}function ii(){H(ut,ut.current),H(Yt,Yt.current)}function Wt(e){P(Yt),an===e&&(an=null),P(ut)}var ut=O(0);function hl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||mu(i)||gu(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 On=0,De=null,Xe=null,ft=null,fl=!1,ur=!1,Oi=!1,dl=0,es=0,cr=null,Wg=0;function st(){throw Error(o(321))}function co(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Vt(e[i],t[i]))return!1;return!0}function ho(e,t,i,r,f,y){return On=y,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Rf:Ao,Oi=!1,y=i(r,f),Oi=!1,ur&&(y=Kh(t,i,r,f)),Wh(e),y}function Wh(e){G.H=is;var t=Xe!==null&&Xe.next!==null;if(On=0,ft=Xe=De=null,fl=!1,es=0,cr=null,t)throw Error(o(300));e===null||dt||(e=e.dependencies,e!==null&&il(e)&&(dt=!0))}function Kh(e,t,i,r){De=e;var f=0;do{if(ur&&(cr=null),es=0,ur=!1,25<=f)throw Error(o(301));if(f+=1,ft=Xe=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}G.H=Lf,y=t(i,r)}while(ur);return y}function Kg(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?ts(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(De.flags|=1024),t}function fo(){var e=dl!==0;return dl=0,e}function po(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function _o(e){if(fl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fl=!1}On=0,ft=Xe=De=null,ur=!1,es=dl=0,cr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?De.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ft===null?De.memoizedState:ft.next;if(t!==null)ft=t,Xe=e;else{if(e===null)throw De.alternate===null?Error(o(467)):Error(o(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?De.memoizedState=ft=e:ft=ft.next=e}return ft}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=es;return es+=1,cr===null&&(cr=[]),e=jh(cr,e,t),t=De,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Rf:Ao),e}function _l(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ts(e);if(e.$$typeof===g)return xt(e)}throw Error(o(438,String(e)))}function mo(e){var t=null,i=De.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=De.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=pl(),De.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=N;return t.index++,i}function Bn(e,t){return typeof t=="function"?t(e):t}function ml(e){var t=ct();return go(t,Xe,e)}function go(e,t,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var f=e.baseQueue,y=r.pending;if(y!==null){if(f!==null){var D=f.next;f.next=y.next,y.next=D}t.baseQueue=f=y,r.pending=null}if(y=e.baseState,f===null)e.memoizedState=y;else{t=f.next;var j=D=null,W=null,ie=t,ce=!1;do{var fe=ie.lane&-536870913;if(fe!==ie.lane?(Ne&fe)===fe:(On&fe)===fe){var re=ie.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),fe===rr&&(ce=!0);else if((On&re)===re){ie=ie.next,re===rr&&(ce=!0);continue}else fe={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},W===null?(j=W=fe,D=y):W=W.next=fe,De.lanes|=re,li|=re;fe=ie.action,Oi&&i(y,fe),y=ie.hasEagerState?ie.eagerState:i(y,fe)}else re={lane:fe,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},W===null?(j=W=re,D=y):W=W.next=re,De.lanes|=fe,li|=fe;ie=ie.next}while(ie!==null&&ie!==t);if(W===null?D=y:W.next=j,!Vt(y,e.memoizedState)&&(dt=!0,ce&&(i=sr,i!==null)))throw i;e.memoizedState=y,e.baseState=D,e.baseQueue=W,r.lastRenderedState=y}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vo(e){var t=ct(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,f=i.pending,y=t.memoizedState;if(f!==null){i.pending=null;var D=f=f.next;do y=e(y,D.action),D=D.next;while(D!==f);Vt(y,t.memoizedState)||(dt=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,r]}function Xh(e,t,i){var r=De,f=ct(),y=Ue;if(y){if(i===void 0)throw Error(o(407));i=i()}else i=t();var D=!Vt((Xe||f).memoizedState,i);if(D&&(f.memoizedState=i,dt=!0),f=f.queue,bo(Zh.bind(null,r,f,e),[e]),f.getSnapshot!==t||D||ft!==null&&ft.memoizedState.tag&1){if(r.flags|=2048,hr(9,{destroy:void 0},Qh.bind(null,r,f,i,t),null),Je===null)throw Error(o(349));y||(On&127)!==0||$h(r,t,i)}return i}function $h(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=De.updateQueue,t===null?(t=pl(),De.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Qh(e,t,i,r){t.value=i,t.getSnapshot=r,Jh(t)&&ef(e)}function Zh(e,t,i){return i(function(){Jh(t)&&ef(e)})}function Jh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Vt(e,i)}catch{return!0}}function ef(e){var t=xi(e,2);t!==null&&Pt(t,e,2)}function So(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),Oi){Bt(!0);try{i()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function tf(e,t,i,r){return e.baseState=i,go(e,Xe,typeof r=="function"?r:Bn)}function Xg(e,t,i,r,f){if(Sl(e))throw Error(o(485));if(e=t.action,e!==null){var y={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){y.listeners.push(D)}};G.T!==null?i(!0):y.isTransition=!1,r(y),i=t.pending,i===null?(y.next=t.pending=y,nf(t,y)):(y.next=i.next,t.pending=i.next=y)}}function nf(e,t){var i=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=G.T,D={};G.T=D;try{var j=i(f,r),W=G.S;W!==null&&W(D,j),rf(e,t,j)}catch(ie){yo(e,t,ie)}finally{y!==null&&D.types!==null&&(y.types=D.types),G.T=y}}else try{y=i(f,r),rf(e,t,y)}catch(ie){yo(e,t,ie)}}function rf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){sf(e,t,r)},function(r){return yo(e,t,r)}):sf(e,t,i)}function sf(e,t,i){t.status="fulfilled",t.value=i,lf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,nf(e,i)))}function yo(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,lf(t),t=t.next;while(t!==r)}e.action=null}function lf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function af(e,t){return t}function of(e,t){if(Ue){var i=Je.formState;if(i!==null){e:{var r=De;if(Ue){if(nt){t:{for(var f=nt,y=ln;f.nodeType!==8;){if(!y){f=null;break t}if(f=on(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){nt=on(f.nextSibling),r=f.data==="F!";break e}}Qn(r)}r=!1}r&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:af,lastRenderedState:t},i.queue=r,i=Af.bind(null,De,r),r.dispatch=i,r=So(!1),y=ko.bind(null,De,!1,r.queue),r=Lt(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,i=Xg.bind(null,De,f,y,i),f.dispatch=i,r.memoizedState=e,[t,i,!1]}function uf(e){var t=ct();return cf(t,Xe,e)}function cf(e,t,i){if(t=go(e,t,af)[0],e=ml(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ts(t)}catch(D){throw D===lr?ll:D}else r=t;t=ct();var f=t.queue,y=f.dispatch;return i!==t.memoizedState&&(De.flags|=2048,hr(9,{destroy:void 0},$g.bind(null,f,i),null)),[r,y,e]}function $g(e,t){e.action=t}function hf(e){var t=ct(),i=Xe;if(i!==null)return cf(t,i,e);ct(),t=t.memoizedState,i=ct();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function hr(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=De.updateQueue,t===null&&(t=pl(),De.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function ff(){return ct().memoizedState}function gl(e,t,i,r){var f=Lt();De.flags|=e,f.memoizedState=hr(1|t,{destroy:void 0},i,r===void 0?null:r)}function vl(e,t,i,r){var f=ct();r=r===void 0?null:r;var y=f.memoizedState.inst;Xe!==null&&r!==null&&co(r,Xe.memoizedState.deps)?f.memoizedState=hr(t,y,i,r):(De.flags|=e,f.memoizedState=hr(1|t,y,i,r))}function df(e,t){gl(8390656,8,e,t)}function bo(e,t){vl(2048,8,e,t)}function Qg(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=pl(),De.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function pf(e){var t=ct().memoizedState;return Qg({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function _f(e,t){return vl(4,2,e,t)}function mf(e,t){return vl(4,4,e,t)}function gf(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 vf(e,t,i){i=i!=null?i.concat([e]):null,vl(4,4,gf.bind(null,t,e),i)}function Co(){}function Sf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&co(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function yf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&co(t,r[1]))return r[0];if(r=e(),Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r}function wo(e,t,i){return i===void 0||(On&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=bd(),De.lanes|=e,li|=e,i)}function bf(e,t,i,r){return Vt(i,t)?i:or.current!==null?(e=wo(e,i,r),Vt(e,t)||(dt=!0),e):(On&42)===0||(On&1073741824)!==0&&(Ne&261930)===0?(dt=!0,e.memoizedState=i):(e=bd(),De.lanes|=e,li|=e,t)}function Cf(e,t,i,r,f){var y=X.p;X.p=y!==0&&8>y?y:8;var D=G.T,j={};G.T=j,ko(e,!1,t,i);try{var W=f(),ie=G.S;if(ie!==null&&ie(j,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var ce=Yg(W,r);ns(e,t,ce,$t(e))}else ns(e,t,r,$t(e))}catch(fe){ns(e,t,{then:function(){},status:"rejected",reason:fe},$t())}finally{X.p=y,D!==null&&j.types!==null&&(D.types=j.types),G.T=D}}function Zg(){}function xo(e,t,i,r){if(e.tag!==5)throw Error(o(476));var f=wf(e).queue;Cf(e,f,t,se,i===null?Zg:function(){return xf(e),i(r)})}function wf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:se},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xf(e){var t=wf(e);t.next===null&&(t=e.alternate.memoizedState),ns(e,t.next.queue,{},$t())}function Eo(){return xt(Ss)}function Ef(){return ct().memoizedState}function kf(){return ct().memoizedState}function Jg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=$t();e=ei(i);var r=ti(t,e,i);r!==null&&(Pt(r,t,i),Qr(r,t,i)),t={cache:Ja()},e.payload=t;return}t=t.return}}function ev(e,t,i){var r=$t();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Sl(e)?Tf(t,i):(i=Fa(e,t,i,r),i!==null&&(Pt(i,e,r),Df(i,t,r)))}function Af(e,t,i){var r=$t();ns(e,t,i,r)}function ns(e,t,i,r){var f={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Sl(e))Tf(t,f);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=t.lastRenderedReducer,y!==null))try{var D=t.lastRenderedState,j=y(D,i);if(f.hasEagerState=!0,f.eagerState=j,Vt(j,D))return Js(e,t,f,0),Je===null&&Zs(),!1}catch{}finally{}if(i=Fa(e,t,f,r),i!==null)return Pt(i,e,r),Df(i,t,r),!0}return!1}function ko(e,t,i,r){if(r={lane:2,revertLane:ru(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Sl(e)){if(t)throw Error(o(479))}else t=Fa(e,i,r,2),t!==null&&Pt(t,e,2)}function Sl(e){var t=e.alternate;return e===De||t!==null&&t===De}function Tf(e,t){ur=fl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Df(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Oc(e,i)}}var is={readContext:xt,use:_l,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};is.useEffectEvent=st;var Rf={readContext:xt,use:_l,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:df,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,gl(4194308,4,gf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return gl(4194308,4,e,t)},useInsertionEffect:function(e,t){gl(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var r=e();if(Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Lt();if(i!==void 0){var f=i(t);if(Oi){Bt(!0);try{i(t)}finally{Bt(!1)}}}else f=t;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=ev.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=So(e);var t=e.queue,i=Af.bind(null,De,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Co,useDeferredValue:function(e,t){var i=Lt();return wo(i,e,t)},useTransition:function(){var e=So(!1);return e=Cf.bind(null,De,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=De,f=Lt();if(Ue){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),Je===null)throw Error(o(349));(Ne&127)!==0||$h(r,t,i)}f.memoizedState=i;var y={value:i,getSnapshot:t};return f.queue=y,df(Zh.bind(null,r,y,e),[e]),r.flags|=2048,hr(9,{destroy:void 0},Qh.bind(null,r,y,i,t),null),i},useId:function(){var e=Lt(),t=Je.identifierPrefix;if(Ue){var i=yn,r=Sn;i=(r&~(1<<32-Ze(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=dl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Wg++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Eo,useFormState:of,useActionState:of,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ko.bind(null,De,!0,i),i.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return Lt().memoizedState=Jg.bind(null,De)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if((Ge&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Ao={readContext:xt,use:_l,useCallback:Sf,useContext:xt,useEffect:bo,useImperativeHandle:vf,useInsertionEffect:_f,useLayoutEffect:mf,useMemo:yf,useReducer:ml,useRef:ff,useState:function(){return ml(Bn)},useDebugValue:Co,useDeferredValue:function(e,t){var i=ct();return bf(i,Xe.memoizedState,e,t)},useTransition:function(){var e=ml(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:Xh,useId:Ef,useHostTransitionStatus:Eo,useFormState:uf,useActionState:uf,useOptimistic:function(e,t){var i=ct();return tf(i,Xe,e,t)},useMemoCache:mo,useCacheRefresh:kf};Ao.useEffectEvent=pf;var Lf={readContext:xt,use:_l,useCallback:Sf,useContext:xt,useEffect:bo,useImperativeHandle:vf,useInsertionEffect:_f,useLayoutEffect:mf,useMemo:yf,useReducer:vo,useRef:ff,useState:function(){return vo(Bn)},useDebugValue:Co,useDeferredValue:function(e,t){var i=ct();return Xe===null?wo(i,e,t):bf(i,Xe.memoizedState,e,t)},useTransition:function(){var e=vo(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:Xh,useId:Ef,useHostTransitionStatus:Eo,useFormState:hf,useActionState:hf,useOptimistic:function(e,t){var i=ct();return Xe!==null?tf(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:mo,useCacheRefresh:kf};Lf.useEffectEvent=pf;function To(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:c({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Do={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=$t(),r=ei(i);r.tag=2,t!=null&&(r.callback=t),t=ti(e,r,i),t!==null&&(Pt(t,e,i),Qr(t,e,i))}};function Mf(e,t,i,r,f,y,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,y,D):t.prototype&&t.prototype.isPureReactComponent?!qr(i,r)||!qr(f,y):!0}function Of(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&Do.enqueueReplaceState(t,t.state,null)}function Bi(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=c({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Bf(e){Qs(e)}function zf(e){console.error(e)}function Hf(e){Qs(e)}function yl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Nf(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ro(e,t,i){return i=ei(i),i.tag=3,i.payload={element:null},i.callback=function(){yl(e,t)},i}function jf(e){return e=ei(e),e.tag=3,e}function Uf(e,t,i,r){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var y=r.value;e.payload=function(){return f(y)},e.callback=function(){Nf(t,i,r)}}var D=i.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){Nf(t,i,r),typeof f!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var j=r.stack;this.componentDidCatch(r.value,{componentStack:j!==null?j:""})})}function tv(e,t,i,r,f){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&ir(t,i,f,!0),i=Yt.current,i!==null){switch(i.tag){case 31:case 13:return an===null?Ml():i.alternate===null&&lt===0&&(lt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,r===al?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),tu(e,r,f)),!1;case 22:return i.flags|=65536,r===al?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),tu(e,r,f)),!1}throw Error(o(435,i.tag))}return tu(e,r,f),Ml(),!1}if(Ue)return t=Yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Ka&&(e=Error(o(422),{cause:r}),Yr(nn(e,i)))):(r!==Ka&&(t=Error(o(423),{cause:r}),Yr(nn(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=nn(r,i),f=Ro(e.stateNode,r,f),so(e,f),lt!==4&&(lt=2)),!1;var y=Error(o(520),{cause:r});if(y=nn(y,i),hs===null?hs=[y]:hs.push(y),lt!==4&&(lt=2),t===null)return!0;r=nn(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Ro(i.stateNode,r,e),so(i,e),!1;case 1:if(t=i.type,y=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ai===null||!ai.has(y))))return i.flags|=65536,f&=-f,i.lanes|=f,f=jf(f),Uf(f,e,i,r),so(i,f),!1}i=i.return}while(i!==null);return!1}var Lo=Error(o(461)),dt=!1;function Et(e,t,i,r){t.child=e===null?Fh(t,null,i,r):Mi(t,e.child,i,r)}function If(e,t,i,r,f){i=i.render;var y=t.ref;if("ref"in r){var D={};for(var j in r)j!=="ref"&&(D[j]=r[j])}else D=r;return Ti(t),r=ho(e,t,i,D,y,f),j=fo(),e!==null&&!dt?(po(e,t,f),zn(e,t,f)):(Ue&&j&&Ya(t),t.flags|=1,Et(e,t,r,f),t.child)}function Pf(e,t,i,r,f){if(e===null){var y=i.type;return typeof y=="function"&&!qa(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,Ff(e,t,y,r,f)):(e=tl(i.type,null,r,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,!Uo(e,f)){var D=y.memoizedProps;if(i=i.compare,i=i!==null?i:qr,i(D,r)&&e.ref===t.ref)return zn(e,t,f)}return t.flags|=1,e=Dn(y,r),e.ref=t.ref,e.return=t,t.child=e}function Ff(e,t,i,r,f){if(e!==null){var y=e.memoizedProps;if(qr(y,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=y,Uo(e,f))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,zn(e,t,f)}return Mo(e,t,i,r,f)}function qf(e,t,i,r){var f=r.children,y=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(y=y!==null?y.baseLanes|i:i,e!==null){for(r=t.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~y}else r=0,t.child=null;return Vf(e,t,y,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&sl(t,y!==null?y.cachePool:null),y!==null?Gh(t,y):ao(),Yh(t);else return r=t.lanes=536870912,Vf(e,t,y!==null?y.baseLanes|i:i,i,r)}else y!==null?(sl(t,y.cachePool),Gh(t,y),ii(),t.memoizedState=null):(e!==null&&sl(t,null),ao(),ii());return Et(e,t,f,i),t.child}function rs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vf(e,t,i,r,f){var y=to();return y=y===null?null:{parent:ht._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&sl(t,null),ao(),Yh(t),e!==null&&ir(e,t,r,!0),t.childLanes=f,null}function bl(e,t){return t=wl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gf(e,t,i){return Mi(t,e.child,null,i),e=bl(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function nv(e,t,i){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(r.mode==="hidden")return e=bl(t,r),t.lanes=536870912,rs(null,e);if(uo(t),(e=nt)?(e=ip(e,ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Ah(e),i.return=t,t.child=i,wt=t,nt=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return bl(t,r)}var y=e.memoizedState;if(y!==null){var D=y.dehydrated;if(uo(t),f)if(t.flags&256)t.flags&=-257,t=Gf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(dt||ir(e,t,i,!1),f=(i&e.childLanes)!==0,dt||f){if(r=Je,r!==null&&(D=Bc(r,i),D!==0&&D!==y.retryLane))throw y.retryLane=D,xi(e,D),Pt(r,e,D),Lo;Ml(),t=Gf(e,t,i)}else e=y.treeContext,nt=on(D.nextSibling),wt=t,Ue=!0,$n=null,ln=!1,e!==null&&Rh(t,e),t=bl(t,r),t.flags|=4096;return t}return e=Dn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Cl(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 Mo(e,t,i,r,f){return Ti(t),i=ho(e,t,i,r,void 0,f),r=fo(),e!==null&&!dt?(po(e,t,f),zn(e,t,f)):(Ue&&r&&Ya(t),t.flags|=1,Et(e,t,i,f),t.child)}function Yf(e,t,i,r,f,y){return Ti(t),t.updateQueue=null,i=Kh(t,r,i,f),Wh(e),r=fo(),e!==null&&!dt?(po(e,t,y),zn(e,t,y)):(Ue&&r&&Ya(t),t.flags|=1,Et(e,t,i,y),t.child)}function Wf(e,t,i,r,f){if(Ti(t),t.stateNode===null){var y=Ji,D=i.contextType;typeof D=="object"&&D!==null&&(y=xt(D)),y=new i(r,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Do,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=r,y.state=t.memoizedState,y.refs={},io(t),D=i.contextType,y.context=typeof D=="object"&&D!==null?xt(D):Ji,y.state=t.memoizedState,D=i.getDerivedStateFromProps,typeof D=="function"&&(To(t,i,D,r),y.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(D=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),D!==y.state&&Do.enqueueReplaceState(y,y.state,null),Jr(t,r,y,f),Zr(),y.state=t.memoizedState),typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){y=t.stateNode;var j=t.memoizedProps,W=Bi(i,j);y.props=W;var ie=y.context,ce=i.contextType;D=Ji,typeof ce=="object"&&ce!==null&&(D=xt(ce));var fe=i.getDerivedStateFromProps;ce=typeof fe=="function"||typeof y.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,ce||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(j||ie!==D)&&Of(t,y,r,D),Jn=!1;var re=t.memoizedState;y.state=re,Jr(t,r,y,f),Zr(),ie=t.memoizedState,j||re!==ie||Jn?(typeof fe=="function"&&(To(t,i,fe,r),ie=t.memoizedState),(W=Jn||Mf(t,i,W,r,re,ie,D))?(ce||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=ie),y.props=r,y.state=ie,y.context=D,r=W):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,ro(e,t),D=t.memoizedProps,ce=Bi(i,D),y.props=ce,fe=t.pendingProps,re=y.context,ie=i.contextType,W=Ji,typeof ie=="object"&&ie!==null&&(W=xt(ie)),j=i.getDerivedStateFromProps,(ie=typeof j=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D!==fe||re!==W)&&Of(t,y,r,W),Jn=!1,re=t.memoizedState,y.state=re,Jr(t,r,y,f),Zr();var le=t.memoizedState;D!==fe||re!==le||Jn||e!==null&&e.dependencies!==null&&il(e.dependencies)?(typeof j=="function"&&(To(t,i,j,r),le=t.memoizedState),(ce=Jn||Mf(t,i,ce,r,re,le,W)||e!==null&&e.dependencies!==null&&il(e.dependencies))?(ie||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(r,le,W),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(r,le,W)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=le),y.props=r,y.state=le,y.context=W,r=ce):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),r=!1)}return y=r,Cl(e,t),r=(t.flags&128)!==0,y||r?(y=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:y.render(),t.flags|=1,e!==null&&r?(t.child=Mi(t,e.child,null,f),t.child=Mi(t,null,i,f)):Et(e,t,i,f),t.memoizedState=y.state,e=t.child):e=zn(e,t,f),e}function Kf(e,t,i,r){return ki(),t.flags|=256,Et(e,t,i,r),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bo(e){return{baseLanes:e,cachePool:Hh()}}function zo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Xt),e}function Xf(e,t,i){var r=t.pendingProps,f=!1,y=(t.flags&128)!==0,D;if((D=y)||(D=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),D&&(f=!0,t.flags&=-129),D=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(f?ni(t):ii(),(e=nt)?(e=ip(e,ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Ah(e),i.return=t,t.child=i,wt=t,nt=null)):e=null,e===null)throw Qn(t);return gu(e)?t.lanes=32:t.lanes=536870912,null}var j=r.children;return r=r.fallback,f?(ii(),f=t.mode,j=wl({mode:"hidden",children:j},f),r=Ei(r,f,i,null),j.return=t,r.return=t,j.sibling=r,t.child=j,r=t.child,r.memoizedState=Bo(i),r.childLanes=zo(e,D,i),t.memoizedState=Oo,rs(null,r)):(ni(t),Ho(t,j))}var W=e.memoizedState;if(W!==null&&(j=W.dehydrated,j!==null)){if(y)t.flags&256?(ni(t),t.flags&=-257,t=No(e,t,i)):t.memoizedState!==null?(ii(),t.child=e.child,t.flags|=128,t=null):(ii(),j=r.fallback,f=t.mode,r=wl({mode:"visible",children:r.children},f),j=Ei(j,f,i,null),j.flags|=2,r.return=t,j.return=t,r.sibling=j,t.child=r,Mi(t,e.child,null,i),r=t.child,r.memoizedState=Bo(i),r.childLanes=zo(e,D,i),t.memoizedState=Oo,t=rs(null,r));else if(ni(t),gu(j)){if(D=j.nextSibling&&j.nextSibling.dataset,D)var ie=D.dgst;D=ie,r=Error(o(419)),r.stack="",r.digest=D,Yr({value:r,source:null,stack:null}),t=No(e,t,i)}else if(dt||ir(e,t,i,!1),D=(i&e.childLanes)!==0,dt||D){if(D=Je,D!==null&&(r=Bc(D,i),r!==0&&r!==W.retryLane))throw W.retryLane=r,xi(e,r),Pt(D,e,r),Lo;mu(j)||Ml(),t=No(e,t,i)}else mu(j)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,nt=on(j.nextSibling),wt=t,Ue=!0,$n=null,ln=!1,e!==null&&Rh(t,e),t=Ho(t,r.children),t.flags|=4096);return t}return f?(ii(),j=r.fallback,f=t.mode,W=e.child,ie=W.sibling,r=Dn(W,{mode:"hidden",children:r.children}),r.subtreeFlags=W.subtreeFlags&65011712,ie!==null?j=Dn(ie,j):(j=Ei(j,f,i,null),j.flags|=2),j.return=t,r.return=t,r.sibling=j,t.child=r,rs(null,r),r=t.child,j=e.child.memoizedState,j===null?j=Bo(i):(f=j.cachePool,f!==null?(W=ht._currentValue,f=f.parent!==W?{parent:W,pool:W}:f):f=Hh(),j={baseLanes:j.baseLanes|i,cachePool:f}),r.memoizedState=j,r.childLanes=zo(e,D,i),t.memoizedState=Oo,rs(e.child,r)):(ni(t),i=e.child,e=i.sibling,i=Dn(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(D=t.deletions,D===null?(t.deletions=[e],t.flags|=16):D.push(e)),t.child=i,t.memoizedState=null,i)}function Ho(e,t){return t=wl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wl(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function No(e,t,i){return Mi(t,e.child,null,i),e=Ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $f(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qa(e.return,t,i)}function jo(e,t,i,r,f,y){var D=e.memoizedState;D===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:f,treeForkCount:y}:(D.isBackwards=t,D.rendering=null,D.renderingStartTime=0,D.last=r,D.tail=i,D.tailMode=f,D.treeForkCount=y)}function Qf(e,t,i){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var D=ut.current,j=(D&2)!==0;if(j?(D=D&1|2,t.flags|=128):D&=1,H(ut,D),Et(e,t,r,i),r=Ue?Gr:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$f(e,i,t);else if(e.tag===19)$f(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(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&hl(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),jo(t,!1,f,i,y,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&hl(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}jo(t,!0,i,null,y,r);break;case"together":jo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function zn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),li|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ir(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=Dn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Dn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&il(e)))}function iv(e,t,i){switch(t.tag){case 3:I(t,t.stateNode.containerInfo),Zn(t,ht,e.memoizedState.cache),ki();break;case 27:case 5:Z(t);break;case 4:I(t,t.stateNode.containerInfo);break;case 10:Zn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ni(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Xf(e,t,i):(ni(t),e=zn(e,t,i),e!==null?e.sibling:null);ni(t);break;case 19:var f=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(ir(e,t,i,!1),r=(i&t.childLanes)!==0),f){if(r)return Qf(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),H(ut,ut.current),r)break;return null;case 22:return t.lanes=0,qf(e,t,i,t.pendingProps);case 24:Zn(t,ht,e.memoizedState.cache)}return zn(e,t,i)}function Zf(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Uo(e,i)&&(t.flags&128)===0)return dt=!1,iv(e,t,i);dt=(e.flags&131072)!==0}else dt=!1,Ue&&(t.flags&1048576)!==0&&Dh(t,Gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ri(t.elementType),t.type=e,typeof e=="function")qa(e)?(r=Bi(e,r),t.tag=1,t=Wf(null,t,e,r,i)):(t.tag=0,t=Mo(null,t,e,r,i));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=If(null,t,e,r,i);break e}else if(f===L){t.tag=14,t=Pf(null,t,e,r,i);break e}}throw t=Y(e)||e,Error(o(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,f=Bi(r,t.pendingProps),Wf(e,t,r,f,i);case 3:e:{if(I(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var y=t.memoizedState;f=y.element,ro(e,t),Jr(t,r,null,i);var D=t.memoizedState;if(r=D.cache,Zn(t,ht,r),r!==y.cache&&Za(t,[ht],i,!0),Zr(),r=D.element,y.isDehydrated)if(y={element:r,isDehydrated:!1,cache:D.cache},t.updateQueue.baseState=y,t.memoizedState=y,t.flags&256){t=Kf(e,t,r,i);break e}else if(r!==f){f=nn(Error(o(424)),t),Yr(f),t=Kf(e,t,r,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(nt=on(e.firstChild),wt=t,Ue=!0,$n=null,ln=!0,i=Fh(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ki(),r===f){t=zn(e,t,i);break e}Et(e,t,r,i)}t=t.child}return t;case 26:return Cl(e,t),e===null?(i=up(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ue||(i=t.type,e=t.pendingProps,r=Ul(pe.current).createElement(i),r[Ct]=t,r[zt]=e,kt(r,i,e),St(r),t.stateNode=r):t.memoizedState=up(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),e===null&&Ue&&(r=t.stateNode=lp(t.type,t.pendingProps,pe.current),wt=t,ln=!0,f=nt,hi(t.type)?(vu=f,nt=on(r.firstChild)):nt=f),Et(e,t,t.pendingProps.children,i),Cl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((f=r=nt)&&(r=Ov(r,t.type,t.pendingProps,ln),r!==null?(t.stateNode=r,wt=t,nt=on(r.firstChild),ln=!1,f=!0):f=!1),f||Qn(t)),Z(t),f=t.type,y=t.pendingProps,D=e!==null?e.memoizedProps:null,r=y.children,du(f,y)?r=null:D!==null&&du(f,D)&&(t.flags|=32),t.memoizedState!==null&&(f=ho(e,t,Kg,null,null,i),Ss._currentValue=f),Cl(e,t),Et(e,t,r,i),t.child;case 6:return e===null&&Ue&&((e=i=nt)&&(i=Bv(i,t.pendingProps,ln),i!==null?(t.stateNode=i,wt=t,nt=null,e=!0):e=!1),e||Qn(t)),null;case 13:return Xf(e,t,i);case 4:return I(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mi(t,null,r,i):Et(e,t,r,i),t.child;case 11:return If(e,t,t.type,t.pendingProps,i);case 7:return Et(e,t,t.pendingProps,i),t.child;case 8:return Et(e,t,t.pendingProps.children,i),t.child;case 12:return Et(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Zn(t,t.type,r.value),Et(e,t,r.children,i),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Ti(t),f=xt(f),r=r(f),t.flags|=1,Et(e,t,r,i),t.child;case 14:return Pf(e,t,t.type,t.pendingProps,i);case 15:return Ff(e,t,t.type,t.pendingProps,i);case 19:return Qf(e,t,i);case 31:return nv(e,t,i);case 22:return qf(e,t,i,t.pendingProps);case 24:return Ti(t),r=xt(ht),e===null?(f=to(),f===null&&(f=Je,y=Ja(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=i),f=y),t.memoizedState={parent:r,cache:f},io(t),Zn(t,ht,f)):((e.lanes&i)!==0&&(ro(e,t),Jr(t,null,null,i),Zr()),f=e.memoizedState,y=t.memoizedState,f.parent!==r?(f={parent:r,cache:r},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Zn(t,ht,r)):(r=y.cache,Zn(t,ht,r),r!==f.cache&&Za(t,[ht],i,!0))),Et(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Hn(e){e.flags|=4}function Io(e,t,i,r,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Ed())e.flags|=8192;else throw Li=al,no}else e.flags&=-16777217}function Jf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pp(t))if(Ed())e.flags|=8192;else throw Li=al,no}function xl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Lc():536870912,e.lanes|=t,_r|=t)}function ss(e,t){if(!Ue)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 r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function rv(e,t,i){var r=t.pendingProps;switch(Wa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Mn(ht),ae(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(nr(t)?Hn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),it(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(Hn(t),y!==null?(it(t),Jf(t,y)):(it(t),Io(t,f,null,r,i))):y?y!==e.memoizedState?(Hn(t),it(t),Jf(t,y)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Hn(t),it(t),Io(t,f,e,r,i)),null;case 27:if(ee(t),i=pe.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return it(t),null}e=ne.current,nr(t)?Lh(t):(e=lp(f,r,i),t.stateNode=e,Hn(t))}return it(t),null;case 5:if(ee(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return it(t),null}if(y=ne.current,nr(t))Lh(t);else{var D=Ul(pe.current);switch(y){case 1:y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":y=D.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof r.is=="string"?D.createElement("select",{is:r.is}):D.createElement("select"),r.multiple?y.multiple=!0:r.size&&(y.size=r.size);break;default:y=typeof r.is=="string"?D.createElement(f,{is:r.is}):D.createElement(f)}}y[Ct]=t,y[zt]=r;e:for(D=t.child;D!==null;){if(D.tag===5||D.tag===6)y.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===t)break e;for(;D.sibling===null;){if(D.return===null||D.return===t)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}t.stateNode=y;e:switch(kt(y,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Hn(t)}}return it(t),Io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=pe.current,nr(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,f=wt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||Xd(e.nodeValue,i)),e||Qn(t,!0)}else e=Ul(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return it(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=nr(t),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return it(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=nr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),f=!1}else f=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),y=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(y=r.memoizedState.cachePool.pool),y!==f&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),xl(t,t.updateQueue),it(t),null);case 4:return ae(),e===null&&ou(t.stateNode.containerInfo),it(t),null;case 10:return Mn(t.type),it(t),null;case 19:if(P(ut),r=t.memoizedState,r===null)return it(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)ss(r,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=hl(e),y!==null){for(t.flags|=128,ss(r,!1),e=y.updateQueue,t.updateQueue=e,xl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)kh(i,e),i=i.sibling;return H(ut,ut.current&1|2),Ue&&Rn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ot()>Dl&&(t.flags|=128,f=!0,ss(r,!1),t.lanes=4194304)}else{if(!f)if(e=hl(y),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,xl(t,e),ss(r,!0),r.tail===null&&r.tailMode==="hidden"&&!y.alternate&&!Ue)return it(t),null}else 2*ot()-r.renderingStartTime>Dl&&i!==536870912&&(t.flags|=128,f=!0,ss(r,!1),t.lanes=4194304);r.isBackwards?(y.sibling=t.child,t.child=y):(e=r.last,e!==null?e.sibling=y:t.child=y,r.last=y)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ot(),e.sibling=null,i=ut.current,H(ut,f?i&1|2:i&1),Ue&&Rn(t,r.treeForkCount),e):(it(t),null);case 22:case 23:return Wt(t),oo(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(i&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),i=t.updateQueue,i!==null&&xl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&P(Di),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Mn(ht),it(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function sv(e,t){switch(Wa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mn(ht),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ee(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(ut),null;case 4:return ae(),null;case 10:return Mn(t.type),null;case 22:case 23:return Wt(t),oo(),e!==null&&P(Di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mn(ht),null;case 25:return null;default:return null}}function ed(e,t){switch(Wa(t),t.tag){case 3:Mn(ht),ae();break;case 26:case 27:case 5:ee(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:P(ut);break;case 10:Mn(t.type);break;case 22:case 23:Wt(t),oo(),e!==null&&P(Di);break;case 24:Mn(ht)}}function ls(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var f=r.next;i=f;do{if((i.tag&e)===e){r=void 0;var y=i.create,D=i.inst;r=y(),D.destroy=r}i=i.next}while(i!==f)}}catch(j){Ke(t,t.return,j)}}function ri(e,t,i){try{var r=t.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var y=f.next;r=y;do{if((r.tag&e)===e){var D=r.inst,j=D.destroy;if(j!==void 0){D.destroy=void 0,f=t;var W=i,ie=j;try{ie()}catch(ce){Ke(f,W,ce)}}}r=r.next}while(r!==y)}}catch(ce){Ke(t,t.return,ce)}}function td(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Vh(t,i)}catch(r){Ke(e,e.return,r)}}}function nd(e,t,i){i.props=Bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Ke(e,t,r)}}function as(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(f){Ke(e,t,f)}}function bn(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(f){Ke(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ke(e,t,f)}else i.current=null}function id(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(f){Ke(e,e.return,f)}}function Po(e,t,i){try{var r=e.stateNode;Av(r,e.type,i,t),r[zt]=t}catch(f){Ke(e,e.return,f)}}function rd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hi(e.type)||e.tag===4}function Fo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rd(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&&hi(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 qo(e,t,i){var r=e.tag;if(r===5||r===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=An));else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,i),e=e.sibling;e!==null;)qo(e,t,i),e=e.sibling}function El(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(El(e,t,i),e=e.sibling;e!==null;)El(e,t,i),e=e.sibling}function sd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);kt(t,r,i),t[Ct]=e,t[zt]=i}catch(y){Ke(e,e.return,y)}}var Nn=!1,pt=!1,Vo=!1,ld=typeof WeakSet=="function"?WeakSet:Set,yt=null;function lv(e,t){if(e=e.containerInfo,hu=Yl,e=gh(e),Ha(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var f=r.anchorOffset,y=r.focusNode;r=r.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var D=0,j=-1,W=-1,ie=0,ce=0,fe=e,re=null;t:for(;;){for(var le;fe!==i||f!==0&&fe.nodeType!==3||(j=D+f),fe!==y||r!==0&&fe.nodeType!==3||(W=D+r),fe.nodeType===3&&(D+=fe.nodeValue.length),(le=fe.firstChild)!==null;)re=fe,fe=le;for(;;){if(fe===e)break t;if(re===i&&++ie===f&&(j=D),re===y&&++ce===r&&(W=D),(le=fe.nextSibling)!==null)break;fe=re,re=fe.parentNode}fe=le}i=j===-1||W===-1?null:{start:j,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(fu={focusedElem:e,selectionRange:i},Yl=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,y=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++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,i=t,f=y.memoizedProps,y=y.memoizedState,r=i.stateNode;try{var ve=Bi(i.type,f);e=r.getSnapshotBeforeUpdate(ve,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ke(i,i.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)_u(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_u(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,yt=e;break}yt=t.return}}function ad(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Un(e,i),r&4&&ls(5,i);break;case 1:if(Un(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(D){Ke(i,i.return,D)}else{var f=Bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){Ke(i,i.return,D)}}r&64&&td(i),r&512&&as(i,i.return);break;case 3:if(Un(e,i),r&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{Vh(e,t)}catch(D){Ke(i,i.return,D)}}break;case 27:t===null&&r&4&&sd(i);case 26:case 5:Un(e,i),t===null&&r&4&&id(i),r&512&&as(i,i.return);break;case 12:Un(e,i);break;case 31:Un(e,i),r&4&&cd(e,i);break;case 13:Un(e,i),r&4&&hd(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=_v.bind(null,i),zv(e,i))));break;case 22:if(r=i.memoizedState!==null||Nn,!r){t=t!==null&&t.memoizedState!==null||pt,f=Nn;var y=pt;Nn=r,(pt=t)&&!y?In(e,i,(i.subtreeFlags&8772)!==0):Un(e,i),Nn=f,pt=y}break;case 30:break;default:Un(e,i)}}function od(e){var t=e.alternate;t!==null&&(e.alternate=null,od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sa(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 rt=null,Nt=!1;function jn(e,t,i){for(i=i.child;i!==null;)ud(e,t,i),i=i.sibling}function ud(e,t,i){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(bt,i)}catch{}switch(i.tag){case 26:pt||bn(i,t),jn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:pt||bn(i,t);var r=rt,f=Nt;hi(i.type)&&(rt=i.stateNode,Nt=!1),jn(e,t,i),ms(i.stateNode),rt=r,Nt=f;break;case 5:pt||bn(i,t);case 6:if(r=rt,f=Nt,rt=null,jn(e,t,i),rt=r,Nt=f,rt!==null)if(Nt)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(i.stateNode)}catch(y){Ke(i,t,y)}else try{rt.removeChild(i.stateNode)}catch(y){Ke(i,t,y)}break;case 18:rt!==null&&(Nt?(e=rt,tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wr(e)):tp(rt,i.stateNode));break;case 4:r=rt,f=Nt,rt=i.stateNode.containerInfo,Nt=!0,jn(e,t,i),rt=r,Nt=f;break;case 0:case 11:case 14:case 15:ri(2,i,t),pt||ri(4,i,t),jn(e,t,i);break;case 1:pt||(bn(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&nd(i,t,r)),jn(e,t,i);break;case 21:jn(e,t,i);break;case 22:pt=(r=pt)||i.memoizedState!==null,jn(e,t,i),pt=r;break;default:jn(e,t,i)}}function cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wr(e)}catch(i){Ke(t,t.return,i)}}}function hd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wr(e)}catch(i){Ke(t,t.return,i)}}function av(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ld),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ld),t;default:throw Error(o(435,e.tag))}}function kl(e,t){var i=av(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var f=mv.bind(null,e,r);r.then(f,f)}})}function jt(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var f=i[r],y=e,D=t,j=D;e:for(;j!==null;){switch(j.tag){case 27:if(hi(j.type)){rt=j.stateNode,Nt=!1;break e}break;case 5:rt=j.stateNode,Nt=!1;break e;case 3:case 4:rt=j.stateNode.containerInfo,Nt=!0;break e}j=j.return}if(rt===null)throw Error(o(160));ud(y,D,f),rt=null,Nt=!1,y=f.alternate,y!==null&&(y.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fd(t,e),t=t.sibling}var dn=null;function fd(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Ut(e),r&4&&(ri(3,e,e.return),ls(3,e),ri(5,e,e.return));break;case 1:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&64&&Nn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var f=dn;if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&4){var y=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":y=f.getElementsByTagName("title")[0],(!y||y[Br]||y[Ct]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=f.createElement(r),f.head.insertBefore(y,f.querySelector("head > title"))),kt(y,r,i),y[Ct]=e,St(y),r=y;break e;case"link":var D=fp("link","href",f).get(r+(i.href||""));if(D){for(var j=0;j<D.length;j++)if(y=D[j],y.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&y.getAttribute("rel")===(i.rel==null?null:i.rel)&&y.getAttribute("title")===(i.title==null?null:i.title)&&y.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;case"meta":if(D=fp("meta","content",f).get(r+(i.content||""))){for(j=0;j<D.length;j++)if(y=D[j],y.getAttribute("content")===(i.content==null?null:""+i.content)&&y.getAttribute("name")===(i.name==null?null:i.name)&&y.getAttribute("property")===(i.property==null?null:i.property)&&y.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&y.getAttribute("charset")===(i.charSet==null?null:i.charSet)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;default:throw Error(o(468,r))}y[Ct]=e,St(y),r=y}e.stateNode=r}else dp(f,e.type,e.stateNode);else e.stateNode=hp(f,r,e.memoizedProps);else y!==r?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,r===null?dp(f,e.type,e.stateNode):hp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Po(e,e.memoizedProps,i.memoizedProps)}break;case 27:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),i!==null&&r&4&&Po(e,e.memoizedProps,i.memoizedProps);break;case 5:if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),e.flags&32){f=e.stateNode;try{Yi(f,"")}catch(ve){Ke(e,e.return,ve)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Po(e,f,i!==null?i.memoizedProps:f)),r&1024&&(Vo=!0);break;case 6:if(jt(t,e),Ut(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(ve){Ke(e,e.return,ve)}}break;case 3:if(Fl=null,f=dn,dn=Il(t.containerInfo),jt(t,e),dn=f,Ut(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{wr(t.containerInfo)}catch(ve){Ke(e,e.return,ve)}Vo&&(Vo=!1,dd(e));break;case 4:r=dn,dn=Il(e.stateNode.containerInfo),jt(t,e),Ut(e),dn=r;break;case 12:jt(t,e),Ut(e);break;case 31:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kl(e,r)));break;case 13:jt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Tl=ot()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kl(e,r)));break;case 22:f=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,ie=Nn,ce=pt;if(Nn=ie||f,pt=ce||W,jt(t,e),pt=ce,Nn=ie,Ut(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||W||Nn||pt||zi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(y=W.stateNode,f)D=y.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{j=W.stateNode;var fe=W.memoizedProps.style,re=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;j.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(ve){Ke(W,W.return,ve)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=f?"":W.memoizedProps}catch(ve){Ke(W,W.return,ve)}}}else if(t.tag===18){if(i===null){W=t;try{var le=W.stateNode;f?np(le,!0):np(W.stateNode,!1)}catch(ve){Ke(W,W.return,ve)}}}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}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,kl(e,i))));break;case 19:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kl(e,r)));break;case 30:break;case 21:break;default:jt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(rd(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var f=i.stateNode,y=Fo(e);El(e,y,f);break;case 5:var D=i.stateNode;i.flags&32&&(Yi(D,""),i.flags&=-33);var j=Fo(e);El(e,j,D);break;case 3:case 4:var W=i.stateNode.containerInfo,ie=Fo(e);qo(e,ie,W);break;default:throw Error(o(161))}}catch(ce){Ke(e,e.return,ce)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;dd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ad(e,t.alternate,t),t=t.sibling}function zi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ri(4,t,t.return),zi(t);break;case 1:bn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nd(t,t.return,i),zi(t);break;case 27:ms(t.stateNode);case 26:case 5:bn(t,t.return),zi(t);break;case 22:t.memoizedState===null&&zi(t);break;case 30:zi(t);break;default:zi(t)}e=e.sibling}}function In(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,f=e,y=t,D=y.flags;switch(y.tag){case 0:case 11:case 15:In(f,y,i),ls(4,y);break;case 1:if(In(f,y,i),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ie){Ke(r,r.return,ie)}if(r=y,f=r.updateQueue,f!==null){var j=r.stateNode;try{var W=f.shared.hiddenCallbacks;if(W!==null)for(f.shared.hiddenCallbacks=null,f=0;f<W.length;f++)qh(W[f],j)}catch(ie){Ke(r,r.return,ie)}}i&&D&64&&td(y),as(y,y.return);break;case 27:sd(y);case 26:case 5:In(f,y,i),i&&r===null&&D&4&&id(y),as(y,y.return);break;case 12:In(f,y,i);break;case 31:In(f,y,i),i&&D&4&&cd(f,y);break;case 13:In(f,y,i),i&&D&4&&hd(f,y);break;case 22:y.memoizedState===null&&In(f,y,i),as(y,y.return);break;case 30:break;default:In(f,y,i)}t=t.sibling}}function Go(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&&Wr(i))}function Yo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e))}function pn(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pd(e,t,i,r),t=t.sibling}function pd(e,t,i,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:pn(e,t,i,r),f&2048&&ls(9,t);break;case 1:pn(e,t,i,r);break;case 3:pn(e,t,i,r),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e)));break;case 12:if(f&2048){pn(e,t,i,r),e=t.stateNode;try{var y=t.memoizedProps,D=y.id,j=y.onPostCommit;typeof j=="function"&&j(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Ke(t,t.return,W)}}else pn(e,t,i,r);break;case 31:pn(e,t,i,r);break;case 13:pn(e,t,i,r);break;case 23:break;case 22:y=t.stateNode,D=t.alternate,t.memoizedState!==null?y._visibility&2?pn(e,t,i,r):os(e,t):y._visibility&2?pn(e,t,i,r):(y._visibility|=2,fr(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Go(D,t);break;case 24:pn(e,t,i,r),f&2048&&Yo(t.alternate,t);break;default:pn(e,t,i,r)}}function fr(e,t,i,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,D=t,j=i,W=r,ie=D.flags;switch(D.tag){case 0:case 11:case 15:fr(y,D,j,W,f),ls(8,D);break;case 23:break;case 22:var ce=D.stateNode;D.memoizedState!==null?ce._visibility&2?fr(y,D,j,W,f):os(y,D):(ce._visibility|=2,fr(y,D,j,W,f)),f&&ie&2048&&Go(D.alternate,D);break;case 24:fr(y,D,j,W,f),f&&ie&2048&&Yo(D.alternate,D);break;default:fr(y,D,j,W,f)}t=t.sibling}}function os(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,f=r.flags;switch(r.tag){case 22:os(i,r),f&2048&&Go(r.alternate,r);break;case 24:os(i,r),f&2048&&Yo(r.alternate,r);break;default:os(i,r)}t=t.sibling}}var us=8192;function dr(e,t,i){if(e.subtreeFlags&us)for(e=e.child;e!==null;)_d(e,t,i),e=e.sibling}function _d(e,t,i){switch(e.tag){case 26:dr(e,t,i),e.flags&us&&e.memoizedState!==null&&Wv(i,dn,e.memoizedState,e.memoizedProps);break;case 5:dr(e,t,i);break;case 3:case 4:var r=dn;dn=Il(e.stateNode.containerInfo),dr(e,t,i),dn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=us,us=16777216,dr(e,t,i),us=r):dr(e,t,i));break;default:dr(e,t,i)}}function md(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 cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];yt=r,vd(r,e)}md(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gd(e),e=e.sibling}function gd(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&ri(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):cs(e);break;default:cs(e)}}function Al(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];yt=r,vd(r,e)}md(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ri(8,t,t.return),Al(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function vd(e,t){for(;yt!==null;){var i=yt;switch(i.tag){case 0:case 11:case 15:ri(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Wr(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,yt=r;else e:for(i=e;yt!==null;){r=yt;var f=r.sibling,y=r.return;if(od(r),r===i){yt=null;break e}if(f!==null){f.return=y,yt=f;break e}yt=y}}}var ov={getCacheForType:function(e){var t=xt(ht),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return xt(ht).controller.signal}},uv=typeof WeakMap=="function"?WeakMap:Map,Ge=0,Je=null,Be=null,Ne=0,We=0,Kt=null,si=!1,pr=!1,Wo=!1,Pn=0,lt=0,li=0,Hi=0,Ko=0,Xt=0,_r=0,hs=null,It=null,Xo=!1,Tl=0,Sd=0,Dl=1/0,Rl=null,ai=null,vt=0,oi=null,mr=null,Fn=0,$o=0,Qo=null,yd=null,fs=0,Zo=null;function $t(){return(Ge&2)!==0&&Ne!==0?Ne&-Ne:G.T!==null?ru():zc()}function bd(){if(Xt===0)if((Ne&536870912)===0||Ue){var e=js;js<<=1,(js&3932160)===0&&(js=262144),Xt=e}else Xt=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Xt}function Pt(e,t,i){(e===Je&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(gr(e,0),ui(e,Ne,Xt,!1)),Or(e,i),((Ge&2)===0||e!==Je)&&(e===Je&&((Ge&2)===0&&(Hi|=i),lt===4&&ui(e,Ne,Xt,!1)),Cn(e))}function Cd(e,t,i){if((Ge&6)!==0)throw Error(o(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Mr(e,t),f=r?fv(e,t):eu(e,t,!0),y=r;do{if(f===0){pr&&!r&&ui(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!cv(i)){f=eu(e,t,!1),y=!1;continue}if(f===2){if(y=t,e.errorRecoveryDisabledLanes&y)var D=0;else D=e.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){t=D;e:{var j=e;f=hs;var W=j.current.memoizedState.isDehydrated;if(W&&(gr(j,D).flags|=256),D=eu(j,D,!1),D!==2){if(Wo&&!W){j.errorRecoveryDisabledLanes|=y,Hi|=y,f=4;break e}y=It,It=f,y!==null&&(It===null?It=y:It.push.apply(It,y))}f=D}if(y=!1,f!==2)continue}}if(f===1){gr(e,0),ui(e,t,0,!0);break}e:{switch(r=e,y=f,y){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ui(r,t,Xt,!si);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(f=Tl+300-ot(),10<f)){if(ui(r,t,Xt,!si),Is(r,0,!0)!==0)break e;Fn=t,r.timeoutHandle=Jd(wd.bind(null,r,i,It,Rl,Xo,t,Xt,Hi,_r,si,y,"Throttled",-0,0),f);break e}wd(r,i,It,Rl,Xo,t,Xt,Hi,_r,si,y,null,-0,0)}}break}while(!0);Cn(e)}function wd(e,t,i,r,f,y,D,j,W,ie,ce,fe,re,le){if(e.timeoutHandle=-1,fe=t.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},_d(t,y,fe);var ve=(y&62914560)===y?Tl-ot():(y&4194048)===y?Sd-ot():0;if(ve=Kv(fe,ve),ve!==null){Fn=y,e.cancelPendingCommit=ve(Ld.bind(null,e,t,y,i,r,f,D,j,W,ce,fe,null,re,le)),ui(e,y,D,!ie);return}}Ld(e,t,y,i,r,f,D,j,W)}function cv(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 r=0;r<i.length;r++){var f=i[r],y=f.getSnapshot;f=f.value;try{if(!Vt(y(),f))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 ui(e,t,i,r){t&=~Ko,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-Ze(f),D=1<<y;r[y]=-1,f&=~D}i!==0&&Mc(e,i,t)}function Ll(){return(Ge&6)===0?(ds(0),!1):!0}function Jo(){if(Be!==null){if(We===0)var e=Be.return;else e=Be,Ln=Ai=null,_o(e),ar=null,Xr=0,e=Be;for(;e!==null;)ed(e.alternate,e),e=e.return;Be=null}}function gr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Rv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Fn=0,Jo(),Je=e,Be=i=Dn(e.current,null),Ne=t,We=0,Kt=null,si=!1,pr=Mr(e,t),Wo=!1,_r=Xt=Ko=Hi=li=lt=0,It=hs=null,Xo=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var f=31-Ze(r),y=1<<f;t|=e[f],r&=~y}return Pn=t,Zs(),i}function xd(e,t){De=null,G.H=is,t===lr||t===ll?(t=Uh(),We=3):t===no?(t=Uh(),We=4):We=t===Lo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,Be===null&&(lt=1,yl(e,nn(t,e.current)))}function Ed(){var e=Yt.current;return e===null?!0:(Ne&4194048)===Ne?an===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===an:!1}function kd(){var e=G.H;return G.H=is,e===null?is:e}function Ad(){var e=G.A;return G.A=ov,e}function Ml(){lt=4,si||(Ne&4194048)!==Ne&&Yt.current!==null||(pr=!0),(li&134217727)===0&&(Hi&134217727)===0||Je===null||ui(Je,Ne,Xt,!1)}function eu(e,t,i){var r=Ge;Ge|=2;var f=kd(),y=Ad();(Je!==e||Ne!==t)&&(Rl=null,gr(e,t)),t=!1;var D=lt;e:do try{if(We!==0&&Be!==null){var j=Be,W=Kt;switch(We){case 8:Jo(),D=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var ie=We;if(We=0,Kt=null,vr(e,j,W,ie),i&&pr){D=0;break e}break;default:ie=We,We=0,Kt=null,vr(e,j,W,ie)}}hv(),D=lt;break}catch(ce){xd(e,ce)}while(!0);return t&&e.shellSuspendCounter++,Ln=Ai=null,Ge=r,G.H=f,G.A=y,Be===null&&(Je=null,Ne=0,Zs()),D}function hv(){for(;Be!==null;)Td(Be)}function fv(e,t){var i=Ge;Ge|=2;var r=kd(),f=Ad();Je!==e||Ne!==t?(Rl=null,Dl=ot()+500,gr(e,t)):pr=Mr(e,t);e:do try{if(We!==0&&Be!==null){t=Be;var y=Kt;t:switch(We){case 1:We=0,Kt=null,vr(e,t,y,1);break;case 2:case 9:if(Nh(y)){We=0,Kt=null,Dd(t);break}t=function(){We!==2&&We!==9||Je!==e||(We=7),Cn(e)},y.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Nh(y)?(We=0,Kt=null,Dd(t)):(We=0,Kt=null,vr(e,t,y,7));break;case 5:var D=null;switch(Be.tag){case 26:D=Be.memoizedState;case 5:case 27:var j=Be;if(D?pp(D):j.stateNode.complete){We=0,Kt=null;var W=j.sibling;if(W!==null)Be=W;else{var ie=j.return;ie!==null?(Be=ie,Ol(ie)):Be=null}break t}}We=0,Kt=null,vr(e,t,y,5);break;case 6:We=0,Kt=null,vr(e,t,y,6);break;case 8:Jo(),lt=6;break e;default:throw Error(o(462))}}dv();break}catch(ce){xd(e,ce)}while(!0);return Ln=Ai=null,G.H=r,G.A=f,Ge=i,Be!==null?0:(Je=null,Ne=0,Zs(),lt)}function dv(){for(;Be!==null&&!Gn();)Td(Be)}function Td(e){var t=Zf(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,t===null?Ol(e):Be=t}function Dd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Yf(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Yf(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:_o(t);default:ed(i,t),t=Be=kh(t,Pn),t=Zf(i,t,Pn)}e.memoizedProps=e.pendingProps,t===null?Ol(e):Be=t}function vr(e,t,i,r){Ln=Ai=null,_o(t),ar=null,Xr=0;var f=t.return;try{if(tv(e,f,t,i,Ne)){lt=1,yl(e,nn(i,e.current)),Be=null;return}}catch(y){if(f!==null)throw Be=f,y;lt=1,yl(e,nn(i,e.current)),Be=null;return}t.flags&32768?(Ue||r===1?e=!0:pr||(Ne&536870912)!==0?e=!1:(si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Yt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Rd(t,e)):Ol(t)}function Ol(e){var t=e;do{if((t.flags&32768)!==0){Rd(t,si);return}e=t.return;var i=rv(t.alternate,t,Pn);if(i!==null){Be=i;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);lt===0&&(lt=5)}function Rd(e,t){do{var i=sv(e.alternate,e);if(i!==null){i.flags&=32767,Be=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=i}while(e!==null);lt=6,Be=null}function Ld(e,t,i,r,f,y,D,j,W){e.cancelPendingCommit=null;do Bl();while(vt!==0);if((Ge&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(y=t.lanes|t.childLanes,y|=Pa,Ym(e,i,y,D,j,W),e===Je&&(Be=Je=null,Ne=0),mr=t,oi=e,Fn=i,$o=y,Qo=f,yd=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,gv(be,function(){return Hd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=G.T,G.T=null,f=X.p,X.p=2,D=Ge,Ge|=4;try{lv(e,t,i)}finally{Ge=D,X.p=f,G.T=r}}vt=1,Md(),Od(),Bd()}}function Md(){if(vt===1){vt=0;var e=oi,t=mr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var r=X.p;X.p=2;var f=Ge;Ge|=4;try{fd(t,e);var y=fu,D=gh(e.containerInfo),j=y.focusedElem,W=y.selectionRange;if(D!==j&&j&&j.ownerDocument&&mh(j.ownerDocument.documentElement,j)){if(W!==null&&Ha(j)){var ie=W.start,ce=W.end;if(ce===void 0&&(ce=ie),"selectionStart"in j)j.selectionStart=ie,j.selectionEnd=Math.min(ce,j.value.length);else{var fe=j.ownerDocument||document,re=fe&&fe.defaultView||window;if(re.getSelection){var le=re.getSelection(),ve=j.textContent.length,Ee=Math.min(W.start,ve),Qe=W.end===void 0?Ee:Math.min(W.end,ve);!le.extend&&Ee>Qe&&(D=Qe,Qe=Ee,Ee=D);var J=_h(j,Ee),Q=_h(j,Qe);if(J&&Q&&(le.rangeCount!==1||le.anchorNode!==J.node||le.anchorOffset!==J.offset||le.focusNode!==Q.node||le.focusOffset!==Q.offset)){var te=fe.createRange();te.setStart(J.node,J.offset),le.removeAllRanges(),Ee>Qe?(le.addRange(te),le.extend(Q.node,Q.offset)):(te.setEnd(Q.node,Q.offset),le.addRange(te))}}}}for(fe=[],le=j;le=le.parentNode;)le.nodeType===1&&fe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<fe.length;j++){var he=fe[j];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}Yl=!!hu,fu=hu=null}finally{Ge=f,X.p=r,G.T=i}}e.current=t,vt=2}}function Od(){if(vt===2){vt=0;var e=oi,t=mr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var r=X.p;X.p=2;var f=Ge;Ge|=4;try{ad(e,t.alternate,t)}finally{Ge=f,X.p=r,G.T=i}}vt=3}}function Bd(){if(vt===4||vt===3){vt=0,At();var e=oi,t=mr,i=Fn,r=yd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,mr=oi=null,zd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ai=null),ga(i),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(bt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=G.T,f=X.p,X.p=2,G.T=null;try{for(var y=e.onRecoverableError,D=0;D<r.length;D++){var j=r[D];y(j.value,{componentStack:j.stack})}}finally{G.T=t,X.p=f}}(Fn&3)!==0&&Bl(),Cn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Zo?fs++:(fs=0,Zo=e):fs=0,ds(0)}}function zd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wr(t)))}function Bl(){return Md(),Od(),Bd(),Hd()}function Hd(){if(vt!==5)return!1;var e=oi,t=$o;$o=0;var i=ga(Fn),r=G.T,f=X.p;try{X.p=32>i?32:i,G.T=null,i=Qo,Qo=null;var y=oi,D=Fn;if(vt=0,mr=oi=null,Fn=0,(Ge&6)!==0)throw Error(o(331));var j=Ge;if(Ge|=4,gd(y.current),pd(y,y.current,D,i),Ge=j,ds(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(bt,y)}catch{}return!0}finally{X.p=f,G.T=r,zd(e,t)}}function Nd(e,t,i){t=nn(i,t),t=Ro(e.stateNode,t,2),e=ti(e,t,2),e!==null&&(Or(e,2),Cn(e))}function Ke(e,t,i){if(e.tag===3)Nd(e,e,i);else for(;t!==null;){if(t.tag===3){Nd(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=nn(i,e),i=jf(2),r=ti(t,i,2),r!==null&&(Uf(i,r,t,e),Or(r,2),Cn(r));break}}t=t.return}}function tu(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new uv;var f=new Set;r.set(t,f)}else f=r.get(t),f===void 0&&(f=new Set,r.set(t,f));f.has(i)||(Wo=!0,f.add(i),e=pv.bind(null,e,t,i),t.then(e,e))}function pv(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Je===e&&(Ne&i)===i&&(lt===4||lt===3&&(Ne&62914560)===Ne&&300>ot()-Tl?(Ge&2)===0&&gr(e,0):Ko|=i,_r===Ne&&(_r=0)),Cn(e)}function jd(e,t){t===0&&(t=Lc()),e=xi(e,t),e!==null&&(Or(e,t),Cn(e))}function _v(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),jd(e,i)}function mv(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),jd(e,i)}function gv(e,t){return vn(e,t)}var zl=null,Sr=null,nu=!1,Hl=!1,iu=!1,ci=0;function Cn(e){e!==Sr&&e.next===null&&(Sr===null?zl=Sr=e:Sr=Sr.next=e),Hl=!0,nu||(nu=!0,Sv())}function ds(e,t){if(!iu&&Hl){iu=!0;do for(var i=!1,r=zl;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var y=0;else{var D=r.suspendedLanes,j=r.pingedLanes;y=(1<<31-Ze(42|e)+1)-1,y&=f&~(D&~j),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,Fd(r,y))}else y=Ne,y=Is(r,r===Je?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||Mr(r,y)||(i=!0,Fd(r,y));r=r.next}while(i);iu=!1}}function vv(){Ud()}function Ud(){Hl=nu=!1;var e=0;ci!==0&&Dv()&&(e=ci);for(var t=ot(),i=null,r=zl;r!==null;){var f=r.next,y=Id(r,t);y===0?(r.next=null,i===null?zl=f:i.next=f,f===null&&(Sr=i)):(i=r,(e!==0||(y&3)!==0)&&(Hl=!0)),r=f}vt!==0&&vt!==5||ds(e),ci!==0&&(ci=0)}function Id(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var D=31-Ze(y),j=1<<D,W=f[D];W===-1?((j&i)===0||(j&r)!==0)&&(f[D]=Gm(j,t)):W<=t&&(e.expiredLanes|=j),y&=~j}if(t=Je,i=Ne,i=Is(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&En(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Mr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&En(r),ga(i)){case 2:case 8:i=ge;break;case 32:i=be;break;case 268435456:i=Me;break;default:i=be}return r=Pd.bind(null,e),i=vn(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&En(r),e.callbackPriority=2,e.callbackNode=null,2}function Pd(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Bl()&&e.callbackNode!==i)return null;var r=Ne;return r=Is(e,e===Je?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cd(e,r,t),Id(e,ot()),e.callbackNode!=null&&e.callbackNode===i?Pd.bind(null,e):null)}function Fd(e,t){if(Bl())return null;Cd(e,t,!0)}function Sv(){Lv(function(){(Ge&6)!==0?vn(ue,vv):Ud()})}function ru(){if(ci===0){var e=rr;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),ci=e}return ci}function qd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vs(""+e)}function Vd(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 yv(e,t,i,r,f){if(t==="submit"&&i&&i.stateNode===f){var y=qd((f[zt]||null).action),D=r.submitter;D&&(t=(t=D[zt]||null)?qd(t.formAction):D.getAttribute("formAction"),t!==null&&(y=t,D=null));var j=new Ks("action","action",null,r,f);e.push({event:j,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ci!==0){var W=D?Vd(f,D):new FormData(f);xo(i,{pending:!0,data:W,method:f.method,action:y},null,W)}}else typeof y=="function"&&(j.preventDefault(),W=D?Vd(f,D):new FormData(f),xo(i,{pending:!0,data:W,method:f.method,action:y},y,W))},currentTarget:f}]})}}for(var su=0;su<Ia.length;su++){var lu=Ia[su],bv=lu.toLowerCase(),Cv=lu[0].toUpperCase()+lu.slice(1);fn(bv,"on"+Cv)}fn(yh,"onAnimationEnd"),fn(bh,"onAnimationIteration"),fn(Ch,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(jg,"onTransitionRun"),fn(Ug,"onTransitionStart"),fn(Ig,"onTransitionCancel"),fn(wh,"onTransitionEnd"),Vi("onMouseEnter",["mouseout","mouseover"]),Vi("onMouseLeave",["mouseout","mouseover"]),Vi("onPointerEnter",["pointerout","pointerover"]),Vi("onPointerLeave",["pointerout","pointerover"]),yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yi("onBeforeInput",["compositionend","keypress","textInput","paste"]),yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ps="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(" "),wv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ps));function Gd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],f=r.event;r=r.listeners;e:{var y=void 0;if(t)for(var D=r.length-1;0<=D;D--){var j=r[D],W=j.instance,ie=j.currentTarget;if(j=j.listener,W!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=ie;try{y(f)}catch(ce){Qs(ce)}f.currentTarget=null,y=W}else for(D=0;D<r.length;D++){if(j=r[D],W=j.instance,ie=j.currentTarget,j=j.listener,W!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=ie;try{y(f)}catch(ce){Qs(ce)}f.currentTarget=null,y=W}}}}function ze(e,t){var i=t[va];i===void 0&&(i=t[va]=new Set);var r=e+"__bubble";i.has(r)||(Yd(t,e,2,!1),i.add(r))}function au(e,t,i){var r=0;t&&(r|=4),Yd(i,e,r,t)}var Nl="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[Nl]){e[Nl]=!0,jc.forEach(function(i){i!=="selectionchange"&&(wv.has(i)||au(i,!1,e),au(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nl]||(t[Nl]=!0,au("selectionchange",!1,t))}}function Yd(e,t,i,r){switch(bp(t)){case 2:var f=Qv;break;case 8:f=Zv;break;default:f=wu}i=f.bind(null,t,i,e),f=void 0,!Aa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function uu(e,t,i,r,f){var y=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var D=r.tag;if(D===3||D===4){var j=r.stateNode.containerInfo;if(j===f)break;if(D===4)for(D=r.return;D!==null;){var W=D.tag;if((W===3||W===4)&&D.stateNode.containerInfo===f)return;D=D.return}for(;j!==null;){if(D=Pi(j),D===null)return;if(W=D.tag,W===5||W===6||W===26||W===27){r=y=D;continue e}j=j.parentNode}}r=r.return}$c(function(){var ie=y,ce=Ea(i),fe=[];e:{var re=xh.get(e);if(re!==void 0){var le=Ks,ve=e;switch(e){case"keypress":if(Ys(i)===0)break e;case"keydown":case"keyup":le=mg;break;case"focusin":ve="focus",le=La;break;case"focusout":ve="blur",le=La;break;case"beforeblur":case"afterblur":le=La;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":le=Jc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=rg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=Sg;break;case yh:case bh:case Ch:le=ag;break;case wh:le=bg;break;case"scroll":case"scrollend":le=ng;break;case"wheel":le=wg;break;case"copy":case"cut":case"paste":le=ug;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=th;break;case"toggle":case"beforetoggle":le=Eg}var Ee=(t&4)!==0,Qe=!Ee&&(e==="scroll"||e==="scrollend"),J=Ee?re!==null?re+"Capture":null:re;Ee=[];for(var Q=ie,te;Q!==null;){var he=Q;if(te=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||te===null||J===null||(he=Hr(Q,J),he!=null&&Ee.push(_s(Q,he,te))),Qe)break;Q=Q.return}0<Ee.length&&(re=new le(re,ve,null,i,ce),fe.push({event:re,listeners:Ee}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",re&&i!==xa&&(ve=i.relatedTarget||i.fromElement)&&(Pi(ve)||ve[Ii]))break e;if((le||re)&&(re=ce.window===ce?ce:(re=ce.ownerDocument)?re.defaultView||re.parentWindow:window,le?(ve=i.relatedTarget||i.toElement,le=ie,ve=ve?Pi(ve):null,ve!==null&&(Qe=b(ve),Ee=ve.tag,ve!==Qe||Ee!==5&&Ee!==27&&Ee!==6)&&(ve=null)):(le=null,ve=ie),le!==ve)){if(Ee=Jc,he="onMouseLeave",J="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=th,he="onPointerLeave",J="onPointerEnter",Q="pointer"),Qe=le==null?re:zr(le),te=ve==null?re:zr(ve),re=new Ee(he,Q+"leave",le,i,ce),re.target=Qe,re.relatedTarget=te,he=null,Pi(ce)===ie&&(Ee=new Ee(J,Q+"enter",ve,i,ce),Ee.target=te,Ee.relatedTarget=Qe,he=Ee),Qe=he,le&&ve)t:{for(Ee=xv,J=le,Q=ve,te=0,he=J;he;he=Ee(he))te++;he=0;for(var Ce=Q;Ce;Ce=Ee(Ce))he++;for(;0<te-he;)J=Ee(J),te--;for(;0<he-te;)Q=Ee(Q),he--;for(;te--;){if(J===Q||Q!==null&&J===Q.alternate){Ee=J;break t}J=Ee(J),Q=Ee(Q)}Ee=null}else Ee=null;le!==null&&Wd(fe,re,le,Ee,!1),ve!==null&&Qe!==null&&Wd(fe,Qe,ve,Ee,!0)}}e:{if(re=ie?zr(ie):window,le=re.nodeName&&re.nodeName.toLowerCase(),le==="select"||le==="input"&&re.type==="file")var qe=uh;else if(ah(re))if(ch)qe=zg;else{qe=Og;var ye=Mg}else le=re.nodeName,!le||le.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ie&&wa(ie.elementType)&&(qe=uh):qe=Bg;if(qe&&(qe=qe(e,ie))){oh(fe,qe,i,ce);break e}ye&&ye(e,re,ie),e==="focusout"&&ie&&re.type==="number"&&ie.memoizedProps.value!=null&&Ca(re,"number",re.value)}switch(ye=ie?zr(ie):window,e){case"focusin":(ah(ye)||ye.contentEditable==="true")&&($i=ye,Na=ie,Vr=null);break;case"focusout":Vr=Na=$i=null;break;case"mousedown":ja=!0;break;case"contextmenu":case"mouseup":case"dragend":ja=!1,vh(fe,i,ce);break;case"selectionchange":if(Ng)break;case"keydown":case"keyup":vh(fe,i,ce)}var Re;if(Oa)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Xi?sh(e,i)&&(je="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(je="onCompositionStart");je&&(nh&&i.locale!=="ko"&&(Xi||je!=="onCompositionStart"?je==="onCompositionEnd"&&Xi&&(Re=Qc()):(Kn=ce,Ta="value"in Kn?Kn.value:Kn.textContent,Xi=!0)),ye=jl(ie,je),0<ye.length&&(je=new eh(je,e,null,i,ce),fe.push({event:je,listeners:ye}),Re?je.data=Re:(Re=lh(i),Re!==null&&(je.data=Re)))),(Re=Ag?Tg(e,i):Dg(e,i))&&(je=jl(ie,"onBeforeInput"),0<je.length&&(ye=new eh("onBeforeInput","beforeinput",null,i,ce),fe.push({event:ye,listeners:je}),ye.data=Re)),yv(fe,e,ie,i,ce)}Gd(fe,t)})}function _s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function jl(e,t){for(var i=t+"Capture",r=[];e!==null;){var f=e,y=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||y===null||(f=Hr(e,i),f!=null&&r.unshift(_s(e,f,y)),f=Hr(e,t),f!=null&&r.push(_s(e,f,y))),e.tag===3)return r;e=e.return}return[]}function xv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wd(e,t,i,r,f){for(var y=t._reactName,D=[];i!==null&&i!==r;){var j=i,W=j.alternate,ie=j.stateNode;if(j=j.tag,W!==null&&W===r)break;j!==5&&j!==26&&j!==27||ie===null||(W=ie,f?(ie=Hr(i,y),ie!=null&&D.unshift(_s(i,ie,W))):f||(ie=Hr(i,y),ie!=null&&D.push(_s(i,ie,W)))),i=i.return}D.length!==0&&e.push({event:t,listeners:D})}var Ev=/\r\n?/g,kv=/\u0000|\uFFFD/g;function Kd(e){return(typeof e=="string"?e:""+e).replace(Ev,`
49
- `).replace(kv,"")}function Xd(e,t){return t=Kd(t),Kd(e)===t}function $e(e,t,i,r,f,y){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Yi(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Yi(e,""+r);break;case"className":Fs(e,"class",r);break;case"tabIndex":Fs(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Fs(e,i,r);break;case"style":Kc(e,r,y);break;case"data":if(t!=="object"){Fs(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Vs(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="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 y=="function"&&(i==="formAction"?(t!=="input"&&$e(e,t,"name",f.name,f,null),$e(e,t,"formEncType",f.formEncType,f,null),$e(e,t,"formMethod",f.formMethod,f,null),$e(e,t,"formTarget",f.formTarget,f,null)):($e(e,t,"encType",f.encType,f,null),$e(e,t,"method",f.method,f,null),$e(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Vs(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=An);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Vs(""+r),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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":ze("beforetoggle",e),ze("toggle",e),Ps(e,"popover",r);break;case"xlinkActuate":kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":kn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":kn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":kn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":kn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ps(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=eg.get(i)||i,Ps(e,i,r))}}function cu(e,t,i,r,f,y){switch(i){case"style":Kc(e,r,y);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Yi(e,r):(typeof r=="number"||typeof r=="bigint")&&Yi(e,""+r);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"onClick":r!=null&&(e.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Uc.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),y=e[zt]||null,y=y!=null?y[i]:null,typeof y=="function"&&e.removeEventListener(t,y,f),typeof r=="function")){typeof y!="function"&&y!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,f);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Ps(e,i,r)}}}function kt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var r=!1,f=!1,y;for(y in i)if(i.hasOwnProperty(y)){var D=i[y];if(D!=null)switch(y){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,y,D,i,null)}}f&&$e(e,t,"srcSet",i.srcSet,i,null),r&&$e(e,t,"src",i.src,i,null);return;case"input":ze("invalid",e);var j=y=D=f=null,W=null,ie=null;for(r in i)if(i.hasOwnProperty(r)){var ce=i[r];if(ce!=null)switch(r){case"name":f=ce;break;case"type":D=ce;break;case"checked":W=ce;break;case"defaultChecked":ie=ce;break;case"value":y=ce;break;case"defaultValue":j=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(o(137,t));break;default:$e(e,t,r,ce,i,null)}}Vc(e,y,j,W,ie,D,f,!1);return;case"select":ze("invalid",e),r=D=y=null;for(f in i)if(i.hasOwnProperty(f)&&(j=i[f],j!=null))switch(f){case"value":y=j;break;case"defaultValue":D=j;break;case"multiple":r=j;default:$e(e,t,f,j,i,null)}t=y,i=D,e.multiple=!!r,t!=null?Gi(e,!!r,t,!1):i!=null&&Gi(e,!!r,i,!0);return;case"textarea":ze("invalid",e),y=f=r=null;for(D in i)if(i.hasOwnProperty(D)&&(j=i[D],j!=null))switch(D){case"value":r=j;break;case"defaultValue":f=j;break;case"children":y=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:$e(e,t,D,j,i,null)}Yc(e,r,f,y);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(r=i[W],r!=null))switch(W){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:$e(e,t,W,r,i,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(r=0;r<ps.length;r++)ze(ps[r],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("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(ie in i)if(i.hasOwnProperty(ie)&&(r=i[ie],r!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,ie,r,i,null)}return;default:if(wa(t)){for(ce in i)i.hasOwnProperty(ce)&&(r=i[ce],r!==void 0&&cu(e,t,ce,r,i,void 0));return}}for(j in i)i.hasOwnProperty(j)&&(r=i[j],r!=null&&$e(e,t,j,r,i,null))}function Av(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,y=null,D=null,j=null,W=null,ie=null,ce=null;for(le in i){var fe=i[le];if(i.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":W=fe;default:r.hasOwnProperty(le)||$e(e,t,le,null,r,fe)}}for(var re in r){var le=r[re];if(fe=i[re],r.hasOwnProperty(re)&&(le!=null||fe!=null))switch(re){case"type":y=le;break;case"name":f=le;break;case"checked":ie=le;break;case"defaultChecked":ce=le;break;case"value":D=le;break;case"defaultValue":j=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:le!==fe&&$e(e,t,re,le,r,fe)}}ba(e,D,j,W,ie,ce,y,f);return;case"select":le=D=j=re=null;for(y in i)if(W=i[y],i.hasOwnProperty(y)&&W!=null)switch(y){case"value":break;case"multiple":le=W;default:r.hasOwnProperty(y)||$e(e,t,y,null,r,W)}for(f in r)if(y=r[f],W=i[f],r.hasOwnProperty(f)&&(y!=null||W!=null))switch(f){case"value":re=y;break;case"defaultValue":j=y;break;case"multiple":D=y;default:y!==W&&$e(e,t,f,y,r,W)}t=j,i=D,r=le,re!=null?Gi(e,!!i,re,!1):!!r!=!!i&&(t!=null?Gi(e,!!i,t,!0):Gi(e,!!i,i?[]:"",!1));return;case"textarea":le=re=null;for(j in i)if(f=i[j],i.hasOwnProperty(j)&&f!=null&&!r.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:$e(e,t,j,null,r,f)}for(D in r)if(f=r[D],y=i[D],r.hasOwnProperty(D)&&(f!=null||y!=null))switch(D){case"value":re=f;break;case"defaultValue":le=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==y&&$e(e,t,D,f,r,y)}Gc(e,re,le);return;case"option":for(var ve in i)if(re=i[ve],i.hasOwnProperty(ve)&&re!=null&&!r.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:$e(e,t,ve,null,r,re)}for(W in r)if(re=r[W],le=i[W],r.hasOwnProperty(W)&&re!==le&&(re!=null||le!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:$e(e,t,W,re,r,le)}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 Ee in i)re=i[Ee],i.hasOwnProperty(Ee)&&re!=null&&!r.hasOwnProperty(Ee)&&$e(e,t,Ee,null,r,re);for(ie in r)if(re=r[ie],le=i[ie],r.hasOwnProperty(ie)&&re!==le&&(re!=null||le!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:$e(e,t,ie,re,r,le)}return;default:if(wa(t)){for(var Qe in i)re=i[Qe],i.hasOwnProperty(Qe)&&re!==void 0&&!r.hasOwnProperty(Qe)&&cu(e,t,Qe,void 0,r,re);for(ce in r)re=r[ce],le=i[ce],!r.hasOwnProperty(ce)||re===le||re===void 0&&le===void 0||cu(e,t,ce,re,r,le);return}}for(var J in i)re=i[J],i.hasOwnProperty(J)&&re!=null&&!r.hasOwnProperty(J)&&$e(e,t,J,null,r,re);for(fe in r)re=r[fe],le=i[fe],!r.hasOwnProperty(fe)||re===le||re==null&&le==null||$e(e,t,fe,re,r,le)}function $d(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Tv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var f=i[r],y=f.transferSize,D=f.initiatorType,j=f.duration;if(y&&j&&$d(D)){for(D=0,j=f.responseEnd,r+=1;r<i.length;r++){var W=i[r],ie=W.startTime;if(ie>j)break;var ce=W.transferSize,fe=W.initiatorType;ce&&$d(fe)&&(W=W.responseEnd,D+=ce*(W<j?1:(j-ie)/(W-ie)))}if(--r,t+=8*(y+D)/(f.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 hu=null,fu=null;function Ul(e){return e.nodeType===9?e:e.ownerDocument}function Qd(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 Zd(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 du(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 pu=null;function Dv(){var e=window.event;return e&&e.type==="popstate"?e===pu?!1:(pu=e,!0):(pu=null,!1)}var Jd=typeof setTimeout=="function"?setTimeout:void 0,Rv=typeof clearTimeout=="function"?clearTimeout:void 0,ep=typeof Promise=="function"?Promise:void 0,Lv=typeof queueMicrotask=="function"?queueMicrotask:typeof ep<"u"?function(e){return ep.resolve(null).then(e).catch(Mv)}:Jd;function Mv(e){setTimeout(function(){throw e})}function hi(e){return e==="head"}function tp(e,t){var i=t,r=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(f),wr(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")ms(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ms(i);for(var y=i.firstChild;y;){var D=y.nextSibling,j=y.nodeName;y[Br]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=D}}else i==="body"&&ms(e.ownerDocument.body);i=f}while(i);wr(t)}function np(e,t){var i=e;e=0;do{var r=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||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function _u(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":_u(i),Sa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Ov(e,t,i,r){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Br])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(y=e.getAttribute("rel"),y==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(y!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(y=e.getAttribute("src"),(y!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&y&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var y=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===y)return e}else return e;if(e=on(e.nextSibling),e===null)break}return null}function Bv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=on(e.nextSibling),e===null))return null;return e}function ip(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=on(e.nextSibling),e===null))return null;return e}function mu(e){return e.data==="$?"||e.data==="$~"}function gu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function on(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 vu=null;function rp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return on(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function sp(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 lp(e,t,i){switch(t=Ul(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 ms(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sa(e)}var un=new Map,ap=new Set;function Il(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=X.d;X.d={f:Hv,r:Nv,D:jv,C:Uv,L:Iv,m:Pv,X:qv,S:Fv,M:Vv};function Hv(){var e=qn.f(),t=Ll();return e||t}function Nv(e){var t=Fi(e);t!==null&&t.tag===5&&t.type==="form"?xf(t):qn.r(e)}var yr=typeof document>"u"?null:document;function op(e,t,i){var r=yr;if(r&&typeof t=="string"&&t){var f=en(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),ap.has(f)||(ap.add(f),e={rel:e,crossOrigin:i,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function jv(e){qn.D(e),op("dns-prefetch",e,null)}function Uv(e,t){qn.C(e,t),op("preconnect",e,t)}function Iv(e,t,i){qn.L(e,t,i);var r=yr;if(r&&e&&t){var f='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+en(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+en(i.imageSizes)+'"]')):f+='[href="'+en(e)+'"]';var y=f;switch(t){case"style":y=br(e);break;case"script":y=Cr(e)}un.has(y)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),un.set(y,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(gs(y))||t==="script"&&r.querySelector(vs(y))||(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function Pv(e,t){qn.m(e,t);var i=yr;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+en(r)+'"][href="'+en(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Cr(e)}if(!un.has(y)&&(e=c({rel:"modulepreload",href:e},t),un.set(y,e),i.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(vs(y)))return}r=i.createElement("link"),kt(r,"link",e),St(r),i.head.appendChild(r)}}}function Fv(e,t,i){qn.S(e,t,i);var r=yr;if(r&&e){var f=qi(r).hoistableStyles,y=br(e);t=t||"default";var D=f.get(y);if(!D){var j={loading:0,preload:null};if(D=r.querySelector(gs(y)))j.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=un.get(y))&&Su(e,i);var W=D=r.createElement("link");St(W),kt(W,"link",e),W._p=new Promise(function(ie,ce){W.onload=ie,W.onerror=ce}),W.addEventListener("load",function(){j.loading|=1}),W.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Pl(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:j},f.set(y,D)}}}function qv(e,t){qn.X(e,t);var i=yr;if(i&&e){var r=qi(i).hoistableScripts,f=Cr(e),y=r.get(f);y||(y=i.querySelector(vs(f)),y||(e=c({src:e,async:!0},t),(t=un.get(f))&&yu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function Vv(e,t){qn.M(e,t);var i=yr;if(i&&e){var r=qi(i).hoistableScripts,f=Cr(e),y=r.get(f);y||(y=i.querySelector(vs(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=un.get(f))&&yu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function up(e,t,i,r){var f=(f=pe.current)?Il(f):null;if(!f)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=br(i.href),i=qi(f).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=br(i.href);var y=qi(f).hoistableStyles,D=y.get(e);if(D||(f=f.ownerDocument||f,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(e,D),(y=f.querySelector(gs(e)))&&!y._p&&(D.instance=y,D.state.loading=5),un.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},un.set(e,i),y||Gv(f,e,i,D.state))),t&&r===null)throw Error(o(528,""));return D}if(t&&r!==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=Cr(i),i=qi(f).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function br(e){return'href="'+en(e)+'"'}function gs(e){return'link[rel="stylesheet"]['+e+"]"}function cp(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function Gv(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),kt(t,"link",i),St(t),e.head.appendChild(t))}function Cr(e){return'[src="'+en(e)+'"]'}function vs(e){return"script[async]"+e}function hp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+en(i.href)+'"]');if(r)return t.instance=r,St(r),r;var f=c({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),St(r),kt(r,"style",f),Pl(r,i.precedence,e),t.instance=r;case"stylesheet":f=br(i.href);var y=e.querySelector(gs(f));if(y)return t.state.loading|=4,t.instance=y,St(y),y;r=cp(i),(f=un.get(f))&&Su(r,f),y=(e.ownerDocument||e).createElement("link"),St(y);var D=y;return D._p=new Promise(function(j,W){D.onload=j,D.onerror=W}),kt(y,"link",r),t.state.loading|=4,Pl(y,i.precedence,e),t.instance=y;case"script":return y=Cr(i.src),(f=e.querySelector(vs(y)))?(t.instance=f,St(f),f):(r=i,(f=un.get(y))&&(r=c({},i),yu(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),St(f),kt(f,"link",r),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Pl(r,i.precedence,e));return t.instance}function Pl(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,y=f,D=0;D<r.length;D++){var j=r[D];if(j.dataset.precedence===t)y=j;else if(y!==f)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Su(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fl=null;function fp(e,t,i){if(Fl===null){var r=new Map,f=Fl=new Map;f.set(i,r)}else f=Fl,r=f.get(i),r||(r=new Map,f.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var y=i[f];if(!(y[Br]||y[Ct]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var D=y.getAttribute(t)||"";D=e+D;var j=r.get(D);j?j.push(y):r.set(D,[y])}}return r}function dp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Yv(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 pp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Wv(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=br(r.href),y=t.querySelector(gs(f));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ql.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=y,St(y);return}y=t.ownerDocument||t,r=cp(r),(f=un.get(f))&&Su(r,f),y=y.createElement("link"),St(y);var D=y;D._p=new Promise(function(j,W){D.onload=j,D.onerror=W}),kt(y,"link",r),i.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ql.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var bu=0;function Kv(e,t){return e.stylesheets&&e.count===0&&Gl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+t);0<e.imgBytes&&bu===0&&(bu=62500*Tv());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>bu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function ql(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vl=null;function Gl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vl=new Map,t.forEach(Xv,e),Vl=null,ql.call(e))}function Xv(e,t){if(!(t.state.loading&4)){var i=Vl.get(e);if(i)var r=i.get(null);else{i=new Map,Vl.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<f.length;y++){var D=f[y];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(i.set(D.dataset.precedence,D),r=D)}r&&i.set(null,r)}f=t.instance,D=f.getAttribute("data-precedence"),y=i.get(D)||r,y===r&&i.set(null,f),i.set(D,f),this.count++,r=ql.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),y?y.parentNode.insertBefore(f,y.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Ss={$$typeof:g,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $v(e,t,i,r,f,y,D,j,W){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=_a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.hiddenUpdates=_a(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=y,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function _p(e,t,i,r,f,y,D,j,W,ie,ce,fe){return e=new $v(e,t,i,D,W,ie,ce,fe,j),t=1,y===!0&&(t|=24),y=Gt(3,null,null,t),e.current=y,y.stateNode=e,t=Ja(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:r,isDehydrated:i,cache:t},io(y),e}function mp(e){return e?(e=Ji,e):Ji}function gp(e,t,i,r,f,y){f=mp(f),r.context===null?r.context=f:r.pendingContext=f,r=ei(t),r.payload={element:i},y=y===void 0?null:y,y!==null&&(r.callback=y),i=ti(e,r,t),i!==null&&(Pt(i,e,t),Qr(i,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Cu(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function Sp(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Pt(t,e,67108864),Cu(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=$t();t=ma(t);var i=xi(e,t);i!==null&&Pt(i,e,t),Cu(e,t)}}var Yl=!0;function Qv(e,t,i,r){var f=G.T;G.T=null;var y=X.p;try{X.p=2,wu(e,t,i,r)}finally{X.p=y,G.T=f}}function Zv(e,t,i,r){var f=G.T;G.T=null;var y=X.p;try{X.p=8,wu(e,t,i,r)}finally{X.p=y,G.T=f}}function wu(e,t,i,r){if(Yl){var f=xu(r);if(f===null)uu(e,t,r,Wl,i),Cp(e,r);else if(e0(f,e,t,i,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Jv.indexOf(e)){for(;f!==null;){var y=Fi(f);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var D=Si(y.pendingLanes);if(D!==0){var j=y;for(j.pendingLanes|=2,j.entangledLanes|=2;D;){var W=1<<31-Ze(D);j.entanglements[1]|=W,D&=~W}Cn(y),(Ge&6)===0&&(Dl=ot()+500,ds(0))}}break;case 31:case 13:j=xi(y,2),j!==null&&Pt(j,y,2),Ll(),Cu(y,2)}if(y=xu(r),y===null&&uu(e,t,r,Wl,i),y===f)break;f=y}f!==null&&r.stopPropagation()}else uu(e,t,r,null,i)}}function xu(e){return e=Ea(e),Eu(e)}var Wl=null;function Eu(e){if(Wl=null,e=Pi(e),e!==null){var t=b(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=p(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 Wl=e,null}function bp(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(Ot()){case ue:return 2;case ge:return 8;case be:case Te:return 32;case Me:return 268435456;default:return 32}default:return 32}}var ku=!1,fi=null,di=null,pi=null,ys=new Map,bs=new Map,_i=[],Jv="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 Cp(e,t){switch(e){case"focusin":case"focusout":fi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Cs(e,t,i,r,f,y){return e===null||e.nativeEvent!==y?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:y,targetContainers:[f]},t!==null&&(t=Fi(t),t!==null&&Sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function e0(e,t,i,r,f){switch(t){case"focusin":return fi=Cs(fi,e,t,i,r,f),!0;case"dragenter":return di=Cs(di,e,t,i,r,f),!0;case"mouseover":return pi=Cs(pi,e,t,i,r,f),!0;case"pointerover":var y=f.pointerId;return ys.set(y,Cs(ys.get(y)||null,e,t,i,r,f)),!0;case"gotpointercapture":return y=f.pointerId,bs.set(y,Cs(bs.get(y)||null,e,t,i,r,f)),!0}return!1}function wp(e){var t=Pi(e.target);if(t!==null){var i=b(t);if(i!==null){if(t=i.tag,t===13){if(t=p(i),t!==null){e.blockedOn=t,Hc(e.priority,function(){yp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Hc(e.priority,function(){yp(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 Kl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=xu(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);xa=r,i.target.dispatchEvent(r),xa=null}else return t=Fi(i),t!==null&&Sp(t),e.blockedOn=i,!1;t.shift()}return!0}function xp(e,t,i){Kl(e)&&i.delete(t)}function t0(){ku=!1,fi!==null&&Kl(fi)&&(fi=null),di!==null&&Kl(di)&&(di=null),pi!==null&&Kl(pi)&&(pi=null),ys.forEach(xp),bs.forEach(xp)}function Xl(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,t0)))}var $l=null;function Ep(e){$l!==e&&($l=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$l===e&&($l=null);for(var t=0;t<e.length;t+=3){var i=e[t],r=e[t+1],f=e[t+2];if(typeof r!="function"){if(Eu(r||i)===null)continue;break}var y=Fi(i);y!==null&&(e.splice(t,3),t-=3,xo(y,{pending:!0,data:f,method:i.method,action:r},r,f))}}))}function wr(e){function t(W){return Xl(W,e)}fi!==null&&Xl(fi,e),di!==null&&Xl(di,e),pi!==null&&Xl(pi,e),ys.forEach(t),bs.forEach(t);for(var i=0;i<_i.length;i++){var r=_i[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_i.length&&(i=_i[0],i.blockedOn===null);)wp(i),i.blockedOn===null&&_i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var f=i[r],y=i[r+1],D=f[zt]||null;if(typeof y=="function")D||Ep(i);else if(D){var j=null;if(y&&y.hasAttribute("formAction")){if(f=y,D=y[zt]||null)j=D.formAction;else if(Eu(f)!==null)continue}else j=D.action;typeof j=="function"?i[r+1]=j:(i.splice(r,3),r-=3),Ep(i)}}}function kp(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(D){return f=D})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Au(e){this._internalRoot=e}Ql.prototype.render=Au.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,r=$t();gp(i,r,e,t,null,null)},Ql.prototype.unmount=Au.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gp(e.current,2,null,e,null,null),Ll(),t[Ii]=null}};function Ql(e){this._internalRoot=e}Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=zc();e={blockedOn:null,target:e,priority:t};for(var i=0;i<_i.length&&t!==0&&t<_i[i].priority;i++);_i.splice(i,0,e),i===0&&wp(e)}};var Ap=s.version;if(Ap!=="19.2.6")throw Error(o(527,Ap,"19.2.6"));X.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?_(e):null,e=e===null?null:e.stateNode,e};var n0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{bt=Zl.inject(n0),gt=Zl}catch{}}return xs.createRoot=function(e,t){if(!v(e))throw Error(o(299));var i=!1,r="",f=Bf,y=zf,D=Hf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(y=t.onCaughtError),t.onRecoverableError!==void 0&&(D=t.onRecoverableError)),t=_p(e,1,!1,null,null,i,r,null,f,y,D,kp),e[Ii]=t.current,ou(e),new Au(t)},xs.hydrateRoot=function(e,t,i){if(!v(e))throw Error(o(299));var r=!1,f="",y=Bf,D=zf,j=Hf,W=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(D=i.onCaughtError),i.onRecoverableError!==void 0&&(j=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=_p(e,1,!0,t,i??null,r,f,W,y,D,j,kp),t.context=mp(null),i=t.current,r=$t(),r=ma(r),f=ei(r),f.callback=null,ti(i,f,r),i=r,t.current.lanes=i,Or(t,i),Cn(t),e[Ii]=t.current,ou(e),new Ql(t)},xs.version="19.2.6",xs}var jp;function p0(){if(jp)return Ru.exports;jp=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(s){console.error(s)}}return n(),Ru.exports=d0(),Ru.exports}var _0=p0();function m0({sidebar:n,children:s}){const[l,o]=me.useState(!1);return q.jsxs("div",{className:l?"app-shell is-sidebar-collapsed":"app-shell",children:[q.jsxs("aside",{className:"app-sidebar",children:[q.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":l?"Expand sidebar":"Collapse sidebar",title:l?"Expand sidebar":"Collapse sidebar",onClick:()=>o(v=>!v)}),q.jsx("div",{className:"sidebar-content",children:n})]}),q.jsx("main",{className:"app-main",children:s})]})}function g0(n,s){return n.find(l=>l.taskSlug===s)??n[0]??null}const Oe={getAppPreferences(){return Fe("/api/settings/preferences")},updateAppPreferences(n){return Fe("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return Fe("/api/projects/current")},getRecentRepositoryPaths(){return Fe("/api/projects/recent")},connectProject(n){return Fe("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Fe("/api/tasks")},createTask(n){return Fe("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,s={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return Fe("/api/projects/harness")},applyHarness(){return Fe("/api/projects/harness/apply",{method:"POST"})},getTaskStatus(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages`)},scanPendingMessages(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages/scan`,{method:"POST"})},markAllMessagesDone(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},getOrchestrationState(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTaskRoundState(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/round`)},getTranslationSettings(){return Fe("/api/translation/settings")},updateTranslationSettings(n){return Fe("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return Fe("/api/translation/prompts")},testTranslationProvider(){return Fe("/api/translation/test",{method:"POST"})},startTranslationSession(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/start`,{method:"POST"})},pollTranslationSession(n,s,l){const o=new URLSearchParams({after:String(s)});return l!==void 0&&o.set("limit",String(l)),Fe(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,s,l){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(n,s,l){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(n){return Fe(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,s){return Fe(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(s)}`,{method:"POST"})}};async function Fe(n,s={}){var v,b;const l=new Headers(s.headers);s.body!==void 0&&s.body!==null&&!l.has("content-type")&&l.set("content-type","application/json");const o=await fetch(n,{...s,headers:l});if(!o.ok){const p=await o.json().catch(()=>null),a=(v=p==null?void 0:p.error)!=null&&v.hint?`${p.error.message} ${p.error.hint}`:((b=p==null?void 0:p.error)==null?void 0:b.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function v0({events:n,maxEvents:s=8,showHeader:l=!0}){const o=s===null?n:n.slice(-s);return q.jsxs("section",{className:"event-log",children:[l?q.jsx("h2",{children:"Events"}):null,n.length===0?q.jsx("p",{className:"muted",children:"No terminal events yet."}):q.jsx("ol",{children:o.map((v,b)=>q.jsx("li",{children:v},`${v}-${b}`))})]})}function oa({status:n}){return q.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function S0({status:n,applyResult:s,busy:l=!1,onRefresh:o,onApply:v}){return n?q.jsxs("section",{className:"harness-panel",children:[q.jsxs("div",{className:"harness-panel-header",children:[q.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"}),q.jsxs("div",{className:"harness-actions",children:[q.jsx("button",{type:"button",disabled:l,onClick:()=>void o(),children:"Refresh"}),q.jsx("button",{type:"button",disabled:l||!n.needsApply,onClick:()=>void v(),children:"Install / Update"})]})]}),q.jsx("ol",{className:"harness-file-list",children:n.files.map(b=>q.jsxs("li",{children:[q.jsx("span",{children:b.path}),q.jsx(oa,{status:b.action})]},b.path))}),n.plannedChanges.length>0?q.jsxs("div",{className:"harness-changes",children:[q.jsx("h3",{children:"Planned Changes"}),q.jsx("ul",{children:n.plannedChanges.map(b=>q.jsxs("li",{children:[q.jsx("strong",{children:b.action})," ",b.path]},`${b.path}:${b.action}`))})]}):null,s?q.jsxs("div",{className:"harness-result",children:[q.jsx("p",{children:s.message}),s.changedFiles.length>0?q.jsx("ul",{children:s.changedFiles.map(b=>q.jsxs("li",{children:[q.jsx("strong",{children:b.action})," ",b.path]},`${b.path}:${b.action}`))}):null]}):null,n.warnings.length>0?q.jsx("ul",{className:"warnings",children:n.warnings.map(b=>q.jsx("li",{children:b},b))}):null]}):null}function fc(n){return{pending:n.filter(s=>s.status==="pending_approval").length,queued:n.filter(s=>s.status==="queued").length,delivered:n.filter(s=>s.status==="delivering"||s.status==="submitted").length}}function y0({messages:n,orchestration:s,busy:l,maxMessages:o=6,showControls:v=!0,showHeader:b=!0,onModeChange:p,onMarkAllDone:a}){const[u,h]=me.useState(null),_=fc(n),c=(s==null?void 0:s.mode)??"manual",C=(o===null?n:n.slice(-o)).map((k,x)=>({message:k,sequence:(o===null?0:Math.max(0,n.length-o))+x+1})).sort((k,x)=>Up(x.message).localeCompare(Up(k.message)));async function w(k){await C0(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return q.jsxs("section",{className:"message-panel",children:[b?q.jsxs("div",{className:"message-panel-header",children:[q.jsxs("div",{children:[q.jsx("h2",{children:"Messages"}),q.jsxs("p",{className:"muted",children:[_.pending," pending / ",_.queued," queued / ",_.delivered," active"]})]}),v&&p?q.jsx("div",{className:"message-controls",children:q.jsxs("label",{className:"message-mode-toggle",children:[q.jsx("input",{type:"checkbox",checked:c==="auto",disabled:l,onChange:k=>p(k.target.checked?"auto":"manual")}),q.jsx("span",{children:"Auto orchestration"})]})}):null,v&&a?q.jsx("button",{type:"button",disabled:l||z_(n)===0,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?q.jsx("p",{className:"muted",children:"No role messages yet."}):q.jsx("ol",{className:"message-list",children:C.map(({message:k,sequence:x})=>q.jsxs("li",{className:`message-item message-${k.status}`,children:[q.jsxs("div",{className:"message-item-main",children:[q.jsxs("div",{className:"message-meta",children:[q.jsxs("span",{className:"message-sequence",children:["#",x]}),q.jsx("time",{dateTime:k.createdAt,children:b0(k.createdAt)}),q.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),q.jsx("span",{children:k.type}),q.jsx(oa,{status:k.status})]}),q.jsx("p",{children:k.body}),k.failureReason?q.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?q.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),q.jsx("div",{className:"message-actions",children:q.jsx("button",{type:"button",disabled:l,onClick:()=>void w(k),children:u===k.id?"Copied":"Copy"})})]},k.id))})]})}function z_(n){return n.filter(s=>s.status==="pending_approval"||s.status==="queued"||s.status==="delivering"||s.status==="submitted"||s.status==="failed"||s.status==="delivery_failed"||s.status==="response_ready_missing_result").length}function b0(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Up(n){return n.acknowledgedAt??n.submittedAt??n.deliveredAt??n.createdAt}async function C0(n){var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(n);return}const s=document.createElement("textarea");s.value=n,s.setAttribute("readonly","true"),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()}function w0({defaultPath:n="",recentPaths:s=[],busy:l=!1,onConnect:o}){const[v,b]=me.useState(n);me.useEffect(()=>{n&&b(n)},[n]);async function p(a){a.preventDefault(),await o(v)}return q.jsx("form",{className:"repo-connect",onSubmit:p,children:q.jsxs("div",{className:s.length>0?"inline-form has-recent-paths":"inline-form",children:[q.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:v,onChange:a=>b(a.target.value),placeholder:"/path/to/repo"}),s.length>0?q.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&b(a.target.value)},children:[q.jsx("option",{value:"",children:"Recent"}),s.map(a=>q.jsx("option",{value:a,children:a},a))]}):null,q.jsx("button",{type:"submit",disabled:l||!v.trim(),children:"Connect"})]})})}function x0({tasks:n,activeTaskSlug:s,onSelect:l}){return q.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>q.jsxs("button",{className:o.taskSlug===s?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>l(o.taskSlug),children:[q.jsx("span",{children:o.title||o.taskSlug}),q.jsx(oa,{status:o.status==="created"?"unknown":"running"})]},o.taskSlug))})}function E0({project:n,recentRepositoryPaths:s,tasks:l,activeTaskSlug:o,messages:v,orchestration:b,events:p,harnessStatus:a,harnessApplyResult:u,busy:h,onConnect:_,onRefreshHarness:c,onApplyHarness:C,onCreateTask:w,onSelectTask:k,themeMode:x,onThemeModeChange:S,roundCompletionAlerts:m,onRoundCompletionAlertsChange:d,onTryRoundAlert:g,onMarkAllMessagesDone:E}){const[R,A]=me.useState(""),[L,T]=me.useState(!0),[B,N]=me.useState(!1),[V,F]=me.useState(!1),U=fc(v),Y=R.trim();async function $(G){G.preventDefault(),await w({taskSlug:Y,createWorktree:L}),A(""),T(!0)}return q.jsxs("div",{className:"project-dashboard",children:[q.jsx("header",{className:"brand-header",children:q.jsx("strong",{children:"VibeCodingMaster"})}),q.jsx(xr,{title:"Repository Path",defaultOpen:!o,children:q.jsx(w0,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:s,busy:h,onConnect:_})}),n?q.jsx(xr,{title:"Repository",children:q.jsxs("div",{className:"project-summary",children:[q.jsxs("dl",{children:[q.jsxs("div",{children:[q.jsx("dt",{children:"Path"}),q.jsx("dd",{children:n.repoRoot})]}),q.jsxs("div",{children:[q.jsx("dt",{children:"Branch"}),q.jsx("dd",{children:n.branch})]}),q.jsxs("div",{children:[q.jsx("dt",{children:"Working tree"}),q.jsx("dd",{children:n.isDirty?"uncommitted changes":"clean"})]})]}),n.warnings.length>0?q.jsx("ul",{className:"warnings",children:n.warnings.map(G=>q.jsx("li",{children:G},G))}):null]})}):null,q.jsx(xr,{title:"Settings",children:q.jsxs("div",{className:"sidebar-settings",children:[q.jsxs("button",{"aria-label":`Theme mode: ${Ip(x)}`,className:"settings-toggle theme-mode-toggle",disabled:h,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>S(k0(x)),children:[q.jsx("span",{children:"Theme"}),q.jsx("span",{children:Ip(x)})]}),q.jsxs("button",{"aria-pressed":m,className:m?"settings-toggle is-active":"settings-toggle",disabled:h,type:"button",onClick:()=>d(!m),children:[q.jsx("span",{children:"Round alert"}),q.jsx("span",{children:m?"on":"off"})]}),q.jsxs("button",{className:"settings-toggle",type:"button",onClick:g,children:[q.jsx("span",{children:"Try alert"}),q.jsx("span",{children:"test"})]}),o?q.jsxs(q.Fragment,{children:[q.jsxs("button",{type:"button",onClick:()=>N(!0),children:[q.jsx("span",{children:"Messages"}),q.jsxs("span",{className:"muted",children:[U.pending," pending / ",U.queued," queued"]})]}),q.jsxs("button",{type:"button",onClick:()=>F(!0),children:[q.jsx("span",{children:"Events"}),q.jsxs("span",{className:"muted",children:[p.length," total"]})]})]}):null]})}),n?q.jsx(xr,{title:"VCM Harness",children:q.jsx(S0,{status:a,applyResult:u,busy:h,onRefresh:c,onApply:C})}):null,n?q.jsx(xr,{title:"New Task",children:q.jsx("div",{className:"task-create",children:q.jsxs("form",{onSubmit:$,children:[q.jsx("input",{value:R,onChange:G=>A(G.target.value),placeholder:"task name"}),q.jsxs("label",{className:"task-create-option",children:[q.jsx("input",{type:"checkbox",checked:L,onChange:G=>T(G.target.checked)}),q.jsx("span",{children:"Create worktree and branch"})]}),L?q.jsxs("div",{className:"task-create-preview",children:[q.jsxs("small",{children:["branch: ",Y?`feature/${Y}`:"feature/<task>"]}),q.jsxs("small",{children:["worktree: ",Y?`.claude/worktrees/${Y}`:".claude/worktrees/<task>"]})]}):q.jsx("div",{className:"task-create-preview",children:q.jsx("small",{children:"uses current repository path and current branch"})}),q.jsx("button",{type:"submit",disabled:h||!Y,children:"Create"})]})})}):null,l.length>0?q.jsx(xr,{title:"Tasks",children:q.jsx(x0,{tasks:l,activeTaskSlug:o,onSelect:k})}):null,B?q.jsx(T0,{busy:h,messages:v,orchestration:b,onClose:()=>N(!1),onMarkAllDone:()=>{o&&E(o)}}):null,V?q.jsx(A0,{events:p,onClose:()=>F(!1)}):null]})}function k0(n){return n==="system"?"light":n==="light"?"dark":"system"}function Ip(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function A0({events:n,onClose:s}){return q.jsx("div",{className:"modal-backdrop",children:q.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[q.jsxs("header",{children:[q.jsxs("div",{children:[q.jsx("h2",{children:"Events"}),q.jsxs("p",{className:"muted",children:[n.length," total"]})]}),q.jsx("button",{type:"button",onClick:s,children:"Close"})]}),q.jsx(v0,{events:n,maxEvents:null,showHeader:!1})]})})}function T0({busy:n,messages:s,orchestration:l,onClose:o,onMarkAllDone:v}){const b=fc(s),p=z_(s);function a(){window.confirm([`Mark ${p} open message${p===1?"":"s"} as done?`,"","Use this only after you manually copied or handled the stuck messages.","VCM will mark open message records as acknowledged and clear pending route files so auto orchestration can continue."].join(`
50
- `))&&v()}return q.jsx("div",{className:"modal-backdrop",children:q.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[q.jsxs("header",{children:[q.jsxs("div",{children:[q.jsx("h2",{children:"Messages"}),q.jsxs("p",{className:"muted",children:[b.pending," pending / ",b.queued," queued / ",b.delivered," active",l?` · ${l.mode}`:""]})]}),q.jsxs("div",{className:"modal-actions",children:[q.jsx("button",{type:"button",disabled:n||p===0,onClick:a,children:"Mark All Done"}),q.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),q.jsx(y0,{busy:n,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1})]})})}function xr({children:n,defaultOpen:s=!1,title:l}){const[o,v]=me.useState(s);return me.useEffect(()=>{v(s)},[s]),q.jsxs("section",{className:"sidebar-section",children:[q.jsxs("button",{"aria-expanded":o,className:"sidebar-section-toggle",type:"button",onClick:()=>v(b=>!b),children:[q.jsx("span",{children:l}),q.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),o?q.jsx("div",{className:"sidebar-section-content",children:n}):null]})}const ua=[{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}];ua.map(n=>n.name);ua.filter(n=>n.dispatchable).map(n=>n.name);function H_(n,s){return n.find(l=>l.role===s)}function D0({activeRole:n,sessions:s,onSelect:l}){return q.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:ua.map(o=>{const v=H_(s,o.name),b=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return q.jsxs("button",{className:o.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":o.name===n,onClick:()=>l(o.name),children:[q.jsx("span",{children:o.label}),q.jsx(oa,{status:b})]},o.name)})})}var Bu={exports:{}},Pp;function R0(){return Pp||(Pp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={};return(()=>{var o=l;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(v){this._terminal=v}dispose(){}fit(){const v=this.proposeDimensions();if(!v||!this._terminal||isNaN(v.cols)||isNaN(v.rows))return;const b=this._terminal._core;this._terminal.rows===v.rows&&this._terminal.cols===v.cols||(b._renderService.clear(),this._terminal.resize(v.cols,v.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const v=this._terminal._core,b=v._renderService.dimensions;if(b.css.cell.width===0||b.css.cell.height===0)return;const p=this._terminal.options.scrollback===0?0:v.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),c=u-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),C=h-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-p;return{cols:Math.max(2,Math.floor(C/b.css.cell.width)),rows:Math.max(1,Math.floor(c/b.css.cell.height))}}}})(),l})()))})(Bu)),Bu.exports}var L0=R0(),zu={exports:{}},Fp;function M0(){return Fp||(Fp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={6:(p,a)=>{function u(_){try{const c=new URL(_),C=c.password&&c.username?`${c.protocol}//${c.username}:${c.password}@${c.host}`:c.username?`${c.protocol}//${c.username}@${c.host}`:`${c.protocol}//${c.host}`;return _.toLocaleLowerCase().startsWith(C.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(_,c,C,w={}){this._terminal=_,this._regex=c,this._handler=C,this._options=w}provideLinks(_,c){const C=h.computeLink(_,this._regex,this._terminal,this._handler);c(this._addCallbacks(C))}_addCallbacks(_){return _.map((c=>(c.leave=this._options.leave,c.hover=(C,w)=>{if(this._options.hover){const{range:k}=c;this._options.hover(C,w,k)}},c)))}};class h{static computeLink(c,C,w,k){const x=new RegExp(C.source,(C.flags||"")+"g"),[S,m]=h._getWindowedLineStrings(c-1,w),d=S.join("");let g;const E=[];for(;g=x.exec(d);){const R=g[0];if(!u(R))continue;const[A,L]=h._mapStrIdx(w,m,0,g.index),[T,B]=h._mapStrIdx(w,A,L,R.length);if(A===-1||L===-1||T===-1||B===-1)continue;const N={start:{x:L+1,y:A+1},end:{x:B,y:T+1}};E.push({range:N,text:R,activate:k})}return E}static _getWindowedLineStrings(c,C){let w,k=c,x=c,S=0,m="";const d=[];if(w=C.buffer.active.getLine(c)){const g=w.translateToString(!0);if(w.isWrapped&&g[0]!==" "){for(S=0;(w=C.buffer.active.getLine(--k))&&S<2048&&(m=w.translateToString(!0),S+=m.length,d.push(m),w.isWrapped&&m.indexOf(" ")===-1););d.reverse()}for(d.push(g),S=0;(w=C.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(m=w.translateToString(!0),S+=m.length,d.push(m),m.indexOf(" ")===-1););}return[d,k]}static _mapStrIdx(c,C,w,k){const x=c.buffer.active,S=x.getNullCell();let m=w;for(;k;){const d=x.getLine(C);if(!d)return[-1,-1];for(let g=m;g<d.length;++g){d.getCell(g,S);const E=S.getChars();if(S.getWidth()&&(k-=E.length||1,g===d.length-1&&E==="")){const R=x.getLine(C+1);R&&R.isWrapped&&(R.getCell(0,S),S.getWidth()===2&&(k+=1))}if(k<0)return[C,g]}C++,m=0}return[C,m]}}a.LinkComputer=h}},o={};function v(p){var a=o[p];if(a!==void 0)return a.exports;var u=o[p]={exports:{}};return l[p](u,u.exports,v),u.exports}var b={};return(()=>{var p=b;Object.defineProperty(p,"__esModule",{value:!0}),p.WebLinksAddon=void 0;const a=v(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(_,c){const C=window.open();if(C){try{C.opener=null}catch{}C.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}p.WebLinksAddon=class{constructor(_=h,c={}){this._handler=_,this._options=c}activate(_){this._terminal=_;const c=this._options,C=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,C,this._handler,c))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),b})()))})(zu)),zu.exports}var O0=M0(),Hu={exports:{}},qp;function B0(){return qp||(qp=1,(function(n,s){(function(l,o){n.exports=o()})(globalThis,(()=>(()=>{var l={4567:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},_=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const c=u(9042),C=u(9924),w=u(844),k=u(4725),x=u(2585),S=u(3656);let m=a.AccessibilityManager=class extends w.Disposable{constructor(d,g,E,R){super(),this._terminal=d,this._coreBrowserService=E,this._renderService=R,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,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 C.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((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
48
+ `+r.stack}}var gn=Object.prototype.hasOwnProperty,vn=n.unstable_scheduleCallback,En=n.unstable_cancelCallback,Gn=n.unstable_shouldYield,At=n.unstable_requestPaint,ot=n.unstable_now,Ot=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,ge=n.unstable_UserBlockingPriority,be=n.unstable_NormalPriority,Te=n.unstable_LowPriority,Oe=n.unstable_IdlePriority,mt=n.log,Pe=n.unstable_setDisableYieldValue,bt=null,gt=null;function Bt(e){if(typeof mt=="function"&&Pe(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(bt,e)}catch{}}var Ze=Math.clz32?Math.clz32:qm,Yn=Math.log,hn=Math.LN2;function qm(e){return e>>>=0,e===0?32:31-(Yn(e)/hn|0)|0}var Ns=256,js=262144,Us=4194304;function Si(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 Is(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var f=0,y=e.suspendedLanes,D=e.pingedLanes;e=e.warmLanes;var j=r&134217727;return j!==0?(r=j&~y,r!==0?f=Si(r):(D&=j,D!==0?f=Si(D):i||(i=j&~e,i!==0&&(f=Si(i))))):(j=r&~y,j!==0?f=Si(j):D!==0?f=Si(D):i||(i=r&~e,i!==0&&(f=Si(i)))),f===0?0:t!==0&&t!==f&&(t&y)===0&&(y=f&-f,i=t&-t,y>=i||y===32&&(i&4194048)!==0)?t:f}function Mr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Vm(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 Mc(){var e=Us;return Us<<=1,(Us&62914560)===0&&(Us=4194304),e}function _a(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Or(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Gm(e,t,i,r,f,y){var D=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 j=e.entanglements,K=e.expirationTimes,re=e.hiddenUpdates;for(i=D&~i;0<i;){var ce=31-Ze(i),fe=1<<ce;j[ce]=0,K[ce]=-1;var se=re[ce];if(se!==null)for(re[ce]=null,ce=0;ce<se.length;ce++){var le=se[ce];le!==null&&(le.lane&=-536870913)}i&=~fe}r!==0&&Oc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(D&~t))}function Oc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Bc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Ze(i),f=1<<r;f&t|e[r]&t&&(e[r]|=t),i&=~f}}function zc(e,t){var i=t&-t;return i=(i&42)!==0?1:ma(i),(i&(e.suspendedLanes|t))!==0?0:i}function ma(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 ga(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hc(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Cp(e.type))}function Nc(e,t){var i=Y.p;try{return Y.p=e,t()}finally{Y.p=i}}var Wn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Wn,zt="__reactProps$"+Wn,Ii="__reactContainer$"+Wn,va="__reactEvents$"+Wn,Ym="__reactListeners$"+Wn,Wm="__reactHandles$"+Wn,jc="__reactResources$"+Wn,Br="__reactMarker$"+Wn;function Sa(e){delete e[Ct],delete e[zt],delete e[va],delete e[Ym],delete e[Wm]}function Pi(e){var t=e[Ct];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ii]||i[Ct]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=lp(e);e!==null;){if(i=e[Ct])return i;e=lp(e)}return t}e=i,i=e.parentNode}return null}function Fi(e){if(e=e[Ct]||e[Ii]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function qi(e){var t=e[jc];return t||(t=e[jc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Br]=!0}var Uc=new Set,Ic={};function yi(e,t){Vi(e,t),Vi(e+"Capture",t)}function Vi(e,t){for(Ic[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var Km=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]*$"),Pc={},Fc={};function Xm(e){return gn.call(Fc,e)?!0:gn.call(Pc,e)?!1:Km.test(e)?Fc[e]=!0:(Pc[e]=!0,!1)}function Ps(e,t,i){if(Xm(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Fs(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 kn(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $m(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,y=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(D){i=""+D,y.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ya(e){if(!e._valueTracker){var t=qc(e)?"checked":"value";e._valueTracker=$m(e,t,""+e[t])}}function Vc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=qc(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function qs(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 Qm=/[\n"\\]/g;function en(e){return e.replace(Qm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ba(e,t,i,r,f,y,D,j){e.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.type=D:e.removeAttribute("type"),t!=null?D==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):D!=="submit"&&D!=="reset"||e.removeAttribute("value"),t!=null?Ca(e,D,Jt(t)):i!=null?Ca(e,D,Jt(i)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+Jt(j):e.removeAttribute("name")}function Gc(e,t,i,r,f,y,D,j){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||i!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){ya(e);return}i=i!=null?""+Jt(i):"",t=t!=null?""+Jt(t):i,j||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=j?e.checked:!!r,e.defaultChecked=!!r,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(e.name=D),ya(e)}function Ca(e,t,i){t==="number"&&qs(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Gi(e,t,i,r){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&r&&(e[i].defaultSelected=!0)}else{for(i=""+Jt(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Yc(e,t,i){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Jt(i):""}function Wc(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(o(92));if(W(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Jt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),ya(e)}function Yi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Zm=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 Kc(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||Zm.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Xc(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in t)r=t[f],t.hasOwnProperty(f)&&i[f]!==r&&Kc(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&Kc(e,y,t[y])}function wa(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 Jm=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"]]),eg=/^[\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 Vs(e){return eg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function An(){}var xa=null;function Ea(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,Ki=null;function $c(e){var t=Fi(e);if(t&&(e=t.stateNode)){var i=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ba(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="'+en(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var f=r[zt]||null;if(!f)throw Error(o(90));ba(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&Vc(r)}break e;case"textarea":Yc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Gi(e,!!i.multiple,t,!1)}}}var ka=!1;function Qc(e,t,i){if(ka)return e(t,i);ka=!0;try{var r=e(t);return r}finally{if(ka=!1,(Wi!==null||Ki!==null)&&(Ll(),Wi&&(t=Wi,e=Ki,Ki=Wi=null,$c(t),e)))for(t=0;t<e.length;t++)$c(e[t])}}function Hr(e,t){var i=e.stateNode;if(i===null)return null;var r=i[zt]||null;if(r===null)return null;i=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Aa=!1;if(Tn)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){Aa=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Aa=!1}var Kn=null,Ta=null,Gs=null;function Zc(){if(Gs)return Gs;var e,t=Ta,i=t.length,r,f="value"in Kn?Kn.value:Kn.textContent,y=f.length;for(e=0;e<i&&t[e]===f[e];e++);var D=i-e;for(r=1;r<=D&&t[i-r]===f[y-r];r++);return Gs=f.slice(e,1<r?1-r:void 0)}function Ys(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 Ws(){return!0}function Jc(){return!1}function Ht(e){function t(i,r,f,y,D){this._reactName=i,this._targetInst=f,this.type=r,this.nativeEvent=y,this.target=D,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(i=e[j],this[j]=i?i(y):y[j]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ws:Jc,this.isPropagationStopped=Jc,this}return c(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=Ws)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),t}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ks=Ht(bi),jr=c({},bi,{view:0,detail:0}),tg=Ht(jr),Da,Ra,Ur,Xs=c({},jr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ma,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!==Ur&&(Ur&&e.type==="mousemove"?(Da=e.screenX-Ur.screenX,Ra=e.screenY-Ur.screenY):Ra=Da=0,Ur=e),Da)},movementY:function(e){return"movementY"in e?e.movementY:Ra}}),eh=Ht(Xs),ng=c({},Xs,{dataTransfer:0}),ig=Ht(ng),rg=c({},jr,{relatedTarget:0}),La=Ht(rg),sg=c({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),lg=Ht(sg),ag=c({},bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),og=Ht(ag),ug=c({},bi,{data:0}),th=Ht(ug),cg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hg={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"},fg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fg[e])?!!t[e]:!1}function Ma(){return dg}var pg=c({},jr,{key:function(e){if(e.key){var t=cg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ys(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ma,charCode:function(e){return e.type==="keypress"?Ys(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ys(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_g=Ht(pg),mg=c({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nh=Ht(mg),gg=c({},jr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ma}),vg=Ht(gg),Sg=c({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),yg=Ht(Sg),bg=c({},Xs,{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}),Cg=Ht(bg),wg=c({},bi,{newState:0,oldState:0}),xg=Ht(wg),Eg=[9,13,27,32],Oa=Tn&&"CompositionEvent"in window,Ir=null;Tn&&"documentMode"in document&&(Ir=document.documentMode);var kg=Tn&&"TextEvent"in window&&!Ir,ih=Tn&&(!Oa||Ir&&8<Ir&&11>=Ir),rh=" ",sh=!1;function lh(e,t){switch(e){case"keyup":return Eg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ah(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function Ag(e,t){switch(e){case"compositionend":return ah(t);case"keypress":return t.which!==32?null:(sh=!0,rh);case"textInput":return e=t.data,e===rh&&sh?null:e;default:return null}}function Tg(e,t){if(Xi)return e==="compositionend"||!Oa&&lh(e,t)?(e=Zc(),Gs=Ta=Kn=null,Xi=!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 ih&&t.locale!=="ko"?null:t.data;default:return null}}var Dg={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 oh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Dg[e.type]:t==="textarea"}function uh(e,t,i,r){Wi?Ki?Ki.push(r):Ki=[r]:Wi=r,t=jl(t,"onChange"),0<t.length&&(i=new Ks("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var Pr=null,Fr=null;function Rg(e){Yd(e,0)}function $s(e){var t=zr(e);if(Vc(t))return e}function ch(e,t){if(e==="change")return t}var hh=!1;if(Tn){var Ba;if(Tn){var za="oninput"in document;if(!za){var fh=document.createElement("div");fh.setAttribute("oninput","return;"),za=typeof fh.oninput=="function"}Ba=za}else Ba=!1;hh=Ba&&(!document.documentMode||9<document.documentMode)}function dh(){Pr&&(Pr.detachEvent("onpropertychange",ph),Fr=Pr=null)}function ph(e){if(e.propertyName==="value"&&$s(Fr)){var t=[];uh(t,Fr,e,Ea(e)),Qc(Rg,t)}}function Lg(e,t,i){e==="focusin"?(dh(),Pr=t,Fr=i,Pr.attachEvent("onpropertychange",ph)):e==="focusout"&&dh()}function Mg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(Fr)}function Og(e,t){if(e==="click")return $s(t)}function Bg(e,t){if(e==="input"||e==="change")return $s(t)}function zg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:zg;function qr(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var f=i[r];if(!gn.call(t,f)||!Vt(e[f],t[f]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mh(e,t){var i=_h(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=_h(i)}}function gh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qs(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=qs(e.document)}return t}function Ha(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 Hg=Tn&&"documentMode"in document&&11>=document.documentMode,$i=null,Na=null,Vr=null,ja=!1;function Sh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ja||$i==null||$i!==qs(r)||(r=$i,"selectionStart"in r&&Ha(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&qr(Vr,r)||(Vr=r,r=jl(Na,"onSelect"),0<r.length&&(t=new Ks("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=$i)))}function Ci(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Qi={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},Ua={},yh={};Tn&&(yh=document.createElement("div").style,"AnimationEvent"in window||(delete Qi.animationend.animation,delete Qi.animationiteration.animation,delete Qi.animationstart.animation),"TransitionEvent"in window||delete Qi.transitionend.transition);function wi(e){if(Ua[e])return Ua[e];if(!Qi[e])return e;var t=Qi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in yh)return Ua[e]=t[i];return e}var bh=wi("animationend"),Ch=wi("animationiteration"),wh=wi("animationstart"),Ng=wi("transitionrun"),jg=wi("transitionstart"),Ug=wi("transitioncancel"),xh=wi("transitionend"),Eh=new Map,Ia="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(" ");Ia.push("scrollEnd");function fn(e,t){Eh.set(e,t),yi(t,[e])}var Qs=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)},tn=[],Zi=0,Pa=0;function Zs(){for(var e=Zi,t=Pa=Zi=0;t<e;){var i=tn[t];tn[t++]=null;var r=tn[t];tn[t++]=null;var f=tn[t];tn[t++]=null;var y=tn[t];if(tn[t++]=null,r!==null&&f!==null){var D=r.pending;D===null?f.next=f:(f.next=D.next,D.next=f),r.pending=f}y!==0&&kh(i,f,y)}}function Js(e,t,i,r){tn[Zi++]=e,tn[Zi++]=t,tn[Zi++]=i,tn[Zi++]=r,Pa|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Fa(e,t,i,r){return Js(e,t,i,r),el(e)}function xi(e,t){return Js(e,null,null,t),el(e)}function kh(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var f=!1,y=e.return;y!==null;)y.childLanes|=i,r=y.alternate,r!==null&&(r.childLanes|=i),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(f=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,f&&t!==null&&(f=31-Ze(i),e=y.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=i|536870912),y):null}function el(e){if(50<fs)throw fs=0,Zo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ji={};function Ig(e,t,i,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,i,r){return new Ig(e,t,i,r)}function qa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dn(e,t){var i=e.alternate;return i===null?(i=Gt(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 Ah(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 tl(e,t,i,r,f,y){var D=0;if(r=e,typeof e=="function")qa(e)&&(D=1);else if(typeof e=="string")D=Gv(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=Gt(31,i,t,f),e.elementType=B,e.lanes=y,e;case x:return Ei(i.children,f,y,t);case S:D=8,f|=24;break;case _:return e=Gt(12,i,t,f|2),e.elementType=_,e.lanes=y,e;case R:return e=Gt(13,i,t,f),e.elementType=R,e.lanes=y,e;case A:return e=Gt(19,i,t,f),e.elementType=A,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:D=10;break e;case d:D=9;break e;case E:D=11;break e;case L:D=14;break e;case T:D=16,r=null;break e}D=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=Gt(D,i,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function Ei(e,t,i,r){return e=Gt(7,e,r,t),e.lanes=i,e}function Va(e,t,i){return e=Gt(6,e,null,t),e.lanes=i,e}function Th(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function Ga(e,t,i){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Dh=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var i=Dh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:mn(t)},Dh.set(e,t),t)}return{value:e,source:t,stack:mn(t)}}var er=[],tr=0,nl=null,Gr=0,rn=[],sn=0,Xn=null,Sn=1,yn="";function Rn(e,t){er[tr++]=Gr,er[tr++]=nl,nl=e,Gr=t}function Rh(e,t,i){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Xn=e;var r=Sn;e=yn;var f=32-Ze(r)-1;r&=~(1<<f),i+=1;var y=32-Ze(t)+f;if(30<y){var D=f-f%5;y=(r&(1<<D)-1).toString(32),r>>=D,f-=D,Sn=1<<32-Ze(t)+f|i<<f|r,yn=y+e}else Sn=1<<y|i<<f|r,yn=e}function Ya(e){e.return!==null&&(Rn(e,1),Rh(e,1,0))}function Wa(e){for(;e===nl;)nl=er[--tr],er[tr]=null,Gr=er[--tr],er[tr]=null;for(;e===Xn;)Xn=rn[--sn],rn[sn]=null,yn=rn[--sn],rn[sn]=null,Sn=rn[--sn],rn[sn]=null}function Lh(e,t){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Sn=t.id,yn=t.overflow,Xn=e}var wt=null,nt=null,Ue=!1,$n=null,ln=!1,Ka=Error(o(519));function Qn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yr(nn(t,e)),Ka}function Mh(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[zt]=r,i){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(i=0;i<ps.length;i++)ze(ps[i],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),Gc(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),Wc(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||$d(t.textContent,i)?(r.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),r.onScroll!=null&&ze("scroll",t),r.onScrollEnd!=null&&ze("scrollend",t),r.onClick!=null&&(t.onclick=An),t=!0):t=!1,t||Qn(e,!0)}function Oh(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:ln=!1;return;case 27:case 3:ln=!0;return;default:wt=wt.return}}function nr(e){if(e!==wt)return!1;if(!Ue)return Oh(e),Ue=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||du(e.type,e.memoizedProps)),i=!i),i&&nt&&Qn(e),Oh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=sp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=sp(e)}else t===27?(t=nt,hi(e.type)?(e=vu,vu=null,nt=e):nt=t):nt=wt?on(e.stateNode.nextSibling):null;return!0}function ki(){nt=wt=null,Ue=!1}function Xa(){var e=$n;return e!==null&&(It===null?It=e:It.push.apply(It,e),$n=null),e}function Yr(e){$n===null?$n=[e]:$n.push(e)}var $a=O(null),Ai=null,Ln=null;function Zn(e,t,i){H($a,t._currentValue),t._currentValue=i}function Mn(e){e._currentValue=$a.current,I($a)}function Qa(e,t,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===i)break;e=e.return}}function Za(e,t,i,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var y=f.dependencies;if(y!==null){var D=f.child;y=y.firstContext;e:for(;y!==null;){var j=y;y=f;for(var K=0;K<t.length;K++)if(j.context===t[K]){y.lanes|=i,j=y.alternate,j!==null&&(j.lanes|=i),Qa(y.return,i,e),r||(D=null);break e}y=j.next}}else if(f.tag===18){if(D=f.return,D===null)throw Error(o(341));D.lanes|=i,y=D.alternate,y!==null&&(y.lanes|=i),Qa(D,i,e),D=null}else D=f.child;if(D!==null)D.return=f;else for(D=f;D!==null;){if(D===e){D=null;break}if(f=D.sibling,f!==null){f.return=D.return,D=f;break}D=D.return}f=D}}function ir(e,t,i,r){e=null;for(var f=t,y=!1;f!==null;){if(!y){if((f.flags&524288)!==0)y=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var D=f.alternate;if(D===null)throw Error(o(387));if(D=D.memoizedProps,D!==null){var j=f.type;Vt(f.pendingProps.value,D.value)||(e!==null?e.push(j):e=[j])}}else if(f===X.current){if(D=f.alternate,D===null)throw Error(o(387));D.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ss):e=[Ss])}f=f.return}e!==null&&Za(t,e,i,r),t.flags|=262144}function il(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ti(e){Ai=e,Ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Bh(Ai,e)}function rl(e,t){return Ai===null&&Ti(e),Bh(e,t)}function Bh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ln===null){if(e===null)throw Error(o(308));Ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ln=Ln.next=t;return i}var Pg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Fg=n.unstable_scheduleCallback,qg=n.unstable_NormalPriority,ht={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ja(){return{controller:new Pg,data:new Map,refCount:0}}function Wr(e){e.refCount--,e.refCount===0&&Fg(qg,function(){e.controller.abort()})}var Kr=null,eo=0,rr=0,sr=null;function Vg(e,t){if(Kr===null){var i=Kr=[];eo=0,rr=ru(),sr={status:"pending",value:void 0,then:function(r){i.push(r)}}}return eo++,t.then(zh,zh),t}function zh(){if(--eo===0&&Kr!==null){sr!==null&&(sr.status="fulfilled");var e=Kr;Kr=null,rr=0,sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Gg(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),r}var Hh=P.S;P.S=function(e,t){yd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Vg(e,t),Hh!==null&&Hh(e,t)};var Di=O(null);function to(){var e=Di.current;return e!==null?e:Je.pooledCache}function sl(e,t){t===null?H(Di,Di.current):H(Di,t.pool)}function Nh(){var e=to();return e===null?null:{parent:ht._currentValue,pool:e}}var lr=Error(o(460)),no=Error(o(474)),ll=Error(o(542)),al={then:function(){}};function jh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(An,An),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ph(e),e;default:if(typeof t.status=="string")t.then(An,An);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=r}},function(r){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ph(e),e}throw Li=t,lr}}function Ri(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Li=i,lr):i}}var Li=null;function Ih(){if(Li===null)throw Error(o(459));var e=Li;return Li=null,e}function Ph(e){if(e===lr||e===ll)throw Error(o(483))}var ar=null,Xr=0;function ol(e){var t=Xr;return Xr+=1,ar===null&&(ar=[]),Uh(ar,e,t)}function $r(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ul(e,t){throw t.$$typeof===C?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Fh(e){function t(J,Q){if(e){var ne=J.deletions;ne===null?(J.deletions=[Q],J.flags|=16):ne.push(Q)}}function i(J,Q){if(!e)return null;for(;Q!==null;)t(J,Q),Q=Q.sibling;return null}function r(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function f(J,Q){return J=Dn(J,Q),J.index=0,J.sibling=null,J}function y(J,Q,ne){return J.index=ne,e?(ne=J.alternate,ne!==null?(ne=ne.index,ne<Q?(J.flags|=67108866,Q):ne):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function D(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function j(J,Q,ne,he){return Q===null||Q.tag!==6?(Q=Va(ne,J.mode,he),Q.return=J,Q):(Q=f(Q,ne),Q.return=J,Q)}function K(J,Q,ne,he){var Ce=ne.type;return Ce===x?ce(J,Q,ne.props.children,he,ne.key):Q!==null&&(Q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===T&&Ri(Ce)===Q.type)?(Q=f(Q,ne.props),$r(Q,ne),Q.return=J,Q):(Q=tl(ne.type,ne.key,ne.props,null,J.mode,he),$r(Q,ne),Q.return=J,Q)}function re(J,Q,ne,he){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ne.containerInfo||Q.stateNode.implementation!==ne.implementation?(Q=Ga(ne,J.mode,he),Q.return=J,Q):(Q=f(Q,ne.children||[]),Q.return=J,Q)}function ce(J,Q,ne,he,Ce){return Q===null||Q.tag!==7?(Q=Ei(ne,J.mode,he,Ce),Q.return=J,Q):(Q=f(Q,ne),Q.return=J,Q)}function fe(J,Q,ne){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Va(""+Q,J.mode,ne),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return ne=tl(Q.type,Q.key,Q.props,null,J.mode,ne),$r(ne,Q),ne.return=J,ne;case k:return Q=Ga(Q,J.mode,ne),Q.return=J,Q;case T:return Q=Ri(Q),fe(J,Q,ne)}if(W(Q)||G(Q))return Q=Ei(Q,J.mode,ne,null),Q.return=J,Q;if(typeof Q.then=="function")return fe(J,ol(Q),ne);if(Q.$$typeof===g)return fe(J,rl(J,Q),ne);ul(J,Q)}return null}function se(J,Q,ne,he){var Ce=Q!==null?Q.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Ce!==null?null:j(J,Q,""+ne,he);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case w:return ne.key===Ce?K(J,Q,ne,he):null;case k:return ne.key===Ce?re(J,Q,ne,he):null;case T:return ne=Ri(ne),se(J,Q,ne,he)}if(W(ne)||G(ne))return Ce!==null?null:ce(J,Q,ne,he,null);if(typeof ne.then=="function")return se(J,Q,ol(ne),he);if(ne.$$typeof===g)return se(J,Q,rl(J,ne),he);ul(J,ne)}return null}function le(J,Q,ne,he,Ce){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return J=J.get(ne)||null,j(Q,J,""+he,Ce);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case w:return J=J.get(he.key===null?ne:he.key)||null,K(Q,J,he,Ce);case k:return J=J.get(he.key===null?ne:he.key)||null,re(Q,J,he,Ce);case T:return he=Ri(he),le(J,Q,ne,he,Ce)}if(W(he)||G(he))return J=J.get(ne)||null,ce(Q,J,he,Ce,null);if(typeof he.then=="function")return le(J,Q,ne,ol(he),Ce);if(he.$$typeof===g)return le(J,Q,ne,rl(Q,he),Ce);ul(Q,he)}return null}function ve(J,Q,ne,he){for(var Ce=null,qe=null,ye=Q,Re=Q=0,je=null;ye!==null&&Re<ne.length;Re++){ye.index>Re?(je=ye,ye=null):je=ye.sibling;var Ve=se(J,ye,ne[Re],he);if(Ve===null){ye===null&&(ye=je);break}e&&ye&&Ve.alternate===null&&t(J,ye),Q=y(Ve,Q,Re),qe===null?Ce=Ve:qe.sibling=Ve,qe=Ve,ye=je}if(Re===ne.length)return i(J,ye),Ue&&Rn(J,Re),Ce;if(ye===null){for(;Re<ne.length;Re++)ye=fe(J,ne[Re],he),ye!==null&&(Q=y(ye,Q,Re),qe===null?Ce=ye:qe.sibling=ye,qe=ye);return Ue&&Rn(J,Re),Ce}for(ye=r(ye);Re<ne.length;Re++)je=le(ye,J,Re,ne[Re],he),je!==null&&(e&&je.alternate!==null&&ye.delete(je.key===null?Re:je.key),Q=y(je,Q,Re),qe===null?Ce=je:qe.sibling=je,qe=je);return e&&ye.forEach(function(mi){return t(J,mi)}),Ue&&Rn(J,Re),Ce}function Ee(J,Q,ne,he){if(ne==null)throw Error(o(151));for(var Ce=null,qe=null,ye=Q,Re=Q=0,je=null,Ve=ne.next();ye!==null&&!Ve.done;Re++,Ve=ne.next()){ye.index>Re?(je=ye,ye=null):je=ye.sibling;var mi=se(J,ye,Ve.value,he);if(mi===null){ye===null&&(ye=je);break}e&&ye&&mi.alternate===null&&t(J,ye),Q=y(mi,Q,Re),qe===null?Ce=mi:qe.sibling=mi,qe=mi,ye=je}if(Ve.done)return i(J,ye),Ue&&Rn(J,Re),Ce;if(ye===null){for(;!Ve.done;Re++,Ve=ne.next())Ve=fe(J,Ve.value,he),Ve!==null&&(Q=y(Ve,Q,Re),qe===null?Ce=Ve:qe.sibling=Ve,qe=Ve);return Ue&&Rn(J,Re),Ce}for(ye=r(ye);!Ve.done;Re++,Ve=ne.next())Ve=le(ye,J,Re,Ve.value,he),Ve!==null&&(e&&Ve.alternate!==null&&ye.delete(Ve.key===null?Re:Ve.key),Q=y(Ve,Q,Re),qe===null?Ce=Ve:qe.sibling=Ve,qe=Ve);return e&&ye.forEach(function(n0){return t(J,n0)}),Ue&&Rn(J,Re),Ce}function Qe(J,Q,ne,he){if(typeof ne=="object"&&ne!==null&&ne.type===x&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case w:e:{for(var Ce=ne.key;Q!==null;){if(Q.key===Ce){if(Ce=ne.type,Ce===x){if(Q.tag===7){i(J,Q.sibling),he=f(Q,ne.props.children),he.return=J,J=he;break e}}else if(Q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===T&&Ri(Ce)===Q.type){i(J,Q.sibling),he=f(Q,ne.props),$r(he,ne),he.return=J,J=he;break e}i(J,Q);break}else t(J,Q);Q=Q.sibling}ne.type===x?(he=Ei(ne.props.children,J.mode,he,ne.key),he.return=J,J=he):(he=tl(ne.type,ne.key,ne.props,null,J.mode,he),$r(he,ne),he.return=J,J=he)}return D(J);case k:e:{for(Ce=ne.key;Q!==null;){if(Q.key===Ce)if(Q.tag===4&&Q.stateNode.containerInfo===ne.containerInfo&&Q.stateNode.implementation===ne.implementation){i(J,Q.sibling),he=f(Q,ne.children||[]),he.return=J,J=he;break e}else{i(J,Q);break}else t(J,Q);Q=Q.sibling}he=Ga(ne,J.mode,he),he.return=J,J=he}return D(J);case T:return ne=Ri(ne),Qe(J,Q,ne,he)}if(W(ne))return ve(J,Q,ne,he);if(G(ne)){if(Ce=G(ne),typeof Ce!="function")throw Error(o(150));return ne=Ce.call(ne),Ee(J,Q,ne,he)}if(typeof ne.then=="function")return Qe(J,Q,ol(ne),he);if(ne.$$typeof===g)return Qe(J,Q,rl(J,ne),he);ul(J,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,Q!==null&&Q.tag===6?(i(J,Q.sibling),he=f(Q,ne),he.return=J,J=he):(i(J,Q),he=Va(ne,J.mode,he),he.return=J,J=he),D(J)):i(J,Q)}return function(J,Q,ne,he){try{Xr=0;var Ce=Qe(J,Q,ne,he);return ar=null,Ce}catch(ye){if(ye===lr||ye===ll)throw ye;var qe=Gt(29,ye,null,J.mode);return qe.lanes=he,qe.return=J,qe}finally{}}}var Mi=Fh(!0),qh=Fh(!1),Jn=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ro(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 ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ti(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ge&2)!==0){var f=r.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),r.pending=t,t=el(e),kh(e,null,i),t}return Js(e,r,t,i),el(e)}function Qr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Bc(e,i)}}function so(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var f=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var D={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};y===null?f=y=D:y=y.next=D,i=i.next}while(i!==null);y===null?f=y=t:y=y.next=t}else f=y=t;i={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:y,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var lo=!1;function Zr(){if(lo){var e=sr;if(e!==null)throw e}}function Jr(e,t,i,r){lo=!1;var f=e.updateQueue;Jn=!1;var y=f.firstBaseUpdate,D=f.lastBaseUpdate,j=f.shared.pending;if(j!==null){f.shared.pending=null;var K=j,re=K.next;K.next=null,D===null?y=re:D.next=re,D=K;var ce=e.alternate;ce!==null&&(ce=ce.updateQueue,j=ce.lastBaseUpdate,j!==D&&(j===null?ce.firstBaseUpdate=re:j.next=re,ce.lastBaseUpdate=K))}if(y!==null){var fe=f.baseState;D=0,ce=re=K=null,j=y;do{var se=j.lane&-536870913,le=se!==j.lane;if(le?(Ne&se)===se:(r&se)===se){se!==0&&se===rr&&(lo=!0),ce!==null&&(ce=ce.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var ve=e,Ee=j;se=t;var Qe=i;switch(Ee.tag){case 1:if(ve=Ee.payload,typeof ve=="function"){fe=ve.call(Qe,fe,se);break e}fe=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ee.payload,se=typeof ve=="function"?ve.call(Qe,fe,se):ve,se==null)break e;fe=c({},fe,se);break e;case 2:Jn=!0}}se=j.callback,se!==null&&(e.flags|=64,le&&(e.flags|=8192),le=f.callbacks,le===null?f.callbacks=[se]:le.push(se))}else le={lane:se,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ce===null?(re=ce=le,K=fe):ce=ce.next=le,D|=se;if(j=j.next,j===null){if(j=f.shared.pending,j===null)break;le=j,j=le.next,le.next=null,f.lastBaseUpdate=le,f.shared.pending=null}}while(!0);ce===null&&(K=fe),f.baseState=K,f.firstBaseUpdate=re,f.lastBaseUpdate=ce,y===null&&(f.shared.lanes=0),li|=D,e.lanes=D,e.memoizedState=fe}}function Vh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Gh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Vh(i[e],t)}var or=O(null),cl=O(0);function Yh(e,t){e=Pn,H(cl,e),H(or,t),Pn=e|t.baseLanes}function ao(){H(cl,Pn),H(or,or.current)}function oo(){Pn=cl.current,I(or),I(cl)}var Yt=O(null),an=null;function ni(e){var t=e.alternate;H(ut,ut.current&1),H(Yt,e),an===null&&(t===null||or.current!==null||t.memoizedState!==null)&&(an=e)}function uo(e){H(ut,ut.current),H(Yt,e),an===null&&(an=e)}function Wh(e){e.tag===22?(H(ut,ut.current),H(Yt,e),an===null&&(an=e)):ii()}function ii(){H(ut,ut.current),H(Yt,Yt.current)}function Wt(e){I(Yt),an===e&&(an=null),I(ut)}var ut=O(0);function hl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||mu(i)||gu(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 On=0,De=null,Xe=null,ft=null,fl=!1,ur=!1,Oi=!1,dl=0,es=0,cr=null,Yg=0;function st(){throw Error(o(321))}function co(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Vt(e[i],t[i]))return!1;return!0}function ho(e,t,i,r,f,y){return On=y,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Lf:Ao,Oi=!1,y=i(r,f),Oi=!1,ur&&(y=Xh(t,i,r,f)),Kh(e),y}function Kh(e){P.H=is;var t=Xe!==null&&Xe.next!==null;if(On=0,ft=Xe=De=null,fl=!1,es=0,cr=null,t)throw Error(o(300));e===null||dt||(e=e.dependencies,e!==null&&il(e)&&(dt=!0))}function Xh(e,t,i,r){De=e;var f=0;do{if(ur&&(cr=null),es=0,ur=!1,25<=f)throw Error(o(301));if(f+=1,ft=Xe=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}P.H=Mf,y=t(i,r)}while(ur);return y}function Wg(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?ts(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(De.flags|=1024),t}function fo(){var e=dl!==0;return dl=0,e}function po(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function _o(e){if(fl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fl=!1}On=0,ft=Xe=De=null,ur=!1,es=dl=0,cr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?De.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ft===null?De.memoizedState:ft.next;if(t!==null)ft=t,Xe=e;else{if(e===null)throw De.alternate===null?Error(o(467)):Error(o(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?De.memoizedState=ft=e:ft=ft.next=e}return ft}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=es;return es+=1,cr===null&&(cr=[]),e=Uh(cr,e,t),t=De,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Lf:Ao),e}function _l(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ts(e);if(e.$$typeof===g)return xt(e)}throw Error(o(438,String(e)))}function mo(e){var t=null,i=De.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=De.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=pl(),De.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=N;return t.index++,i}function Bn(e,t){return typeof t=="function"?t(e):t}function ml(e){var t=ct();return go(t,Xe,e)}function go(e,t,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var f=e.baseQueue,y=r.pending;if(y!==null){if(f!==null){var D=f.next;f.next=y.next,y.next=D}t.baseQueue=f=y,r.pending=null}if(y=e.baseState,f===null)e.memoizedState=y;else{t=f.next;var j=D=null,K=null,re=t,ce=!1;do{var fe=re.lane&-536870913;if(fe!==re.lane?(Ne&fe)===fe:(On&fe)===fe){var se=re.revertLane;if(se===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),fe===rr&&(ce=!0);else if((On&se)===se){re=re.next,se===rr&&(ce=!0);continue}else fe={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},K===null?(j=K=fe,D=y):K=K.next=fe,De.lanes|=se,li|=se;fe=re.action,Oi&&i(y,fe),y=re.hasEagerState?re.eagerState:i(y,fe)}else se={lane:fe,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},K===null?(j=K=se,D=y):K=K.next=se,De.lanes|=fe,li|=fe;re=re.next}while(re!==null&&re!==t);if(K===null?D=y:K.next=j,!Vt(y,e.memoizedState)&&(dt=!0,ce&&(i=sr,i!==null)))throw i;e.memoizedState=y,e.baseState=D,e.baseQueue=K,r.lastRenderedState=y}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vo(e){var t=ct(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,f=i.pending,y=t.memoizedState;if(f!==null){i.pending=null;var D=f=f.next;do y=e(y,D.action),D=D.next;while(D!==f);Vt(y,t.memoizedState)||(dt=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,r]}function $h(e,t,i){var r=De,f=ct(),y=Ue;if(y){if(i===void 0)throw Error(o(407));i=i()}else i=t();var D=!Vt((Xe||f).memoizedState,i);if(D&&(f.memoizedState=i,dt=!0),f=f.queue,bo(Jh.bind(null,r,f,e),[e]),f.getSnapshot!==t||D||ft!==null&&ft.memoizedState.tag&1){if(r.flags|=2048,hr(9,{destroy:void 0},Zh.bind(null,r,f,i,t),null),Je===null)throw Error(o(349));y||(On&127)!==0||Qh(r,t,i)}return i}function Qh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=De.updateQueue,t===null?(t=pl(),De.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Zh(e,t,i,r){t.value=i,t.getSnapshot=r,ef(t)&&tf(e)}function Jh(e,t,i){return i(function(){ef(t)&&tf(e)})}function ef(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Vt(e,i)}catch{return!0}}function tf(e){var t=xi(e,2);t!==null&&Pt(t,e,2)}function So(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),Oi){Bt(!0);try{i()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function nf(e,t,i,r){return e.baseState=i,go(e,Xe,typeof r=="function"?r:Bn)}function Kg(e,t,i,r,f){if(Sl(e))throw Error(o(485));if(e=t.action,e!==null){var y={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){y.listeners.push(D)}};P.T!==null?i(!0):y.isTransition=!1,r(y),i=t.pending,i===null?(y.next=t.pending=y,rf(t,y)):(y.next=i.next,t.pending=i.next=y)}}function rf(e,t){var i=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=P.T,D={};P.T=D;try{var j=i(f,r),K=P.S;K!==null&&K(D,j),sf(e,t,j)}catch(re){yo(e,t,re)}finally{y!==null&&D.types!==null&&(y.types=D.types),P.T=y}}else try{y=i(f,r),sf(e,t,y)}catch(re){yo(e,t,re)}}function sf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){lf(e,t,r)},function(r){return yo(e,t,r)}):lf(e,t,i)}function lf(e,t,i){t.status="fulfilled",t.value=i,af(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,rf(e,i)))}function yo(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,af(t),t=t.next;while(t!==r)}e.action=null}function af(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function of(e,t){return t}function uf(e,t){if(Ue){var i=Je.formState;if(i!==null){e:{var r=De;if(Ue){if(nt){t:{for(var f=nt,y=ln;f.nodeType!==8;){if(!y){f=null;break t}if(f=on(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){nt=on(f.nextSibling),r=f.data==="F!";break e}}Qn(r)}r=!1}r&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:of,lastRenderedState:t},i.queue=r,i=Tf.bind(null,De,r),r.dispatch=i,r=So(!1),y=ko.bind(null,De,!1,r.queue),r=Lt(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,i=Kg.bind(null,De,f,y,i),f.dispatch=i,r.memoizedState=e,[t,i,!1]}function cf(e){var t=ct();return hf(t,Xe,e)}function hf(e,t,i){if(t=go(e,t,of)[0],e=ml(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ts(t)}catch(D){throw D===lr?ll:D}else r=t;t=ct();var f=t.queue,y=f.dispatch;return i!==t.memoizedState&&(De.flags|=2048,hr(9,{destroy:void 0},Xg.bind(null,f,i),null)),[r,y,e]}function Xg(e,t){e.action=t}function ff(e){var t=ct(),i=Xe;if(i!==null)return hf(t,i,e);ct(),t=t.memoizedState,i=ct();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function hr(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=De.updateQueue,t===null&&(t=pl(),De.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function df(){return ct().memoizedState}function gl(e,t,i,r){var f=Lt();De.flags|=e,f.memoizedState=hr(1|t,{destroy:void 0},i,r===void 0?null:r)}function vl(e,t,i,r){var f=ct();r=r===void 0?null:r;var y=f.memoizedState.inst;Xe!==null&&r!==null&&co(r,Xe.memoizedState.deps)?f.memoizedState=hr(t,y,i,r):(De.flags|=e,f.memoizedState=hr(1|t,y,i,r))}function pf(e,t){gl(8390656,8,e,t)}function bo(e,t){vl(2048,8,e,t)}function $g(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=pl(),De.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function _f(e){var t=ct().memoizedState;return $g({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function mf(e,t){return vl(4,2,e,t)}function gf(e,t){return vl(4,4,e,t)}function vf(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 Sf(e,t,i){i=i!=null?i.concat([e]):null,vl(4,4,vf.bind(null,t,e),i)}function Co(){}function yf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&co(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function bf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&co(t,r[1]))return r[0];if(r=e(),Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r}function wo(e,t,i){return i===void 0||(On&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Cd(),De.lanes|=e,li|=e,i)}function Cf(e,t,i,r){return Vt(i,t)?i:or.current!==null?(e=wo(e,i,r),Vt(e,t)||(dt=!0),e):(On&42)===0||(On&1073741824)!==0&&(Ne&261930)===0?(dt=!0,e.memoizedState=i):(e=Cd(),De.lanes|=e,li|=e,t)}function wf(e,t,i,r,f){var y=Y.p;Y.p=y!==0&&8>y?y:8;var D=P.T,j={};P.T=j,ko(e,!1,t,i);try{var K=f(),re=P.S;if(re!==null&&re(j,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var ce=Gg(K,r);ns(e,t,ce,$t(e))}else ns(e,t,r,$t(e))}catch(fe){ns(e,t,{then:function(){},status:"rejected",reason:fe},$t())}finally{Y.p=y,D!==null&&j.types!==null&&(D.types=j.types),P.T=D}}function Qg(){}function xo(e,t,i,r){if(e.tag!==5)throw Error(o(476));var f=xf(e).queue;wf(e,f,t,ee,i===null?Qg:function(){return Ef(e),i(r)})}function xf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:ee},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ef(e){var t=xf(e);t.next===null&&(t=e.alternate.memoizedState),ns(e,t.next.queue,{},$t())}function Eo(){return xt(Ss)}function kf(){return ct().memoizedState}function Af(){return ct().memoizedState}function Zg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=$t();e=ei(i);var r=ti(t,e,i);r!==null&&(Pt(r,t,i),Qr(r,t,i)),t={cache:Ja()},e.payload=t;return}t=t.return}}function Jg(e,t,i){var r=$t();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Sl(e)?Df(t,i):(i=Fa(e,t,i,r),i!==null&&(Pt(i,e,r),Rf(i,t,r)))}function Tf(e,t,i){var r=$t();ns(e,t,i,r)}function ns(e,t,i,r){var f={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Sl(e))Df(t,f);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=t.lastRenderedReducer,y!==null))try{var D=t.lastRenderedState,j=y(D,i);if(f.hasEagerState=!0,f.eagerState=j,Vt(j,D))return Js(e,t,f,0),Je===null&&Zs(),!1}catch{}finally{}if(i=Fa(e,t,f,r),i!==null)return Pt(i,e,r),Rf(i,t,r),!0}return!1}function ko(e,t,i,r){if(r={lane:2,revertLane:ru(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Sl(e)){if(t)throw Error(o(479))}else t=Fa(e,i,r,2),t!==null&&Pt(t,e,2)}function Sl(e){var t=e.alternate;return e===De||t!==null&&t===De}function Df(e,t){ur=fl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Rf(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Bc(e,i)}}var is={readContext:xt,use:_l,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};is.useEffectEvent=st;var Lf={readContext:xt,use:_l,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:pf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,gl(4194308,4,vf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return gl(4194308,4,e,t)},useInsertionEffect:function(e,t){gl(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var r=e();if(Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Lt();if(i!==void 0){var f=i(t);if(Oi){Bt(!0);try{i(t)}finally{Bt(!1)}}}else f=t;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=Jg.bind(null,De,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=So(e);var t=e.queue,i=Tf.bind(null,De,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Co,useDeferredValue:function(e,t){var i=Lt();return wo(i,e,t)},useTransition:function(){var e=So(!1);return e=wf.bind(null,De,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=De,f=Lt();if(Ue){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),Je===null)throw Error(o(349));(Ne&127)!==0||Qh(r,t,i)}f.memoizedState=i;var y={value:i,getSnapshot:t};return f.queue=y,pf(Jh.bind(null,r,y,e),[e]),r.flags|=2048,hr(9,{destroy:void 0},Zh.bind(null,r,y,i,t),null),i},useId:function(){var e=Lt(),t=Je.identifierPrefix;if(Ue){var i=yn,r=Sn;i=(r&~(1<<32-Ze(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=dl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Yg++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Eo,useFormState:uf,useActionState:uf,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ko.bind(null,De,!0,i),i.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return Lt().memoizedState=Zg.bind(null,De)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if((Ge&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Ao={readContext:xt,use:_l,useCallback:yf,useContext:xt,useEffect:bo,useImperativeHandle:Sf,useInsertionEffect:mf,useLayoutEffect:gf,useMemo:bf,useReducer:ml,useRef:df,useState:function(){return ml(Bn)},useDebugValue:Co,useDeferredValue:function(e,t){var i=ct();return Cf(i,Xe.memoizedState,e,t)},useTransition:function(){var e=ml(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:$h,useId:kf,useHostTransitionStatus:Eo,useFormState:cf,useActionState:cf,useOptimistic:function(e,t){var i=ct();return nf(i,Xe,e,t)},useMemoCache:mo,useCacheRefresh:Af};Ao.useEffectEvent=_f;var Mf={readContext:xt,use:_l,useCallback:yf,useContext:xt,useEffect:bo,useImperativeHandle:Sf,useInsertionEffect:mf,useLayoutEffect:gf,useMemo:bf,useReducer:vo,useRef:df,useState:function(){return vo(Bn)},useDebugValue:Co,useDeferredValue:function(e,t){var i=ct();return Xe===null?wo(i,e,t):Cf(i,Xe.memoizedState,e,t)},useTransition:function(){var e=vo(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:$h,useId:kf,useHostTransitionStatus:Eo,useFormState:ff,useActionState:ff,useOptimistic:function(e,t){var i=ct();return Xe!==null?nf(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:mo,useCacheRefresh:Af};Mf.useEffectEvent=_f;function To(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:c({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Do={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=$t(),r=ei(i);r.tag=2,t!=null&&(r.callback=t),t=ti(e,r,i),t!==null&&(Pt(t,e,i),Qr(t,e,i))}};function Of(e,t,i,r,f,y,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,y,D):t.prototype&&t.prototype.isPureReactComponent?!qr(i,r)||!qr(f,y):!0}function Bf(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&Do.enqueueReplaceState(t,t.state,null)}function Bi(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=c({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function zf(e){Qs(e)}function Hf(e){console.error(e)}function Nf(e){Qs(e)}function yl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function jf(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ro(e,t,i){return i=ei(i),i.tag=3,i.payload={element:null},i.callback=function(){yl(e,t)},i}function Uf(e){return e=ei(e),e.tag=3,e}function If(e,t,i,r){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var y=r.value;e.payload=function(){return f(y)},e.callback=function(){jf(t,i,r)}}var D=i.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){jf(t,i,r),typeof f!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var j=r.stack;this.componentDidCatch(r.value,{componentStack:j!==null?j:""})})}function ev(e,t,i,r,f){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&ir(t,i,f,!0),i=Yt.current,i!==null){switch(i.tag){case 31:case 13:return an===null?Ml():i.alternate===null&&lt===0&&(lt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,r===al?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),tu(e,r,f)),!1;case 22:return i.flags|=65536,r===al?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),tu(e,r,f)),!1}throw Error(o(435,i.tag))}return tu(e,r,f),Ml(),!1}if(Ue)return t=Yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Ka&&(e=Error(o(422),{cause:r}),Yr(nn(e,i)))):(r!==Ka&&(t=Error(o(423),{cause:r}),Yr(nn(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=nn(r,i),f=Ro(e.stateNode,r,f),so(e,f),lt!==4&&(lt=2)),!1;var y=Error(o(520),{cause:r});if(y=nn(y,i),hs===null?hs=[y]:hs.push(y),lt!==4&&(lt=2),t===null)return!0;r=nn(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Ro(i.stateNode,r,e),so(i,e),!1;case 1:if(t=i.type,y=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ai===null||!ai.has(y))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Uf(f),If(f,e,i,r),so(i,f),!1}i=i.return}while(i!==null);return!1}var Lo=Error(o(461)),dt=!1;function Et(e,t,i,r){t.child=e===null?qh(t,null,i,r):Mi(t,e.child,i,r)}function Pf(e,t,i,r,f){i=i.render;var y=t.ref;if("ref"in r){var D={};for(var j in r)j!=="ref"&&(D[j]=r[j])}else D=r;return Ti(t),r=ho(e,t,i,D,y,f),j=fo(),e!==null&&!dt?(po(e,t,f),zn(e,t,f)):(Ue&&j&&Ya(t),t.flags|=1,Et(e,t,r,f),t.child)}function Ff(e,t,i,r,f){if(e===null){var y=i.type;return typeof y=="function"&&!qa(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,qf(e,t,y,r,f)):(e=tl(i.type,null,r,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,!Uo(e,f)){var D=y.memoizedProps;if(i=i.compare,i=i!==null?i:qr,i(D,r)&&e.ref===t.ref)return zn(e,t,f)}return t.flags|=1,e=Dn(y,r),e.ref=t.ref,e.return=t,t.child=e}function qf(e,t,i,r,f){if(e!==null){var y=e.memoizedProps;if(qr(y,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=y,Uo(e,f))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,zn(e,t,f)}return Mo(e,t,i,r,f)}function Vf(e,t,i,r){var f=r.children,y=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(y=y!==null?y.baseLanes|i:i,e!==null){for(r=t.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~y}else r=0,t.child=null;return Gf(e,t,y,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&sl(t,y!==null?y.cachePool:null),y!==null?Yh(t,y):ao(),Wh(t);else return r=t.lanes=536870912,Gf(e,t,y!==null?y.baseLanes|i:i,i,r)}else y!==null?(sl(t,y.cachePool),Yh(t,y),ii(),t.memoizedState=null):(e!==null&&sl(t,null),ao(),ii());return Et(e,t,f,i),t.child}function rs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Gf(e,t,i,r,f){var y=to();return y=y===null?null:{parent:ht._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&sl(t,null),ao(),Wh(t),e!==null&&ir(e,t,r,!0),t.childLanes=f,null}function bl(e,t){return t=wl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yf(e,t,i){return Mi(t,e.child,null,i),e=bl(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function tv(e,t,i){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(r.mode==="hidden")return e=bl(t,r),t.lanes=536870912,rs(null,e);if(uo(t),(e=nt)?(e=rp(e,ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Th(e),i.return=t,t.child=i,wt=t,nt=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return bl(t,r)}var y=e.memoizedState;if(y!==null){var D=y.dehydrated;if(uo(t),f)if(t.flags&256)t.flags&=-257,t=Yf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(dt||ir(e,t,i,!1),f=(i&e.childLanes)!==0,dt||f){if(r=Je,r!==null&&(D=zc(r,i),D!==0&&D!==y.retryLane))throw y.retryLane=D,xi(e,D),Pt(r,e,D),Lo;Ml(),t=Yf(e,t,i)}else e=y.treeContext,nt=on(D.nextSibling),wt=t,Ue=!0,$n=null,ln=!1,e!==null&&Lh(t,e),t=bl(t,r),t.flags|=4096;return t}return e=Dn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Cl(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 Mo(e,t,i,r,f){return Ti(t),i=ho(e,t,i,r,void 0,f),r=fo(),e!==null&&!dt?(po(e,t,f),zn(e,t,f)):(Ue&&r&&Ya(t),t.flags|=1,Et(e,t,i,f),t.child)}function Wf(e,t,i,r,f,y){return Ti(t),t.updateQueue=null,i=Xh(t,r,i,f),Kh(e),r=fo(),e!==null&&!dt?(po(e,t,y),zn(e,t,y)):(Ue&&r&&Ya(t),t.flags|=1,Et(e,t,i,y),t.child)}function Kf(e,t,i,r,f){if(Ti(t),t.stateNode===null){var y=Ji,D=i.contextType;typeof D=="object"&&D!==null&&(y=xt(D)),y=new i(r,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Do,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=r,y.state=t.memoizedState,y.refs={},io(t),D=i.contextType,y.context=typeof D=="object"&&D!==null?xt(D):Ji,y.state=t.memoizedState,D=i.getDerivedStateFromProps,typeof D=="function"&&(To(t,i,D,r),y.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(D=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),D!==y.state&&Do.enqueueReplaceState(y,y.state,null),Jr(t,r,y,f),Zr(),y.state=t.memoizedState),typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){y=t.stateNode;var j=t.memoizedProps,K=Bi(i,j);y.props=K;var re=y.context,ce=i.contextType;D=Ji,typeof ce=="object"&&ce!==null&&(D=xt(ce));var fe=i.getDerivedStateFromProps;ce=typeof fe=="function"||typeof y.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,ce||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(j||re!==D)&&Bf(t,y,r,D),Jn=!1;var se=t.memoizedState;y.state=se,Jr(t,r,y,f),Zr(),re=t.memoizedState,j||se!==re||Jn?(typeof fe=="function"&&(To(t,i,fe,r),re=t.memoizedState),(K=Jn||Of(t,i,K,r,se,re,D))?(ce||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=re),y.props=r,y.state=re,y.context=D,r=K):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,ro(e,t),D=t.memoizedProps,ce=Bi(i,D),y.props=ce,fe=t.pendingProps,se=y.context,re=i.contextType,K=Ji,typeof re=="object"&&re!==null&&(K=xt(re)),j=i.getDerivedStateFromProps,(re=typeof j=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D!==fe||se!==K)&&Bf(t,y,r,K),Jn=!1,se=t.memoizedState,y.state=se,Jr(t,r,y,f),Zr();var le=t.memoizedState;D!==fe||se!==le||Jn||e!==null&&e.dependencies!==null&&il(e.dependencies)?(typeof j=="function"&&(To(t,i,j,r),le=t.memoizedState),(ce=Jn||Of(t,i,ce,r,se,le,K)||e!==null&&e.dependencies!==null&&il(e.dependencies))?(re||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(r,le,K),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(r,le,K)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=le),y.props=r,y.state=le,y.context=K,r=ce):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),r=!1)}return y=r,Cl(e,t),r=(t.flags&128)!==0,y||r?(y=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:y.render(),t.flags|=1,e!==null&&r?(t.child=Mi(t,e.child,null,f),t.child=Mi(t,null,i,f)):Et(e,t,i,f),t.memoizedState=y.state,e=t.child):e=zn(e,t,f),e}function Xf(e,t,i,r){return ki(),t.flags|=256,Et(e,t,i,r),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bo(e){return{baseLanes:e,cachePool:Nh()}}function zo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Xt),e}function $f(e,t,i){var r=t.pendingProps,f=!1,y=(t.flags&128)!==0,D;if((D=y)||(D=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),D&&(f=!0,t.flags&=-129),D=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(f?ni(t):ii(),(e=nt)?(e=rp(e,ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Th(e),i.return=t,t.child=i,wt=t,nt=null)):e=null,e===null)throw Qn(t);return gu(e)?t.lanes=32:t.lanes=536870912,null}var j=r.children;return r=r.fallback,f?(ii(),f=t.mode,j=wl({mode:"hidden",children:j},f),r=Ei(r,f,i,null),j.return=t,r.return=t,j.sibling=r,t.child=j,r=t.child,r.memoizedState=Bo(i),r.childLanes=zo(e,D,i),t.memoizedState=Oo,rs(null,r)):(ni(t),Ho(t,j))}var K=e.memoizedState;if(K!==null&&(j=K.dehydrated,j!==null)){if(y)t.flags&256?(ni(t),t.flags&=-257,t=No(e,t,i)):t.memoizedState!==null?(ii(),t.child=e.child,t.flags|=128,t=null):(ii(),j=r.fallback,f=t.mode,r=wl({mode:"visible",children:r.children},f),j=Ei(j,f,i,null),j.flags|=2,r.return=t,j.return=t,r.sibling=j,t.child=r,Mi(t,e.child,null,i),r=t.child,r.memoizedState=Bo(i),r.childLanes=zo(e,D,i),t.memoizedState=Oo,t=rs(null,r));else if(ni(t),gu(j)){if(D=j.nextSibling&&j.nextSibling.dataset,D)var re=D.dgst;D=re,r=Error(o(419)),r.stack="",r.digest=D,Yr({value:r,source:null,stack:null}),t=No(e,t,i)}else if(dt||ir(e,t,i,!1),D=(i&e.childLanes)!==0,dt||D){if(D=Je,D!==null&&(r=zc(D,i),r!==0&&r!==K.retryLane))throw K.retryLane=r,xi(e,r),Pt(D,e,r),Lo;mu(j)||Ml(),t=No(e,t,i)}else mu(j)?(t.flags|=192,t.child=e.child,t=null):(e=K.treeContext,nt=on(j.nextSibling),wt=t,Ue=!0,$n=null,ln=!1,e!==null&&Lh(t,e),t=Ho(t,r.children),t.flags|=4096);return t}return f?(ii(),j=r.fallback,f=t.mode,K=e.child,re=K.sibling,r=Dn(K,{mode:"hidden",children:r.children}),r.subtreeFlags=K.subtreeFlags&65011712,re!==null?j=Dn(re,j):(j=Ei(j,f,i,null),j.flags|=2),j.return=t,r.return=t,r.sibling=j,t.child=r,rs(null,r),r=t.child,j=e.child.memoizedState,j===null?j=Bo(i):(f=j.cachePool,f!==null?(K=ht._currentValue,f=f.parent!==K?{parent:K,pool:K}:f):f=Nh(),j={baseLanes:j.baseLanes|i,cachePool:f}),r.memoizedState=j,r.childLanes=zo(e,D,i),t.memoizedState=Oo,rs(e.child,r)):(ni(t),i=e.child,e=i.sibling,i=Dn(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(D=t.deletions,D===null?(t.deletions=[e],t.flags|=16):D.push(e)),t.child=i,t.memoizedState=null,i)}function Ho(e,t){return t=wl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wl(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function No(e,t,i){return Mi(t,e.child,null,i),e=Ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qf(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qa(e.return,t,i)}function jo(e,t,i,r,f,y){var D=e.memoizedState;D===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:f,treeForkCount:y}:(D.isBackwards=t,D.rendering=null,D.renderingStartTime=0,D.last=r,D.tail=i,D.tailMode=f,D.treeForkCount=y)}function Zf(e,t,i){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var D=ut.current,j=(D&2)!==0;if(j?(D=D&1|2,t.flags|=128):D&=1,H(ut,D),Et(e,t,r,i),r=Ue?Gr:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qf(e,i,t);else if(e.tag===19)Qf(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(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&hl(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),jo(t,!1,f,i,y,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&hl(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}jo(t,!0,i,null,y,r);break;case"together":jo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function zn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),li|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ir(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=Dn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Dn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&il(e)))}function nv(e,t,i){switch(t.tag){case 3:U(t,t.stateNode.containerInfo),Zn(t,ht,e.memoizedState.cache),ki();break;case 27:case 5:Z(t);break;case 4:U(t,t.stateNode.containerInfo);break;case 10:Zn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ni(t),t.flags|=128,null):(i&t.child.childLanes)!==0?$f(e,t,i):(ni(t),e=zn(e,t,i),e!==null?e.sibling:null);ni(t);break;case 19:var f=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(ir(e,t,i,!1),r=(i&t.childLanes)!==0),f){if(r)return Zf(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),H(ut,ut.current),r)break;return null;case 22:return t.lanes=0,Vf(e,t,i,t.pendingProps);case 24:Zn(t,ht,e.memoizedState.cache)}return zn(e,t,i)}function Jf(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Uo(e,i)&&(t.flags&128)===0)return dt=!1,nv(e,t,i);dt=(e.flags&131072)!==0}else dt=!1,Ue&&(t.flags&1048576)!==0&&Rh(t,Gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ri(t.elementType),t.type=e,typeof e=="function")qa(e)?(r=Bi(e,r),t.tag=1,t=Kf(null,t,e,r,i)):(t.tag=0,t=Mo(null,t,e,r,i));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=Pf(null,t,e,r,i);break e}else if(f===L){t.tag=14,t=Ff(null,t,e,r,i);break e}}throw t=$(e)||e,Error(o(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,f=Bi(r,t.pendingProps),Kf(e,t,r,f,i);case 3:e:{if(U(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var y=t.memoizedState;f=y.element,ro(e,t),Jr(t,r,null,i);var D=t.memoizedState;if(r=D.cache,Zn(t,ht,r),r!==y.cache&&Za(t,[ht],i,!0),Zr(),r=D.element,y.isDehydrated)if(y={element:r,isDehydrated:!1,cache:D.cache},t.updateQueue.baseState=y,t.memoizedState=y,t.flags&256){t=Xf(e,t,r,i);break e}else if(r!==f){f=nn(Error(o(424)),t),Yr(f),t=Xf(e,t,r,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(nt=on(e.firstChild),wt=t,Ue=!0,$n=null,ln=!0,i=qh(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ki(),r===f){t=zn(e,t,i);break e}Et(e,t,r,i)}t=t.child}return t;case 26:return Cl(e,t),e===null?(i=cp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ue||(i=t.type,e=t.pendingProps,r=Ul(de.current).createElement(i),r[Ct]=t,r[zt]=e,kt(r,i,e),St(r),t.stateNode=r):t.memoizedState=cp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),e===null&&Ue&&(r=t.stateNode=ap(t.type,t.pendingProps,de.current),wt=t,ln=!0,f=nt,hi(t.type)?(vu=f,nt=on(r.firstChild)):nt=f),Et(e,t,t.pendingProps.children,i),Cl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((f=r=nt)&&(r=Mv(r,t.type,t.pendingProps,ln),r!==null?(t.stateNode=r,wt=t,nt=on(r.firstChild),ln=!1,f=!0):f=!1),f||Qn(t)),Z(t),f=t.type,y=t.pendingProps,D=e!==null?e.memoizedProps:null,r=y.children,du(f,y)?r=null:D!==null&&du(f,D)&&(t.flags|=32),t.memoizedState!==null&&(f=ho(e,t,Wg,null,null,i),Ss._currentValue=f),Cl(e,t),Et(e,t,r,i),t.child;case 6:return e===null&&Ue&&((e=i=nt)&&(i=Ov(i,t.pendingProps,ln),i!==null?(t.stateNode=i,wt=t,nt=null,e=!0):e=!1),e||Qn(t)),null;case 13:return $f(e,t,i);case 4:return U(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mi(t,null,r,i):Et(e,t,r,i),t.child;case 11:return Pf(e,t,t.type,t.pendingProps,i);case 7:return Et(e,t,t.pendingProps,i),t.child;case 8:return Et(e,t,t.pendingProps.children,i),t.child;case 12:return Et(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Zn(t,t.type,r.value),Et(e,t,r.children,i),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Ti(t),f=xt(f),r=r(f),t.flags|=1,Et(e,t,r,i),t.child;case 14:return Ff(e,t,t.type,t.pendingProps,i);case 15:return qf(e,t,t.type,t.pendingProps,i);case 19:return Zf(e,t,i);case 31:return tv(e,t,i);case 22:return Vf(e,t,i,t.pendingProps);case 24:return Ti(t),r=xt(ht),e===null?(f=to(),f===null&&(f=Je,y=Ja(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=i),f=y),t.memoizedState={parent:r,cache:f},io(t),Zn(t,ht,f)):((e.lanes&i)!==0&&(ro(e,t),Jr(t,null,null,i),Zr()),f=e.memoizedState,y=t.memoizedState,f.parent!==r?(f={parent:r,cache:r},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Zn(t,ht,r)):(r=y.cache,Zn(t,ht,r),r!==f.cache&&Za(t,[ht],i,!0))),Et(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Hn(e){e.flags|=4}function Io(e,t,i,r,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(kd())e.flags|=8192;else throw Li=al,no}else e.flags&=-16777217}function ed(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_p(t))if(kd())e.flags|=8192;else throw Li=al,no}function xl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mc():536870912,e.lanes|=t,_r|=t)}function ss(e,t){if(!Ue)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 r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function iv(e,t,i){var r=t.pendingProps;switch(Wa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Mn(ht),ae(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(nr(t)?Hn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),it(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(Hn(t),y!==null?(it(t),ed(t,y)):(it(t),Io(t,f,null,r,i))):y?y!==e.memoizedState?(Hn(t),it(t),ed(t,y)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Hn(t),it(t),Io(t,f,e,r,i)),null;case 27:if(te(t),i=de.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return it(t),null}e=ie.current,nr(t)?Mh(t):(e=ap(f,r,i),t.stateNode=e,Hn(t))}return it(t),null;case 5:if(te(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return it(t),null}if(y=ie.current,nr(t))Mh(t);else{var D=Ul(de.current);switch(y){case 1:y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":y=D.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof r.is=="string"?D.createElement("select",{is:r.is}):D.createElement("select"),r.multiple?y.multiple=!0:r.size&&(y.size=r.size);break;default:y=typeof r.is=="string"?D.createElement(f,{is:r.is}):D.createElement(f)}}y[Ct]=t,y[zt]=r;e:for(D=t.child;D!==null;){if(D.tag===5||D.tag===6)y.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===t)break e;for(;D.sibling===null;){if(D.return===null||D.return===t)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}t.stateNode=y;e:switch(kt(y,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Hn(t)}}return it(t),Io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=de.current,nr(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,f=wt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||$d(e.nodeValue,i)),e||Qn(t,!0)}else e=Ul(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return it(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=nr(t),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return it(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=nr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),f=!1}else f=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),y=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(y=r.memoizedState.cachePool.pool),y!==f&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),xl(t,t.updateQueue),it(t),null);case 4:return ae(),e===null&&ou(t.stateNode.containerInfo),it(t),null;case 10:return Mn(t.type),it(t),null;case 19:if(I(ut),r=t.memoizedState,r===null)return it(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)ss(r,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=hl(e),y!==null){for(t.flags|=128,ss(r,!1),e=y.updateQueue,t.updateQueue=e,xl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Ah(i,e),i=i.sibling;return H(ut,ut.current&1|2),Ue&&Rn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ot()>Dl&&(t.flags|=128,f=!0,ss(r,!1),t.lanes=4194304)}else{if(!f)if(e=hl(y),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,xl(t,e),ss(r,!0),r.tail===null&&r.tailMode==="hidden"&&!y.alternate&&!Ue)return it(t),null}else 2*ot()-r.renderingStartTime>Dl&&i!==536870912&&(t.flags|=128,f=!0,ss(r,!1),t.lanes=4194304);r.isBackwards?(y.sibling=t.child,t.child=y):(e=r.last,e!==null?e.sibling=y:t.child=y,r.last=y)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ot(),e.sibling=null,i=ut.current,H(ut,f?i&1|2:i&1),Ue&&Rn(t,r.treeForkCount),e):(it(t),null);case 22:case 23:return Wt(t),oo(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(i&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),i=t.updateQueue,i!==null&&xl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&I(Di),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Mn(ht),it(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function rv(e,t){switch(Wa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mn(ht),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return te(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(ut),null;case 4:return ae(),null;case 10:return Mn(t.type),null;case 22:case 23:return Wt(t),oo(),e!==null&&I(Di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mn(ht),null;case 25:return null;default:return null}}function td(e,t){switch(Wa(t),t.tag){case 3:Mn(ht),ae();break;case 26:case 27:case 5:te(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:I(ut);break;case 10:Mn(t.type);break;case 22:case 23:Wt(t),oo(),e!==null&&I(Di);break;case 24:Mn(ht)}}function ls(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var f=r.next;i=f;do{if((i.tag&e)===e){r=void 0;var y=i.create,D=i.inst;r=y(),D.destroy=r}i=i.next}while(i!==f)}}catch(j){Ke(t,t.return,j)}}function ri(e,t,i){try{var r=t.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var y=f.next;r=y;do{if((r.tag&e)===e){var D=r.inst,j=D.destroy;if(j!==void 0){D.destroy=void 0,f=t;var K=i,re=j;try{re()}catch(ce){Ke(f,K,ce)}}}r=r.next}while(r!==y)}}catch(ce){Ke(t,t.return,ce)}}function nd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Gh(t,i)}catch(r){Ke(e,e.return,r)}}}function id(e,t,i){i.props=Bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Ke(e,t,r)}}function as(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(f){Ke(e,t,f)}}function bn(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(f){Ke(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ke(e,t,f)}else i.current=null}function rd(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(f){Ke(e,e.return,f)}}function Po(e,t,i){try{var r=e.stateNode;kv(r,e.type,i,t),r[zt]=t}catch(f){Ke(e,e.return,f)}}function sd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hi(e.type)||e.tag===4}function Fo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sd(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&&hi(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 qo(e,t,i){var r=e.tag;if(r===5||r===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=An));else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,i),e=e.sibling;e!==null;)qo(e,t,i),e=e.sibling}function El(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(El(e,t,i),e=e.sibling;e!==null;)El(e,t,i),e=e.sibling}function ld(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);kt(t,r,i),t[Ct]=e,t[zt]=i}catch(y){Ke(e,e.return,y)}}var Nn=!1,pt=!1,Vo=!1,ad=typeof WeakSet=="function"?WeakSet:Set,yt=null;function sv(e,t){if(e=e.containerInfo,hu=Yl,e=vh(e),Ha(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var f=r.anchorOffset,y=r.focusNode;r=r.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var D=0,j=-1,K=-1,re=0,ce=0,fe=e,se=null;t:for(;;){for(var le;fe!==i||f!==0&&fe.nodeType!==3||(j=D+f),fe!==y||r!==0&&fe.nodeType!==3||(K=D+r),fe.nodeType===3&&(D+=fe.nodeValue.length),(le=fe.firstChild)!==null;)se=fe,fe=le;for(;;){if(fe===e)break t;if(se===i&&++re===f&&(j=D),se===y&&++ce===r&&(K=D),(le=fe.nextSibling)!==null)break;fe=se,se=fe.parentNode}fe=le}i=j===-1||K===-1?null:{start:j,end:K}}else i=null}i=i||{start:0,end:0}}else i=null;for(fu={focusedElem:e,selectionRange:i},Yl=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,y=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++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,i=t,f=y.memoizedProps,y=y.memoizedState,r=i.stateNode;try{var ve=Bi(i.type,f);e=r.getSnapshotBeforeUpdate(ve,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ke(i,i.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)_u(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_u(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,yt=e;break}yt=t.return}}function od(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Un(e,i),r&4&&ls(5,i);break;case 1:if(Un(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(D){Ke(i,i.return,D)}else{var f=Bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){Ke(i,i.return,D)}}r&64&&nd(i),r&512&&as(i,i.return);break;case 3:if(Un(e,i),r&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{Gh(e,t)}catch(D){Ke(i,i.return,D)}}break;case 27:t===null&&r&4&&ld(i);case 26:case 5:Un(e,i),t===null&&r&4&&rd(i),r&512&&as(i,i.return);break;case 12:Un(e,i);break;case 31:Un(e,i),r&4&&hd(e,i);break;case 13:Un(e,i),r&4&&fd(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=pv.bind(null,i),Bv(e,i))));break;case 22:if(r=i.memoizedState!==null||Nn,!r){t=t!==null&&t.memoizedState!==null||pt,f=Nn;var y=pt;Nn=r,(pt=t)&&!y?In(e,i,(i.subtreeFlags&8772)!==0):Un(e,i),Nn=f,pt=y}break;case 30:break;default:Un(e,i)}}function ud(e){var t=e.alternate;t!==null&&(e.alternate=null,ud(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sa(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 rt=null,Nt=!1;function jn(e,t,i){for(i=i.child;i!==null;)cd(e,t,i),i=i.sibling}function cd(e,t,i){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(bt,i)}catch{}switch(i.tag){case 26:pt||bn(i,t),jn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:pt||bn(i,t);var r=rt,f=Nt;hi(i.type)&&(rt=i.stateNode,Nt=!1),jn(e,t,i),ms(i.stateNode),rt=r,Nt=f;break;case 5:pt||bn(i,t);case 6:if(r=rt,f=Nt,rt=null,jn(e,t,i),rt=r,Nt=f,rt!==null)if(Nt)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(i.stateNode)}catch(y){Ke(i,t,y)}else try{rt.removeChild(i.stateNode)}catch(y){Ke(i,t,y)}break;case 18:rt!==null&&(Nt?(e=rt,np(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wr(e)):np(rt,i.stateNode));break;case 4:r=rt,f=Nt,rt=i.stateNode.containerInfo,Nt=!0,jn(e,t,i),rt=r,Nt=f;break;case 0:case 11:case 14:case 15:ri(2,i,t),pt||ri(4,i,t),jn(e,t,i);break;case 1:pt||(bn(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&id(i,t,r)),jn(e,t,i);break;case 21:jn(e,t,i);break;case 22:pt=(r=pt)||i.memoizedState!==null,jn(e,t,i),pt=r;break;default:jn(e,t,i)}}function hd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wr(e)}catch(i){Ke(t,t.return,i)}}}function fd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wr(e)}catch(i){Ke(t,t.return,i)}}function lv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ad),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ad),t;default:throw Error(o(435,e.tag))}}function kl(e,t){var i=lv(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var f=_v.bind(null,e,r);r.then(f,f)}})}function jt(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var f=i[r],y=e,D=t,j=D;e:for(;j!==null;){switch(j.tag){case 27:if(hi(j.type)){rt=j.stateNode,Nt=!1;break e}break;case 5:rt=j.stateNode,Nt=!1;break e;case 3:case 4:rt=j.stateNode.containerInfo,Nt=!0;break e}j=j.return}if(rt===null)throw Error(o(160));cd(y,D,f),rt=null,Nt=!1,y=f.alternate,y!==null&&(y.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dd(t,e),t=t.sibling}var dn=null;function dd(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Ut(e),r&4&&(ri(3,e,e.return),ls(3,e),ri(5,e,e.return));break;case 1:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&64&&Nn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var f=dn;if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&4){var y=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":y=f.getElementsByTagName("title")[0],(!y||y[Br]||y[Ct]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=f.createElement(r),f.head.insertBefore(y,f.querySelector("head > title"))),kt(y,r,i),y[Ct]=e,St(y),r=y;break e;case"link":var D=dp("link","href",f).get(r+(i.href||""));if(D){for(var j=0;j<D.length;j++)if(y=D[j],y.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&y.getAttribute("rel")===(i.rel==null?null:i.rel)&&y.getAttribute("title")===(i.title==null?null:i.title)&&y.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;case"meta":if(D=dp("meta","content",f).get(r+(i.content||""))){for(j=0;j<D.length;j++)if(y=D[j],y.getAttribute("content")===(i.content==null?null:""+i.content)&&y.getAttribute("name")===(i.name==null?null:i.name)&&y.getAttribute("property")===(i.property==null?null:i.property)&&y.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&y.getAttribute("charset")===(i.charSet==null?null:i.charSet)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;default:throw Error(o(468,r))}y[Ct]=e,St(y),r=y}e.stateNode=r}else pp(f,e.type,e.stateNode);else e.stateNode=fp(f,r,e.memoizedProps);else y!==r?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,r===null?pp(f,e.type,e.stateNode):fp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Po(e,e.memoizedProps,i.memoizedProps)}break;case 27:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),i!==null&&r&4&&Po(e,e.memoizedProps,i.memoizedProps);break;case 5:if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),e.flags&32){f=e.stateNode;try{Yi(f,"")}catch(ve){Ke(e,e.return,ve)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Po(e,f,i!==null?i.memoizedProps:f)),r&1024&&(Vo=!0);break;case 6:if(jt(t,e),Ut(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(ve){Ke(e,e.return,ve)}}break;case 3:if(Fl=null,f=dn,dn=Il(t.containerInfo),jt(t,e),dn=f,Ut(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{wr(t.containerInfo)}catch(ve){Ke(e,e.return,ve)}Vo&&(Vo=!1,pd(e));break;case 4:r=dn,dn=Il(e.stateNode.containerInfo),jt(t,e),Ut(e),dn=r;break;case 12:jt(t,e),Ut(e);break;case 31:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kl(e,r)));break;case 13:jt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Tl=ot()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kl(e,r)));break;case 22:f=e.memoizedState!==null;var K=i!==null&&i.memoizedState!==null,re=Nn,ce=pt;if(Nn=re||f,pt=ce||K,jt(t,e),pt=ce,Nn=re,Ut(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||K||Nn||pt||zi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){K=i=t;try{if(y=K.stateNode,f)D=y.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{j=K.stateNode;var fe=K.memoizedProps.style,se=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;j.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(ve){Ke(K,K.return,ve)}}}else if(t.tag===6){if(i===null){K=t;try{K.stateNode.nodeValue=f?"":K.memoizedProps}catch(ve){Ke(K,K.return,ve)}}}else if(t.tag===18){if(i===null){K=t;try{var le=K.stateNode;f?ip(le,!0):ip(K.stateNode,!1)}catch(ve){Ke(K,K.return,ve)}}}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}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,kl(e,i))));break;case 19:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,kl(e,r)));break;case 30:break;case 21:break;default:jt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(sd(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var f=i.stateNode,y=Fo(e);El(e,y,f);break;case 5:var D=i.stateNode;i.flags&32&&(Yi(D,""),i.flags&=-33);var j=Fo(e);El(e,j,D);break;case 3:case 4:var K=i.stateNode.containerInfo,re=Fo(e);qo(e,re,K);break;default:throw Error(o(161))}}catch(ce){Ke(e,e.return,ce)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)od(e,t.alternate,t),t=t.sibling}function zi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ri(4,t,t.return),zi(t);break;case 1:bn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&id(t,t.return,i),zi(t);break;case 27:ms(t.stateNode);case 26:case 5:bn(t,t.return),zi(t);break;case 22:t.memoizedState===null&&zi(t);break;case 30:zi(t);break;default:zi(t)}e=e.sibling}}function In(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,f=e,y=t,D=y.flags;switch(y.tag){case 0:case 11:case 15:In(f,y,i),ls(4,y);break;case 1:if(In(f,y,i),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(re){Ke(r,r.return,re)}if(r=y,f=r.updateQueue,f!==null){var j=r.stateNode;try{var K=f.shared.hiddenCallbacks;if(K!==null)for(f.shared.hiddenCallbacks=null,f=0;f<K.length;f++)Vh(K[f],j)}catch(re){Ke(r,r.return,re)}}i&&D&64&&nd(y),as(y,y.return);break;case 27:ld(y);case 26:case 5:In(f,y,i),i&&r===null&&D&4&&rd(y),as(y,y.return);break;case 12:In(f,y,i);break;case 31:In(f,y,i),i&&D&4&&hd(f,y);break;case 13:In(f,y,i),i&&D&4&&fd(f,y);break;case 22:y.memoizedState===null&&In(f,y,i),as(y,y.return);break;case 30:break;default:In(f,y,i)}t=t.sibling}}function Go(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&&Wr(i))}function Yo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e))}function pn(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_d(e,t,i,r),t=t.sibling}function _d(e,t,i,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:pn(e,t,i,r),f&2048&&ls(9,t);break;case 1:pn(e,t,i,r);break;case 3:pn(e,t,i,r),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e)));break;case 12:if(f&2048){pn(e,t,i,r),e=t.stateNode;try{var y=t.memoizedProps,D=y.id,j=y.onPostCommit;typeof j=="function"&&j(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(K){Ke(t,t.return,K)}}else pn(e,t,i,r);break;case 31:pn(e,t,i,r);break;case 13:pn(e,t,i,r);break;case 23:break;case 22:y=t.stateNode,D=t.alternate,t.memoizedState!==null?y._visibility&2?pn(e,t,i,r):os(e,t):y._visibility&2?pn(e,t,i,r):(y._visibility|=2,fr(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Go(D,t);break;case 24:pn(e,t,i,r),f&2048&&Yo(t.alternate,t);break;default:pn(e,t,i,r)}}function fr(e,t,i,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,D=t,j=i,K=r,re=D.flags;switch(D.tag){case 0:case 11:case 15:fr(y,D,j,K,f),ls(8,D);break;case 23:break;case 22:var ce=D.stateNode;D.memoizedState!==null?ce._visibility&2?fr(y,D,j,K,f):os(y,D):(ce._visibility|=2,fr(y,D,j,K,f)),f&&re&2048&&Go(D.alternate,D);break;case 24:fr(y,D,j,K,f),f&&re&2048&&Yo(D.alternate,D);break;default:fr(y,D,j,K,f)}t=t.sibling}}function os(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,f=r.flags;switch(r.tag){case 22:os(i,r),f&2048&&Go(r.alternate,r);break;case 24:os(i,r),f&2048&&Yo(r.alternate,r);break;default:os(i,r)}t=t.sibling}}var us=8192;function dr(e,t,i){if(e.subtreeFlags&us)for(e=e.child;e!==null;)md(e,t,i),e=e.sibling}function md(e,t,i){switch(e.tag){case 26:dr(e,t,i),e.flags&us&&e.memoizedState!==null&&Yv(i,dn,e.memoizedState,e.memoizedProps);break;case 5:dr(e,t,i);break;case 3:case 4:var r=dn;dn=Il(e.stateNode.containerInfo),dr(e,t,i),dn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=us,us=16777216,dr(e,t,i),us=r):dr(e,t,i));break;default:dr(e,t,i)}}function gd(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 cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];yt=r,Sd(r,e)}gd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vd(e),e=e.sibling}function vd(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&ri(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):cs(e);break;default:cs(e)}}function Al(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];yt=r,Sd(r,e)}gd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ri(8,t,t.return),Al(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function Sd(e,t){for(;yt!==null;){var i=yt;switch(i.tag){case 0:case 11:case 15:ri(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Wr(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,yt=r;else e:for(i=e;yt!==null;){r=yt;var f=r.sibling,y=r.return;if(ud(r),r===i){yt=null;break e}if(f!==null){f.return=y,yt=f;break e}yt=y}}}var av={getCacheForType:function(e){var t=xt(ht),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return xt(ht).controller.signal}},ov=typeof WeakMap=="function"?WeakMap:Map,Ge=0,Je=null,Be=null,Ne=0,We=0,Kt=null,si=!1,pr=!1,Wo=!1,Pn=0,lt=0,li=0,Hi=0,Ko=0,Xt=0,_r=0,hs=null,It=null,Xo=!1,Tl=0,yd=0,Dl=1/0,Rl=null,ai=null,vt=0,oi=null,mr=null,Fn=0,$o=0,Qo=null,bd=null,fs=0,Zo=null;function $t(){return(Ge&2)!==0&&Ne!==0?Ne&-Ne:P.T!==null?ru():Hc()}function Cd(){if(Xt===0)if((Ne&536870912)===0||Ue){var e=js;js<<=1,(js&3932160)===0&&(js=262144),Xt=e}else Xt=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Xt}function Pt(e,t,i){(e===Je&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(gr(e,0),ui(e,Ne,Xt,!1)),Or(e,i),((Ge&2)===0||e!==Je)&&(e===Je&&((Ge&2)===0&&(Hi|=i),lt===4&&ui(e,Ne,Xt,!1)),Cn(e))}function wd(e,t,i){if((Ge&6)!==0)throw Error(o(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Mr(e,t),f=r?hv(e,t):eu(e,t,!0),y=r;do{if(f===0){pr&&!r&&ui(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!uv(i)){f=eu(e,t,!1),y=!1;continue}if(f===2){if(y=t,e.errorRecoveryDisabledLanes&y)var D=0;else D=e.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){t=D;e:{var j=e;f=hs;var K=j.current.memoizedState.isDehydrated;if(K&&(gr(j,D).flags|=256),D=eu(j,D,!1),D!==2){if(Wo&&!K){j.errorRecoveryDisabledLanes|=y,Hi|=y,f=4;break e}y=It,It=f,y!==null&&(It===null?It=y:It.push.apply(It,y))}f=D}if(y=!1,f!==2)continue}}if(f===1){gr(e,0),ui(e,t,0,!0);break}e:{switch(r=e,y=f,y){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ui(r,t,Xt,!si);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(f=Tl+300-ot(),10<f)){if(ui(r,t,Xt,!si),Is(r,0,!0)!==0)break e;Fn=t,r.timeoutHandle=ep(xd.bind(null,r,i,It,Rl,Xo,t,Xt,Hi,_r,si,y,"Throttled",-0,0),f);break e}xd(r,i,It,Rl,Xo,t,Xt,Hi,_r,si,y,null,-0,0)}}break}while(!0);Cn(e)}function xd(e,t,i,r,f,y,D,j,K,re,ce,fe,se,le){if(e.timeoutHandle=-1,fe=t.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},md(t,y,fe);var ve=(y&62914560)===y?Tl-ot():(y&4194048)===y?yd-ot():0;if(ve=Wv(fe,ve),ve!==null){Fn=y,e.cancelPendingCommit=ve(Md.bind(null,e,t,y,i,r,f,D,j,K,ce,fe,null,se,le)),ui(e,y,D,!re);return}}Md(e,t,y,i,r,f,D,j,K)}function uv(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 r=0;r<i.length;r++){var f=i[r],y=f.getSnapshot;f=f.value;try{if(!Vt(y(),f))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 ui(e,t,i,r){t&=~Ko,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-Ze(f),D=1<<y;r[y]=-1,f&=~D}i!==0&&Oc(e,i,t)}function Ll(){return(Ge&6)===0?(ds(0),!1):!0}function Jo(){if(Be!==null){if(We===0)var e=Be.return;else e=Be,Ln=Ai=null,_o(e),ar=null,Xr=0,e=Be;for(;e!==null;)td(e.alternate,e),e=e.return;Be=null}}function gr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Dv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Fn=0,Jo(),Je=e,Be=i=Dn(e.current,null),Ne=t,We=0,Kt=null,si=!1,pr=Mr(e,t),Wo=!1,_r=Xt=Ko=Hi=li=lt=0,It=hs=null,Xo=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var f=31-Ze(r),y=1<<f;t|=e[f],r&=~y}return Pn=t,Zs(),i}function Ed(e,t){De=null,P.H=is,t===lr||t===ll?(t=Ih(),We=3):t===no?(t=Ih(),We=4):We=t===Lo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,Be===null&&(lt=1,yl(e,nn(t,e.current)))}function kd(){var e=Yt.current;return e===null?!0:(Ne&4194048)===Ne?an===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===an:!1}function Ad(){var e=P.H;return P.H=is,e===null?is:e}function Td(){var e=P.A;return P.A=av,e}function Ml(){lt=4,si||(Ne&4194048)!==Ne&&Yt.current!==null||(pr=!0),(li&134217727)===0&&(Hi&134217727)===0||Je===null||ui(Je,Ne,Xt,!1)}function eu(e,t,i){var r=Ge;Ge|=2;var f=Ad(),y=Td();(Je!==e||Ne!==t)&&(Rl=null,gr(e,t)),t=!1;var D=lt;e:do try{if(We!==0&&Be!==null){var j=Be,K=Kt;switch(We){case 8:Jo(),D=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var re=We;if(We=0,Kt=null,vr(e,j,K,re),i&&pr){D=0;break e}break;default:re=We,We=0,Kt=null,vr(e,j,K,re)}}cv(),D=lt;break}catch(ce){Ed(e,ce)}while(!0);return t&&e.shellSuspendCounter++,Ln=Ai=null,Ge=r,P.H=f,P.A=y,Be===null&&(Je=null,Ne=0,Zs()),D}function cv(){for(;Be!==null;)Dd(Be)}function hv(e,t){var i=Ge;Ge|=2;var r=Ad(),f=Td();Je!==e||Ne!==t?(Rl=null,Dl=ot()+500,gr(e,t)):pr=Mr(e,t);e:do try{if(We!==0&&Be!==null){t=Be;var y=Kt;t:switch(We){case 1:We=0,Kt=null,vr(e,t,y,1);break;case 2:case 9:if(jh(y)){We=0,Kt=null,Rd(t);break}t=function(){We!==2&&We!==9||Je!==e||(We=7),Cn(e)},y.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:jh(y)?(We=0,Kt=null,Rd(t)):(We=0,Kt=null,vr(e,t,y,7));break;case 5:var D=null;switch(Be.tag){case 26:D=Be.memoizedState;case 5:case 27:var j=Be;if(D?_p(D):j.stateNode.complete){We=0,Kt=null;var K=j.sibling;if(K!==null)Be=K;else{var re=j.return;re!==null?(Be=re,Ol(re)):Be=null}break t}}We=0,Kt=null,vr(e,t,y,5);break;case 6:We=0,Kt=null,vr(e,t,y,6);break;case 8:Jo(),lt=6;break e;default:throw Error(o(462))}}fv();break}catch(ce){Ed(e,ce)}while(!0);return Ln=Ai=null,P.H=r,P.A=f,Ge=i,Be!==null?0:(Je=null,Ne=0,Zs(),lt)}function fv(){for(;Be!==null&&!Gn();)Dd(Be)}function Dd(e){var t=Jf(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,t===null?Ol(e):Be=t}function Rd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Wf(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Wf(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:_o(t);default:td(i,t),t=Be=Ah(t,Pn),t=Jf(i,t,Pn)}e.memoizedProps=e.pendingProps,t===null?Ol(e):Be=t}function vr(e,t,i,r){Ln=Ai=null,_o(t),ar=null,Xr=0;var f=t.return;try{if(ev(e,f,t,i,Ne)){lt=1,yl(e,nn(i,e.current)),Be=null;return}}catch(y){if(f!==null)throw Be=f,y;lt=1,yl(e,nn(i,e.current)),Be=null;return}t.flags&32768?(Ue||r===1?e=!0:pr||(Ne&536870912)!==0?e=!1:(si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Yt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ld(t,e)):Ol(t)}function Ol(e){var t=e;do{if((t.flags&32768)!==0){Ld(t,si);return}e=t.return;var i=iv(t.alternate,t,Pn);if(i!==null){Be=i;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);lt===0&&(lt=5)}function Ld(e,t){do{var i=rv(e.alternate,e);if(i!==null){i.flags&=32767,Be=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=i}while(e!==null);lt=6,Be=null}function Md(e,t,i,r,f,y,D,j,K){e.cancelPendingCommit=null;do Bl();while(vt!==0);if((Ge&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(y=t.lanes|t.childLanes,y|=Pa,Gm(e,i,y,D,j,K),e===Je&&(Be=Je=null,Ne=0),mr=t,oi=e,Fn=i,$o=y,Qo=f,bd=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mv(be,function(){return Nd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=P.T,P.T=null,f=Y.p,Y.p=2,D=Ge,Ge|=4;try{sv(e,t,i)}finally{Ge=D,Y.p=f,P.T=r}}vt=1,Od(),Bd(),zd()}}function Od(){if(vt===1){vt=0;var e=oi,t=mr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=P.T,P.T=null;var r=Y.p;Y.p=2;var f=Ge;Ge|=4;try{dd(t,e);var y=fu,D=vh(e.containerInfo),j=y.focusedElem,K=y.selectionRange;if(D!==j&&j&&j.ownerDocument&&gh(j.ownerDocument.documentElement,j)){if(K!==null&&Ha(j)){var re=K.start,ce=K.end;if(ce===void 0&&(ce=re),"selectionStart"in j)j.selectionStart=re,j.selectionEnd=Math.min(ce,j.value.length);else{var fe=j.ownerDocument||document,se=fe&&fe.defaultView||window;if(se.getSelection){var le=se.getSelection(),ve=j.textContent.length,Ee=Math.min(K.start,ve),Qe=K.end===void 0?Ee:Math.min(K.end,ve);!le.extend&&Ee>Qe&&(D=Qe,Qe=Ee,Ee=D);var J=mh(j,Ee),Q=mh(j,Qe);if(J&&Q&&(le.rangeCount!==1||le.anchorNode!==J.node||le.anchorOffset!==J.offset||le.focusNode!==Q.node||le.focusOffset!==Q.offset)){var ne=fe.createRange();ne.setStart(J.node,J.offset),le.removeAllRanges(),Ee>Qe?(le.addRange(ne),le.extend(Q.node,Q.offset)):(ne.setEnd(Q.node,Q.offset),le.addRange(ne))}}}}for(fe=[],le=j;le=le.parentNode;)le.nodeType===1&&fe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<fe.length;j++){var he=fe[j];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}Yl=!!hu,fu=hu=null}finally{Ge=f,Y.p=r,P.T=i}}e.current=t,vt=2}}function Bd(){if(vt===2){vt=0;var e=oi,t=mr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=P.T,P.T=null;var r=Y.p;Y.p=2;var f=Ge;Ge|=4;try{od(e,t.alternate,t)}finally{Ge=f,Y.p=r,P.T=i}}vt=3}}function zd(){if(vt===4||vt===3){vt=0,At();var e=oi,t=mr,i=Fn,r=bd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,mr=oi=null,Hd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ai=null),ga(i),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(bt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=P.T,f=Y.p,Y.p=2,P.T=null;try{for(var y=e.onRecoverableError,D=0;D<r.length;D++){var j=r[D];y(j.value,{componentStack:j.stack})}}finally{P.T=t,Y.p=f}}(Fn&3)!==0&&Bl(),Cn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Zo?fs++:(fs=0,Zo=e):fs=0,ds(0)}}function Hd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wr(t)))}function Bl(){return Od(),Bd(),zd(),Nd()}function Nd(){if(vt!==5)return!1;var e=oi,t=$o;$o=0;var i=ga(Fn),r=P.T,f=Y.p;try{Y.p=32>i?32:i,P.T=null,i=Qo,Qo=null;var y=oi,D=Fn;if(vt=0,mr=oi=null,Fn=0,(Ge&6)!==0)throw Error(o(331));var j=Ge;if(Ge|=4,vd(y.current),_d(y,y.current,D,i),Ge=j,ds(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(bt,y)}catch{}return!0}finally{Y.p=f,P.T=r,Hd(e,t)}}function jd(e,t,i){t=nn(i,t),t=Ro(e.stateNode,t,2),e=ti(e,t,2),e!==null&&(Or(e,2),Cn(e))}function Ke(e,t,i){if(e.tag===3)jd(e,e,i);else for(;t!==null;){if(t.tag===3){jd(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=nn(i,e),i=Uf(2),r=ti(t,i,2),r!==null&&(If(i,r,t,e),Or(r,2),Cn(r));break}}t=t.return}}function tu(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new ov;var f=new Set;r.set(t,f)}else f=r.get(t),f===void 0&&(f=new Set,r.set(t,f));f.has(i)||(Wo=!0,f.add(i),e=dv.bind(null,e,t,i),t.then(e,e))}function dv(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Je===e&&(Ne&i)===i&&(lt===4||lt===3&&(Ne&62914560)===Ne&&300>ot()-Tl?(Ge&2)===0&&gr(e,0):Ko|=i,_r===Ne&&(_r=0)),Cn(e)}function Ud(e,t){t===0&&(t=Mc()),e=xi(e,t),e!==null&&(Or(e,t),Cn(e))}function pv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ud(e,i)}function _v(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Ud(e,i)}function mv(e,t){return vn(e,t)}var zl=null,Sr=null,nu=!1,Hl=!1,iu=!1,ci=0;function Cn(e){e!==Sr&&e.next===null&&(Sr===null?zl=Sr=e:Sr=Sr.next=e),Hl=!0,nu||(nu=!0,vv())}function ds(e,t){if(!iu&&Hl){iu=!0;do for(var i=!1,r=zl;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var y=0;else{var D=r.suspendedLanes,j=r.pingedLanes;y=(1<<31-Ze(42|e)+1)-1,y&=f&~(D&~j),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,qd(r,y))}else y=Ne,y=Is(r,r===Je?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||Mr(r,y)||(i=!0,qd(r,y));r=r.next}while(i);iu=!1}}function gv(){Id()}function Id(){Hl=nu=!1;var e=0;ci!==0&&Tv()&&(e=ci);for(var t=ot(),i=null,r=zl;r!==null;){var f=r.next,y=Pd(r,t);y===0?(r.next=null,i===null?zl=f:i.next=f,f===null&&(Sr=i)):(i=r,(e!==0||(y&3)!==0)&&(Hl=!0)),r=f}vt!==0&&vt!==5||ds(e),ci!==0&&(ci=0)}function Pd(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var D=31-Ze(y),j=1<<D,K=f[D];K===-1?((j&i)===0||(j&r)!==0)&&(f[D]=Vm(j,t)):K<=t&&(e.expiredLanes|=j),y&=~j}if(t=Je,i=Ne,i=Is(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&En(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Mr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&En(r),ga(i)){case 2:case 8:i=ge;break;case 32:i=be;break;case 268435456:i=Oe;break;default:i=be}return r=Fd.bind(null,e),i=vn(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&En(r),e.callbackPriority=2,e.callbackNode=null,2}function Fd(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Bl()&&e.callbackNode!==i)return null;var r=Ne;return r=Is(e,e===Je?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wd(e,r,t),Pd(e,ot()),e.callbackNode!=null&&e.callbackNode===i?Fd.bind(null,e):null)}function qd(e,t){if(Bl())return null;wd(e,t,!0)}function vv(){Rv(function(){(Ge&6)!==0?vn(ue,gv):Id()})}function ru(){if(ci===0){var e=rr;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),ci=e}return ci}function Vd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vs(""+e)}function Gd(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 Sv(e,t,i,r,f){if(t==="submit"&&i&&i.stateNode===f){var y=Vd((f[zt]||null).action),D=r.submitter;D&&(t=(t=D[zt]||null)?Vd(t.formAction):D.getAttribute("formAction"),t!==null&&(y=t,D=null));var j=new Ks("action","action",null,r,f);e.push({event:j,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ci!==0){var K=D?Gd(f,D):new FormData(f);xo(i,{pending:!0,data:K,method:f.method,action:y},null,K)}}else typeof y=="function"&&(j.preventDefault(),K=D?Gd(f,D):new FormData(f),xo(i,{pending:!0,data:K,method:f.method,action:y},y,K))},currentTarget:f}]})}}for(var su=0;su<Ia.length;su++){var lu=Ia[su],yv=lu.toLowerCase(),bv=lu[0].toUpperCase()+lu.slice(1);fn(yv,"on"+bv)}fn(bh,"onAnimationEnd"),fn(Ch,"onAnimationIteration"),fn(wh,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(Ng,"onTransitionRun"),fn(jg,"onTransitionStart"),fn(Ug,"onTransitionCancel"),fn(xh,"onTransitionEnd"),Vi("onMouseEnter",["mouseout","mouseover"]),Vi("onMouseLeave",["mouseout","mouseover"]),Vi("onPointerEnter",["pointerout","pointerover"]),Vi("onPointerLeave",["pointerout","pointerover"]),yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yi("onBeforeInput",["compositionend","keypress","textInput","paste"]),yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ps="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(" "),Cv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ps));function Yd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],f=r.event;r=r.listeners;e:{var y=void 0;if(t)for(var D=r.length-1;0<=D;D--){var j=r[D],K=j.instance,re=j.currentTarget;if(j=j.listener,K!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=re;try{y(f)}catch(ce){Qs(ce)}f.currentTarget=null,y=K}else for(D=0;D<r.length;D++){if(j=r[D],K=j.instance,re=j.currentTarget,j=j.listener,K!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=re;try{y(f)}catch(ce){Qs(ce)}f.currentTarget=null,y=K}}}}function ze(e,t){var i=t[va];i===void 0&&(i=t[va]=new Set);var r=e+"__bubble";i.has(r)||(Wd(t,e,2,!1),i.add(r))}function au(e,t,i){var r=0;t&&(r|=4),Wd(i,e,r,t)}var Nl="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[Nl]){e[Nl]=!0,Uc.forEach(function(i){i!=="selectionchange"&&(Cv.has(i)||au(i,!1,e),au(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nl]||(t[Nl]=!0,au("selectionchange",!1,t))}}function Wd(e,t,i,r){switch(Cp(t)){case 2:var f=$v;break;case 8:f=Qv;break;default:f=wu}i=f.bind(null,t,i,e),f=void 0,!Aa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function uu(e,t,i,r,f){var y=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var D=r.tag;if(D===3||D===4){var j=r.stateNode.containerInfo;if(j===f)break;if(D===4)for(D=r.return;D!==null;){var K=D.tag;if((K===3||K===4)&&D.stateNode.containerInfo===f)return;D=D.return}for(;j!==null;){if(D=Pi(j),D===null)return;if(K=D.tag,K===5||K===6||K===26||K===27){r=y=D;continue e}j=j.parentNode}}r=r.return}Qc(function(){var re=y,ce=Ea(i),fe=[];e:{var se=Eh.get(e);if(se!==void 0){var le=Ks,ve=e;switch(e){case"keypress":if(Ys(i)===0)break e;case"keydown":case"keyup":le=_g;break;case"focusin":ve="focus",le=La;break;case"focusout":ve="blur",le=La;break;case"beforeblur":case"afterblur":le=La;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":le=eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=vg;break;case bh:case Ch:case wh:le=lg;break;case xh:le=yg;break;case"scroll":case"scrollend":le=tg;break;case"wheel":le=Cg;break;case"copy":case"cut":case"paste":le=og;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=nh;break;case"toggle":case"beforetoggle":le=xg}var Ee=(t&4)!==0,Qe=!Ee&&(e==="scroll"||e==="scrollend"),J=Ee?se!==null?se+"Capture":null:se;Ee=[];for(var Q=re,ne;Q!==null;){var he=Q;if(ne=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||ne===null||J===null||(he=Hr(Q,J),he!=null&&Ee.push(_s(Q,he,ne))),Qe)break;Q=Q.return}0<Ee.length&&(se=new le(se,ve,null,i,ce),fe.push({event:se,listeners:Ee}))}}if((t&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",se&&i!==xa&&(ve=i.relatedTarget||i.fromElement)&&(Pi(ve)||ve[Ii]))break e;if((le||se)&&(se=ce.window===ce?ce:(se=ce.ownerDocument)?se.defaultView||se.parentWindow:window,le?(ve=i.relatedTarget||i.toElement,le=re,ve=ve?Pi(ve):null,ve!==null&&(Qe=b(ve),Ee=ve.tag,ve!==Qe||Ee!==5&&Ee!==27&&Ee!==6)&&(ve=null)):(le=null,ve=re),le!==ve)){if(Ee=eh,he="onMouseLeave",J="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=nh,he="onPointerLeave",J="onPointerEnter",Q="pointer"),Qe=le==null?se:zr(le),ne=ve==null?se:zr(ve),se=new Ee(he,Q+"leave",le,i,ce),se.target=Qe,se.relatedTarget=ne,he=null,Pi(ce)===re&&(Ee=new Ee(J,Q+"enter",ve,i,ce),Ee.target=ne,Ee.relatedTarget=Qe,he=Ee),Qe=he,le&&ve)t:{for(Ee=wv,J=le,Q=ve,ne=0,he=J;he;he=Ee(he))ne++;he=0;for(var Ce=Q;Ce;Ce=Ee(Ce))he++;for(;0<ne-he;)J=Ee(J),ne--;for(;0<he-ne;)Q=Ee(Q),he--;for(;ne--;){if(J===Q||Q!==null&&J===Q.alternate){Ee=J;break t}J=Ee(J),Q=Ee(Q)}Ee=null}else Ee=null;le!==null&&Kd(fe,se,le,Ee,!1),ve!==null&&Qe!==null&&Kd(fe,Qe,ve,Ee,!0)}}e:{if(se=re?zr(re):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var qe=ch;else if(oh(se))if(hh)qe=Bg;else{qe=Mg;var ye=Lg}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?re&&wa(re.elementType)&&(qe=ch):qe=Og;if(qe&&(qe=qe(e,re))){uh(fe,qe,i,ce);break e}ye&&ye(e,se,re),e==="focusout"&&re&&se.type==="number"&&re.memoizedProps.value!=null&&Ca(se,"number",se.value)}switch(ye=re?zr(re):window,e){case"focusin":(oh(ye)||ye.contentEditable==="true")&&($i=ye,Na=re,Vr=null);break;case"focusout":Vr=Na=$i=null;break;case"mousedown":ja=!0;break;case"contextmenu":case"mouseup":case"dragend":ja=!1,Sh(fe,i,ce);break;case"selectionchange":if(Hg)break;case"keydown":case"keyup":Sh(fe,i,ce)}var Re;if(Oa)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Xi?lh(e,i)&&(je="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(je="onCompositionStart");je&&(ih&&i.locale!=="ko"&&(Xi||je!=="onCompositionStart"?je==="onCompositionEnd"&&Xi&&(Re=Zc()):(Kn=ce,Ta="value"in Kn?Kn.value:Kn.textContent,Xi=!0)),ye=jl(re,je),0<ye.length&&(je=new th(je,e,null,i,ce),fe.push({event:je,listeners:ye}),Re?je.data=Re:(Re=ah(i),Re!==null&&(je.data=Re)))),(Re=kg?Ag(e,i):Tg(e,i))&&(je=jl(re,"onBeforeInput"),0<je.length&&(ye=new th("onBeforeInput","beforeinput",null,i,ce),fe.push({event:ye,listeners:je}),ye.data=Re)),Sv(fe,e,re,i,ce)}Yd(fe,t)})}function _s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function jl(e,t){for(var i=t+"Capture",r=[];e!==null;){var f=e,y=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||y===null||(f=Hr(e,i),f!=null&&r.unshift(_s(e,f,y)),f=Hr(e,t),f!=null&&r.push(_s(e,f,y))),e.tag===3)return r;e=e.return}return[]}function wv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kd(e,t,i,r,f){for(var y=t._reactName,D=[];i!==null&&i!==r;){var j=i,K=j.alternate,re=j.stateNode;if(j=j.tag,K!==null&&K===r)break;j!==5&&j!==26&&j!==27||re===null||(K=re,f?(re=Hr(i,y),re!=null&&D.unshift(_s(i,re,K))):f||(re=Hr(i,y),re!=null&&D.push(_s(i,re,K)))),i=i.return}D.length!==0&&e.push({event:t,listeners:D})}var xv=/\r\n?/g,Ev=/\u0000|\uFFFD/g;function Xd(e){return(typeof e=="string"?e:""+e).replace(xv,`
49
+ `).replace(Ev,"")}function $d(e,t){return t=Xd(t),Xd(e)===t}function $e(e,t,i,r,f,y){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Yi(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Yi(e,""+r);break;case"className":Fs(e,"class",r);break;case"tabIndex":Fs(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Fs(e,i,r);break;case"style":Xc(e,r,y);break;case"data":if(t!=="object"){Fs(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Vs(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="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 y=="function"&&(i==="formAction"?(t!=="input"&&$e(e,t,"name",f.name,f,null),$e(e,t,"formEncType",f.formEncType,f,null),$e(e,t,"formMethod",f.formMethod,f,null),$e(e,t,"formTarget",f.formTarget,f,null)):($e(e,t,"encType",f.encType,f,null),$e(e,t,"method",f.method,f,null),$e(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Vs(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=An);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Vs(""+r),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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":ze("beforetoggle",e),ze("toggle",e),Ps(e,"popover",r);break;case"xlinkActuate":kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":kn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":kn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":kn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":kn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ps(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Jm.get(i)||i,Ps(e,i,r))}}function cu(e,t,i,r,f,y){switch(i){case"style":Xc(e,r,y);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Yi(e,r):(typeof r=="number"||typeof r=="bigint")&&Yi(e,""+r);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"onClick":r!=null&&(e.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ic.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),y=e[zt]||null,y=y!=null?y[i]:null,typeof y=="function"&&e.removeEventListener(t,y,f),typeof r=="function")){typeof y!="function"&&y!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,f);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Ps(e,i,r)}}}function kt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var r=!1,f=!1,y;for(y in i)if(i.hasOwnProperty(y)){var D=i[y];if(D!=null)switch(y){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,y,D,i,null)}}f&&$e(e,t,"srcSet",i.srcSet,i,null),r&&$e(e,t,"src",i.src,i,null);return;case"input":ze("invalid",e);var j=y=D=f=null,K=null,re=null;for(r in i)if(i.hasOwnProperty(r)){var ce=i[r];if(ce!=null)switch(r){case"name":f=ce;break;case"type":D=ce;break;case"checked":K=ce;break;case"defaultChecked":re=ce;break;case"value":y=ce;break;case"defaultValue":j=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(o(137,t));break;default:$e(e,t,r,ce,i,null)}}Gc(e,y,j,K,re,D,f,!1);return;case"select":ze("invalid",e),r=D=y=null;for(f in i)if(i.hasOwnProperty(f)&&(j=i[f],j!=null))switch(f){case"value":y=j;break;case"defaultValue":D=j;break;case"multiple":r=j;default:$e(e,t,f,j,i,null)}t=y,i=D,e.multiple=!!r,t!=null?Gi(e,!!r,t,!1):i!=null&&Gi(e,!!r,i,!0);return;case"textarea":ze("invalid",e),y=f=r=null;for(D in i)if(i.hasOwnProperty(D)&&(j=i[D],j!=null))switch(D){case"value":r=j;break;case"defaultValue":f=j;break;case"children":y=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:$e(e,t,D,j,i,null)}Wc(e,r,f,y);return;case"option":for(K in i)if(i.hasOwnProperty(K)&&(r=i[K],r!=null))switch(K){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:$e(e,t,K,r,i,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(r=0;r<ps.length;r++)ze(ps[r],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("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(re in i)if(i.hasOwnProperty(re)&&(r=i[re],r!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,re,r,i,null)}return;default:if(wa(t)){for(ce in i)i.hasOwnProperty(ce)&&(r=i[ce],r!==void 0&&cu(e,t,ce,r,i,void 0));return}}for(j in i)i.hasOwnProperty(j)&&(r=i[j],r!=null&&$e(e,t,j,r,i,null))}function kv(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,y=null,D=null,j=null,K=null,re=null,ce=null;for(le in i){var fe=i[le];if(i.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":K=fe;default:r.hasOwnProperty(le)||$e(e,t,le,null,r,fe)}}for(var se in r){var le=r[se];if(fe=i[se],r.hasOwnProperty(se)&&(le!=null||fe!=null))switch(se){case"type":y=le;break;case"name":f=le;break;case"checked":re=le;break;case"defaultChecked":ce=le;break;case"value":D=le;break;case"defaultValue":j=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:le!==fe&&$e(e,t,se,le,r,fe)}}ba(e,D,j,K,re,ce,y,f);return;case"select":le=D=j=se=null;for(y in i)if(K=i[y],i.hasOwnProperty(y)&&K!=null)switch(y){case"value":break;case"multiple":le=K;default:r.hasOwnProperty(y)||$e(e,t,y,null,r,K)}for(f in r)if(y=r[f],K=i[f],r.hasOwnProperty(f)&&(y!=null||K!=null))switch(f){case"value":se=y;break;case"defaultValue":j=y;break;case"multiple":D=y;default:y!==K&&$e(e,t,f,y,r,K)}t=j,i=D,r=le,se!=null?Gi(e,!!i,se,!1):!!r!=!!i&&(t!=null?Gi(e,!!i,t,!0):Gi(e,!!i,i?[]:"",!1));return;case"textarea":le=se=null;for(j in i)if(f=i[j],i.hasOwnProperty(j)&&f!=null&&!r.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:$e(e,t,j,null,r,f)}for(D in r)if(f=r[D],y=i[D],r.hasOwnProperty(D)&&(f!=null||y!=null))switch(D){case"value":se=f;break;case"defaultValue":le=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==y&&$e(e,t,D,f,r,y)}Yc(e,se,le);return;case"option":for(var ve in i)if(se=i[ve],i.hasOwnProperty(ve)&&se!=null&&!r.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:$e(e,t,ve,null,r,se)}for(K in r)if(se=r[K],le=i[K],r.hasOwnProperty(K)&&se!==le&&(se!=null||le!=null))switch(K){case"selected":e.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:$e(e,t,K,se,r,le)}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 Ee in i)se=i[Ee],i.hasOwnProperty(Ee)&&se!=null&&!r.hasOwnProperty(Ee)&&$e(e,t,Ee,null,r,se);for(re in r)if(se=r[re],le=i[re],r.hasOwnProperty(re)&&se!==le&&(se!=null||le!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:$e(e,t,re,se,r,le)}return;default:if(wa(t)){for(var Qe in i)se=i[Qe],i.hasOwnProperty(Qe)&&se!==void 0&&!r.hasOwnProperty(Qe)&&cu(e,t,Qe,void 0,r,se);for(ce in r)se=r[ce],le=i[ce],!r.hasOwnProperty(ce)||se===le||se===void 0&&le===void 0||cu(e,t,ce,se,r,le);return}}for(var J in i)se=i[J],i.hasOwnProperty(J)&&se!=null&&!r.hasOwnProperty(J)&&$e(e,t,J,null,r,se);for(fe in r)se=r[fe],le=i[fe],!r.hasOwnProperty(fe)||se===le||se==null&&le==null||$e(e,t,fe,se,r,le)}function Qd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Av(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var f=i[r],y=f.transferSize,D=f.initiatorType,j=f.duration;if(y&&j&&Qd(D)){for(D=0,j=f.responseEnd,r+=1;r<i.length;r++){var K=i[r],re=K.startTime;if(re>j)break;var ce=K.transferSize,fe=K.initiatorType;ce&&Qd(fe)&&(K=K.responseEnd,D+=ce*(K<j?1:(j-re)/(K-re)))}if(--r,t+=8*(y+D)/(f.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 hu=null,fu=null;function Ul(e){return e.nodeType===9?e:e.ownerDocument}function Zd(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 Jd(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 du(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 pu=null;function Tv(){var e=window.event;return e&&e.type==="popstate"?e===pu?!1:(pu=e,!0):(pu=null,!1)}var ep=typeof setTimeout=="function"?setTimeout:void 0,Dv=typeof clearTimeout=="function"?clearTimeout:void 0,tp=typeof Promise=="function"?Promise:void 0,Rv=typeof queueMicrotask=="function"?queueMicrotask:typeof tp<"u"?function(e){return tp.resolve(null).then(e).catch(Lv)}:ep;function Lv(e){setTimeout(function(){throw e})}function hi(e){return e==="head"}function np(e,t){var i=t,r=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(f),wr(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")ms(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ms(i);for(var y=i.firstChild;y;){var D=y.nextSibling,j=y.nodeName;y[Br]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=D}}else i==="body"&&ms(e.ownerDocument.body);i=f}while(i);wr(t)}function ip(e,t){var i=e;e=0;do{var r=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||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function _u(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":_u(i),Sa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Mv(e,t,i,r){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Br])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(y=e.getAttribute("rel"),y==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(y!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(y=e.getAttribute("src"),(y!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&y&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var y=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===y)return e}else return e;if(e=on(e.nextSibling),e===null)break}return null}function Ov(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=on(e.nextSibling),e===null))return null;return e}function rp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=on(e.nextSibling),e===null))return null;return e}function mu(e){return e.data==="$?"||e.data==="$~"}function gu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Bv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function on(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 vu=null;function sp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return on(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function lp(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 ap(e,t,i){switch(t=Ul(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 ms(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sa(e)}var un=new Map,op=new Set;function Il(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=Y.d;Y.d={f:zv,r:Hv,D:Nv,C:jv,L:Uv,m:Iv,X:Fv,S:Pv,M:qv};function zv(){var e=qn.f(),t=Ll();return e||t}function Hv(e){var t=Fi(e);t!==null&&t.tag===5&&t.type==="form"?Ef(t):qn.r(e)}var yr=typeof document>"u"?null:document;function up(e,t,i){var r=yr;if(r&&typeof t=="string"&&t){var f=en(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),op.has(f)||(op.add(f),e={rel:e,crossOrigin:i,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function Nv(e){qn.D(e),up("dns-prefetch",e,null)}function jv(e,t){qn.C(e,t),up("preconnect",e,t)}function Uv(e,t,i){qn.L(e,t,i);var r=yr;if(r&&e&&t){var f='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+en(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+en(i.imageSizes)+'"]')):f+='[href="'+en(e)+'"]';var y=f;switch(t){case"style":y=br(e);break;case"script":y=Cr(e)}un.has(y)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),un.set(y,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(gs(y))||t==="script"&&r.querySelector(vs(y))||(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function Iv(e,t){qn.m(e,t);var i=yr;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+en(r)+'"][href="'+en(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Cr(e)}if(!un.has(y)&&(e=c({rel:"modulepreload",href:e},t),un.set(y,e),i.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(vs(y)))return}r=i.createElement("link"),kt(r,"link",e),St(r),i.head.appendChild(r)}}}function Pv(e,t,i){qn.S(e,t,i);var r=yr;if(r&&e){var f=qi(r).hoistableStyles,y=br(e);t=t||"default";var D=f.get(y);if(!D){var j={loading:0,preload:null};if(D=r.querySelector(gs(y)))j.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=un.get(y))&&Su(e,i);var K=D=r.createElement("link");St(K),kt(K,"link",e),K._p=new Promise(function(re,ce){K.onload=re,K.onerror=ce}),K.addEventListener("load",function(){j.loading|=1}),K.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Pl(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:j},f.set(y,D)}}}function Fv(e,t){qn.X(e,t);var i=yr;if(i&&e){var r=qi(i).hoistableScripts,f=Cr(e),y=r.get(f);y||(y=i.querySelector(vs(f)),y||(e=c({src:e,async:!0},t),(t=un.get(f))&&yu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function qv(e,t){qn.M(e,t);var i=yr;if(i&&e){var r=qi(i).hoistableScripts,f=Cr(e),y=r.get(f);y||(y=i.querySelector(vs(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=un.get(f))&&yu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function cp(e,t,i,r){var f=(f=de.current)?Il(f):null;if(!f)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=br(i.href),i=qi(f).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=br(i.href);var y=qi(f).hoistableStyles,D=y.get(e);if(D||(f=f.ownerDocument||f,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(e,D),(y=f.querySelector(gs(e)))&&!y._p&&(D.instance=y,D.state.loading=5),un.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},un.set(e,i),y||Vv(f,e,i,D.state))),t&&r===null)throw Error(o(528,""));return D}if(t&&r!==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=Cr(i),i=qi(f).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function br(e){return'href="'+en(e)+'"'}function gs(e){return'link[rel="stylesheet"]['+e+"]"}function hp(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function Vv(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),kt(t,"link",i),St(t),e.head.appendChild(t))}function Cr(e){return'[src="'+en(e)+'"]'}function vs(e){return"script[async]"+e}function fp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+en(i.href)+'"]');if(r)return t.instance=r,St(r),r;var f=c({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),St(r),kt(r,"style",f),Pl(r,i.precedence,e),t.instance=r;case"stylesheet":f=br(i.href);var y=e.querySelector(gs(f));if(y)return t.state.loading|=4,t.instance=y,St(y),y;r=hp(i),(f=un.get(f))&&Su(r,f),y=(e.ownerDocument||e).createElement("link"),St(y);var D=y;return D._p=new Promise(function(j,K){D.onload=j,D.onerror=K}),kt(y,"link",r),t.state.loading|=4,Pl(y,i.precedence,e),t.instance=y;case"script":return y=Cr(i.src),(f=e.querySelector(vs(y)))?(t.instance=f,St(f),f):(r=i,(f=un.get(y))&&(r=c({},i),yu(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),St(f),kt(f,"link",r),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Pl(r,i.precedence,e));return t.instance}function Pl(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,y=f,D=0;D<r.length;D++){var j=r[D];if(j.dataset.precedence===t)y=j;else if(y!==f)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Su(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fl=null;function dp(e,t,i){if(Fl===null){var r=new Map,f=Fl=new Map;f.set(i,r)}else f=Fl,r=f.get(i),r||(r=new Map,f.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var y=i[f];if(!(y[Br]||y[Ct]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var D=y.getAttribute(t)||"";D=e+D;var j=r.get(D);j?j.push(y):r.set(D,[y])}}return r}function pp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Gv(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 _p(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Yv(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=br(r.href),y=t.querySelector(gs(f));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ql.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=y,St(y);return}y=t.ownerDocument||t,r=hp(r),(f=un.get(f))&&Su(r,f),y=y.createElement("link"),St(y);var D=y;D._p=new Promise(function(j,K){D.onload=j,D.onerror=K}),kt(y,"link",r),i.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ql.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var bu=0;function Wv(e,t){return e.stylesheets&&e.count===0&&Gl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+t);0<e.imgBytes&&bu===0&&(bu=62500*Av());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>bu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function ql(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vl=null;function Gl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vl=new Map,t.forEach(Kv,e),Vl=null,ql.call(e))}function Kv(e,t){if(!(t.state.loading&4)){var i=Vl.get(e);if(i)var r=i.get(null);else{i=new Map,Vl.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<f.length;y++){var D=f[y];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(i.set(D.dataset.precedence,D),r=D)}r&&i.set(null,r)}f=t.instance,D=f.getAttribute("data-precedence"),y=i.get(D)||r,y===r&&i.set(null,f),i.set(D,f),this.count++,r=ql.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),y?y.parentNode.insertBefore(f,y.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Ss={$$typeof:g,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Xv(e,t,i,r,f,y,D,j,K){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=_a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.hiddenUpdates=_a(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=y,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function mp(e,t,i,r,f,y,D,j,K,re,ce,fe){return e=new Xv(e,t,i,D,K,re,ce,fe,j),t=1,y===!0&&(t|=24),y=Gt(3,null,null,t),e.current=y,y.stateNode=e,t=Ja(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:r,isDehydrated:i,cache:t},io(y),e}function gp(e){return e?(e=Ji,e):Ji}function vp(e,t,i,r,f,y){f=gp(f),r.context===null?r.context=f:r.pendingContext=f,r=ei(t),r.payload={element:i},y=y===void 0?null:y,y!==null&&(r.callback=y),i=ti(e,r,t),i!==null&&(Pt(i,e,t),Qr(i,e,t))}function Sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Cu(e,t){Sp(e,t),(e=e.alternate)&&Sp(e,t)}function yp(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Pt(t,e,67108864),Cu(e,67108864)}}function bp(e){if(e.tag===13||e.tag===31){var t=$t();t=ma(t);var i=xi(e,t);i!==null&&Pt(i,e,t),Cu(e,t)}}var Yl=!0;function $v(e,t,i,r){var f=P.T;P.T=null;var y=Y.p;try{Y.p=2,wu(e,t,i,r)}finally{Y.p=y,P.T=f}}function Qv(e,t,i,r){var f=P.T;P.T=null;var y=Y.p;try{Y.p=8,wu(e,t,i,r)}finally{Y.p=y,P.T=f}}function wu(e,t,i,r){if(Yl){var f=xu(r);if(f===null)uu(e,t,r,Wl,i),wp(e,r);else if(Jv(f,e,t,i,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Zv.indexOf(e)){for(;f!==null;){var y=Fi(f);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var D=Si(y.pendingLanes);if(D!==0){var j=y;for(j.pendingLanes|=2,j.entangledLanes|=2;D;){var K=1<<31-Ze(D);j.entanglements[1]|=K,D&=~K}Cn(y),(Ge&6)===0&&(Dl=ot()+500,ds(0))}}break;case 31:case 13:j=xi(y,2),j!==null&&Pt(j,y,2),Ll(),Cu(y,2)}if(y=xu(r),y===null&&uu(e,t,r,Wl,i),y===f)break;f=y}f!==null&&r.stopPropagation()}else uu(e,t,r,null,i)}}function xu(e){return e=Ea(e),Eu(e)}var Wl=null;function Eu(e){if(Wl=null,e=Pi(e),e!==null){var t=b(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=p(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 Wl=e,null}function Cp(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(Ot()){case ue:return 2;case ge:return 8;case be:case Te:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var ku=!1,fi=null,di=null,pi=null,ys=new Map,bs=new Map,_i=[],Zv="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 wp(e,t){switch(e){case"focusin":case"focusout":fi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Cs(e,t,i,r,f,y){return e===null||e.nativeEvent!==y?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:y,targetContainers:[f]},t!==null&&(t=Fi(t),t!==null&&yp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function Jv(e,t,i,r,f){switch(t){case"focusin":return fi=Cs(fi,e,t,i,r,f),!0;case"dragenter":return di=Cs(di,e,t,i,r,f),!0;case"mouseover":return pi=Cs(pi,e,t,i,r,f),!0;case"pointerover":var y=f.pointerId;return ys.set(y,Cs(ys.get(y)||null,e,t,i,r,f)),!0;case"gotpointercapture":return y=f.pointerId,bs.set(y,Cs(bs.get(y)||null,e,t,i,r,f)),!0}return!1}function xp(e){var t=Pi(e.target);if(t!==null){var i=b(t);if(i!==null){if(t=i.tag,t===13){if(t=p(i),t!==null){e.blockedOn=t,Nc(e.priority,function(){bp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Nc(e.priority,function(){bp(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 Kl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=xu(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);xa=r,i.target.dispatchEvent(r),xa=null}else return t=Fi(i),t!==null&&yp(t),e.blockedOn=i,!1;t.shift()}return!0}function Ep(e,t,i){Kl(e)&&i.delete(t)}function e0(){ku=!1,fi!==null&&Kl(fi)&&(fi=null),di!==null&&Kl(di)&&(di=null),pi!==null&&Kl(pi)&&(pi=null),ys.forEach(Ep),bs.forEach(Ep)}function Xl(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,e0)))}var $l=null;function kp(e){$l!==e&&($l=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$l===e&&($l=null);for(var t=0;t<e.length;t+=3){var i=e[t],r=e[t+1],f=e[t+2];if(typeof r!="function"){if(Eu(r||i)===null)continue;break}var y=Fi(i);y!==null&&(e.splice(t,3),t-=3,xo(y,{pending:!0,data:f,method:i.method,action:r},r,f))}}))}function wr(e){function t(K){return Xl(K,e)}fi!==null&&Xl(fi,e),di!==null&&Xl(di,e),pi!==null&&Xl(pi,e),ys.forEach(t),bs.forEach(t);for(var i=0;i<_i.length;i++){var r=_i[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_i.length&&(i=_i[0],i.blockedOn===null);)xp(i),i.blockedOn===null&&_i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var f=i[r],y=i[r+1],D=f[zt]||null;if(typeof y=="function")D||kp(i);else if(D){var j=null;if(y&&y.hasAttribute("formAction")){if(f=y,D=y[zt]||null)j=D.formAction;else if(Eu(f)!==null)continue}else j=D.action;typeof j=="function"?i[r+1]=j:(i.splice(r,3),r-=3),kp(i)}}}function Ap(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(D){return f=D})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Au(e){this._internalRoot=e}Ql.prototype.render=Au.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,r=$t();vp(i,r,e,t,null,null)},Ql.prototype.unmount=Au.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vp(e.current,2,null,e,null,null),Ll(),t[Ii]=null}};function Ql(e){this._internalRoot=e}Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hc();e={blockedOn:null,target:e,priority:t};for(var i=0;i<_i.length&&t!==0&&t<_i[i].priority;i++);_i.splice(i,0,e),i===0&&xp(e)}};var Tp=s.version;if(Tp!=="19.2.6")throw Error(o(527,Tp,"19.2.6"));Y.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?m(e):null,e=e===null?null:e.stateNode,e};var t0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{bt=Zl.inject(t0),gt=Zl}catch{}}return xs.createRoot=function(e,t){if(!v(e))throw Error(o(299));var i=!1,r="",f=zf,y=Hf,D=Nf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(y=t.onCaughtError),t.onRecoverableError!==void 0&&(D=t.onRecoverableError)),t=mp(e,1,!1,null,null,i,r,null,f,y,D,Ap),e[Ii]=t.current,ou(e),new Au(t)},xs.hydrateRoot=function(e,t,i){if(!v(e))throw Error(o(299));var r=!1,f="",y=zf,D=Hf,j=Nf,K=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(D=i.onCaughtError),i.onRecoverableError!==void 0&&(j=i.onRecoverableError),i.formState!==void 0&&(K=i.formState)),t=mp(e,1,!0,t,i??null,r,f,K,y,D,j,Ap),t.context=gp(null),i=t.current,r=$t(),r=ma(r),f=ei(r),f.callback=null,ti(i,f,r),i=r,t.current.lanes=i,Or(t,i),Cn(t),e[Ii]=t.current,ou(e),new Ql(t)},xs.version="19.2.6",xs}var Up;function d0(){if(Up)return Ru.exports;Up=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(s){console.error(s)}}return n(),Ru.exports=f0(),Ru.exports}var p0=d0();function _0({sidebar:n,children:s}){const[l,o]=me.useState(!1);return V.jsxs("div",{className:l?"app-shell is-sidebar-collapsed":"app-shell",children:[V.jsxs("aside",{className:"app-sidebar",children:[V.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":l?"Expand sidebar":"Collapse sidebar",title:l?"Expand sidebar":"Collapse sidebar",onClick:()=>o(v=>!v)}),V.jsx("div",{className:"sidebar-content",children:n})]}),V.jsx("main",{className:"app-main",children:s})]})}function m0(n,s){return n.find(l=>l.taskSlug===s)??n[0]??null}const Me={getAppPreferences(){return Fe("/api/settings/preferences")},updateAppPreferences(n){return Fe("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return Fe("/api/projects/current")},getRecentRepositoryPaths(){return Fe("/api/projects/recent")},connectProject(n){return Fe("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Fe("/api/tasks")},createTask(n){return Fe("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,s={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return Fe("/api/projects/harness")},applyHarness(){return Fe("/api/projects/harness/apply",{method:"POST"})},getTaskStatus(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTaskRoundState(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/round`)},getTranslationSettings(){return Fe("/api/translation/settings")},updateTranslationSettings(n){return Fe("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return Fe("/api/translation/prompts")},testTranslationProvider(){return Fe("/api/translation/test",{method:"POST"})},startTranslationSession(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/start`,{method:"POST"})},pollTranslationSession(n,s,l){const o=new URLSearchParams({after:String(s)});return l!==void 0&&o.set("limit",String(l)),Fe(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,s,l){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(n,s,l){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(n){return Fe(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,s){return Fe(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(s)}`,{method:"POST"})}};async function Fe(n,s={}){var v,b;const l=new Headers(s.headers);s.body!==void 0&&s.body!==null&&!l.has("content-type")&&l.set("content-type","application/json");const o=await fetch(n,{...s,headers:l});if(!o.ok){const p=await o.json().catch(()=>null),a=(v=p==null?void 0:p.error)!=null&&v.hint?`${p.error.message} ${p.error.hint}`:((b=p==null?void 0:p.error)==null?void 0:b.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function g0({events:n,maxEvents:s=8,showHeader:l=!0}){const o=s===null?n:n.slice(-s);return V.jsxs("section",{className:"event-log",children:[l?V.jsx("h2",{children:"Events"}):null,n.length===0?V.jsx("p",{className:"muted",children:"No terminal events yet."}):V.jsx("ol",{children:o.map((v,b)=>V.jsx("li",{children:v},`${v}-${b}`))})]})}function fc({status:n}){return V.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function v0({status:n,applyResult:s,busy:l=!1,onRefresh:o,onApply:v}){return n?V.jsxs("section",{className:"harness-panel",children:[V.jsxs("div",{className:"harness-panel-header",children:[V.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"}),V.jsxs("div",{className:"harness-actions",children:[V.jsx("button",{type:"button",disabled:l,onClick:()=>void o(),children:"Refresh"}),V.jsx("button",{type:"button",disabled:l||!n.needsApply,onClick:()=>void v(),children:"Install / Update"})]})]}),V.jsx("ol",{className:"harness-file-list",children:n.files.map(b=>V.jsxs("li",{children:[V.jsx("span",{children:b.path}),V.jsx(fc,{status:b.action})]},b.path))}),n.plannedChanges.length>0?V.jsxs("div",{className:"harness-changes",children:[V.jsx("h3",{children:"Planned Changes"}),V.jsx("ul",{children:n.plannedChanges.map(b=>V.jsxs("li",{children:[V.jsx("strong",{children:b.action})," ",b.path]},`${b.path}:${b.action}`))})]}):null,s?V.jsxs("div",{className:"harness-result",children:[V.jsx("p",{children:s.message}),s.changedFiles.length>0?V.jsx("ul",{children:s.changedFiles.map(b=>V.jsxs("li",{children:[V.jsx("strong",{children:b.action})," ",b.path]},`${b.path}:${b.action}`))}):null]}):null,n.warnings.length>0?V.jsx("ul",{className:"warnings",children:n.warnings.map(b=>V.jsx("li",{children:b},b))}):null]}):null}function dc(n){return{total:n.length,accepted:n.filter(s=>s.acceptedAt).length,delivered:n.filter(s=>s.deliveredAt).length}}function S0(n,s=6){const l=[...n].sort(C0).map((v,b)=>({message:v,sequence:b+1}));return[...s===null?l:l.slice(-s)].sort((v,b)=>b.sequence-v.sequence)}function y0({messages:n,orchestration:s,busy:l,maxMessages:o=6,showControls:v=!0,showHeader:b=!0,onModeChange:p,onMarkAllDone:a}){const[u,h]=me.useState(null),m=dc(n),c=(s==null?void 0:s.mode)??"manual",C=S0(n,o);async function w(k){await w0(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return V.jsxs("section",{className:"message-panel",children:[b?V.jsxs("div",{className:"message-panel-header",children:[V.jsxs("div",{children:[V.jsx("h2",{children:"Messages"}),V.jsxs("p",{className:"muted",children:[m.total," total / ",m.accepted," accepted"]})]}),v&&p?V.jsx("div",{className:"message-controls",children:V.jsxs("label",{className:"message-mode-toggle",children:[V.jsx("input",{type:"checkbox",checked:c==="auto",disabled:l,onChange:k=>p(k.target.checked?"auto":"manual")}),V.jsx("span",{children:"Auto orchestration"})]})}):null,v&&a?V.jsx("button",{type:"button",disabled:l,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?V.jsx("p",{className:"muted",children:"No role messages yet."}):V.jsx("ol",{className:"message-list",children:C.map(({message:k,sequence:x})=>V.jsxs("li",{className:"message-item",children:[V.jsxs("div",{className:"message-item-main",children:[V.jsxs("div",{className:"message-meta",children:[V.jsxs("span",{className:"message-sequence",children:["#",x]}),V.jsx("time",{dateTime:ra(k),children:b0(ra(k))}),V.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),V.jsx("span",{children:k.type})]}),V.jsx("p",{children:k.body}),k.failureReason?V.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?V.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),V.jsx("div",{className:"message-actions",children:V.jsx("button",{type:"button",disabled:l,onClick:()=>void w(k),children:u===k.id?"Copied":"Copy"})})]},k.id))})]})}function b0(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function ra(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function C0(n,s){const l=ra(n).localeCompare(ra(s));if(l!==0)return l;const o=n.createdAt.localeCompare(s.createdAt);return o!==0?o:n.id.localeCompare(s.id)}async function w0(n){var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(n);return}const s=document.createElement("textarea");s.value=n,s.setAttribute("readonly","true"),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()}function x0({defaultPath:n="",recentPaths:s=[],busy:l=!1,onConnect:o}){const[v,b]=me.useState(n);me.useEffect(()=>{n&&b(n)},[n]);async function p(a){a.preventDefault(),await o(v)}return V.jsx("form",{className:"repo-connect",onSubmit:p,children:V.jsxs("div",{className:s.length>0?"inline-form has-recent-paths":"inline-form",children:[V.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:v,onChange:a=>b(a.target.value),placeholder:"/path/to/repo"}),s.length>0?V.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&b(a.target.value)},children:[V.jsx("option",{value:"",children:"Recent"}),s.map(a=>V.jsx("option",{value:a,children:a},a))]}):null,V.jsx("button",{type:"submit",disabled:l||!v.trim(),children:"Connect"})]})})}function E0({tasks:n,activeTaskSlug:s,onSelect:l}){return V.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>V.jsxs("button",{className:o.taskSlug===s?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>l(o.taskSlug),children:[V.jsx("span",{children:o.title||o.taskSlug}),V.jsx(fc,{status:o.status==="created"?"unknown":"running"})]},o.taskSlug))})}function k0({project:n,recentRepositoryPaths:s,tasks:l,activeTaskSlug:o,messages:v,orchestration:b,events:p,harnessStatus:a,harnessApplyResult:u,busy:h,onConnect:m,onRefreshHarness:c,onApplyHarness:C,onCreateTask:w,onSelectTask:k,themeMode:x,onThemeModeChange:S,roundCompletionAlerts:_,onRoundCompletionAlertsChange:d,onTryRoundAlert:g,onMarkAllMessagesDone:E,onDeleteMessageHistory:R}){const[A,L]=me.useState(""),[T,B]=me.useState(!0),[N,F]=me.useState(!1),[G,q]=me.useState(!1),$=dc(v),W=A.trim();async function P(Y){Y.preventDefault(),await w({taskSlug:W,createWorktree:T}),L(""),B(!0)}return V.jsxs("div",{className:"project-dashboard",children:[V.jsx("header",{className:"brand-header",children:V.jsx("strong",{children:"VibeCodingMaster"})}),V.jsx(xr,{title:"Repository Path",defaultOpen:!o,children:V.jsx(x0,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:s,busy:h,onConnect:m})}),n?V.jsx(xr,{title:"Repository",children:V.jsxs("div",{className:"project-summary",children:[V.jsxs("dl",{children:[V.jsxs("div",{children:[V.jsx("dt",{children:"Path"}),V.jsx("dd",{children:n.repoRoot})]}),V.jsxs("div",{children:[V.jsx("dt",{children:"Branch"}),V.jsx("dd",{children:n.branch})]}),V.jsxs("div",{children:[V.jsx("dt",{children:"Working tree"}),V.jsx("dd",{children:n.isDirty?"uncommitted changes":"clean"})]})]}),n.warnings.length>0?V.jsx("ul",{className:"warnings",children:n.warnings.map(Y=>V.jsx("li",{children:Y},Y))}):null]})}):null,V.jsx(xr,{title:"Settings",children:V.jsxs("div",{className:"sidebar-settings",children:[V.jsxs("button",{"aria-label":`Theme mode: ${Ip(x)}`,className:"settings-toggle theme-mode-toggle",disabled:h,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>S(A0(x)),children:[V.jsx("span",{children:"Theme"}),V.jsx("span",{children:Ip(x)})]}),V.jsxs("button",{"aria-pressed":_,className:_?"settings-toggle is-active":"settings-toggle",disabled:h,type:"button",onClick:()=>d(!_),children:[V.jsx("span",{children:"Round alert"}),V.jsx("span",{children:_?"on":"off"})]}),V.jsxs("button",{className:"settings-toggle",type:"button",onClick:g,children:[V.jsx("span",{children:"Try alert"}),V.jsx("span",{children:"test"})]}),o?V.jsxs(V.Fragment,{children:[V.jsxs("button",{type:"button",onClick:()=>F(!0),children:[V.jsx("span",{children:"Messages"}),V.jsxs("span",{className:"muted",children:[$.total," total"]})]}),V.jsxs("button",{type:"button",onClick:()=>q(!0),children:[V.jsx("span",{children:"Events"}),V.jsxs("span",{className:"muted",children:[p.length," total"]})]})]}):null]})}),n?V.jsx(xr,{title:"VCM Harness",children:V.jsx(v0,{status:a,applyResult:u,busy:h,onRefresh:c,onApply:C})}):null,n?V.jsx(xr,{title:"New Task",children:V.jsx("div",{className:"task-create",children:V.jsxs("form",{onSubmit:P,children:[V.jsx("input",{value:A,onChange:Y=>L(Y.target.value),placeholder:"task name"}),V.jsxs("label",{className:"task-create-option",children:[V.jsx("input",{type:"checkbox",checked:T,onChange:Y=>B(Y.target.checked)}),V.jsx("span",{children:"Create worktree and branch"})]}),T?V.jsxs("div",{className:"task-create-preview",children:[V.jsxs("small",{children:["branch: ",W?`feature/${W}`:"feature/<task>"]}),V.jsxs("small",{children:["worktree: ",W?`.claude/worktrees/${W}`:".claude/worktrees/<task>"]})]}):V.jsx("div",{className:"task-create-preview",children:V.jsx("small",{children:"uses current repository path and current branch"})}),V.jsx("button",{type:"submit",disabled:h||!W,children:"Create"})]})})}):null,l.length>0?V.jsx(xr,{title:"Tasks",children:V.jsx(E0,{tasks:l,activeTaskSlug:o,onSelect:k})}):null,N?V.jsx(D0,{busy:h,messages:v,orchestration:b,onClose:()=>F(!1),onMarkAllDone:()=>{o&&E(o)},onDeleteMessageHistory:()=>{o&&R(o)}}):null,G?V.jsx(T0,{events:p,onClose:()=>q(!1)}):null]})}function A0(n){return n==="system"?"light":n==="light"?"dark":"system"}function Ip(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function T0({events:n,onClose:s}){return V.jsx("div",{className:"modal-backdrop",children:V.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[V.jsxs("header",{children:[V.jsxs("div",{children:[V.jsx("h2",{children:"Events"}),V.jsxs("p",{className:"muted",children:[n.length," total"]})]}),V.jsx("button",{type:"button",onClick:s,children:"Close"})]}),V.jsx(g0,{events:n,maxEvents:null,showHeader:!1})]})})}function D0({busy:n,messages:s,orchestration:l,onClose:o,onMarkAllDone:v,onDeleteMessageHistory:b}){const p=dc(s);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(`
50
+ `))&&v()}function u(){window.confirm([`Delete ${p.total} message histor${p.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
51
+ `))&&b()}return V.jsx("div",{className:"modal-backdrop",children:V.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[V.jsxs("header",{children:[V.jsxs("div",{children:[V.jsx("h2",{children:"Messages"}),V.jsxs("p",{className:"muted",children:[p.total," total / ",p.accepted," accepted",l?` · ${l.mode}`:""]})]}),V.jsxs("div",{className:"modal-actions",children:[V.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),V.jsx("button",{type:"button",disabled:n||p.total===0,onClick:u,children:"Delete All"}),V.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),V.jsx(y0,{busy:n,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1})]})})}function xr({children:n,defaultOpen:s=!1,title:l}){const[o,v]=me.useState(s);return me.useEffect(()=>{v(s)},[s]),V.jsxs("section",{className:"sidebar-section",children:[V.jsxs("button",{"aria-expanded":o,className:"sidebar-section-toggle",type:"button",onClick:()=>v(b=>!b),children:[V.jsx("span",{children:l}),V.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),o?V.jsx("div",{className:"sidebar-section-content",children:n}):null]})}const ua=[{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}];ua.map(n=>n.name);ua.filter(n=>n.dispatchable).map(n=>n.name);function z_(n,s){return n.find(l=>l.role===s)}function R0({activeRole:n,sessions:s,onSelect:l}){return V.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:ua.map(o=>{const v=z_(s,o.name),b=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return V.jsxs("button",{className:o.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":o.name===n,onClick:()=>l(o.name),children:[V.jsx("span",{children:o.label}),V.jsx(fc,{status:b})]},o.name)})})}var Bu={exports:{}},Pp;function L0(){return Pp||(Pp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={};return(()=>{var o=l;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(v){this._terminal=v}dispose(){}fit(){const v=this.proposeDimensions();if(!v||!this._terminal||isNaN(v.cols)||isNaN(v.rows))return;const b=this._terminal._core;this._terminal.rows===v.rows&&this._terminal.cols===v.cols||(b._renderService.clear(),this._terminal.resize(v.cols,v.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const v=this._terminal._core,b=v._renderService.dimensions;if(b.css.cell.width===0||b.css.cell.height===0)return;const p=this._terminal.options.scrollback===0?0:v.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),c=u-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),C=h-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-p;return{cols:Math.max(2,Math.floor(C/b.css.cell.width)),rows:Math.max(1,Math.floor(c/b.css.cell.height))}}}})(),l})()))})(Bu)),Bu.exports}var M0=L0(),zu={exports:{}},Fp;function O0(){return Fp||(Fp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={6:(p,a)=>{function u(m){try{const c=new URL(m),C=c.password&&c.username?`${c.protocol}//${c.username}:${c.password}@${c.host}`:c.username?`${c.protocol}//${c.username}@${c.host}`:`${c.protocol}//${c.host}`;return m.toLocaleLowerCase().startsWith(C.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(m,c,C,w={}){this._terminal=m,this._regex=c,this._handler=C,this._options=w}provideLinks(m,c){const C=h.computeLink(m,this._regex,this._terminal,this._handler);c(this._addCallbacks(C))}_addCallbacks(m){return m.map((c=>(c.leave=this._options.leave,c.hover=(C,w)=>{if(this._options.hover){const{range:k}=c;this._options.hover(C,w,k)}},c)))}};class h{static computeLink(c,C,w,k){const x=new RegExp(C.source,(C.flags||"")+"g"),[S,_]=h._getWindowedLineStrings(c-1,w),d=S.join("");let g;const E=[];for(;g=x.exec(d);){const R=g[0];if(!u(R))continue;const[A,L]=h._mapStrIdx(w,_,0,g.index),[T,B]=h._mapStrIdx(w,A,L,R.length);if(A===-1||L===-1||T===-1||B===-1)continue;const N={start:{x:L+1,y:A+1},end:{x:B,y:T+1}};E.push({range:N,text:R,activate:k})}return E}static _getWindowedLineStrings(c,C){let w,k=c,x=c,S=0,_="";const d=[];if(w=C.buffer.active.getLine(c)){const g=w.translateToString(!0);if(w.isWrapped&&g[0]!==" "){for(S=0;(w=C.buffer.active.getLine(--k))&&S<2048&&(_=w.translateToString(!0),S+=_.length,d.push(_),w.isWrapped&&_.indexOf(" ")===-1););d.reverse()}for(d.push(g),S=0;(w=C.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(_=w.translateToString(!0),S+=_.length,d.push(_),_.indexOf(" ")===-1););}return[d,k]}static _mapStrIdx(c,C,w,k){const x=c.buffer.active,S=x.getNullCell();let _=w;for(;k;){const d=x.getLine(C);if(!d)return[-1,-1];for(let g=_;g<d.length;++g){d.getCell(g,S);const E=S.getChars();if(S.getWidth()&&(k-=E.length||1,g===d.length-1&&E==="")){const R=x.getLine(C+1);R&&R.isWrapped&&(R.getCell(0,S),S.getWidth()===2&&(k+=1))}if(k<0)return[C,g]}C++,_=0}return[C,_]}}a.LinkComputer=h}},o={};function v(p){var a=o[p];if(a!==void 0)return a.exports;var u=o[p]={exports:{}};return l[p](u,u.exports,v),u.exports}var b={};return(()=>{var p=b;Object.defineProperty(p,"__esModule",{value:!0}),p.WebLinksAddon=void 0;const a=v(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(m,c){const C=window.open();if(C){try{C.opener=null}catch{}C.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}p.WebLinksAddon=class{constructor(m=h,c={}){this._handler=m,this._options=c}activate(m){this._terminal=m;const c=this._options,C=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,C,this._handler,c))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),b})()))})(zu)),zu.exports}var B0=O0(),Hu={exports:{}},qp;function z0(){return qp||(qp=1,(function(n,s){(function(l,o){n.exports=o()})(globalThis,(()=>(()=>{var l={4567:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},m=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const c=u(9042),C=u(9924),w=u(844),k=u(4725),x=u(2585),S=u(3656);let _=a.AccessibilityManager=class extends w.Disposable{constructor(d,g,E,R){super(),this._terminal=d,this._coreBrowserService=E,this._renderService=R,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,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 C.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((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
51
52
  `)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.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(d){for(let g=0;g<d;g++)this._handleChar(" ")}_handleChar(d){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==d&&(this._charsToAnnounce+=d):this._charsToAnnounce+=d,d===`
52
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(d){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(d)||this._charsToConsume.push(d)}_refreshRows(d,g){this._liveRegionDebouncer.refresh(d,g,this._terminal.rows)}_renderRows(d,g){const E=this._terminal.buffer,R=E.lines.length.toString();for(let A=d;A<=g;A++){const L=E.lines.get(E.ydisp+A),T=[],B=(L==null?void 0:L.translateToString(!0,void 0,void 0,T))||"",N=(E.ydisp+A+1).toString(),V=this._rowElements[A];V&&(B.length===0?(V.innerText=" ",this._rowColumns.set(V,[0,1])):(V.textContent=B,this._rowColumns.set(V,T)),V.setAttribute("aria-posinset",N),V.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(d,g){const E=d.target,R=this._rowElements[g===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||d.relatedTarget!==R)return;let A,L;if(g===0?(A=E,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(A=this._rowElements.shift(),L=E,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),d.preventDefault(),d.stopImmediatePropagation()}_handleSelectionChange(){var B;if(this._rowElements.length===0)return;const d=document.getSelection();if(!d)return;if(d.isCollapsed)return void(this._rowContainer.contains(d.anchorNode)&&this._terminal.clearSelection());if(!d.anchorNode||!d.focusNode)return void console.error("anchorNode and/or focusNode are null");let g={node:d.anchorNode,offset:d.anchorOffset},E={node:d.focusNode,offset:d.focusOffset};if((g.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||g.node===E.node&&g.offset>E.offset)&&([g,E]=[E,g]),g.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(g={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(g.node))return;const R=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:R,offset:((B=R.textContent)==null?void 0:B.length)??0}),!this._rowContainer.contains(E.node))return;const A=({node:N,offset:V})=>{const F=N instanceof Text?N.parentNode:N;let U=parseInt(F==null?void 0:F.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(F);if(!Y)return console.warn("columns is null. Race condition?"),null;let $=V<Y.length?Y[V]:Y.slice(-1)[0]+1;return $>=this._terminal.cols&&(++U,$=0),{row:U,column:$}},L=A(g),T=A(E);if(L&&T){if(L.row>T.row||L.row===T.row&&L.column>=T.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(T.row-L.row)*this._terminal.cols-L.column+T.column)}}_handleResize(d){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>d;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const d=this._coreBrowserService.mainDocument.createElement("div");return d.setAttribute("role","listitem"),d.tabIndex=-1,this._refreshRowDimensions(d),d}_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 d=0;d<this._terminal.rows;d++)this._refreshRowDimensions(this._rowElements[d])}}_refreshRowDimensions(d){d.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=m=h([_(1,x.IInstantiationService),_(2,k.ICoreBrowserService),_(3,k.IRenderService)],m)},3614:(p,a)=>{function u(C){return C.replace(/\r?\n/g,"\r")}function h(C,w){return w?"\x1B[200~"+C+"\x1B[201~":C}function _(C,w,k,x){C=h(C=u(C),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(C,!0),w.value=""}function c(C,w,k){const x=k.getBoundingClientRect(),S=C.clientX-x.left-10,m=C.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${S}px`,w.style.top=`${m}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=u,a.bracketTextForPaste=h,a.copyHandler=function(C,w){C.clipboardData&&C.clipboardData.setData("text/plain",w.selectionText),C.preventDefault()},a.handlePasteEvent=function(C,w,k,x){C.stopPropagation(),C.clipboardData&&_(C.clipboardData.getData("text/plain"),w,k,x)},a.paste=_,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(C,w,k,x,S){c(C,w,k),S&&x.rightClickSelect(C),w.value=x.selectionText,w.select()}},7239:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=u(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(_,c,C){this._css.set(_,c,C)}getCss(_,c){return this._css.get(_,c)}setColor(_,c,C){this._color.set(_,c,C)}getColor(_,c){return this._color.get(_,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,h,_,c){u.addEventListener(h,_,c);let C=!1;return{dispose:()=>{C||(C=!0,u.removeEventListener(h,_,c))}}}},3551:function(p,a,u){var h=this&&this.__decorate||function(m,d,g,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,d,g,E);else for(var T=m.length-1;T>=0;T--)(R=m[T])&&(L=(A<3?R(L):A>3?R(d,g,L):R(d,g))||L);return A>3&&L&&Object.defineProperty(d,g,L),L},_=this&&this.__param||function(m,d){return function(g,E){d(g,E,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=u(3656),C=u(8460),w=u(844),k=u(2585),x=u(4725);let S=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(m,d,g,E,R){super(),this._element=m,this._mouseService=d,this._renderService=g,this._bufferService=E,this._linkProviderService=R,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new C.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new C.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(m){this._lastMouseEvent=m;const d=this._positionFromMouseEvent(m,this._element,this._mouseService);if(!d)return;this._isMouseOut=!1;const g=m.composedPath();for(let E=0;E<g.length;E++){const R=g[E];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&d.x===this._lastBufferCell.x&&d.y===this._lastBufferCell.y||(this._handleHover(d),this._lastBufferCell=d)}_handleHover(m){if(this._activeLine!==m.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(m,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,m)||(this._clearCurrentLink(),this._askForLink(m,!0))}_askForLink(m,d){var E,R;this._activeProviderReplies&&d||((E=this._activeProviderReplies)==null||E.forEach((A=>{A==null||A.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=m.y);let g=!1;for(const[A,L]of this._linkProviderService.linkProviders.entries())d?(R=this._activeProviderReplies)!=null&&R.get(A)&&(g=this._checkLinkProviderResult(A,m,g)):L.provideLinks(m.y,(T=>{var N,V;if(this._isMouseOut)return;const B=T==null?void 0:T.map((F=>({link:F})));(N=this._activeProviderReplies)==null||N.set(A,B),g=this._checkLinkProviderResult(A,m,g),((V=this._activeProviderReplies)==null?void 0:V.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(m.y,this._activeProviderReplies)}))}_removeIntersectingLinks(m,d){const g=new Set;for(let E=0;E<d.size;E++){const R=d.get(E);if(R)for(let A=0;A<R.length;A++){const L=R[A],T=L.link.range.start.y<m?0:L.link.range.start.x,B=L.link.range.end.y>m?this._bufferService.cols:L.link.range.end.x;for(let N=T;N<=B;N++){if(g.has(N)){R.splice(A--,1);break}g.add(N)}}}}_checkLinkProviderResult(m,d,g){var A;if(!this._activeProviderReplies)return g;const E=this._activeProviderReplies.get(m);let R=!1;for(let L=0;L<m;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&E){const L=E.find((T=>this._linkAtPosition(T.link,d)));L&&(g=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!g)for(let L=0;L<this._activeProviderReplies.size;L++){const T=(A=this._activeProviderReplies.get(L))==null?void 0:A.find((B=>this._linkAtPosition(B.link,d)));if(T){g=!0,this._handleNewLink(T);break}}return g}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(m){if(!this._currentLink)return;const d=this._positionFromMouseEvent(m,this._element,this._mouseService);d&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,d)&&this._currentLink.link.activate(m,this._currentLink.link.text)}_clearCurrentLink(m,d){this._currentLink&&this._lastMouseEvent&&(!m||!d||this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=d)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(m){if(!this._lastMouseEvent)return;const d=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);d&&this._linkAtPosition(m.link,d)&&(this._currentLink=m,this._currentLink.state={decorations:{underline:m.link.decorations===void 0||m.link.decorations.underline,pointerCursor:m.link.decorations===void 0||m.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,m.link,this._lastMouseEvent),m.link.decorations={},Object.defineProperties(m.link.decorations,{pointerCursor:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.pointerCursor},set:g=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==g&&(this._currentLink.state.decorations.pointerCursor=g,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",g))}},underline:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.underline},set:g=>{var E,R,A;(E=this._currentLink)!=null&&E.state&&((A=(R=this._currentLink)==null?void 0:R.state)==null?void 0:A.decorations.underline)!==g&&(this._currentLink.state.decorations.underline=g,this._currentLink.state.isHovered&&this._fireUnderlineEvent(m.link,g))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((g=>{if(!this._currentLink)return;const E=g.start===0?0:g.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+g.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(E,R),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(m,d,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!0),this._currentLink.state.decorations.pointerCursor&&m.classList.add("xterm-cursor-pointer")),d.hover&&d.hover(g,d.text)}_fireUnderlineEvent(m,d){const g=m.range,E=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(g.start.x-1,g.start.y-E-1,g.end.x,g.end.y-E-1,void 0);(d?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(m,d,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!1),this._currentLink.state.decorations.pointerCursor&&m.classList.remove("xterm-cursor-pointer")),d.leave&&d.leave(g,d.text)}_linkAtPosition(m,d){const g=m.range.start.y*this._bufferService.cols+m.range.start.x,E=m.range.end.y*this._bufferService.cols+m.range.end.x,R=d.y*this._bufferService.cols+d.x;return g<=R&&R<=E}_positionFromMouseEvent(m,d,g){const E=g.getCoords(m,d,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(m,d,g,E,R){return{x1:m,y1:d,x2:g,y2:E,cols:this._bufferService.cols,fg:R}}};a.Linkifier=S=h([_(1,x.IMouseService),_(2,x.IRenderService),_(3,k.IBufferService),_(4,x.ILinkProviderService)],S)},9042:(p,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(p,a,u){var h=this&&this.__decorate||function(x,S,m,d){var g,E=arguments.length,R=E<3?S:d===null?d=Object.getOwnPropertyDescriptor(S,m):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,m,d);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,m,R):g(S,m))||R);return E>3&&R&&Object.defineProperty(S,m,R),R},_=this&&this.__param||function(x,S){return function(m,d){S(m,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=u(511),C=u(2585);let w=a.OscLinkProvider=class{constructor(x,S,m){this._bufferService=x,this._optionsService=S,this._oscLinkService=m}provideLinks(x,S){var B;const m=this._bufferService.buffer.lines.get(x-1);if(!m)return void S(void 0);const d=[],g=this._optionsService.rawOptions.linkHandler,E=new c.CellData,R=m.getTrimmedLength();let A=-1,L=-1,T=!1;for(let N=0;N<R;N++)if(L!==-1||m.hasContent(N)){if(m.loadCell(N,E),E.hasExtendedAttrs()&&E.extended.urlId){if(L===-1){L=N,A=E.extended.urlId;continue}T=E.extended.urlId!==A}else L!==-1&&(T=!0);if(T||L!==-1&&N===R-1){const V=(B=this._oscLinkService.getLinkData(A))==null?void 0:B.uri;if(V){const F={start:{x:L+1,y:x},end:{x:N+(T||N!==R-1?0:1),y:x}};let U=!1;if(!(g!=null&&g.allowNonHttpProtocols))try{const Y=new URL(V);["http:","https:"].includes(Y.protocol)||(U=!0)}catch{U=!0}U||d.push({text:V,range:F,activate:(Y,$)=>g?g.activate(Y,$,F):k(0,$),hover:(Y,$)=>{var G;return(G=g==null?void 0:g.hover)==null?void 0:G.call(g,Y,$,F)},leave:(Y,$)=>{var G;return(G=g==null?void 0:g.leave)==null?void 0:G.call(g,Y,$,F)}})}T=!1,E.hasExtendedAttrs()&&E.extended.urlId?(L=N,A=E.extended.urlId):(L=-1,A=-1)}}S(d)}};function k(x,S){if(confirm(`Do you want to navigate to ${S}?
53
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(d){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(d)||this._charsToConsume.push(d)}_refreshRows(d,g){this._liveRegionDebouncer.refresh(d,g,this._terminal.rows)}_renderRows(d,g){const E=this._terminal.buffer,R=E.lines.length.toString();for(let A=d;A<=g;A++){const L=E.lines.get(E.ydisp+A),T=[],B=(L==null?void 0:L.translateToString(!0,void 0,void 0,T))||"",N=(E.ydisp+A+1).toString(),F=this._rowElements[A];F&&(B.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=B,this._rowColumns.set(F,T)),F.setAttribute("aria-posinset",N),F.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(d,g){const E=d.target,R=this._rowElements[g===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||d.relatedTarget!==R)return;let A,L;if(g===0?(A=E,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(A=this._rowElements.shift(),L=E,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),d.preventDefault(),d.stopImmediatePropagation()}_handleSelectionChange(){var B;if(this._rowElements.length===0)return;const d=document.getSelection();if(!d)return;if(d.isCollapsed)return void(this._rowContainer.contains(d.anchorNode)&&this._terminal.clearSelection());if(!d.anchorNode||!d.focusNode)return void console.error("anchorNode and/or focusNode are null");let g={node:d.anchorNode,offset:d.anchorOffset},E={node:d.focusNode,offset:d.focusOffset};if((g.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||g.node===E.node&&g.offset>E.offset)&&([g,E]=[E,g]),g.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(g={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(g.node))return;const R=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:R,offset:((B=R.textContent)==null?void 0:B.length)??0}),!this._rowContainer.contains(E.node))return;const A=({node:N,offset:F})=>{const G=N instanceof Text?N.parentNode:N;let q=parseInt(G==null?void 0:G.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const $=this._rowColumns.get(G);if(!$)return console.warn("columns is null. Race condition?"),null;let W=F<$.length?$[F]:$.slice(-1)[0]+1;return W>=this._terminal.cols&&(++q,W=0),{row:q,column:W}},L=A(g),T=A(E);if(L&&T){if(L.row>T.row||L.row===T.row&&L.column>=T.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(T.row-L.row)*this._terminal.cols-L.column+T.column)}}_handleResize(d){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>d;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const d=this._coreBrowserService.mainDocument.createElement("div");return d.setAttribute("role","listitem"),d.tabIndex=-1,this._refreshRowDimensions(d),d}_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 d=0;d<this._terminal.rows;d++)this._refreshRowDimensions(this._rowElements[d])}}_refreshRowDimensions(d){d.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=_=h([m(1,x.IInstantiationService),m(2,k.ICoreBrowserService),m(3,k.IRenderService)],_)},3614:(p,a)=>{function u(C){return C.replace(/\r?\n/g,"\r")}function h(C,w){return w?"\x1B[200~"+C+"\x1B[201~":C}function m(C,w,k,x){C=h(C=u(C),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(C,!0),w.value=""}function c(C,w,k){const x=k.getBoundingClientRect(),S=C.clientX-x.left-10,_=C.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${S}px`,w.style.top=`${_}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=u,a.bracketTextForPaste=h,a.copyHandler=function(C,w){C.clipboardData&&C.clipboardData.setData("text/plain",w.selectionText),C.preventDefault()},a.handlePasteEvent=function(C,w,k,x){C.stopPropagation(),C.clipboardData&&m(C.clipboardData.getData("text/plain"),w,k,x)},a.paste=m,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(C,w,k,x,S){c(C,w,k),S&&x.rightClickSelect(C),w.value=x.selectionText,w.select()}},7239:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=u(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(m,c,C){this._css.set(m,c,C)}getCss(m,c){return this._css.get(m,c)}setColor(m,c,C){this._color.set(m,c,C)}getColor(m,c){return this._color.get(m,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,h,m,c){u.addEventListener(h,m,c);let C=!1;return{dispose:()=>{C||(C=!0,u.removeEventListener(h,m,c))}}}},3551:function(p,a,u){var h=this&&this.__decorate||function(_,d,g,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,g,E);else for(var T=_.length-1;T>=0;T--)(R=_[T])&&(L=(A<3?R(L):A>3?R(d,g,L):R(d,g))||L);return A>3&&L&&Object.defineProperty(d,g,L),L},m=this&&this.__param||function(_,d){return function(g,E){d(g,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=u(3656),C=u(8460),w=u(844),k=u(2585),x=u(4725);let S=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(_,d,g,E,R){super(),this._element=_,this._mouseService=d,this._renderService=g,this._bufferService=E,this._linkProviderService=R,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new C.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new C.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const d=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!d)return;this._isMouseOut=!1;const g=_.composedPath();for(let E=0;E<g.length;E++){const R=g[E];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&d.x===this._lastBufferCell.x&&d.y===this._lastBufferCell.y||(this._handleHover(d),this._lastBufferCell=d)}_handleHover(_){if(this._activeLine!==_.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(_,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,_)||(this._clearCurrentLink(),this._askForLink(_,!0))}_askForLink(_,d){var E,R;this._activeProviderReplies&&d||((E=this._activeProviderReplies)==null||E.forEach((A=>{A==null||A.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let g=!1;for(const[A,L]of this._linkProviderService.linkProviders.entries())d?(R=this._activeProviderReplies)!=null&&R.get(A)&&(g=this._checkLinkProviderResult(A,_,g)):L.provideLinks(_.y,(T=>{var N,F;if(this._isMouseOut)return;const B=T==null?void 0:T.map((G=>({link:G})));(N=this._activeProviderReplies)==null||N.set(A,B),g=this._checkLinkProviderResult(A,_,g),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,d){const g=new Set;for(let E=0;E<d.size;E++){const R=d.get(E);if(R)for(let A=0;A<R.length;A++){const L=R[A],T=L.link.range.start.y<_?0:L.link.range.start.x,B=L.link.range.end.y>_?this._bufferService.cols:L.link.range.end.x;for(let N=T;N<=B;N++){if(g.has(N)){R.splice(A--,1);break}g.add(N)}}}}_checkLinkProviderResult(_,d,g){var A;if(!this._activeProviderReplies)return g;const E=this._activeProviderReplies.get(_);let R=!1;for(let L=0;L<_;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&E){const L=E.find((T=>this._linkAtPosition(T.link,d)));L&&(g=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!g)for(let L=0;L<this._activeProviderReplies.size;L++){const T=(A=this._activeProviderReplies.get(L))==null?void 0:A.find((B=>this._linkAtPosition(B.link,d)));if(T){g=!0,this._handleNewLink(T);break}}return g}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const d=this._positionFromMouseEvent(_,this._element,this._mouseService);d&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,d)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,d){this._currentLink&&this._lastMouseEvent&&(!_||!d||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=d)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const d=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);d&&this._linkAtPosition(_.link,d)&&(this._currentLink=_,this._currentLink.state={decorations:{underline:_.link.decorations===void 0||_.link.decorations.underline,pointerCursor:_.link.decorations===void 0||_.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,_.link,this._lastMouseEvent),_.link.decorations={},Object.defineProperties(_.link.decorations,{pointerCursor:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.pointerCursor},set:g=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==g&&(this._currentLink.state.decorations.pointerCursor=g,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",g))}},underline:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.underline},set:g=>{var E,R,A;(E=this._currentLink)!=null&&E.state&&((A=(R=this._currentLink)==null?void 0:R.state)==null?void 0:A.decorations.underline)!==g&&(this._currentLink.state.decorations.underline=g,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,g))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((g=>{if(!this._currentLink)return;const E=g.start===0?0:g.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+g.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(E,R),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(_,d,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),d.hover&&d.hover(g,d.text)}_fireUnderlineEvent(_,d){const g=_.range,E=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(g.start.x-1,g.start.y-E-1,g.end.x,g.end.y-E-1,void 0);(d?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(_,d,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),d.leave&&d.leave(g,d.text)}_linkAtPosition(_,d){const g=_.range.start.y*this._bufferService.cols+_.range.start.x,E=_.range.end.y*this._bufferService.cols+_.range.end.x,R=d.y*this._bufferService.cols+d.x;return g<=R&&R<=E}_positionFromMouseEvent(_,d,g){const E=g.getCoords(_,d,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,d,g,E,R){return{x1:_,y1:d,x2:g,y2:E,cols:this._bufferService.cols,fg:R}}};a.Linkifier=S=h([m(1,x.IMouseService),m(2,x.IRenderService),m(3,k.IBufferService),m(4,x.ILinkProviderService)],S)},9042:(p,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(p,a,u){var h=this&&this.__decorate||function(x,S,_,d){var g,E=arguments.length,R=E<3?S:d===null?d=Object.getOwnPropertyDescriptor(S,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,_,d);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,_,R):g(S,_))||R);return E>3&&R&&Object.defineProperty(S,_,R),R},m=this&&this.__param||function(x,S){return function(_,d){S(_,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=u(511),C=u(2585);let w=a.OscLinkProvider=class{constructor(x,S,_){this._bufferService=x,this._optionsService=S,this._oscLinkService=_}provideLinks(x,S){var B;const _=this._bufferService.buffer.lines.get(x-1);if(!_)return void S(void 0);const d=[],g=this._optionsService.rawOptions.linkHandler,E=new c.CellData,R=_.getTrimmedLength();let A=-1,L=-1,T=!1;for(let N=0;N<R;N++)if(L!==-1||_.hasContent(N)){if(_.loadCell(N,E),E.hasExtendedAttrs()&&E.extended.urlId){if(L===-1){L=N,A=E.extended.urlId;continue}T=E.extended.urlId!==A}else L!==-1&&(T=!0);if(T||L!==-1&&N===R-1){const F=(B=this._oscLinkService.getLinkData(A))==null?void 0:B.uri;if(F){const G={start:{x:L+1,y:x},end:{x:N+(T||N!==R-1?0:1),y:x}};let q=!1;if(!(g!=null&&g.allowNonHttpProtocols))try{const $=new URL(F);["http:","https:"].includes($.protocol)||(q=!0)}catch{q=!0}q||d.push({text:F,range:G,activate:($,W)=>g?g.activate($,W,G):k(0,W),hover:($,W)=>{var P;return(P=g==null?void 0:g.hover)==null?void 0:P.call(g,$,W,G)},leave:($,W)=>{var P;return(P=g==null?void 0:g.leave)==null?void 0:P.call(g,$,W,G)}})}T=!1,E.hasExtendedAttrs()&&E.extended.urlId?(L=N,A=E.extended.urlId):(L=-1,A=-1)}}S(d)}};function k(x,S){if(confirm(`Do you want to navigate to ${S}?
53
54
 
54
- WARNING: This link could potentially be dangerous`)){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=S}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([_(0,C.IBufferService),_(1,C.IOptionsService),_(2,C.IOscLinkService)],w)},6193:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,_){this._rowCount=_,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=u(3614),_=u(3656),c=u(3551),C=u(9042),w=u(3730),k=u(1680),x=u(3107),S=u(5744),m=u(2950),d=u(1296),g=u(428),E=u(4269),R=u(5114),A=u(8934),L=u(3230),T=u(9312),B=u(4725),N=u(6731),V=u(8055),F=u(8969),U=u(8460),Y=u(844),$=u(6114),G=u(8437),X=u(2584),se=u(7399),z=u(5941),M=u(9074),O=u(2585),P=u(5435),H=u(4567),ne=u(779);class de extends F.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(K={}){super(K),this.browser=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(M.DecorationService),this._instantiationService.setService(O.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ne.LinkProviderService),this._instantiationService.setService(B.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((I,ae)=>this.refresh(I,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((I=>this._reportWindowsOptions(I)))),this.register(this._inputHandler.onColor((I=>this._handleColorEvent(I)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((I=>this._afterResize(I.cols,I.rows)))),this.register((0,Y.toDisposable)((()=>{var I,ae;this._customKeyEventHandler=void 0,(ae=(I=this.element)==null?void 0:I.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(K){if(this._themeService)for(const I of K){let ae,Z="";switch(I.index){case 256:ae="foreground",Z="10";break;case 257:ae="background",Z="11";break;case 258:ae="cursor",Z="12";break;default:ae="ansi",Z="4;"+I.index}switch(I.type){case 0:const ee=V.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[I.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${Z};${(0,z.toRgbString)(ee)}${X.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((oe=>oe.ansi[I.index]=V.channels.toColor(...I.color)));else{const oe=ae;this._themeService.modifyColors((Se=>Se[oe]=V.channels.toColor(...I.color)))}break;case 2:this._themeService.restoreColor(I.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(K){K?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(H.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(K){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var K;return(K=this.textarea)==null?void 0:K.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const K=this.buffer.ybase+this.buffer.y,I=this.buffer.lines.get(K);if(!I)return;const ae=Math.min(this.buffer.x,this.cols-1),Z=this._renderService.dimensions.css.cell.height,ee=I.getWidth(ae),oe=this._renderService.dimensions.css.cell.width*ee,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,xe=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=xe+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=oe+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(I=>{this.hasSelection()&&(0,h.copyHandler)(I,this._selectionService)})));const K=I=>(0,h.handlePasteEvent)(I,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",K)),this.register((0,_.addDisposableDomListener)(this.element,"paste",K)),$.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(I=>{I.button===2&&(0,h.rightClickHandler)(I,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(I=>{(0,h.rightClickHandler)(I,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),$.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(I=>{I.button===1&&(0,h.moveTextAreaUnderMouseCursor)(I,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(K=>this._keyUp(K)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(K=>this._keyDown(K)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(K=>this._keyPress(K)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(K=>this._compositionHelper.compositionupdate(K)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(K=>this._inputEvent(K)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(K){var ae;if(!K)throw new Error("Terminal requires a parent element.");if(K.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=K.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"),K.appendChild(this.element);const I=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),I.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(Z=>this.updateCursorStyle(Z)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),I.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",C.promptLabel),$.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(R.CoreBrowserService,this.textarea,K.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(Z=>this._handleTextAreaFocus(Z)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Z=>this._onRender.fire(Z)))),this.onResize((Z=>this._renderService.resize(Z.cols,Z.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(I);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((Z=>this.scrollLines(Z.amount,Z.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(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Z=>this._renderService.handleSelectionChanged(Z.start,Z.end,Z.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Z=>{this.textarea.value=Z,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(Z=>this._selectionService.handleMouseDown(Z)))),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(H.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Z=>this._handleScreenReaderModeOptionChange(Z)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Z=>{!this._overviewRulerRenderer&&Z&&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(d.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const K=this,I=this.element;function ae(oe){const Se=K._mouseService.getMouseReportCoords(oe,K.screenElement);if(!Se)return!1;let xe,Ye;switch(oe.overrideType||oe.type){case"mousemove":Ye=32,oe.buttons===void 0?(xe=3,oe.button!==void 0&&(xe=oe.button<3?oe.button:3)):xe=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":Ye=0,xe=oe.button<3?oe.button:3;break;case"mousedown":Ye=1,xe=oe.button<3?oe.button:3;break;case"wheel":if(K._customWheelEventHandler&&K._customWheelEventHandler(oe)===!1||K.viewport.getLinesScrolled(oe)===0)return!1;Ye=oe.deltaY<0?0:1,xe=4;break;default:return!1}return!(Ye===void 0||xe===void 0||xe>4)&&K.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:xe,action:Ye,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}const Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ee={mouseup:oe=>(ae(oe),oe.buttons||(this._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.removeEventListener("mousemove",Z.mousedrag)),this.cancel(oe)),wheel:oe=>(ae(oe),this.cancel(oe,!0)),mousedrag:oe=>{oe.buttons&&ae(oe)},mousemove:oe=>{oe.buttons||ae(oe)}};this.register(this.coreMouseService.onProtocolChange((oe=>{oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(oe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&oe?Z.mousemove||(I.addEventListener("mousemove",ee.mousemove),Z.mousemove=ee.mousemove):(I.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&oe?Z.wheel||(I.addEventListener("wheel",ee.wheel,{passive:!1}),Z.wheel=ee.wheel):(I.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&oe?Z.mouseup||(Z.mouseup=ee.mouseup):(this._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&oe?Z.mousedrag||(Z.mousedrag=ee.mousedrag):(this._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(I,"mousedown",(oe=>{if(oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(oe))return ae(oe),Z.mouseup&&this._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.addEventListener("mousemove",Z.mousedrag),this.cancel(oe)}))),this.register((0,_.addDisposableDomListener)(I,"wheel",(oe=>{if(!Z.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(oe)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(oe);if(Se===0)return;const xe=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B");let Ye="";for(let at=0;at<Math.abs(Se);at++)Ye+=xe;return this.coreService.triggerDataEvent(Ye,!0),this.cancel(oe,!0)}return this.viewport.handleWheel(oe)?this.cancel(oe):void 0}}),{passive:!1})),this.register((0,_.addDisposableDomListener)(I,"touchstart",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(oe),this.cancel(oe)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(I,"touchmove",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(oe)?void 0:this.cancel(oe)}),{passive:!1}))}refresh(K,I){var ae;(ae=this._renderService)==null||ae.refreshRows(K,I)}updateCursorStyle(K){var I;(I=this._selectionService)!=null&&I.shouldColumnSelect(K)?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(K,I,ae=0){var Z;ae===1?(super.scrollLines(K,I,ae),this.refresh(0,this.rows-1)):(Z=this.viewport)==null||Z.scrollLines(K)}paste(K){(0,h.paste)(K,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(K){this._customKeyEventHandler=K}attachCustomWheelEventHandler(K){this._customWheelEventHandler=K}registerLinkProvider(K){return this._linkProviderService.registerLinkProvider(K)}registerCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const I=this._characterJoinerService.register(K);return this.refresh(0,this.rows-1),I}deregisterCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(K)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(K){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+K)}registerDecoration(K){return this._decorationService.registerDecoration(K)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(K,I,ae){this._selectionService.setSelection(K,I,ae)}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 K;(K=this._selectionService)==null||K.clearSelection()}selectAll(){var K;(K=this._selectionService)==null||K.selectAll()}selectLines(K,I){var ae;(ae=this._selectionService)==null||ae.selectLines(K,I)}_keyDown(K){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;const I=this.browser.isMac&&this.options.macOptionIsMeta&&K.altKey;if(!I&&!this._compositionHelper.keydown(K))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;I||K.key!=="Dead"&&K.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,se.evaluateKeyboardEvent)(K,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),ae.type===3||ae.type===2){const Z=this.rows-1;return this.scrollLines(ae.type===2?-Z:Z),this.cancel(K,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(ae.cancel&&this.cancel(K,!0),!ae.key||!!(K.key&&!K.ctrlKey&&!K.altKey&&!K.metaKey&&K.key.length===1&&K.key.charCodeAt(0)>=65&&K.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==X.C0.ETX&&ae.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||K.altKey||K.ctrlKey?this.cancel(K,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(K,I){const ae=K.isMac&&!this.options.macOptionIsMeta&&I.altKey&&!I.ctrlKey&&!I.metaKey||K.isWindows&&I.altKey&&I.ctrlKey&&!I.metaKey||K.isWindows&&I.getModifierState("AltGraph");return I.type==="keypress"?ae:ae&&(!I.keyCode||I.keyCode>47)}_keyUp(K){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||((function(I){return I.keyCode===16||I.keyCode===17||I.keyCode===18})(K)||this.focus(),this.updateCursorStyle(K),this._keyPressHandled=!1)}_keyPress(K){let I;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)I=K.charCode;else if(K.which===null||K.which===void 0)I=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;I=K.which}return!(!I||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K)||(I=String.fromCharCode(I),this._onKey.fire({key:I,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(I,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(K){if(K.data&&K.inputType==="insertText"&&(!K.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const I=K.data;return this.coreService.triggerDataEvent(I,!0),this.cancel(K),!0}return!1}resize(K,I){K!==this.cols||I!==this.rows?super.resize(K,I):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(K,I){var ae,Z;(ae=this._charSizeService)==null||ae.measure(),(Z=this.viewport)==null||Z.syncScrollArea(!0)}clear(){var K;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 I=1;I<this.rows;I++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(K=this.viewport)==null||K.reset(),this.refresh(0,this.rows-1)}}reset(){var I,ae;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(I=this._selectionService)==null||I.reset(),this._decorationService.reset(),(ae=this.viewport)==null||ae.reset(),this._customKeyEventHandler=K,this.refresh(0,this.rows-1)}clearTextureAtlas(){var K;(K=this._renderService)==null||K.clearTextureAtlas()}_reportFocus(){var K;(K=this.element)!=null&&K.classList.contains("focus")?this.coreService.triggerDataEvent(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(K){if(this._renderService)switch(K){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const I=this._renderService.dimensions.css.canvas.width.toFixed(0),ae=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${ae};${I}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Z=this._renderService.dimensions.css.cell.width.toFixed(0),ee=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${ee};${Z}t`)}}cancel(K,I){if(this.options.cancelEvents||I)return K.preventDefault(),K.stopPropagation(),!1}}a.Terminal=de},9924:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,_){this._rowCount=_,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const c=Date.now();if(c-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=c,this._innerRefresh();else if(!this._additionalRefreshRequested){const C=c-this._lastRefreshMs,w=this._debounceThresholdMS-C;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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(p,a,u){var h=this&&this.__decorate||function(m,d,g,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,d,g,E);else for(var T=m.length-1;T>=0;T--)(R=m[T])&&(L=(A<3?R(L):A>3?R(d,g,L):R(d,g))||L);return A>3&&L&&Object.defineProperty(d,g,L),L},_=this&&this.__param||function(m,d){return function(g,E){d(g,E,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=u(3656),C=u(4725),w=u(8460),k=u(844),x=u(2585);let S=a.Viewport=class extends k.Disposable{constructor(m,d,g,E,R,A,L,T){super(),this._viewportElement=m,this._scrollArea=d,this._bufferService=g,this._optionsService=E,this._charSizeService=R,this._renderService=A,this._coreBrowserService=L,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(m){if(m)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const d=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==d&&(this._lastRecordedBufferHeight=d,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const d=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:d,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(m,d){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(d<0&&this._viewportElement.scrollTop!==0||d>0&&g<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const d=this._getPixelsScrolled(m);return d!==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+d:this._smoothScrollState.target+=d,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=d,this._bubbleScroll(m,d))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const d=m*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+d,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let d=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?d*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._currentRowHeight*this._bufferService.rows),d}getBufferElements(m,d){var T;let g,E="";const R=[],A=d??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let B=m;B<A;B++){const N=L.get(B);if(!N)continue;const V=(T=L.get(B+1))==null?void 0:T.isWrapped;if(E+=N.translateToString(!V),!V||B===L.length-1){const F=document.createElement("div");F.textContent=E,R.push(F),E.length>0&&(g=F),E=""}}return{bufferElements:R,cursorElement:g}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let d=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(d/=this._currentRowHeight+0,this._wheelPartialScroll+=d,d=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._bufferService.rows),d}_applyScrollModifier(m,d){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&d.altKey||g==="ctrl"&&d.ctrlKey||g==="shift"&&d.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const d=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,d!==0&&(this._viewportElement.scrollTop+=d,this._bubbleScroll(m,d))}};a.Viewport=S=h([_(2,x.IBufferService),_(3,x.IOptionsService),_(4,C.ICharSizeService),_(5,C.IRenderService),_(6,C.ICoreBrowserService),_(7,C.IThemeService)],S)},3107:function(p,a,u){var h=this&&this.__decorate||function(x,S,m,d){var g,E=arguments.length,R=E<3?S:d===null?d=Object.getOwnPropertyDescriptor(S,m):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,m,d);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,m,R):g(S,m))||R);return E>3&&R&&Object.defineProperty(S,m,R),R},_=this&&this.__param||function(x,S){return function(m,d){S(m,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=u(4725),C=u(844),w=u(2585);let k=a.BufferDecorationRenderer=class extends C.Disposable{constructor(x,S,m,d,g){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=m,this._decorationService=d,this._renderService=g,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((E=>this._removeDecoration(E)))),this.register((0,C.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 d;const S=this._coreBrowserService.mainDocument.createElement("div");S.classList.add("xterm-decoration"),S.classList.toggle("xterm-decoration-top-layer",((d=x==null?void 0:x.options)==null?void 0:d.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 m=x.options.x??0;return m&&m>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 m=this._decorationElements.get(x);m||(m=this._createElement(x),x.element=m,this._decorationElements.set(x,m),this._container.appendChild(m),x.onDispose((()=>{this._decorationElements.delete(x),m.remove()}))),m.style.top=S*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(m)}}_refreshXPosition(x,S=x.element){if(!S)return;const m=x.options.x??0;(x.options.anchor||"left")==="right"?S.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":S.style.left=m?m*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([_(1,w.IBufferService),_(2,c.ICoreBrowserService),_(3,w.IDecorationService),_(4,c.IRenderService)],k)},5871:(p,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(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,_){return h>=u.startBufferLine-this._linePadding[_||"full"]&&h<=u.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(p,a,u){var h=this&&this.__decorate||function(g,E,R,A){var L,T=arguments.length,B=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,E,R,A);else for(var N=g.length-1;N>=0;N--)(L=g[N])&&(B=(T<3?L(B):T>3?L(E,R,B):L(E,R))||B);return T>3&&B&&Object.defineProperty(E,R,B),B},_=this&&this.__param||function(g,E){return function(R,A){E(R,A,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const c=u(5871),C=u(4725),w=u(844),k=u(2585),x={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let d=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,E,R,A,L,T,B){var V;super(),this._viewportElement=g,this._screenElement=E,this._bufferService=R,this._decorationService=A,this._renderService=L,this._optionsService=T,this._coreBrowserService=B,this._colorZoneStore=new c.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(V=this._viewportElement.parentElement)==null||V.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 F;(F=this._canvas)==null||F.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 g=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=g,S.center=E,S.right=g,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=S.left,m.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_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 E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const E of g)E.position!=="full"&&this._renderColorZone(E);for(const E of g)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(m[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-x[g.position||"full"]/2),S[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[g.position||"full"]))}_queueRefresh(g,E){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=d=h([_(2,k.IBufferService),_(3,k.IDecorationService),_(4,C.IRenderService),_(5,k.IOptionsService),_(6,C.ICoreBrowserService)],d)},2950:function(p,a,u){var h=this&&this.__decorate||function(x,S,m,d){var g,E=arguments.length,R=E<3?S:d===null?d=Object.getOwnPropertyDescriptor(S,m):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,m,d);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,m,R):g(S,m))||R);return E>3&&R&&Object.defineProperty(S,m,R),R},_=this&&this.__param||function(x,S){return function(m,d){S(m,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=u(4725),C=u(2585),w=u(2584);let k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,S,m,d,g,E){this._textarea=x,this._compositionView=S,this._bufferService=m,this._optionsService=d,this._coreService=g,this._renderService=E,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 m;this._isSendingComposition=!1,S.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(S.start,S.end):this._textarea.value.substring(S.start),m.length>0&&this._coreService.triggerDataEvent(m,!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,m=S.replace(x,"");this._dataAlreadySent=m,S.length>x.length?this._coreService.triggerDataEvent(m,!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),m=this._renderService.dimensions.css.cell.height,d=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=d+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=d+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=k=h([_(2,C.IBufferService),_(3,C.IOptionsService),_(4,C.ICoreService),_(5,c.IRenderService)],k)},9806:(p,a)=>{function u(h,_,c){const C=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[_.clientX-C.left-k,_.clientY-C.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(h,_,c,C,w,k,x,S,m){if(!k)return;const d=u(h,_,c);return d?(d[0]=Math.ceil((d[0]+(m?x/2:0))/x),d[1]=Math.ceil(d[1]/S),d[0]=Math.min(Math.max(d[0],1),C+(m?1:0)),d[1]=Math.min(Math.max(d[1],1),w),d):void 0}},9504:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=u(2584);function _(S,m,d,g){const E=S-c(S,d),R=m-c(m,d),A=Math.abs(E-R)-(function(L,T,B){let N=0;const V=L-c(L,B),F=T-c(T,B);for(let U=0;U<Math.abs(V-F);U++){const Y=C(L,T)==="A"?-1:1,$=B.buffer.lines.get(V+Y*U);$!=null&&$.isWrapped&&N++}return N})(S,m,d);return x(A,k(C(S,m),g))}function c(S,m){let d=0,g=m.buffer.lines.get(S),E=g==null?void 0:g.isWrapped;for(;E&&S>=0&&S<m.rows;)d++,g=m.buffer.lines.get(--S),E=g==null?void 0:g.isWrapped;return d}function C(S,m){return S>m?"A":"B"}function w(S,m,d,g,E,R){let A=S,L=m,T="";for(;A!==d||L!==g;)A+=E?1:-1,E&&A>R.cols-1?(T+=R.buffer.translateBufferLineToString(L,!1,S,A),A=0,S=0,L++):!E&&A<0&&(T+=R.buffer.translateBufferLineToString(L,!1,0,S+1),A=R.cols-1,S=A,L--);return T+R.buffer.translateBufferLineToString(L,!1,S,A)}function k(S,m){const d=m?"O":"[";return h.C0.ESC+d+S}function x(S,m){S=Math.floor(S);let d="";for(let g=0;g<S;g++)d+=m;return d}a.moveToCellSequence=function(S,m,d,g){const E=d.buffer.x,R=d.buffer.y;if(!d.buffer.hasScrollback)return(function(T,B,N,V,F,U){return _(B,V,F,U).length===0?"":x(w(T,B,T,B-c(B,F),!1,F).length,k("D",U))})(E,R,0,m,d,g)+_(R,m,d,g)+(function(T,B,N,V,F,U){let Y;Y=_(B,V,F,U).length>0?V-c(V,F):B;const $=V,G=(function(X,se,z,M,O,P){let H;return H=_(z,M,O,P).length>0?M-c(M,O):se,X<z&&H<=M||X>=z&&H<M?"C":"D"})(T,B,N,V,F,U);return x(w(T,Y,N,$,G==="C",F).length,k(G,U))})(E,R,S,m,d,g);let A;if(R===m)return A=E>S?"D":"C",x(Math.abs(E-S),k(A,g));A=R>m?"D":"C";const L=Math.abs(R-m);return x((function(T,B){return B.cols-T})(R>m?S:E,d)+(L-1)*d.cols+1+((R>m?E:S)-1),k(A,g))}},1296:function(p,a,u){var h=this&&this.__decorate||function(U,Y,$,G){var X,se=arguments.length,z=se<3?Y:G===null?G=Object.getOwnPropertyDescriptor(Y,$):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(U,Y,$,G);else for(var M=U.length-1;M>=0;M--)(X=U[M])&&(z=(se<3?X(z):se>3?X(Y,$,z):X(Y,$))||z);return se>3&&z&&Object.defineProperty(Y,$,z),z},_=this&&this.__param||function(U,Y){return function($,G){Y($,G,U)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=u(3787),C=u(2550),w=u(2223),k=u(6171),x=u(6052),S=u(4725),m=u(8055),d=u(8460),g=u(844),E=u(2585),R="xterm-dom-renderer-owner-",A="xterm-rows",L="xterm-fg-",T="xterm-bg-",B="xterm-focus",N="xterm-selection";let V=1,F=a.DomRenderer=class extends g.Disposable{constructor(U,Y,$,G,X,se,z,M,O,P,H,ne,de){super(),this._terminal=U,this._document=Y,this._element=$,this._screenElement=G,this._viewportElement=X,this._helperContainer=se,this._linkifier2=z,this._charSizeService=O,this._optionsService=P,this._bufferService=H,this._coreBrowserService=ne,this._themeService=de,this._terminalClass=V++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new d.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),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((pe=>this._injectCss(pe)))),this._injectCss(this._themeService.colors),this._rowFactory=M.createInstance(c.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((pe=>this._handleLinkHover(pe)))),this.register(this._linkifier2.onHideLinkUnderline((pe=>this._handleLinkLeave(pe)))),this.register((0,g.toDisposable)((()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new C.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 U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),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/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),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 $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${A} 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(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${A} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${A} .xterm-dim { color: ${m.color.multiplyOpacity(U.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 $=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${G} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${X} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,Y+=`${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.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: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[se,z]of U.ansi.entries())Y+=`${this._terminalSelector} .${L}${se} { color: ${z.css}; }${this._terminalSelector} .${L}${se}.xterm-dim { color: ${m.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${T}${se} { background-color: ${z.css}; }`;Y+=`${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(U.background).css}; }${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,Y){for(let $=this._rowElements.length;$<=Y;$++){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(U,Y){this._refreshRowElements(U,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(B),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(B),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,Y,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,Y,$),this.renderRows(0,this._bufferService.rows-1),!U||!Y)return;this._selectionRenderModel.update(this._terminal,U,Y,$);const G=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,se=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(se>=this._bufferService.rows||z<0)return;const M=this._document.createDocumentFragment();if($){const O=U[0]>Y[0];M.appendChild(this._createSelectionElement(se,O?Y[0]:U[0],O?U[0]:Y[0],z-se+1))}else{const O=G===se?U[0]:0,P=se===X?Y[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(se,O,P));const H=z-se-1;if(M.appendChild(this._createSelectionElement(se+1,0,this._bufferService.cols,H)),se!==z){const ne=X===z?Y[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(z,0,ne))}}this._selectionContainer.appendChild(M)}_createSelectionElement(U,Y,$,G=1){const X=this._document.createElement("div"),se=Y*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*($-Y);return se+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-se),X.style.height=G*this.dimensions.css.cell.height+"px",X.style.top=U*this.dimensions.css.cell.height+"px",X.style.left=`${se}px`,X.style.width=`${z}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const U of this._rowElements)U.replaceChildren()}renderRows(U,Y){const $=this._bufferService.buffer,G=$.ybase+$.y,X=Math.min($.x,this._bufferService.cols-1),se=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let O=U;O<=Y;O++){const P=O+$.ydisp,H=this._rowElements[O],ne=$.lines.get(P);if(!H||!ne)break;H.replaceChildren(...this._rowFactory.createRow(ne,P,P===G,z,M,X,se,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,Y,$,G,X,se){$<0&&(U=0),G<0&&(Y=0);const z=this._bufferService.rows-1;$=Math.max(Math.min($,z),0),G=Math.max(Math.min(G,z),0),X=Math.min(X,this._bufferService.cols);const M=this._bufferService.buffer,O=M.ybase+M.y,P=Math.min(M.x,X-1),H=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,de=this._optionsService.rawOptions.cursorInactiveStyle;for(let pe=$;pe<=G;++pe){const K=pe+M.ydisp,I=this._rowElements[pe],ae=M.lines.get(K);if(!I||!ae)break;I.replaceChildren(...this._rowFactory.createRow(ae,K,K===O,ne,de,P,H,this.dimensions.css.cell.width,this._widthCache,se?pe===$?U:0:-1,se?(pe===G?Y:X)-1:-1))}}};a.DomRenderer=F=h([_(7,E.IInstantiationService),_(8,S.ICharSizeService),_(9,E.IOptionsService),_(10,E.IBufferService),_(11,S.ICoreBrowserService),_(12,S.IThemeService)],F)},3787:function(p,a,u){var h=this&&this.__decorate||function(A,L,T,B){var N,V=arguments.length,F=V<3?L:B===null?B=Object.getOwnPropertyDescriptor(L,T):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(A,L,T,B);else for(var U=A.length-1;U>=0;U--)(N=A[U])&&(F=(V<3?N(F):V>3?N(L,T,F):N(L,T))||F);return V>3&&F&&Object.defineProperty(L,T,F),F},_=this&&this.__param||function(A,L){return function(T,B){L(T,B,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=u(2223),C=u(643),w=u(511),k=u(2585),x=u(8055),S=u(4725),m=u(4269),d=u(6171),g=u(3734);let E=a.DomRendererRowFactory=class{constructor(A,L,T,B,N,V,F){this._document=A,this._characterJoinerService=L,this._optionsService=T,this._coreBrowserService=B,this._coreService=N,this._decorationService=V,this._themeService=F,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,L,T){this._selectionStart=A,this._selectionEnd=L,this._columnSelectMode=T}createRow(A,L,T,B,N,V,F,U,Y,$,G){const X=[],se=this._characterJoinerService.getJoinedCharacters(L),z=this._themeService.colors;let M,O=A.getNoBgTrimmedLength();T&&O<V+1&&(O=V+1);let P=0,H="",ne=0,de=0,pe=0,K=!1,I=0,ae=!1,Z=0;const ee=[],oe=$!==-1&&G!==-1;for(let Se=0;Se<O;Se++){A.loadCell(Se,this._workCell);let xe=this._workCell.getWidth();if(xe===0)continue;let Ye=!1,at=Se,ke=this._workCell;if(se.length>0&&Se===se[0][0]){Ye=!0;const Pe=se.shift();ke=new m.JoinedCellData(this._workCell,A.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),at=Pe[1]-1,xe=ke.getWidth()}const mn=this._isCellInSelection(Se,L),gn=T&&Se===V,vn=oe&&Se>=$&&Se<=G;let En=!1;this._decorationService.forEachDecorationAtCell(Se,L,void 0,(Pe=>{En=!0}));let Gn=ke.getChars()||C.WHITESPACE_CELL_CHAR;if(Gn===" "&&(ke.isUnderline()||ke.isOverline())&&(Gn=" "),Z=xe*U-Y.get(Gn,ke.isBold(),ke.isItalic()),M){if(P&&(mn&&ae||!mn&&!ae&&ke.bg===ne)&&(mn&&ae&&z.selectionForeground||ke.fg===de)&&ke.extended.ext===pe&&vn===K&&Z===I&&!gn&&!Ye&&!En){ke.isInvisible()?H+=C.WHITESPACE_CELL_CHAR:H+=Gn,P++;continue}P&&(M.textContent=H),M=this._document.createElement("span"),P=0,H=""}else M=this._document.createElement("span");if(ne=ke.bg,de=ke.fg,pe=ke.extended.ext,K=vn,I=Z,ae=mn,Ye&&V>=Se&&V<=at&&(V=Se),!this._coreService.isCursorHidden&&gn&&this._coreService.isCursorInitialized){if(ee.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&ee.push("xterm-cursor-blink"),ee.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ee.push("xterm-cursor-outline");break;case"block":ee.push("xterm-cursor-block");break;case"bar":ee.push("xterm-cursor-bar");break;case"underline":ee.push("xterm-cursor-underline")}}if(ke.isBold()&&ee.push("xterm-bold"),ke.isItalic()&&ee.push("xterm-italic"),ke.isDim()&&ee.push("xterm-dim"),H=ke.isInvisible()?C.WHITESPACE_CELL_CHAR:ke.getChars()||C.WHITESPACE_CELL_CHAR,ke.isUnderline()&&(ee.push(`xterm-underline-${ke.extended.underlineStyle}`),H===" "&&(H=" "),!ke.isUnderlineColorDefault()))if(ke.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(ke.getUnderlineColor()).join(",")})`;else{let Pe=ke.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ke.isBold()&&Pe<8&&(Pe+=8),M.style.textDecorationColor=z.ansi[Pe].css}ke.isOverline()&&(ee.push("xterm-overline"),H===" "&&(H=" ")),ke.isStrikethrough()&&ee.push("xterm-strikethrough"),vn&&(M.style.textDecoration="underline");let At=ke.getFgColor(),ot=ke.getFgColorMode(),Ot=ke.getBgColor(),ue=ke.getBgColorMode();const ge=!!ke.isInverse();if(ge){const Pe=At;At=Ot,Ot=Pe;const bt=ot;ot=ue,ue=bt}let be,Te,Me,mt=!1;switch(this._decorationService.forEachDecorationAtCell(Se,L,void 0,(Pe=>{Pe.options.layer!=="top"&&mt||(Pe.backgroundColorRGB&&(ue=50331648,Ot=Pe.backgroundColorRGB.rgba>>8&16777215,be=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(ot=50331648,At=Pe.foregroundColorRGB.rgba>>8&16777215,Te=Pe.foregroundColorRGB),mt=Pe.options.layer==="top")})),!mt&&mn&&(be=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Ot=be.rgba>>8&16777215,ue=50331648,mt=!0,z.selectionForeground&&(ot=50331648,At=z.selectionForeground.rgba>>8&16777215,Te=z.selectionForeground)),mt&&ee.push("xterm-decoration-top"),ue){case 16777216:case 33554432:Me=z.ansi[Ot],ee.push(`xterm-bg-${Ot}`);break;case 50331648:Me=x.channels.toColor(Ot>>16,Ot>>8&255,255&Ot),this._addStyle(M,`background-color:#${R((Ot>>>0).toString(16),"0",6)}`);break;default:ge?(Me=z.foreground,ee.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Me=z.background}switch(be||ke.isDim()&&(be=x.color.multiplyOpacity(Me,.5)),ot){case 16777216:case 33554432:ke.isBold()&&At<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(At+=8),this._applyMinimumContrast(M,Me,z.ansi[At],ke,be,void 0)||ee.push(`xterm-fg-${At}`);break;case 50331648:const Pe=x.channels.toColor(At>>16&255,At>>8&255,255&At);this._applyMinimumContrast(M,Me,Pe,ke,be,Te)||this._addStyle(M,`color:#${R(At.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Me,z.foreground,ke,be,Te)||ge&&ee.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}ee.length&&(M.className=ee.join(" "),ee.length=0),gn||Ye||En?M.textContent=H:P++,Z!==this.defaultSpacing&&(M.style.letterSpacing=`${Z}px`),X.push(M),Se=at}return M&&P&&(M.textContent=H),X}_applyMinimumContrast(A,L,T,B,N,V){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,d.treatGlyphAsBackgroundColor)(B.getCode()))return!1;const F=this._getContrastCache(B);let U;if(N||V||(U=F.getColor(L.rgba,T.rgba)),U===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);U=x.color.ensureContrastRatio(N||L,V||T,Y),F.setColor((N||L).rgba,(V||T).rgba,U??null)}return!!U&&(this._addStyle(A,`color:${U.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,L){A.setAttribute("style",`${A.getAttribute("style")||""}${L};`)}_isCellInSelection(A,L){const T=this._selectionStart,B=this._selectionEnd;return!(!T||!B)&&(this._columnSelectMode?T[0]<=B[0]?A>=T[0]&&L>=T[1]&&A<B[0]&&L<=B[1]:A<T[0]&&L>=T[1]&&A>=B[0]&&L<=B[1]:L>T[1]&&L<B[1]||T[1]===B[1]&&L===T[1]&&A>=T[0]&&A<B[0]||T[1]<B[1]&&L===B[1]&&A<B[0]||T[1]<B[1]&&L===T[1]&&A>=T[0])}};function R(A,L,T){for(;A.length<T;)A=L+A;return A}a.DomRendererRowFactory=E=h([_(1,S.ICharacterJoinerService),_(2,k.IOptionsService),_(3,S.ICoreBrowserService),_(4,k.ICoreService),_(5,k.IDecorationService),_(6,S.IThemeService)],E)},2550:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const _=u.createElement("span");_.classList.add("xterm-char-measure-element");const c=u.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const C=u.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[_,c,C,w],this._container.appendChild(_),this._container.appendChild(c),this._container.appendChild(C),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(u,h,_,c){u===this._font&&h===this._fontSize&&_===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=_,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,_){let c=0;if(!h&&!_&&u.length===1&&(c=u.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const k=this._measure(u,0);return k>0&&(this._flat[c]=k),k}let C=u;h&&(C+="B"),_&&(C+="I");let w=this._holey.get(C);if(w===void 0){let k=0;h&&(k|=1),_&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(C,w)}return w}_measure(u,h){const _=this._measureElements[h];return _.textContent=u.repeat(32),_.offsetWidth/32}}},2223:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(p,a)=>{function u(_){return 57508<=_&&_<=57558}function h(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},a.isEmoji=h,a.allowRescaling=function(_,c,C,w){return c===1&&C>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!h(_)&&!u(_)&&!(function(k){return 57344<=k&&k<=63743})(_)},a.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(c){return 9472<=c&&c<=9631})(_)},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(_,c,C=0){return(_-(2*Math.round(c)-C))%(2*Math.round(c))}},6052:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,c,C,w=!1){if(this.selectionStart=c,this.selectionEnd=C,!c||!C||c[0]===C[0]&&c[1]===C[1])return void this.clear();const k=_.buffers.active.ydisp,x=c[1]-k,S=C[1]-k,m=Math.max(x,0),d=Math.min(S,_.rows-1);m>=_.rows||d<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=m,this.viewportCappedEndRow=d,this.startCol=c[0],this.endCol=C[0])}isCellSelected(_,c,C){return!!this.hasSelection&&(C-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&C>=this.viewportCappedStartRow&&c<this.endCol&&C<=this.viewportCappedEndRow:c<this.startCol&&C>=this.viewportCappedStartRow&&c>=this.endCol&&C<=this.viewportCappedEndRow:C>this.viewportStartRow&&C<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&C===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},_=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const c=u(2585),C=u(8460),w=u(844);let k=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(d,g,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new C.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new m(this._optionsService))}catch{this._measureStrategy=this.register(new S(d,g,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const d=this._measureStrategy.measure();d.width===this.width&&d.height===this.height||(this.width=d.width,this.height=d.height,this._onCharSizeChange.fire())}};a.CharSizeService=k=h([_(2,c.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(g,E){g!==void 0&&g>0&&E!==void 0&&E>0&&(this._result.width=g,this._result.height=E)}}class S extends x{constructor(g,E,R){super(),this._document=g,this._parentElement=E,this._optionsService=R,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class m extends x{constructor(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(p,a,u){var h=this&&this.__decorate||function(m,d,g,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,d,g,E);else for(var T=m.length-1;T>=0;T--)(R=m[T])&&(L=(A<3?R(L):A>3?R(d,g,L):R(d,g))||L);return A>3&&L&&Object.defineProperty(d,g,L),L},_=this&&this.__param||function(m,d){return function(g,E){d(g,E,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=u(3734),C=u(643),w=u(511),k=u(2585);class x extends c.AttributeData{constructor(d,g,E){super(),this.content=0,this.combinedData="",this.fg=d.fg,this.bg=d.bg,this.combinedData=g,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(d){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let S=a.CharacterJoinerService=class N_{constructor(d){this._bufferService=d,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(d){const g={id:this._nextCharacterJoinerId++,handler:d};return this._characterJoiners.push(g),g.id}deregister(d){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===d)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(d){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(d);if(!g||g.length===0)return[];const E=[],R=g.translateToString(!0);let A=0,L=0,T=0,B=g.getFg(0),N=g.getBg(0);for(let V=0;V<g.getTrimmedLength();V++)if(g.loadCell(V,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==N){if(V-A>1){const F=this._getJoinedRanges(R,T,L,g,A);for(let U=0;U<F.length;U++)E.push(F[U])}A=V,T=L,B=this._workCell.fg,N=this._workCell.bg}L+=this._workCell.getChars().length||C.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const V=this._getJoinedRanges(R,T,L,g,A);for(let F=0;F<V.length;F++)E.push(V[F])}return E}_getJoinedRanges(d,g,E,R,A){const L=d.substring(g,E);let T=[];try{T=this._characterJoiners[0].handler(L)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const N=this._characterJoiners[B].handler(L);for(let V=0;V<N.length;V++)N_._mergeRanges(T,N[V])}catch(N){console.error(N)}return this._stringRangesToCellRanges(T,R,A),T}_stringRangesToCellRanges(d,g,E){let R=0,A=!1,L=0,T=d[R];if(T){for(let B=E;B<this._bufferService.cols;B++){const N=g.getWidth(B),V=g.getString(B).length||C.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!A&&T[0]<=L&&(T[0]=B,A=!0),T[1]<=L){if(T[1]=B,T=d[++R],!T)break;T[0]<=L?(T[0]=B,A=!0):A=!1}L+=V}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(d,g){let E=!1;for(let R=0;R<d.length;R++){const A=d[R];if(E){if(g[1]<=A[0])return d[R-1][1]=g[1],d;if(g[1]<=A[1])return d[R-1][1]=Math.max(g[1],A[1]),d.splice(R,1),d;d.splice(R,1),R--}else{if(g[1]<=A[0])return d.splice(R,0,g),d;if(g[1]<=A[1])return A[0]=Math.min(g[0],A[0]),d;g[0]<A[1]&&(A[0]=Math.min(g[0],A[0]),E=!0)}}return E?d[d.length-1][1]=g[1]:d.push(g),d}};a.CharacterJoinerService=S=h([_(0,k.IBufferService)],S)},5114:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=u(844),_=u(8460),c=u(3656);class C extends h.Disposable{constructor(x,S,m){super(),this._textarea=x,this._window=S,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((d=>this._screenDprMonitor.setWindow(d)))),this.register((0,_.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=C;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new _.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,c.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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=u(844);class _ extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(C){return this.linkProviders.push(C),{dispose:()=>{const w=this.linkProviders.indexOf(C);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=_},8934:function(p,a,u){var h=this&&this.__decorate||function(k,x,S,m){var d,g=arguments.length,E=g<3?x:m===null?m=Object.getOwnPropertyDescriptor(x,S):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,S,m);else for(var R=k.length-1;R>=0;R--)(d=k[R])&&(E=(g<3?d(E):g>3?d(x,S,E):d(x,S))||E);return g>3&&E&&Object.defineProperty(x,S,E),E},_=this&&this.__param||function(k,x){return function(S,m){x(S,m,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=u(4725),C=u(9806);let w=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,S,m,d){return(0,C.getCoords)(window,k,x,S,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,d)}getMouseReportCoords(k,x){const S=(0,C.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([_(0,c.IRenderService),_(1,c.ICharSizeService)],w)},3230:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},_=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const c=u(6193),C=u(4725),w=u(8460),k=u(844),x=u(7226),S=u(2585);let m=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(d,g,E,R,A,L,T,B){super(),this._rowCount=d,this._charSizeService=R,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 c.RenderDebouncer(((N,V)=>this._renderRows(N,V)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(L.onResize((()=>this._fullRefresh()))),this.register(L.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(L.cols,L.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(L.buffer.y,L.buffer.y,!0)))),this.register(B.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,g),this.register(T.onWindowChange((N=>this._registerIntersectionObserver(N,g))))}_registerIntersectionObserver(d,g){if("IntersectionObserver"in d){const E=new d.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});E.observe(g),this._observerDisposable.value=(0,k.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(d){this._isPaused=d.isIntersecting===void 0?d.intersectionRatio===0:!d.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(d,g,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(d,g,this._rowCount))}_renderRows(d,g){this._renderer.value&&(d=Math.min(d,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(d,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:d,end:g}),this._onRender.fire({start:d,end:g}),this._isNextRenderRedrawOnly=!0)}resize(d,g){this._rowCount=g,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(d){this._renderer.value=d,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(d){return this._renderDebouncer.addRefreshCallback(d)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var d,g;this._renderer.value&&((g=(d=this._renderer.value).clearTextureAtlas)==null||g.call(d),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(d,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(d,g)})):this._renderer.value.handleResize(d,g),this._fullRefresh())}handleCharSizeChanged(){var d;(d=this._renderer.value)==null||d.handleCharSizeChanged()}handleBlur(){var d;(d=this._renderer.value)==null||d.handleBlur()}handleFocus(){var d;(d=this._renderer.value)==null||d.handleFocus()}handleSelectionChanged(d,g,E){var R;this._selectionState.start=d,this._selectionState.end=g,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(d,g,E)}handleCursorMove(){var d;(d=this._renderer.value)==null||d.handleCursorMove()}clear(){var d;(d=this._renderer.value)==null||d.clear()}};a.RenderService=m=h([_(2,S.IOptionsService),_(3,C.ICharSizeService),_(4,S.IDecorationService),_(5,S.IBufferService),_(6,C.ICoreBrowserService),_(7,C.IThemeService)],m)},9312:function(p,a,u){var h=this&&this.__decorate||function(T,B,N,V){var F,U=arguments.length,Y=U<3?B:V===null?V=Object.getOwnPropertyDescriptor(B,N):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(T,B,N,V);else for(var $=T.length-1;$>=0;$--)(F=T[$])&&(Y=(U<3?F(Y):U>3?F(B,N,Y):F(B,N))||Y);return U>3&&Y&&Object.defineProperty(B,N,Y),Y},_=this&&this.__param||function(T,B){return function(N,V){B(N,V,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=u(9806),C=u(9504),w=u(456),k=u(4725),x=u(8460),S=u(844),m=u(6114),d=u(4841),g=u(511),E=u(2585),R=" ",A=new RegExp(R,"g");let L=a.SelectionService=class extends S.Disposable{constructor(T,B,N,V,F,U,Y,$,G){super(),this._element=T,this._screenElement=B,this._linkifier=N,this._bufferService=V,this._coreService=F,this._mouseService=U,this._optionsService=Y,this._renderService=$,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.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=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new 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 T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!T||!B||T[0]===B[0]&&T[1]===B[1])}get selectionText(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!T||!B)return"";const N=this._bufferService.buffer,V=[];if(this._activeSelectionMode===3){if(T[0]===B[0])return"";const F=T[0]<B[0]?T[0]:B[0],U=T[0]<B[0]?B[0]:T[0];for(let Y=T[1];Y<=B[1];Y++){const $=N.translateBufferLineToString(Y,!0,F,U);V.push($)}}else{const F=T[1]===B[1]?B[0]:void 0;V.push(N.translateBufferLineToString(T[1],!0,T[0],F));for(let U=T[1]+1;U<=B[1]-1;U++){const Y=N.lines.get(U),$=N.translateBufferLineToString(U,!0);Y!=null&&Y.isWrapped?V[V.length-1]+=$:V.push($)}if(T[1]!==B[1]){const U=N.lines.get(B[1]),Y=N.translateBufferLineToString(B[1],!0,0,B[0]);U&&U.isWrapped?V[V.length-1]+=Y:V.push(Y)}}return V.map((F=>F.replace(A," "))).join(m.isWindows?`\r
55
+ WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=S}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([m(0,C.IBufferService),m(1,C.IOptionsService),m(2,C.IOscLinkService)],w)},6193:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,m){this._rowCount=m,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=u(3614),m=u(3656),c=u(3551),C=u(9042),w=u(3730),k=u(1680),x=u(3107),S=u(5744),_=u(2950),d=u(1296),g=u(428),E=u(4269),R=u(5114),A=u(8934),L=u(3230),T=u(9312),B=u(4725),N=u(6731),F=u(8055),G=u(8969),q=u(8460),$=u(844),W=u(6114),P=u(8437),Y=u(2584),ee=u(7399),z=u(5941),M=u(9074),O=u(2585),I=u(5435),H=u(4567),ie=u(779);class pe extends G.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(X={}){super(X),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new $.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(M.DecorationService),this._instantiationService.setService(O.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(B.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,ae)=>this.refresh(U,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((U=>this._afterResize(U.cols,U.rows)))),this.register((0,$.toDisposable)((()=>{var U,ae;this._customKeyEventHandler=void 0,(ae=(U=this.element)==null?void 0:U.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(X){if(this._themeService)for(const U of X){let ae,Z="";switch(U.index){case 256:ae="foreground",Z="10";break;case 257:ae="background",Z="11";break;case 258:ae="cursor",Z="12";break;default:ae="ansi",Z="4;"+U.index}switch(U.type){case 0:const te=F.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${Z};${(0,z.toRgbString)(te)}${Y.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((oe=>oe.ansi[U.index]=F.channels.toColor(...U.color)));else{const oe=ae;this._themeService.modifyColors((Se=>Se[oe]=F.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(X){X?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(H.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(X){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var X;return(X=this.textarea)==null?void 0:X.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const X=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(X);if(!U)return;const ae=Math.min(this.buffer.x,this.cols-1),Z=this._renderService.dimensions.css.cell.height,te=U.getWidth(ae),oe=this._renderService.dimensions.css.cell.width*te,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,xe=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=xe+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=oe+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,h.copyHandler)(U,this._selectionService)})));const X=U=>(0,h.handlePasteEvent)(U,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",X)),this.register((0,m.addDisposableDomListener)(this.element,"paste",X)),W.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(U=>{U.button===2&&(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,h.moveTextAreaUnderMouseCursor)(U,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(X=>this._keyUp(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(X=>this._keyDown(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(X=>this._keyPress(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(X=>this._compositionHelper.compositionupdate(X)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(X=>this._inputEvent(X)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(X){var ae;if(!X)throw new Error("Terminal requires a parent element.");if(X.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=X.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),X.appendChild(this.element);const U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(Z=>this.updateCursorStyle(Z)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",C.promptLabel),W.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(R.CoreBrowserService,this.textarea,X.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(Z=>this._handleTextAreaFocus(Z)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Z=>this._onRender.fire(Z)))),this.onResize((Z=>this._renderService.resize(Z.cols,Z.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(U);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((Z=>this.scrollLines(Z.amount,Z.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(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Z=>this._renderService.handleSelectionChanged(Z.start,Z.end,Z.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Z=>{this.textarea.value=Z,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(Z=>this._selectionService.handleMouseDown(Z)))),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(H.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Z=>this._handleScreenReaderModeOptionChange(Z)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Z=>{!this._overviewRulerRenderer&&Z&&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(d.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const X=this,U=this.element;function ae(oe){const Se=X._mouseService.getMouseReportCoords(oe,X.screenElement);if(!Se)return!1;let xe,Ye;switch(oe.overrideType||oe.type){case"mousemove":Ye=32,oe.buttons===void 0?(xe=3,oe.button!==void 0&&(xe=oe.button<3?oe.button:3)):xe=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":Ye=0,xe=oe.button<3?oe.button:3;break;case"mousedown":Ye=1,xe=oe.button<3?oe.button:3;break;case"wheel":if(X._customWheelEventHandler&&X._customWheelEventHandler(oe)===!1||X.viewport.getLinesScrolled(oe)===0)return!1;Ye=oe.deltaY<0?0:1,xe=4;break;default:return!1}return!(Ye===void 0||xe===void 0||xe>4)&&X.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:xe,action:Ye,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}const Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},te={mouseup:oe=>(ae(oe),oe.buttons||(this._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.removeEventListener("mousemove",Z.mousedrag)),this.cancel(oe)),wheel:oe=>(ae(oe),this.cancel(oe,!0)),mousedrag:oe=>{oe.buttons&&ae(oe)},mousemove:oe=>{oe.buttons||ae(oe)}};this.register(this.coreMouseService.onProtocolChange((oe=>{oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(oe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&oe?Z.mousemove||(U.addEventListener("mousemove",te.mousemove),Z.mousemove=te.mousemove):(U.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&oe?Z.wheel||(U.addEventListener("wheel",te.wheel,{passive:!1}),Z.wheel=te.wheel):(U.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&oe?Z.mouseup||(Z.mouseup=te.mouseup):(this._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&oe?Z.mousedrag||(Z.mousedrag=te.mousedrag):(this._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(U,"mousedown",(oe=>{if(oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(oe))return ae(oe),Z.mouseup&&this._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.addEventListener("mousemove",Z.mousedrag),this.cancel(oe)}))),this.register((0,m.addDisposableDomListener)(U,"wheel",(oe=>{if(!Z.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(oe)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(oe);if(Se===0)return;const xe=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B");let Ye="";for(let at=0;at<Math.abs(Se);at++)Ye+=xe;return this.coreService.triggerDataEvent(Ye,!0),this.cancel(oe,!0)}return this.viewport.handleWheel(oe)?this.cancel(oe):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(U,"touchstart",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(oe),this.cancel(oe)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(U,"touchmove",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(oe)?void 0:this.cancel(oe)}),{passive:!1}))}refresh(X,U){var ae;(ae=this._renderService)==null||ae.refreshRows(X,U)}updateCursorStyle(X){var U;(U=this._selectionService)!=null&&U.shouldColumnSelect(X)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(X,U,ae=0){var Z;ae===1?(super.scrollLines(X,U,ae),this.refresh(0,this.rows-1)):(Z=this.viewport)==null||Z.scrollLines(X)}paste(X){(0,h.paste)(X,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(X){this._customKeyEventHandler=X}attachCustomWheelEventHandler(X){this._customWheelEventHandler=X}registerLinkProvider(X){return this._linkProviderService.registerLinkProvider(X)}registerCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(X);return this.refresh(0,this.rows-1),U}deregisterCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(X)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(X){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)}registerDecoration(X){return this._decorationService.registerDecoration(X)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(X,U,ae){this._selectionService.setSelection(X,U,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var X;(X=this._selectionService)==null||X.clearSelection()}selectAll(){var X;(X=this._selectionService)==null||X.selectAll()}selectLines(X,U){var ae;(ae=this._selectionService)==null||ae.selectLines(X,U)}_keyDown(X){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&X.altKey;if(!U&&!this._compositionHelper.keydown(X))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||X.key!=="Dead"&&X.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(X,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),ae.type===3||ae.type===2){const Z=this.rows-1;return this.scrollLines(ae.type===2?-Z:Z),this.cancel(X,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(ae.cancel&&this.cancel(X,!0),!ae.key||!!(X.key&&!X.ctrlKey&&!X.altKey&&!X.metaKey&&X.key.length===1&&X.key.charCodeAt(0)>=65&&X.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==Y.C0.ETX&&ae.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||X.altKey||X.ctrlKey?this.cancel(X,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(X,U){const ae=X.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||X.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||X.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?ae:ae&&(!U.keyCode||U.keyCode>47)}_keyUp(X){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(X)||this.focus(),this.updateCursorStyle(X),this._keyPressHandled=!1)}_keyPress(X){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)U=X.charCode;else if(X.which===null||X.which===void 0)U=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;U=X.which}return!(!U||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(U,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(X){if(X.data&&X.inputType==="insertText"&&(!X.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const U=X.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(X),!0}return!1}resize(X,U){X!==this.cols||U!==this.rows?super.resize(X,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(X,U){var ae,Z;(ae=this._charSizeService)==null||ae.measure(),(Z=this.viewport)==null||Z.syncScrollArea(!0)}clear(){var X;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine(P.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(X=this.viewport)==null||X.reset(),this.refresh(0,this.rows-1)}}reset(){var U,ae;this.options.rows=this.rows,this.options.cols=this.cols;const X=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.reset(),this._decorationService.reset(),(ae=this.viewport)==null||ae.reset(),this._customKeyEventHandler=X,this.refresh(0,this.rows-1)}clearTextureAtlas(){var X;(X=this._renderService)==null||X.clearTextureAtlas()}_reportFocus(){var X;(X=this.element)!=null&&X.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(X){if(this._renderService)switch(X){case I.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),ae=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${ae};${U}t`);break;case I.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Z=this._renderService.dimensions.css.cell.width.toFixed(0),te=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[6;${te};${Z}t`)}}cancel(X,U){if(this.options.cancelEvents||U)return X.preventDefault(),X.stopPropagation(),!1}}a.Terminal=pe},9924:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,m){this._rowCount=m,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const c=Date.now();if(c-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=c,this._innerRefresh();else if(!this._additionalRefreshRequested){const C=c-this._lastRefreshMs,w=this._debounceThresholdMS-C;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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(p,a,u){var h=this&&this.__decorate||function(_,d,g,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,g,E);else for(var T=_.length-1;T>=0;T--)(R=_[T])&&(L=(A<3?R(L):A>3?R(d,g,L):R(d,g))||L);return A>3&&L&&Object.defineProperty(d,g,L),L},m=this&&this.__param||function(_,d){return function(g,E){d(g,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=u(3656),C=u(4725),w=u(8460),k=u(844),x=u(2585);let S=a.Viewport=class extends k.Disposable{constructor(_,d,g,E,R,A,L,T){super(),this._viewportElement=_,this._scrollArea=d,this._bufferService=g,this._optionsService=E,this._charSizeService=R,this._renderService=A,this._coreBrowserService=L,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(_){this._viewportElement.style.backgroundColor=_.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(_){if(_)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 d=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==d&&(this._lastRecordedBufferHeight=d,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const _=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==_&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=_),this._refreshAnimationFrame=null}syncScrollArea(_=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(_);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(_)}_handleScroll(_){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 d=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:d,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const _=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(_*(this._smoothScrollState.target-this._smoothScrollState.origin)),_<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(_,d){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(d<0&&this._viewportElement.scrollTop!==0||d>0&&g<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const d=this._getPixelsScrolled(_);return d!==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+d:this._smoothScrollState.target+=d,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=d,this._bubbleScroll(_,d))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const d=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+d,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!1})}_getPixelsScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let d=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?d*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._currentRowHeight*this._bufferService.rows),d}getBufferElements(_,d){var T;let g,E="";const R=[],A=d??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let B=_;B<A;B++){const N=L.get(B);if(!N)continue;const F=(T=L.get(B+1))==null?void 0:T.isWrapped;if(E+=N.translateToString(!F),!F||B===L.length-1){const G=document.createElement("div");G.textContent=E,R.push(G),E.length>0&&(g=G),E=""}}return{bufferElements:R,cursorElement:g}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let d=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(d/=this._currentRowHeight+0,this._wheelPartialScroll+=d,d=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._bufferService.rows),d}_applyScrollModifier(_,d){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&d.altKey||g==="ctrl"&&d.ctrlKey||g==="shift"&&d.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const d=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,d!==0&&(this._viewportElement.scrollTop+=d,this._bubbleScroll(_,d))}};a.Viewport=S=h([m(2,x.IBufferService),m(3,x.IOptionsService),m(4,C.ICharSizeService),m(5,C.IRenderService),m(6,C.ICoreBrowserService),m(7,C.IThemeService)],S)},3107:function(p,a,u){var h=this&&this.__decorate||function(x,S,_,d){var g,E=arguments.length,R=E<3?S:d===null?d=Object.getOwnPropertyDescriptor(S,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,_,d);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,_,R):g(S,_))||R);return E>3&&R&&Object.defineProperty(S,_,R),R},m=this&&this.__param||function(x,S){return function(_,d){S(_,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=u(4725),C=u(844),w=u(2585);let k=a.BufferDecorationRenderer=class extends C.Disposable{constructor(x,S,_,d,g){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=_,this._decorationService=d,this._renderService=g,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((E=>this._removeDecoration(E)))),this.register((0,C.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 d;const S=this._coreBrowserService.mainDocument.createElement("div");S.classList.add("xterm-decoration"),S.classList.toggle("xterm-decoration-top-layer",((d=x==null?void 0:x.options)==null?void 0:d.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 _=x.options.x??0;return _&&_>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 _=this._decorationElements.get(x);_||(_=this._createElement(x),x.element=_,this._decorationElements.set(x,_),this._container.appendChild(_),x.onDispose((()=>{this._decorationElements.delete(x),_.remove()}))),_.style.top=S*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(_)}}_refreshXPosition(x,S=x.element){if(!S)return;const _=x.options.x??0;(x.options.anchor||"left")==="right"?S.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":S.style.left=_?_*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([m(1,w.IBufferService),m(2,c.ICoreBrowserService),m(3,w.IDecorationService),m(4,c.IRenderService)],k)},5871:(p,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(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,m){return h>=u.startBufferLine-this._linePadding[m||"full"]&&h<=u.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(p,a,u){var h=this&&this.__decorate||function(g,E,R,A){var L,T=arguments.length,B=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,E,R,A);else for(var N=g.length-1;N>=0;N--)(L=g[N])&&(B=(T<3?L(B):T>3?L(E,R,B):L(E,R))||B);return T>3&&B&&Object.defineProperty(E,R,B),B},m=this&&this.__param||function(g,E){return function(R,A){E(R,A,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const c=u(5871),C=u(4725),w=u(844),k=u(2585),x={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let d=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,E,R,A,L,T,B){var F;super(),this._viewportElement=g,this._screenElement=E,this._bufferService=R,this._decorationService=A,this._renderService=L,this._optionsService=T,this._coreBrowserService=B,this._colorZoneStore=new c.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(F=this._viewportElement.parentElement)==null||F.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 G;(G=this._canvas)==null||G.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 g=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=g,S.center=E,S.right=g,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=S.left,_.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_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 E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const E of g)E.position!=="full"&&this._renderColorZone(E);for(const E of g)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(_[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-x[g.position||"full"]/2),S[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[g.position||"full"]))}_queueRefresh(g,E){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=d=h([m(2,k.IBufferService),m(3,k.IDecorationService),m(4,C.IRenderService),m(5,k.IOptionsService),m(6,C.ICoreBrowserService)],d)},2950:function(p,a,u){var h=this&&this.__decorate||function(x,S,_,d){var g,E=arguments.length,R=E<3?S:d===null?d=Object.getOwnPropertyDescriptor(S,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,_,d);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,_,R):g(S,_))||R);return E>3&&R&&Object.defineProperty(S,_,R),R},m=this&&this.__param||function(x,S){return function(_,d){S(_,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=u(4725),C=u(2585),w=u(2584);let k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,S,_,d,g,E){this._textarea=x,this._compositionView=S,this._bufferService=_,this._optionsService=d,this._coreService=g,this._renderService=E,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 _;this._isSendingComposition=!1,S.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(S.start,S.end):this._textarea.value.substring(S.start),_.length>0&&this._coreService.triggerDataEvent(_,!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,_=S.replace(x,"");this._dataAlreadySent=_,S.length>x.length?this._coreService.triggerDataEvent(_,!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),_=this._renderService.dimensions.css.cell.height,d=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=d+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=d+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=k=h([m(2,C.IBufferService),m(3,C.IOptionsService),m(4,C.ICoreService),m(5,c.IRenderService)],k)},9806:(p,a)=>{function u(h,m,c){const C=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[m.clientX-C.left-k,m.clientY-C.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(h,m,c,C,w,k,x,S,_){if(!k)return;const d=u(h,m,c);return d?(d[0]=Math.ceil((d[0]+(_?x/2:0))/x),d[1]=Math.ceil(d[1]/S),d[0]=Math.min(Math.max(d[0],1),C+(_?1:0)),d[1]=Math.min(Math.max(d[1],1),w),d):void 0}},9504:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=u(2584);function m(S,_,d,g){const E=S-c(S,d),R=_-c(_,d),A=Math.abs(E-R)-(function(L,T,B){let N=0;const F=L-c(L,B),G=T-c(T,B);for(let q=0;q<Math.abs(F-G);q++){const $=C(L,T)==="A"?-1:1,W=B.buffer.lines.get(F+$*q);W!=null&&W.isWrapped&&N++}return N})(S,_,d);return x(A,k(C(S,_),g))}function c(S,_){let d=0,g=_.buffer.lines.get(S),E=g==null?void 0:g.isWrapped;for(;E&&S>=0&&S<_.rows;)d++,g=_.buffer.lines.get(--S),E=g==null?void 0:g.isWrapped;return d}function C(S,_){return S>_?"A":"B"}function w(S,_,d,g,E,R){let A=S,L=_,T="";for(;A!==d||L!==g;)A+=E?1:-1,E&&A>R.cols-1?(T+=R.buffer.translateBufferLineToString(L,!1,S,A),A=0,S=0,L++):!E&&A<0&&(T+=R.buffer.translateBufferLineToString(L,!1,0,S+1),A=R.cols-1,S=A,L--);return T+R.buffer.translateBufferLineToString(L,!1,S,A)}function k(S,_){const d=_?"O":"[";return h.C0.ESC+d+S}function x(S,_){S=Math.floor(S);let d="";for(let g=0;g<S;g++)d+=_;return d}a.moveToCellSequence=function(S,_,d,g){const E=d.buffer.x,R=d.buffer.y;if(!d.buffer.hasScrollback)return(function(T,B,N,F,G,q){return m(B,F,G,q).length===0?"":x(w(T,B,T,B-c(B,G),!1,G).length,k("D",q))})(E,R,0,_,d,g)+m(R,_,d,g)+(function(T,B,N,F,G,q){let $;$=m(B,F,G,q).length>0?F-c(F,G):B;const W=F,P=(function(Y,ee,z,M,O,I){let H;return H=m(z,M,O,I).length>0?M-c(M,O):ee,Y<z&&H<=M||Y>=z&&H<M?"C":"D"})(T,B,N,F,G,q);return x(w(T,$,N,W,P==="C",G).length,k(P,q))})(E,R,S,_,d,g);let A;if(R===_)return A=E>S?"D":"C",x(Math.abs(E-S),k(A,g));A=R>_?"D":"C";const L=Math.abs(R-_);return x((function(T,B){return B.cols-T})(R>_?S:E,d)+(L-1)*d.cols+1+((R>_?E:S)-1),k(A,g))}},1296:function(p,a,u){var h=this&&this.__decorate||function(q,$,W,P){var Y,ee=arguments.length,z=ee<3?$:P===null?P=Object.getOwnPropertyDescriptor($,W):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(q,$,W,P);else for(var M=q.length-1;M>=0;M--)(Y=q[M])&&(z=(ee<3?Y(z):ee>3?Y($,W,z):Y($,W))||z);return ee>3&&z&&Object.defineProperty($,W,z),z},m=this&&this.__param||function(q,$){return function(W,P){$(W,P,q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=u(3787),C=u(2550),w=u(2223),k=u(6171),x=u(6052),S=u(4725),_=u(8055),d=u(8460),g=u(844),E=u(2585),R="xterm-dom-renderer-owner-",A="xterm-rows",L="xterm-fg-",T="xterm-bg-",B="xterm-focus",N="xterm-selection";let F=1,G=a.DomRenderer=class extends g.Disposable{constructor(q,$,W,P,Y,ee,z,M,O,I,H,ie,pe){super(),this._terminal=q,this._document=$,this._element=W,this._screenElement=P,this._viewportElement=Y,this._helperContainer=ee,this._linkifier2=z,this._charSizeService=O,this._optionsService=I,this._bufferService=H,this._coreBrowserService=ie,this._themeService=pe,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new d.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),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((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=M.createInstance(c.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,g.toDisposable)((()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new C.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const $=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=$,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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let $=`${this._terminalSelector} .${A} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;$+=`${this._terminalSelector} .${A} .xterm-dim { color: ${_.color.multiplyOpacity(q.foreground,.5).css};}`,$+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const W=`blink_underline_${this._terminalClass}`,P=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;$+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,$+=`@keyframes ${P} { 50% { box-shadow: none; }}`,$+=`@keyframes ${Y} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,$+=`${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${P} 1s step-end infinite;}${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,$+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,z]of q.ansi.entries())$+=`${this._terminalSelector} .${L}${ee} { color: ${z.css}; }${this._terminalSelector} .${L}${ee}.xterm-dim { color: ${_.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${T}${ee} { background-color: ${z.css}; }`;$+=`${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(q.background).css}; }${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=$}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,$){for(let W=this._rowElements.length;W<=$;W++){const P=this._document.createElement("div");this._rowContainer.appendChild(P),this._rowElements.push(P)}for(;this._rowElements.length>$;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(q,$){this._refreshRowElements(q,$),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(B),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(B),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(q,$,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,$,W),this.renderRows(0,this._bufferService.rows-1),!q||!$)return;this._selectionRenderModel.update(this._terminal,q,$,W);const P=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||z<0)return;const M=this._document.createDocumentFragment();if(W){const O=q[0]>$[0];M.appendChild(this._createSelectionElement(ee,O?$[0]:q[0],O?q[0]:$[0],z-ee+1))}else{const O=P===ee?q[0]:0,I=ee===Y?$[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(ee,O,I));const H=z-ee-1;if(M.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,H)),ee!==z){const ie=Y===z?$[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(z,0,ie))}}this._selectionContainer.appendChild(M)}_createSelectionElement(q,$,W,P=1){const Y=this._document.createElement("div"),ee=$*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*(W-$);return ee+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-ee),Y.style.height=P*this.dimensions.css.cell.height+"px",Y.style.top=q*this.dimensions.css.cell.height+"px",Y.style.left=`${ee}px`,Y.style.width=`${z}px`,Y}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 q of this._rowElements)q.replaceChildren()}renderRows(q,$){const W=this._bufferService.buffer,P=W.ybase+W.y,Y=Math.min(W.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let O=q;O<=$;O++){const I=O+W.ydisp,H=this._rowElements[O],ie=W.lines.get(I);if(!H||!ie)break;H.replaceChildren(...this._rowFactory.createRow(ie,I,I===P,z,M,Y,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,$,W,P,Y,ee){W<0&&(q=0),P<0&&($=0);const z=this._bufferService.rows-1;W=Math.max(Math.min(W,z),0),P=Math.max(Math.min(P,z),0),Y=Math.min(Y,this._bufferService.cols);const M=this._bufferService.buffer,O=M.ybase+M.y,I=Math.min(M.x,Y-1),H=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,pe=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=W;de<=P;++de){const X=de+M.ydisp,U=this._rowElements[de],ae=M.lines.get(X);if(!U||!ae)break;U.replaceChildren(...this._rowFactory.createRow(ae,X,X===O,ie,pe,I,H,this.dimensions.css.cell.width,this._widthCache,ee?de===W?q:0:-1,ee?(de===P?$:Y)-1:-1))}}};a.DomRenderer=G=h([m(7,E.IInstantiationService),m(8,S.ICharSizeService),m(9,E.IOptionsService),m(10,E.IBufferService),m(11,S.ICoreBrowserService),m(12,S.IThemeService)],G)},3787:function(p,a,u){var h=this&&this.__decorate||function(A,L,T,B){var N,F=arguments.length,G=F<3?L:B===null?B=Object.getOwnPropertyDescriptor(L,T):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,L,T,B);else for(var q=A.length-1;q>=0;q--)(N=A[q])&&(G=(F<3?N(G):F>3?N(L,T,G):N(L,T))||G);return F>3&&G&&Object.defineProperty(L,T,G),G},m=this&&this.__param||function(A,L){return function(T,B){L(T,B,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=u(2223),C=u(643),w=u(511),k=u(2585),x=u(8055),S=u(4725),_=u(4269),d=u(6171),g=u(3734);let E=a.DomRendererRowFactory=class{constructor(A,L,T,B,N,F,G){this._document=A,this._characterJoinerService=L,this._optionsService=T,this._coreBrowserService=B,this._coreService=N,this._decorationService=F,this._themeService=G,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,L,T){this._selectionStart=A,this._selectionEnd=L,this._columnSelectMode=T}createRow(A,L,T,B,N,F,G,q,$,W,P){const Y=[],ee=this._characterJoinerService.getJoinedCharacters(L),z=this._themeService.colors;let M,O=A.getNoBgTrimmedLength();T&&O<F+1&&(O=F+1);let I=0,H="",ie=0,pe=0,de=0,X=!1,U=0,ae=!1,Z=0;const te=[],oe=W!==-1&&P!==-1;for(let Se=0;Se<O;Se++){A.loadCell(Se,this._workCell);let xe=this._workCell.getWidth();if(xe===0)continue;let Ye=!1,at=Se,ke=this._workCell;if(ee.length>0&&Se===ee[0][0]){Ye=!0;const Pe=ee.shift();ke=new _.JoinedCellData(this._workCell,A.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),at=Pe[1]-1,xe=ke.getWidth()}const mn=this._isCellInSelection(Se,L),gn=T&&Se===F,vn=oe&&Se>=W&&Se<=P;let En=!1;this._decorationService.forEachDecorationAtCell(Se,L,void 0,(Pe=>{En=!0}));let Gn=ke.getChars()||C.WHITESPACE_CELL_CHAR;if(Gn===" "&&(ke.isUnderline()||ke.isOverline())&&(Gn=" "),Z=xe*q-$.get(Gn,ke.isBold(),ke.isItalic()),M){if(I&&(mn&&ae||!mn&&!ae&&ke.bg===ie)&&(mn&&ae&&z.selectionForeground||ke.fg===pe)&&ke.extended.ext===de&&vn===X&&Z===U&&!gn&&!Ye&&!En){ke.isInvisible()?H+=C.WHITESPACE_CELL_CHAR:H+=Gn,I++;continue}I&&(M.textContent=H),M=this._document.createElement("span"),I=0,H=""}else M=this._document.createElement("span");if(ie=ke.bg,pe=ke.fg,de=ke.extended.ext,X=vn,U=Z,ae=mn,Ye&&F>=Se&&F<=at&&(F=Se),!this._coreService.isCursorHidden&&gn&&this._coreService.isCursorInitialized){if(te.push("xterm-cursor"),this._coreBrowserService.isFocused)G&&te.push("xterm-cursor-blink"),te.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":te.push("xterm-cursor-outline");break;case"block":te.push("xterm-cursor-block");break;case"bar":te.push("xterm-cursor-bar");break;case"underline":te.push("xterm-cursor-underline")}}if(ke.isBold()&&te.push("xterm-bold"),ke.isItalic()&&te.push("xterm-italic"),ke.isDim()&&te.push("xterm-dim"),H=ke.isInvisible()?C.WHITESPACE_CELL_CHAR:ke.getChars()||C.WHITESPACE_CELL_CHAR,ke.isUnderline()&&(te.push(`xterm-underline-${ke.extended.underlineStyle}`),H===" "&&(H=" "),!ke.isUnderlineColorDefault()))if(ke.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(ke.getUnderlineColor()).join(",")})`;else{let Pe=ke.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ke.isBold()&&Pe<8&&(Pe+=8),M.style.textDecorationColor=z.ansi[Pe].css}ke.isOverline()&&(te.push("xterm-overline"),H===" "&&(H=" ")),ke.isStrikethrough()&&te.push("xterm-strikethrough"),vn&&(M.style.textDecoration="underline");let At=ke.getFgColor(),ot=ke.getFgColorMode(),Ot=ke.getBgColor(),ue=ke.getBgColorMode();const ge=!!ke.isInverse();if(ge){const Pe=At;At=Ot,Ot=Pe;const bt=ot;ot=ue,ue=bt}let be,Te,Oe,mt=!1;switch(this._decorationService.forEachDecorationAtCell(Se,L,void 0,(Pe=>{Pe.options.layer!=="top"&&mt||(Pe.backgroundColorRGB&&(ue=50331648,Ot=Pe.backgroundColorRGB.rgba>>8&16777215,be=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(ot=50331648,At=Pe.foregroundColorRGB.rgba>>8&16777215,Te=Pe.foregroundColorRGB),mt=Pe.options.layer==="top")})),!mt&&mn&&(be=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Ot=be.rgba>>8&16777215,ue=50331648,mt=!0,z.selectionForeground&&(ot=50331648,At=z.selectionForeground.rgba>>8&16777215,Te=z.selectionForeground)),mt&&te.push("xterm-decoration-top"),ue){case 16777216:case 33554432:Oe=z.ansi[Ot],te.push(`xterm-bg-${Ot}`);break;case 50331648:Oe=x.channels.toColor(Ot>>16,Ot>>8&255,255&Ot),this._addStyle(M,`background-color:#${R((Ot>>>0).toString(16),"0",6)}`);break;default:ge?(Oe=z.foreground,te.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Oe=z.background}switch(be||ke.isDim()&&(be=x.color.multiplyOpacity(Oe,.5)),ot){case 16777216:case 33554432:ke.isBold()&&At<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(At+=8),this._applyMinimumContrast(M,Oe,z.ansi[At],ke,be,void 0)||te.push(`xterm-fg-${At}`);break;case 50331648:const Pe=x.channels.toColor(At>>16&255,At>>8&255,255&At);this._applyMinimumContrast(M,Oe,Pe,ke,be,Te)||this._addStyle(M,`color:#${R(At.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Oe,z.foreground,ke,be,Te)||ge&&te.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}te.length&&(M.className=te.join(" "),te.length=0),gn||Ye||En?M.textContent=H:I++,Z!==this.defaultSpacing&&(M.style.letterSpacing=`${Z}px`),Y.push(M),Se=at}return M&&I&&(M.textContent=H),Y}_applyMinimumContrast(A,L,T,B,N,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,d.treatGlyphAsBackgroundColor)(B.getCode()))return!1;const G=this._getContrastCache(B);let q;if(N||F||(q=G.getColor(L.rgba,T.rgba)),q===void 0){const $=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);q=x.color.ensureContrastRatio(N||L,F||T,$),G.setColor((N||L).rgba,(F||T).rgba,q??null)}return!!q&&(this._addStyle(A,`color:${q.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,L){A.setAttribute("style",`${A.getAttribute("style")||""}${L};`)}_isCellInSelection(A,L){const T=this._selectionStart,B=this._selectionEnd;return!(!T||!B)&&(this._columnSelectMode?T[0]<=B[0]?A>=T[0]&&L>=T[1]&&A<B[0]&&L<=B[1]:A<T[0]&&L>=T[1]&&A>=B[0]&&L<=B[1]:L>T[1]&&L<B[1]||T[1]===B[1]&&L===T[1]&&A>=T[0]&&A<B[0]||T[1]<B[1]&&L===B[1]&&A<B[0]||T[1]<B[1]&&L===T[1]&&A>=T[0])}};function R(A,L,T){for(;A.length<T;)A=L+A;return A}a.DomRendererRowFactory=E=h([m(1,S.ICharacterJoinerService),m(2,k.IOptionsService),m(3,S.ICoreBrowserService),m(4,k.ICoreService),m(5,k.IDecorationService),m(6,S.IThemeService)],E)},2550:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const m=u.createElement("span");m.classList.add("xterm-char-measure-element");const c=u.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const C=u.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[m,c,C,w],this._container.appendChild(m),this._container.appendChild(c),this._container.appendChild(C),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(u,h,m,c){u===this._font&&h===this._fontSize&&m===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=m,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,m){let c=0;if(!h&&!m&&u.length===1&&(c=u.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const k=this._measure(u,0);return k>0&&(this._flat[c]=k),k}let C=u;h&&(C+="B"),m&&(C+="I");let w=this._holey.get(C);if(w===void 0){let k=0;h&&(k|=1),m&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(C,w)}return w}_measure(u,h){const m=this._measureElements[h];return m.textContent=u.repeat(32),m.offsetWidth/32}}},2223:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(p,a)=>{function u(m){return 57508<=m&&m<=57558}function h(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=h,a.allowRescaling=function(m,c,C,w){return c===1&&C>Math.ceil(1.5*w)&&m!==void 0&&m>255&&!h(m)&&!u(m)&&!(function(k){return 57344<=k&&k<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return u(m)||(function(c){return 9472<=c&&c<=9631})(m)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(m,c,C=0){return(m-(2*Math.round(c)-C))%(2*Math.round(c))}},6052:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,c,C,w=!1){if(this.selectionStart=c,this.selectionEnd=C,!c||!C||c[0]===C[0]&&c[1]===C[1])return void this.clear();const k=m.buffers.active.ydisp,x=c[1]-k,S=C[1]-k,_=Math.max(x,0),d=Math.min(S,m.rows-1);_>=m.rows||d<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=_,this.viewportCappedEndRow=d,this.startCol=c[0],this.endCol=C[0])}isCellSelected(m,c,C){return!!this.hasSelection&&(C-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&C>=this.viewportCappedStartRow&&c<this.endCol&&C<=this.viewportCappedEndRow:c<this.startCol&&C>=this.viewportCappedStartRow&&c>=this.endCol&&C<=this.viewportCappedEndRow:C>this.viewportStartRow&&C<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&C===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},m=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const c=u(2585),C=u(8460),w=u(844);let k=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(d,g,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new C.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new _(this._optionsService))}catch{this._measureStrategy=this.register(new S(d,g,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const d=this._measureStrategy.measure();d.width===this.width&&d.height===this.height||(this.width=d.width,this.height=d.height,this._onCharSizeChange.fire())}};a.CharSizeService=k=h([m(2,c.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(g,E){g!==void 0&&g>0&&E!==void 0&&E>0&&(this._result.width=g,this._result.height=E)}}class S extends x{constructor(g,E,R){super(),this._document=g,this._parentElement=E,this._optionsService=R,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class _ extends x{constructor(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(p,a,u){var h=this&&this.__decorate||function(_,d,g,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,g,E);else for(var T=_.length-1;T>=0;T--)(R=_[T])&&(L=(A<3?R(L):A>3?R(d,g,L):R(d,g))||L);return A>3&&L&&Object.defineProperty(d,g,L),L},m=this&&this.__param||function(_,d){return function(g,E){d(g,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=u(3734),C=u(643),w=u(511),k=u(2585);class x extends c.AttributeData{constructor(d,g,E){super(),this.content=0,this.combinedData="",this.fg=d.fg,this.bg=d.bg,this.combinedData=g,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(d){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let S=a.CharacterJoinerService=class H_{constructor(d){this._bufferService=d,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(d){const g={id:this._nextCharacterJoinerId++,handler:d};return this._characterJoiners.push(g),g.id}deregister(d){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===d)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(d){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(d);if(!g||g.length===0)return[];const E=[],R=g.translateToString(!0);let A=0,L=0,T=0,B=g.getFg(0),N=g.getBg(0);for(let F=0;F<g.getTrimmedLength();F++)if(g.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==N){if(F-A>1){const G=this._getJoinedRanges(R,T,L,g,A);for(let q=0;q<G.length;q++)E.push(G[q])}A=F,T=L,B=this._workCell.fg,N=this._workCell.bg}L+=this._workCell.getChars().length||C.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const F=this._getJoinedRanges(R,T,L,g,A);for(let G=0;G<F.length;G++)E.push(F[G])}return E}_getJoinedRanges(d,g,E,R,A){const L=d.substring(g,E);let T=[];try{T=this._characterJoiners[0].handler(L)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const N=this._characterJoiners[B].handler(L);for(let F=0;F<N.length;F++)H_._mergeRanges(T,N[F])}catch(N){console.error(N)}return this._stringRangesToCellRanges(T,R,A),T}_stringRangesToCellRanges(d,g,E){let R=0,A=!1,L=0,T=d[R];if(T){for(let B=E;B<this._bufferService.cols;B++){const N=g.getWidth(B),F=g.getString(B).length||C.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!A&&T[0]<=L&&(T[0]=B,A=!0),T[1]<=L){if(T[1]=B,T=d[++R],!T)break;T[0]<=L?(T[0]=B,A=!0):A=!1}L+=F}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(d,g){let E=!1;for(let R=0;R<d.length;R++){const A=d[R];if(E){if(g[1]<=A[0])return d[R-1][1]=g[1],d;if(g[1]<=A[1])return d[R-1][1]=Math.max(g[1],A[1]),d.splice(R,1),d;d.splice(R,1),R--}else{if(g[1]<=A[0])return d.splice(R,0,g),d;if(g[1]<=A[1])return A[0]=Math.min(g[0],A[0]),d;g[0]<A[1]&&(A[0]=Math.min(g[0],A[0]),E=!0)}}return E?d[d.length-1][1]=g[1]:d.push(g),d}};a.CharacterJoinerService=S=h([m(0,k.IBufferService)],S)},5114:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=u(844),m=u(8460),c=u(3656);class C extends h.Disposable{constructor(x,S,_){super(),this._textarea=x,this._window=S,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((d=>this._screenDprMonitor.setWindow(d)))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(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=C;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,c.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var 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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=u(844);class m extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(C){return this.linkProviders.push(C),{dispose:()=>{const w=this.linkProviders.indexOf(C);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=m},8934:function(p,a,u){var h=this&&this.__decorate||function(k,x,S,_){var d,g=arguments.length,E=g<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,S,_);else for(var R=k.length-1;R>=0;R--)(d=k[R])&&(E=(g<3?d(E):g>3?d(x,S,E):d(x,S))||E);return g>3&&E&&Object.defineProperty(x,S,E),E},m=this&&this.__param||function(k,x){return function(S,_){x(S,_,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=u(4725),C=u(9806);let w=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,S,_,d){return(0,C.getCoords)(window,k,x,S,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,d)}getMouseReportCoords(k,x){const S=(0,C.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([m(0,c.IRenderService),m(1,c.ICharSizeService)],w)},3230:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},m=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const c=u(6193),C=u(4725),w=u(8460),k=u(844),x=u(7226),S=u(2585);let _=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(d,g,E,R,A,L,T,B){super(),this._rowCount=d,this._charSizeService=R,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 c.RenderDebouncer(((N,F)=>this._renderRows(N,F)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(L.onResize((()=>this._fullRefresh()))),this.register(L.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(L.cols,L.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(L.buffer.y,L.buffer.y,!0)))),this.register(B.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,g),this.register(T.onWindowChange((N=>this._registerIntersectionObserver(N,g))))}_registerIntersectionObserver(d,g){if("IntersectionObserver"in d){const E=new d.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});E.observe(g),this._observerDisposable.value=(0,k.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(d){this._isPaused=d.isIntersecting===void 0?d.intersectionRatio===0:!d.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(d,g,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(d,g,this._rowCount))}_renderRows(d,g){this._renderer.value&&(d=Math.min(d,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(d,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:d,end:g}),this._onRender.fire({start:d,end:g}),this._isNextRenderRedrawOnly=!0)}resize(d,g){this._rowCount=g,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(d){this._renderer.value=d,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(d){return this._renderDebouncer.addRefreshCallback(d)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var d,g;this._renderer.value&&((g=(d=this._renderer.value).clearTextureAtlas)==null||g.call(d),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(d,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(d,g)})):this._renderer.value.handleResize(d,g),this._fullRefresh())}handleCharSizeChanged(){var d;(d=this._renderer.value)==null||d.handleCharSizeChanged()}handleBlur(){var d;(d=this._renderer.value)==null||d.handleBlur()}handleFocus(){var d;(d=this._renderer.value)==null||d.handleFocus()}handleSelectionChanged(d,g,E){var R;this._selectionState.start=d,this._selectionState.end=g,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(d,g,E)}handleCursorMove(){var d;(d=this._renderer.value)==null||d.handleCursorMove()}clear(){var d;(d=this._renderer.value)==null||d.clear()}};a.RenderService=_=h([m(2,S.IOptionsService),m(3,C.ICharSizeService),m(4,S.IDecorationService),m(5,S.IBufferService),m(6,C.ICoreBrowserService),m(7,C.IThemeService)],_)},9312:function(p,a,u){var h=this&&this.__decorate||function(T,B,N,F){var G,q=arguments.length,$=q<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,N):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(T,B,N,F);else for(var W=T.length-1;W>=0;W--)(G=T[W])&&($=(q<3?G($):q>3?G(B,N,$):G(B,N))||$);return q>3&&$&&Object.defineProperty(B,N,$),$},m=this&&this.__param||function(T,B){return function(N,F){B(N,F,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=u(9806),C=u(9504),w=u(456),k=u(4725),x=u(8460),S=u(844),_=u(6114),d=u(4841),g=u(511),E=u(2585),R=" ",A=new RegExp(R,"g");let L=a.SelectionService=class extends S.Disposable{constructor(T,B,N,F,G,q,$,W,P){super(),this._element=T,this._screenElement=B,this._linkifier=N,this._bufferService=F,this._coreService=G,this._mouseService=q,this._optionsService=$,this._renderService=W,this._coreBrowserService=P,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.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=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),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 T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!T||!B||T[0]===B[0]&&T[1]===B[1])}get selectionText(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!T||!B)return"";const N=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(T[0]===B[0])return"";const G=T[0]<B[0]?T[0]:B[0],q=T[0]<B[0]?B[0]:T[0];for(let $=T[1];$<=B[1];$++){const W=N.translateBufferLineToString($,!0,G,q);F.push(W)}}else{const G=T[1]===B[1]?B[0]:void 0;F.push(N.translateBufferLineToString(T[1],!0,T[0],G));for(let q=T[1]+1;q<=B[1]-1;q++){const $=N.lines.get(q),W=N.translateBufferLineToString(q,!0);$!=null&&$.isWrapped?F[F.length-1]+=W:F.push(W)}if(T[1]!==B[1]){const q=N.lines.get(B[1]),$=N.translateBufferLineToString(B[1],!0,0,B[0]);q&&q.isWrapped?F[F.length-1]+=$:F.push($)}}return F.map((G=>G.replace(A," "))).join(_.isWindows?`\r
55
56
  `:`
56
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),m.isLinux&&T&&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(T){const B=this._getMouseBufferCoords(T),N=this._model.finalSelectionStart,V=this._model.finalSelectionEnd;return!!(N&&V&&B)&&this._areCoordsInSelection(B,N,V)}isCellInSelection(T,B){const N=this._model.finalSelectionStart,V=this._model.finalSelectionEnd;return!(!N||!V)&&this._areCoordsInSelection([T,B],N,V)}_areCoordsInSelection(T,B,N){return T[1]>B[1]&&T[1]<N[1]||B[1]===N[1]&&T[1]===B[1]&&T[0]>=B[0]&&T[0]<N[0]||B[1]<N[1]&&T[1]===N[1]&&T[0]<N[0]||B[1]<N[1]&&T[1]===B[1]&&T[0]>=B[0]}_selectWordAtCursor(T,B){var F,U;const N=(U=(F=this._linkifier.currentLink)==null?void 0:F.link)==null?void 0:U.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,d.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const V=this._getMouseBufferCoords(T);return!!V&&(this._selectWordAt(V,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,B){this._model.clearSelection(),T=Math.max(T,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const B=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(T){let B=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=N?0:(B>N&&(B-=N),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(T){return m.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const B=this._getMouseBufferCoords(T);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(T){return T.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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(T),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 V=N.lines.get(this._model.selectionEnd[1]);V&&V.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}B&&B[0]===this._model.selectionEnd[0]&&B[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 T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const B=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const V=(0,C.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(V,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,N=!(!T||!B||T[0]===B[0]&&T[1]===B[1]);N?T&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,B,N)):this._oldHasSelection&&this._fireOnSelectionChange(T,B,N)}_fireOnSelectionChange(T,B,N){this._oldSelectionStart=T,this._oldSelectionEnd=B,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(T,B){let N=B;for(let V=0;B>=V;V++){const F=T.loadCell(V,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:F>1&&B!==V&&(N+=F-1)}return N}setSelection(T,B,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,B],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,B,N=!0,V=!0){if(T[0]>=this._bufferService.cols)return;const F=this._bufferService.buffer,U=F.lines.get(T[1]);if(!U)return;const Y=F.translateBufferLineToString(T[1],!1);let $=this._convertViewportColToCharacterIndex(U,T[0]),G=$;const X=T[0]-$;let se=0,z=0,M=0,O=0;if(Y.charAt($)===" "){for(;$>0&&Y.charAt($-1)===" ";)$--;for(;G<Y.length&&Y.charAt(G+1)===" ";)G++}else{let ne=T[0],de=T[0];U.getWidth(ne)===0&&(se++,ne--),U.getWidth(de)===2&&(z++,de++);const pe=U.getString(de).length;for(pe>1&&(O+=pe-1,G+=pe-1);ne>0&&$>0&&!this._isCharWordSeparator(U.loadCell(ne-1,this._workCell));){U.loadCell(ne-1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===0?(se++,ne--):K>1&&(M+=K-1,$-=K-1),$--,ne--}for(;de<U.length&&G+1<Y.length&&!this._isCharWordSeparator(U.loadCell(de+1,this._workCell));){U.loadCell(de+1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,de++):K>1&&(O+=K-1,G+=K-1),G++,de++}}G++;let P=$+X-se+M,H=Math.min(this._bufferService.cols,G-$+se+z-M-O);if(B||Y.slice($,G).trim()!==""){if(N&&P===0&&U.getCodePoint(0)!==32){const ne=F.lines.get(T[1]-1);if(ne&&U.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const de=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(de){const pe=this._bufferService.cols-de.start;P-=pe,H+=pe}}}if(V&&P+H===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ne=F.lines.get(T[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const de=this._getWordAt([0,T[1]+1],!1,!1,!0);de&&(H+=de.length)}}return{start:P,length:H}}}_selectWordAt(T,B){const N=this._getWordAt(T,B);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[N.start,T[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(T){const B=this._getWordAt(T,!0);if(B){let N=T[1];for(;B.start<0;)B.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,N]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const B=this._bufferService.buffer.getWrappedRangeForLine(T),N={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,d.getRangeLength)(N,this._bufferService.cols)}};a.SelectionService=L=h([_(3,E.IBufferService),_(4,E.ICoreService),_(5,k.IMouseService),_(6,E.IOptionsService),_(7,k.IRenderService),_(8,k.ICoreBrowserService)],L)},4725:(p,a,u)=>{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=u(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(p,a,u){var h=this&&this.__decorate||function(L,T,B,N){var V,F=arguments.length,U=F<3?T:N===null?N=Object.getOwnPropertyDescriptor(T,B):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(L,T,B,N);else for(var Y=L.length-1;Y>=0;Y--)(V=L[Y])&&(U=(F<3?V(U):F>3?V(T,B,U):V(T,B))||U);return F>3&&U&&Object.defineProperty(T,B,U),U},_=this&&this.__param||function(L,T){return function(B,N){T(B,N,L)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),C=u(8055),w=u(8460),k=u(844),x=u(2585),S=C.css.toColor("#ffffff"),m=C.css.toColor("#000000"),d=C.css.toColor("#ffffff"),g=C.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const L=[C.css.toColor("#2e3436"),C.css.toColor("#cc0000"),C.css.toColor("#4e9a06"),C.css.toColor("#c4a000"),C.css.toColor("#3465a4"),C.css.toColor("#75507b"),C.css.toColor("#06989a"),C.css.toColor("#d3d7cf"),C.css.toColor("#555753"),C.css.toColor("#ef2929"),C.css.toColor("#8ae234"),C.css.toColor("#fce94f"),C.css.toColor("#729fcf"),C.css.toColor("#ad7fa8"),C.css.toColor("#34e2e2"),C.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let B=0;B<216;B++){const N=T[B/36%6|0],V=T[B/6%6|0],F=T[B%6];L.push({css:C.channels.toCss(N,V,F),rgba:C.channels.toRgba(N,V,F)})}for(let B=0;B<24;B++){const N=8+10*B;L.push({css:C.channels.toCss(N,N,N),rgba:C.channels.toRgba(N,N,N)})}return L})());let R=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(L){super(),this._optionsService=L,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:m,cursor:d,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:C.color.blend(m,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:C.color.blend(m,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(L={}){const T=this._colors;if(T.foreground=A(L.foreground,S),T.background=A(L.background,m),T.cursor=A(L.cursor,d),T.cursorAccent=A(L.cursorAccent,g),T.selectionBackgroundTransparent=A(L.selectionBackground,E),T.selectionBackgroundOpaque=C.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(L.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=C.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=L.selectionForeground?A(L.selectionForeground,C.NULL_COLOR):void 0,T.selectionForeground===C.NULL_COLOR&&(T.selectionForeground=void 0),C.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=C.color.opacity(T.selectionBackgroundTransparent,.3)),C.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=C.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=a.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=A(L.black,a.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=A(L.red,a.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=A(L.green,a.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=A(L.yellow,a.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=A(L.blue,a.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=A(L.magenta,a.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=A(L.cyan,a.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=A(L.white,a.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=A(L.brightBlack,a.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=A(L.brightRed,a.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=A(L.brightGreen,a.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=A(L.brightYellow,a.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=A(L.brightBlue,a.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=A(L.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=A(L.brightCyan,a.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=A(L.brightWhite,a.DEFAULT_ANSI_COLORS[15]),L.extendedAnsi){const B=Math.min(T.ansi.length-16,L.extendedAnsi.length);for(let N=0;N<B;N++)T.ansi[N+16]=A(L.extendedAnsi[N],a.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(L){this._restoreColor(L),this._onChangeColors.fire(this.colors)}_restoreColor(L){if(L!==void 0)switch(L){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[L]=this._restoreColors.ansi[L]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(L){L(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function A(L,T){if(L!==void 0)try{return C.css.toColor(L)}catch{}return T}a.ThemeService=R=h([_(0,x.IOptionsService)],R)},6349:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=u(8460),_=u(844);class c extends _.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 m=k-1;m>=0;m--)this.set(w+m+x,this.get(w+m));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=c},1439:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(h,_=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const C in h)c[C]=_<=1?h[C]:h[C]&&u(h[C],_-1);return c}},8055:(p,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 u=0,h=0,_=0,c=0;var C,w,k,x,S;function m(g){const E=g.toString(16);return E.length<2?"0"+E:E}function d(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(g){g.toCss=function(E,R,A,L){return L!==void 0?`#${m(E)}${m(R)}${m(A)}${m(L)}`:`#${m(E)}${m(R)}${m(A)}`},g.toRgba=function(E,R,A,L=255){return(E<<24|R<<16|A<<8|L)>>>0},g.toColor=function(E,R,A,L){return{css:g.toCss(E,R,A,L),rgba:g.toRgba(E,R,A,L)}}})(C||(a.channels=C={})),(function(g){function E(R,A){return c=Math.round(255*A),[u,h,_]=S.toChannels(R.rgba),{css:C.toCss(u,h,_,c),rgba:C.toRgba(u,h,_,c)}}g.blend=function(R,A){if(c=(255&A.rgba)/255,c===1)return{css:A.css,rgba:A.rgba};const L=A.rgba>>24&255,T=A.rgba>>16&255,B=A.rgba>>8&255,N=R.rgba>>24&255,V=R.rgba>>16&255,F=R.rgba>>8&255;return u=N+Math.round((L-N)*c),h=V+Math.round((T-V)*c),_=F+Math.round((B-F)*c),{css:C.toCss(u,h,_),rgba:C.toRgba(u,h,_)}},g.isOpaque=function(R){return(255&R.rgba)==255},g.ensureContrastRatio=function(R,A,L){const T=S.ensureContrastRatio(R.rgba,A.rgba,L);if(T)return C.toColor(T>>24&255,T>>16&255,T>>8&255)},g.opaque=function(R){const A=(255|R.rgba)>>>0;return[u,h,_]=S.toChannels(A),{css:C.toCss(u,h,_),rgba:A}},g.opacity=E,g.multiplyOpacity=function(R,A){return c=255&R.rgba,E(R,c*A/255)},g.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(w||(a.color=w={})),(function(g){let E,R;try{const A=document.createElement("canvas");A.width=1,A.height=1;const L=A.getContext("2d",{willReadFrequently:!0});L&&(E=L,E.globalCompositeOperation="copy",R=E.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),_=parseInt(A.slice(3,4).repeat(2),16),C.toColor(u,h,_);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),_=parseInt(A.slice(3,4).repeat(2),16),c=parseInt(A.slice(4,5).repeat(2),16),C.toColor(u,h,_,c);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const L=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(L)return u=parseInt(L[1]),h=parseInt(L[2]),_=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),C.toColor(u,h,_,c);if(!E||!R)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=R,E.fillStyle=A,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,h,_,c]=E.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:C.toRgba(u,h,_,c),css:A}}})(k||(a.css=k={})),(function(g){function E(R,A,L){const T=R/255,B=A/255,N=L/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}g.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},g.relativeLuminance2=E})(x||(a.rgb=x={})),(function(g){function E(A,L,T){const B=A>>24&255,N=A>>16&255,V=A>>8&255;let F=L>>24&255,U=L>>16&255,Y=L>>8&255,$=d(x.relativeLuminance2(F,U,Y),x.relativeLuminance2(B,N,V));for(;$<T&&(F>0||U>0||Y>0);)F-=Math.max(0,Math.ceil(.1*F)),U-=Math.max(0,Math.ceil(.1*U)),Y-=Math.max(0,Math.ceil(.1*Y)),$=d(x.relativeLuminance2(F,U,Y),x.relativeLuminance2(B,N,V));return(F<<24|U<<16|Y<<8|255)>>>0}function R(A,L,T){const B=A>>24&255,N=A>>16&255,V=A>>8&255;let F=L>>24&255,U=L>>16&255,Y=L>>8&255,$=d(x.relativeLuminance2(F,U,Y),x.relativeLuminance2(B,N,V));for(;$<T&&(F<255||U<255||Y<255);)F=Math.min(255,F+Math.ceil(.1*(255-F))),U=Math.min(255,U+Math.ceil(.1*(255-U))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),$=d(x.relativeLuminance2(F,U,Y),x.relativeLuminance2(B,N,V));return(F<<24|U<<16|Y<<8|255)>>>0}g.blend=function(A,L){if(c=(255&L)/255,c===1)return L;const T=L>>24&255,B=L>>16&255,N=L>>8&255,V=A>>24&255,F=A>>16&255,U=A>>8&255;return u=V+Math.round((T-V)*c),h=F+Math.round((B-F)*c),_=U+Math.round((N-U)*c),C.toRgba(u,h,_)},g.ensureContrastRatio=function(A,L,T){const B=x.relativeLuminance(A>>8),N=x.relativeLuminance(L>>8);if(d(B,N)<T){if(N<B){const U=E(A,L,T),Y=d(B,x.relativeLuminance(U>>8));if(Y<T){const $=R(A,L,T);return Y>d(B,x.relativeLuminance($>>8))?U:$}return U}const V=R(A,L,T),F=d(B,x.relativeLuminance(V>>8));if(F<T){const U=E(A,L,T);return F>d(B,x.relativeLuminance(U>>8))?V:U}return V}},g.reduceLuminance=E,g.increaseLuminance=R,g.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(S||(a.rgba=S={})),a.toPaddedHex=m,a.contrastRatio=d},8969:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),_=u(2585),c=u(4348),C=u(7866),w=u(744),k=u(7302),x=u(6975),S=u(8460),m=u(1753),d=u(1480),g=u(7994),E=u(9282),R=u(5435),A=u(5981),L=u(2660);let T=!1;class B extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((V=>{var F;(F=this._onScrollApi)==null||F.fire(V.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(V){for(const F in V)this.optionsService.options[F]=V[F]}constructor(V){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 c.InstantiationService,this.optionsService=this.register(new k.OptionsService(V)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(C.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(d.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(L.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,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((F=>{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((F=>{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 A.WriteBuffer(((F,U)=>this._inputHandler.parse(F,U)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(V,F){this._writeBuffer.write(V,F)}writeSync(V,F){this._logService.logLevel<=_.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(V,F)}input(V,F=!0){this.coreService.triggerDataEvent(V,F)}resize(V,F){isNaN(V)||isNaN(F)||(V=Math.max(V,w.MINIMUM_COLS),F=Math.max(F,w.MINIMUM_ROWS),this._bufferService.resize(V,F))}scroll(V,F=!1){this._bufferService.scroll(V,F)}scrollLines(V,F,U){this._bufferService.scrollLines(V,F,U)}scrollPages(V){this.scrollLines(V*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(V){const F=V-this._bufferService.buffer.ydisp;F!==0&&this.scrollLines(F)}registerEscHandler(V,F){return this._inputHandler.registerEscHandler(V,F)}registerDcsHandler(V,F){return this._inputHandler.registerDcsHandler(V,F)}registerCsiHandler(V,F){return this._inputHandler.registerCsiHandler(V,F)}registerOscHandler(V,F){return this._inputHandler.registerOscHandler(V,F)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let V=!1;const F=this.optionsService.rawOptions.windowsPty;F&&F.buildNumber!==void 0&&F.buildNumber!==void 0?V=F.backend==="conpty"&&F.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(V=!0),V?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const V=[];V.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),V.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const F of V)F.dispose()}))}}}a.CoreTerminal=B},8460:(p,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===u)return void this._listeners.splice(h,1)}}})),this._event}fire(u,h){const _=[];for(let c=0;c<this._listeners.length;c++)_.push(this._listeners[c]);for(let c=0;c<_.length;c++)_[c].call(void 0,u,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,h){return u((_=>h.fire(_)))},a.runAndSubscribe=function(u,h){return h(void 0),u((_=>h(_)))}},5435:function(p,a,u){var h=this&&this.__decorate||function(se,z,M,O){var P,H=arguments.length,ne=H<3?z:O===null?O=Object.getOwnPropertyDescriptor(z,M):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(se,z,M,O);else for(var de=se.length-1;de>=0;de--)(P=se[de])&&(ne=(H<3?P(ne):H>3?P(z,M,ne):P(z,M))||ne);return H>3&&ne&&Object.defineProperty(z,M,ne),ne},_=this&&this.__param||function(se,z){return function(M,O){z(M,O,se)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=u(2584),C=u(7116),w=u(2015),k=u(844),x=u(482),S=u(8437),m=u(8460),d=u(643),g=u(511),E=u(3734),R=u(2585),A=u(1480),L=u(6242),T=u(6351),B=u(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},V=131072;function F(se,z){if(se>24)return z.setWinLines||!1;switch(se){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var U;(function(se){se[se.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",se[se.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(a.WindowsOptionsReportType=U={}));let Y=0;class $ extends k.Disposable{getAttrData(){return this._curAttrData}constructor(z,M,O,P,H,ne,de,pe,K=new w.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=M,this._coreService=O,this._logService=P,this._optionsService=H,this._oscLinkService=ne,this._coreMouseService=de,this._unicodeService=pe,this._parser=K,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new g.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 m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((I=>this._activeBuffer=I.activeBuffer))),this._parser.setCsiHandlerFallback(((I,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(I),params:ae.toArray()})})),this._parser.setEscHandlerFallback((I=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(I)})})),this._parser.setExecuteHandlerFallback((I=>{this._logService.debug("Unknown EXECUTE code: ",{code:I})})),this._parser.setOscHandlerFallback(((I,ae,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:I,action:ae,data:Z})})),this._parser.setDcsHandlerFallback(((I,ae,Z)=>{ae==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(I),action:ae,payload:Z})})),this._parser.setPrintHandler(((I,ae,Z)=>this.print(I,ae,Z))),this._parser.registerCsiHandler({final:"@"},(I=>this.insertChars(I))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(I=>this.scrollLeft(I))),this._parser.registerCsiHandler({final:"A"},(I=>this.cursorUp(I))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(I=>this.scrollRight(I))),this._parser.registerCsiHandler({final:"B"},(I=>this.cursorDown(I))),this._parser.registerCsiHandler({final:"C"},(I=>this.cursorForward(I))),this._parser.registerCsiHandler({final:"D"},(I=>this.cursorBackward(I))),this._parser.registerCsiHandler({final:"E"},(I=>this.cursorNextLine(I))),this._parser.registerCsiHandler({final:"F"},(I=>this.cursorPrecedingLine(I))),this._parser.registerCsiHandler({final:"G"},(I=>this.cursorCharAbsolute(I))),this._parser.registerCsiHandler({final:"H"},(I=>this.cursorPosition(I))),this._parser.registerCsiHandler({final:"I"},(I=>this.cursorForwardTab(I))),this._parser.registerCsiHandler({final:"J"},(I=>this.eraseInDisplay(I,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(I=>this.eraseInDisplay(I,!0))),this._parser.registerCsiHandler({final:"K"},(I=>this.eraseInLine(I,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(I=>this.eraseInLine(I,!0))),this._parser.registerCsiHandler({final:"L"},(I=>this.insertLines(I))),this._parser.registerCsiHandler({final:"M"},(I=>this.deleteLines(I))),this._parser.registerCsiHandler({final:"P"},(I=>this.deleteChars(I))),this._parser.registerCsiHandler({final:"S"},(I=>this.scrollUp(I))),this._parser.registerCsiHandler({final:"T"},(I=>this.scrollDown(I))),this._parser.registerCsiHandler({final:"X"},(I=>this.eraseChars(I))),this._parser.registerCsiHandler({final:"Z"},(I=>this.cursorBackwardTab(I))),this._parser.registerCsiHandler({final:"`"},(I=>this.charPosAbsolute(I))),this._parser.registerCsiHandler({final:"a"},(I=>this.hPositionRelative(I))),this._parser.registerCsiHandler({final:"b"},(I=>this.repeatPrecedingCharacter(I))),this._parser.registerCsiHandler({final:"c"},(I=>this.sendDeviceAttributesPrimary(I))),this._parser.registerCsiHandler({prefix:">",final:"c"},(I=>this.sendDeviceAttributesSecondary(I))),this._parser.registerCsiHandler({final:"d"},(I=>this.linePosAbsolute(I))),this._parser.registerCsiHandler({final:"e"},(I=>this.vPositionRelative(I))),this._parser.registerCsiHandler({final:"f"},(I=>this.hVPosition(I))),this._parser.registerCsiHandler({final:"g"},(I=>this.tabClear(I))),this._parser.registerCsiHandler({final:"h"},(I=>this.setMode(I))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(I=>this.setModePrivate(I))),this._parser.registerCsiHandler({final:"l"},(I=>this.resetMode(I))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(I=>this.resetModePrivate(I))),this._parser.registerCsiHandler({final:"m"},(I=>this.charAttributes(I))),this._parser.registerCsiHandler({final:"n"},(I=>this.deviceStatus(I))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(I=>this.deviceStatusPrivate(I))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(I=>this.softReset(I))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(I=>this.setCursorStyle(I))),this._parser.registerCsiHandler({final:"r"},(I=>this.setScrollRegion(I))),this._parser.registerCsiHandler({final:"s"},(I=>this.saveCursor(I))),this._parser.registerCsiHandler({final:"t"},(I=>this.windowOptions(I))),this._parser.registerCsiHandler({final:"u"},(I=>this.restoreCursor(I))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(I=>this.insertColumns(I))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(I=>this.deleteColumns(I))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(I=>this.selectProtected(I))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(I=>this.requestMode(I,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(I=>this.requestMode(I,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new L.OscHandler((I=>(this.setTitle(I),this.setIconName(I),!0)))),this._parser.registerOscHandler(1,new L.OscHandler((I=>this.setIconName(I)))),this._parser.registerOscHandler(2,new L.OscHandler((I=>this.setTitle(I)))),this._parser.registerOscHandler(4,new L.OscHandler((I=>this.setOrReportIndexedColor(I)))),this._parser.registerOscHandler(8,new L.OscHandler((I=>this.setHyperlink(I)))),this._parser.registerOscHandler(10,new L.OscHandler((I=>this.setOrReportFgColor(I)))),this._parser.registerOscHandler(11,new L.OscHandler((I=>this.setOrReportBgColor(I)))),this._parser.registerOscHandler(12,new L.OscHandler((I=>this.setOrReportCursorColor(I)))),this._parser.registerOscHandler(104,new L.OscHandler((I=>this.restoreIndexedColor(I)))),this._parser.registerOscHandler(110,new L.OscHandler((I=>this.restoreFgColor(I)))),this._parser.registerOscHandler(111,new L.OscHandler((I=>this.restoreBgColor(I)))),this._parser.registerOscHandler(112,new L.OscHandler((I=>this.restoreCursorColor(I)))),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 I in C.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:I},(()=>this.selectCharset("("+I))),this._parser.registerEscHandler({intermediates:")",final:I},(()=>this.selectCharset(")"+I))),this._parser.registerEscHandler({intermediates:"*",final:I},(()=>this.selectCharset("*"+I))),this._parser.registerEscHandler({intermediates:"+",final:I},(()=>this.selectCharset("+"+I))),this._parser.registerEscHandler({intermediates:"-",final:I},(()=>this.selectCharset("-"+I))),this._parser.registerEscHandler({intermediates:".",final:I},(()=>this.selectCharset("."+I))),this._parser.registerEscHandler({intermediates:"/",final:I},(()=>this.selectCharset("/"+I)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((I=>(this._logService.error("Parsing error: ",I),I))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((I,ae)=>this.requestStatusString(I,ae))))}_preserveStack(z,M,O,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=O,this._parseStack.position=P}_logSlowResolvingAsync(z){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([z,new Promise(((M,O)=>setTimeout((()=>O("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(z,M){let O,P=this._activeBuffer.x,H=this._activeBuffer.y,ne=0;const de=this._parseStack.paused;if(de){if(O=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(O),O;P=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>V&&(ne=this._parseStack.position+V)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,(I=>String.fromCharCode(I))).join("")}"`),typeof z=="string"?z.split("").map((I=>I.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<V&&(this._parseBuffer=new Uint32Array(Math.min(z.length,V))),de||this._dirtyRowTracker.clearRange(),z.length>V)for(let I=ne;I<z.length;I+=V){const ae=I+V<z.length?I+V:z.length,Z=typeof z=="string"?this._stringDecoder.decode(z.substring(I,ae),this._parseBuffer):this._utf8Decoder.decode(z.subarray(I,ae),this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,Z))return this._preserveStack(P,H,Z,I),this._logSlowResolvingAsync(O),O}else if(!de){const I=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,I))return this._preserveStack(P,H,I,0),this._logSlowResolvingAsync(O),O}this._activeBuffer.x===P&&this._activeBuffer.y===H||this._onCursorMove.fire();const pe=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),K=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);K<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(K,this._bufferService.rows-1),Math.min(pe,this._bufferService.rows-1))}print(z,M,O){let P,H;const ne=this._charsetService.charset,de=this._optionsService.rawOptions.screenReaderMode,pe=this._bufferService.cols,K=this._coreService.decPrivateModes.wraparound,I=this._coreService.modes.insertMode,ae=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&O-M>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let ee=this._parser.precedingJoinState;for(let oe=M;oe<O;++oe){if(P=z[oe],P<127&&ne){const at=ne[String.fromCharCode(P)];at&&(P=at.charCodeAt(0))}const Se=this._unicodeService.charProperties(P,ee);H=A.UnicodeService.extractWidth(Se);const xe=A.UnicodeService.extractShouldJoin(Se),Ye=xe?A.UnicodeService.extractWidth(ee):0;if(ee=Se,de&&this._onA11yChar.fire((0,x.stringFromCodePoint)(P)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+H-Ye>pe){if(K){const at=Z;let ke=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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&Z instanceof S.BufferLine&&Z.copyCellsFrom(at,ke,0,Ye,!1);ke<pe;)at.setCellFromCodepoint(ke++,0,1,ae)}else if(this._activeBuffer.x=pe-1,H===2)continue}if(xe&&this._activeBuffer.x){const at=Z.getWidth(this._activeBuffer.x-1)?1:2;Z.addCodepointToCell(this._activeBuffer.x-at,P,H);for(let ke=H-Ye;--ke>=0;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(I&&(Z.insertCells(this._activeBuffer.x,H-Ye,this._activeBuffer.getNullCell(ae)),Z.getWidth(pe-1)===2&&Z.setCellFromCodepoint(pe-1,d.NULL_CELL_CODE,d.NULL_CELL_WIDTH,ae)),Z.setCellFromCodepoint(this._activeBuffer.x++,P,H,ae),H>0)for(;--H;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=ee,this._activeBuffer.x<pe&&O-M>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,M){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,M):this._parser.registerCsiHandler(z,(O=>!F(O.params[0],this._optionsService.rawOptions.windowOptions)||M(O)))}registerDcsHandler(z,M){return this._parser.registerDcsHandler(z,new T.DcsHandler(M))}registerEscHandler(z,M){return this._parser.registerEscHandler(z,M)}registerOscHandler(z,M){return this._parser.registerOscHandler(z,new L.OscHandler(M))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var z;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(z,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=z,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+M)}cursorUp(z){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const M=z.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=z.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=z.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const M=z.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,M,O,P=!1,H=!1){const ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);ne.replaceCells(M,O,this._activeBuffer.getNullCell(this._eraseAttrData()),H),P&&(ne.isWrapped=!1)}_resetBufferLine(z,M=!1){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);O&&(O.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),O.isWrapped=!1)}eraseInDisplay(z,M=!1){let O;switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);O<this._bufferService.rows;O++)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(O);break;case 1:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(O+1).isWrapped=!1);O--;)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(O=this._bufferService.rows,this._dirtyRowTracker.markDirty(O-1);O--;)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine(z,M=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(z){this._restrictCursor();let M=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y,P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-P+1;for(;M--;)this._activeBuffer.lines.splice(H-1,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(z){this._restrictCursor();let M=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y;let P;for(P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-P;M--;)this._activeBuffer.lines.splice(O,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let M=z.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(z){let M=z.params[0]||1;for(;M--;)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(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);P.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);P.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);P.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);P.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const M=this._parser.precedingJoinState;if(!M)return!0;const O=z.params[0]||1,P=A.UnicodeService.extractWidth(M),H=this._activeBuffer.x-P,ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(H),de=new Uint32Array(ne.length*O);let pe=0;for(let I=0;I<ne.length;){const ae=ne.codePointAt(I)||0;de[pe++]=ae,I+=ae>65535?2:1}let K=pe;for(let I=1;I<O;++I)de.copyWithin(K,0,pe),K+=pe;return this.print(de,0,K),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),this._charsetService.setgCharset(1,C.DEFAULT_CHARSET),this._charsetService.setgCharset(2,C.DEFAULT_CHARSET),this._charsetService.setgCharset(3,C.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),z.params[M]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(z,M){const O=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:H}=this._coreMouseService,ne=this._coreService,{buffers:de,cols:pe}=this._bufferService,{active:K,alt:I}=de,ae=this._optionsService.rawOptions,Z=xe=>xe?1:2,ee=z.params[0];return oe=ee,Se=M?ee===2?4:ee===4?Z(ne.modes.insertMode):ee===12?3:ee===20?Z(ae.convertEol):0:ee===1?Z(O.applicationCursorKeys):ee===3?ae.windowOptions.setWinLines?pe===80?2:pe===132?1:0:0:ee===6?Z(O.origin):ee===7?Z(O.wraparound):ee===8?3:ee===9?Z(P==="X10"):ee===12?Z(ae.cursorBlink):ee===25?Z(!ne.isCursorHidden):ee===45?Z(O.reverseWraparound):ee===66?Z(O.applicationKeypad):ee===67?4:ee===1e3?Z(P==="VT200"):ee===1002?Z(P==="DRAG"):ee===1003?Z(P==="ANY"):ee===1004?Z(O.sendFocus):ee===1005?4:ee===1006?Z(H==="SGR"):ee===1015?4:ee===1016?Z(H==="SGR_PIXELS"):ee===1048?1:ee===47||ee===1047||ee===1049?Z(K===I):ee===2004?Z(O.bracketedPasteMode):0,ne.triggerDataEvent(`${c.C0.ESC}[${M?"":"?"}${oe};${Se}$y`),!0;var oe,Se}_updateAttrColor(z,M,O,P,H){return M===2?(z|=50331648,z&=-16777216,z|=E.AttributeData.fromColorRGB([O,P,H])):M===5&&(z&=-50331904,z|=33554432|255&O),z}_extractColor(z,M,O){const P=[0,0,-1,0,0,0];let H=0,ne=0;do{if(P[ne+H]=z.params[M+ne],z.hasSubParams(M+ne)){const de=z.getSubParams(M+ne);let pe=0;do P[1]===5&&(H=1),P[ne+pe+1+H]=de[pe];while(++pe<de.length&&pe+ne+1+H<P.length);break}if(P[1]===5&&ne+H>=2||P[1]===2&&ne+H>=5)break;P[1]&&(H=1)}while(++ne+M<z.length&&ne+H<P.length);for(let de=2;de<P.length;++de)P[de]===-1&&(P[de]=0);switch(P[0]){case 38:O.fg=this._updateAttrColor(O.fg,P[1],P[3],P[4],P[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,P[1],P[3],P[4],P[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,P[1],P[3],P[4],P[5])}return ne}_processUnderline(z,M){M.extended=M.extended.clone(),(!~z||z>5)&&(z=1),M.extended.underlineStyle=z,M.fg|=268435456,z===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(z){z.fg=S.DEFAULT_ATTR_DATA.fg,z.bg=S.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=z.length;let O;const P=this._curAttrData;for(let H=0;H<M;H++)O=z.params[H],O>=30&&O<=37?(P.fg&=-50331904,P.fg|=16777216|O-30):O>=40&&O<=47?(P.bg&=-50331904,P.bg|=16777216|O-40):O>=90&&O<=97?(P.fg&=-50331904,P.fg|=16777224|O-90):O>=100&&O<=107?(P.bg&=-50331904,P.bg|=16777224|O-100):O===0?this._processSGR0(P):O===1?P.fg|=134217728:O===3?P.bg|=67108864:O===4?(P.fg|=268435456,this._processUnderline(z.hasSubParams(H)?z.getSubParams(H)[0]:1,P)):O===5?P.fg|=536870912:O===7?P.fg|=67108864:O===8?P.fg|=1073741824:O===9?P.fg|=2147483648:O===2?P.bg|=134217728:O===21?this._processUnderline(2,P):O===22?(P.fg&=-134217729,P.bg&=-134217729):O===23?P.bg&=-67108865:O===24?(P.fg&=-268435457,this._processUnderline(0,P)):O===25?P.fg&=-536870913:O===27?P.fg&=-67108865:O===28?P.fg&=-1073741825:O===29?P.fg&=2147483647:O===39?(P.fg&=-67108864,P.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):O===49?(P.bg&=-67108864,P.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):O===38||O===48||O===58?H+=this._extractColor(z,H,P):O===53?P.bg|=1073741824:O===55?P.bg&=-1073741825:O===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):O===100?(P.fg&=-67108864,P.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",O);return!0}deviceStatus(z){switch(z.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${M};${O}R`)}return!0}deviceStatusPrivate(z){if(z.params[0]===6){const M=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${M};${O}R`)}return!0}softReset(z){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=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(z){const M=z.params[0]||1;switch(M){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 O=M%2==1;return this._optionsService.options.cursorBlink=O,!0}setScrollRegion(z){const M=z.params[0]||1;let O;return(z.length<2||(O=z.params[1])>this._bufferService.rows||O===0)&&(O=this._bufferService.rows),O>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=O-1,this._setCursor(0,0)),!0}windowOptions(z){if(!F(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(z){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(z){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const M=[],O=z.split(";");for(;O.length>1;){const P=O.shift(),H=O.shift();if(/^\d+$/.exec(P)){const ne=parseInt(P);if(X(ne))if(H==="?")M.push({type:0,index:ne});else{const de=(0,B.parseColor)(H);de&&M.push({type:1,index:ne,color:de})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(z){const M=z.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(z,M){this._getCurrentLinkId()&&this._finishHyperlink();const O=z.split(":");let P;const H=O.findIndex((ne=>ne.startsWith("id=")));return H!==-1&&(P=O[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(z,M){const O=z.split(";");for(let P=0;P<O.length&&!(M>=this._specialColors.length);++P,++M)if(O[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const H=(0,B.parseColor)(O[P]);H&&this._onColor.fire([{type:1,index:this._specialColors[M],color:H}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const M=[],O=z.split(";");for(let P=0;P<O.length;++P)if(/^\d+$/.exec(O[P])){const H=parseInt(O[P]);X(H)&&M.push({type:2,index:H})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(N[z[0]],C.CHARSETS[z[1]]||C.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=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(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new g.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const O=this._activeBuffer.ybase+this._activeBuffer.y+M,P=this._activeBuffer.lines.get(O);P&&(P.fill(z),P.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,M){const O=this._bufferService.buffer,P=this._optionsService.rawOptions;return(H=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${H}${c.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${O.scrollTop+1};${O.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,M){this._dirtyRowTracker.markRangeDirty(z,M)}}a.InputHandler=$;let G=class{constructor(se){this._bufferService=se,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(se){se<this.start?this.start=se:se>this.end&&(this.end=se)}markRangeDirty(se,z){se>z&&(Y=se,se=z,z=Y),se<this.start&&(this.start=se),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(se){return 0<=se&&se<256}G=h([_(0,R.IBufferService)],G)},844:(p,a)=>{function u(h){for(const _ of h)_.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 _=this._disposables.indexOf(h);_!==-1&&this._disposables.splice(_,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var _;this._isDisposed||h===this._value||((_=this._value)==null||_.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=u,a.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,c,C){this._data[_]||(this._data[_]={}),this._data[_][c]=C}get(_,c){return this._data[_]?this._data[_][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(h,_,c,C,w){this._data.get(h,_)||this._data.set(h,_,new u),this._data.get(h,_).set(c,C,w)}get(h,_,c,C){var w;return(w=this._data.get(h,_))==null?void 0:w.get(c,C)}clear(){this._data.clear()}}},6114:(p,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 u=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[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(u)},6106:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(u=this._search(this._getKey(h)),this._array.splice(u,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const _=this._getKey(h);if(_===void 0||(u=this._search(_),u===-1)||this._getKey(this._array[u])!==_)return!1;do if(this._array[u]===h)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===_);return!1}*getKeyIterator(h){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===h)}forEachByKey(h,_){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do _(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let _=0,c=this._array.length-1;for(;c>=_;){let C=_+c>>1;const w=this._getKey(this._array[C]);if(w>h)c=C-1;else{if(!(w<h)){for(;C>0&&this._getKey(this._array[C-1])===h;)C--;return C}_=C+1}}return _}}},7226:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=u(6114);class _{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(),m=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),m=w.timeRemaining(),1.5*x>m)return S-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-k))}ms`),void this._start();S=m}this.clear()}}class c extends _{_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=c,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(C){return requestIdleCallback(C)}_cancelCallback(C){cancelIdleCallback(C)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(C){this._queue.clear(),this._queue.enqueue(C)}flush(){this._queue.flush()}}},9282:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=u(643);a.updateWindowsModeWrappedState=function(_){const c=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),C=c==null?void 0:c.get(_.cols-1),w=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);w&&C&&(w.isWrapped=C[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&C[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new u;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,C=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=C}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=u(6349),_=u(7226),c=u(3734),C=u(8437),w=u(4634),k=u(511),x=u(643),S=u(4863),m=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(d,g,E){this._hasScrollback=d,this._optionsService=g,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=C.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.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 _.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(d){return d?(this._nullCell.fg=d.fg,this._nullCell.bg=d.bg,this._nullCell.extended=d.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(d){return d?(this._whitespaceCell.fg=d.fg,this._whitespaceCell.bg=d.bg,this._whitespaceCell.extended=d.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(d,g){return new C.BufferLine(this._bufferService.cols,this.getNullCell(d),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const d=this.ybase+this.y-this.ydisp;return d>=0&&d<this._rows}_getCorrectBufferLength(d){if(!this._hasScrollback)return d;const g=d+this._optionsService.rawOptions.scrollback;return g>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:g}fillViewportRows(d){if(this.lines.length===0){d===void 0&&(d=C.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(d))}}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(d,g){const E=this.getNullCell(C.DEFAULT_ATTR_DATA);let R=0;const A=this._getCorrectBufferLength(g);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<d)for(let T=0;T<this.lines.length;T++)R+=+this.lines.get(T).resize(d,E);let L=0;if(this._rows<g)for(let T=this._rows;T<g;T++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new C.BufferLine(d,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+L+1?(this.ybase--,L++,this.ydisp>0&&this.ydisp--):this.lines.push(new C.BufferLine(d,E)));else for(let T=this._rows;T>g;T--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const T=this.lines.length-A;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=A}this.x=Math.min(this.x,d-1),this.y=Math.min(this.y,g-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,d-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(d,g),this._cols>d))for(let L=0;L<this.lines.length;L++)R+=+this.lines.get(L).resize(d,E);this._cols=d,this._rows=g,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let d=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,d=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return d}get _isReflowEnabled(){const d=this._optionsService.rawOptions.windowsPty;return d&&d.buildNumber?this._hasScrollback&&d.backend==="conpty"&&d.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(d,g){this._cols!==d&&(d>this._cols?this._reflowLarger(d,g):this._reflowSmaller(d,g))}_reflowLarger(d,g){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,d,this.ybase+this.y,this.getNullCell(C.DEFAULT_ATTR_DATA));if(E.length>0){const R=(0,w.reflowLargerCreateNewLayout)(this.lines,E);(0,w.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(d,g,R.countRemoved)}}_reflowLargerAdjustViewport(d,g,E){const R=this.getNullCell(C.DEFAULT_ATTR_DATA);let A=E;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new C.BufferLine(d,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(d,g){const E=this.getNullCell(C.DEFAULT_ATTR_DATA),R=[];let A=0;for(let L=this.lines.length-1;L>=0;L--){let T=this.lines.get(L);if(!T||!T.isWrapped&&T.getTrimmedLength()<=d)continue;const B=[T];for(;T.isWrapped&&L>0;)T=this.lines.get(--L),B.unshift(T);const N=this.ybase+this.y;if(N>=L&&N<L+B.length)continue;const V=B[B.length-1].getTrimmedLength(),F=(0,w.reflowSmallerGetNewLineLengths)(B,this._cols,d),U=F.length-B.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+U):Math.max(0,this.lines.length-this.lines.maxLength+U);const $=[];for(let O=0;O<U;O++){const P=this.getBlankLine(C.DEFAULT_ATTR_DATA,!0);$.push(P)}$.length>0&&(R.push({start:L+B.length+A,newLines:$}),A+=$.length),B.push(...$);let G=F.length-1,X=F[G];X===0&&(G--,X=F[G]);let se=B.length-U-1,z=V;for(;se>=0;){const O=Math.min(z,X);if(B[G]===void 0)break;if(B[G].copyCellsFrom(B[se],z-O,X-O,O,!0),X-=O,X===0&&(G--,X=F[G]),z-=O,z===0){se--;const P=Math.max(se,0);z=(0,w.getWrappedLineTrimmedLength)(B,P,this._cols)}}for(let O=0;O<B.length;O++)F[O]<d&&B[O].setCell(F[O],E);let M=U-Y;for(;M-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+U,this.ybase+g-1)}if(R.length>0){const L=[],T=[];for(let G=0;G<this.lines.length;G++)T.push(this.lines.get(G));const B=this.lines.length;let N=B-1,V=0,F=R[V];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let U=0;for(let G=Math.min(this.lines.maxLength-1,B+A-1);G>=0;G--)if(F&&F.start>N+U){for(let X=F.newLines.length-1;X>=0;X--)this.lines.set(G--,F.newLines[X]);G++,L.push({index:N+1,amount:F.newLines.length}),U+=F.newLines.length,F=R[++V]}else this.lines.set(G,T[N--]);let Y=0;for(let G=L.length-1;G>=0;G--)L[G].index+=Y,this.lines.onInsertEmitter.fire(L[G]),Y+=L[G].amount;const $=Math.max(0,B+A-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}translateBufferLineToString(d,g,E=0,R){const A=this.lines.get(d);return A?A.translateToString(g,E,R):""}getWrappedRangeForLine(d){let g=d,E=d;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:g,last:E}}setupTabStops(d){for(d!=null?this.tabs[d]||(d=this.prevStop(d)):(this.tabs={},d=0);d<this._cols;d+=this._optionsService.rawOptions.tabStopWidth)this.tabs[d]=!0}prevStop(d){for(d==null&&(d=this.x);!this.tabs[--d]&&d>0;);return d>=this._cols?this._cols-1:d<0?0:d}nextStop(d){for(d==null&&(d=this.x);!this.tabs[++d]&&d<this._cols;);return d>=this._cols?this._cols-1:d<0?0:d}clearMarkers(d){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===d&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let d=0;d<this.markers.length;d++)this.markers[d].dispose(),this.markers.splice(d--,1);this._isClearing=!1}addMarker(d){const g=new S.Marker(d);return this.markers.push(g),g.register(this.lines.onTrim((E=>{g.line-=E,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((E=>{g.line>=E.index&&(g.line+=E.amount)}))),g.register(this.lines.onDelete((E=>{g.line>=E.index&&g.line<E.index+E.amount&&g.dispose(),g.line>E.index&&(g.line-=E.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(d){this._isClearing||this.markers.splice(this.markers.indexOf(d),1)}}},8437:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=u(3734),_=u(511),c=u(643),C=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(S,m,d=!1){this.isWrapped=d,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const g=m||_.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let E=0;E<S;++E)this.setCell(E,g);this.length=S}get(S){const m=this._data[3*S+0],d=2097151&m;return[this._data[3*S+1],2097152&m?this._combined[S]:d?(0,C.stringFromCodePoint)(d):"",m>>22,2097152&m?this._combined[S].charCodeAt(this._combined[S].length-1):d]}set(S,m){this._data[3*S+1]=m[c.CHAR_DATA_ATTR_INDEX],m[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=m[1],this._data[3*S+0]=2097152|S|m[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=m[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[c.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 m=this._data[3*S+0];return 2097152&m?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&m}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const m=this._data[3*S+0];return 2097152&m?this._combined[S]:2097151&m?(0,C.stringFromCodePoint)(2097151&m):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,m){return w=3*S,m.content=this._data[w+0],m.fg=this._data[w+1],m.bg=this._data[w+2],2097152&m.content&&(m.combinedData=this._combined[S]),268435456&m.bg&&(m.extended=this._extendedAttrs[S]),m}setCell(S,m){2097152&m.content&&(this._combined[S]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[S]=m.extended),this._data[3*S+0]=m.content,this._data[3*S+1]=m.fg,this._data[3*S+2]=m.bg}setCellFromCodepoint(S,m,d,g){268435456&g.bg&&(this._extendedAttrs[S]=g.extended),this._data[3*S+0]=m|d<<22,this._data[3*S+1]=g.fg,this._data[3*S+2]=g.bg}addCodepointToCell(S,m,d){let g=this._data[3*S+0];2097152&g?this._combined[S]+=(0,C.stringFromCodePoint)(m):2097151&g?(this._combined[S]=(0,C.stringFromCodePoint)(2097151&g)+(0,C.stringFromCodePoint)(m),g&=-2097152,g|=2097152):g=m|4194304,d&&(g&=-12582913,g|=d<<22),this._data[3*S+0]=g}insertCells(S,m,d){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,d),m<this.length-S){const g=new _.CellData;for(let E=this.length-S-m-1;E>=0;--E)this.setCell(S+m+E,this.loadCell(S+E,g));for(let E=0;E<m;++E)this.setCell(S+E,d)}else for(let g=S;g<this.length;++g)this.setCell(g,d);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,d)}deleteCells(S,m,d){if(S%=this.length,m<this.length-S){const g=new _.CellData;for(let E=0;E<this.length-S-m;++E)this.setCell(S+E,this.loadCell(S+m+E,g));for(let E=this.length-m;E<this.length;++E)this.setCell(E,d)}else for(let g=S;g<this.length;++g)this.setCell(g,d);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,d),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,d)}replaceCells(S,m,d,g=!1){if(g)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,d),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodepoint(m,0,1,d);S<m&&S<this.length;)this.isProtected(S)||this.setCell(S,d),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,d),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m,0,1,d);S<m&&S<this.length;)this.setCell(S++,d)}resize(S,m){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const d=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*d)this._data=new Uint32Array(this._data.buffer,0,d);else{const g=new Uint32Array(d);g.set(this._data),this._data=g}for(let g=this.length;g<S;++g)this.setCell(g,m)}else{this._data=this._data.subarray(0,d);const g=Object.keys(this._combined);for(let R=0;R<g.length;R++){const A=parseInt(g[R],10);A>=S&&delete this._combined[A]}const E=Object.keys(this._extendedAttrs);for(let R=0;R<E.length;R++){const A=parseInt(E[R],10);A>=S&&delete this._extendedAttrs[A]}}return this.length=S,4*d*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,m=!1){if(m)for(let d=0;d<this.length;++d)this.isProtected(d)||this.setCell(d,S);else{this._combined={},this._extendedAttrs={};for(let d=0;d<this.length;++d)this.setCell(d,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 m in S._combined)this._combined[m]=S._combined[m];this._extendedAttrs={};for(const m in S._extendedAttrs)this._extendedAttrs[m]=S._extendedAttrs[m];this.isWrapped=S.isWrapped}clone(){const S=new k(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const m in this._combined)S._combined[m]=this._combined[m];for(const m in this._extendedAttrs)S._extendedAttrs[m]=this._extendedAttrs[m];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,m,d,g,E){const R=S._data;if(E)for(let L=g-1;L>=0;L--){for(let T=0;T<3;T++)this._data[3*(d+L)+T]=R[3*(m+L)+T];268435456&R[3*(m+L)+2]&&(this._extendedAttrs[d+L]=S._extendedAttrs[m+L])}else for(let L=0;L<g;L++){for(let T=0;T<3;T++)this._data[3*(d+L)+T]=R[3*(m+L)+T];268435456&R[3*(m+L)+2]&&(this._extendedAttrs[d+L]=S._extendedAttrs[m+L])}const A=Object.keys(S._combined);for(let L=0;L<A.length;L++){const T=parseInt(A[L],10);T>=m&&(this._combined[T-m+d]=S._combined[T])}}translateToString(S,m,d,g){m=m??0,d=d??this.length,S&&(d=Math.min(d,this.getTrimmedLength())),g&&(g.length=0);let E="";for(;m<d;){const R=this._data[3*m+0],A=2097151&R,L=2097152&R?this._combined[m]:A?(0,C.stringFromCodePoint)(A):c.WHITESPACE_CELL_CHAR;if(E+=L,g)for(let T=0;T<L.length;++T)g.push(m);m+=R>>22||1}return g&&g.push(m),E}}a.BufferLine=k},4841:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,h){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return h*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(p,a)=>{function u(h,_,c){if(_===h.length-1)return h[_].getTrimmedLength();const C=!h[_].hasContent(c-1)&&h[_].getWidth(c-1)===1,w=h[_+1].getWidth(0)===2;return C&&w?c-1:c}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,_,c,C,w){const k=[];for(let x=0;x<h.length-1;x++){let S=x,m=h.get(++S);if(!m.isWrapped)continue;const d=[h.get(x)];for(;S<h.length&&m.isWrapped;)d.push(m),m=h.get(++S);if(C>=x&&C<S){x+=d.length-1;continue}let g=0,E=u(d,g,_),R=1,A=0;for(;R<d.length;){const T=u(d,R,_),B=T-A,N=c-E,V=Math.min(B,N);d[g].copyCellsFrom(d[R],A,E,V,!1),E+=V,E===c&&(g++,E=0),A+=V,A===T&&(R++,A=0),E===0&&g!==0&&d[g-1].getWidth(c-1)===2&&(d[g].copyCellsFrom(d[g-1],c-1,E++,1,!1),d[g-1].setCell(c-1,w))}d[g].replaceCells(E,c,w);let L=0;for(let T=d.length-1;T>0&&(T>g||d[T].getTrimmedLength()===0);T--)L++;L>0&&(k.push(x+d.length-L),k.push(L)),x+=d.length-1}return k},a.reflowLargerCreateNewLayout=function(h,_){const c=[];let C=0,w=_[C],k=0;for(let x=0;x<h.length;x++)if(w===x){const S=_[++C];h.onDeleteEmitter.fire({index:x-k,amount:S}),x+=S-1,k+=S,w=_[++C]}else c.push(x);return{layout:c,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,_){const c=[];for(let C=0;C<_.length;C++)c.push(h.get(_[C]));for(let C=0;C<c.length;C++)h.set(C,c[C]);h.length=_.length},a.reflowSmallerGetNewLineLengths=function(h,_,c){const C=[],w=h.map(((m,d)=>u(h,d,_))).reduce(((m,d)=>m+d));let k=0,x=0,S=0;for(;S<w;){if(w-S<c){C.push(w-S);break}k+=c;const m=u(h,x,_);k>m&&(k-=m,x++);const d=h[x].getWidth(k-1)===2;d&&k--;const g=d?c-1:c;C.push(g),S+=g}return C},a.getWrappedLineTrimmedLength=u},5295:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=u(8460),_=u(844),c=u(9092);class C extends _.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 c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(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=C},511:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),_=u(643),c=u(3734);class C extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new C;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[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[_.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[_.CHAR_DATA_CHAR_INDEX].length===2){const S=k[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const m=k[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(S-55296)+m-56320+65536|k[_.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[_.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=C},643:(p,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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=u(8460),_=u(844);class c{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=c._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,_.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=c,c._nextId=1},7116:(p,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:(p,a)=>{var u,h,_;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
57
- `,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL=""})(u||(a.C0=u={})),(function(c){c.PAD="€",c.HOP="",c.BPH="‚",c.NBH="ƒ",c.IND="„",c.NEL="…",c.SSA="†",c.ESA="‡",c.HTS="ˆ",c.HTJ="‰",c.VTS="Š",c.PLD="‹",c.PLU="Œ",c.RI="",c.SS2="Ž",c.SS3="",c.DCS="",c.PU1="‘",c.PU2="’",c.STS="“",c.CCH="”",c.MW="•",c.SPA="–",c.EPA="—",c.SOS="˜",c.SGCI="™",c.SCI="š",c.CSI="›",c.ST="œ",c.OSC="",c.PM="ž",c.APC="Ÿ"})(h||(a.C1=h={})),(function(c){c.ST=`${u.ESC}\\`})(_||(a.C1_ESCAPED=_={}))},7399:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=u(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(c,C,w,k){const x={type:0,cancel:!1,key:void 0},S=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?x.key=C?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=C?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=C?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=C?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=c.ctrlKey?"\b":h.C0.DEL,c.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(c.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=c.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,c.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(c.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=C?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(c.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=C?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(c.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=C?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(c.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=C?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:c.shiftKey||c.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":C?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=S?h.C0.ESC+"[1;"+(S+1)+"F":C?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:c.shiftKey?x.type=2:c.ctrlKey?x.key=h.C0.ESC+"[5;"+(S+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:c.shiftKey?x.type=3:c.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(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(w&&!k||!c.altKey||c.metaKey)!w||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?x.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(x.key=h.C0.US),c.key==="@"&&(x.key=h.C0.NUL)):c.keyCode===65&&(x.type=1);else{const m=_[c.keyCode],d=m==null?void 0:m[c.shiftKey?1:0];if(d)x.key=h.C0.ESC+d;else if(c.keyCode>=65&&c.keyCode<=90){const g=c.ctrlKey?c.keyCode-64:c.keyCode+32;let E=String.fromCharCode(g);c.shiftKey&&(E=E.toUpperCase()),x.key=h.C0.ESC+E}else if(c.keyCode===32)x.key=h.C0.ESC+(c.ctrlKey?h.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let g=c.code.slice(3,4);c.shiftKey||(g=g.toLowerCase()),x.key=h.C0.ESC+g,x.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?x.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?x.key=h.C0.NUL:c.keyCode>=51&&c.keyCode<=55?x.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?x.key=h.C0.DEL:c.keyCode===219?x.key=h.C0.ESC:c.keyCode===220?x.key=h.C0.FS:c.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,h=0,_=u.length){let c="";for(let C=h;C<_;++C){let w=u[C];w>65535?(w-=65536,c+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):c+=String.fromCharCode(w)}return c},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,h){const _=u.length;if(!_)return 0;let c=0,C=0;if(this._interim){const w=u.charCodeAt(C++);56320<=w&&w<=57343?h[c++]=1024*(this._interim-55296)+w-56320+65536:(h[c++]=this._interim,h[c++]=w),this._interim=0}for(let w=C;w<_;++w){const k=u.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=_)return this._interim=k,c;const x=u.charCodeAt(w);56320<=x&&x<=57343?h[c++]=1024*(k-55296)+x-56320+65536:(h[c++]=k,h[c++]=x)}else k!==65279&&(h[c++]=k)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const _=u.length;if(!_)return 0;let c,C,w,k,x=0,S=0,m=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let A,L=0;for(;(A=63&this.interim[++L])&&L<4;)R<<=6,R|=A;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,B=T-L;for(;m<B;){if(m>=_)return 0;if(A=u[m++],(192&A)!=128){m--,E=!0;break}this.interim[L++]=A,R<<=6,R|=63&A}E||(T===2?R<128?m--:h[x++]=R:T===3?R<2048||R>=55296&&R<=57343||R===65279||(h[x++]=R):R<65536||R>1114111||(h[x++]=R)),this.interim.fill(0)}const d=_-4;let g=m;for(;g<_;){for(;!(!(g<d)||128&(c=u[g])||128&(C=u[g+1])||128&(w=u[g+2])||128&(k=u[g+3]));)h[x++]=c,h[x++]=C,h[x++]=w,h[x++]=k,g+=4;if(c=u[g++],c<128)h[x++]=c;else if((224&c)==192){if(g>=_)return this.interim[0]=c,x;if(C=u[g++],(192&C)!=128){g--;continue}if(S=(31&c)<<6|63&C,S<128){g--;continue}h[x++]=S}else if((240&c)==224){if(g>=_)return this.interim[0]=c,x;if(C=u[g++],(192&C)!=128){g--;continue}if(g>=_)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[g++],(192&w)!=128){g--;continue}if(S=(15&c)<<12|(63&C)<<6|63&w,S<2048||S>=55296&&S<=57343||S===65279)continue;h[x++]=S}else if((248&c)==240){if(g>=_)return this.interim[0]=c,x;if(C=u[g++],(192&C)!=128){g--;continue}if(g>=_)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[g++],(192&w)!=128){g--;continue}if(g>=_)return this.interim[0]=c,this.interim[1]=C,this.interim[2]=w,x;if(k=u[g++],(192&k)!=128){g--;continue}if(S=(7&c)<<18|(63&C)<<12|(63&w)<<6|63&k,S<65536||S>1114111)continue;h[x++]=S}}return x}}},225:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=u(1480),_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let C;a.UnicodeV6=class{constructor(){if(this.version="6",!C){C=new Uint8Array(65536),C.fill(1),C[0]=0,C.fill(0,1,32),C.fill(0,127,160),C.fill(2,4352,4448),C[9001]=2,C[9002]=2,C.fill(2,11904,42192),C[12351]=1,C.fill(2,44032,55204),C.fill(2,63744,64256),C.fill(2,65040,65050),C.fill(2,65072,65136),C.fill(2,65280,65377),C.fill(2,65504,65511);for(let w=0;w<_.length;++w)C.fill(0,_[w][0],_[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?C[w]:(function(k,x){let S,m=0,d=x.length-1;if(k<x[0][0]||k>x[d][1])return!1;for(;d>=m;)if(S=m+d>>1,k>x[S][1])m=S+1;else{if(!(k<x[S][0]))return!0;d=S-1}return!1})(w,c)?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 m=h.UnicodeService.extractWidth(k);m===0?S=!1:m>x&&(x=m)}return h.UnicodeService.createPropertyValue(0,x,S)}}},5981:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=u(8460),_=u(844);class c extends _.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],m=this._action(S,k);if(m){const g=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void m.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(g)}const d=this._callbacks[this._bufferOffset];if(d&&d(),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=c},5941:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function _(c,C){const w=c.toString(16),k=w.length<2?"0"+w:w;switch(C){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}a.parseColor=function(c){if(!c)return;let C=c.toLowerCase();if(C.indexOf("rgb:")===0){C=C.slice(4);const w=u.exec(C);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(C.indexOf("#")===0&&(C=C.slice(1),h.exec(C)&&[3,6,9,12].includes(C.length))){const w=C.length/3,k=[0,0,0];for(let x=0;x<3;++x){const S=parseInt(C.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(c,C=16){const[w,k,x]=c;return`rgb:${_(w,C)}/${_(k,C)}/${_(x,C)}`}},5770:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=u(482),_=u(8742),c=u(5770),C=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=C,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=C}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const S=this._handlers[k];return S.push(x),{dispose:()=>{const m=S.indexOf(x);m!==-1&&S.splice(m,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=C,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||C,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 m=this._active.length-1;m>=0;m--)this._active[m].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,m=this._active.length-1,d=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,S=x,d=this._stack.fallThrough,this._stack.paused=!1),!d&&S===!1){for(;m>=0&&(S=this._active[m].unhook(k),S!==!0);m--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,S;m--}for(;m>=0;m--)if(S=this._active[m].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",k);this._active=C,this._ident=0}};const w=new _.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>c.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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=u(844),_=u(8742),c=u(6242),C=u(6351);class w{constructor(m){this.table=new Uint8Array(m)}setDefault(m,d){this.table.fill(m<<4|d)}add(m,d,g,E){this.table[d<<8|m]=g<<4|E}addMany(m,d,g,E){for(let R=0;R<m.length;R++)this.table[d<<8|m[R]]=g<<4|E}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),m=Array.apply(null,Array(256)).map(((L,T)=>T)),d=(L,T)=>m.slice(L,T),g=d(32,127),E=d(0,24);E.push(25),E.push.apply(E,d(28,32));const R=d(0,14);let A;for(A in S.setDefault(1,0),S.addMany(g,0,2,0),R)S.addMany([24,26,153,154],A,3,0),S.addMany(d(128,144),A,3,0),S.addMany(d(144,152),A,3,0),S.add(156,A,0,0),S.add(27,A,11,1),S.add(157,A,4,8),S.addMany([152,158,159],A,0,7),S.add(155,A,11,3),S.add(144,A,11,9);return S.addMany(E,0,3,0),S.addMany(E,1,3,1),S.add(127,1,0,1),S.addMany(E,8,0,8),S.addMany(E,3,3,3),S.add(127,3,0,3),S.addMany(E,4,3,4),S.add(127,4,0,4),S.addMany(E,6,3,6),S.addMany(E,5,3,5),S.add(127,5,0,5),S.addMany(E,2,3,2),S.add(127,2,0,2),S.add(93,1,4,8),S.addMany(g,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(d(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(g,7,0,7),S.addMany(E,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(d(64,127),3,7,0),S.addMany(d(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(d(48,60),4,8,4),S.addMany(d(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(d(32,64),6,0,6),S.add(127,6,0,6),S.addMany(d(64,127),6,0,0),S.addMany(d(32,48),3,9,5),S.addMany(d(32,48),5,9,5),S.addMany(d(48,64),5,0,6),S.addMany(d(64,127),5,7,0),S.addMany(d(32,48),4,9,5),S.addMany(d(32,48),1,9,2),S.addMany(d(32,48),2,9,2),S.addMany(d(48,127),2,10,0),S.addMany(d(48,80),1,10,0),S.addMany(d(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(d(96,127),1,10,0),S.add(80,1,11,9),S.addMany(E,9,0,9),S.add(127,9,0,9),S.addMany(d(28,32),9,0,9),S.addMany(d(32,48),9,9,12),S.addMany(d(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(E,11,0,11),S.addMany(d(32,128),11,0,11),S.addMany(d(28,32),11,0,11),S.addMany(E,10,0,10),S.add(127,10,0,10),S.addMany(d(28,32),10,0,10),S.addMany(d(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(d(32,48),10,9,12),S.addMany(E,12,0,12),S.add(127,12,0,12),S.addMany(d(28,32),12,0,12),S.addMany(d(32,48),12,9,12),S.addMany(d(48,64),12,0,11),S.addMany(d(64,127),12,12,13),S.addMany(d(64,127),10,12,13),S.addMany(d(64,127),9,12,13),S.addMany(E,13,13,13),S.addMany(g,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(m=a.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(d,g,E)=>{},this._executeHandlerFb=d=>{},this._csiHandlerFb=(d,g)=>{},this._escHandlerFb=d=>{},this._errorHandlerFb=d=>d,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 c.OscParser),this._dcsParser=this.register(new C.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(m,d=[64,126]){let g=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=m.prefix.charCodeAt(0),g&&60>g||g>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<m.intermediates.length;++R){const A=m.intermediates.charCodeAt(R);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=A}}if(m.final.length!==1)throw new Error("final must be a single byte");const E=m.final.charCodeAt(0);if(d[0]>E||E>d[1])throw new Error(`final must be in range ${d[0]} .. ${d[1]}`);return g<<=8,g|=E,g}identToString(m){const d=[];for(;m;)d.push(String.fromCharCode(255&m)),m>>=8;return d.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,d){const g=this._identifier(m,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const E=this._escHandlers[g];return E.push(d),{dispose:()=>{const R=E.indexOf(d);R!==-1&&E.splice(R,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,d){this._executeHandlers[m.charCodeAt(0)]=d}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,d){const g=this._identifier(m);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const E=this._csiHandlers[g];return E.push(d),{dispose:()=>{const R=E.indexOf(d);R!==-1&&E.splice(R,1)}}}clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,d){return this._dcsParser.registerHandler(this._identifier(m),d)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,d){return this._oscParser.registerHandler(m,d)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(m,d,g,E,R){this._parseStack.state=m,this._parseStack.handlers=d,this._parseStack.handlerPos=g,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(m,d,g){let E,R=0,A=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let B=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&B>-1){for(;B>=0&&(E=T[B](this._params),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 4:if(g===!1&&B>-1){for(;B>=0&&(E=T[B](),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 6:if(R=m[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=m[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=L;T<d;++T){switch(R=m[T],A=this._transitions.table[this.currentState<<8|(R<160?R:k)],A>>4){case 2:for(let U=T+1;;++U){if(U>=d||(R=m[U])<32||R>126&&R<k){this._printHandler(m,T,U),T=U-1;break}if(++U>=d||(R=m[U])<32||R>126&&R<k){this._printHandler(m,T,U),T=U-1;break}if(++U>=d||(R=m[U])<32||R>126&&R<k){this._printHandler(m,T,U),T=U-1;break}if(++U>=d||(R=m[U])<32||R>126&&R<k){this._printHandler(m,T,U),T=U-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const B=this._csiHandlers[this._collect<<8|R];let N=B?B.length-1:-1;for(;N>=0&&(E=B[N](this._params),E!==!0);N--)if(E instanceof Promise)return this._preserveStack(3,B,N,A,T),E;N<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++T<d&&(R=m[T])>47&&R<60);T--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const V=this._escHandlers[this._collect<<8|R];let F=V?V.length-1:-1;for(;F>=0&&(E=V[F](),E!==!0);F--)if(E instanceof Promise)return this._preserveStack(4,V,F,A,T),E;F<0&&this._escHandlerFb(this._collect<<8|R),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|R,this._params);break;case 13:for(let U=T+1;;++U)if(U>=d||(R=m[U])===24||R===26||R===27||R>127&&R<k){this._dcsParser.put(m,T,U),T=U-1;break}break;case 14:if(E=this._dcsParser.unhook(R!==24&&R!==26),E)return this._preserveStack(6,[],0,A,T),E;R===27&&(A|=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 U=T+1;;U++)if(U>=d||(R=m[U])<32||R>127&&R<k){this._oscParser.put(m,T,U),T=U-1;break}break;case 6:if(E=this._oscParser.end(R!==24&&R!==26),E)return this._preserveStack(5,[],0,A,T),E;R===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}a.EscapeSequenceParser=x},6242:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=u(5770),_=u(482),c=[];a.OscParser=class{constructor(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const k=this._handlers[C];return k.push(w),{dispose:()=>{const x=k.indexOf(w);x!==-1&&k.splice(x,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,this._active.length)for(let C=this._active.length-1;C>=0;C--)this._active[C].start();else this._handlerFb(this._id,"START")}_put(C,w,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(C,w,k);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(C,w,k))}start(){this.reset(),this._state=1}put(C,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){const x=C[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(C,w,k)}}end(C,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(C),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",C);this._active=c,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(C){this._handler=C,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(C,w,k){this._hitLimit||(this._data+=(0,_.utf32ToString)(C,w,k),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(C){let w=!1;if(this._hitLimit)w=!1;else if(C&&(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:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class h{static fromArray(c){const C=new h;if(!c.length)return C;for(let w=Array.isArray(c[0])?1:0;w<c.length;++w){const k=c[w];if(Array.isArray(k))for(let x=0;x<k.length;++x)C.addSubParam(k[x]);else C.addParam(k)}return C}constructor(c=32,C=32){if(this.maxLength=c,this.maxSubParamsLength=C,C>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(C),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const c=new h(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){const c=[];for(let C=0;C<this.length;++C){c.push(this.params[C]);const w=this._subParamsIdx[C]>>8,k=255&this._subParamsIdx[C];k-w>0&&c.push(Array.prototype.slice.call(this._subParams,w,k))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>u?u:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>u?u:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){const C=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-C>0?this._subParams.subarray(C,w):null}getSubParamsAll(){const c={};for(let C=0;C<this.length;++C){const w=this._subParamsIdx[C]>>8,k=255&this._subParamsIdx[C];k-w>0&&(c[C]=this._subParams.slice(w,k))}return c}addDigit(c){let C;if(this._rejectDigits||!(C=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,k=w[C-1];w[C-1]=~k?Math.min(10*k+c,u):c}}a.Params=h},5741:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,h){const _={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(_),h.dispose=()=>this._wrappedAddonDispose(_),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===u){h=_;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(h,1)}}},8771:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=u(3785),_=u(511);a.BufferApiView=class{constructor(c,C){this._buffer=c,this.type=C}init(c){return this._buffer=c,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(c){const C=this._buffer.lines.get(c);if(C)return new h.BufferLineApiView(C)}getNullCell(){return new _.CellData}}},3785:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=u(511);a.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,c){if(!(_<0||_>=this._line.length))return c?(this._line.loadCell(_,c),c):this._line.loadCell(_,new h.CellData)}translateToString(_,c,C){return this._line.translateToString(_,c,C)}}},8285:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),_=u(8460),c=u(844);class C extends c.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new _.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=C},7975:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,h){return this._core.registerCsiHandler(u,(_=>h(_.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((_,c)=>h(_,c.toArray())))}addDcsHandler(u,h){return this.registerDcsHandler(u,h)}registerEscHandler(u,h){return this._core.registerEscHandler(u,h)}addEscHandler(u,h){return this.registerEscHandler(u,h)}registerOscHandler(u,h){return this._core.registerOscHandler(u,h)}addOscHandler(u,h){return this.registerOscHandler(u,h)}}},7090:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(p,a,u){var h=this&&this.__decorate||function(S,m,d,g){var E,R=arguments.length,A=R<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,m,d,g);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(m,d,A):E(m,d))||A);return R>3&&A&&Object.defineProperty(m,d,A),A},_=this&&this.__param||function(S,m){return function(d,g){m(d,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=u(8460),C=u(844),w=u(5295),k=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends C.Disposable{get buffer(){return this.buffers.active}constructor(S){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(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,m){this.cols=S,this.rows=m,this.buffers.resize(S,m),this._onResize.fire({cols:S,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,m=!1){const d=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===S.fg&&g.getBg(0)===S.bg||(g=d.getBlankLine(S,m),this._cachedBlankLine=g),g.isWrapped=m;const E=d.ybase+d.scrollTop,R=d.ybase+d.scrollBottom;if(d.scrollTop===0){const A=d.lines.isFull;R===d.lines.length-1?A?d.lines.recycle().copyFrom(g):d.lines.push(g.clone()):d.lines.splice(R+1,0,g.clone()),A?this.isUserScrolling&&(d.ydisp=Math.max(d.ydisp-1,0)):(d.ybase++,this.isUserScrolling||d.ydisp++)}else{const A=R-E+1;d.lines.shiftElements(E+1,A-1,-1),d.lines.set(R,g.clone())}this.isUserScrolling||(d.ydisp=d.ybase),this._onScroll.fire(d.ydisp)}scrollLines(S,m,d){const g=this.buffer;if(S<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else S+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const E=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+S,g.ybase),0),E!==g.ydisp&&(m||this._onScroll.fire(g.ydisp))}};a.BufferService=x=h([_(0,k.IOptionsService)],x)},7994:(p,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)}}},1753:function(p,a,u){var h=this&&this.__decorate||function(g,E,R,A){var L,T=arguments.length,B=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,E,R,A);else for(var N=g.length-1;N>=0;N--)(L=g[N])&&(B=(T<3?L(B):T>3?L(E,R,B):L(E,R))||B);return T>3&&B&&Object.defineProperty(E,R,B),B},_=this&&this.__param||function(g,E){return function(R,A){E(R,A,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const c=u(2585),C=u(8460),w=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function x(g,E){let R=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(R|=64,R|=g.action):(R|=3&g.button,4&g.button&&(R|=64),8&g.button&&(R|=128),g.action===32?R|=32:g.action!==0||E||(R|=3)),R}const S=String.fromCharCode,m={DEFAULT:g=>{const E=[x(g,!1)+32,g.col+32,g.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${S(E[0])}${S(E[1])}${S(E[2])}`},SGR:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.col};${g.row}${E}`},SGR_PIXELS:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.x};${g.y}${E}`}};let d=a.CoreMouseService=class extends w.Disposable{constructor(g,E){super(),this._bufferService=g,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new C.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(k))this.addProtocol(R,k[R]);for(const R of Object.keys(m))this.addEncoding(R,m[R]);this.reset()}addProtocol(g,E){this._protocols[g]=E}addEncoding(g,E){this._encodings[g]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const E=this._encodings[this._activeEncoding](g);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,E,R){if(R){if(g.x!==E.x||g.y!==E.y)return!1}else if(g.col!==E.col||g.row!==E.row)return!1;return g.button===E.button&&g.action===E.action&&g.ctrl===E.ctrl&&g.alt===E.alt&&g.shift===E.shift}};a.CoreMouseService=d=h([_(0,c.IBufferService),_(1,c.ICoreService)],d)},6975:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},_=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const c=u(1439),C=u(8460),w=u(844),k=u(2585),x=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=a.CoreService=class extends w.Disposable{constructor(d,g,E){super(),this._bufferService=d,this._logService=g,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new C.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new C.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new C.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new C.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}reset(){this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}triggerDataEvent(d,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${d}"`,(()=>d.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(d)}triggerBinaryEvent(d){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${d}"`,(()=>d.split("").map((g=>g.charCodeAt(0))))),this._onBinary.fire(d))}};a.CoreService=m=h([_(0,k.IBufferService),_(1,k.ILogService),_(2,k.IOptionsService)],m)},9074:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),_=u(8460),c=u(844),C=u(6106);let w=0,k=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new C.SortedList((d=>d==null?void 0:d.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,c.toDisposable)((()=>this.reset())))}registerDecoration(d){if(d.marker.isDisposed)return;const g=new S(d);if(g){const E=g.marker.onDispose((()=>g.dispose()));g.onDispose((()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),E.dispose())})),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const d of this._decorations.values())d.dispose();this._decorations.clear()}*getDecorationsAtCell(d,g,E){let R=0,A=0;for(const L of this._decorations.getKeyIterator(g))R=L.options.x??0,A=R+(L.options.width??1),d>=R&&d<A&&(!E||(L.options.layer??"bottom")===E)&&(yield L)}forEachDecorationAtCell(d,g,E,R){this._decorations.forEachByKey(g,(A=>{w=A.options.x??0,k=w+(A.options.width??1),d>=w&&d<k&&(!E||(A.options.layer??"bottom")===E)&&R(A)}))}}a.DecorationService=x;class S extends c.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(d){super(),this.options=d,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=d.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=u(2585),_=u(8343);class c{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=c,a.InstantiationService=class{constructor(){this._services=new c,this._services.set(h.IInstantiationService,this)}setService(C,w){this._services.set(C,w)}getService(C){return this._services.get(C)}createInstance(C,...w){const k=(0,_.getServiceDependencies)(C).sort(((m,d)=>m.index-d.index)),x=[];for(const m of k){const d=this._services.get(m.id);if(!d)throw new Error(`[createInstance] ${C.name} depends on UNKNOWN service ${m.id}.`);x.push(d)}const S=k.length>0?k[0].index:w.length;if(w.length!==S)throw new Error(`[createInstance] First service dependency of ${C.name} at position ${S+1} conflicts with ${w.length} static arguments`);return new C(...w,...x)}}},7866:function(p,a,u){var h=this&&this.__decorate||function(S,m,d,g){var E,R=arguments.length,A=R<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,m,d,g);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(m,d,A):E(m,d))||A);return R>3&&A&&Object.defineProperty(m,d,A),A},_=this&&this.__param||function(S,m){return function(d,g){m(d,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=u(844),C=u(2585),w={trace:C.LogLevelEnum.TRACE,debug:C.LogLevelEnum.DEBUG,info:C.LogLevelEnum.INFO,warn:C.LogLevelEnum.WARN,error:C.LogLevelEnum.ERROR,off:C.LogLevelEnum.OFF};let k,x=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(S){super(),this._optionsService=S,this._logLevel=C.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 m=0;m<S.length;m++)typeof S[m]=="function"&&(S[m]=S[m]())}_log(S,m,d){this._evalLazyOptionalParams(d),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...d)}trace(S,...m){var d;this._logLevel<=C.LogLevelEnum.TRACE&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.trace.bind(this._optionsService.options.logger))??console.log,S,m)}debug(S,...m){var d;this._logLevel<=C.LogLevelEnum.DEBUG&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.debug.bind(this._optionsService.options.logger))??console.log,S,m)}info(S,...m){var d;this._logLevel<=C.LogLevelEnum.INFO&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.info.bind(this._optionsService.options.logger))??console.info,S,m)}warn(S,...m){var d;this._logLevel<=C.LogLevelEnum.WARN&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.warn.bind(this._optionsService.options.logger))??console.warn,S,m)}error(S,...m){var d;this._logLevel<=C.LogLevelEnum.ERROR&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.error.bind(this._optionsService.options.logger))??console.error,S,m)}};a.LogService=x=h([_(0,C.IOptionsService)],x),a.setTraceLogger=function(S){k=S},a.traceCall=function(S,m,d){if(typeof d.value!="function")throw new Error("not supported");const g=d.value;d.value=function(...E){if(k.logLevel!==C.LogLevelEnum.TRACE)return g.apply(this,E);k.trace(`GlyphRenderer#${g.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const R=g.apply(this,E);return k.trace(`GlyphRenderer#${g.name} return`,R),R}}},7302:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=u(8460),_=u(844),c=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:c.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const C=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends _.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...a.DEFAULT_OPTIONS};for(const m in x)if(m in S)try{const d=x[m];S[m]=this._sanitizeAndValidateOption(m,d)}catch(d){console.error(d)}this.rawOptions=S,this.options={...S},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,S){return this.onOptionChange((m=>{m===x&&S(this.rawOptions[x])}))}onMultipleOptionChange(x,S){return this.onOptionChange((m=>{x.indexOf(m)!==-1&&S()}))}_setupOptions(){const x=m=>{if(!(m in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},S=(m,d)=>{if(!(m in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);d=this._sanitizeAndValidateOption(m,d),this.rawOptions[m]!==d&&(this.rawOptions[m]=d,this._onOptionChange.fire(m))};for(const m in this.rawOptions){const d={get:x.bind(this,m),set:S.bind(this,m)};Object.defineProperty(this.options,m,d)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=a.DEFAULT_OPTIONS[x]),!(function(m){return m==="block"||m==="underline"||m==="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=C.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(p,a,u){var h=this&&this.__decorate||function(w,k,x,S){var m,d=arguments.length,g=d<3?k:S===null?S=Object.getOwnPropertyDescriptor(k,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,k,x,S);else for(var E=w.length-1;E>=0;E--)(m=w[E])&&(g=(d<3?m(g):d>3?m(k,x,g):m(k,x))||g);return d>3&&g&&Object.defineProperty(k,x,g),g},_=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 c=u(2585);let C=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 E=k.addMarker(k.ybase+k.y),R={data:w,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(R,E))),this._dataByLinkId.set(R.id,R),R.id}const x=w,S=this._getEntryIdKey(x),m=this._entriesWithId.get(S);if(m)return this.addLineToLink(m.id,k.ybase+k.y),m.id;const d=k.addMarker(k.ybase+k.y),g={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[d]};return d.onDispose((()=>this._removeMarkerFromLink(g,d))),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.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=C=h([_(0,c.IBufferService)],C)},8343:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(_){return _[h]||[]},a.createDecorator=function(_){if(a.serviceRegistry.has(_))return a.serviceRegistry.get(_);const c=function(C,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,S,m){S[u]===S?S[h].push({id:x,index:m}):(S[h]=[{id:x,index:m}],S[u]=S)})(c,C,k)};return c.toString=()=>_,a.serviceRegistry.set(_,c),c}},2585:(p,a,u)=>{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=u(8343);var _;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(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(_||(a.LogLevelEnum=_={})),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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=u(8460),_=u(225);class c{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 _.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 m=0;m<S;++m){let d=w.charCodeAt(m);if(55296<=d&&d<=56319){if(++m>=S)return k+this.wcwidth(d);const R=w.charCodeAt(m);56320<=R&&R<=57343?d=1024*(d-55296)+R-56320+65536:k+=this.wcwidth(R)}const g=this.charProperties(d,x);let E=c.extractWidth(g);c.extractShouldJoin(g)&&(E-=c.extractWidth(x)),k+=E,x=g}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=c}},o={};function v(p){var a=o[p];if(a!==void 0)return a.exports;var u=o[p]={exports:{}};return l[p].call(u.exports,u,u.exports,v),u.exports}var b={};return(()=>{var p=b;Object.defineProperty(p,"__esModule",{value:!0}),p.Terminal=void 0;const a=v(9042),u=v(3236),h=v(844),_=v(5741),c=v(8285),C=v(7975),w=v(7090),k=["cols","rows"];class x extends h.Disposable{constructor(m){super(),this._core=this.register(new u.Terminal(m)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const d=E=>this._core.options[E],g=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:d.bind(this,E),set:g.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_checkReadonlyOptions(m){if(k.includes(m))throw new Error(`Option "${m}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new C.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 c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const m=this._core.coreService.decPrivateModes;let d="none";switch(this._core.coreMouseService.activeProtocol){case"X10":d="x10";break;case"VT200":d="vt200";break;case"DRAG":d="drag";break;case"ANY":d="any"}return{applicationCursorKeysMode:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:d,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(const d in m)this._publicOptions[d]=m[d]}blur(){this._core.blur()}focus(){this._core.focus()}input(m,d=!0){this._core.input(m,d)}resize(m,d){this._verifyIntegers(m,d),this._core.resize(m,d)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}attachCustomWheelEventHandler(m){this._core.attachCustomWheelEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){return this._checkProposedApi(),this._verifyPositiveIntegers(m.x??0,m.width??0,m.height??0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,d,g){this._verifyIntegers(m,d,g),this._core.select(m,d,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,d){this._verifyIntegers(m,d),this._core.selectLines(m,d)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,d){this._core.write(m,d)}writeln(m,d){this._core.write(m),this._core.write(`\r
58
- `,d)}paste(m){this._core.paste(m)}refresh(m,d){this._verifyIntegers(m,d),this._core.refresh(m,d)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return a}_verifyIntegers(...m){for(const d of m)if(d===1/0||isNaN(d)||d%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const d of m)if(d&&(d===1/0||isNaN(d)||d%1!=0||d<0))throw new Error("This API only accepts positive integers")}}p.Terminal=x})(),b})()))})(Hu)),Hu.exports}var z0=B0();class H0{constructor(s,l){Tp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(s)}`),this.socket.addEventListener("message",v=>{var p,a;const b=JSON.parse(v.data);b.type==="output"?l.onOutput(b.data):b.type==="error"?(p=l.onError)==null||p.call(l,b.message):(a=l.onStatus)==null||a.call(l,b)}),this.socket.addEventListener("error",()=>{var v;(v=l.onError)==null||v.call(l,"Terminal connection failed.")})}sendInput(s){this.send({type:"input",data:s})}resize(s,l){this.send({type:"resize",cols:s,rows:l})}close(){this.socket.close()}send(s){const l=JSON.stringify(s);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(l);return}this.socket.addEventListener("open",()=>this.socket.send(l),{once:!0})}}function N0({sessionId:n,active:s=!0,onEvent:l}){const o=me.useRef(null),v=me.useRef(null),b=me.useRef(null),p=me.useRef(null),a=me.useRef(s),u=me.useRef(l);function h(_={}){const c=o.current,C=v.current,w=b.current,k=p.current;if(!c||!C||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<j0||x.height<U0||(w.fit(),k.cols<I0||k.rows<P0)?!1:(C.resize(k.cols,k.rows),_.focus&&k.focus(),!0)}return me.useEffect(()=>{u.current=l},[l]),me.useEffect(()=>{a.current=s},[s]),me.useEffect(()=>{if(!o.current)return;const _=new z0.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:F0}),c=new L0.FitAddon;_.loadAddon(c),_.loadAddon(new O0.WebLinksAddon),_.open(o.current),p.current=_,b.current=c;const C=new H0(n,{onOutput(g){_.write(g)},onStatus(g){var E;(E=u.current)==null||E.call(u,g.type)},onError(g){var E;_.writeln(`\r
59
- [VCM] ${g}`),(E=u.current)==null||E.call(u,g)}});v.current=C;const w=_.onData(g=>{C.sendInput(g)});let k=0,x=0,S=0;const m=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},d=new ResizeObserver(()=>{m()});return d.observe(o.current),x=window.requestAnimationFrame(m),S=window.setTimeout(m,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),d.disconnect(),w.dispose(),C.close(),_.dispose(),v.current=null,p.current=null,b.current=null}},[n]),me.useEffect(()=>{if(!s)return;const _=[],c=[];return _.push(window.requestAnimationFrame(()=>{h({focus:!0}),_.push(window.requestAnimationFrame(()=>h({focus:!0})))})),c.push(window.setTimeout(()=>h({focus:!0}),160)),c.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const C of _)window.cancelAnimationFrame(C);for(const C of c)window.clearTimeout(C)}},[s]),me.useEffect(()=>{const _=()=>{a.current&&h()};return window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[]),q.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var _;return(_=p.current)==null?void 0:_.focus()}})}const j0=160,U0=80,I0=20,P0=5,F0={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 q0({role:n,session:s,permissionMode:l,busy:o=!1,onPermissionModeChange:v,onStart:b,onResume:p,onStop:a,onRestart:u}){const h=(s==null?void 0:s.status)==="running",_=!!(s!=null&&s.claudeSessionId&&!h),c=!h&&!(s!=null&&s.claudeSessionId),C=!!(s&&s.permissionMode!==l);return q.jsxs("div",{className:"session-controls",children:[q.jsxs("label",{className:"permission-mode-field",children:[q.jsxs("span",{children:["Permission",q.jsx("small",{children:s?`current: ${V0(s.permissionMode)}${C?" / next launch":""}`:"applies on start"})]}),q.jsxs("select",{value:l,onChange:w=>v(w.target.value),children:[q.jsx("option",{value:"default",children:"默认"}),q.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"}),q.jsx("option",{value:"dangerously-skip-permissions",children:"--dangerously-skip-permissions"})]})]}),q.jsxs("div",{className:"session-toolbar",children:[q.jsx("button",{type:"button",disabled:o||!c,onClick:b,children:"Start"}),q.jsx("button",{type:"button",disabled:o||!_,onClick:p,children:"Resume"}),q.jsx("button",{type:"button",disabled:o||!s,onClick:u,children:"Restart"}),q.jsx("button",{type:"button",disabled:o||!s,onClick:a,children:"Stop"})]})]})}function V0(n){return n==="dangerously-skip-permissions"?"--dangerously-skip-permissions":n}function G0(n,s){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const Y0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,W0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K0={};function Vp(n,s){return(K0.jsx?W0:Y0).test(n)}const X0=/[ \t\n\f\r]/g;function $0(n){return typeof n=="object"?n.type==="text"?Gp(n.value):!1:Gp(n)}function Gp(n){return n.replace(X0,"")===""}class Bs{constructor(s,l,o){this.normal=l,this.property=s,o&&(this.space=o)}}Bs.prototype.normal={};Bs.prototype.property={};Bs.prototype.space=void 0;function j_(n,s){const l={},o={};for(const v of n)Object.assign(l,v.property),Object.assign(o,v.normal);return new Bs(l,o,s)}function ec(n){return n.toLowerCase()}class qt{constructor(s,l){this.attribute=l,this.property=s}}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 Q0=0;const Le=Ui(),_t=Ui(),tc=Ui(),_e=Ui(),tt=Ui(),Tr=Ui(),Qt=Ui();function Ui(){return 2**++Q0}const nc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:_t,commaOrSpaceSeparated:Qt,commaSeparated:Tr,number:_e,overloadedBoolean:tc,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Nu=Object.keys(nc);class dc extends qt{constructor(s,l,o,v){let b=-1;if(super(s,l),Yp(this,"space",v),typeof o=="number")for(;++b<Nu.length;){const p=Nu[b];Yp(this,Nu[b],(o&nc[p])===nc[p])}}}dc.prototype.defined=!0;function Yp(n,s,l){l&&(n[s]=l)}function Rr(n){const s={},l={};for(const[o,v]of Object.entries(n.properties)){const b=new dc(o,n.transform(n.attributes||{},o),v,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(b.mustUseProperty=!0),s[o]=b,l[ec(o)]=o,l[ec(b.attribute)]=o}return new Bs(s,l,n.space)}const U_=Rr({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:tt,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:_e,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:tt,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:_t,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(n,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function I_(n,s){return s in n?n[s]:s}function P_(n,s){return I_(n,s.toLowerCase())}const Z0=Rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:tt,autoFocus:Le,autoPlay:Le,blocking:tt,capture:null,charSet:null,checked:Le,cite:null,className:tt,cols:_e,colSpan:null,content:null,contentEditable:_t,controls:Le,controlsList:tt,coords:_e|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:tc,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:tt,height:_e,hidden:tc,high:_e,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:tt,itemRef:tt,itemScope:Le,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:_e,pattern:null,ping:tt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:tt,required:Le,reversed:Le,rows:_e,rowSpan:_e,sandbox:tt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:_t,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:P_}),J0=Rr({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:Qt,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:tt,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:Tr,g2:Tr,glyphName:Tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:I_}),F_=Rr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,s){return"xlink:"+s.slice(5).toLowerCase()}}),q_=Rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:P_}),V_=Rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,s){return"xml:"+s.slice(3).toLowerCase()}}),eS={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"},tS=/[A-Z]/g,Wp=/-[a-z]/g,nS=/^data[-\w.:]+$/i;function iS(n,s){const l=ec(s);let o=s,v=qt;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&nS.test(s)){if(s.charAt(4)==="-"){const b=s.slice(5).replace(Wp,sS);o="data"+b.charAt(0).toUpperCase()+b.slice(1)}else{const b=s.slice(4);if(!Wp.test(b)){let p=b.replace(tS,rS);p.charAt(0)!=="-"&&(p="-"+p),s="data"+p}}v=dc}return new v(o,s)}function rS(n){return"-"+n.toLowerCase()}function sS(n){return n.charAt(1).toUpperCase()}const lS=j_([U_,Z0,F_,q_,V_],"html"),pc=j_([U_,J0,F_,q_,V_],"svg");function aS(n){return n.join(" ").trim()}var Er={},ju,Kp;function oS(){if(Kp)return ju;Kp=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,v=/^:\s*/,b=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,p=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
60
- `,h="/",_="*",c="",C="comment",w="declaration";function k(S,m){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];m=m||{};var d=1,g=1;function E(Y){var $=Y.match(s);$&&(d+=$.length);var G=Y.lastIndexOf(u);g=~G?Y.length-G:g+Y.length}function R(){var Y={line:d,column:g};return function($){return $.position=new A(Y),B(),$}}function A(Y){this.start=Y,this.end={line:d,column:g},this.source=m.source}A.prototype.content=S;function L(Y){var $=new Error(m.source+":"+d+":"+g+": "+Y);if($.reason=Y,$.filename=m.source,$.line=d,$.column=g,$.source=S,!m.silent)throw $}function T(Y){var $=Y.exec(S);if($){var G=$[0];return E(G),S=S.slice(G.length),$}}function B(){T(l)}function N(Y){var $;for(Y=Y||[];$=V();)$!==!1&&Y.push($);return Y}function V(){var Y=R();if(!(h!=S.charAt(0)||_!=S.charAt(1))){for(var $=2;c!=S.charAt($)&&(_!=S.charAt($)||h!=S.charAt($+1));)++$;if($+=2,c===S.charAt($-1))return L("End of comment missing");var G=S.slice(2,$-2);return g+=2,E(G),S=S.slice($),g+=2,Y({type:C,comment:G})}}function F(){var Y=R(),$=T(o);if($){if(V(),!T(v))return L("property missing ':'");var G=T(b),X=Y({type:w,property:x($[0].replace(n,c)),value:G?x(G[0].replace(n,c)):c});return T(p),X}}function U(){var Y=[];N(Y);for(var $;$=F();)$!==!1&&(Y.push($),N(Y));return Y}return B(),U()}function x(S){return S?S.replace(a,c):c}return ju=k,ju}var Xp;function uS(){if(Xp)return Er;Xp=1;var n=Er&&Er.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=l;const s=n(oS());function l(o,v){let b=null;if(!o||typeof o!="string")return b;const p=(0,s.default)(o),a=typeof v=="function";return p.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:_}=u;a?v(h,_,u):_&&(b=b||{},b[h]=_)}),b}return Er}var Es={},$p;function cS(){if($p)return Es;$p=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,s=/-([a-z])/g,l=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,v=/^-(ms)-/,b=function(h){return!h||l.test(h)||n.test(h)},p=function(h,_){return _.toUpperCase()},a=function(h,_){return"".concat(_,"-")},u=function(h,_){return _===void 0&&(_={}),b(h)?h:(h=h.toLowerCase(),_.reactCompat?h=h.replace(v,a):h=h.replace(o,a),h.replace(s,p))};return Es.camelCase=u,Es}var ks,Qp;function hS(){if(Qp)return ks;Qp=1;var n=ks&&ks.__importDefault||function(v){return v&&v.__esModule?v:{default:v}},s=n(uS()),l=cS();function o(v,b){var p={};return!v||typeof v!="string"||(0,s.default)(v,function(a,u){a&&u&&(p[(0,l.camelCase)(a,b)]=u)}),p}return o.default=o,ks=o,ks}var fS=hS();const dS=B_(fS),G_=Y_("end"),_c=Y_("start");function Y_(n){return s;function s(l){const o=l&&l.position&&l.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 pS(n){const s=_c(n),l=G_(n);if(s&&l)return{start:s,end:l}}function Ds(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Zp(n.position):"start"in n||"end"in n?Zp(n):"line"in n||"column"in n?ic(n):""}function ic(n){return Jp(n&&n.line)+":"+Jp(n&&n.column)}function Zp(n){return ic(n&&n.start)+"-"+ic(n&&n.end)}function Jp(n){return n&&typeof n=="number"?n:1}class Rt extends Error{constructor(s,l,o){super(),typeof l=="string"&&(o=l,l=void 0);let v="",b={},p=!1;if(l&&("line"in l&&"column"in l?b={place:l}:"start"in l&&"end"in l?b={place:l}:"type"in l?b={ancestors:[l],place:l.position}:b={...l}),typeof s=="string"?v=s:!b.cause&&s&&(p=!0,v=s.message,b.cause=s),!b.ruleId&&!b.source&&typeof o=="string"){const u=o.indexOf(":");u===-1?b.ruleId=o:(b.source=o.slice(0,u),b.ruleId=o.slice(u+1))}if(!b.place&&b.ancestors&&b.ancestors){const u=b.ancestors[b.ancestors.length-1];u&&(b.place=u.position)}const a=b.place&&"start"in b.place?b.place.start:b.place;this.ancestors=b.ancestors||void 0,this.cause=b.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=v,this.line=a?a.line:void 0,this.name=Ds(b.place)||"1:1",this.place=b.place||void 0,this.reason=this.message,this.ruleId=b.ruleId||void 0,this.source=b.source||void 0,this.stack=p&&b.cause&&typeof b.cause.stack=="string"?b.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const mc={}.hasOwnProperty,_S=new Map,mS=/[A-Z]/g,gS=new Set(["table","tbody","thead","tfoot","tr"]),vS=new Set(["td","th"]),W_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function SS(n,s){if(!s||s.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=s.filePath||void 0;let o;if(s.development){if(typeof s.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=AS(l,s.jsxDEV)}else{if(typeof s.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof s.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=kS(l,s.jsx,s.jsxs)}const v={Fragment:s.Fragment,ancestors:[],components:s.components||{},create:o,elementAttributeNameCase:s.elementAttributeNameCase||"react",evaluater:s.createEvaluater?s.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:s.ignoreInvalidStyle||!1,passKeys:s.passKeys!==!1,passNode:s.passNode||!1,schema:s.space==="svg"?pc:lS,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},b=K_(v,n,void 0);return b&&typeof b!="string"?b:v.create(n,v.Fragment,{children:b||void 0},void 0)}function K_(n,s,l){if(s.type==="element")return yS(n,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return bS(n,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return wS(n,s,l);if(s.type==="mdxjsEsm")return CS(n,s);if(s.type==="root")return xS(n,s,l);if(s.type==="text")return ES(n,s)}function yS(n,s,l){const o=n.schema;let v=o;s.tagName.toLowerCase()==="svg"&&o.space==="html"&&(v=pc,n.schema=v),n.ancestors.push(s);const b=$_(n,s.tagName,!1),p=TS(n,s);let a=vc(n,s);return gS.has(s.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!$0(u):!0})),X_(n,p,b,s),gc(p,a),n.ancestors.pop(),n.schema=o,n.create(s,b,p,l)}function bS(n,s){if(s.data&&s.data.estree&&n.evaluater){const o=s.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ms(n,s.position)}function CS(n,s){if(s.data&&s.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(s.data.estree);Ms(n,s.position)}function wS(n,s,l){const o=n.schema;let v=o;s.name==="svg"&&o.space==="html"&&(v=pc,n.schema=v),n.ancestors.push(s);const b=s.name===null?n.Fragment:$_(n,s.name,!0),p=DS(n,s),a=vc(n,s);return X_(n,p,b,s),gc(p,a),n.ancestors.pop(),n.schema=o,n.create(s,b,p,l)}function xS(n,s,l){const o={};return gc(o,vc(n,s)),n.create(s,n.Fragment,o,l)}function ES(n,s){return s.value}function X_(n,s,l,o){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(s.node=o)}function gc(n,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(n.children=l)}}function kS(n,s,l){return o;function o(v,b,p,a){const h=Array.isArray(p.children)?l:s;return a?h(b,p,a):h(b,p)}}function AS(n,s){return l;function l(o,v,b,p){const a=Array.isArray(b.children),u=_c(o);return s(v,b,p,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function TS(n,s){const l={};let o,v;for(v in s.properties)if(v!=="children"&&mc.call(s.properties,v)){const b=RS(n,v,s.properties[v]);if(b){const[p,a]=b;n.tableCellAlignToStyle&&p==="align"&&typeof a=="string"&&vS.has(s.tagName)?o=a:l[p]=a}}if(o){const b=l.style||(l.style={});b[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return l}function DS(n,s){const l={};for(const o of s.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const b=o.data.estree.body[0];b.type;const p=b.expression;p.type;const a=p.properties[0];a.type,Object.assign(l,n.evaluater.evaluateExpression(a.argument))}else Ms(n,s.position);else{const v=o.name;let b;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,b=n.evaluater.evaluateExpression(a.expression)}else Ms(n,s.position);else b=o.value===null?!0:o.value;l[v]=b}return l}function vc(n,s){const l=[];let o=-1;const v=n.passKeys?new Map:_S;for(;++o<s.children.length;){const b=s.children[o];let p;if(n.passKeys){const u=b.type==="element"?b.tagName:b.type==="mdxJsxFlowElement"||b.type==="mdxJsxTextElement"?b.name:void 0;if(u){const h=v.get(u)||0;p=u+"-"+h,v.set(u,h+1)}}const a=K_(n,b,p);a!==void 0&&l.push(a)}return l}function RS(n,s,l){const o=iS(n.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=o.commaSeparated?G0(l):aS(l)),o.property==="style"){let v=typeof l=="object"?l:LS(n,String(l));return n.stylePropertyNameCase==="css"&&(v=MS(v)),["style",v]}return[n.elementAttributeNameCase==="react"&&o.space?eS[o.property]||o.property:o.attribute,l]}}function LS(n,s){try{return dS(s,{reactCompat:!0})}catch(l){if(n.ignoreInvalidStyle)return{};const o=l,v=new Rt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw v.file=n.filePath||void 0,v.url=W_+"#cannot-parse-style-attribute",v}}function $_(n,s,l){let o;if(!l)o={type:"Literal",value:s};else if(s.includes(".")){const v=s.split(".");let b=-1,p;for(;++b<v.length;){const a=Vp(v[b])?{type:"Identifier",name:v[b]}:{type:"Literal",value:v[b]};p=p?{type:"MemberExpression",object:p,property:a,computed:!!(b&&a.type==="Literal"),optional:!1}:a}o=p}else o=Vp(s)&&!/^[a-z]/.test(s)?{type:"Identifier",name:s}:{type:"Literal",value:s};if(o.type==="Literal"){const v=o.value;return mc.call(n.components,v)?n.components[v]:v}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ms(n)}function Ms(n,s){const l=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:s,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=n.filePath||void 0,l.url=W_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function MS(n){const s={};let l;for(l in n)mc.call(n,l)&&(s[OS(l)]=n[l]);return s}function OS(n){let s=n.replace(mS,BS);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function BS(n){return"-"+n.toLowerCase()}const Uu={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"]},zS={};function Sc(n,s){const l=zS,o=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,v=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return Q_(n,o,v)}function Q_(n,s,l){if(HS(n)){if("value"in n)return n.type==="html"&&!l?"":n.value;if(s&&"alt"in n&&n.alt)return n.alt;if("children"in n)return e_(n.children,s,l)}return Array.isArray(n)?e_(n,s,l):""}function e_(n,s,l){const o=[];let v=-1;for(;++v<n.length;)o[v]=Q_(n[v],s,l);return o.join("")}function HS(n){return!!(n&&typeof n=="object")}const t_=document.createElement("i");function yc(n){const s="&"+n+";";t_.innerHTML=s;const l=t_.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===s?!1:l}function Zt(n,s,l,o){const v=n.length;let b=0,p;if(s<0?s=-s>v?0:v+s:s=s>v?v:s,l=l>0?l:0,o.length<1e4)p=Array.from(o),p.unshift(s,l),n.splice(...p);else for(l&&n.splice(s,l);b<o.length;)p=o.slice(b,b+1e4),p.unshift(s,0),n.splice(...p),b+=1e4,s+=1e4}function cn(n,s){return n.length>0?(Zt(n,n.length,0,s),n):s}const n_={}.hasOwnProperty;function Z_(n){const s={};let l=-1;for(;++l<n.length;)NS(s,n[l]);return s}function NS(n,s){let l;for(l in s){const v=(n_.call(n,l)?n[l]:void 0)||(n[l]={}),b=s[l];let p;if(b)for(p in b){n_.call(v,p)||(v[p]=[]);const a=b[p];jS(v[p],Array.isArray(a)?a:a?[a]:[])}}}function jS(n,s){let l=-1;const o=[];for(;++l<s.length;)(s[l].add==="after"?n:o).push(s[l]);Zt(n,0,0,o)}function J_(n,s){const l=Number.parseInt(n,s);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function _n(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=vi(/[A-Za-z]/),Dt=vi(/[\dA-Za-z]/),US=vi(/[#-'*+\--9=?A-Z^-~]/);function ra(n){return n!==null&&(n<32||n===127)}const rc=vi(/\d/),IS=vi(/[\dA-Fa-f]/),PS=vi(/[!-/:-@[-`{-~]/);function we(n){return n!==null&&n<-2}function et(n){return n!==null&&(n<0||n===32)}function He(n){return n===-2||n===-1||n===32}const ca=vi(new RegExp("\\p{P}|\\p{S}","u")),ji=vi(/\s/);function vi(n){return s;function s(l){return l!==null&&l>-1&&n.test(String.fromCharCode(l))}}function Lr(n){const s=[];let l=-1,o=0,v=0;for(;++l<n.length;){const b=n.charCodeAt(l);let p="";if(b===37&&Dt(n.charCodeAt(l+1))&&Dt(n.charCodeAt(l+2)))v=2;else if(b<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(b))||(p=String.fromCharCode(b));else if(b>55295&&b<57344){const a=n.charCodeAt(l+1);b<56320&&a>56319&&a<57344?(p=String.fromCharCode(b,a),v=1):p="�"}else p=String.fromCharCode(b);p&&(s.push(n.slice(o,l),encodeURIComponent(p)),o=l+v+1,p=""),v&&(l+=v,v=0)}return s.join("")+n.slice(o)}function Ie(n,s,l,o){const v=o?o-1:Number.POSITIVE_INFINITY;let b=0;return p;function p(u){return He(u)?(n.enter(l),a(u)):s(u)}function a(u){return He(u)&&b++<v?(n.consume(u),a):(n.exit(l),s(u))}}const FS={tokenize:qS};function qS(n){const s=n.attempt(this.parser.constructs.contentInitial,o,v);let l;return s;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ie(n,s,"linePrefix")}function v(a){return n.enter("paragraph"),b(a)}function b(a){const u=n.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=u),l=u,p(a)}function p(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return we(a)?(n.consume(a),n.exit("chunkText"),b):(n.consume(a),p)}}const VS={tokenize:GS},i_={tokenize:YS};function GS(n){const s=this,l=[];let o=0,v,b,p;return a;function a(g){if(o<l.length){const E=l[o];return s.containerState=E[1],n.attempt(E[0].continuation,u,h)(g)}return h(g)}function u(g){if(o++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,v&&d();const E=s.events.length;let R=E,A;for(;R--;)if(s.events[R][0]==="exit"&&s.events[R][1].type==="chunkFlow"){A=s.events[R][1].end;break}m(o);let L=E;for(;L<s.events.length;)s.events[L][1].end={...A},L++;return Zt(s.events,R+1,0,s.events.slice(E)),s.events.length=L,h(g)}return a(g)}function h(g){if(o===l.length){if(!v)return C(g);if(v.currentConstruct&&v.currentConstruct.concrete)return k(g);s.interrupt=!!(v.currentConstruct&&!v._gfmTableDynamicInterruptHack)}return s.containerState={},n.check(i_,_,c)(g)}function _(g){return v&&d(),m(o),C(g)}function c(g){return s.parser.lazy[s.now().line]=o!==l.length,p=s.now().offset,k(g)}function C(g){return s.containerState={},n.attempt(i_,w,k)(g)}function w(g){return o++,l.push([s.currentConstruct,s.containerState]),C(g)}function k(g){if(g===null){v&&d(),m(0),n.consume(g);return}return v=v||s.parser.flow(s.now()),n.enter("chunkFlow",{_tokenizer:v,contentType:"flow",previous:b}),x(g)}function x(g){if(g===null){S(n.exit("chunkFlow"),!0),m(0),n.consume(g);return}return we(g)?(n.consume(g),S(n.exit("chunkFlow")),o=0,s.interrupt=void 0,a):(n.consume(g),x)}function S(g,E){const R=s.sliceStream(g);if(E&&R.push(null),g.previous=b,b&&(b.next=g),b=g,v.defineSkip(g.start),v.write(R),s.parser.lazy[g.start.line]){let A=v.events.length;for(;A--;)if(v.events[A][1].start.offset<p&&(!v.events[A][1].end||v.events[A][1].end.offset>p))return;const L=s.events.length;let T=L,B,N;for(;T--;)if(s.events[T][0]==="exit"&&s.events[T][1].type==="chunkFlow"){if(B){N=s.events[T][1].end;break}B=!0}for(m(o),A=L;A<s.events.length;)s.events[A][1].end={...N},A++;Zt(s.events,T+1,0,s.events.slice(L)),s.events.length=A}}function m(g){let E=l.length;for(;E-- >g;){const R=l[E];s.containerState=R[1],R[0].exit.call(s,n)}l.length=g}function d(){v.write([null]),b=void 0,v=void 0,s.containerState._closeFlow=void 0}}function YS(n,s,l){return Ie(n,n.attempt(this.parser.constructs.document,s,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dr(n){if(n===null||et(n)||ji(n))return 1;if(ca(n))return 2}function ha(n,s,l){const o=[];let v=-1;for(;++v<n.length;){const b=n[v].resolveAll;b&&!o.includes(b)&&(s=b(s,l),o.push(b))}return s}const sc={name:"attention",resolveAll:WS,tokenize:KS};function WS(n,s){let l=-1,o,v,b,p,a,u,h,_;for(;++l<n.length;)if(n[l][0]==="enter"&&n[l][1].type==="attentionSequence"&&n[l][1]._close){for(o=l;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&s.sliceSerialize(n[o][1]).charCodeAt(0)===s.sliceSerialize(n[l][1]).charCodeAt(0)){if((n[o][1]._close||n[l][1]._open)&&(n[l][1].end.offset-n[l][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[l][1].end.offset-n[l][1].start.offset)%3))continue;u=n[o][1].end.offset-n[o][1].start.offset>1&&n[l][1].end.offset-n[l][1].start.offset>1?2:1;const c={...n[o][1].end},C={...n[l][1].start};r_(c,-u),r_(C,u),p={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...n[o][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...n[l][1].start},end:C},b={type:u>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[l][1].start}},v={type:u>1?"strong":"emphasis",start:{...p.start},end:{...a.end}},n[o][1].end={...p.start},n[l][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=cn(h,[["enter",n[o][1],s],["exit",n[o][1],s]])),h=cn(h,[["enter",v,s],["enter",p,s],["exit",p,s],["enter",b,s]]),h=cn(h,ha(s.parser.constructs.insideSpan.null,n.slice(o+1,l),s)),h=cn(h,[["exit",b,s],["enter",a,s],["exit",a,s],["exit",v,s]]),n[l][1].end.offset-n[l][1].start.offset?(_=2,h=cn(h,[["enter",n[l][1],s],["exit",n[l][1],s]])):_=0,Zt(n,o-1,l-o+3,h),l=o+h.length-_-2;break}}for(l=-1;++l<n.length;)n[l][1].type==="attentionSequence"&&(n[l][1].type="data");return n}function KS(n,s){const l=this.parser.constructs.attentionMarkers.null,o=this.previous,v=Dr(o);let b;return p;function p(u){return b=u,n.enter("attentionSequence"),a(u)}function a(u){if(u===b)return n.consume(u),a;const h=n.exit("attentionSequence"),_=Dr(u),c=!_||_===2&&v||l.includes(u),C=!v||v===2&&_||l.includes(o);return h._open=!!(b===42?c:c&&(v||!C)),h._close=!!(b===42?C:C&&(_||!c)),s(u)}}function r_(n,s){n.column+=s,n.offset+=s,n._bufferIndex+=s}const XS={name:"autolink",tokenize:$S};function $S(n,s,l){let o=0;return v;function v(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),b}function b(w){return Mt(w)?(n.consume(w),p):w===64?l(w):h(w)}function p(w){return w===43||w===45||w===46||Dt(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,u):(w===43||w===45||w===46||Dt(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function u(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):w===null||w===32||w===60||ra(w)?l(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),_):US(w)?(n.consume(w),h):l(w)}function _(w){return Dt(w)?c(w):l(w)}function c(w){return w===46?(n.consume(w),o=0,_):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):C(w)}function C(w){if((w===45||Dt(w))&&o++<63){const k=w===45?C:c;return n.consume(w),k}return l(w)}}const zs={partial:!0,tokenize:QS};function QS(n,s,l){return o;function o(b){return He(b)?Ie(n,v,"linePrefix")(b):v(b)}function v(b){return b===null||we(b)?s(b):l(b)}}const em={continuation:{tokenize:JS},exit:ey,name:"blockQuote",tokenize:ZS};function ZS(n,s,l){const o=this;return v;function v(p){if(p===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(p),n.exit("blockQuoteMarker"),b}return l(p)}function b(p){return He(p)?(n.enter("blockQuotePrefixWhitespace"),n.consume(p),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),s):(n.exit("blockQuotePrefix"),s(p))}}function JS(n,s,l){const o=this;return v;function v(p){return He(p)?Ie(n,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):b(p)}function b(p){return n.attempt(em,s,l)(p)}}function ey(n){n.exit("blockQuote")}const tm={name:"characterEscape",tokenize:ty};function ty(n,s,l){return o;function o(b){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(b),n.exit("escapeMarker"),v}function v(b){return PS(b)?(n.enter("characterEscapeValue"),n.consume(b),n.exit("characterEscapeValue"),n.exit("characterEscape"),s):l(b)}}const nm={name:"characterReference",tokenize:ny};function ny(n,s,l){const o=this;let v=0,b,p;return a;function a(c){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),u}function u(c){return c===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(c),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),b=31,p=Dt,_(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),b=6,p=IS,_):(n.enter("characterReferenceValue"),b=7,p=rc,_(c))}function _(c){if(c===59&&v){const C=n.exit("characterReferenceValue");return p===Dt&&!yc(o.sliceSerialize(C))?l(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),s)}return p(c)&&v++<b?(n.consume(c),_):l(c)}}const s_={partial:!0,tokenize:ry},l_={concrete:!0,name:"codeFenced",tokenize:iy};function iy(n,s,l){const o=this,v={partial:!0,tokenize:R};let b=0,p=0,a;return u;function u(A){return h(A)}function h(A){const L=o.events[o.events.length-1];return b=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=A,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),_(A)}function _(A){return A===a?(p++,n.consume(A),_):p<3?l(A):(n.exit("codeFencedFenceSequence"),He(A)?Ie(n,c,"whitespace")(A):c(A))}function c(A){return A===null||we(A)?(n.exit("codeFencedFence"),o.interrupt?s(A):n.check(s_,x,E)(A)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||we(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(A)):He(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ie(n,w,"whitespace")(A)):A===96&&A===a?l(A):(n.consume(A),C)}function w(A){return A===null||we(A)?c(A):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||we(A)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),c(A)):A===96&&A===a?l(A):(n.consume(A),k)}function x(A){return n.attempt(v,E,S)(A)}function S(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),m}function m(A){return b>0&&He(A)?Ie(n,d,"linePrefix",b+1)(A):d(A)}function d(A){return A===null||we(A)?n.check(s_,x,E)(A):(n.enter("codeFlowValue"),g(A))}function g(A){return A===null||we(A)?(n.exit("codeFlowValue"),d(A)):(n.consume(A),g)}function E(A){return n.exit("codeFenced"),s(A)}function R(A,L,T){let B=0;return N;function N($){return A.enter("lineEnding"),A.consume($),A.exit("lineEnding"),V}function V($){return A.enter("codeFencedFence"),He($)?Ie(A,F,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):F($)}function F($){return $===a?(A.enter("codeFencedFenceSequence"),U($)):T($)}function U($){return $===a?(B++,A.consume($),U):B>=p?(A.exit("codeFencedFenceSequence"),He($)?Ie(A,Y,"whitespace")($):Y($)):T($)}function Y($){return $===null||we($)?(A.exit("codeFencedFence"),L($)):T($)}}}function ry(n,s,l){const o=this;return v;function v(p){return p===null?l(p):(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),b)}function b(p){return o.parser.lazy[o.now().line]?l(p):s(p)}}const Iu={name:"codeIndented",tokenize:ly},sy={partial:!0,tokenize:ay};function ly(n,s,l){const o=this;return v;function v(h){return n.enter("codeIndented"),Ie(n,b,"linePrefix",5)(h)}function b(h){const _=o.events[o.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?p(h):l(h)}function p(h){return h===null?u(h):we(h)?n.attempt(sy,p,u)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||we(h)?(n.exit("codeFlowValue"),p(h)):(n.consume(h),a)}function u(h){return n.exit("codeIndented"),s(h)}}function ay(n,s,l){const o=this;return v;function v(p){return o.parser.lazy[o.now().line]?l(p):we(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),v):Ie(n,b,"linePrefix",5)(p)}function b(p){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?s(p):we(p)?v(p):l(p)}}const oy={name:"codeText",previous:cy,resolve:uy,tokenize:hy};function uy(n){let s=n.length-4,l=3,o,v;if((n[l][1].type==="lineEnding"||n[l][1].type==="space")&&(n[s][1].type==="lineEnding"||n[s][1].type==="space")){for(o=l;++o<s;)if(n[o][1].type==="codeTextData"){n[l][1].type="codeTextPadding",n[s][1].type="codeTextPadding",l+=2,s-=2;break}}for(o=l-1,s++;++o<=s;)v===void 0?o!==s&&n[o][1].type!=="lineEnding"&&(v=o):(o===s||n[o][1].type==="lineEnding")&&(n[v][1].type="codeTextData",o!==v+2&&(n[v][1].end=n[o-1][1].end,n.splice(v+2,o-v-2),s-=o-v-2,o=v+2),v=void 0);return n}function cy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hy(n,s,l){let o=0,v,b;return p;function p(c){return n.enter("codeText"),n.enter("codeTextSequence"),a(c)}function a(c){return c===96?(n.consume(c),o++,a):(n.exit("codeTextSequence"),u(c))}function u(c){return c===null?l(c):c===32?(n.enter("space"),n.consume(c),n.exit("space"),u):c===96?(b=n.enter("codeTextSequence"),v=0,_(c)):we(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):(n.enter("codeTextData"),h(c))}function h(c){return c===null||c===32||c===96||we(c)?(n.exit("codeTextData"),u(c)):(n.consume(c),h)}function _(c){return c===96?(n.consume(c),v++,_):v===o?(n.exit("codeTextSequence"),n.exit("codeText"),s(c)):(b.type="codeTextData",h(c))}}class fy{constructor(s){this.left=s?[...s]:[],this.right=[]}get(s){if(s<0||s>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+s+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return s<this.left.length?this.left[s]:this.right[this.right.length-s+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(s,l){const o=l??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(s,o):s>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-s+this.left.length).reverse():this.left.slice(s).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(s,l,o){const v=l||0;this.setCursor(Math.trunc(s));const b=this.right.splice(this.right.length-v,Number.POSITIVE_INFINITY);return o&&As(this.left,o),b.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(s){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(s)}pushMany(s){this.setCursor(Number.POSITIVE_INFINITY),As(this.left,s)}unshift(s){this.setCursor(0),this.right.push(s)}unshiftMany(s){this.setCursor(0),As(this.right,s.reverse())}setCursor(s){if(!(s===this.left.length||s>this.left.length&&this.right.length===0||s<0&&this.left.length===0))if(s<this.left.length){const l=this.left.splice(s,Number.POSITIVE_INFINITY);As(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-s,Number.POSITIVE_INFINITY);As(this.left,l.reverse())}}}function As(n,s){let l=0;if(s.length<1e4)n.push(...s);else for(;l<s.length;)n.push(...s.slice(l,l+1e4)),l+=1e4}function im(n){const s={};let l=-1,o,v,b,p,a,u,h;const _=new fy(n);for(;++l<_.length;){for(;l in s;)l=s[l];if(o=_.get(l),l&&o[1].type==="chunkFlow"&&_.get(l-1)[1].type==="listItemPrefix"&&(u=o[1]._tokenizer.events,b=0,b<u.length&&u[b][1].type==="lineEndingBlank"&&(b+=2),b<u.length&&u[b][1].type==="content"))for(;++b<u.length&&u[b][1].type!=="content";)u[b][1].type==="chunkText"&&(u[b][1]._isInFirstContentOfListItem=!0,b++);if(o[0]==="enter")o[1].contentType&&(Object.assign(s,dy(_,l)),l=s[l],h=!0);else if(o[1]._container){for(b=l,v=void 0;b--;)if(p=_.get(b),p[1].type==="lineEnding"||p[1].type==="lineEndingBlank")p[0]==="enter"&&(v&&(_.get(v)[1].type="lineEndingBlank"),p[1].type="lineEnding",v=b);else if(!(p[1].type==="linePrefix"||p[1].type==="listItemIndent"))break;v&&(o[1].end={..._.get(v)[1].start},a=_.slice(v,l),a.unshift(o),_.splice(v,l-v+1,a))}}return Zt(n,0,Number.POSITIVE_INFINITY,_.slice(0)),!h}function dy(n,s){const l=n.get(s)[1],o=n.get(s)[2];let v=s-1;const b=[];let p=l._tokenizer;p||(p=o.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(p._contentTypeTextTrailing=!0));const a=p.events,u=[],h={};let _,c,C=-1,w=l,k=0,x=0;const S=[x];for(;w;){for(;n.get(++v)[1]!==w;);b.push(v),w._tokenizer||(_=o.sliceStream(w),w.next||_.push(null),c&&p.defineSkip(w.start),w._isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=!0),p.write(_),w._isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=void 0)),c=w,w=w.next}for(w=l;++C<a.length;)a[C][0]==="exit"&&a[C-1][0]==="enter"&&a[C][1].type===a[C-1][1].type&&a[C][1].start.line!==a[C][1].end.line&&(x=C+1,S.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(p.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),C=S.length;C--;){const m=a.slice(S[C],S[C+1]),d=b.pop();u.push([d,d+m.length-1]),n.splice(d,2,m)}for(u.reverse(),C=-1;++C<u.length;)h[k+u[C][0]]=k+u[C][1],k+=u[C][1]-u[C][0]-1;return h}const py={resolve:my,tokenize:gy},_y={partial:!0,tokenize:vy};function my(n){return im(n),n}function gy(n,s){let l;return o;function o(a){return n.enter("content"),l=n.enter("chunkContent",{contentType:"content"}),v(a)}function v(a){return a===null?b(a):we(a)?n.check(_y,p,b)(a):(n.consume(a),v)}function b(a){return n.exit("chunkContent"),n.exit("content"),s(a)}function p(a){return n.consume(a),n.exit("chunkContent"),l.next=n.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,v}}function vy(n,s,l){const o=this;return v;function v(p){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),Ie(n,b,"linePrefix")}function b(p){if(p===null||we(p))return l(p);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?s(p):n.interrupt(o.parser.constructs.flow,l,s)(p)}}function rm(n,s,l,o,v,b,p,a,u){const h=u||Number.POSITIVE_INFINITY;let _=0;return c;function c(m){return m===60?(n.enter(o),n.enter(v),n.enter(b),n.consume(m),n.exit(b),C):m===null||m===32||m===41||ra(m)?l(m):(n.enter(o),n.enter(p),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(m))}function C(m){return m===62?(n.enter(b),n.consume(m),n.exit(b),n.exit(v),n.exit(o),s):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(m))}function w(m){return m===62?(n.exit("chunkString"),n.exit(a),C(m)):m===null||m===60||we(m)?l(m):(n.consume(m),m===92?k:w)}function k(m){return m===60||m===62||m===92?(n.consume(m),w):w(m)}function x(m){return!_&&(m===null||m===41||et(m))?(n.exit("chunkString"),n.exit(a),n.exit(p),n.exit(o),s(m)):_<h&&m===40?(n.consume(m),_++,x):m===41?(n.consume(m),_--,x):m===null||m===32||m===40||ra(m)?l(m):(n.consume(m),m===92?S:x)}function S(m){return m===40||m===41||m===92?(n.consume(m),x):x(m)}}function sm(n,s,l,o,v,b){const p=this;let a=0,u;return h;function h(w){return n.enter(o),n.enter(v),n.consume(w),n.exit(v),n.enter(b),_}function _(w){return a>999||w===null||w===91||w===93&&!u||w===94&&!a&&"_hiddenFootnoteSupport"in p.parser.constructs?l(w):w===93?(n.exit(b),n.enter(v),n.consume(w),n.exit(v),n.exit(o),s):we(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),_):(n.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||we(w)||a++>999?(n.exit("chunkString"),_(w)):(n.consume(w),u||(u=!He(w)),w===92?C:c)}function C(w){return w===91||w===92||w===93?(n.consume(w),a++,c):c(w)}}function lm(n,s,l,o,v,b){let p;return a;function a(C){return C===34||C===39||C===40?(n.enter(o),n.enter(v),n.consume(C),n.exit(v),p=C===40?41:C,u):l(C)}function u(C){return C===p?(n.enter(v),n.consume(C),n.exit(v),n.exit(o),s):(n.enter(b),h(C))}function h(C){return C===p?(n.exit(b),u(p)):C===null?l(C):we(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),Ie(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),_(C))}function _(C){return C===p||C===null||we(C)?(n.exit("chunkString"),h(C)):(n.consume(C),C===92?c:_)}function c(C){return C===p||C===92?(n.consume(C),_):_(C)}}function Rs(n,s){let l;return o;function o(v){return we(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),l=!0,o):He(v)?Ie(n,o,l?"linePrefix":"lineSuffix")(v):s(v)}}const Sy={name:"definition",tokenize:by},yy={partial:!0,tokenize:Cy};function by(n,s,l){const o=this;let v;return b;function b(w){return n.enter("definition"),p(w)}function p(w){return sm.call(o,n,a,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return v=_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),u):l(w)}function u(w){return et(w)?Rs(n,h)(w):h(w)}function h(w){return rm(n,_,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function _(w){return n.attempt(yy,c,c)(w)}function c(w){return He(w)?Ie(n,C,"whitespace")(w):C(w)}function C(w){return w===null||we(w)?(n.exit("definition"),o.parser.defined.push(v),s(w)):l(w)}}function Cy(n,s,l){return o;function o(a){return et(a)?Rs(n,v)(a):l(a)}function v(a){return lm(n,b,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function b(a){return He(a)?Ie(n,p,"whitespace")(a):p(a)}function p(a){return a===null||we(a)?s(a):l(a)}}const wy={name:"hardBreakEscape",tokenize:xy};function xy(n,s,l){return o;function o(b){return n.enter("hardBreakEscape"),n.consume(b),v}function v(b){return we(b)?(n.exit("hardBreakEscape"),s(b)):l(b)}}const Ey={name:"headingAtx",resolve:ky,tokenize:Ay};function ky(n,s){let l=n.length-2,o=3,v,b;return n[o][1].type==="whitespace"&&(o+=2),l-2>o&&n[l][1].type==="whitespace"&&(l-=2),n[l][1].type==="atxHeadingSequence"&&(o===l-1||l-4>o&&n[l-2][1].type==="whitespace")&&(l-=o+1===l?2:4),l>o&&(v={type:"atxHeadingText",start:n[o][1].start,end:n[l][1].end},b={type:"chunkText",start:n[o][1].start,end:n[l][1].end,contentType:"text"},Zt(n,o,l-o+1,[["enter",v,s],["enter",b,s],["exit",b,s],["exit",v,s]])),n}function Ay(n,s,l){let o=0;return v;function v(_){return n.enter("atxHeading"),b(_)}function b(_){return n.enter("atxHeadingSequence"),p(_)}function p(_){return _===35&&o++<6?(n.consume(_),p):_===null||et(_)?(n.exit("atxHeadingSequence"),a(_)):l(_)}function a(_){return _===35?(n.enter("atxHeadingSequence"),u(_)):_===null||we(_)?(n.exit("atxHeading"),s(_)):He(_)?Ie(n,a,"whitespace")(_):(n.enter("atxHeadingText"),h(_))}function u(_){return _===35?(n.consume(_),u):(n.exit("atxHeadingSequence"),a(_))}function h(_){return _===null||_===35||et(_)?(n.exit("atxHeadingText"),a(_)):(n.consume(_),h)}}const Ty=["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"],a_=["pre","script","style","textarea"],Dy={concrete:!0,name:"htmlFlow",resolveTo:My,tokenize:Oy},Ry={partial:!0,tokenize:zy},Ly={partial:!0,tokenize:By};function My(n){let s=n.length;for(;s--&&!(n[s][0]==="enter"&&n[s][1].type==="htmlFlow"););return s>1&&n[s-2][1].type==="linePrefix"&&(n[s][1].start=n[s-2][1].start,n[s+1][1].start=n[s-2][1].start,n.splice(s-2,2)),n}function Oy(n,s,l){const o=this;let v,b,p,a,u;return h;function h(H){return _(H)}function _(H){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(H),c}function c(H){return H===33?(n.consume(H),C):H===47?(n.consume(H),b=!0,x):H===63?(n.consume(H),v=3,o.interrupt?s:M):Mt(H)?(n.consume(H),p=String.fromCharCode(H),S):l(H)}function C(H){return H===45?(n.consume(H),v=2,w):H===91?(n.consume(H),v=5,a=0,k):Mt(H)?(n.consume(H),v=4,o.interrupt?s:M):l(H)}function w(H){return H===45?(n.consume(H),o.interrupt?s:M):l(H)}function k(H){const ne="CDATA[";return H===ne.charCodeAt(a++)?(n.consume(H),a===ne.length?o.interrupt?s:F:k):l(H)}function x(H){return Mt(H)?(n.consume(H),p=String.fromCharCode(H),S):l(H)}function S(H){if(H===null||H===47||H===62||et(H)){const ne=H===47,de=p.toLowerCase();return!ne&&!b&&a_.includes(de)?(v=1,o.interrupt?s(H):F(H)):Ty.includes(p.toLowerCase())?(v=6,ne?(n.consume(H),m):o.interrupt?s(H):F(H)):(v=7,o.interrupt&&!o.parser.lazy[o.now().line]?l(H):b?d(H):g(H))}return H===45||Dt(H)?(n.consume(H),p+=String.fromCharCode(H),S):l(H)}function m(H){return H===62?(n.consume(H),o.interrupt?s:F):l(H)}function d(H){return He(H)?(n.consume(H),d):N(H)}function g(H){return H===47?(n.consume(H),N):H===58||H===95||Mt(H)?(n.consume(H),E):He(H)?(n.consume(H),g):N(H)}function E(H){return H===45||H===46||H===58||H===95||Dt(H)?(n.consume(H),E):R(H)}function R(H){return H===61?(n.consume(H),A):He(H)?(n.consume(H),R):g(H)}function A(H){return H===null||H===60||H===61||H===62||H===96?l(H):H===34||H===39?(n.consume(H),u=H,L):He(H)?(n.consume(H),A):T(H)}function L(H){return H===u?(n.consume(H),u=null,B):H===null||we(H)?l(H):(n.consume(H),L)}function T(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||et(H)?R(H):(n.consume(H),T)}function B(H){return H===47||H===62||He(H)?g(H):l(H)}function N(H){return H===62?(n.consume(H),V):l(H)}function V(H){return H===null||we(H)?F(H):He(H)?(n.consume(H),V):l(H)}function F(H){return H===45&&v===2?(n.consume(H),G):H===60&&v===1?(n.consume(H),X):H===62&&v===4?(n.consume(H),O):H===63&&v===3?(n.consume(H),M):H===93&&v===5?(n.consume(H),z):we(H)&&(v===6||v===7)?(n.exit("htmlFlowData"),n.check(Ry,P,U)(H)):H===null||we(H)?(n.exit("htmlFlowData"),U(H)):(n.consume(H),F)}function U(H){return n.check(Ly,Y,P)(H)}function Y(H){return n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),$}function $(H){return H===null||we(H)?U(H):(n.enter("htmlFlowData"),F(H))}function G(H){return H===45?(n.consume(H),M):F(H)}function X(H){return H===47?(n.consume(H),p="",se):F(H)}function se(H){if(H===62){const ne=p.toLowerCase();return a_.includes(ne)?(n.consume(H),O):F(H)}return Mt(H)&&p.length<8?(n.consume(H),p+=String.fromCharCode(H),se):F(H)}function z(H){return H===93?(n.consume(H),M):F(H)}function M(H){return H===62?(n.consume(H),O):H===45&&v===2?(n.consume(H),M):F(H)}function O(H){return H===null||we(H)?(n.exit("htmlFlowData"),P(H)):(n.consume(H),O)}function P(H){return n.exit("htmlFlow"),s(H)}}function By(n,s,l){const o=this;return v;function v(p){return we(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),b):l(p)}function b(p){return o.parser.lazy[o.now().line]?l(p):s(p)}}function zy(n,s,l){return o;function o(v){return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),n.attempt(zs,s,l)}}const Hy={name:"htmlText",tokenize:Ny};function Ny(n,s,l){const o=this;let v,b,p;return a;function a(M){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(M),u}function u(M){return M===33?(n.consume(M),h):M===47?(n.consume(M),R):M===63?(n.consume(M),g):Mt(M)?(n.consume(M),T):l(M)}function h(M){return M===45?(n.consume(M),_):M===91?(n.consume(M),b=0,k):Mt(M)?(n.consume(M),d):l(M)}function _(M){return M===45?(n.consume(M),w):l(M)}function c(M){return M===null?l(M):M===45?(n.consume(M),C):we(M)?(p=c,X(M)):(n.consume(M),c)}function C(M){return M===45?(n.consume(M),w):c(M)}function w(M){return M===62?G(M):M===45?C(M):c(M)}function k(M){const O="CDATA[";return M===O.charCodeAt(b++)?(n.consume(M),b===O.length?x:k):l(M)}function x(M){return M===null?l(M):M===93?(n.consume(M),S):we(M)?(p=x,X(M)):(n.consume(M),x)}function S(M){return M===93?(n.consume(M),m):x(M)}function m(M){return M===62?G(M):M===93?(n.consume(M),m):x(M)}function d(M){return M===null||M===62?G(M):we(M)?(p=d,X(M)):(n.consume(M),d)}function g(M){return M===null?l(M):M===63?(n.consume(M),E):we(M)?(p=g,X(M)):(n.consume(M),g)}function E(M){return M===62?G(M):g(M)}function R(M){return Mt(M)?(n.consume(M),A):l(M)}function A(M){return M===45||Dt(M)?(n.consume(M),A):L(M)}function L(M){return we(M)?(p=L,X(M)):He(M)?(n.consume(M),L):G(M)}function T(M){return M===45||Dt(M)?(n.consume(M),T):M===47||M===62||et(M)?B(M):l(M)}function B(M){return M===47?(n.consume(M),G):M===58||M===95||Mt(M)?(n.consume(M),N):we(M)?(p=B,X(M)):He(M)?(n.consume(M),B):G(M)}function N(M){return M===45||M===46||M===58||M===95||Dt(M)?(n.consume(M),N):V(M)}function V(M){return M===61?(n.consume(M),F):we(M)?(p=V,X(M)):He(M)?(n.consume(M),V):B(M)}function F(M){return M===null||M===60||M===61||M===62||M===96?l(M):M===34||M===39?(n.consume(M),v=M,U):we(M)?(p=F,X(M)):He(M)?(n.consume(M),F):(n.consume(M),Y)}function U(M){return M===v?(n.consume(M),v=void 0,$):M===null?l(M):we(M)?(p=U,X(M)):(n.consume(M),U)}function Y(M){return M===null||M===34||M===39||M===60||M===61||M===96?l(M):M===47||M===62||et(M)?B(M):(n.consume(M),Y)}function $(M){return M===47||M===62||et(M)?B(M):l(M)}function G(M){return M===62?(n.consume(M),n.exit("htmlTextData"),n.exit("htmlText"),s):l(M)}function X(M){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),se}function se(M){return He(M)?Ie(n,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return n.enter("htmlTextData"),p(M)}}const bc={name:"labelEnd",resolveAll:Py,resolveTo:Fy,tokenize:qy},jy={tokenize:Vy},Uy={tokenize:Gy},Iy={tokenize:Yy};function Py(n){let s=-1;const l=[];for(;++s<n.length;){const o=n[s][1];if(l.push(n[s]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const v=o.type==="labelImage"?4:2;o.type="data",s+=v}}return n.length!==l.length&&Zt(n,0,n.length,l),n}function Fy(n,s){let l=n.length,o=0,v,b,p,a;for(;l--;)if(v=n[l][1],b){if(v.type==="link"||v.type==="labelLink"&&v._inactive)break;n[l][0]==="enter"&&v.type==="labelLink"&&(v._inactive=!0)}else if(p){if(n[l][0]==="enter"&&(v.type==="labelImage"||v.type==="labelLink")&&!v._balanced&&(b=l,v.type!=="labelLink")){o=2;break}}else v.type==="labelEnd"&&(p=l);const u={type:n[b][1].type==="labelLink"?"link":"image",start:{...n[b][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[b][1].start},end:{...n[p][1].end}},_={type:"labelText",start:{...n[b+o+2][1].end},end:{...n[p-2][1].start}};return a=[["enter",u,s],["enter",h,s]],a=cn(a,n.slice(b+1,b+o+3)),a=cn(a,[["enter",_,s]]),a=cn(a,ha(s.parser.constructs.insideSpan.null,n.slice(b+o+4,p-3),s)),a=cn(a,[["exit",_,s],n[p-2],n[p-1],["exit",h,s]]),a=cn(a,n.slice(p+1)),a=cn(a,[["exit",u,s]]),Zt(n,b,n.length,a),n}function qy(n,s,l){const o=this;let v=o.events.length,b,p;for(;v--;)if((o.events[v][1].type==="labelImage"||o.events[v][1].type==="labelLink")&&!o.events[v][1]._balanced){b=o.events[v][1];break}return a;function a(C){return b?b._inactive?c(C):(p=o.parser.defined.includes(_n(o.sliceSerialize({start:b.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(C),n.exit("labelMarker"),n.exit("labelEnd"),u):l(C)}function u(C){return C===40?n.attempt(jy,_,p?_:c)(C):C===91?n.attempt(Uy,_,p?h:c)(C):p?_(C):c(C)}function h(C){return n.attempt(Iy,_,c)(C)}function _(C){return s(C)}function c(C){return b._balanced=!0,l(C)}}function Vy(n,s,l){return o;function o(c){return n.enter("resource"),n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),v}function v(c){return et(c)?Rs(n,b)(c):b(c)}function b(c){return c===41?_(c):rm(n,p,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function p(c){return et(c)?Rs(n,u)(c):_(c)}function a(c){return l(c)}function u(c){return c===34||c===39||c===40?lm(n,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):_(c)}function h(c){return et(c)?Rs(n,_)(c):_(c)}function _(c){return c===41?(n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),n.exit("resource"),s):l(c)}}function Gy(n,s,l){const o=this;return v;function v(a){return sm.call(o,n,b,p,"reference","referenceMarker","referenceString")(a)}function b(a){return o.parser.defined.includes(_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?s(a):l(a)}function p(a){return l(a)}}function Yy(n,s,l){return o;function o(b){return n.enter("reference"),n.enter("referenceMarker"),n.consume(b),n.exit("referenceMarker"),v}function v(b){return b===93?(n.enter("referenceMarker"),n.consume(b),n.exit("referenceMarker"),n.exit("reference"),s):l(b)}}const Wy={name:"labelStartImage",resolveAll:bc.resolveAll,tokenize:Ky};function Ky(n,s,l){const o=this;return v;function v(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),b}function b(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),p):l(a)}function p(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(a):s(a)}}const Xy={name:"labelStartLink",resolveAll:bc.resolveAll,tokenize:$y};function $y(n,s,l){const o=this;return v;function v(p){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),n.exit("labelLink"),b}function b(p){return p===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(p):s(p)}}const Pu={name:"lineEnding",tokenize:Qy};function Qy(n,s){return l;function l(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ie(n,s,"linePrefix")}}const ia={name:"thematicBreak",tokenize:Zy};function Zy(n,s,l){let o=0,v;return b;function b(h){return n.enter("thematicBreak"),p(h)}function p(h){return v=h,a(h)}function a(h){return h===v?(n.enter("thematicBreakSequence"),u(h)):o>=3&&(h===null||we(h))?(n.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===v?(n.consume(h),o++,u):(n.exit("thematicBreakSequence"),He(h)?Ie(n,a,"whitespace")(h):a(h))}}const Ft={continuation:{tokenize:n1},exit:r1,name:"list",tokenize:t1},Jy={partial:!0,tokenize:s1},e1={partial:!0,tokenize:i1};function t1(n,s,l){const o=this,v=o.events[o.events.length-1];let b=v&&v[1].type==="linePrefix"?v[2].sliceSerialize(v[1],!0).length:0,p=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:rc(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(ia,l,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(w)}return l(w)}function u(w){return rc(w)&&++p<10?(n.consume(w),u):(!o.interrupt||p<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):l(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,n.check(zs,o.interrupt?l:_,n.attempt(Jy,C,c))}function _(w){return o.containerState.initialBlankLine=!0,b++,C(w)}function c(w){return He(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),C):l(w)}function C(w){return o.containerState.size=b+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,s(w)}}function n1(n,s,l){const o=this;return o.containerState._closeFlow=void 0,n.check(zs,v,b);function v(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ie(n,s,"listItemIndent",o.containerState.size+1)(a)}function b(a){return o.containerState.furtherBlankLines||!He(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,p(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(e1,s,p)(a))}function p(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ie(n,n.attempt(Ft,s,l),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function i1(n,s,l){const o=this;return Ie(n,v,"listItemIndent",o.containerState.size+1);function v(b){const p=o.events[o.events.length-1];return p&&p[1].type==="listItemIndent"&&p[2].sliceSerialize(p[1],!0).length===o.containerState.size?s(b):l(b)}}function r1(n){n.exit(this.containerState.type)}function s1(n,s,l){const o=this;return Ie(n,v,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function v(b){const p=o.events[o.events.length-1];return!He(b)&&p&&p[1].type==="listItemPrefixWhitespace"?s(b):l(b)}}const o_={name:"setextUnderline",resolveTo:l1,tokenize:a1};function l1(n,s){let l=n.length,o,v,b;for(;l--;)if(n[l][0]==="enter"){if(n[l][1].type==="content"){o=l;break}n[l][1].type==="paragraph"&&(v=l)}else n[l][1].type==="content"&&n.splice(l,1),!b&&n[l][1].type==="definition"&&(b=l);const p={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[v][1].type="setextHeadingText",b?(n.splice(v,0,["enter",p,s]),n.splice(b+1,0,["exit",n[o][1],s]),n[o][1].end={...n[b][1].end}):n[o][1]=p,n.push(["exit",p,s]),n}function a1(n,s,l){const o=this;let v;return b;function b(h){let _=o.events.length,c;for(;_--;)if(o.events[_][1].type!=="lineEnding"&&o.events[_][1].type!=="linePrefix"&&o.events[_][1].type!=="content"){c=o.events[_][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||c)?(n.enter("setextHeadingLine"),v=h,p(h)):l(h)}function p(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===v?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),He(h)?Ie(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||we(h)?(n.exit("setextHeadingLine"),s(h)):l(h)}}const o1={tokenize:u1};function u1(n){const s=this,l=n.attempt(zs,o,n.attempt(this.parser.constructs.flowInitial,v,Ie(n,n.attempt(this.parser.constructs.flow,v,n.attempt(py,v)),"linePrefix")));return l;function o(b){if(b===null){n.consume(b);return}return n.enter("lineEndingBlank"),n.consume(b),n.exit("lineEndingBlank"),s.currentConstruct=void 0,l}function v(b){if(b===null){n.consume(b);return}return n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),s.currentConstruct=void 0,l}}const c1={resolveAll:om()},h1=am("string"),f1=am("text");function am(n){return{resolveAll:om(n==="text"?d1:void 0),tokenize:s};function s(l){const o=this,v=this.parser.constructs[n],b=l.attempt(v,p,a);return p;function p(_){return h(_)?b(_):a(_)}function a(_){if(_===null){l.consume(_);return}return l.enter("data"),l.consume(_),u}function u(_){return h(_)?(l.exit("data"),b(_)):(l.consume(_),u)}function h(_){if(_===null)return!0;const c=v[_];let C=-1;if(c)for(;++C<c.length;){const w=c[C];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function om(n){return s;function s(l,o){let v=-1,b;for(;++v<=l.length;)b===void 0?l[v]&&l[v][1].type==="data"&&(b=v,v++):(!l[v]||l[v][1].type!=="data")&&(v!==b+2&&(l[b][1].end=l[v-1][1].end,l.splice(b+2,v-b-2),v=b+2),b=void 0);return n?n(l,o):l}}function d1(n,s){let l=0;for(;++l<=n.length;)if((l===n.length||n[l][1].type==="lineEnding")&&n[l-1][1].type==="data"){const o=n[l-1][1],v=s.sliceStream(o);let b=v.length,p=-1,a=0,u;for(;b--;){const h=v[b];if(typeof h=="string"){for(p=h.length;h.charCodeAt(p-1)===32;)a++,p--;if(p)break;p=-1}else if(h===-2)u=!0,a++;else if(h!==-1){b++;break}}if(s._contentTypeTextTrailing&&l===n.length&&(a=0),a){const h={type:l===n.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:b?p:o.start._bufferIndex+p,_index:o.start._index+b,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(l,0,["enter",h,s],["exit",h,s]),l+=2)}l++}return n}const p1={42:Ft,43:Ft,45:Ft,48:Ft,49:Ft,50:Ft,51:Ft,52:Ft,53:Ft,54:Ft,55:Ft,56:Ft,57:Ft,62:em},_1={91:Sy},m1={[-2]:Iu,[-1]:Iu,32:Iu},g1={35:Ey,42:ia,45:[o_,ia],60:Dy,61:o_,95:ia,96:l_,126:l_},v1={38:nm,92:tm},S1={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:Wy,38:nm,42:sc,60:[XS,Hy],91:Xy,92:[wy,tm],93:bc,95:sc,96:oy},y1={null:[sc,c1]},b1={null:[42,95]},C1={null:[]},w1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:b1,contentInitial:_1,disable:C1,document:p1,flow:g1,flowInitial:m1,insideSpan:y1,string:v1,text:S1},Symbol.toStringTag,{value:"Module"}));function x1(n,s,l){let o={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const v={},b=[];let p=[],a=[];const u={attempt:L(R),check:L(A),consume:d,enter:g,exit:E,interrupt:L(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:C,sliceStream:w,write:c};let _=s.tokenize.call(h,u);return s.resolveAll&&b.push(s),h;function c(V){return p=cn(p,V),S(),p[p.length-1]!==null?[]:(T(s,0),h.events=ha(b,h.events,h),h.events)}function C(V,F){return k1(w(V),F)}function w(V){return E1(p,V)}function k(){const{_bufferIndex:V,_index:F,line:U,column:Y,offset:$}=o;return{_bufferIndex:V,_index:F,line:U,column:Y,offset:$}}function x(V){v[V.line]=V.column,N()}function S(){let V;for(;o._index<p.length;){const F=p[o._index];if(typeof F=="string")for(V=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===V&&o._bufferIndex<F.length;)m(F.charCodeAt(o._bufferIndex));else m(F)}}function m(V){_=_(V)}function d(V){we(V)?(o.line++,o.column=1,o.offset+=V===-3?2:1,N()):V!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===p[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=V}function g(V,F){const U=F||{};return U.type=V,U.start=k(),h.events.push(["enter",U,h]),a.push(U),U}function E(V){const F=a.pop();return F.end=k(),h.events.push(["exit",F,h]),F}function R(V,F){T(V,F.from)}function A(V,F){F.restore()}function L(V,F){return U;function U(Y,$,G){let X,se,z,M;return Array.isArray(Y)?P(Y):"tokenize"in Y?P([Y]):O(Y);function O(pe){return K;function K(I){const ae=I!==null&&pe[I],Z=I!==null&&pe.null,ee=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return P(ee)(I)}}function P(pe){return X=pe,se=0,pe.length===0?G:H(pe[se])}function H(pe){return K;function K(I){return M=B(),z=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?de():pe.tokenize.call(F?Object.assign(Object.create(h),F):h,u,ne,de)(I)}}function ne(pe){return V(z,M),$}function de(pe){return M.restore(),++se<X.length?H(X[se]):G}}}function T(V,F){V.resolveAll&&!b.includes(V)&&b.push(V),V.resolve&&Zt(h.events,F,h.events.length-F,V.resolve(h.events.slice(F),h)),V.resolveTo&&(h.events=V.resolveTo(h.events,h))}function B(){const V=k(),F=h.previous,U=h.currentConstruct,Y=h.events.length,$=Array.from(a);return{from:Y,restore:G};function G(){o=V,h.previous=F,h.currentConstruct=U,h.events.length=Y,a=$,N()}}function N(){o.line in v&&o.column<2&&(o.column=v[o.line],o.offset+=v[o.line]-1)}}function E1(n,s){const l=s.start._index,o=s.start._bufferIndex,v=s.end._index,b=s.end._bufferIndex;let p;if(l===v)p=[n[l].slice(o,b)];else{if(p=n.slice(l,v),o>-1){const a=p[0];typeof a=="string"?p[0]=a.slice(o):p.shift()}b>0&&p.push(n[v].slice(0,b))}return p}function k1(n,s){let l=-1;const o=[];let v;for(;++l<n.length;){const b=n[l];let p;if(typeof b=="string")p=b;else switch(b){case-5:{p="\r";break}case-4:{p=`
57
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&T&&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(T){const B=this._getMouseBufferCoords(T),N=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(N&&F&&B)&&this._areCoordsInSelection(B,N,F)}isCellInSelection(T,B){const N=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!N||!F)&&this._areCoordsInSelection([T,B],N,F)}_areCoordsInSelection(T,B,N){return T[1]>B[1]&&T[1]<N[1]||B[1]===N[1]&&T[1]===B[1]&&T[0]>=B[0]&&T[0]<N[0]||B[1]<N[1]&&T[1]===N[1]&&T[0]<N[0]||B[1]<N[1]&&T[1]===B[1]&&T[0]>=B[0]}_selectWordAtCursor(T,B){var G,q;const N=(q=(G=this._linkifier.currentLink)==null?void 0:G.link)==null?void 0:q.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,d.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(T);return!!F&&(this._selectWordAt(F,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,B){this._model.clearSelection(),T=Math.max(T,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const B=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(T){let B=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=N?0:(B>N&&(B-=N),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(T){return _.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const B=this._getMouseBufferCoords(T);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(T){return T.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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(T),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 F=N.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}B&&B[0]===this._model.selectionEnd[0]&&B[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 T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const B=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const F=(0,C.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,N=!(!T||!B||T[0]===B[0]&&T[1]===B[1]);N?T&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,B,N)):this._oldHasSelection&&this._fireOnSelectionChange(T,B,N)}_fireOnSelectionChange(T,B,N){this._oldSelectionStart=T,this._oldSelectionEnd=B,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(T,B){let N=B;for(let F=0;B>=F;F++){const G=T.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:G>1&&B!==F&&(N+=G-1)}return N}setSelection(T,B,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,B],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,B,N=!0,F=!0){if(T[0]>=this._bufferService.cols)return;const G=this._bufferService.buffer,q=G.lines.get(T[1]);if(!q)return;const $=G.translateBufferLineToString(T[1],!1);let W=this._convertViewportColToCharacterIndex(q,T[0]),P=W;const Y=T[0]-W;let ee=0,z=0,M=0,O=0;if($.charAt(W)===" "){for(;W>0&&$.charAt(W-1)===" ";)W--;for(;P<$.length&&$.charAt(P+1)===" ";)P++}else{let ie=T[0],pe=T[0];q.getWidth(ie)===0&&(ee++,ie--),q.getWidth(pe)===2&&(z++,pe++);const de=q.getString(pe).length;for(de>1&&(O+=de-1,P+=de-1);ie>0&&W>0&&!this._isCharWordSeparator(q.loadCell(ie-1,this._workCell));){q.loadCell(ie-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,ie--):X>1&&(M+=X-1,W-=X-1),W--,ie--}for(;pe<q.length&&P+1<$.length&&!this._isCharWordSeparator(q.loadCell(pe+1,this._workCell));){q.loadCell(pe+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,pe++):X>1&&(O+=X-1,P+=X-1),P++,pe++}}P++;let I=W+Y-ee+M,H=Math.min(this._bufferService.cols,P-W+ee+z-M-O);if(B||$.slice(W,P).trim()!==""){if(N&&I===0&&q.getCodePoint(0)!==32){const ie=G.lines.get(T[1]-1);if(ie&&q.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const pe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(pe){const de=this._bufferService.cols-pe.start;I-=de,H+=de}}}if(F&&I+H===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ie=G.lines.get(T[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const pe=this._getWordAt([0,T[1]+1],!1,!1,!0);pe&&(H+=pe.length)}}return{start:I,length:H}}}_selectWordAt(T,B){const N=this._getWordAt(T,B);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[N.start,T[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(T){const B=this._getWordAt(T,!0);if(B){let N=T[1];for(;B.start<0;)B.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,N]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const B=this._bufferService.buffer.getWrappedRangeForLine(T),N={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,d.getRangeLength)(N,this._bufferService.cols)}};a.SelectionService=L=h([m(3,E.IBufferService),m(4,E.ICoreService),m(5,k.IMouseService),m(6,E.IOptionsService),m(7,k.IRenderService),m(8,k.ICoreBrowserService)],L)},4725:(p,a,u)=>{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=u(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(p,a,u){var h=this&&this.__decorate||function(L,T,B,N){var F,G=arguments.length,q=G<3?T:N===null?N=Object.getOwnPropertyDescriptor(T,B):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(L,T,B,N);else for(var $=L.length-1;$>=0;$--)(F=L[$])&&(q=(G<3?F(q):G>3?F(T,B,q):F(T,B))||q);return G>3&&q&&Object.defineProperty(T,B,q),q},m=this&&this.__param||function(L,T){return function(B,N){T(B,N,L)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),C=u(8055),w=u(8460),k=u(844),x=u(2585),S=C.css.toColor("#ffffff"),_=C.css.toColor("#000000"),d=C.css.toColor("#ffffff"),g=C.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const L=[C.css.toColor("#2e3436"),C.css.toColor("#cc0000"),C.css.toColor("#4e9a06"),C.css.toColor("#c4a000"),C.css.toColor("#3465a4"),C.css.toColor("#75507b"),C.css.toColor("#06989a"),C.css.toColor("#d3d7cf"),C.css.toColor("#555753"),C.css.toColor("#ef2929"),C.css.toColor("#8ae234"),C.css.toColor("#fce94f"),C.css.toColor("#729fcf"),C.css.toColor("#ad7fa8"),C.css.toColor("#34e2e2"),C.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let B=0;B<216;B++){const N=T[B/36%6|0],F=T[B/6%6|0],G=T[B%6];L.push({css:C.channels.toCss(N,F,G),rgba:C.channels.toRgba(N,F,G)})}for(let B=0;B<24;B++){const N=8+10*B;L.push({css:C.channels.toCss(N,N,N),rgba:C.channels.toRgba(N,N,N)})}return L})());let R=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(L){super(),this._optionsService=L,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:_,cursor:d,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:C.color.blend(_,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:C.color.blend(_,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(L={}){const T=this._colors;if(T.foreground=A(L.foreground,S),T.background=A(L.background,_),T.cursor=A(L.cursor,d),T.cursorAccent=A(L.cursorAccent,g),T.selectionBackgroundTransparent=A(L.selectionBackground,E),T.selectionBackgroundOpaque=C.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(L.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=C.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=L.selectionForeground?A(L.selectionForeground,C.NULL_COLOR):void 0,T.selectionForeground===C.NULL_COLOR&&(T.selectionForeground=void 0),C.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=C.color.opacity(T.selectionBackgroundTransparent,.3)),C.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=C.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=a.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=A(L.black,a.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=A(L.red,a.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=A(L.green,a.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=A(L.yellow,a.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=A(L.blue,a.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=A(L.magenta,a.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=A(L.cyan,a.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=A(L.white,a.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=A(L.brightBlack,a.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=A(L.brightRed,a.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=A(L.brightGreen,a.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=A(L.brightYellow,a.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=A(L.brightBlue,a.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=A(L.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=A(L.brightCyan,a.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=A(L.brightWhite,a.DEFAULT_ANSI_COLORS[15]),L.extendedAnsi){const B=Math.min(T.ansi.length-16,L.extendedAnsi.length);for(let N=0;N<B;N++)T.ansi[N+16]=A(L.extendedAnsi[N],a.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(L){this._restoreColor(L),this._onChangeColors.fire(this.colors)}_restoreColor(L){if(L!==void 0)switch(L){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[L]=this._restoreColors.ansi[L]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(L){L(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function A(L,T){if(L!==void 0)try{return C.css.toColor(L)}catch{}return T}a.ThemeService=R=h([m(0,x.IOptionsService)],R)},6349:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=u(8460),m=u(844);class c extends m.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 _=k-1;_>=0;_--)this.set(w+_+x,this.get(w+_));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=c},1439:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(h,m=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const C in h)c[C]=m<=1?h[C]:h[C]&&u(h[C],m-1);return c}},8055:(p,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 u=0,h=0,m=0,c=0;var C,w,k,x,S;function _(g){const E=g.toString(16);return E.length<2?"0"+E:E}function d(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(g){g.toCss=function(E,R,A,L){return L!==void 0?`#${_(E)}${_(R)}${_(A)}${_(L)}`:`#${_(E)}${_(R)}${_(A)}`},g.toRgba=function(E,R,A,L=255){return(E<<24|R<<16|A<<8|L)>>>0},g.toColor=function(E,R,A,L){return{css:g.toCss(E,R,A,L),rgba:g.toRgba(E,R,A,L)}}})(C||(a.channels=C={})),(function(g){function E(R,A){return c=Math.round(255*A),[u,h,m]=S.toChannels(R.rgba),{css:C.toCss(u,h,m,c),rgba:C.toRgba(u,h,m,c)}}g.blend=function(R,A){if(c=(255&A.rgba)/255,c===1)return{css:A.css,rgba:A.rgba};const L=A.rgba>>24&255,T=A.rgba>>16&255,B=A.rgba>>8&255,N=R.rgba>>24&255,F=R.rgba>>16&255,G=R.rgba>>8&255;return u=N+Math.round((L-N)*c),h=F+Math.round((T-F)*c),m=G+Math.round((B-G)*c),{css:C.toCss(u,h,m),rgba:C.toRgba(u,h,m)}},g.isOpaque=function(R){return(255&R.rgba)==255},g.ensureContrastRatio=function(R,A,L){const T=S.ensureContrastRatio(R.rgba,A.rgba,L);if(T)return C.toColor(T>>24&255,T>>16&255,T>>8&255)},g.opaque=function(R){const A=(255|R.rgba)>>>0;return[u,h,m]=S.toChannels(A),{css:C.toCss(u,h,m),rgba:A}},g.opacity=E,g.multiplyOpacity=function(R,A){return c=255&R.rgba,E(R,c*A/255)},g.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(w||(a.color=w={})),(function(g){let E,R;try{const A=document.createElement("canvas");A.width=1,A.height=1;const L=A.getContext("2d",{willReadFrequently:!0});L&&(E=L,E.globalCompositeOperation="copy",R=E.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),m=parseInt(A.slice(3,4).repeat(2),16),C.toColor(u,h,m);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),m=parseInt(A.slice(3,4).repeat(2),16),c=parseInt(A.slice(4,5).repeat(2),16),C.toColor(u,h,m,c);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const L=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(L)return u=parseInt(L[1]),h=parseInt(L[2]),m=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),C.toColor(u,h,m,c);if(!E||!R)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=R,E.fillStyle=A,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,h,m,c]=E.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:C.toRgba(u,h,m,c),css:A}}})(k||(a.css=k={})),(function(g){function E(R,A,L){const T=R/255,B=A/255,N=L/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}g.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},g.relativeLuminance2=E})(x||(a.rgb=x={})),(function(g){function E(A,L,T){const B=A>>24&255,N=A>>16&255,F=A>>8&255;let G=L>>24&255,q=L>>16&255,$=L>>8&255,W=d(x.relativeLuminance2(G,q,$),x.relativeLuminance2(B,N,F));for(;W<T&&(G>0||q>0||$>0);)G-=Math.max(0,Math.ceil(.1*G)),q-=Math.max(0,Math.ceil(.1*q)),$-=Math.max(0,Math.ceil(.1*$)),W=d(x.relativeLuminance2(G,q,$),x.relativeLuminance2(B,N,F));return(G<<24|q<<16|$<<8|255)>>>0}function R(A,L,T){const B=A>>24&255,N=A>>16&255,F=A>>8&255;let G=L>>24&255,q=L>>16&255,$=L>>8&255,W=d(x.relativeLuminance2(G,q,$),x.relativeLuminance2(B,N,F));for(;W<T&&(G<255||q<255||$<255);)G=Math.min(255,G+Math.ceil(.1*(255-G))),q=Math.min(255,q+Math.ceil(.1*(255-q))),$=Math.min(255,$+Math.ceil(.1*(255-$))),W=d(x.relativeLuminance2(G,q,$),x.relativeLuminance2(B,N,F));return(G<<24|q<<16|$<<8|255)>>>0}g.blend=function(A,L){if(c=(255&L)/255,c===1)return L;const T=L>>24&255,B=L>>16&255,N=L>>8&255,F=A>>24&255,G=A>>16&255,q=A>>8&255;return u=F+Math.round((T-F)*c),h=G+Math.round((B-G)*c),m=q+Math.round((N-q)*c),C.toRgba(u,h,m)},g.ensureContrastRatio=function(A,L,T){const B=x.relativeLuminance(A>>8),N=x.relativeLuminance(L>>8);if(d(B,N)<T){if(N<B){const q=E(A,L,T),$=d(B,x.relativeLuminance(q>>8));if($<T){const W=R(A,L,T);return $>d(B,x.relativeLuminance(W>>8))?q:W}return q}const F=R(A,L,T),G=d(B,x.relativeLuminance(F>>8));if(G<T){const q=E(A,L,T);return G>d(B,x.relativeLuminance(q>>8))?F:q}return F}},g.reduceLuminance=E,g.increaseLuminance=R,g.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(S||(a.rgba=S={})),a.toPaddedHex=_,a.contrastRatio=d},8969:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),m=u(2585),c=u(4348),C=u(7866),w=u(744),k=u(7302),x=u(6975),S=u(8460),_=u(1753),d=u(1480),g=u(7994),E=u(9282),R=u(5435),A=u(5981),L=u(2660);let T=!1;class B extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((F=>{var G;(G=this._onScrollApi)==null||G.fire(F.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(F){for(const G in F)this.optionsService.options[G]=F[G]}constructor(F){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 c.InstantiationService,this.optionsService=this.register(new k.OptionsService(F)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(C.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(d.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(L.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.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((G=>{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((G=>{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 A.WriteBuffer(((G,q)=>this._inputHandler.parse(G,q)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,G){this._writeBuffer.write(F,G)}writeSync(F,G){this._logService.logLevel<=m.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(F,G)}input(F,G=!0){this.coreService.triggerDataEvent(F,G)}resize(F,G){isNaN(F)||isNaN(G)||(F=Math.max(F,w.MINIMUM_COLS),G=Math.max(G,w.MINIMUM_ROWS),this._bufferService.resize(F,G))}scroll(F,G=!1){this._bufferService.scroll(F,G)}scrollLines(F,G,q){this._bufferService.scrollLines(F,G,q)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const G=F-this._bufferService.buffer.ydisp;G!==0&&this.scrollLines(G)}registerEscHandler(F,G){return this._inputHandler.registerEscHandler(F,G)}registerDcsHandler(F,G){return this._inputHandler.registerDcsHandler(F,G)}registerCsiHandler(F,G){return this._inputHandler.registerCsiHandler(F,G)}registerOscHandler(F,G){return this._inputHandler.registerOscHandler(F,G)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const G=this.optionsService.rawOptions.windowsPty;G&&G.buildNumber!==void 0&&G.buildNumber!==void 0?F=G.backend==="conpty"&&G.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const G of F)G.dispose()}))}}}a.CoreTerminal=B},8460:(p,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===u)return void this._listeners.splice(h,1)}}})),this._event}fire(u,h){const m=[];for(let c=0;c<this._listeners.length;c++)m.push(this._listeners[c]);for(let c=0;c<m.length;c++)m[c].call(void 0,u,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,h){return u((m=>h.fire(m)))},a.runAndSubscribe=function(u,h){return h(void 0),u((m=>h(m)))}},5435:function(p,a,u){var h=this&&this.__decorate||function(ee,z,M,O){var I,H=arguments.length,ie=H<3?z:O===null?O=Object.getOwnPropertyDescriptor(z,M):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(ee,z,M,O);else for(var pe=ee.length-1;pe>=0;pe--)(I=ee[pe])&&(ie=(H<3?I(ie):H>3?I(z,M,ie):I(z,M))||ie);return H>3&&ie&&Object.defineProperty(z,M,ie),ie},m=this&&this.__param||function(ee,z){return function(M,O){z(M,O,ee)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=u(2584),C=u(7116),w=u(2015),k=u(844),x=u(482),S=u(8437),_=u(8460),d=u(643),g=u(511),E=u(3734),R=u(2585),A=u(1480),L=u(6242),T=u(6351),B=u(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function G(ee,z){if(ee>24)return z.setWinLines||!1;switch(ee){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var q;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(a.WindowsOptionsReportType=q={}));let $=0;class W extends k.Disposable{getAttrData(){return this._curAttrData}constructor(z,M,O,I,H,ie,pe,de,X=new w.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=M,this._coreService=O,this._logService=I,this._optionsService=H,this._oscLinkService=ie,this._coreMouseService=pe,this._unicodeService=de,this._parser=X,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new g.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 _.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new _.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new _.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new _.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new _.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new _.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new _.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new _.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new _.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new _.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new _.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 P(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:ae.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,ae,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:ae,data:Z})})),this._parser.setDcsHandlerFallback(((U,ae,Z)=>{ae==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:ae,payload:Z})})),this._parser.setPrintHandler(((U,ae,Z)=>this.print(U,ae,Z))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new L.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new L.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new L.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new L.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new L.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new L.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new L.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new L.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new L.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new L.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new L.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new L.OscHandler((U=>this.restoreCursorColor(U)))),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 U in C.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((U,ae)=>this.requestStatusString(U,ae))))}_preserveStack(z,M,O,I){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=O,this._parseStack.position=I}_logSlowResolvingAsync(z){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([z,new Promise(((M,O)=>setTimeout((()=>O("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(z,M){let O,I=this._activeBuffer.x,H=this._activeBuffer.y,ie=0;const pe=this._parseStack.paused;if(pe){if(O=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(O),O;I=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>F&&(ie=this._parseStack.position+F)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,(U=>String.fromCharCode(U))).join("")}"`),typeof z=="string"?z.split("").map((U=>U.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(z.length,F))),pe||this._dirtyRowTracker.clearRange(),z.length>F)for(let U=ie;U<z.length;U+=F){const ae=U+F<z.length?U+F:z.length,Z=typeof z=="string"?this._stringDecoder.decode(z.substring(U,ae),this._parseBuffer):this._utf8Decoder.decode(z.subarray(U,ae),this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,Z))return this._preserveStack(I,H,Z,U),this._logSlowResolvingAsync(O),O}else if(!pe){const U=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,U))return this._preserveStack(I,H,U,0),this._logSlowResolvingAsync(O),O}this._activeBuffer.x===I&&this._activeBuffer.y===H||this._onCursorMove.fire();const de=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),X=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);X<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(X,this._bufferService.rows-1),Math.min(de,this._bufferService.rows-1))}print(z,M,O){let I,H;const ie=this._charsetService.charset,pe=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,ae=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&O-M>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let te=this._parser.precedingJoinState;for(let oe=M;oe<O;++oe){if(I=z[oe],I<127&&ie){const at=ie[String.fromCharCode(I)];at&&(I=at.charCodeAt(0))}const Se=this._unicodeService.charProperties(I,te);H=A.UnicodeService.extractWidth(Se);const xe=A.UnicodeService.extractShouldJoin(Se),Ye=xe?A.UnicodeService.extractWidth(te):0;if(te=Se,pe&&this._onA11yChar.fire((0,x.stringFromCodePoint)(I)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+H-Ye>de){if(X){const at=Z;let ke=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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&Z instanceof S.BufferLine&&Z.copyCellsFrom(at,ke,0,Ye,!1);ke<de;)at.setCellFromCodepoint(ke++,0,1,ae)}else if(this._activeBuffer.x=de-1,H===2)continue}if(xe&&this._activeBuffer.x){const at=Z.getWidth(this._activeBuffer.x-1)?1:2;Z.addCodepointToCell(this._activeBuffer.x-at,I,H);for(let ke=H-Ye;--ke>=0;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(U&&(Z.insertCells(this._activeBuffer.x,H-Ye,this._activeBuffer.getNullCell(ae)),Z.getWidth(de-1)===2&&Z.setCellFromCodepoint(de-1,d.NULL_CELL_CODE,d.NULL_CELL_WIDTH,ae)),Z.setCellFromCodepoint(this._activeBuffer.x++,I,H,ae),H>0)for(;--H;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=te,this._activeBuffer.x<de&&O-M>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,M){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,M):this._parser.registerCsiHandler(z,(O=>!G(O.params[0],this._optionsService.rawOptions.windowOptions)||M(O)))}registerDcsHandler(z,M){return this._parser.registerDcsHandler(z,new T.DcsHandler(M))}registerEscHandler(z,M){return this._parser.registerEscHandler(z,M)}registerOscHandler(z,M){return this._parser.registerOscHandler(z,new L.OscHandler(M))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var z;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(z,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=z,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+M)}cursorUp(z){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const M=z.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=z.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=z.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const M=z.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,M,O,I=!1,H=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);ie.replaceCells(M,O,this._activeBuffer.getNullCell(this._eraseAttrData()),H),I&&(ie.isWrapped=!1)}_resetBufferLine(z,M=!1){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);O&&(O.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),O.isWrapped=!1)}eraseInDisplay(z,M=!1){let O;switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);O<this._bufferService.rows;O++)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(O);break;case 1:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(O+1).isWrapped=!1);O--;)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(O=this._bufferService.rows,this._dirtyRowTracker.markDirty(O-1);O--;)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(0);break;case 3:const I=this._activeBuffer.lines.length-this._bufferService.rows;I>0&&(this._activeBuffer.lines.trimStart(I),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-I,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-I,0),this._onScroll.fire(0))}return!0}eraseInLine(z,M=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(z){this._restrictCursor();let M=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y,I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-I+1;for(;M--;)this._activeBuffer.lines.splice(H-1,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(z){this._restrictCursor();let M=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y;let I;for(I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-I;M--;)this._activeBuffer.lines.splice(O,1),this._activeBuffer.lines.splice(I,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let M=z.params[0]||1;for(;M--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(z){let M=z.params[0]||1;for(;M--;)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(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);I.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const M=this._parser.precedingJoinState;if(!M)return!0;const O=z.params[0]||1,I=A.UnicodeService.extractWidth(M),H=this._activeBuffer.x-I,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(H),pe=new Uint32Array(ie.length*O);let de=0;for(let U=0;U<ie.length;){const ae=ie.codePointAt(U)||0;pe[de++]=ae,U+=ae>65535?2:1}let X=de;for(let U=1;U<O;++U)pe.copyWithin(X,0,de),X+=de;return this.print(pe,0,X),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),this._charsetService.setgCharset(1,C.DEFAULT_CHARSET),this._charsetService.setgCharset(2,C.DEFAULT_CHARSET),this._charsetService.setgCharset(3,C.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),z.params[M]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(z,M){const O=this._coreService.decPrivateModes,{activeProtocol:I,activeEncoding:H}=this._coreMouseService,ie=this._coreService,{buffers:pe,cols:de}=this._bufferService,{active:X,alt:U}=pe,ae=this._optionsService.rawOptions,Z=xe=>xe?1:2,te=z.params[0];return oe=te,Se=M?te===2?4:te===4?Z(ie.modes.insertMode):te===12?3:te===20?Z(ae.convertEol):0:te===1?Z(O.applicationCursorKeys):te===3?ae.windowOptions.setWinLines?de===80?2:de===132?1:0:0:te===6?Z(O.origin):te===7?Z(O.wraparound):te===8?3:te===9?Z(I==="X10"):te===12?Z(ae.cursorBlink):te===25?Z(!ie.isCursorHidden):te===45?Z(O.reverseWraparound):te===66?Z(O.applicationKeypad):te===67?4:te===1e3?Z(I==="VT200"):te===1002?Z(I==="DRAG"):te===1003?Z(I==="ANY"):te===1004?Z(O.sendFocus):te===1005?4:te===1006?Z(H==="SGR"):te===1015?4:te===1016?Z(H==="SGR_PIXELS"):te===1048?1:te===47||te===1047||te===1049?Z(X===U):te===2004?Z(O.bracketedPasteMode):0,ie.triggerDataEvent(`${c.C0.ESC}[${M?"":"?"}${oe};${Se}$y`),!0;var oe,Se}_updateAttrColor(z,M,O,I,H){return M===2?(z|=50331648,z&=-16777216,z|=E.AttributeData.fromColorRGB([O,I,H])):M===5&&(z&=-50331904,z|=33554432|255&O),z}_extractColor(z,M,O){const I=[0,0,-1,0,0,0];let H=0,ie=0;do{if(I[ie+H]=z.params[M+ie],z.hasSubParams(M+ie)){const pe=z.getSubParams(M+ie);let de=0;do I[1]===5&&(H=1),I[ie+de+1+H]=pe[de];while(++de<pe.length&&de+ie+1+H<I.length);break}if(I[1]===5&&ie+H>=2||I[1]===2&&ie+H>=5)break;I[1]&&(H=1)}while(++ie+M<z.length&&ie+H<I.length);for(let pe=2;pe<I.length;++pe)I[pe]===-1&&(I[pe]=0);switch(I[0]){case 38:O.fg=this._updateAttrColor(O.fg,I[1],I[3],I[4],I[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,I[1],I[3],I[4],I[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,I[1],I[3],I[4],I[5])}return ie}_processUnderline(z,M){M.extended=M.extended.clone(),(!~z||z>5)&&(z=1),M.extended.underlineStyle=z,M.fg|=268435456,z===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(z){z.fg=S.DEFAULT_ATTR_DATA.fg,z.bg=S.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=z.length;let O;const I=this._curAttrData;for(let H=0;H<M;H++)O=z.params[H],O>=30&&O<=37?(I.fg&=-50331904,I.fg|=16777216|O-30):O>=40&&O<=47?(I.bg&=-50331904,I.bg|=16777216|O-40):O>=90&&O<=97?(I.fg&=-50331904,I.fg|=16777224|O-90):O>=100&&O<=107?(I.bg&=-50331904,I.bg|=16777224|O-100):O===0?this._processSGR0(I):O===1?I.fg|=134217728:O===3?I.bg|=67108864:O===4?(I.fg|=268435456,this._processUnderline(z.hasSubParams(H)?z.getSubParams(H)[0]:1,I)):O===5?I.fg|=536870912:O===7?I.fg|=67108864:O===8?I.fg|=1073741824:O===9?I.fg|=2147483648:O===2?I.bg|=134217728:O===21?this._processUnderline(2,I):O===22?(I.fg&=-134217729,I.bg&=-134217729):O===23?I.bg&=-67108865:O===24?(I.fg&=-268435457,this._processUnderline(0,I)):O===25?I.fg&=-536870913:O===27?I.fg&=-67108865:O===28?I.fg&=-1073741825:O===29?I.fg&=2147483647:O===39?(I.fg&=-67108864,I.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):O===49?(I.bg&=-67108864,I.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):O===38||O===48||O===58?H+=this._extractColor(z,H,I):O===53?I.bg|=1073741824:O===55?I.bg&=-1073741825:O===59?(I.extended=I.extended.clone(),I.extended.underlineColor=-1,I.updateExtended()):O===100?(I.fg&=-67108864,I.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,I.bg&=-67108864,I.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",O);return!0}deviceStatus(z){switch(z.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${M};${O}R`)}return!0}deviceStatusPrivate(z){if(z.params[0]===6){const M=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${M};${O}R`)}return!0}softReset(z){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=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(z){const M=z.params[0]||1;switch(M){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 O=M%2==1;return this._optionsService.options.cursorBlink=O,!0}setScrollRegion(z){const M=z.params[0]||1;let O;return(z.length<2||(O=z.params[1])>this._bufferService.rows||O===0)&&(O=this._bufferService.rows),O>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=O-1,this._setCursor(0,0)),!0}windowOptions(z){if(!G(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(z){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(z){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const M=[],O=z.split(";");for(;O.length>1;){const I=O.shift(),H=O.shift();if(/^\d+$/.exec(I)){const ie=parseInt(I);if(Y(ie))if(H==="?")M.push({type:0,index:ie});else{const pe=(0,B.parseColor)(H);pe&&M.push({type:1,index:ie,color:pe})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(z){const M=z.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(z,M){this._getCurrentLinkId()&&this._finishHyperlink();const O=z.split(":");let I;const H=O.findIndex((ie=>ie.startsWith("id=")));return H!==-1&&(I=O[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:I,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(z,M){const O=z.split(";");for(let I=0;I<O.length&&!(M>=this._specialColors.length);++I,++M)if(O[I]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const H=(0,B.parseColor)(O[I]);H&&this._onColor.fire([{type:1,index:this._specialColors[M],color:H}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const M=[],O=z.split(";");for(let I=0;I<O.length;++I)if(/^\d+$/.exec(O[I])){const H=parseInt(O[I]);Y(H)&&M.push({type:2,index:H})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(N[z[0]],C.CHARSETS[z[1]]||C.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=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(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new g.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const O=this._activeBuffer.ybase+this._activeBuffer.y+M,I=this._activeBuffer.lines.get(O);I&&(I.fill(z),I.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,M){const O=this._bufferService.buffer,I=this._optionsService.rawOptions;return(H=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${H}${c.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${O.scrollTop+1};${O.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[I.cursorStyle]-(I.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,M){this._dirtyRowTracker.markRangeDirty(z,M)}}a.InputHandler=W;let P=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,z){ee>z&&($=ee,ee=z,z=$),ee<this.start&&(this.start=ee),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(ee){return 0<=ee&&ee<256}P=h([m(0,R.IBufferService)],P)},844:(p,a)=>{function u(h){for(const m of h)m.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 m=this._disposables.indexOf(h);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var m;this._isDisposed||h===this._value||((m=this._value)==null||m.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=u,a.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(m,c,C){this._data[m]||(this._data[m]={}),this._data[m][c]=C}get(m,c){return this._data[m]?this._data[m][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(h,m,c,C,w){this._data.get(h,m)||this._data.set(h,m,new u),this._data.get(h,m).set(c,C,w)}get(h,m,c,C){var w;return(w=this._data.get(h,m))==null?void 0:w.get(c,C)}clear(){this._data.clear()}}},6114:(p,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 u=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=u.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[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(u)},6106:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(u=this._search(this._getKey(h)),this._array.splice(u,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const m=this._getKey(h);if(m===void 0||(u=this._search(m),u===-1)||this._getKey(this._array[u])!==m)return!1;do if(this._array[u]===h)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===m);return!1}*getKeyIterator(h){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===h)}forEachByKey(h,m){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do m(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let m=0,c=this._array.length-1;for(;c>=m;){let C=m+c>>1;const w=this._getKey(this._array[C]);if(w>h)c=C-1;else{if(!(w<h)){for(;C>0&&this._getKey(this._array[C-1])===h;)C--;return C}m=C+1}}return m}}},7226:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=u(6114);class m{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(),_=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),_=w.timeRemaining(),1.5*x>_)return S-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-k))}ms`),void this._start();S=_}this.clear()}}class c extends m{_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=c,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(C){return requestIdleCallback(C)}_cancelCallback(C){cancelIdleCallback(C)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(C){this._queue.clear(),this._queue.enqueue(C)}flush(){this._queue.flush()}}},9282:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=u(643);a.updateWindowsModeWrappedState=function(m){const c=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),C=c==null?void 0:c.get(m.cols-1),w=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);w&&C&&(w.isWrapped=C[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&C[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new u;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,C=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=C}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=u(6349),m=u(7226),c=u(3734),C=u(8437),w=u(4634),k=u(511),x=u(643),S=u(4863),_=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(d,g,E){this._hasScrollback=d,this._optionsService=g,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=C.DEFAULT_ATTR_DATA.clone(),this.savedCharset=_.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 m.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(d){return d?(this._nullCell.fg=d.fg,this._nullCell.bg=d.bg,this._nullCell.extended=d.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(d){return d?(this._whitespaceCell.fg=d.fg,this._whitespaceCell.bg=d.bg,this._whitespaceCell.extended=d.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(d,g){return new C.BufferLine(this._bufferService.cols,this.getNullCell(d),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const d=this.ybase+this.y-this.ydisp;return d>=0&&d<this._rows}_getCorrectBufferLength(d){if(!this._hasScrollback)return d;const g=d+this._optionsService.rawOptions.scrollback;return g>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:g}fillViewportRows(d){if(this.lines.length===0){d===void 0&&(d=C.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(d))}}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(d,g){const E=this.getNullCell(C.DEFAULT_ATTR_DATA);let R=0;const A=this._getCorrectBufferLength(g);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<d)for(let T=0;T<this.lines.length;T++)R+=+this.lines.get(T).resize(d,E);let L=0;if(this._rows<g)for(let T=this._rows;T<g;T++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new C.BufferLine(d,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+L+1?(this.ybase--,L++,this.ydisp>0&&this.ydisp--):this.lines.push(new C.BufferLine(d,E)));else for(let T=this._rows;T>g;T--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const T=this.lines.length-A;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=A}this.x=Math.min(this.x,d-1),this.y=Math.min(this.y,g-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,d-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(d,g),this._cols>d))for(let L=0;L<this.lines.length;L++)R+=+this.lines.get(L).resize(d,E);this._cols=d,this._rows=g,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let d=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,d=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return d}get _isReflowEnabled(){const d=this._optionsService.rawOptions.windowsPty;return d&&d.buildNumber?this._hasScrollback&&d.backend==="conpty"&&d.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(d,g){this._cols!==d&&(d>this._cols?this._reflowLarger(d,g):this._reflowSmaller(d,g))}_reflowLarger(d,g){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,d,this.ybase+this.y,this.getNullCell(C.DEFAULT_ATTR_DATA));if(E.length>0){const R=(0,w.reflowLargerCreateNewLayout)(this.lines,E);(0,w.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(d,g,R.countRemoved)}}_reflowLargerAdjustViewport(d,g,E){const R=this.getNullCell(C.DEFAULT_ATTR_DATA);let A=E;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new C.BufferLine(d,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(d,g){const E=this.getNullCell(C.DEFAULT_ATTR_DATA),R=[];let A=0;for(let L=this.lines.length-1;L>=0;L--){let T=this.lines.get(L);if(!T||!T.isWrapped&&T.getTrimmedLength()<=d)continue;const B=[T];for(;T.isWrapped&&L>0;)T=this.lines.get(--L),B.unshift(T);const N=this.ybase+this.y;if(N>=L&&N<L+B.length)continue;const F=B[B.length-1].getTrimmedLength(),G=(0,w.reflowSmallerGetNewLineLengths)(B,this._cols,d),q=G.length-B.length;let $;$=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+q):Math.max(0,this.lines.length-this.lines.maxLength+q);const W=[];for(let O=0;O<q;O++){const I=this.getBlankLine(C.DEFAULT_ATTR_DATA,!0);W.push(I)}W.length>0&&(R.push({start:L+B.length+A,newLines:W}),A+=W.length),B.push(...W);let P=G.length-1,Y=G[P];Y===0&&(P--,Y=G[P]);let ee=B.length-q-1,z=F;for(;ee>=0;){const O=Math.min(z,Y);if(B[P]===void 0)break;if(B[P].copyCellsFrom(B[ee],z-O,Y-O,O,!0),Y-=O,Y===0&&(P--,Y=G[P]),z-=O,z===0){ee--;const I=Math.max(ee,0);z=(0,w.getWrappedLineTrimmedLength)(B,I,this._cols)}}for(let O=0;O<B.length;O++)G[O]<d&&B[O].setCell(G[O],E);let M=q-$;for(;M-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+q,this.ybase+g-1)}if(R.length>0){const L=[],T=[];for(let P=0;P<this.lines.length;P++)T.push(this.lines.get(P));const B=this.lines.length;let N=B-1,F=0,G=R[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let q=0;for(let P=Math.min(this.lines.maxLength-1,B+A-1);P>=0;P--)if(G&&G.start>N+q){for(let Y=G.newLines.length-1;Y>=0;Y--)this.lines.set(P--,G.newLines[Y]);P++,L.push({index:N+1,amount:G.newLines.length}),q+=G.newLines.length,G=R[++F]}else this.lines.set(P,T[N--]);let $=0;for(let P=L.length-1;P>=0;P--)L[P].index+=$,this.lines.onInsertEmitter.fire(L[P]),$+=L[P].amount;const W=Math.max(0,B+A-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(d,g,E=0,R){const A=this.lines.get(d);return A?A.translateToString(g,E,R):""}getWrappedRangeForLine(d){let g=d,E=d;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:g,last:E}}setupTabStops(d){for(d!=null?this.tabs[d]||(d=this.prevStop(d)):(this.tabs={},d=0);d<this._cols;d+=this._optionsService.rawOptions.tabStopWidth)this.tabs[d]=!0}prevStop(d){for(d==null&&(d=this.x);!this.tabs[--d]&&d>0;);return d>=this._cols?this._cols-1:d<0?0:d}nextStop(d){for(d==null&&(d=this.x);!this.tabs[++d]&&d<this._cols;);return d>=this._cols?this._cols-1:d<0?0:d}clearMarkers(d){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===d&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let d=0;d<this.markers.length;d++)this.markers[d].dispose(),this.markers.splice(d--,1);this._isClearing=!1}addMarker(d){const g=new S.Marker(d);return this.markers.push(g),g.register(this.lines.onTrim((E=>{g.line-=E,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((E=>{g.line>=E.index&&(g.line+=E.amount)}))),g.register(this.lines.onDelete((E=>{g.line>=E.index&&g.line<E.index+E.amount&&g.dispose(),g.line>E.index&&(g.line-=E.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(d){this._isClearing||this.markers.splice(this.markers.indexOf(d),1)}}},8437:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=u(3734),m=u(511),c=u(643),C=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(S,_,d=!1){this.isWrapped=d,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const g=_||m.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let E=0;E<S;++E)this.setCell(E,g);this.length=S}get(S){const _=this._data[3*S+0],d=2097151&_;return[this._data[3*S+1],2097152&_?this._combined[S]:d?(0,C.stringFromCodePoint)(d):"",_>>22,2097152&_?this._combined[S].charCodeAt(this._combined[S].length-1):d]}set(S,_){this._data[3*S+1]=_[c.CHAR_DATA_ATTR_INDEX],_[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=_[1],this._data[3*S+0]=2097152|S|_[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=_[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[c.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 _=this._data[3*S+0];return 2097152&_?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&_}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const _=this._data[3*S+0];return 2097152&_?this._combined[S]:2097151&_?(0,C.stringFromCodePoint)(2097151&_):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,_){return w=3*S,_.content=this._data[w+0],_.fg=this._data[w+1],_.bg=this._data[w+2],2097152&_.content&&(_.combinedData=this._combined[S]),268435456&_.bg&&(_.extended=this._extendedAttrs[S]),_}setCell(S,_){2097152&_.content&&(this._combined[S]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[S]=_.extended),this._data[3*S+0]=_.content,this._data[3*S+1]=_.fg,this._data[3*S+2]=_.bg}setCellFromCodepoint(S,_,d,g){268435456&g.bg&&(this._extendedAttrs[S]=g.extended),this._data[3*S+0]=_|d<<22,this._data[3*S+1]=g.fg,this._data[3*S+2]=g.bg}addCodepointToCell(S,_,d){let g=this._data[3*S+0];2097152&g?this._combined[S]+=(0,C.stringFromCodePoint)(_):2097151&g?(this._combined[S]=(0,C.stringFromCodePoint)(2097151&g)+(0,C.stringFromCodePoint)(_),g&=-2097152,g|=2097152):g=_|4194304,d&&(g&=-12582913,g|=d<<22),this._data[3*S+0]=g}insertCells(S,_,d){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,d),_<this.length-S){const g=new m.CellData;for(let E=this.length-S-_-1;E>=0;--E)this.setCell(S+_+E,this.loadCell(S+E,g));for(let E=0;E<_;++E)this.setCell(S+E,d)}else for(let g=S;g<this.length;++g)this.setCell(g,d);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,d)}deleteCells(S,_,d){if(S%=this.length,_<this.length-S){const g=new m.CellData;for(let E=0;E<this.length-S-_;++E)this.setCell(S+E,this.loadCell(S+_+E,g));for(let E=this.length-_;E<this.length;++E)this.setCell(E,d)}else for(let g=S;g<this.length;++g)this.setCell(g,d);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,d),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,d)}replaceCells(S,_,d,g=!1){if(g)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,d),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,d);S<_&&S<this.length;)this.isProtected(S)||this.setCell(S,d),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,d),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,d);S<_&&S<this.length;)this.setCell(S++,d)}resize(S,_){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const d=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*d)this._data=new Uint32Array(this._data.buffer,0,d);else{const g=new Uint32Array(d);g.set(this._data),this._data=g}for(let g=this.length;g<S;++g)this.setCell(g,_)}else{this._data=this._data.subarray(0,d);const g=Object.keys(this._combined);for(let R=0;R<g.length;R++){const A=parseInt(g[R],10);A>=S&&delete this._combined[A]}const E=Object.keys(this._extendedAttrs);for(let R=0;R<E.length;R++){const A=parseInt(E[R],10);A>=S&&delete this._extendedAttrs[A]}}return this.length=S,4*d*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,_=!1){if(_)for(let d=0;d<this.length;++d)this.isProtected(d)||this.setCell(d,S);else{this._combined={},this._extendedAttrs={};for(let d=0;d<this.length;++d)this.setCell(d,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 _ in S._combined)this._combined[_]=S._combined[_];this._extendedAttrs={};for(const _ in S._extendedAttrs)this._extendedAttrs[_]=S._extendedAttrs[_];this.isWrapped=S.isWrapped}clone(){const S=new k(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const _ in this._combined)S._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)S._extendedAttrs[_]=this._extendedAttrs[_];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,_,d,g,E){const R=S._data;if(E)for(let L=g-1;L>=0;L--){for(let T=0;T<3;T++)this._data[3*(d+L)+T]=R[3*(_+L)+T];268435456&R[3*(_+L)+2]&&(this._extendedAttrs[d+L]=S._extendedAttrs[_+L])}else for(let L=0;L<g;L++){for(let T=0;T<3;T++)this._data[3*(d+L)+T]=R[3*(_+L)+T];268435456&R[3*(_+L)+2]&&(this._extendedAttrs[d+L]=S._extendedAttrs[_+L])}const A=Object.keys(S._combined);for(let L=0;L<A.length;L++){const T=parseInt(A[L],10);T>=_&&(this._combined[T-_+d]=S._combined[T])}}translateToString(S,_,d,g){_=_??0,d=d??this.length,S&&(d=Math.min(d,this.getTrimmedLength())),g&&(g.length=0);let E="";for(;_<d;){const R=this._data[3*_+0],A=2097151&R,L=2097152&R?this._combined[_]:A?(0,C.stringFromCodePoint)(A):c.WHITESPACE_CELL_CHAR;if(E+=L,g)for(let T=0;T<L.length;++T)g.push(_);_+=R>>22||1}return g&&g.push(_),E}}a.BufferLine=k},4841:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,h){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return h*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(p,a)=>{function u(h,m,c){if(m===h.length-1)return h[m].getTrimmedLength();const C=!h[m].hasContent(c-1)&&h[m].getWidth(c-1)===1,w=h[m+1].getWidth(0)===2;return C&&w?c-1:c}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,m,c,C,w){const k=[];for(let x=0;x<h.length-1;x++){let S=x,_=h.get(++S);if(!_.isWrapped)continue;const d=[h.get(x)];for(;S<h.length&&_.isWrapped;)d.push(_),_=h.get(++S);if(C>=x&&C<S){x+=d.length-1;continue}let g=0,E=u(d,g,m),R=1,A=0;for(;R<d.length;){const T=u(d,R,m),B=T-A,N=c-E,F=Math.min(B,N);d[g].copyCellsFrom(d[R],A,E,F,!1),E+=F,E===c&&(g++,E=0),A+=F,A===T&&(R++,A=0),E===0&&g!==0&&d[g-1].getWidth(c-1)===2&&(d[g].copyCellsFrom(d[g-1],c-1,E++,1,!1),d[g-1].setCell(c-1,w))}d[g].replaceCells(E,c,w);let L=0;for(let T=d.length-1;T>0&&(T>g||d[T].getTrimmedLength()===0);T--)L++;L>0&&(k.push(x+d.length-L),k.push(L)),x+=d.length-1}return k},a.reflowLargerCreateNewLayout=function(h,m){const c=[];let C=0,w=m[C],k=0;for(let x=0;x<h.length;x++)if(w===x){const S=m[++C];h.onDeleteEmitter.fire({index:x-k,amount:S}),x+=S-1,k+=S,w=m[++C]}else c.push(x);return{layout:c,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,m){const c=[];for(let C=0;C<m.length;C++)c.push(h.get(m[C]));for(let C=0;C<c.length;C++)h.set(C,c[C]);h.length=m.length},a.reflowSmallerGetNewLineLengths=function(h,m,c){const C=[],w=h.map(((_,d)=>u(h,d,m))).reduce(((_,d)=>_+d));let k=0,x=0,S=0;for(;S<w;){if(w-S<c){C.push(w-S);break}k+=c;const _=u(h,x,m);k>_&&(k-=_,x++);const d=h[x].getWidth(k-1)===2;d&&k--;const g=d?c-1:c;C.push(g),S+=g}return C},a.getWrappedLineTrimmedLength=u},5295:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=u(8460),m=u(844),c=u(9092);class C extends m.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 c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(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=C},511:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),m=u(643),c=u(3734);class C extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new C;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[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[m.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[m.CHAR_DATA_CHAR_INDEX].length===2){const S=k[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const _=k[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(S-55296)+_-56320+65536|k[m.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[m.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=C},643:(p,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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=u(8460),m=u(844);class c{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=c._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,m.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=c,c._nextId=1},7116:(p,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:(p,a)=>{var u,h,m;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
58
+ `,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL=""})(u||(a.C0=u={})),(function(c){c.PAD="€",c.HOP="",c.BPH="‚",c.NBH="ƒ",c.IND="„",c.NEL="…",c.SSA="†",c.ESA="‡",c.HTS="ˆ",c.HTJ="‰",c.VTS="Š",c.PLD="‹",c.PLU="Œ",c.RI="",c.SS2="Ž",c.SS3="",c.DCS="",c.PU1="‘",c.PU2="’",c.STS="“",c.CCH="”",c.MW="•",c.SPA="–",c.EPA="—",c.SOS="˜",c.SGCI="™",c.SCI="š",c.CSI="›",c.ST="œ",c.OSC="",c.PM="ž",c.APC="Ÿ"})(h||(a.C1=h={})),(function(c){c.ST=`${u.ESC}\\`})(m||(a.C1_ESCAPED=m={}))},7399:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=u(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(c,C,w,k){const x={type:0,cancel:!1,key:void 0},S=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?x.key=C?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=C?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=C?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=C?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=c.ctrlKey?"\b":h.C0.DEL,c.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(c.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=c.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,c.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(c.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=C?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(c.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=C?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(c.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=C?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(c.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=C?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:c.shiftKey||c.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":C?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=S?h.C0.ESC+"[1;"+(S+1)+"F":C?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:c.shiftKey?x.type=2:c.ctrlKey?x.key=h.C0.ESC+"[5;"+(S+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:c.shiftKey?x.type=3:c.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(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(w&&!k||!c.altKey||c.metaKey)!w||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?x.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(x.key=h.C0.US),c.key==="@"&&(x.key=h.C0.NUL)):c.keyCode===65&&(x.type=1);else{const _=m[c.keyCode],d=_==null?void 0:_[c.shiftKey?1:0];if(d)x.key=h.C0.ESC+d;else if(c.keyCode>=65&&c.keyCode<=90){const g=c.ctrlKey?c.keyCode-64:c.keyCode+32;let E=String.fromCharCode(g);c.shiftKey&&(E=E.toUpperCase()),x.key=h.C0.ESC+E}else if(c.keyCode===32)x.key=h.C0.ESC+(c.ctrlKey?h.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let g=c.code.slice(3,4);c.shiftKey||(g=g.toLowerCase()),x.key=h.C0.ESC+g,x.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?x.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?x.key=h.C0.NUL:c.keyCode>=51&&c.keyCode<=55?x.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?x.key=h.C0.DEL:c.keyCode===219?x.key=h.C0.ESC:c.keyCode===220?x.key=h.C0.FS:c.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,h=0,m=u.length){let c="";for(let C=h;C<m;++C){let w=u[C];w>65535?(w-=65536,c+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):c+=String.fromCharCode(w)}return c},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,h){const m=u.length;if(!m)return 0;let c=0,C=0;if(this._interim){const w=u.charCodeAt(C++);56320<=w&&w<=57343?h[c++]=1024*(this._interim-55296)+w-56320+65536:(h[c++]=this._interim,h[c++]=w),this._interim=0}for(let w=C;w<m;++w){const k=u.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=m)return this._interim=k,c;const x=u.charCodeAt(w);56320<=x&&x<=57343?h[c++]=1024*(k-55296)+x-56320+65536:(h[c++]=k,h[c++]=x)}else k!==65279&&(h[c++]=k)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const m=u.length;if(!m)return 0;let c,C,w,k,x=0,S=0,_=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let A,L=0;for(;(A=63&this.interim[++L])&&L<4;)R<<=6,R|=A;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,B=T-L;for(;_<B;){if(_>=m)return 0;if(A=u[_++],(192&A)!=128){_--,E=!0;break}this.interim[L++]=A,R<<=6,R|=63&A}E||(T===2?R<128?_--:h[x++]=R:T===3?R<2048||R>=55296&&R<=57343||R===65279||(h[x++]=R):R<65536||R>1114111||(h[x++]=R)),this.interim.fill(0)}const d=m-4;let g=_;for(;g<m;){for(;!(!(g<d)||128&(c=u[g])||128&(C=u[g+1])||128&(w=u[g+2])||128&(k=u[g+3]));)h[x++]=c,h[x++]=C,h[x++]=w,h[x++]=k,g+=4;if(c=u[g++],c<128)h[x++]=c;else if((224&c)==192){if(g>=m)return this.interim[0]=c,x;if(C=u[g++],(192&C)!=128){g--;continue}if(S=(31&c)<<6|63&C,S<128){g--;continue}h[x++]=S}else if((240&c)==224){if(g>=m)return this.interim[0]=c,x;if(C=u[g++],(192&C)!=128){g--;continue}if(g>=m)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[g++],(192&w)!=128){g--;continue}if(S=(15&c)<<12|(63&C)<<6|63&w,S<2048||S>=55296&&S<=57343||S===65279)continue;h[x++]=S}else if((248&c)==240){if(g>=m)return this.interim[0]=c,x;if(C=u[g++],(192&C)!=128){g--;continue}if(g>=m)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[g++],(192&w)!=128){g--;continue}if(g>=m)return this.interim[0]=c,this.interim[1]=C,this.interim[2]=w,x;if(k=u[g++],(192&k)!=128){g--;continue}if(S=(7&c)<<18|(63&C)<<12|(63&w)<<6|63&k,S<65536||S>1114111)continue;h[x++]=S}}return x}}},225:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=u(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let C;a.UnicodeV6=class{constructor(){if(this.version="6",!C){C=new Uint8Array(65536),C.fill(1),C[0]=0,C.fill(0,1,32),C.fill(0,127,160),C.fill(2,4352,4448),C[9001]=2,C[9002]=2,C.fill(2,11904,42192),C[12351]=1,C.fill(2,44032,55204),C.fill(2,63744,64256),C.fill(2,65040,65050),C.fill(2,65072,65136),C.fill(2,65280,65377),C.fill(2,65504,65511);for(let w=0;w<m.length;++w)C.fill(0,m[w][0],m[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?C[w]:(function(k,x){let S,_=0,d=x.length-1;if(k<x[0][0]||k>x[d][1])return!1;for(;d>=_;)if(S=_+d>>1,k>x[S][1])_=S+1;else{if(!(k<x[S][0]))return!0;d=S-1}return!1})(w,c)?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 _=h.UnicodeService.extractWidth(k);_===0?S=!1:_>x&&(x=_)}return h.UnicodeService.createPropertyValue(0,x,S)}}},5981:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=u(8460),m=u(844);class c extends m.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],_=this._action(S,k);if(_){const g=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void _.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(g)}const d=this._callbacks[this._bufferOffset];if(d&&d(),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=c},5941:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function m(c,C){const w=c.toString(16),k=w.length<2?"0"+w:w;switch(C){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}a.parseColor=function(c){if(!c)return;let C=c.toLowerCase();if(C.indexOf("rgb:")===0){C=C.slice(4);const w=u.exec(C);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(C.indexOf("#")===0&&(C=C.slice(1),h.exec(C)&&[3,6,9,12].includes(C.length))){const w=C.length/3,k=[0,0,0];for(let x=0;x<3;++x){const S=parseInt(C.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(c,C=16){const[w,k,x]=c;return`rgb:${m(w,C)}/${m(k,C)}/${m(x,C)}`}},5770:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=u(482),m=u(8742),c=u(5770),C=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=C,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=C}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const S=this._handlers[k];return S.push(x),{dispose:()=>{const _=S.indexOf(x);_!==-1&&S.splice(_,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=C,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||C,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 _=this._active.length-1;_>=0;_--)this._active[_].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,_=this._active.length-1,d=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,S=x,d=this._stack.fallThrough,this._stack.paused=!1),!d&&S===!1){for(;_>=0&&(S=this._active[_].unhook(k),S!==!0);_--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,S;_--}for(;_>=0;_--)if(S=this._active[_].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",k);this._active=C,this._ident=0}};const w=new m.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>c.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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=u(844),m=u(8742),c=u(6242),C=u(6351);class w{constructor(_){this.table=new Uint8Array(_)}setDefault(_,d){this.table.fill(_<<4|d)}add(_,d,g,E){this.table[d<<8|_]=g<<4|E}addMany(_,d,g,E){for(let R=0;R<_.length;R++)this.table[d<<8|_[R]]=g<<4|E}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),_=Array.apply(null,Array(256)).map(((L,T)=>T)),d=(L,T)=>_.slice(L,T),g=d(32,127),E=d(0,24);E.push(25),E.push.apply(E,d(28,32));const R=d(0,14);let A;for(A in S.setDefault(1,0),S.addMany(g,0,2,0),R)S.addMany([24,26,153,154],A,3,0),S.addMany(d(128,144),A,3,0),S.addMany(d(144,152),A,3,0),S.add(156,A,0,0),S.add(27,A,11,1),S.add(157,A,4,8),S.addMany([152,158,159],A,0,7),S.add(155,A,11,3),S.add(144,A,11,9);return S.addMany(E,0,3,0),S.addMany(E,1,3,1),S.add(127,1,0,1),S.addMany(E,8,0,8),S.addMany(E,3,3,3),S.add(127,3,0,3),S.addMany(E,4,3,4),S.add(127,4,0,4),S.addMany(E,6,3,6),S.addMany(E,5,3,5),S.add(127,5,0,5),S.addMany(E,2,3,2),S.add(127,2,0,2),S.add(93,1,4,8),S.addMany(g,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(d(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(g,7,0,7),S.addMany(E,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(d(64,127),3,7,0),S.addMany(d(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(d(48,60),4,8,4),S.addMany(d(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(d(32,64),6,0,6),S.add(127,6,0,6),S.addMany(d(64,127),6,0,0),S.addMany(d(32,48),3,9,5),S.addMany(d(32,48),5,9,5),S.addMany(d(48,64),5,0,6),S.addMany(d(64,127),5,7,0),S.addMany(d(32,48),4,9,5),S.addMany(d(32,48),1,9,2),S.addMany(d(32,48),2,9,2),S.addMany(d(48,127),2,10,0),S.addMany(d(48,80),1,10,0),S.addMany(d(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(d(96,127),1,10,0),S.add(80,1,11,9),S.addMany(E,9,0,9),S.add(127,9,0,9),S.addMany(d(28,32),9,0,9),S.addMany(d(32,48),9,9,12),S.addMany(d(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(E,11,0,11),S.addMany(d(32,128),11,0,11),S.addMany(d(28,32),11,0,11),S.addMany(E,10,0,10),S.add(127,10,0,10),S.addMany(d(28,32),10,0,10),S.addMany(d(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(d(32,48),10,9,12),S.addMany(E,12,0,12),S.add(127,12,0,12),S.addMany(d(28,32),12,0,12),S.addMany(d(32,48),12,9,12),S.addMany(d(48,64),12,0,11),S.addMany(d(64,127),12,12,13),S.addMany(d(64,127),10,12,13),S.addMany(d(64,127),9,12,13),S.addMany(E,13,13,13),S.addMany(g,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(_=a.VT500_TRANSITION_TABLE){super(),this._transitions=_,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(d,g,E)=>{},this._executeHandlerFb=d=>{},this._csiHandlerFb=(d,g)=>{},this._escHandlerFb=d=>{},this._errorHandlerFb=d=>d,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 c.OscParser),this._dcsParser=this.register(new C.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,d=[64,126]){let g=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=_.prefix.charCodeAt(0),g&&60>g||g>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(_.intermediates){if(_.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<_.intermediates.length;++R){const A=_.intermediates.charCodeAt(R);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=A}}if(_.final.length!==1)throw new Error("final must be a single byte");const E=_.final.charCodeAt(0);if(d[0]>E||E>d[1])throw new Error(`final must be in range ${d[0]} .. ${d[1]}`);return g<<=8,g|=E,g}identToString(_){const d=[];for(;_;)d.push(String.fromCharCode(255&_)),_>>=8;return d.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,d){const g=this._identifier(_,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const E=this._escHandlers[g];return E.push(d),{dispose:()=>{const R=E.indexOf(d);R!==-1&&E.splice(R,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,d){this._executeHandlers[_.charCodeAt(0)]=d}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,d){const g=this._identifier(_);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const E=this._csiHandlers[g];return E.push(d),{dispose:()=>{const R=E.indexOf(d);R!==-1&&E.splice(R,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,d){return this._dcsParser.registerHandler(this._identifier(_),d)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,d){return this._oscParser.registerHandler(_,d)}clearOscHandler(_){this._oscParser.clearHandler(_)}setOscHandlerFallback(_){this._oscParser.setHandlerFallback(_)}setErrorHandler(_){this._errorHandler=_}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(_,d,g,E,R){this._parseStack.state=_,this._parseStack.handlers=d,this._parseStack.handlerPos=g,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(_,d,g){let E,R=0,A=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let B=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&B>-1){for(;B>=0&&(E=T[B](this._params),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 4:if(g===!1&&B>-1){for(;B>=0&&(E=T[B](),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 6:if(R=_[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=_[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=L;T<d;++T){switch(R=_[T],A=this._transitions.table[this.currentState<<8|(R<160?R:k)],A>>4){case 2:for(let q=T+1;;++q){if(q>=d||(R=_[q])<32||R>126&&R<k){this._printHandler(_,T,q),T=q-1;break}if(++q>=d||(R=_[q])<32||R>126&&R<k){this._printHandler(_,T,q),T=q-1;break}if(++q>=d||(R=_[q])<32||R>126&&R<k){this._printHandler(_,T,q),T=q-1;break}if(++q>=d||(R=_[q])<32||R>126&&R<k){this._printHandler(_,T,q),T=q-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const B=this._csiHandlers[this._collect<<8|R];let N=B?B.length-1:-1;for(;N>=0&&(E=B[N](this._params),E!==!0);N--)if(E instanceof Promise)return this._preserveStack(3,B,N,A,T),E;N<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++T<d&&(R=_[T])>47&&R<60);T--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const F=this._escHandlers[this._collect<<8|R];let G=F?F.length-1:-1;for(;G>=0&&(E=F[G](),E!==!0);G--)if(E instanceof Promise)return this._preserveStack(4,F,G,A,T),E;G<0&&this._escHandlerFb(this._collect<<8|R),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|R,this._params);break;case 13:for(let q=T+1;;++q)if(q>=d||(R=_[q])===24||R===26||R===27||R>127&&R<k){this._dcsParser.put(_,T,q),T=q-1;break}break;case 14:if(E=this._dcsParser.unhook(R!==24&&R!==26),E)return this._preserveStack(6,[],0,A,T),E;R===27&&(A|=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 q=T+1;;q++)if(q>=d||(R=_[q])<32||R>127&&R<k){this._oscParser.put(_,T,q),T=q-1;break}break;case 6:if(E=this._oscParser.end(R!==24&&R!==26),E)return this._preserveStack(5,[],0,A,T),E;R===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}a.EscapeSequenceParser=x},6242:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=u(5770),m=u(482),c=[];a.OscParser=class{constructor(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const k=this._handlers[C];return k.push(w),{dispose:()=>{const x=k.indexOf(w);x!==-1&&k.splice(x,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,this._active.length)for(let C=this._active.length-1;C>=0;C--)this._active[C].start();else this._handlerFb(this._id,"START")}_put(C,w,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(C,w,k);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(C,w,k))}start(){this.reset(),this._state=1}put(C,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){const x=C[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(C,w,k)}}end(C,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(C),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",C);this._active=c,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(C){this._handler=C,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(C,w,k){this._hitLimit||(this._data+=(0,m.utf32ToString)(C,w,k),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(C){let w=!1;if(this._hitLimit)w=!1;else if(C&&(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:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class h{static fromArray(c){const C=new h;if(!c.length)return C;for(let w=Array.isArray(c[0])?1:0;w<c.length;++w){const k=c[w];if(Array.isArray(k))for(let x=0;x<k.length;++x)C.addSubParam(k[x]);else C.addParam(k)}return C}constructor(c=32,C=32){if(this.maxLength=c,this.maxSubParamsLength=C,C>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(C),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const c=new h(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){const c=[];for(let C=0;C<this.length;++C){c.push(this.params[C]);const w=this._subParamsIdx[C]>>8,k=255&this._subParamsIdx[C];k-w>0&&c.push(Array.prototype.slice.call(this._subParams,w,k))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>u?u:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>u?u:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){const C=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-C>0?this._subParams.subarray(C,w):null}getSubParamsAll(){const c={};for(let C=0;C<this.length;++C){const w=this._subParamsIdx[C]>>8,k=255&this._subParamsIdx[C];k-w>0&&(c[C]=this._subParams.slice(w,k))}return c}addDigit(c){let C;if(this._rejectDigits||!(C=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,k=w[C-1];w[C-1]=~k?Math.min(10*k+c,u):c}}a.Params=h},5741:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,h){const m={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(m),h.dispose=()=>this._wrappedAddonDispose(m),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===u){h=m;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(h,1)}}},8771:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=u(3785),m=u(511);a.BufferApiView=class{constructor(c,C){this._buffer=c,this.type=C}init(c){return this._buffer=c,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(c){const C=this._buffer.lines.get(c);if(C)return new h.BufferLineApiView(C)}getNullCell(){return new m.CellData}}},3785:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=u(511);a.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,c){if(!(m<0||m>=this._line.length))return c?(this._line.loadCell(m,c),c):this._line.loadCell(m,new h.CellData)}translateToString(m,c,C){return this._line.translateToString(m,c,C)}}},8285:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),m=u(8460),c=u(844);class C extends c.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new m.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=C},7975:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,h){return this._core.registerCsiHandler(u,(m=>h(m.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((m,c)=>h(m,c.toArray())))}addDcsHandler(u,h){return this.registerDcsHandler(u,h)}registerEscHandler(u,h){return this._core.registerEscHandler(u,h)}addEscHandler(u,h){return this.registerEscHandler(u,h)}registerOscHandler(u,h){return this._core.registerOscHandler(u,h)}addOscHandler(u,h){return this.registerOscHandler(u,h)}}},7090:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(p,a,u){var h=this&&this.__decorate||function(S,_,d,g){var E,R=arguments.length,A=R<3?_:g===null?g=Object.getOwnPropertyDescriptor(_,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,_,d,g);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(_,d,A):E(_,d))||A);return R>3&&A&&Object.defineProperty(_,d,A),A},m=this&&this.__param||function(S,_){return function(d,g){_(d,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=u(8460),C=u(844),w=u(5295),k=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends C.Disposable{get buffer(){return this.buffers.active}constructor(S){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(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,_){this.cols=S,this.rows=_,this.buffers.resize(S,_),this._onResize.fire({cols:S,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,_=!1){const d=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===S.fg&&g.getBg(0)===S.bg||(g=d.getBlankLine(S,_),this._cachedBlankLine=g),g.isWrapped=_;const E=d.ybase+d.scrollTop,R=d.ybase+d.scrollBottom;if(d.scrollTop===0){const A=d.lines.isFull;R===d.lines.length-1?A?d.lines.recycle().copyFrom(g):d.lines.push(g.clone()):d.lines.splice(R+1,0,g.clone()),A?this.isUserScrolling&&(d.ydisp=Math.max(d.ydisp-1,0)):(d.ybase++,this.isUserScrolling||d.ydisp++)}else{const A=R-E+1;d.lines.shiftElements(E+1,A-1,-1),d.lines.set(R,g.clone())}this.isUserScrolling||(d.ydisp=d.ybase),this._onScroll.fire(d.ydisp)}scrollLines(S,_,d){const g=this.buffer;if(S<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else S+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const E=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+S,g.ybase),0),E!==g.ydisp&&(_||this._onScroll.fire(g.ydisp))}};a.BufferService=x=h([m(0,k.IOptionsService)],x)},7994:(p,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)}}},1753:function(p,a,u){var h=this&&this.__decorate||function(g,E,R,A){var L,T=arguments.length,B=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,E,R,A);else for(var N=g.length-1;N>=0;N--)(L=g[N])&&(B=(T<3?L(B):T>3?L(E,R,B):L(E,R))||B);return T>3&&B&&Object.defineProperty(E,R,B),B},m=this&&this.__param||function(g,E){return function(R,A){E(R,A,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const c=u(2585),C=u(8460),w=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function x(g,E){let R=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(R|=64,R|=g.action):(R|=3&g.button,4&g.button&&(R|=64),8&g.button&&(R|=128),g.action===32?R|=32:g.action!==0||E||(R|=3)),R}const S=String.fromCharCode,_={DEFAULT:g=>{const E=[x(g,!1)+32,g.col+32,g.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${S(E[0])}${S(E[1])}${S(E[2])}`},SGR:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.col};${g.row}${E}`},SGR_PIXELS:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.x};${g.y}${E}`}};let d=a.CoreMouseService=class extends w.Disposable{constructor(g,E){super(),this._bufferService=g,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new C.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(k))this.addProtocol(R,k[R]);for(const R of Object.keys(_))this.addEncoding(R,_[R]);this.reset()}addProtocol(g,E){this._protocols[g]=E}addEncoding(g,E){this._encodings[g]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const E=this._encodings[this._activeEncoding](g);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,E,R){if(R){if(g.x!==E.x||g.y!==E.y)return!1}else if(g.col!==E.col||g.row!==E.row)return!1;return g.button===E.button&&g.action===E.action&&g.ctrl===E.ctrl&&g.alt===E.alt&&g.shift===E.shift}};a.CoreMouseService=d=h([m(0,c.IBufferService),m(1,c.ICoreService)],d)},6975:function(p,a,u){var h=this&&this.__decorate||function(d,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,g,E,R);else for(var B=d.length-1;B>=0;B--)(A=d[B])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},m=this&&this.__param||function(d,g){return function(E,R){g(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const c=u(1439),C=u(8460),w=u(844),k=u(2585),x=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=a.CoreService=class extends w.Disposable{constructor(d,g,E){super(),this._bufferService=d,this._logService=g,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new C.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new C.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new C.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new C.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}reset(){this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}triggerDataEvent(d,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${d}"`,(()=>d.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(d)}triggerBinaryEvent(d){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${d}"`,(()=>d.split("").map((g=>g.charCodeAt(0))))),this._onBinary.fire(d))}};a.CoreService=_=h([m(0,k.IBufferService),m(1,k.ILogService),m(2,k.IOptionsService)],_)},9074:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),m=u(8460),c=u(844),C=u(6106);let w=0,k=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new C.SortedList((d=>d==null?void 0:d.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,c.toDisposable)((()=>this.reset())))}registerDecoration(d){if(d.marker.isDisposed)return;const g=new S(d);if(g){const E=g.marker.onDispose((()=>g.dispose()));g.onDispose((()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),E.dispose())})),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const d of this._decorations.values())d.dispose();this._decorations.clear()}*getDecorationsAtCell(d,g,E){let R=0,A=0;for(const L of this._decorations.getKeyIterator(g))R=L.options.x??0,A=R+(L.options.width??1),d>=R&&d<A&&(!E||(L.options.layer??"bottom")===E)&&(yield L)}forEachDecorationAtCell(d,g,E,R){this._decorations.forEachByKey(g,(A=>{w=A.options.x??0,k=w+(A.options.width??1),d>=w&&d<k&&(!E||(A.options.layer??"bottom")===E)&&R(A)}))}}a.DecorationService=x;class S extends c.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(d){super(),this.options=d,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=d.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=u(2585),m=u(8343);class c{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=c,a.InstantiationService=class{constructor(){this._services=new c,this._services.set(h.IInstantiationService,this)}setService(C,w){this._services.set(C,w)}getService(C){return this._services.get(C)}createInstance(C,...w){const k=(0,m.getServiceDependencies)(C).sort(((_,d)=>_.index-d.index)),x=[];for(const _ of k){const d=this._services.get(_.id);if(!d)throw new Error(`[createInstance] ${C.name} depends on UNKNOWN service ${_.id}.`);x.push(d)}const S=k.length>0?k[0].index:w.length;if(w.length!==S)throw new Error(`[createInstance] First service dependency of ${C.name} at position ${S+1} conflicts with ${w.length} static arguments`);return new C(...w,...x)}}},7866:function(p,a,u){var h=this&&this.__decorate||function(S,_,d,g){var E,R=arguments.length,A=R<3?_:g===null?g=Object.getOwnPropertyDescriptor(_,d):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,_,d,g);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(_,d,A):E(_,d))||A);return R>3&&A&&Object.defineProperty(_,d,A),A},m=this&&this.__param||function(S,_){return function(d,g){_(d,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=u(844),C=u(2585),w={trace:C.LogLevelEnum.TRACE,debug:C.LogLevelEnum.DEBUG,info:C.LogLevelEnum.INFO,warn:C.LogLevelEnum.WARN,error:C.LogLevelEnum.ERROR,off:C.LogLevelEnum.OFF};let k,x=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(S){super(),this._optionsService=S,this._logLevel=C.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 _=0;_<S.length;_++)typeof S[_]=="function"&&(S[_]=S[_]())}_log(S,_,d){this._evalLazyOptionalParams(d),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...d)}trace(S,..._){var d;this._logLevel<=C.LogLevelEnum.TRACE&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.trace.bind(this._optionsService.options.logger))??console.log,S,_)}debug(S,..._){var d;this._logLevel<=C.LogLevelEnum.DEBUG&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.debug.bind(this._optionsService.options.logger))??console.log,S,_)}info(S,..._){var d;this._logLevel<=C.LogLevelEnum.INFO&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.info.bind(this._optionsService.options.logger))??console.info,S,_)}warn(S,..._){var d;this._logLevel<=C.LogLevelEnum.WARN&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.warn.bind(this._optionsService.options.logger))??console.warn,S,_)}error(S,..._){var d;this._logLevel<=C.LogLevelEnum.ERROR&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.error.bind(this._optionsService.options.logger))??console.error,S,_)}};a.LogService=x=h([m(0,C.IOptionsService)],x),a.setTraceLogger=function(S){k=S},a.traceCall=function(S,_,d){if(typeof d.value!="function")throw new Error("not supported");const g=d.value;d.value=function(...E){if(k.logLevel!==C.LogLevelEnum.TRACE)return g.apply(this,E);k.trace(`GlyphRenderer#${g.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const R=g.apply(this,E);return k.trace(`GlyphRenderer#${g.name} return`,R),R}}},7302:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=u(8460),m=u(844),c=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:c.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const C=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends m.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...a.DEFAULT_OPTIONS};for(const _ in x)if(_ in S)try{const d=x[_];S[_]=this._sanitizeAndValidateOption(_,d)}catch(d){console.error(d)}this.rawOptions=S,this.options={...S},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,S){return this.onOptionChange((_=>{_===x&&S(this.rawOptions[x])}))}onMultipleOptionChange(x,S){return this.onOptionChange((_=>{x.indexOf(_)!==-1&&S()}))}_setupOptions(){const x=_=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},S=(_,d)=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);d=this._sanitizeAndValidateOption(_,d),this.rawOptions[_]!==d&&(this.rawOptions[_]=d,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const d={get:x.bind(this,_),set:S.bind(this,_)};Object.defineProperty(this.options,_,d)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=a.DEFAULT_OPTIONS[x]),!(function(_){return _==="block"||_==="underline"||_==="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=C.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(p,a,u){var h=this&&this.__decorate||function(w,k,x,S){var _,d=arguments.length,g=d<3?k:S===null?S=Object.getOwnPropertyDescriptor(k,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,k,x,S);else for(var E=w.length-1;E>=0;E--)(_=w[E])&&(g=(d<3?_(g):d>3?_(k,x,g):_(k,x))||g);return d>3&&g&&Object.defineProperty(k,x,g),g},m=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 c=u(2585);let C=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 E=k.addMarker(k.ybase+k.y),R={data:w,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(R,E))),this._dataByLinkId.set(R.id,R),R.id}const x=w,S=this._getEntryIdKey(x),_=this._entriesWithId.get(S);if(_)return this.addLineToLink(_.id,k.ybase+k.y),_.id;const d=k.addMarker(k.ybase+k.y),g={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[d]};return d.onDispose((()=>this._removeMarkerFromLink(g,d))),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.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=C=h([m(0,c.IBufferService)],C)},8343:(p,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[h]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const c=function(C,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,S,_){S[u]===S?S[h].push({id:x,index:_}):(S[h]=[{id:x,index:_}],S[u]=S)})(c,C,k)};return c.toString=()=>m,a.serviceRegistry.set(m,c),c}},2585:(p,a,u)=>{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=u(8343);var m;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(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(m||(a.LogLevelEnum=m={})),a.ILogService=(0,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:(p,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=u(8460),m=u(225);class c{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 m.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 _=0;_<S;++_){let d=w.charCodeAt(_);if(55296<=d&&d<=56319){if(++_>=S)return k+this.wcwidth(d);const R=w.charCodeAt(_);56320<=R&&R<=57343?d=1024*(d-55296)+R-56320+65536:k+=this.wcwidth(R)}const g=this.charProperties(d,x);let E=c.extractWidth(g);c.extractShouldJoin(g)&&(E-=c.extractWidth(x)),k+=E,x=g}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=c}},o={};function v(p){var a=o[p];if(a!==void 0)return a.exports;var u=o[p]={exports:{}};return l[p].call(u.exports,u,u.exports,v),u.exports}var b={};return(()=>{var p=b;Object.defineProperty(p,"__esModule",{value:!0}),p.Terminal=void 0;const a=v(9042),u=v(3236),h=v(844),m=v(5741),c=v(8285),C=v(7975),w=v(7090),k=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new u.Terminal(_)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const d=E=>this._core.options[E],g=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:d.bind(this,E),set:g.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_checkReadonlyOptions(_){if(k.includes(_))throw new Error(`Option "${_}" 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 C.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 c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let d="none";switch(this._core.coreMouseService.activeProtocol){case"X10":d="x10";break;case"VT200":d="vt200";break;case"DRAG":d="drag";break;case"ANY":d="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:d,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const d in _)this._publicOptions[d]=_[d]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,d=!0){this._core.input(_,d)}resize(_,d){this._verifyIntegers(_,d),this._core.resize(_,d)}open(_){this._core.open(_)}attachCustomKeyEventHandler(_){this._core.attachCustomKeyEventHandler(_)}attachCustomWheelEventHandler(_){this._core.attachCustomWheelEventHandler(_)}registerLinkProvider(_){return this._core.registerLinkProvider(_)}registerCharacterJoiner(_){return this._checkProposedApi(),this._core.registerCharacterJoiner(_)}deregisterCharacterJoiner(_){this._checkProposedApi(),this._core.deregisterCharacterJoiner(_)}registerMarker(_=0){return this._verifyIntegers(_),this._core.registerMarker(_)}registerDecoration(_){return this._checkProposedApi(),this._verifyPositiveIntegers(_.x??0,_.width??0,_.height??0),this._core.registerDecoration(_)}hasSelection(){return this._core.hasSelection()}select(_,d,g){this._verifyIntegers(_,d,g),this._core.select(_,d,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,d){this._verifyIntegers(_,d),this._core.selectLines(_,d)}dispose(){super.dispose()}scrollLines(_){this._verifyIntegers(_),this._core.scrollLines(_)}scrollPages(_){this._verifyIntegers(_),this._core.scrollPages(_)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(_){this._verifyIntegers(_),this._core.scrollToLine(_)}clear(){this._core.clear()}write(_,d){this._core.write(_,d)}writeln(_,d){this._core.write(_),this._core.write(`\r
59
+ `,d)}paste(_){this._core.paste(_)}refresh(_,d){this._verifyIntegers(_,d),this._core.refresh(_,d)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return a}_verifyIntegers(..._){for(const d of _)if(d===1/0||isNaN(d)||d%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const d of _)if(d&&(d===1/0||isNaN(d)||d%1!=0||d<0))throw new Error("This API only accepts positive integers")}}p.Terminal=x})(),b})()))})(Hu)),Hu.exports}var H0=z0();class N0{constructor(s,l){Dp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(s)}`),this.socket.addEventListener("message",v=>{var p,a;const b=JSON.parse(v.data);b.type==="output"?l.onOutput(b.data):b.type==="error"?(p=l.onError)==null||p.call(l,b.message):(a=l.onStatus)==null||a.call(l,b)}),this.socket.addEventListener("error",()=>{var v;(v=l.onError)==null||v.call(l,"Terminal connection failed.")})}sendInput(s){this.send({type:"input",data:s})}resize(s,l){this.send({type:"resize",cols:s,rows:l})}close(){this.socket.close()}send(s){const l=JSON.stringify(s);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(l);return}this.socket.addEventListener("open",()=>this.socket.send(l),{once:!0})}}function j0({sessionId:n,active:s=!0,onEvent:l}){const o=me.useRef(null),v=me.useRef(null),b=me.useRef(null),p=me.useRef(null),a=me.useRef(s),u=me.useRef(l);function h(m={}){const c=o.current,C=v.current,w=b.current,k=p.current;if(!c||!C||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<U0||x.height<I0||(w.fit(),k.cols<P0||k.rows<F0)?!1:(C.resize(k.cols,k.rows),m.focus&&k.focus(),!0)}return me.useEffect(()=>{u.current=l},[l]),me.useEffect(()=>{a.current=s},[s]),me.useEffect(()=>{if(!o.current)return;const m=new H0.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:q0}),c=new M0.FitAddon;m.loadAddon(c),m.loadAddon(new B0.WebLinksAddon),m.open(o.current),p.current=m,b.current=c;const C=new N0(n,{onOutput(g){m.write(g)},onStatus(g){var E;(E=u.current)==null||E.call(u,g.type)},onError(g){var E;m.writeln(`\r
60
+ [VCM] ${g}`),(E=u.current)==null||E.call(u,g)}});v.current=C;const w=m.onData(g=>{C.sendInput(g)});let k=0,x=0,S=0;const _=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},d=new ResizeObserver(()=>{_()});return d.observe(o.current),x=window.requestAnimationFrame(_),S=window.setTimeout(_,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),d.disconnect(),w.dispose(),C.close(),m.dispose(),v.current=null,p.current=null,b.current=null}},[n]),me.useEffect(()=>{if(!s)return;const m=[],c=[];return m.push(window.requestAnimationFrame(()=>{h({focus:!0}),m.push(window.requestAnimationFrame(()=>h({focus:!0})))})),c.push(window.setTimeout(()=>h({focus:!0}),160)),c.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const C of m)window.cancelAnimationFrame(C);for(const C of c)window.clearTimeout(C)}},[s]),me.useEffect(()=>{const m=()=>{a.current&&h()};return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),V.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var m;return(m=p.current)==null?void 0:m.focus()}})}const U0=160,I0=80,P0=20,F0=5,q0={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 V0({role:n,session:s,permissionMode:l,busy:o=!1,onPermissionModeChange:v,onStart:b,onResume:p,onStop:a,onRestart:u}){const h=(s==null?void 0:s.status)==="running",m=!!(s!=null&&s.claudeSessionId&&!h),c=!h&&!(s!=null&&s.claudeSessionId),C=!!(s&&s.permissionMode!==l);return V.jsxs("div",{className:"session-controls",children:[V.jsxs("label",{className:"permission-mode-field",children:[V.jsxs("span",{children:["Permission",V.jsx("small",{children:s?`current: ${G0(s.permissionMode)}${C?" / next launch":""}`:"applies on start"})]}),V.jsxs("select",{value:l,onChange:w=>v(w.target.value),children:[V.jsx("option",{value:"default",children:"默认"}),V.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"}),V.jsx("option",{value:"dangerously-skip-permissions",children:"--dangerously-skip-permissions"})]})]}),V.jsxs("div",{className:"session-toolbar",children:[V.jsx("button",{type:"button",disabled:o||!c,onClick:b,children:"Start"}),V.jsx("button",{type:"button",disabled:o||!m,onClick:p,children:"Resume"}),V.jsx("button",{type:"button",disabled:o||!s,onClick:u,children:"Restart"}),V.jsx("button",{type:"button",disabled:o||!s,onClick:a,children:"Stop"})]})]})}function G0(n){return n==="dangerously-skip-permissions"?"--dangerously-skip-permissions":n}function Y0(n,s){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const W0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,X0={};function Vp(n,s){return(X0.jsx?K0:W0).test(n)}const $0=/[ \t\n\f\r]/g;function Q0(n){return typeof n=="object"?n.type==="text"?Gp(n.value):!1:Gp(n)}function Gp(n){return n.replace($0,"")===""}class Bs{constructor(s,l,o){this.normal=l,this.property=s,o&&(this.space=o)}}Bs.prototype.normal={};Bs.prototype.property={};Bs.prototype.space=void 0;function N_(n,s){const l={},o={};for(const v of n)Object.assign(l,v.property),Object.assign(o,v.normal);return new Bs(l,o,s)}function ec(n){return n.toLowerCase()}class qt{constructor(s,l){this.attribute=l,this.property=s}}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 Z0=0;const Le=Ui(),_t=Ui(),tc=Ui(),_e=Ui(),tt=Ui(),Tr=Ui(),Qt=Ui();function Ui(){return 2**++Z0}const nc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:_t,commaOrSpaceSeparated:Qt,commaSeparated:Tr,number:_e,overloadedBoolean:tc,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Nu=Object.keys(nc);class pc extends qt{constructor(s,l,o,v){let b=-1;if(super(s,l),Yp(this,"space",v),typeof o=="number")for(;++b<Nu.length;){const p=Nu[b];Yp(this,Nu[b],(o&nc[p])===nc[p])}}}pc.prototype.defined=!0;function Yp(n,s,l){l&&(n[s]=l)}function Rr(n){const s={},l={};for(const[o,v]of Object.entries(n.properties)){const b=new pc(o,n.transform(n.attributes||{},o),v,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(b.mustUseProperty=!0),s[o]=b,l[ec(o)]=o,l[ec(b.attribute)]=o}return new Bs(s,l,n.space)}const j_=Rr({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:tt,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:_e,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:tt,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:_t,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(n,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function U_(n,s){return s in n?n[s]:s}function I_(n,s){return U_(n,s.toLowerCase())}const J0=Rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:tt,autoFocus:Le,autoPlay:Le,blocking:tt,capture:null,charSet:null,checked:Le,cite:null,className:tt,cols:_e,colSpan:null,content:null,contentEditable:_t,controls:Le,controlsList:tt,coords:_e|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:tc,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:tt,height:_e,hidden:tc,high:_e,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:tt,itemRef:tt,itemScope:Le,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:_e,pattern:null,ping:tt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:tt,required:Le,reversed:Le,rows:_e,rowSpan:_e,sandbox:tt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:_t,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:I_}),eS=Rr({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:Qt,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:tt,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:Tr,g2:Tr,glyphName:Tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:U_}),P_=Rr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,s){return"xlink:"+s.slice(5).toLowerCase()}}),F_=Rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:I_}),q_=Rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,s){return"xml:"+s.slice(3).toLowerCase()}}),tS={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"},nS=/[A-Z]/g,Wp=/-[a-z]/g,iS=/^data[-\w.:]+$/i;function rS(n,s){const l=ec(s);let o=s,v=qt;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&iS.test(s)){if(s.charAt(4)==="-"){const b=s.slice(5).replace(Wp,lS);o="data"+b.charAt(0).toUpperCase()+b.slice(1)}else{const b=s.slice(4);if(!Wp.test(b)){let p=b.replace(nS,sS);p.charAt(0)!=="-"&&(p="-"+p),s="data"+p}}v=pc}return new v(o,s)}function sS(n){return"-"+n.toLowerCase()}function lS(n){return n.charAt(1).toUpperCase()}const aS=N_([j_,J0,P_,F_,q_],"html"),_c=N_([j_,eS,P_,F_,q_],"svg");function oS(n){return n.join(" ").trim()}var Er={},ju,Kp;function uS(){if(Kp)return ju;Kp=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,v=/^:\s*/,b=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,p=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
61
+ `,h="/",m="*",c="",C="comment",w="declaration";function k(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var d=1,g=1;function E($){var W=$.match(s);W&&(d+=W.length);var P=$.lastIndexOf(u);g=~P?$.length-P:g+$.length}function R(){var $={line:d,column:g};return function(W){return W.position=new A($),B(),W}}function A($){this.start=$,this.end={line:d,column:g},this.source=_.source}A.prototype.content=S;function L($){var W=new Error(_.source+":"+d+":"+g+": "+$);if(W.reason=$,W.filename=_.source,W.line=d,W.column=g,W.source=S,!_.silent)throw W}function T($){var W=$.exec(S);if(W){var P=W[0];return E(P),S=S.slice(P.length),W}}function B(){T(l)}function N($){var W;for($=$||[];W=F();)W!==!1&&$.push(W);return $}function F(){var $=R();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var W=2;c!=S.charAt(W)&&(m!=S.charAt(W)||h!=S.charAt(W+1));)++W;if(W+=2,c===S.charAt(W-1))return L("End of comment missing");var P=S.slice(2,W-2);return g+=2,E(P),S=S.slice(W),g+=2,$({type:C,comment:P})}}function G(){var $=R(),W=T(o);if(W){if(F(),!T(v))return L("property missing ':'");var P=T(b),Y=$({type:w,property:x(W[0].replace(n,c)),value:P?x(P[0].replace(n,c)):c});return T(p),Y}}function q(){var $=[];N($);for(var W;W=G();)W!==!1&&($.push(W),N($));return $}return B(),q()}function x(S){return S?S.replace(a,c):c}return ju=k,ju}var Xp;function cS(){if(Xp)return Er;Xp=1;var n=Er&&Er.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=l;const s=n(uS());function l(o,v){let b=null;if(!o||typeof o!="string")return b;const p=(0,s.default)(o),a=typeof v=="function";return p.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:m}=u;a?v(h,m,u):m&&(b=b||{},b[h]=m)}),b}return Er}var Es={},$p;function hS(){if($p)return Es;$p=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,s=/-([a-z])/g,l=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,v=/^-(ms)-/,b=function(h){return!h||l.test(h)||n.test(h)},p=function(h,m){return m.toUpperCase()},a=function(h,m){return"".concat(m,"-")},u=function(h,m){return m===void 0&&(m={}),b(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(v,a):h=h.replace(o,a),h.replace(s,p))};return Es.camelCase=u,Es}var ks,Qp;function fS(){if(Qp)return ks;Qp=1;var n=ks&&ks.__importDefault||function(v){return v&&v.__esModule?v:{default:v}},s=n(cS()),l=hS();function o(v,b){var p={};return!v||typeof v!="string"||(0,s.default)(v,function(a,u){a&&u&&(p[(0,l.camelCase)(a,b)]=u)}),p}return o.default=o,ks=o,ks}var dS=fS();const pS=B_(dS),V_=G_("end"),mc=G_("start");function G_(n){return s;function s(l){const o=l&&l.position&&l.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 _S(n){const s=mc(n),l=V_(n);if(s&&l)return{start:s,end:l}}function Ds(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Zp(n.position):"start"in n||"end"in n?Zp(n):"line"in n||"column"in n?ic(n):""}function ic(n){return Jp(n&&n.line)+":"+Jp(n&&n.column)}function Zp(n){return ic(n&&n.start)+"-"+ic(n&&n.end)}function Jp(n){return n&&typeof n=="number"?n:1}class Rt extends Error{constructor(s,l,o){super(),typeof l=="string"&&(o=l,l=void 0);let v="",b={},p=!1;if(l&&("line"in l&&"column"in l?b={place:l}:"start"in l&&"end"in l?b={place:l}:"type"in l?b={ancestors:[l],place:l.position}:b={...l}),typeof s=="string"?v=s:!b.cause&&s&&(p=!0,v=s.message,b.cause=s),!b.ruleId&&!b.source&&typeof o=="string"){const u=o.indexOf(":");u===-1?b.ruleId=o:(b.source=o.slice(0,u),b.ruleId=o.slice(u+1))}if(!b.place&&b.ancestors&&b.ancestors){const u=b.ancestors[b.ancestors.length-1];u&&(b.place=u.position)}const a=b.place&&"start"in b.place?b.place.start:b.place;this.ancestors=b.ancestors||void 0,this.cause=b.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=v,this.line=a?a.line:void 0,this.name=Ds(b.place)||"1:1",this.place=b.place||void 0,this.reason=this.message,this.ruleId=b.ruleId||void 0,this.source=b.source||void 0,this.stack=p&&b.cause&&typeof b.cause.stack=="string"?b.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const gc={}.hasOwnProperty,mS=new Map,gS=/[A-Z]/g,vS=new Set(["table","tbody","thead","tfoot","tr"]),SS=new Set(["td","th"]),Y_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yS(n,s){if(!s||s.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=s.filePath||void 0;let o;if(s.development){if(typeof s.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=TS(l,s.jsxDEV)}else{if(typeof s.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof s.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=AS(l,s.jsx,s.jsxs)}const v={Fragment:s.Fragment,ancestors:[],components:s.components||{},create:o,elementAttributeNameCase:s.elementAttributeNameCase||"react",evaluater:s.createEvaluater?s.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:s.ignoreInvalidStyle||!1,passKeys:s.passKeys!==!1,passNode:s.passNode||!1,schema:s.space==="svg"?_c:aS,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},b=W_(v,n,void 0);return b&&typeof b!="string"?b:v.create(n,v.Fragment,{children:b||void 0},void 0)}function W_(n,s,l){if(s.type==="element")return bS(n,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return CS(n,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return xS(n,s,l);if(s.type==="mdxjsEsm")return wS(n,s);if(s.type==="root")return ES(n,s,l);if(s.type==="text")return kS(n,s)}function bS(n,s,l){const o=n.schema;let v=o;s.tagName.toLowerCase()==="svg"&&o.space==="html"&&(v=_c,n.schema=v),n.ancestors.push(s);const b=X_(n,s.tagName,!1),p=DS(n,s);let a=Sc(n,s);return vS.has(s.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Q0(u):!0})),K_(n,p,b,s),vc(p,a),n.ancestors.pop(),n.schema=o,n.create(s,b,p,l)}function CS(n,s){if(s.data&&s.data.estree&&n.evaluater){const o=s.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ms(n,s.position)}function wS(n,s){if(s.data&&s.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(s.data.estree);Ms(n,s.position)}function xS(n,s,l){const o=n.schema;let v=o;s.name==="svg"&&o.space==="html"&&(v=_c,n.schema=v),n.ancestors.push(s);const b=s.name===null?n.Fragment:X_(n,s.name,!0),p=RS(n,s),a=Sc(n,s);return K_(n,p,b,s),vc(p,a),n.ancestors.pop(),n.schema=o,n.create(s,b,p,l)}function ES(n,s,l){const o={};return vc(o,Sc(n,s)),n.create(s,n.Fragment,o,l)}function kS(n,s){return s.value}function K_(n,s,l,o){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(s.node=o)}function vc(n,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(n.children=l)}}function AS(n,s,l){return o;function o(v,b,p,a){const h=Array.isArray(p.children)?l:s;return a?h(b,p,a):h(b,p)}}function TS(n,s){return l;function l(o,v,b,p){const a=Array.isArray(b.children),u=mc(o);return s(v,b,p,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function DS(n,s){const l={};let o,v;for(v in s.properties)if(v!=="children"&&gc.call(s.properties,v)){const b=LS(n,v,s.properties[v]);if(b){const[p,a]=b;n.tableCellAlignToStyle&&p==="align"&&typeof a=="string"&&SS.has(s.tagName)?o=a:l[p]=a}}if(o){const b=l.style||(l.style={});b[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return l}function RS(n,s){const l={};for(const o of s.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const b=o.data.estree.body[0];b.type;const p=b.expression;p.type;const a=p.properties[0];a.type,Object.assign(l,n.evaluater.evaluateExpression(a.argument))}else Ms(n,s.position);else{const v=o.name;let b;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,b=n.evaluater.evaluateExpression(a.expression)}else Ms(n,s.position);else b=o.value===null?!0:o.value;l[v]=b}return l}function Sc(n,s){const l=[];let o=-1;const v=n.passKeys?new Map:mS;for(;++o<s.children.length;){const b=s.children[o];let p;if(n.passKeys){const u=b.type==="element"?b.tagName:b.type==="mdxJsxFlowElement"||b.type==="mdxJsxTextElement"?b.name:void 0;if(u){const h=v.get(u)||0;p=u+"-"+h,v.set(u,h+1)}}const a=W_(n,b,p);a!==void 0&&l.push(a)}return l}function LS(n,s,l){const o=rS(n.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=o.commaSeparated?Y0(l):oS(l)),o.property==="style"){let v=typeof l=="object"?l:MS(n,String(l));return n.stylePropertyNameCase==="css"&&(v=OS(v)),["style",v]}return[n.elementAttributeNameCase==="react"&&o.space?tS[o.property]||o.property:o.attribute,l]}}function MS(n,s){try{return pS(s,{reactCompat:!0})}catch(l){if(n.ignoreInvalidStyle)return{};const o=l,v=new Rt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw v.file=n.filePath||void 0,v.url=Y_+"#cannot-parse-style-attribute",v}}function X_(n,s,l){let o;if(!l)o={type:"Literal",value:s};else if(s.includes(".")){const v=s.split(".");let b=-1,p;for(;++b<v.length;){const a=Vp(v[b])?{type:"Identifier",name:v[b]}:{type:"Literal",value:v[b]};p=p?{type:"MemberExpression",object:p,property:a,computed:!!(b&&a.type==="Literal"),optional:!1}:a}o=p}else o=Vp(s)&&!/^[a-z]/.test(s)?{type:"Identifier",name:s}:{type:"Literal",value:s};if(o.type==="Literal"){const v=o.value;return gc.call(n.components,v)?n.components[v]:v}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ms(n)}function Ms(n,s){const l=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:s,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=n.filePath||void 0,l.url=Y_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function OS(n){const s={};let l;for(l in n)gc.call(n,l)&&(s[BS(l)]=n[l]);return s}function BS(n){let s=n.replace(gS,zS);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function zS(n){return"-"+n.toLowerCase()}const Uu={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"]},HS={};function yc(n,s){const l=HS,o=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,v=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return $_(n,o,v)}function $_(n,s,l){if(NS(n)){if("value"in n)return n.type==="html"&&!l?"":n.value;if(s&&"alt"in n&&n.alt)return n.alt;if("children"in n)return e_(n.children,s,l)}return Array.isArray(n)?e_(n,s,l):""}function e_(n,s,l){const o=[];let v=-1;for(;++v<n.length;)o[v]=$_(n[v],s,l);return o.join("")}function NS(n){return!!(n&&typeof n=="object")}const t_=document.createElement("i");function bc(n){const s="&"+n+";";t_.innerHTML=s;const l=t_.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===s?!1:l}function Zt(n,s,l,o){const v=n.length;let b=0,p;if(s<0?s=-s>v?0:v+s:s=s>v?v:s,l=l>0?l:0,o.length<1e4)p=Array.from(o),p.unshift(s,l),n.splice(...p);else for(l&&n.splice(s,l);b<o.length;)p=o.slice(b,b+1e4),p.unshift(s,0),n.splice(...p),b+=1e4,s+=1e4}function cn(n,s){return n.length>0?(Zt(n,n.length,0,s),n):s}const n_={}.hasOwnProperty;function Q_(n){const s={};let l=-1;for(;++l<n.length;)jS(s,n[l]);return s}function jS(n,s){let l;for(l in s){const v=(n_.call(n,l)?n[l]:void 0)||(n[l]={}),b=s[l];let p;if(b)for(p in b){n_.call(v,p)||(v[p]=[]);const a=b[p];US(v[p],Array.isArray(a)?a:a?[a]:[])}}}function US(n,s){let l=-1;const o=[];for(;++l<s.length;)(s[l].add==="after"?n:o).push(s[l]);Zt(n,0,0,o)}function Z_(n,s){const l=Number.parseInt(n,s);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function _n(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=vi(/[A-Za-z]/),Dt=vi(/[\dA-Za-z]/),IS=vi(/[#-'*+\--9=?A-Z^-~]/);function sa(n){return n!==null&&(n<32||n===127)}const rc=vi(/\d/),PS=vi(/[\dA-Fa-f]/),FS=vi(/[!-/:-@[-`{-~]/);function we(n){return n!==null&&n<-2}function et(n){return n!==null&&(n<0||n===32)}function He(n){return n===-2||n===-1||n===32}const ca=vi(new RegExp("\\p{P}|\\p{S}","u")),ji=vi(/\s/);function vi(n){return s;function s(l){return l!==null&&l>-1&&n.test(String.fromCharCode(l))}}function Lr(n){const s=[];let l=-1,o=0,v=0;for(;++l<n.length;){const b=n.charCodeAt(l);let p="";if(b===37&&Dt(n.charCodeAt(l+1))&&Dt(n.charCodeAt(l+2)))v=2;else if(b<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(b))||(p=String.fromCharCode(b));else if(b>55295&&b<57344){const a=n.charCodeAt(l+1);b<56320&&a>56319&&a<57344?(p=String.fromCharCode(b,a),v=1):p="�"}else p=String.fromCharCode(b);p&&(s.push(n.slice(o,l),encodeURIComponent(p)),o=l+v+1,p=""),v&&(l+=v,v=0)}return s.join("")+n.slice(o)}function Ie(n,s,l,o){const v=o?o-1:Number.POSITIVE_INFINITY;let b=0;return p;function p(u){return He(u)?(n.enter(l),a(u)):s(u)}function a(u){return He(u)&&b++<v?(n.consume(u),a):(n.exit(l),s(u))}}const qS={tokenize:VS};function VS(n){const s=n.attempt(this.parser.constructs.contentInitial,o,v);let l;return s;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ie(n,s,"linePrefix")}function v(a){return n.enter("paragraph"),b(a)}function b(a){const u=n.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=u),l=u,p(a)}function p(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return we(a)?(n.consume(a),n.exit("chunkText"),b):(n.consume(a),p)}}const GS={tokenize:YS},i_={tokenize:WS};function YS(n){const s=this,l=[];let o=0,v,b,p;return a;function a(g){if(o<l.length){const E=l[o];return s.containerState=E[1],n.attempt(E[0].continuation,u,h)(g)}return h(g)}function u(g){if(o++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,v&&d();const E=s.events.length;let R=E,A;for(;R--;)if(s.events[R][0]==="exit"&&s.events[R][1].type==="chunkFlow"){A=s.events[R][1].end;break}_(o);let L=E;for(;L<s.events.length;)s.events[L][1].end={...A},L++;return Zt(s.events,R+1,0,s.events.slice(E)),s.events.length=L,h(g)}return a(g)}function h(g){if(o===l.length){if(!v)return C(g);if(v.currentConstruct&&v.currentConstruct.concrete)return k(g);s.interrupt=!!(v.currentConstruct&&!v._gfmTableDynamicInterruptHack)}return s.containerState={},n.check(i_,m,c)(g)}function m(g){return v&&d(),_(o),C(g)}function c(g){return s.parser.lazy[s.now().line]=o!==l.length,p=s.now().offset,k(g)}function C(g){return s.containerState={},n.attempt(i_,w,k)(g)}function w(g){return o++,l.push([s.currentConstruct,s.containerState]),C(g)}function k(g){if(g===null){v&&d(),_(0),n.consume(g);return}return v=v||s.parser.flow(s.now()),n.enter("chunkFlow",{_tokenizer:v,contentType:"flow",previous:b}),x(g)}function x(g){if(g===null){S(n.exit("chunkFlow"),!0),_(0),n.consume(g);return}return we(g)?(n.consume(g),S(n.exit("chunkFlow")),o=0,s.interrupt=void 0,a):(n.consume(g),x)}function S(g,E){const R=s.sliceStream(g);if(E&&R.push(null),g.previous=b,b&&(b.next=g),b=g,v.defineSkip(g.start),v.write(R),s.parser.lazy[g.start.line]){let A=v.events.length;for(;A--;)if(v.events[A][1].start.offset<p&&(!v.events[A][1].end||v.events[A][1].end.offset>p))return;const L=s.events.length;let T=L,B,N;for(;T--;)if(s.events[T][0]==="exit"&&s.events[T][1].type==="chunkFlow"){if(B){N=s.events[T][1].end;break}B=!0}for(_(o),A=L;A<s.events.length;)s.events[A][1].end={...N},A++;Zt(s.events,T+1,0,s.events.slice(L)),s.events.length=A}}function _(g){let E=l.length;for(;E-- >g;){const R=l[E];s.containerState=R[1],R[0].exit.call(s,n)}l.length=g}function d(){v.write([null]),b=void 0,v=void 0,s.containerState._closeFlow=void 0}}function WS(n,s,l){return Ie(n,n.attempt(this.parser.constructs.document,s,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dr(n){if(n===null||et(n)||ji(n))return 1;if(ca(n))return 2}function ha(n,s,l){const o=[];let v=-1;for(;++v<n.length;){const b=n[v].resolveAll;b&&!o.includes(b)&&(s=b(s,l),o.push(b))}return s}const sc={name:"attention",resolveAll:KS,tokenize:XS};function KS(n,s){let l=-1,o,v,b,p,a,u,h,m;for(;++l<n.length;)if(n[l][0]==="enter"&&n[l][1].type==="attentionSequence"&&n[l][1]._close){for(o=l;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&s.sliceSerialize(n[o][1]).charCodeAt(0)===s.sliceSerialize(n[l][1]).charCodeAt(0)){if((n[o][1]._close||n[l][1]._open)&&(n[l][1].end.offset-n[l][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[l][1].end.offset-n[l][1].start.offset)%3))continue;u=n[o][1].end.offset-n[o][1].start.offset>1&&n[l][1].end.offset-n[l][1].start.offset>1?2:1;const c={...n[o][1].end},C={...n[l][1].start};r_(c,-u),r_(C,u),p={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...n[o][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...n[l][1].start},end:C},b={type:u>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[l][1].start}},v={type:u>1?"strong":"emphasis",start:{...p.start},end:{...a.end}},n[o][1].end={...p.start},n[l][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=cn(h,[["enter",n[o][1],s],["exit",n[o][1],s]])),h=cn(h,[["enter",v,s],["enter",p,s],["exit",p,s],["enter",b,s]]),h=cn(h,ha(s.parser.constructs.insideSpan.null,n.slice(o+1,l),s)),h=cn(h,[["exit",b,s],["enter",a,s],["exit",a,s],["exit",v,s]]),n[l][1].end.offset-n[l][1].start.offset?(m=2,h=cn(h,[["enter",n[l][1],s],["exit",n[l][1],s]])):m=0,Zt(n,o-1,l-o+3,h),l=o+h.length-m-2;break}}for(l=-1;++l<n.length;)n[l][1].type==="attentionSequence"&&(n[l][1].type="data");return n}function XS(n,s){const l=this.parser.constructs.attentionMarkers.null,o=this.previous,v=Dr(o);let b;return p;function p(u){return b=u,n.enter("attentionSequence"),a(u)}function a(u){if(u===b)return n.consume(u),a;const h=n.exit("attentionSequence"),m=Dr(u),c=!m||m===2&&v||l.includes(u),C=!v||v===2&&m||l.includes(o);return h._open=!!(b===42?c:c&&(v||!C)),h._close=!!(b===42?C:C&&(m||!c)),s(u)}}function r_(n,s){n.column+=s,n.offset+=s,n._bufferIndex+=s}const $S={name:"autolink",tokenize:QS};function QS(n,s,l){let o=0;return v;function v(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),b}function b(w){return Mt(w)?(n.consume(w),p):w===64?l(w):h(w)}function p(w){return w===43||w===45||w===46||Dt(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,u):(w===43||w===45||w===46||Dt(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function u(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):w===null||w===32||w===60||sa(w)?l(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),m):IS(w)?(n.consume(w),h):l(w)}function m(w){return Dt(w)?c(w):l(w)}function c(w){return w===46?(n.consume(w),o=0,m):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):C(w)}function C(w){if((w===45||Dt(w))&&o++<63){const k=w===45?C:c;return n.consume(w),k}return l(w)}}const zs={partial:!0,tokenize:ZS};function ZS(n,s,l){return o;function o(b){return He(b)?Ie(n,v,"linePrefix")(b):v(b)}function v(b){return b===null||we(b)?s(b):l(b)}}const J_={continuation:{tokenize:ey},exit:ty,name:"blockQuote",tokenize:JS};function JS(n,s,l){const o=this;return v;function v(p){if(p===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(p),n.exit("blockQuoteMarker"),b}return l(p)}function b(p){return He(p)?(n.enter("blockQuotePrefixWhitespace"),n.consume(p),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),s):(n.exit("blockQuotePrefix"),s(p))}}function ey(n,s,l){const o=this;return v;function v(p){return He(p)?Ie(n,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):b(p)}function b(p){return n.attempt(J_,s,l)(p)}}function ty(n){n.exit("blockQuote")}const em={name:"characterEscape",tokenize:ny};function ny(n,s,l){return o;function o(b){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(b),n.exit("escapeMarker"),v}function v(b){return FS(b)?(n.enter("characterEscapeValue"),n.consume(b),n.exit("characterEscapeValue"),n.exit("characterEscape"),s):l(b)}}const tm={name:"characterReference",tokenize:iy};function iy(n,s,l){const o=this;let v=0,b,p;return a;function a(c){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),u}function u(c){return c===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(c),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),b=31,p=Dt,m(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),b=6,p=PS,m):(n.enter("characterReferenceValue"),b=7,p=rc,m(c))}function m(c){if(c===59&&v){const C=n.exit("characterReferenceValue");return p===Dt&&!bc(o.sliceSerialize(C))?l(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),s)}return p(c)&&v++<b?(n.consume(c),m):l(c)}}const s_={partial:!0,tokenize:sy},l_={concrete:!0,name:"codeFenced",tokenize:ry};function ry(n,s,l){const o=this,v={partial:!0,tokenize:R};let b=0,p=0,a;return u;function u(A){return h(A)}function h(A){const L=o.events[o.events.length-1];return b=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=A,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m(A)}function m(A){return A===a?(p++,n.consume(A),m):p<3?l(A):(n.exit("codeFencedFenceSequence"),He(A)?Ie(n,c,"whitespace")(A):c(A))}function c(A){return A===null||we(A)?(n.exit("codeFencedFence"),o.interrupt?s(A):n.check(s_,x,E)(A)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||we(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(A)):He(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ie(n,w,"whitespace")(A)):A===96&&A===a?l(A):(n.consume(A),C)}function w(A){return A===null||we(A)?c(A):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||we(A)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),c(A)):A===96&&A===a?l(A):(n.consume(A),k)}function x(A){return n.attempt(v,E,S)(A)}function S(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),_}function _(A){return b>0&&He(A)?Ie(n,d,"linePrefix",b+1)(A):d(A)}function d(A){return A===null||we(A)?n.check(s_,x,E)(A):(n.enter("codeFlowValue"),g(A))}function g(A){return A===null||we(A)?(n.exit("codeFlowValue"),d(A)):(n.consume(A),g)}function E(A){return n.exit("codeFenced"),s(A)}function R(A,L,T){let B=0;return N;function N(W){return A.enter("lineEnding"),A.consume(W),A.exit("lineEnding"),F}function F(W){return A.enter("codeFencedFence"),He(W)?Ie(A,G,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):G(W)}function G(W){return W===a?(A.enter("codeFencedFenceSequence"),q(W)):T(W)}function q(W){return W===a?(B++,A.consume(W),q):B>=p?(A.exit("codeFencedFenceSequence"),He(W)?Ie(A,$,"whitespace")(W):$(W)):T(W)}function $(W){return W===null||we(W)?(A.exit("codeFencedFence"),L(W)):T(W)}}}function sy(n,s,l){const o=this;return v;function v(p){return p===null?l(p):(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),b)}function b(p){return o.parser.lazy[o.now().line]?l(p):s(p)}}const Iu={name:"codeIndented",tokenize:ay},ly={partial:!0,tokenize:oy};function ay(n,s,l){const o=this;return v;function v(h){return n.enter("codeIndented"),Ie(n,b,"linePrefix",5)(h)}function b(h){const m=o.events[o.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?p(h):l(h)}function p(h){return h===null?u(h):we(h)?n.attempt(ly,p,u)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||we(h)?(n.exit("codeFlowValue"),p(h)):(n.consume(h),a)}function u(h){return n.exit("codeIndented"),s(h)}}function oy(n,s,l){const o=this;return v;function v(p){return o.parser.lazy[o.now().line]?l(p):we(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),v):Ie(n,b,"linePrefix",5)(p)}function b(p){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?s(p):we(p)?v(p):l(p)}}const uy={name:"codeText",previous:hy,resolve:cy,tokenize:fy};function cy(n){let s=n.length-4,l=3,o,v;if((n[l][1].type==="lineEnding"||n[l][1].type==="space")&&(n[s][1].type==="lineEnding"||n[s][1].type==="space")){for(o=l;++o<s;)if(n[o][1].type==="codeTextData"){n[l][1].type="codeTextPadding",n[s][1].type="codeTextPadding",l+=2,s-=2;break}}for(o=l-1,s++;++o<=s;)v===void 0?o!==s&&n[o][1].type!=="lineEnding"&&(v=o):(o===s||n[o][1].type==="lineEnding")&&(n[v][1].type="codeTextData",o!==v+2&&(n[v][1].end=n[o-1][1].end,n.splice(v+2,o-v-2),s-=o-v-2,o=v+2),v=void 0);return n}function hy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fy(n,s,l){let o=0,v,b;return p;function p(c){return n.enter("codeText"),n.enter("codeTextSequence"),a(c)}function a(c){return c===96?(n.consume(c),o++,a):(n.exit("codeTextSequence"),u(c))}function u(c){return c===null?l(c):c===32?(n.enter("space"),n.consume(c),n.exit("space"),u):c===96?(b=n.enter("codeTextSequence"),v=0,m(c)):we(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):(n.enter("codeTextData"),h(c))}function h(c){return c===null||c===32||c===96||we(c)?(n.exit("codeTextData"),u(c)):(n.consume(c),h)}function m(c){return c===96?(n.consume(c),v++,m):v===o?(n.exit("codeTextSequence"),n.exit("codeText"),s(c)):(b.type="codeTextData",h(c))}}class dy{constructor(s){this.left=s?[...s]:[],this.right=[]}get(s){if(s<0||s>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+s+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return s<this.left.length?this.left[s]:this.right[this.right.length-s+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(s,l){const o=l??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(s,o):s>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-s+this.left.length).reverse():this.left.slice(s).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(s,l,o){const v=l||0;this.setCursor(Math.trunc(s));const b=this.right.splice(this.right.length-v,Number.POSITIVE_INFINITY);return o&&As(this.left,o),b.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(s){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(s)}pushMany(s){this.setCursor(Number.POSITIVE_INFINITY),As(this.left,s)}unshift(s){this.setCursor(0),this.right.push(s)}unshiftMany(s){this.setCursor(0),As(this.right,s.reverse())}setCursor(s){if(!(s===this.left.length||s>this.left.length&&this.right.length===0||s<0&&this.left.length===0))if(s<this.left.length){const l=this.left.splice(s,Number.POSITIVE_INFINITY);As(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-s,Number.POSITIVE_INFINITY);As(this.left,l.reverse())}}}function As(n,s){let l=0;if(s.length<1e4)n.push(...s);else for(;l<s.length;)n.push(...s.slice(l,l+1e4)),l+=1e4}function nm(n){const s={};let l=-1,o,v,b,p,a,u,h;const m=new dy(n);for(;++l<m.length;){for(;l in s;)l=s[l];if(o=m.get(l),l&&o[1].type==="chunkFlow"&&m.get(l-1)[1].type==="listItemPrefix"&&(u=o[1]._tokenizer.events,b=0,b<u.length&&u[b][1].type==="lineEndingBlank"&&(b+=2),b<u.length&&u[b][1].type==="content"))for(;++b<u.length&&u[b][1].type!=="content";)u[b][1].type==="chunkText"&&(u[b][1]._isInFirstContentOfListItem=!0,b++);if(o[0]==="enter")o[1].contentType&&(Object.assign(s,py(m,l)),l=s[l],h=!0);else if(o[1]._container){for(b=l,v=void 0;b--;)if(p=m.get(b),p[1].type==="lineEnding"||p[1].type==="lineEndingBlank")p[0]==="enter"&&(v&&(m.get(v)[1].type="lineEndingBlank"),p[1].type="lineEnding",v=b);else if(!(p[1].type==="linePrefix"||p[1].type==="listItemIndent"))break;v&&(o[1].end={...m.get(v)[1].start},a=m.slice(v,l),a.unshift(o),m.splice(v,l-v+1,a))}}return Zt(n,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function py(n,s){const l=n.get(s)[1],o=n.get(s)[2];let v=s-1;const b=[];let p=l._tokenizer;p||(p=o.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(p._contentTypeTextTrailing=!0));const a=p.events,u=[],h={};let m,c,C=-1,w=l,k=0,x=0;const S=[x];for(;w;){for(;n.get(++v)[1]!==w;);b.push(v),w._tokenizer||(m=o.sliceStream(w),w.next||m.push(null),c&&p.defineSkip(w.start),w._isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=!0),p.write(m),w._isInFirstContentOfListItem&&(p._gfmTasklistFirstContentOfListItem=void 0)),c=w,w=w.next}for(w=l;++C<a.length;)a[C][0]==="exit"&&a[C-1][0]==="enter"&&a[C][1].type===a[C-1][1].type&&a[C][1].start.line!==a[C][1].end.line&&(x=C+1,S.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(p.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),C=S.length;C--;){const _=a.slice(S[C],S[C+1]),d=b.pop();u.push([d,d+_.length-1]),n.splice(d,2,_)}for(u.reverse(),C=-1;++C<u.length;)h[k+u[C][0]]=k+u[C][1],k+=u[C][1]-u[C][0]-1;return h}const _y={resolve:gy,tokenize:vy},my={partial:!0,tokenize:Sy};function gy(n){return nm(n),n}function vy(n,s){let l;return o;function o(a){return n.enter("content"),l=n.enter("chunkContent",{contentType:"content"}),v(a)}function v(a){return a===null?b(a):we(a)?n.check(my,p,b)(a):(n.consume(a),v)}function b(a){return n.exit("chunkContent"),n.exit("content"),s(a)}function p(a){return n.consume(a),n.exit("chunkContent"),l.next=n.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,v}}function Sy(n,s,l){const o=this;return v;function v(p){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),Ie(n,b,"linePrefix")}function b(p){if(p===null||we(p))return l(p);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?s(p):n.interrupt(o.parser.constructs.flow,l,s)(p)}}function im(n,s,l,o,v,b,p,a,u){const h=u||Number.POSITIVE_INFINITY;let m=0;return c;function c(_){return _===60?(n.enter(o),n.enter(v),n.enter(b),n.consume(_),n.exit(b),C):_===null||_===32||_===41||sa(_)?l(_):(n.enter(o),n.enter(p),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(_))}function C(_){return _===62?(n.enter(b),n.consume(_),n.exit(b),n.exit(v),n.exit(o),s):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===62?(n.exit("chunkString"),n.exit(a),C(_)):_===null||_===60||we(_)?l(_):(n.consume(_),_===92?k:w)}function k(_){return _===60||_===62||_===92?(n.consume(_),w):w(_)}function x(_){return!m&&(_===null||_===41||et(_))?(n.exit("chunkString"),n.exit(a),n.exit(p),n.exit(o),s(_)):m<h&&_===40?(n.consume(_),m++,x):_===41?(n.consume(_),m--,x):_===null||_===32||_===40||sa(_)?l(_):(n.consume(_),_===92?S:x)}function S(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function rm(n,s,l,o,v,b){const p=this;let a=0,u;return h;function h(w){return n.enter(o),n.enter(v),n.consume(w),n.exit(v),n.enter(b),m}function m(w){return a>999||w===null||w===91||w===93&&!u||w===94&&!a&&"_hiddenFootnoteSupport"in p.parser.constructs?l(w):w===93?(n.exit(b),n.enter(v),n.consume(w),n.exit(v),n.exit(o),s):we(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),m):(n.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||we(w)||a++>999?(n.exit("chunkString"),m(w)):(n.consume(w),u||(u=!He(w)),w===92?C:c)}function C(w){return w===91||w===92||w===93?(n.consume(w),a++,c):c(w)}}function sm(n,s,l,o,v,b){let p;return a;function a(C){return C===34||C===39||C===40?(n.enter(o),n.enter(v),n.consume(C),n.exit(v),p=C===40?41:C,u):l(C)}function u(C){return C===p?(n.enter(v),n.consume(C),n.exit(v),n.exit(o),s):(n.enter(b),h(C))}function h(C){return C===p?(n.exit(b),u(p)):C===null?l(C):we(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),Ie(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===p||C===null||we(C)?(n.exit("chunkString"),h(C)):(n.consume(C),C===92?c:m)}function c(C){return C===p||C===92?(n.consume(C),m):m(C)}}function Rs(n,s){let l;return o;function o(v){return we(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),l=!0,o):He(v)?Ie(n,o,l?"linePrefix":"lineSuffix")(v):s(v)}}const yy={name:"definition",tokenize:Cy},by={partial:!0,tokenize:wy};function Cy(n,s,l){const o=this;let v;return b;function b(w){return n.enter("definition"),p(w)}function p(w){return rm.call(o,n,a,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return v=_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),u):l(w)}function u(w){return et(w)?Rs(n,h)(w):h(w)}function h(w){return im(n,m,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return n.attempt(by,c,c)(w)}function c(w){return He(w)?Ie(n,C,"whitespace")(w):C(w)}function C(w){return w===null||we(w)?(n.exit("definition"),o.parser.defined.push(v),s(w)):l(w)}}function wy(n,s,l){return o;function o(a){return et(a)?Rs(n,v)(a):l(a)}function v(a){return sm(n,b,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function b(a){return He(a)?Ie(n,p,"whitespace")(a):p(a)}function p(a){return a===null||we(a)?s(a):l(a)}}const xy={name:"hardBreakEscape",tokenize:Ey};function Ey(n,s,l){return o;function o(b){return n.enter("hardBreakEscape"),n.consume(b),v}function v(b){return we(b)?(n.exit("hardBreakEscape"),s(b)):l(b)}}const ky={name:"headingAtx",resolve:Ay,tokenize:Ty};function Ay(n,s){let l=n.length-2,o=3,v,b;return n[o][1].type==="whitespace"&&(o+=2),l-2>o&&n[l][1].type==="whitespace"&&(l-=2),n[l][1].type==="atxHeadingSequence"&&(o===l-1||l-4>o&&n[l-2][1].type==="whitespace")&&(l-=o+1===l?2:4),l>o&&(v={type:"atxHeadingText",start:n[o][1].start,end:n[l][1].end},b={type:"chunkText",start:n[o][1].start,end:n[l][1].end,contentType:"text"},Zt(n,o,l-o+1,[["enter",v,s],["enter",b,s],["exit",b,s],["exit",v,s]])),n}function Ty(n,s,l){let o=0;return v;function v(m){return n.enter("atxHeading"),b(m)}function b(m){return n.enter("atxHeadingSequence"),p(m)}function p(m){return m===35&&o++<6?(n.consume(m),p):m===null||et(m)?(n.exit("atxHeadingSequence"),a(m)):l(m)}function a(m){return m===35?(n.enter("atxHeadingSequence"),u(m)):m===null||we(m)?(n.exit("atxHeading"),s(m)):He(m)?Ie(n,a,"whitespace")(m):(n.enter("atxHeadingText"),h(m))}function u(m){return m===35?(n.consume(m),u):(n.exit("atxHeadingSequence"),a(m))}function h(m){return m===null||m===35||et(m)?(n.exit("atxHeadingText"),a(m)):(n.consume(m),h)}}const Dy=["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"],a_=["pre","script","style","textarea"],Ry={concrete:!0,name:"htmlFlow",resolveTo:Oy,tokenize:By},Ly={partial:!0,tokenize:Hy},My={partial:!0,tokenize:zy};function Oy(n){let s=n.length;for(;s--&&!(n[s][0]==="enter"&&n[s][1].type==="htmlFlow"););return s>1&&n[s-2][1].type==="linePrefix"&&(n[s][1].start=n[s-2][1].start,n[s+1][1].start=n[s-2][1].start,n.splice(s-2,2)),n}function By(n,s,l){const o=this;let v,b,p,a,u;return h;function h(H){return m(H)}function m(H){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(H),c}function c(H){return H===33?(n.consume(H),C):H===47?(n.consume(H),b=!0,x):H===63?(n.consume(H),v=3,o.interrupt?s:M):Mt(H)?(n.consume(H),p=String.fromCharCode(H),S):l(H)}function C(H){return H===45?(n.consume(H),v=2,w):H===91?(n.consume(H),v=5,a=0,k):Mt(H)?(n.consume(H),v=4,o.interrupt?s:M):l(H)}function w(H){return H===45?(n.consume(H),o.interrupt?s:M):l(H)}function k(H){const ie="CDATA[";return H===ie.charCodeAt(a++)?(n.consume(H),a===ie.length?o.interrupt?s:G:k):l(H)}function x(H){return Mt(H)?(n.consume(H),p=String.fromCharCode(H),S):l(H)}function S(H){if(H===null||H===47||H===62||et(H)){const ie=H===47,pe=p.toLowerCase();return!ie&&!b&&a_.includes(pe)?(v=1,o.interrupt?s(H):G(H)):Dy.includes(p.toLowerCase())?(v=6,ie?(n.consume(H),_):o.interrupt?s(H):G(H)):(v=7,o.interrupt&&!o.parser.lazy[o.now().line]?l(H):b?d(H):g(H))}return H===45||Dt(H)?(n.consume(H),p+=String.fromCharCode(H),S):l(H)}function _(H){return H===62?(n.consume(H),o.interrupt?s:G):l(H)}function d(H){return He(H)?(n.consume(H),d):N(H)}function g(H){return H===47?(n.consume(H),N):H===58||H===95||Mt(H)?(n.consume(H),E):He(H)?(n.consume(H),g):N(H)}function E(H){return H===45||H===46||H===58||H===95||Dt(H)?(n.consume(H),E):R(H)}function R(H){return H===61?(n.consume(H),A):He(H)?(n.consume(H),R):g(H)}function A(H){return H===null||H===60||H===61||H===62||H===96?l(H):H===34||H===39?(n.consume(H),u=H,L):He(H)?(n.consume(H),A):T(H)}function L(H){return H===u?(n.consume(H),u=null,B):H===null||we(H)?l(H):(n.consume(H),L)}function T(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||et(H)?R(H):(n.consume(H),T)}function B(H){return H===47||H===62||He(H)?g(H):l(H)}function N(H){return H===62?(n.consume(H),F):l(H)}function F(H){return H===null||we(H)?G(H):He(H)?(n.consume(H),F):l(H)}function G(H){return H===45&&v===2?(n.consume(H),P):H===60&&v===1?(n.consume(H),Y):H===62&&v===4?(n.consume(H),O):H===63&&v===3?(n.consume(H),M):H===93&&v===5?(n.consume(H),z):we(H)&&(v===6||v===7)?(n.exit("htmlFlowData"),n.check(Ly,I,q)(H)):H===null||we(H)?(n.exit("htmlFlowData"),q(H)):(n.consume(H),G)}function q(H){return n.check(My,$,I)(H)}function $(H){return n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),W}function W(H){return H===null||we(H)?q(H):(n.enter("htmlFlowData"),G(H))}function P(H){return H===45?(n.consume(H),M):G(H)}function Y(H){return H===47?(n.consume(H),p="",ee):G(H)}function ee(H){if(H===62){const ie=p.toLowerCase();return a_.includes(ie)?(n.consume(H),O):G(H)}return Mt(H)&&p.length<8?(n.consume(H),p+=String.fromCharCode(H),ee):G(H)}function z(H){return H===93?(n.consume(H),M):G(H)}function M(H){return H===62?(n.consume(H),O):H===45&&v===2?(n.consume(H),M):G(H)}function O(H){return H===null||we(H)?(n.exit("htmlFlowData"),I(H)):(n.consume(H),O)}function I(H){return n.exit("htmlFlow"),s(H)}}function zy(n,s,l){const o=this;return v;function v(p){return we(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),b):l(p)}function b(p){return o.parser.lazy[o.now().line]?l(p):s(p)}}function Hy(n,s,l){return o;function o(v){return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),n.attempt(zs,s,l)}}const Ny={name:"htmlText",tokenize:jy};function jy(n,s,l){const o=this;let v,b,p;return a;function a(M){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(M),u}function u(M){return M===33?(n.consume(M),h):M===47?(n.consume(M),R):M===63?(n.consume(M),g):Mt(M)?(n.consume(M),T):l(M)}function h(M){return M===45?(n.consume(M),m):M===91?(n.consume(M),b=0,k):Mt(M)?(n.consume(M),d):l(M)}function m(M){return M===45?(n.consume(M),w):l(M)}function c(M){return M===null?l(M):M===45?(n.consume(M),C):we(M)?(p=c,Y(M)):(n.consume(M),c)}function C(M){return M===45?(n.consume(M),w):c(M)}function w(M){return M===62?P(M):M===45?C(M):c(M)}function k(M){const O="CDATA[";return M===O.charCodeAt(b++)?(n.consume(M),b===O.length?x:k):l(M)}function x(M){return M===null?l(M):M===93?(n.consume(M),S):we(M)?(p=x,Y(M)):(n.consume(M),x)}function S(M){return M===93?(n.consume(M),_):x(M)}function _(M){return M===62?P(M):M===93?(n.consume(M),_):x(M)}function d(M){return M===null||M===62?P(M):we(M)?(p=d,Y(M)):(n.consume(M),d)}function g(M){return M===null?l(M):M===63?(n.consume(M),E):we(M)?(p=g,Y(M)):(n.consume(M),g)}function E(M){return M===62?P(M):g(M)}function R(M){return Mt(M)?(n.consume(M),A):l(M)}function A(M){return M===45||Dt(M)?(n.consume(M),A):L(M)}function L(M){return we(M)?(p=L,Y(M)):He(M)?(n.consume(M),L):P(M)}function T(M){return M===45||Dt(M)?(n.consume(M),T):M===47||M===62||et(M)?B(M):l(M)}function B(M){return M===47?(n.consume(M),P):M===58||M===95||Mt(M)?(n.consume(M),N):we(M)?(p=B,Y(M)):He(M)?(n.consume(M),B):P(M)}function N(M){return M===45||M===46||M===58||M===95||Dt(M)?(n.consume(M),N):F(M)}function F(M){return M===61?(n.consume(M),G):we(M)?(p=F,Y(M)):He(M)?(n.consume(M),F):B(M)}function G(M){return M===null||M===60||M===61||M===62||M===96?l(M):M===34||M===39?(n.consume(M),v=M,q):we(M)?(p=G,Y(M)):He(M)?(n.consume(M),G):(n.consume(M),$)}function q(M){return M===v?(n.consume(M),v=void 0,W):M===null?l(M):we(M)?(p=q,Y(M)):(n.consume(M),q)}function $(M){return M===null||M===34||M===39||M===60||M===61||M===96?l(M):M===47||M===62||et(M)?B(M):(n.consume(M),$)}function W(M){return M===47||M===62||et(M)?B(M):l(M)}function P(M){return M===62?(n.consume(M),n.exit("htmlTextData"),n.exit("htmlText"),s):l(M)}function Y(M){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),ee}function ee(M){return He(M)?Ie(n,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return n.enter("htmlTextData"),p(M)}}const Cc={name:"labelEnd",resolveAll:Fy,resolveTo:qy,tokenize:Vy},Uy={tokenize:Gy},Iy={tokenize:Yy},Py={tokenize:Wy};function Fy(n){let s=-1;const l=[];for(;++s<n.length;){const o=n[s][1];if(l.push(n[s]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const v=o.type==="labelImage"?4:2;o.type="data",s+=v}}return n.length!==l.length&&Zt(n,0,n.length,l),n}function qy(n,s){let l=n.length,o=0,v,b,p,a;for(;l--;)if(v=n[l][1],b){if(v.type==="link"||v.type==="labelLink"&&v._inactive)break;n[l][0]==="enter"&&v.type==="labelLink"&&(v._inactive=!0)}else if(p){if(n[l][0]==="enter"&&(v.type==="labelImage"||v.type==="labelLink")&&!v._balanced&&(b=l,v.type!=="labelLink")){o=2;break}}else v.type==="labelEnd"&&(p=l);const u={type:n[b][1].type==="labelLink"?"link":"image",start:{...n[b][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[b][1].start},end:{...n[p][1].end}},m={type:"labelText",start:{...n[b+o+2][1].end},end:{...n[p-2][1].start}};return a=[["enter",u,s],["enter",h,s]],a=cn(a,n.slice(b+1,b+o+3)),a=cn(a,[["enter",m,s]]),a=cn(a,ha(s.parser.constructs.insideSpan.null,n.slice(b+o+4,p-3),s)),a=cn(a,[["exit",m,s],n[p-2],n[p-1],["exit",h,s]]),a=cn(a,n.slice(p+1)),a=cn(a,[["exit",u,s]]),Zt(n,b,n.length,a),n}function Vy(n,s,l){const o=this;let v=o.events.length,b,p;for(;v--;)if((o.events[v][1].type==="labelImage"||o.events[v][1].type==="labelLink")&&!o.events[v][1]._balanced){b=o.events[v][1];break}return a;function a(C){return b?b._inactive?c(C):(p=o.parser.defined.includes(_n(o.sliceSerialize({start:b.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(C),n.exit("labelMarker"),n.exit("labelEnd"),u):l(C)}function u(C){return C===40?n.attempt(Uy,m,p?m:c)(C):C===91?n.attempt(Iy,m,p?h:c)(C):p?m(C):c(C)}function h(C){return n.attempt(Py,m,c)(C)}function m(C){return s(C)}function c(C){return b._balanced=!0,l(C)}}function Gy(n,s,l){return o;function o(c){return n.enter("resource"),n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),v}function v(c){return et(c)?Rs(n,b)(c):b(c)}function b(c){return c===41?m(c):im(n,p,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function p(c){return et(c)?Rs(n,u)(c):m(c)}function a(c){return l(c)}function u(c){return c===34||c===39||c===40?sm(n,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):m(c)}function h(c){return et(c)?Rs(n,m)(c):m(c)}function m(c){return c===41?(n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),n.exit("resource"),s):l(c)}}function Yy(n,s,l){const o=this;return v;function v(a){return rm.call(o,n,b,p,"reference","referenceMarker","referenceString")(a)}function b(a){return o.parser.defined.includes(_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?s(a):l(a)}function p(a){return l(a)}}function Wy(n,s,l){return o;function o(b){return n.enter("reference"),n.enter("referenceMarker"),n.consume(b),n.exit("referenceMarker"),v}function v(b){return b===93?(n.enter("referenceMarker"),n.consume(b),n.exit("referenceMarker"),n.exit("reference"),s):l(b)}}const Ky={name:"labelStartImage",resolveAll:Cc.resolveAll,tokenize:Xy};function Xy(n,s,l){const o=this;return v;function v(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),b}function b(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),p):l(a)}function p(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(a):s(a)}}const $y={name:"labelStartLink",resolveAll:Cc.resolveAll,tokenize:Qy};function Qy(n,s,l){const o=this;return v;function v(p){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),n.exit("labelLink"),b}function b(p){return p===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(p):s(p)}}const Pu={name:"lineEnding",tokenize:Zy};function Zy(n,s){return l;function l(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ie(n,s,"linePrefix")}}const ia={name:"thematicBreak",tokenize:Jy};function Jy(n,s,l){let o=0,v;return b;function b(h){return n.enter("thematicBreak"),p(h)}function p(h){return v=h,a(h)}function a(h){return h===v?(n.enter("thematicBreakSequence"),u(h)):o>=3&&(h===null||we(h))?(n.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===v?(n.consume(h),o++,u):(n.exit("thematicBreakSequence"),He(h)?Ie(n,a,"whitespace")(h):a(h))}}const Ft={continuation:{tokenize:i1},exit:s1,name:"list",tokenize:n1},e1={partial:!0,tokenize:l1},t1={partial:!0,tokenize:r1};function n1(n,s,l){const o=this,v=o.events[o.events.length-1];let b=v&&v[1].type==="linePrefix"?v[2].sliceSerialize(v[1],!0).length:0,p=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:rc(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(ia,l,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(w)}return l(w)}function u(w){return rc(w)&&++p<10?(n.consume(w),u):(!o.interrupt||p<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):l(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,n.check(zs,o.interrupt?l:m,n.attempt(e1,C,c))}function m(w){return o.containerState.initialBlankLine=!0,b++,C(w)}function c(w){return He(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),C):l(w)}function C(w){return o.containerState.size=b+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,s(w)}}function i1(n,s,l){const o=this;return o.containerState._closeFlow=void 0,n.check(zs,v,b);function v(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ie(n,s,"listItemIndent",o.containerState.size+1)(a)}function b(a){return o.containerState.furtherBlankLines||!He(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,p(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(t1,s,p)(a))}function p(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ie(n,n.attempt(Ft,s,l),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function r1(n,s,l){const o=this;return Ie(n,v,"listItemIndent",o.containerState.size+1);function v(b){const p=o.events[o.events.length-1];return p&&p[1].type==="listItemIndent"&&p[2].sliceSerialize(p[1],!0).length===o.containerState.size?s(b):l(b)}}function s1(n){n.exit(this.containerState.type)}function l1(n,s,l){const o=this;return Ie(n,v,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function v(b){const p=o.events[o.events.length-1];return!He(b)&&p&&p[1].type==="listItemPrefixWhitespace"?s(b):l(b)}}const o_={name:"setextUnderline",resolveTo:a1,tokenize:o1};function a1(n,s){let l=n.length,o,v,b;for(;l--;)if(n[l][0]==="enter"){if(n[l][1].type==="content"){o=l;break}n[l][1].type==="paragraph"&&(v=l)}else n[l][1].type==="content"&&n.splice(l,1),!b&&n[l][1].type==="definition"&&(b=l);const p={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[v][1].type="setextHeadingText",b?(n.splice(v,0,["enter",p,s]),n.splice(b+1,0,["exit",n[o][1],s]),n[o][1].end={...n[b][1].end}):n[o][1]=p,n.push(["exit",p,s]),n}function o1(n,s,l){const o=this;let v;return b;function b(h){let m=o.events.length,c;for(;m--;)if(o.events[m][1].type!=="lineEnding"&&o.events[m][1].type!=="linePrefix"&&o.events[m][1].type!=="content"){c=o.events[m][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||c)?(n.enter("setextHeadingLine"),v=h,p(h)):l(h)}function p(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===v?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),He(h)?Ie(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||we(h)?(n.exit("setextHeadingLine"),s(h)):l(h)}}const u1={tokenize:c1};function c1(n){const s=this,l=n.attempt(zs,o,n.attempt(this.parser.constructs.flowInitial,v,Ie(n,n.attempt(this.parser.constructs.flow,v,n.attempt(_y,v)),"linePrefix")));return l;function o(b){if(b===null){n.consume(b);return}return n.enter("lineEndingBlank"),n.consume(b),n.exit("lineEndingBlank"),s.currentConstruct=void 0,l}function v(b){if(b===null){n.consume(b);return}return n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),s.currentConstruct=void 0,l}}const h1={resolveAll:am()},f1=lm("string"),d1=lm("text");function lm(n){return{resolveAll:am(n==="text"?p1:void 0),tokenize:s};function s(l){const o=this,v=this.parser.constructs[n],b=l.attempt(v,p,a);return p;function p(m){return h(m)?b(m):a(m)}function a(m){if(m===null){l.consume(m);return}return l.enter("data"),l.consume(m),u}function u(m){return h(m)?(l.exit("data"),b(m)):(l.consume(m),u)}function h(m){if(m===null)return!0;const c=v[m];let C=-1;if(c)for(;++C<c.length;){const w=c[C];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function am(n){return s;function s(l,o){let v=-1,b;for(;++v<=l.length;)b===void 0?l[v]&&l[v][1].type==="data"&&(b=v,v++):(!l[v]||l[v][1].type!=="data")&&(v!==b+2&&(l[b][1].end=l[v-1][1].end,l.splice(b+2,v-b-2),v=b+2),b=void 0);return n?n(l,o):l}}function p1(n,s){let l=0;for(;++l<=n.length;)if((l===n.length||n[l][1].type==="lineEnding")&&n[l-1][1].type==="data"){const o=n[l-1][1],v=s.sliceStream(o);let b=v.length,p=-1,a=0,u;for(;b--;){const h=v[b];if(typeof h=="string"){for(p=h.length;h.charCodeAt(p-1)===32;)a++,p--;if(p)break;p=-1}else if(h===-2)u=!0,a++;else if(h!==-1){b++;break}}if(s._contentTypeTextTrailing&&l===n.length&&(a=0),a){const h={type:l===n.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:b?p:o.start._bufferIndex+p,_index:o.start._index+b,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(l,0,["enter",h,s],["exit",h,s]),l+=2)}l++}return n}const _1={42:Ft,43:Ft,45:Ft,48:Ft,49:Ft,50:Ft,51:Ft,52:Ft,53:Ft,54:Ft,55:Ft,56:Ft,57:Ft,62:J_},m1={91:yy},g1={[-2]:Iu,[-1]:Iu,32:Iu},v1={35:ky,42:ia,45:[o_,ia],60:Ry,61:o_,95:ia,96:l_,126:l_},S1={38:tm,92:em},y1={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:Ky,38:tm,42:sc,60:[$S,Ny],91:$y,92:[xy,em],93:Cc,95:sc,96:uy},b1={null:[sc,h1]},C1={null:[42,95]},w1={null:[]},x1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:C1,contentInitial:m1,disable:w1,document:_1,flow:v1,flowInitial:g1,insideSpan:b1,string:S1,text:y1},Symbol.toStringTag,{value:"Module"}));function E1(n,s,l){let o={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const v={},b=[];let p=[],a=[];const u={attempt:L(R),check:L(A),consume:d,enter:g,exit:E,interrupt:L(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:C,sliceStream:w,write:c};let m=s.tokenize.call(h,u);return s.resolveAll&&b.push(s),h;function c(F){return p=cn(p,F),S(),p[p.length-1]!==null?[]:(T(s,0),h.events=ha(b,h.events,h),h.events)}function C(F,G){return A1(w(F),G)}function w(F){return k1(p,F)}function k(){const{_bufferIndex:F,_index:G,line:q,column:$,offset:W}=o;return{_bufferIndex:F,_index:G,line:q,column:$,offset:W}}function x(F){v[F.line]=F.column,N()}function S(){let F;for(;o._index<p.length;){const G=p[o._index];if(typeof G=="string")for(F=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===F&&o._bufferIndex<G.length;)_(G.charCodeAt(o._bufferIndex));else _(G)}}function _(F){m=m(F)}function d(F){we(F)?(o.line++,o.column=1,o.offset+=F===-3?2:1,N()):F!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===p[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=F}function g(F,G){const q=G||{};return q.type=F,q.start=k(),h.events.push(["enter",q,h]),a.push(q),q}function E(F){const G=a.pop();return G.end=k(),h.events.push(["exit",G,h]),G}function R(F,G){T(F,G.from)}function A(F,G){G.restore()}function L(F,G){return q;function q($,W,P){let Y,ee,z,M;return Array.isArray($)?I($):"tokenize"in $?I([$]):O($);function O(de){return X;function X(U){const ae=U!==null&&de[U],Z=U!==null&&de.null,te=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return I(te)(U)}}function I(de){return Y=de,ee=0,de.length===0?P:H(de[ee])}function H(de){return X;function X(U){return M=B(),z=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?pe():de.tokenize.call(G?Object.assign(Object.create(h),G):h,u,ie,pe)(U)}}function ie(de){return F(z,M),W}function pe(de){return M.restore(),++ee<Y.length?H(Y[ee]):P}}}function T(F,G){F.resolveAll&&!b.includes(F)&&b.push(F),F.resolve&&Zt(h.events,G,h.events.length-G,F.resolve(h.events.slice(G),h)),F.resolveTo&&(h.events=F.resolveTo(h.events,h))}function B(){const F=k(),G=h.previous,q=h.currentConstruct,$=h.events.length,W=Array.from(a);return{from:$,restore:P};function P(){o=F,h.previous=G,h.currentConstruct=q,h.events.length=$,a=W,N()}}function N(){o.line in v&&o.column<2&&(o.column=v[o.line],o.offset+=v[o.line]-1)}}function k1(n,s){const l=s.start._index,o=s.start._bufferIndex,v=s.end._index,b=s.end._bufferIndex;let p;if(l===v)p=[n[l].slice(o,b)];else{if(p=n.slice(l,v),o>-1){const a=p[0];typeof a=="string"?p[0]=a.slice(o):p.shift()}b>0&&p.push(n[v].slice(0,b))}return p}function A1(n,s){let l=-1;const o=[];let v;for(;++l<n.length;){const b=n[l];let p;if(typeof b=="string")p=b;else switch(b){case-5:{p="\r";break}case-4:{p=`
61
62
  `;break}case-3:{p=`\r
62
- `;break}case-2:{p=s?" ":" ";break}case-1:{if(!s&&v)continue;p=" ";break}default:p=String.fromCharCode(b)}v=b===-2,o.push(p)}return o.join("")}function A1(n){const o={constructs:Z_([w1,...(n||{}).extensions||[]]),content:v(FS),defined:[],document:v(VS),flow:v(o1),lazy:{},string:v(h1),text:v(f1)};return o;function v(b){return p;function p(a){return x1(o,b,a)}}}function T1(n){for(;!im(n););return n}const u_=/[\0\t\n\r]/g;function D1(){let n=1,s="",l=!0,o;return v;function v(b,p,a){const u=[];let h,_,c,C,w;for(b=s+(typeof b=="string"?b.toString():new TextDecoder(p||void 0).decode(b)),c=0,s="",l&&(b.charCodeAt(0)===65279&&c++,l=void 0);c<b.length;){if(u_.lastIndex=c,h=u_.exec(b),C=h&&h.index!==void 0?h.index:b.length,w=b.charCodeAt(C),!h){s=b.slice(c);break}if(w===10&&c===C&&o)u.push(-3),o=void 0;else switch(o&&(u.push(-5),o=void 0),c<C&&(u.push(b.slice(c,C)),n+=C-c),w){case 0:{u.push(65533),n++;break}case 9:{for(_=Math.ceil(n/4)*4,u.push(-2);n++<_;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:o=!0,n=1}c=C+1}return a&&(o&&u.push(-5),s&&u.push(s),u.push(null)),u}}const R1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function L1(n){return n.replace(R1,M1)}function M1(n,s,l){if(s)return s;if(l.charCodeAt(0)===35){const v=l.charCodeAt(1),b=v===120||v===88;return J_(l.slice(b?2:1),b?16:10)}return yc(l)||n}const um={}.hasOwnProperty;function O1(n,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),B1(l)(T1(A1(l).document().write(D1()(n,s,!0))))}function B1(n){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:b(gn),autolinkProtocol:B,autolinkEmail:B,atxHeading:b(Ye),blockQuote:b(Z),characterEscape:B,characterReference:B,codeFenced:b(ee),codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:b(ee,p),codeText:b(oe,p),codeTextData:B,data:B,codeFlowValue:B,definition:b(Se),definitionDestinationString:p,definitionLabelString:p,definitionTitleString:p,emphasis:b(xe),hardBreakEscape:b(at),hardBreakTrailing:b(at),htmlFlow:b(ke,p),htmlFlowData:B,htmlText:b(ke,p),htmlTextData:B,image:b(mn),label:p,link:b(gn),listItem:b(En),listItemValue:C,listOrdered:b(vn,c),listUnordered:b(vn),paragraph:b(Gn),reference:H,referenceString:p,resourceDestinationString:p,resourceTitleString:p,setextHeading:b(Ye),strong:b(At),thematicBreak:b(Ot)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:ae,autolinkProtocol:I,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:pe,characterReference:K,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:N,codeIndented:u(m),codeText:u($),codeTextData:N,data:N,definition:u(),definitionDestinationString:E,definitionLabelString:d,definitionTitleString:g,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(U),htmlFlowData:N,htmlText:u(Y),htmlTextData:N,image:u(X),label:z,labelText:se,lineEnding:V,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ne,resourceDestinationString:M,resourceTitleString:O,resource:P,setextHeading:u(T),setextHeadingLineSequence:L,setextHeadingText:A,strong:u(),thematicBreak:u()}};cm(s,(n||{}).mdastExtensions||[]);const l={};return o;function o(ue){let ge={type:"root",children:[]};const be={stack:[ge],tokenStack:[],config:s,enter:a,exit:h,buffer:p,resume:_,data:l},Te=[];let Me=-1;for(;++Me<ue.length;)if(ue[Me][1].type==="listOrdered"||ue[Me][1].type==="listUnordered")if(ue[Me][0]==="enter")Te.push(Me);else{const mt=Te.pop();Me=v(ue,mt,Me)}for(Me=-1;++Me<ue.length;){const mt=s[ue[Me][0]];um.call(mt,ue[Me][1].type)&&mt[ue[Me][1].type].call(Object.assign({sliceSerialize:ue[Me][2].sliceSerialize},be),ue[Me][1])}if(be.tokenStack.length>0){const mt=be.tokenStack[be.tokenStack.length-1];(mt[1]||c_).call(be,void 0,mt[0])}for(ge.position={start:gi(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:gi(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<s.transforms.length;)ge=s.transforms[Me](ge)||ge;return ge}function v(ue,ge,be){let Te=ge-1,Me=-1,mt=!1,Pe,bt,gt,Bt;for(;++Te<=be;){const Ze=ue[Te];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Me++:Me--,Bt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Pe&&!Bt&&!Me&&!gt&&(gt=Te),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Me&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Me===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Pe){let Yn=Te;for(bt=void 0;Yn--;){const hn=ue[Yn];if(hn[1].type==="lineEnding"||hn[1].type==="lineEndingBlank"){if(hn[0]==="exit")continue;bt&&(ue[bt][1].type="lineEndingBlank",mt=!0),hn[1].type="lineEnding",bt=Yn}else if(!(hn[1].type==="linePrefix"||hn[1].type==="blockQuotePrefix"||hn[1].type==="blockQuotePrefixWhitespace"||hn[1].type==="blockQuoteMarker"||hn[1].type==="listItemIndent"))break}gt&&(!bt||gt<bt)&&(Pe._spread=!0),Pe.end=Object.assign({},bt?ue[bt][1].start:Ze[1].end),ue.splice(bt||Te,0,["exit",Pe,Ze[2]]),Te++,be++}if(Ze[1].type==="listItemPrefix"){const Yn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Pe=Yn,ue.splice(Te,0,["enter",Yn,Ze[2]]),Te++,be++,gt=void 0,Bt=!0}}}return ue[ge][1]._spread=mt,be}function b(ue,ge){return be;function be(Te){a.call(this,ue(Te),Te),ge&&ge.call(this,Te)}}function p(){this.stack.push({type:"fragment",children:[]})}function a(ue,ge,be){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ge,be||void 0]),ue.position={start:gi(ge.start),end:void 0}}function u(ue){return ge;function ge(be){ue&&ue.call(this,be),h.call(this,be)}}function h(ue,ge){const be=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==ue.type&&(ge?ge.call(this,ue,Te[0]):(Te[1]||c_).call(this,ue,Te[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Ds({start:ue.start,end:ue.end})+"): it’s not open");be.position.end=gi(ue.end)}function _(){return Sc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function C(ue){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ue}function k(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ue}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/(\r?\n|\r)$/g,"")}function d(ue){const ge=this.resume(),be=this.stack[this.stack.length-1];be.label=ge,be.identifier=_n(this.sliceSerialize(ue)).toLowerCase()}function g(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function E(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function R(ue){const ge=this.stack[this.stack.length-1];if(!ge.depth){const be=this.sliceSerialize(ue).length;ge.depth=be}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function L(ue){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const be=this.stack[this.stack.length-1].children;let Te=be[be.length-1];(!Te||Te.type!=="text")&&(Te=ot(),Te.position={start:gi(ue.start),end:void 0},be.push(Te)),this.stack.push(Te)}function N(ue){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ue),ge.position.end=gi(ue.end)}function V(ue){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ge.children[ge.children.length-1];be.position.end=gi(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(ge.type)&&(B.call(this,ue),N.call(this,ue))}function F(){this.data.atHardBreak=!0}function U(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function Y(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function $(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function G(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function X(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function se(ue){const ge=this.sliceSerialize(ue),be=this.stack[this.stack.length-2];be.label=L1(ge),be.identifier=_n(ge).toLowerCase()}function z(){const ue=this.stack[this.stack.length-1],ge=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Te=ue.children;be.children=Te}else be.alt=ge}function M(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function O(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function P(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ne(ue){const ge=this.resume(),be=this.stack[this.stack.length-1];be.label=ge,be.identifier=_n(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function de(ue){this.data.characterReferenceType=ue.type}function pe(ue){const ge=this.sliceSerialize(ue),be=this.data.characterReferenceType;let Te;be?(Te=J_(ge,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=yc(ge);const Me=this.stack[this.stack.length-1];Me.value+=Te}function K(ue){const ge=this.stack.pop();ge.position.end=gi(ue.end)}function I(ue){N.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ue)}function ae(ue){N.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ue)}function Z(){return{type:"blockquote",children:[]}}function ee(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function ke(){return{type:"html",value:""}}function mn(){return{type:"image",title:null,url:"",alt:null}}function gn(){return{type:"link",title:null,url:"",children:[]}}function vn(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function En(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Gn(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function Ot(){return{type:"thematicBreak"}}}function gi(n){return{line:n.line,column:n.column,offset:n.offset}}function cm(n,s){let l=-1;for(;++l<s.length;){const o=s[l];Array.isArray(o)?cm(n,o):z1(n,o)}}function z1(n,s){let l;for(l in s)if(um.call(s,l))switch(l){case"canContainEols":{const o=s[l];o&&n[l].push(...o);break}case"transforms":{const o=s[l];o&&n[l].push(...o);break}case"enter":case"exit":{const o=s[l];o&&Object.assign(n[l],o);break}}}function c_(n,s){throw n?new Error("Cannot close `"+n.type+"` ("+Ds({start:n.start,end:n.end})+"): a different token (`"+s.type+"`, "+Ds({start:s.start,end:s.end})+") is open"):new Error("Cannot close document, a token (`"+s.type+"`, "+Ds({start:s.start,end:s.end})+") is still open")}function H1(n){const s=this;s.parser=l;function l(o){return O1(o,{...s.data("settings"),...n,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function N1(n,s){const l={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(s),!0)};return n.patch(s,l),n.applyData(s,l)}function j1(n,s){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(s,l),[n.applyData(s,l),{type:"text",value:`
63
- `}]}function U1(n,s){const l=s.value?s.value+`
64
- `:"",o={},v=s.lang?s.lang.split(/\s+/):[];v.length>0&&(o.className=["language-"+v[0]]);let b={type:"element",tagName:"code",properties:o,children:[{type:"text",value:l}]};return s.meta&&(b.data={meta:s.meta}),n.patch(s,b),b=n.applyData(s,b),b={type:"element",tagName:"pre",properties:{},children:[b]},n.patch(s,b),b}function I1(n,s){const l={type:"element",tagName:"del",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function P1(n,s){const l={type:"element",tagName:"em",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function F1(n,s){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(s.identifier).toUpperCase(),v=Lr(o.toLowerCase()),b=n.footnoteOrder.indexOf(o);let p,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),p=n.footnoteOrder.length):p=b+1,a+=1,n.footnoteCounts.set(o,a);const u={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+v,id:l+"fnref-"+v+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(p)}]};n.patch(s,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(s,h),n.applyData(s,h)}function q1(n,s){const l={type:"element",tagName:"h"+s.depth,properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function V1(n,s){if(n.options.allowDangerousHtml){const l={type:"raw",value:s.value};return n.patch(s,l),n.applyData(s,l)}}function hm(n,s){const l=s.referenceType;let o="]";if(l==="collapsed"?o+="[]":l==="full"&&(o+="["+(s.label||s.identifier)+"]"),s.type==="imageReference")return[{type:"text",value:"!["+s.alt+o}];const v=n.all(s),b=v[0];b&&b.type==="text"?b.value="["+b.value:v.unshift({type:"text",value:"["});const p=v[v.length-1];return p&&p.type==="text"?p.value+=o:v.push({type:"text",value:o}),v}function G1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return hm(n,s);const v={src:Lr(o.url||""),alt:s.alt};o.title!==null&&o.title!==void 0&&(v.title=o.title);const b={type:"element",tagName:"img",properties:v,children:[]};return n.patch(s,b),n.applyData(s,b)}function Y1(n,s){const l={src:Lr(s.url)};s.alt!==null&&s.alt!==void 0&&(l.alt=s.alt),s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"img",properties:l,children:[]};return n.patch(s,o),n.applyData(s,o)}function W1(n,s){const l={type:"text",value:s.value.replace(/\r?\n|\r/g," ")};n.patch(s,l);const o={type:"element",tagName:"code",properties:{},children:[l]};return n.patch(s,o),n.applyData(s,o)}function K1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return hm(n,s);const v={href:Lr(o.url||"")};o.title!==null&&o.title!==void 0&&(v.title=o.title);const b={type:"element",tagName:"a",properties:v,children:n.all(s)};return n.patch(s,b),n.applyData(s,b)}function X1(n,s){const l={href:Lr(s.url)};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"a",properties:l,children:n.all(s)};return n.patch(s,o),n.applyData(s,o)}function $1(n,s,l){const o=n.all(s),v=l?Q1(l):fm(s),b={},p=[];if(typeof s.checked=="boolean"){const _=o[0];let c;_&&_.type==="element"&&_.tagName==="p"?c=_:(c={type:"element",tagName:"p",properties:{},children:[]},o.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:s.checked,disabled:!0},children:[]}),b.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const _=o[a];(v||a!==0||_.type!=="element"||_.tagName!=="p")&&p.push({type:"text",value:`
65
- `}),_.type==="element"&&_.tagName==="p"&&!v?p.push(..._.children):p.push(_)}const u=o[o.length-1];u&&(v||u.type!=="element"||u.tagName!=="p")&&p.push({type:"text",value:`
66
- `});const h={type:"element",tagName:"li",properties:b,children:p};return n.patch(s,h),n.applyData(s,h)}function Q1(n){let s=!1;if(n.type==="list"){s=n.spread||!1;const l=n.children;let o=-1;for(;!s&&++o<l.length;)s=fm(l[o])}return s}function fm(n){const s=n.spread;return s??n.children.length>1}function Z1(n,s){const l={},o=n.all(s);let v=-1;for(typeof s.start=="number"&&s.start!==1&&(l.start=s.start);++v<o.length;){const p=o[v];if(p.type==="element"&&p.tagName==="li"&&p.properties&&Array.isArray(p.properties.className)&&p.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const b={type:"element",tagName:s.ordered?"ol":"ul",properties:l,children:n.wrap(o,!0)};return n.patch(s,b),n.applyData(s,b)}function J1(n,s){const l={type:"element",tagName:"p",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function eb(n,s){const l={type:"root",children:n.wrap(n.all(s))};return n.patch(s,l),n.applyData(s,l)}function tb(n,s){const l={type:"element",tagName:"strong",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function nb(n,s){const l=n.all(s),o=l.shift(),v=[];if(o){const p={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(s.children[0],p),v.push(p)}if(l.length>0){const p={type:"element",tagName:"tbody",properties:{},children:n.wrap(l,!0)},a=_c(s.children[1]),u=G_(s.children[s.children.length-1]);a&&u&&(p.position={start:a,end:u}),v.push(p)}const b={type:"element",tagName:"table",properties:{},children:n.wrap(v,!0)};return n.patch(s,b),n.applyData(s,b)}function ib(n,s,l){const o=l?l.children:void 0,b=(o?o.indexOf(s):1)===0?"th":"td",p=l&&l.type==="table"?l.align:void 0,a=p?p.length:s.children.length;let u=-1;const h=[];for(;++u<a;){const c=s.children[u],C={},w=p?p[u]:void 0;w&&(C.align=w);let k={type:"element",tagName:b,properties:C,children:[]};c&&(k.children=n.all(c),n.patch(c,k),k=n.applyData(c,k)),h.push(k)}const _={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(s,_),n.applyData(s,_)}function rb(n,s){const l={type:"element",tagName:"td",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}const h_=9,f_=32;function sb(n){const s=String(n),l=/\r?\n|\r/g;let o=l.exec(s),v=0;const b=[];for(;o;)b.push(d_(s.slice(v,o.index),v>0,!0),o[0]),v=o.index+o[0].length,o=l.exec(s);return b.push(d_(s.slice(v),v>0,!1)),b.join("")}function d_(n,s,l){let o=0,v=n.length;if(s){let b=n.codePointAt(o);for(;b===h_||b===f_;)o++,b=n.codePointAt(o)}if(l){let b=n.codePointAt(v-1);for(;b===h_||b===f_;)v--,b=n.codePointAt(v-1)}return v>o?n.slice(o,v):""}function lb(n,s){const l={type:"text",value:sb(String(s.value))};return n.patch(s,l),n.applyData(s,l)}function ab(n,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(s,l),n.applyData(s,l)}const ob={blockquote:N1,break:j1,code:U1,delete:I1,emphasis:P1,footnoteReference:F1,heading:q1,html:V1,imageReference:G1,image:Y1,inlineCode:W1,linkReference:K1,link:X1,listItem:$1,list:Z1,paragraph:J1,root:eb,strong:tb,table:nb,tableCell:rb,tableRow:ib,text:lb,thematicBreak:ab,toml:Jl,yaml:Jl,definition:Jl,footnoteDefinition:Jl};function Jl(){}const dm=-1,fa=0,Ls=1,sa=2,Cc=3,wc=4,xc=5,Ec=6,pm=7,_m=8,ub=typeof self=="object"?self:globalThis,p_=(n,s)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new ub[n](s)},cb=(n,s)=>{const l=(v,b)=>(n.set(b,v),v),o=v=>{if(n.has(v))return n.get(v);const[b,p]=s[v];switch(b){case fa:case dm:return l(p,v);case Ls:{const a=l([],v);for(const u of p)a.push(o(u));return a}case sa:{const a=l({},v);for(const[u,h]of p)a[o(u)]=o(h);return a}case Cc:return l(new Date(p),v);case wc:{const{source:a,flags:u}=p;return l(new RegExp(a,u),v)}case xc:{const a=l(new Map,v);for(const[u,h]of p)a.set(o(u),o(h));return a}case Ec:{const a=l(new Set,v);for(const u of p)a.add(o(u));return a}case pm:{const{name:a,message:u}=p;return l(p_(a,u),v)}case _m:return l(BigInt(p),v);case"BigInt":return l(Object(BigInt(p)),v);case"ArrayBuffer":return l(new Uint8Array(p).buffer,p);case"DataView":{const{buffer:a}=new Uint8Array(p);return l(new DataView(a),p)}}return l(p_(b,p),v)};return o},__=n=>cb(new Map,n)(0),kr="",{toString:hb}={},{keys:fb}=Object,Ts=n=>{const s=typeof n;if(s!=="object"||!n)return[fa,s];const l=hb.call(n).slice(8,-1);switch(l){case"Array":return[Ls,kr];case"Object":return[sa,kr];case"Date":return[Cc,kr];case"RegExp":return[wc,kr];case"Map":return[xc,kr];case"Set":return[Ec,kr];case"DataView":return[Ls,l]}return l.includes("Array")?[Ls,l]:l.includes("Error")?[pm,l]:[sa,l]},ea=([n,s])=>n===fa&&(s==="function"||s==="symbol"),db=(n,s,l,o)=>{const v=(p,a)=>{const u=o.push(p)-1;return l.set(a,u),u},b=p=>{if(l.has(p))return l.get(p);let[a,u]=Ts(p);switch(a){case fa:{let _=p;switch(u){case"bigint":a=_m,_=p.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);_=null;break;case"undefined":return v([dm],p)}return v([a,_],p)}case Ls:{if(u){let C=p;return u==="DataView"?C=new Uint8Array(p.buffer):u==="ArrayBuffer"&&(C=new Uint8Array(p)),v([u,[...C]],p)}const _=[],c=v([a,_],p);for(const C of p)_.push(b(C));return c}case sa:{if(u)switch(u){case"BigInt":return v([u,p.toString()],p);case"Boolean":case"Number":case"String":return v([u,p.valueOf()],p)}if(s&&"toJSON"in p)return b(p.toJSON());const _=[],c=v([a,_],p);for(const C of fb(p))(n||!ea(Ts(p[C])))&&_.push([b(C),b(p[C])]);return c}case Cc:return v([a,p.toISOString()],p);case wc:{const{source:_,flags:c}=p;return v([a,{source:_,flags:c}],p)}case xc:{const _=[],c=v([a,_],p);for(const[C,w]of p)(n||!(ea(Ts(C))||ea(Ts(w))))&&_.push([b(C),b(w)]);return c}case Ec:{const _=[],c=v([a,_],p);for(const C of p)(n||!ea(Ts(C)))&&_.push(b(C));return c}}const{message:h}=p;return v([a,{name:u,message:h}],p)};return b},m_=(n,{json:s,lossy:l}={})=>{const o=[];return db(!(s||l),!!s,new Map,o)(n),o},la=typeof structuredClone=="function"?(n,s)=>s&&("json"in s||"lossy"in s)?__(m_(n,s)):structuredClone(n):(n,s)=>__(m_(n,s));function pb(n,s){const l=[{type:"text",value:"↩"}];return s>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(s)}]}),l}function _b(n,s){return"Back to reference "+(n+1)+(s>1?"-"+s:"")}function mb(n){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||pb,o=n.options.footnoteBackLabel||_b,v=n.options.footnoteLabel||"Footnotes",b=n.options.footnoteLabelTagName||"h2",p=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[u]);if(!h)continue;const _=n.all(h),c=String(h.identifier).toUpperCase(),C=Lr(c.toLowerCase());let w=0;const k=[],x=n.footnoteCounts.get(c);for(;x!==void 0&&++w<=x;){k.length>0&&k.push({type:"text",value:" "});let d=typeof l=="string"?l:l(u,w);typeof d=="string"&&(d={type:"text",value:d}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+C+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(u,w),className:["data-footnote-backref"]},children:Array.isArray(d)?d:[d]})}const S=_[_.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const d=S.children[S.children.length-1];d&&d.type==="text"?d.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else _.push(...k);const m={type:"element",tagName:"li",properties:{id:s+"fn-"+C},children:n.wrap(_,!0)};n.patch(h,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:b,properties:{...la(p),id:"footnote-label"},children:[{type:"text",value:v}]},{type:"text",value:`
63
+ `;break}case-2:{p=s?" ":" ";break}case-1:{if(!s&&v)continue;p=" ";break}default:p=String.fromCharCode(b)}v=b===-2,o.push(p)}return o.join("")}function T1(n){const o={constructs:Q_([x1,...(n||{}).extensions||[]]),content:v(qS),defined:[],document:v(GS),flow:v(u1),lazy:{},string:v(f1),text:v(d1)};return o;function v(b){return p;function p(a){return E1(o,b,a)}}}function D1(n){for(;!nm(n););return n}const u_=/[\0\t\n\r]/g;function R1(){let n=1,s="",l=!0,o;return v;function v(b,p,a){const u=[];let h,m,c,C,w;for(b=s+(typeof b=="string"?b.toString():new TextDecoder(p||void 0).decode(b)),c=0,s="",l&&(b.charCodeAt(0)===65279&&c++,l=void 0);c<b.length;){if(u_.lastIndex=c,h=u_.exec(b),C=h&&h.index!==void 0?h.index:b.length,w=b.charCodeAt(C),!h){s=b.slice(c);break}if(w===10&&c===C&&o)u.push(-3),o=void 0;else switch(o&&(u.push(-5),o=void 0),c<C&&(u.push(b.slice(c,C)),n+=C-c),w){case 0:{u.push(65533),n++;break}case 9:{for(m=Math.ceil(n/4)*4,u.push(-2);n++<m;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:o=!0,n=1}c=C+1}return a&&(o&&u.push(-5),s&&u.push(s),u.push(null)),u}}const L1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function M1(n){return n.replace(L1,O1)}function O1(n,s,l){if(s)return s;if(l.charCodeAt(0)===35){const v=l.charCodeAt(1),b=v===120||v===88;return Z_(l.slice(b?2:1),b?16:10)}return bc(l)||n}const om={}.hasOwnProperty;function B1(n,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),z1(l)(D1(T1(l).document().write(R1()(n,s,!0))))}function z1(n){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:b(gn),autolinkProtocol:B,autolinkEmail:B,atxHeading:b(Ye),blockQuote:b(Z),characterEscape:B,characterReference:B,codeFenced:b(te),codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:b(te,p),codeText:b(oe,p),codeTextData:B,data:B,codeFlowValue:B,definition:b(Se),definitionDestinationString:p,definitionLabelString:p,definitionTitleString:p,emphasis:b(xe),hardBreakEscape:b(at),hardBreakTrailing:b(at),htmlFlow:b(ke,p),htmlFlowData:B,htmlText:b(ke,p),htmlTextData:B,image:b(mn),label:p,link:b(gn),listItem:b(En),listItemValue:C,listOrdered:b(vn,c),listUnordered:b(vn),paragraph:b(Gn),reference:H,referenceString:p,resourceDestinationString:p,resourceTitleString:p,setextHeading:b(Ye),strong:b(At),thematicBreak:b(Ot)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:ae,autolinkProtocol:U,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:de,characterReference:X,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:N,codeIndented:u(_),codeText:u(W),codeTextData:N,data:N,definition:u(),definitionDestinationString:E,definitionLabelString:d,definitionTitleString:g,emphasis:u(),hardBreakEscape:u(G),hardBreakTrailing:u(G),htmlFlow:u(q),htmlFlowData:N,htmlText:u($),htmlTextData:N,image:u(Y),label:z,labelText:ee,lineEnding:F,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:M,resourceTitleString:O,resource:I,setextHeading:u(T),setextHeadingLineSequence:L,setextHeadingText:A,strong:u(),thematicBreak:u()}};um(s,(n||{}).mdastExtensions||[]);const l={};return o;function o(ue){let ge={type:"root",children:[]};const be={stack:[ge],tokenStack:[],config:s,enter:a,exit:h,buffer:p,resume:m,data:l},Te=[];let Oe=-1;for(;++Oe<ue.length;)if(ue[Oe][1].type==="listOrdered"||ue[Oe][1].type==="listUnordered")if(ue[Oe][0]==="enter")Te.push(Oe);else{const mt=Te.pop();Oe=v(ue,mt,Oe)}for(Oe=-1;++Oe<ue.length;){const mt=s[ue[Oe][0]];om.call(mt,ue[Oe][1].type)&&mt[ue[Oe][1].type].call(Object.assign({sliceSerialize:ue[Oe][2].sliceSerialize},be),ue[Oe][1])}if(be.tokenStack.length>0){const mt=be.tokenStack[be.tokenStack.length-1];(mt[1]||c_).call(be,void 0,mt[0])}for(ge.position={start:gi(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:gi(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<s.transforms.length;)ge=s.transforms[Oe](ge)||ge;return ge}function v(ue,ge,be){let Te=ge-1,Oe=-1,mt=!1,Pe,bt,gt,Bt;for(;++Te<=be;){const Ze=ue[Te];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Oe++:Oe--,Bt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Pe&&!Bt&&!Oe&&!gt&&(gt=Te),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Oe&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Oe===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Pe){let Yn=Te;for(bt=void 0;Yn--;){const hn=ue[Yn];if(hn[1].type==="lineEnding"||hn[1].type==="lineEndingBlank"){if(hn[0]==="exit")continue;bt&&(ue[bt][1].type="lineEndingBlank",mt=!0),hn[1].type="lineEnding",bt=Yn}else if(!(hn[1].type==="linePrefix"||hn[1].type==="blockQuotePrefix"||hn[1].type==="blockQuotePrefixWhitespace"||hn[1].type==="blockQuoteMarker"||hn[1].type==="listItemIndent"))break}gt&&(!bt||gt<bt)&&(Pe._spread=!0),Pe.end=Object.assign({},bt?ue[bt][1].start:Ze[1].end),ue.splice(bt||Te,0,["exit",Pe,Ze[2]]),Te++,be++}if(Ze[1].type==="listItemPrefix"){const Yn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Pe=Yn,ue.splice(Te,0,["enter",Yn,Ze[2]]),Te++,be++,gt=void 0,Bt=!0}}}return ue[ge][1]._spread=mt,be}function b(ue,ge){return be;function be(Te){a.call(this,ue(Te),Te),ge&&ge.call(this,Te)}}function p(){this.stack.push({type:"fragment",children:[]})}function a(ue,ge,be){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ge,be||void 0]),ue.position={start:gi(ge.start),end:void 0}}function u(ue){return ge;function ge(be){ue&&ue.call(this,be),h.call(this,be)}}function h(ue,ge){const be=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==ue.type&&(ge?ge.call(this,ue,Te[0]):(Te[1]||c_).call(this,ue,Te[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Ds({start:ue.start,end:ue.end})+"): it’s not open");be.position.end=gi(ue.end)}function m(){return yc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function C(ue){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ue}function k(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ue}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/(\r?\n|\r)$/g,"")}function d(ue){const ge=this.resume(),be=this.stack[this.stack.length-1];be.label=ge,be.identifier=_n(this.sliceSerialize(ue)).toLowerCase()}function g(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function E(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function R(ue){const ge=this.stack[this.stack.length-1];if(!ge.depth){const be=this.sliceSerialize(ue).length;ge.depth=be}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function L(ue){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const be=this.stack[this.stack.length-1].children;let Te=be[be.length-1];(!Te||Te.type!=="text")&&(Te=ot(),Te.position={start:gi(ue.start),end:void 0},be.push(Te)),this.stack.push(Te)}function N(ue){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ue),ge.position.end=gi(ue.end)}function F(ue){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ge.children[ge.children.length-1];be.position.end=gi(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(ge.type)&&(B.call(this,ue),N.call(this,ue))}function G(){this.data.atHardBreak=!0}function q(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function $(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function W(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function P(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Y(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function ee(ue){const ge=this.sliceSerialize(ue),be=this.stack[this.stack.length-2];be.label=M1(ge),be.identifier=_n(ge).toLowerCase()}function z(){const ue=this.stack[this.stack.length-1],ge=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Te=ue.children;be.children=Te}else be.alt=ge}function M(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function O(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function I(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ie(ue){const ge=this.resume(),be=this.stack[this.stack.length-1];be.label=ge,be.identifier=_n(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function pe(ue){this.data.characterReferenceType=ue.type}function de(ue){const ge=this.sliceSerialize(ue),be=this.data.characterReferenceType;let Te;be?(Te=Z_(ge,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=bc(ge);const Oe=this.stack[this.stack.length-1];Oe.value+=Te}function X(ue){const ge=this.stack.pop();ge.position.end=gi(ue.end)}function U(ue){N.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ue)}function ae(ue){N.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ue)}function Z(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function ke(){return{type:"html",value:""}}function mn(){return{type:"image",title:null,url:"",alt:null}}function gn(){return{type:"link",title:null,url:"",children:[]}}function vn(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function En(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Gn(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function Ot(){return{type:"thematicBreak"}}}function gi(n){return{line:n.line,column:n.column,offset:n.offset}}function um(n,s){let l=-1;for(;++l<s.length;){const o=s[l];Array.isArray(o)?um(n,o):H1(n,o)}}function H1(n,s){let l;for(l in s)if(om.call(s,l))switch(l){case"canContainEols":{const o=s[l];o&&n[l].push(...o);break}case"transforms":{const o=s[l];o&&n[l].push(...o);break}case"enter":case"exit":{const o=s[l];o&&Object.assign(n[l],o);break}}}function c_(n,s){throw n?new Error("Cannot close `"+n.type+"` ("+Ds({start:n.start,end:n.end})+"): a different token (`"+s.type+"`, "+Ds({start:s.start,end:s.end})+") is open"):new Error("Cannot close document, a token (`"+s.type+"`, "+Ds({start:s.start,end:s.end})+") is still open")}function N1(n){const s=this;s.parser=l;function l(o){return B1(o,{...s.data("settings"),...n,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function j1(n,s){const l={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(s),!0)};return n.patch(s,l),n.applyData(s,l)}function U1(n,s){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(s,l),[n.applyData(s,l),{type:"text",value:`
64
+ `}]}function I1(n,s){const l=s.value?s.value+`
65
+ `:"",o={},v=s.lang?s.lang.split(/\s+/):[];v.length>0&&(o.className=["language-"+v[0]]);let b={type:"element",tagName:"code",properties:o,children:[{type:"text",value:l}]};return s.meta&&(b.data={meta:s.meta}),n.patch(s,b),b=n.applyData(s,b),b={type:"element",tagName:"pre",properties:{},children:[b]},n.patch(s,b),b}function P1(n,s){const l={type:"element",tagName:"del",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function F1(n,s){const l={type:"element",tagName:"em",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function q1(n,s){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(s.identifier).toUpperCase(),v=Lr(o.toLowerCase()),b=n.footnoteOrder.indexOf(o);let p,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),p=n.footnoteOrder.length):p=b+1,a+=1,n.footnoteCounts.set(o,a);const u={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+v,id:l+"fnref-"+v+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(p)}]};n.patch(s,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(s,h),n.applyData(s,h)}function V1(n,s){const l={type:"element",tagName:"h"+s.depth,properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function G1(n,s){if(n.options.allowDangerousHtml){const l={type:"raw",value:s.value};return n.patch(s,l),n.applyData(s,l)}}function cm(n,s){const l=s.referenceType;let o="]";if(l==="collapsed"?o+="[]":l==="full"&&(o+="["+(s.label||s.identifier)+"]"),s.type==="imageReference")return[{type:"text",value:"!["+s.alt+o}];const v=n.all(s),b=v[0];b&&b.type==="text"?b.value="["+b.value:v.unshift({type:"text",value:"["});const p=v[v.length-1];return p&&p.type==="text"?p.value+=o:v.push({type:"text",value:o}),v}function Y1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return cm(n,s);const v={src:Lr(o.url||""),alt:s.alt};o.title!==null&&o.title!==void 0&&(v.title=o.title);const b={type:"element",tagName:"img",properties:v,children:[]};return n.patch(s,b),n.applyData(s,b)}function W1(n,s){const l={src:Lr(s.url)};s.alt!==null&&s.alt!==void 0&&(l.alt=s.alt),s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"img",properties:l,children:[]};return n.patch(s,o),n.applyData(s,o)}function K1(n,s){const l={type:"text",value:s.value.replace(/\r?\n|\r/g," ")};n.patch(s,l);const o={type:"element",tagName:"code",properties:{},children:[l]};return n.patch(s,o),n.applyData(s,o)}function X1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return cm(n,s);const v={href:Lr(o.url||"")};o.title!==null&&o.title!==void 0&&(v.title=o.title);const b={type:"element",tagName:"a",properties:v,children:n.all(s)};return n.patch(s,b),n.applyData(s,b)}function $1(n,s){const l={href:Lr(s.url)};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"a",properties:l,children:n.all(s)};return n.patch(s,o),n.applyData(s,o)}function Q1(n,s,l){const o=n.all(s),v=l?Z1(l):hm(s),b={},p=[];if(typeof s.checked=="boolean"){const m=o[0];let c;m&&m.type==="element"&&m.tagName==="p"?c=m:(c={type:"element",tagName:"p",properties:{},children:[]},o.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:s.checked,disabled:!0},children:[]}),b.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const m=o[a];(v||a!==0||m.type!=="element"||m.tagName!=="p")&&p.push({type:"text",value:`
66
+ `}),m.type==="element"&&m.tagName==="p"&&!v?p.push(...m.children):p.push(m)}const u=o[o.length-1];u&&(v||u.type!=="element"||u.tagName!=="p")&&p.push({type:"text",value:`
67
+ `});const h={type:"element",tagName:"li",properties:b,children:p};return n.patch(s,h),n.applyData(s,h)}function Z1(n){let s=!1;if(n.type==="list"){s=n.spread||!1;const l=n.children;let o=-1;for(;!s&&++o<l.length;)s=hm(l[o])}return s}function hm(n){const s=n.spread;return s??n.children.length>1}function J1(n,s){const l={},o=n.all(s);let v=-1;for(typeof s.start=="number"&&s.start!==1&&(l.start=s.start);++v<o.length;){const p=o[v];if(p.type==="element"&&p.tagName==="li"&&p.properties&&Array.isArray(p.properties.className)&&p.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const b={type:"element",tagName:s.ordered?"ol":"ul",properties:l,children:n.wrap(o,!0)};return n.patch(s,b),n.applyData(s,b)}function eb(n,s){const l={type:"element",tagName:"p",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function tb(n,s){const l={type:"root",children:n.wrap(n.all(s))};return n.patch(s,l),n.applyData(s,l)}function nb(n,s){const l={type:"element",tagName:"strong",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function ib(n,s){const l=n.all(s),o=l.shift(),v=[];if(o){const p={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(s.children[0],p),v.push(p)}if(l.length>0){const p={type:"element",tagName:"tbody",properties:{},children:n.wrap(l,!0)},a=mc(s.children[1]),u=V_(s.children[s.children.length-1]);a&&u&&(p.position={start:a,end:u}),v.push(p)}const b={type:"element",tagName:"table",properties:{},children:n.wrap(v,!0)};return n.patch(s,b),n.applyData(s,b)}function rb(n,s,l){const o=l?l.children:void 0,b=(o?o.indexOf(s):1)===0?"th":"td",p=l&&l.type==="table"?l.align:void 0,a=p?p.length:s.children.length;let u=-1;const h=[];for(;++u<a;){const c=s.children[u],C={},w=p?p[u]:void 0;w&&(C.align=w);let k={type:"element",tagName:b,properties:C,children:[]};c&&(k.children=n.all(c),n.patch(c,k),k=n.applyData(c,k)),h.push(k)}const m={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(s,m),n.applyData(s,m)}function sb(n,s){const l={type:"element",tagName:"td",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}const h_=9,f_=32;function lb(n){const s=String(n),l=/\r?\n|\r/g;let o=l.exec(s),v=0;const b=[];for(;o;)b.push(d_(s.slice(v,o.index),v>0,!0),o[0]),v=o.index+o[0].length,o=l.exec(s);return b.push(d_(s.slice(v),v>0,!1)),b.join("")}function d_(n,s,l){let o=0,v=n.length;if(s){let b=n.codePointAt(o);for(;b===h_||b===f_;)o++,b=n.codePointAt(o)}if(l){let b=n.codePointAt(v-1);for(;b===h_||b===f_;)v--,b=n.codePointAt(v-1)}return v>o?n.slice(o,v):""}function ab(n,s){const l={type:"text",value:lb(String(s.value))};return n.patch(s,l),n.applyData(s,l)}function ob(n,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(s,l),n.applyData(s,l)}const ub={blockquote:j1,break:U1,code:I1,delete:P1,emphasis:F1,footnoteReference:q1,heading:V1,html:G1,imageReference:Y1,image:W1,inlineCode:K1,linkReference:X1,link:$1,listItem:Q1,list:J1,paragraph:eb,root:tb,strong:nb,table:ib,tableCell:sb,tableRow:rb,text:ab,thematicBreak:ob,toml:Jl,yaml:Jl,definition:Jl,footnoteDefinition:Jl};function Jl(){}const fm=-1,fa=0,Ls=1,la=2,wc=3,xc=4,Ec=5,kc=6,dm=7,pm=8,cb=typeof self=="object"?self:globalThis,p_=(n,s)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new cb[n](s)},hb=(n,s)=>{const l=(v,b)=>(n.set(b,v),v),o=v=>{if(n.has(v))return n.get(v);const[b,p]=s[v];switch(b){case fa:case fm:return l(p,v);case Ls:{const a=l([],v);for(const u of p)a.push(o(u));return a}case la:{const a=l({},v);for(const[u,h]of p)a[o(u)]=o(h);return a}case wc:return l(new Date(p),v);case xc:{const{source:a,flags:u}=p;return l(new RegExp(a,u),v)}case Ec:{const a=l(new Map,v);for(const[u,h]of p)a.set(o(u),o(h));return a}case kc:{const a=l(new Set,v);for(const u of p)a.add(o(u));return a}case dm:{const{name:a,message:u}=p;return l(p_(a,u),v)}case pm:return l(BigInt(p),v);case"BigInt":return l(Object(BigInt(p)),v);case"ArrayBuffer":return l(new Uint8Array(p).buffer,p);case"DataView":{const{buffer:a}=new Uint8Array(p);return l(new DataView(a),p)}}return l(p_(b,p),v)};return o},__=n=>hb(new Map,n)(0),kr="",{toString:fb}={},{keys:db}=Object,Ts=n=>{const s=typeof n;if(s!=="object"||!n)return[fa,s];const l=fb.call(n).slice(8,-1);switch(l){case"Array":return[Ls,kr];case"Object":return[la,kr];case"Date":return[wc,kr];case"RegExp":return[xc,kr];case"Map":return[Ec,kr];case"Set":return[kc,kr];case"DataView":return[Ls,l]}return l.includes("Array")?[Ls,l]:l.includes("Error")?[dm,l]:[la,l]},ea=([n,s])=>n===fa&&(s==="function"||s==="symbol"),pb=(n,s,l,o)=>{const v=(p,a)=>{const u=o.push(p)-1;return l.set(a,u),u},b=p=>{if(l.has(p))return l.get(p);let[a,u]=Ts(p);switch(a){case fa:{let m=p;switch(u){case"bigint":a=pm,m=p.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);m=null;break;case"undefined":return v([fm],p)}return v([a,m],p)}case Ls:{if(u){let C=p;return u==="DataView"?C=new Uint8Array(p.buffer):u==="ArrayBuffer"&&(C=new Uint8Array(p)),v([u,[...C]],p)}const m=[],c=v([a,m],p);for(const C of p)m.push(b(C));return c}case la:{if(u)switch(u){case"BigInt":return v([u,p.toString()],p);case"Boolean":case"Number":case"String":return v([u,p.valueOf()],p)}if(s&&"toJSON"in p)return b(p.toJSON());const m=[],c=v([a,m],p);for(const C of db(p))(n||!ea(Ts(p[C])))&&m.push([b(C),b(p[C])]);return c}case wc:return v([a,p.toISOString()],p);case xc:{const{source:m,flags:c}=p;return v([a,{source:m,flags:c}],p)}case Ec:{const m=[],c=v([a,m],p);for(const[C,w]of p)(n||!(ea(Ts(C))||ea(Ts(w))))&&m.push([b(C),b(w)]);return c}case kc:{const m=[],c=v([a,m],p);for(const C of p)(n||!ea(Ts(C)))&&m.push(b(C));return c}}const{message:h}=p;return v([a,{name:u,message:h}],p)};return b},m_=(n,{json:s,lossy:l}={})=>{const o=[];return pb(!(s||l),!!s,new Map,o)(n),o},aa=typeof structuredClone=="function"?(n,s)=>s&&("json"in s||"lossy"in s)?__(m_(n,s)):structuredClone(n):(n,s)=>__(m_(n,s));function _b(n,s){const l=[{type:"text",value:"↩"}];return s>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(s)}]}),l}function mb(n,s){return"Back to reference "+(n+1)+(s>1?"-"+s:"")}function gb(n){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||_b,o=n.options.footnoteBackLabel||mb,v=n.options.footnoteLabel||"Footnotes",b=n.options.footnoteLabelTagName||"h2",p=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[u]);if(!h)continue;const m=n.all(h),c=String(h.identifier).toUpperCase(),C=Lr(c.toLowerCase());let w=0;const k=[],x=n.footnoteCounts.get(c);for(;x!==void 0&&++w<=x;){k.length>0&&k.push({type:"text",value:" "});let d=typeof l=="string"?l:l(u,w);typeof d=="string"&&(d={type:"text",value:d}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+C+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(u,w),className:["data-footnote-backref"]},children:Array.isArray(d)?d:[d]})}const S=m[m.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const d=S.children[S.children.length-1];d&&d.type==="text"?d.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else m.push(...k);const _={type:"element",tagName:"li",properties:{id:s+"fn-"+C},children:n.wrap(m,!0)};n.patch(h,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:b,properties:{...aa(p),id:"footnote-label"},children:[{type:"text",value:v}]},{type:"text",value:`
67
68
  `},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
68
- `}]}}const da=(function(n){if(n==null)return yb;if(typeof n=="function")return pa(n);if(typeof n=="object")return Array.isArray(n)?gb(n):vb(n);if(typeof n=="string")return Sb(n);throw new Error("Expected function, string, or object as test")});function gb(n){const s=[];let l=-1;for(;++l<n.length;)s[l]=da(n[l]);return pa(o);function o(...v){let b=-1;for(;++b<s.length;)if(s[b].apply(this,v))return!0;return!1}}function vb(n){const s=n;return pa(l);function l(o){const v=o;let b;for(b in n)if(v[b]!==s[b])return!1;return!0}}function Sb(n){return pa(s);function s(l){return l&&l.type===n}}function pa(n){return s;function s(l,o,v){return!!(bb(l)&&n.call(this,l,typeof o=="number"?o:void 0,v||void 0))}}function yb(){return!0}function bb(n){return n!==null&&typeof n=="object"&&"type"in n}const mm=[],Cb=!0,lc=!1,wb="skip";function gm(n,s,l,o){let v;typeof s=="function"&&typeof l!="function"?(o=l,l=s):v=s;const b=da(v),p=o?-1:1;a(n,void 0,[])();function a(u,h,_){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const w=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(C,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return C;function C(){let w=mm,k,x,S;if((!s||b(u,h,_[_.length-1]||void 0))&&(w=xb(l(u,_)),w[0]===lc))return w;if("children"in u&&u.children){const m=u;if(m.children&&w[0]!==wb)for(x=(o?m.children.length:-1)+p,S=_.concat(m);x>-1&&x<m.children.length;){const d=m.children[x];if(k=a(d,x,S)(),k[0]===lc)return k;x=typeof k[1]=="number"?k[1]:x+p}}return w}}}function xb(n){return Array.isArray(n)?n:typeof n=="number"?[Cb,n]:n==null?mm:[n]}function kc(n,s,l,o){let v,b,p;typeof s=="function"&&typeof l!="function"?(b=void 0,p=s,v=l):(b=s,p=l,v=o),gm(n,b,a,v);function a(u,h){const _=h[h.length-1],c=_?_.children.indexOf(u):void 0;return p(u,c,_)}}const ac={}.hasOwnProperty,Eb={};function kb(n,s){const l=s||Eb,o=new Map,v=new Map,b=new Map,p={...ob,...l.handlers},a={all:h,applyData:Tb,definitionById:o,footnoteById:v,footnoteCounts:b,footnoteOrder:[],handlers:p,one:u,options:l,patch:Ab,wrap:Rb};return kc(n,function(_){if(_.type==="definition"||_.type==="footnoteDefinition"){const c=_.type==="definition"?o:v,C=String(_.identifier).toUpperCase();c.has(C)||c.set(C,_)}}),a;function u(_,c){const C=_.type,w=a.handlers[C];if(ac.call(a.handlers,C)&&w)return w(a,_,c);if(a.options.passThrough&&a.options.passThrough.includes(C)){if("children"in _){const{children:x,...S}=_,m=la(S);return m.children=a.all(_),m}return la(_)}return(a.options.unknownHandler||Db)(a,_,c)}function h(_){const c=[];if("children"in _){const C=_.children;let w=-1;for(;++w<C.length;){const k=a.one(C[w],_);if(k){if(w&&C[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=g_(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=g_(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function Ab(n,s){n.position&&(s.position=pS(n))}function Tb(n,s){let l=s;if(n&&n.data){const o=n.data.hName,v=n.data.hChildren,b=n.data.hProperties;if(typeof o=="string")if(l.type==="element")l.tagName=o;else{const p="children"in l?l.children:[l];l={type:"element",tagName:o,properties:{},children:p}}l.type==="element"&&b&&Object.assign(l.properties,la(b)),"children"in l&&l.children&&v!==null&&v!==void 0&&(l.children=v)}return l}function Db(n,s){const l=s.data||{},o="value"in s&&!(ac.call(l,"hProperties")||ac.call(l,"hChildren"))?{type:"text",value:s.value}:{type:"element",tagName:"div",properties:{},children:n.all(s)};return n.patch(s,o),n.applyData(s,o)}function Rb(n,s){const l=[];let o=-1;for(s&&l.push({type:"text",value:`
69
+ `}]}}const da=(function(n){if(n==null)return bb;if(typeof n=="function")return pa(n);if(typeof n=="object")return Array.isArray(n)?vb(n):Sb(n);if(typeof n=="string")return yb(n);throw new Error("Expected function, string, or object as test")});function vb(n){const s=[];let l=-1;for(;++l<n.length;)s[l]=da(n[l]);return pa(o);function o(...v){let b=-1;for(;++b<s.length;)if(s[b].apply(this,v))return!0;return!1}}function Sb(n){const s=n;return pa(l);function l(o){const v=o;let b;for(b in n)if(v[b]!==s[b])return!1;return!0}}function yb(n){return pa(s);function s(l){return l&&l.type===n}}function pa(n){return s;function s(l,o,v){return!!(Cb(l)&&n.call(this,l,typeof o=="number"?o:void 0,v||void 0))}}function bb(){return!0}function Cb(n){return n!==null&&typeof n=="object"&&"type"in n}const _m=[],wb=!0,lc=!1,xb="skip";function mm(n,s,l,o){let v;typeof s=="function"&&typeof l!="function"?(o=l,l=s):v=s;const b=da(v),p=o?-1:1;a(n,void 0,[])();function a(u,h,m){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const w=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(C,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return C;function C(){let w=_m,k,x,S;if((!s||b(u,h,m[m.length-1]||void 0))&&(w=Eb(l(u,m)),w[0]===lc))return w;if("children"in u&&u.children){const _=u;if(_.children&&w[0]!==xb)for(x=(o?_.children.length:-1)+p,S=m.concat(_);x>-1&&x<_.children.length;){const d=_.children[x];if(k=a(d,x,S)(),k[0]===lc)return k;x=typeof k[1]=="number"?k[1]:x+p}}return w}}}function Eb(n){return Array.isArray(n)?n:typeof n=="number"?[wb,n]:n==null?_m:[n]}function Ac(n,s,l,o){let v,b,p;typeof s=="function"&&typeof l!="function"?(b=void 0,p=s,v=l):(b=s,p=l,v=o),mm(n,b,a,v);function a(u,h){const m=h[h.length-1],c=m?m.children.indexOf(u):void 0;return p(u,c,m)}}const ac={}.hasOwnProperty,kb={};function Ab(n,s){const l=s||kb,o=new Map,v=new Map,b=new Map,p={...ub,...l.handlers},a={all:h,applyData:Db,definitionById:o,footnoteById:v,footnoteCounts:b,footnoteOrder:[],handlers:p,one:u,options:l,patch:Tb,wrap:Lb};return Ac(n,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const c=m.type==="definition"?o:v,C=String(m.identifier).toUpperCase();c.has(C)||c.set(C,m)}}),a;function u(m,c){const C=m.type,w=a.handlers[C];if(ac.call(a.handlers,C)&&w)return w(a,m,c);if(a.options.passThrough&&a.options.passThrough.includes(C)){if("children"in m){const{children:x,...S}=m,_=aa(S);return _.children=a.all(m),_}return aa(m)}return(a.options.unknownHandler||Rb)(a,m,c)}function h(m){const c=[];if("children"in m){const C=m.children;let w=-1;for(;++w<C.length;){const k=a.one(C[w],m);if(k){if(w&&C[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=g_(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=g_(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function Tb(n,s){n.position&&(s.position=_S(n))}function Db(n,s){let l=s;if(n&&n.data){const o=n.data.hName,v=n.data.hChildren,b=n.data.hProperties;if(typeof o=="string")if(l.type==="element")l.tagName=o;else{const p="children"in l?l.children:[l];l={type:"element",tagName:o,properties:{},children:p}}l.type==="element"&&b&&Object.assign(l.properties,aa(b)),"children"in l&&l.children&&v!==null&&v!==void 0&&(l.children=v)}return l}function Rb(n,s){const l=s.data||{},o="value"in s&&!(ac.call(l,"hProperties")||ac.call(l,"hChildren"))?{type:"text",value:s.value}:{type:"element",tagName:"div",properties:{},children:n.all(s)};return n.patch(s,o),n.applyData(s,o)}function Lb(n,s){const l=[];let o=-1;for(s&&l.push({type:"text",value:`
69
70
  `});++o<n.length;)o&&l.push({type:"text",value:`
70
71
  `}),l.push(n[o]);return s&&n.length>0&&l.push({type:"text",value:`
71
- `}),l}function g_(n){let s=0,l=n.charCodeAt(s);for(;l===9||l===32;)s++,l=n.charCodeAt(s);return n.slice(s)}function v_(n,s){const l=kb(n,s),o=l.one(n,void 0),v=mb(l),b=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return v&&b.children.push({type:"text",value:`
72
- `},v),b}function Lb(n,s){return n&&"run"in n?async function(l,o){const v=v_(l,{file:o,...s});await n.run(v,o)}:function(l,o){return v_(l,{file:o,...n||s})}}function S_(n){if(n)throw n}var Fu,y_;function Mb(){if(y_)return Fu;y_=1;var n=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,v=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},b=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var _=n.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!_&&!c)return!1;var C;for(C in h);return typeof C>"u"||n.call(h,C)},p=function(h,_){l&&_.name==="__proto__"?l(h,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):h[_.name]=_.newValue},a=function(h,_){if(_==="__proto__")if(n.call(h,_)){if(o)return o(h,_).value}else return;return h[_]};return Fu=function u(){var h,_,c,C,w,k,x=arguments[0],S=1,m=arguments.length,d=!1;for(typeof x=="boolean"&&(d=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<m;++S)if(h=arguments[S],h!=null)for(_ in h)c=a(x,_),C=a(h,_),x!==C&&(d&&C&&(b(C)||(w=v(C)))?(w?(w=!1,k=c&&v(c)?c:[]):k=c&&b(c)?c:{},p(x,{name:_,newValue:u(d,k,C)})):typeof C<"u"&&p(x,{name:_,newValue:C}));return x},Fu}var Ob=Mb();const qu=B_(Ob);function oc(n){if(typeof n!="object"||n===null)return!1;const s=Object.getPrototypeOf(n);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function Bb(){const n=[],s={run:l,use:o};return s;function l(...v){let b=-1;const p=v.pop();if(typeof p!="function")throw new TypeError("Expected function as last argument, not "+p);a(null,...v);function a(u,...h){const _=n[++b];let c=-1;if(u){p(u);return}for(;++c<v.length;)(h[c]===null||h[c]===void 0)&&(h[c]=v[c]);v=h,_?zb(_,a)(...h):p(null,...h)}}function o(v){if(typeof v!="function")throw new TypeError("Expected `middelware` to be a function, not "+v);return n.push(v),s}}function zb(n,s){let l;return o;function o(...p){const a=n.length>p.length;let u;a&&p.push(v);try{u=n.apply(this,p)}catch(h){const _=h;if(a&&l)throw _;return v(_)}a||(u&&u.then&&typeof u.then=="function"?u.then(b,v):u instanceof Error?v(u):b(u))}function v(p,...a){l||(l=!0,s(p,...a))}function b(p){v(null,p)}}const wn={basename:Hb,dirname:Nb,extname:jb,join:Ub,sep:"/"};function Hb(n,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');Hs(n);let l=0,o=-1,v=n.length,b;if(s===void 0||s.length===0||s.length>n.length){for(;v--;)if(n.codePointAt(v)===47){if(b){l=v+1;break}}else o<0&&(b=!0,o=v+1);return o<0?"":n.slice(l,o)}if(s===n)return"";let p=-1,a=s.length-1;for(;v--;)if(n.codePointAt(v)===47){if(b){l=v+1;break}}else p<0&&(b=!0,p=v+1),a>-1&&(n.codePointAt(v)===s.codePointAt(a--)?a<0&&(o=v):(a=-1,o=p));return l===o?o=p:o<0&&(o=n.length),n.slice(l,o)}function Nb(n){if(Hs(n),n.length===0)return".";let s=-1,l=n.length,o;for(;--l;)if(n.codePointAt(l)===47){if(o){s=l;break}}else o||(o=!0);return s<0?n.codePointAt(0)===47?"/":".":s===1&&n.codePointAt(0)===47?"//":n.slice(0,s)}function jb(n){Hs(n);let s=n.length,l=-1,o=0,v=-1,b=0,p;for(;s--;){const a=n.codePointAt(s);if(a===47){if(p){o=s+1;break}continue}l<0&&(p=!0,l=s+1),a===46?v<0?v=s:b!==1&&(b=1):v>-1&&(b=-1)}return v<0||l<0||b===0||b===1&&v===l-1&&v===o+1?"":n.slice(v,l)}function Ub(...n){let s=-1,l;for(;++s<n.length;)Hs(n[s]),n[s]&&(l=l===void 0?n[s]:l+"/"+n[s]);return l===void 0?".":Ib(l)}function Ib(n){Hs(n);const s=n.codePointAt(0)===47;let l=Pb(n,!s);return l.length===0&&!s&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),s?"/"+l:l}function Pb(n,s){let l="",o=0,v=-1,b=0,p=-1,a,u;for(;++p<=n.length;){if(p<n.length)a=n.codePointAt(p);else{if(a===47)break;a=47}if(a===47){if(!(v===p-1||b===1))if(v!==p-1&&b===2){if(l.length<2||o!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(u=l.lastIndexOf("/"),u!==l.length-1){u<0?(l="",o=0):(l=l.slice(0,u),o=l.length-1-l.lastIndexOf("/")),v=p,b=0;continue}}else if(l.length>0){l="",o=0,v=p,b=0;continue}}s&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+n.slice(v+1,p):l=n.slice(v+1,p),o=p-v-1;v=p,b=0}else a===46&&b>-1?b++:b=-1}return l}function Hs(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const Fb={cwd:qb};function qb(){return"/"}function uc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Vb(n){if(typeof n=="string")n=new URL(n);else if(!uc(n)){const s=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw s.code="ERR_INVALID_ARG_TYPE",s}if(n.protocol!=="file:"){const s=new TypeError("The URL must be of scheme file");throw s.code="ERR_INVALID_URL_SCHEME",s}return Gb(n)}function Gb(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 s=n.pathname;let l=-1;for(;++l<s.length;)if(s.codePointAt(l)===37&&s.codePointAt(l+1)===50){const o=s.codePointAt(l+2);if(o===70||o===102){const v=new TypeError("File URL path must not include encoded / characters");throw v.code="ERR_INVALID_FILE_URL_PATH",v}}return decodeURIComponent(s)}const Vu=["history","path","basename","stem","extname","dirname"];class vm{constructor(s){let l;s?uc(s)?l={path:s}:typeof s=="string"||Yb(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":Fb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Vu.length;){const b=Vu[o];b in l&&l[b]!==void 0&&l[b]!==null&&(this[b]=b==="history"?[...l[b]]:l[b])}let v;for(v in l)Vu.includes(v)||(this[v]=l[v])}get basename(){return typeof this.path=="string"?wn.basename(this.path):void 0}set basename(s){Yu(s,"basename"),Gu(s,"basename"),this.path=wn.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?wn.dirname(this.path):void 0}set dirname(s){b_(this.basename,"dirname"),this.path=wn.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?wn.extname(this.path):void 0}set extname(s){if(Gu(s,"extname"),b_(this.dirname,"extname"),s){if(s.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(s.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wn.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){uc(s)&&(s=Vb(s)),Yu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?wn.basename(this.path,this.extname):void 0}set stem(s){Yu(s,"stem"),Gu(s,"stem"),this.path=wn.join(this.dirname||"",s+(this.extname||""))}fail(s,l,o){const v=this.message(s,l,o);throw v.fatal=!0,v}info(s,l,o){const v=this.message(s,l,o);return v.fatal=void 0,v}message(s,l,o){const v=new Rt(s,l,o);return this.path&&(v.name=this.path+":"+v.name,v.file=this.path),v.fatal=!1,this.messages.push(v),v}toString(s){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(s||void 0).decode(this.value)}}function Gu(n,s){if(n&&n.includes(wn.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+wn.sep+"`")}function Yu(n,s){if(!n)throw new Error("`"+s+"` cannot be empty")}function b_(n,s){if(!n)throw new Error("Setting `"+s+"` requires `path` to be set too")}function Yb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Wb=(function(n){const o=this.constructor.prototype,v=o[n],b=function(){return v.apply(b,arguments)};return Object.setPrototypeOf(b,o),b}),Kb={}.hasOwnProperty;class Ac extends Wb{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=Bb()}copy(){const s=new Ac;let l=-1;for(;++l<this.attachers.length;){const o=this.attachers[l];s.use(...o)}return s.data(qu(!0,{},this.namespace)),s}data(s,l){return typeof s=="string"?arguments.length===2?(Xu("data",this.frozen),this.namespace[s]=l,this):Kb.call(this.namespace,s)&&this.namespace[s]||void 0:s?(Xu("data",this.frozen),this.namespace=s,this):this.namespace}freeze(){if(this.frozen)return this;const s=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const v=l.call(s,...o);typeof v=="function"&&this.transformers.use(v)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(s){this.freeze();const l=ta(s),o=this.parser||this.Parser;return Wu("parse",o),o(String(l),l)}process(s,l){const o=this;return this.freeze(),Wu("process",this.parser||this.Parser),Ku("process",this.compiler||this.Compiler),l?v(void 0,l):new Promise(v);function v(b,p){const a=ta(s),u=o.parse(a);o.run(u,a,function(_,c,C){if(_||!c||!C)return h(_);const w=c,k=o.stringify(w,C);Qb(k)?C.value=k:C.result=k,h(_,C)});function h(_,c){_||!c?p(_):b?b(c):l(void 0,c)}}}processSync(s){let l=!1,o;return this.freeze(),Wu("processSync",this.parser||this.Parser),Ku("processSync",this.compiler||this.Compiler),this.process(s,v),w_("processSync","process",l),o;function v(b,p){l=!0,S_(b),o=p}}run(s,l,o){C_(s),this.freeze();const v=this.transformers;return!o&&typeof l=="function"&&(o=l,l=void 0),o?b(void 0,o):new Promise(b);function b(p,a){const u=ta(l);v.run(s,u,h);function h(_,c,C){const w=c||s;_?a(_):p?p(w):o(void 0,w,C)}}}runSync(s,l){let o=!1,v;return this.run(s,l,b),w_("runSync","run",o),v;function b(p,a){S_(p),v=a,o=!0}}stringify(s,l){this.freeze();const o=ta(l),v=this.compiler||this.Compiler;return Ku("stringify",v),C_(s),v(s,o)}use(s,...l){const o=this.attachers,v=this.namespace;if(Xu("use",this.frozen),s!=null)if(typeof s=="function")u(s,l);else if(typeof s=="object")Array.isArray(s)?a(s):p(s);else throw new TypeError("Expected usable value, not `"+s+"`");return this;function b(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[_,...c]=h;u(_,c)}else p(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function p(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&&(v.settings=qu(!0,v.settings,h.settings))}function a(h){let _=-1;if(h!=null)if(Array.isArray(h))for(;++_<h.length;){const c=h[_];b(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,_){let c=-1,C=-1;for(;++c<o.length;)if(o[c][0]===h){C=c;break}if(C===-1)o.push([h,..._]);else if(_.length>0){let[w,...k]=_;const x=o[C][1];oc(x)&&oc(w)&&(w=qu(!0,x,w)),o[C]=[h,w,...k]}}}}const Xb=new Ac().freeze();function Wu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Ku(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Xu(n,s){if(s)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function C_(n){if(!oc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function w_(n,s,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+s+"` instead")}function ta(n){return $b(n)?n:new vm(n)}function $b(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Qb(n){return typeof n=="string"||Zb(n)}function Zb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Jb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",x_=[],E_={allowDangerousHtml:!0},eC=/^(https?|ircs?|mailto|xmpp)$/i,tC=[{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 nC(n){const s=iC(n),l=rC(n);return sC(s.runSync(s.parse(l),l),n)}function iC(n){const s=n.rehypePlugins||x_,l=n.remarkPlugins||x_,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...E_}:E_;return Xb().use(H1).use(l).use(Lb,o).use(s)}function rC(n){const s=n.children||"",l=new vm;return typeof s=="string"&&(l.value=s),l}function sC(n,s){const l=s.allowedElements,o=s.allowElement,v=s.components,b=s.disallowedElements,p=s.skipHtml,a=s.unwrapDisallowed,u=s.urlTransform||lC;for(const _ of tC)Object.hasOwn(s,_.from)&&(""+_.from+(_.to?"use `"+_.to+"` instead":"remove it")+Jb+_.id,void 0);return kc(n,h),SS(n,{Fragment:q.Fragment,components:v,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function h(_,c,C){if(_.type==="raw"&&C&&typeof c=="number")return p?C.children.splice(c,1):C.children[c]={type:"text",value:_.value},c;if(_.type==="element"){let w;for(w in Uu)if(Object.hasOwn(Uu,w)&&Object.hasOwn(_.properties,w)){const k=_.properties[w],x=Uu[w];(x===null||x.includes(_.tagName))&&(_.properties[w]=u(String(k||""),w,_))}}if(_.type==="element"){let w=l?!l.includes(_.tagName):b?b.includes(_.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(_,c,C)),w&&C&&typeof c=="number")return a&&_.children?C.children.splice(c,1,..._.children):C.children.splice(c,1),c}}}function lC(n){const s=n.indexOf(":"),l=n.indexOf("?"),o=n.indexOf("#"),v=n.indexOf("/");return s===-1||v!==-1&&s>v||l!==-1&&s>l||o!==-1&&s>o||eC.test(n.slice(0,s))?n:""}function k_(n,s){const l=String(n);if(typeof s!="string")throw new TypeError("Expected character");let o=0,v=l.indexOf(s);for(;v!==-1;)o++,v=l.indexOf(s,v+s.length);return o}function aC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function oC(n,s,l){const v=da((l||{}).ignore||[]),b=uC(s);let p=-1;for(;++p<b.length;)gm(n,"text",a);function a(h,_){let c=-1,C;for(;++c<_.length;){const w=_[c],k=C?C.children:void 0;if(v(w,k?k.indexOf(w):void 0,C))return;C=w}if(C)return u(h,_)}function u(h,_){const c=_[_.length-1],C=b[p][0],w=b[p][1];let k=0;const S=c.children.indexOf(h);let m=!1,d=[];C.lastIndex=0;let g=C.exec(h.value);for(;g;){const E=g.index,R={index:g.index,input:g.input,stack:[..._,h]};let A=w(...g,R);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?C.lastIndex=E+1:(k!==E&&d.push({type:"text",value:h.value.slice(k,E)}),Array.isArray(A)?d.push(...A):A&&d.push(A),k=E+g[0].length,m=!0),!C.global)break;g=C.exec(h.value)}return m?(k<h.value.length&&d.push({type:"text",value:h.value.slice(k)}),c.children.splice(S,1,...d)):d=[h],S+d.length}}function uC(n){const s=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<l.length;){const v=l[o];s.push([cC(v[0]),hC(v[1])])}return s}function cC(n){return typeof n=="string"?new RegExp(aC(n),"g"):n}function hC(n){return typeof n=="function"?n:function(){return n}}const $u="phrasing",Qu=["autolink","link","image","label"];function fC(){return{transforms:[SC],enter:{literalAutolink:pC,literalAutolinkEmail:Zu,literalAutolinkHttp:Zu,literalAutolinkWww:Zu},exit:{literalAutolink:vC,literalAutolinkEmail:gC,literalAutolinkHttp:_C,literalAutolinkWww:mC}}}function dC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$u,notInConstruct:Qu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$u,notInConstruct:Qu},{character:":",before:"[ps]",after:"\\/",inConstruct:$u,notInConstruct:Qu}]}}function pC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function Zu(n){this.config.enter.autolinkProtocol.call(this,n)}function _C(n){this.config.exit.autolinkProtocol.call(this,n)}function mC(n){this.config.exit.data.call(this,n);const s=this.stack[this.stack.length-1];s.type,s.url="http://"+this.sliceSerialize(n)}function gC(n){this.config.exit.autolinkEmail.call(this,n)}function vC(n){this.exit(n)}function SC(n){oC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),bC]],{ignore:["link","linkReference"]})}function yC(n,s,l,o,v){let b="";if(!Sm(v)||(/^w/i.test(s)&&(l=s+l,s="",b="http://"),!CC(l)))return!1;const p=wC(l+o);if(!p[0])return!1;const a={type:"link",title:null,url:b+s+p[0],children:[{type:"text",value:s+p[0]}]};return p[1]?[a,{type:"text",value:p[1]}]:a}function bC(n,s,l,o){return!Sm(o,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+s+"@"+l,children:[{type:"text",value:s+"@"+l}]}}function CC(n){const s=n.split(".");return!(s.length<2||s[s.length-1]&&(/_/.test(s[s.length-1])||!/[a-zA-Z\d]/.test(s[s.length-1]))||s[s.length-2]&&(/_/.test(s[s.length-2])||!/[a-zA-Z\d]/.test(s[s.length-2])))}function wC(n){const s=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!s)return[n,void 0];n=n.slice(0,s.index);let l=s[0],o=l.indexOf(")");const v=k_(n,"(");let b=k_(n,")");for(;o!==-1&&v>b;)n+=l.slice(0,o+1),l=l.slice(o+1),o=l.indexOf(")"),b++;return[n,l]}function Sm(n,s){const l=n.input.charCodeAt(n.index-1);return(n.index===0||ji(l)||ca(l))&&(!s||l!==47)}ym.peek=MC;function xC(){this.buffer()}function EC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function kC(){this.buffer()}function AC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function TC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function DC(n){this.exit(n)}function RC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function LC(n){this.exit(n)}function MC(){return"["}function ym(n,s,l,o){const v=l.createTracker(o);let b=v.move("[^");const p=l.enter("footnoteReference"),a=l.enter("reference");return b+=v.move(l.safe(l.associationId(n),{after:"]",before:b})),a(),p(),b+=v.move("]"),b}function OC(){return{enter:{gfmFootnoteCallString:xC,gfmFootnoteCall:EC,gfmFootnoteDefinitionLabelString:kC,gfmFootnoteDefinition:AC},exit:{gfmFootnoteCallString:TC,gfmFootnoteCall:DC,gfmFootnoteDefinitionLabelString:RC,gfmFootnoteDefinition:LC}}}function BC(n){let s=!1;return n&&n.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:ym},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(o,v,b,p){const a=b.createTracker(p);let u=a.move("[^");const h=b.enter("footnoteDefinition"),_=b.enter("label");return u+=a.move(b.safe(b.associationId(o),{before:u,after:"]"})),_(),u+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),u+=a.move((s?`
73
- `:" ")+b.indentLines(b.containerFlow(o,a.current()),s?bm:zC))),h(),u}}function zC(n,s,l){return s===0?n:bm(n,s,l)}function bm(n,s,l){return(l?"":" ")+n}const HC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Cm.peek=PC;function NC(){return{canContainEols:["delete"],enter:{strikethrough:UC},exit:{strikethrough:IC}}}function jC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HC}],handlers:{delete:Cm}}}function UC(n){this.enter({type:"delete",children:[]},n)}function IC(n){this.exit(n)}function Cm(n,s,l,o){const v=l.createTracker(o),b=l.enter("strikethrough");let p=v.move("~~");return p+=l.containerPhrasing(n,{...v.current(),before:p,after:"~"}),p+=v.move("~~"),b(),p}function PC(){return"~"}function FC(n){return n.length}function qC(n,s){const l=s||{},o=(l.align||[]).concat(),v=l.stringLength||FC,b=[],p=[],a=[],u=[];let h=0,_=-1;for(;++_<n.length;){const x=[],S=[];let m=-1;for(n[_].length>h&&(h=n[_].length);++m<n[_].length;){const d=VC(n[_][m]);if(l.alignDelimiters!==!1){const g=v(d);S[m]=g,(u[m]===void 0||g>u[m])&&(u[m]=g)}x.push(d)}p[_]=x,a[_]=S}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)b[c]=A_(o[c]);else{const x=A_(o);for(;++c<h;)b[c]=x}c=-1;const C=[],w=[];for(;++c<h;){const x=b[c];let S="",m="";x===99?(S=":",m=":"):x===108?S=":":x===114&&(m=":");let d=l.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-m.length);const g=S+"-".repeat(d)+m;l.alignDelimiters!==!1&&(d=S.length+d+m.length,d>u[c]&&(u[c]=d),w[c]=d),C[c]=g}p.splice(1,0,C),a.splice(1,0,w),_=-1;const k=[];for(;++_<p.length;){const x=p[_],S=a[_];c=-1;const m=[];for(;++c<h;){const d=x[c]||"";let g="",E="";if(l.alignDelimiters!==!1){const R=u[c]-(S[c]||0),A=b[c];A===114?g=" ".repeat(R):A===99?R%2?(g=" ".repeat(R/2+.5),E=" ".repeat(R/2-.5)):(g=" ".repeat(R/2),E=g):E=" ".repeat(R)}l.delimiterStart!==!1&&!c&&m.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&d==="")&&(l.delimiterStart!==!1||c)&&m.push(" "),l.alignDelimiters!==!1&&m.push(g),m.push(d),l.alignDelimiters!==!1&&m.push(E),l.padding!==!1&&m.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&m.push("|")}k.push(l.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return k.join(`
74
- `)}function VC(n){return n==null?"":String(n)}function A_(n){const s=typeof n=="string"?n.codePointAt(0):0;return s===67||s===99?99:s===76||s===108?108:s===82||s===114?114:0}function GC(n,s,l,o){const v=l.enter("blockquote"),b=l.createTracker(o);b.move("> "),b.shift(2);const p=l.indentLines(l.containerFlow(n,b.current()),YC);return v(),p}function YC(n,s,l){return">"+(l?"":" ")+n}function WC(n,s){return T_(n,s.inConstruct,!0)&&!T_(n,s.notInConstruct,!1)}function T_(n,s,l){if(typeof s=="string"&&(s=[s]),!s||s.length===0)return l;let o=-1;for(;++o<s.length;)if(n.includes(s[o]))return!0;return!1}function D_(n,s,l,o){let v=-1;for(;++v<l.unsafe.length;)if(l.unsafe[v].character===`
75
- `&&WC(l.stack,l.unsafe[v]))return/[ \t]/.test(o.before)?"":" ";return`\\
76
- `}function KC(n,s){const l=String(n);let o=l.indexOf(s),v=o,b=0,p=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===v?++b>p&&(p=b):b=1,v=o+s.length,o=l.indexOf(s,v);return p}function XC(n,s){return!!(s.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function $C(n){const s=n.options.fence||"`";if(s!=="`"&&s!=="~")throw new Error("Cannot serialize code with `"+s+"` for `options.fence`, expected `` ` `` or `~`");return s}function QC(n,s,l,o){const v=$C(l),b=n.value||"",p=v==="`"?"GraveAccent":"Tilde";if(XC(n,l)){const c=l.enter("codeIndented"),C=l.indentLines(b,ZC);return c(),C}const a=l.createTracker(o),u=v.repeat(Math.max(KC(b,v)+1,3)),h=l.enter("codeFenced");let _=a.move(u);if(n.lang){const c=l.enter(`codeFencedLang${p}`);_+=a.move(l.safe(n.lang,{before:_,after:" ",encode:["`"],...a.current()})),c()}if(n.lang&&n.meta){const c=l.enter(`codeFencedMeta${p}`);_+=a.move(" "),_+=a.move(l.safe(n.meta,{before:_,after:`
77
- `,encode:["`"],...a.current()})),c()}return _+=a.move(`
78
- `),b&&(_+=a.move(b+`
79
- `)),_+=a.move(u),h(),_}function ZC(n,s,l){return(l?"":" ")+n}function Tc(n){const s=n.options.quote||'"';if(s!=='"'&&s!=="'")throw new Error("Cannot serialize title with `"+s+"` for `options.quote`, expected `\"`, or `'`");return s}function JC(n,s,l,o){const v=Tc(l),b=v==='"'?"Quote":"Apostrophe",p=l.enter("definition");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("[");return h+=u.move(l.safe(l.associationId(n),{before:h,after:"]",...u.current()})),h+=u.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":`
80
- `,...u.current()}))),a(),n.title&&(a=l.enter(`title${b}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),a()),p(),h}function ew(n){const s=n.options.emphasis||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize emphasis with `"+s+"` for `options.emphasis`, expected `*`, or `_`");return s}function Os(n){return"&#x"+n.toString(16).toUpperCase()+";"}function aa(n,s,l){const o=Dr(n),v=Dr(s);return o===void 0?v===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:v===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?v===void 0?{inside:!1,outside:!1}:v===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:v===void 0?{inside:!1,outside:!1}:v===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}wm.peek=tw;function wm(n,s,l,o){const v=ew(l),b=l.enter("emphasis"),p=l.createTracker(o),a=p.move(v);let u=p.move(l.containerPhrasing(n,{after:v,before:a,...p.current()}));const h=u.charCodeAt(0),_=aa(o.before.charCodeAt(o.before.length-1),h,v);_.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=aa(o.after.charCodeAt(0),c,v);C.inside&&(u=u.slice(0,-1)+Os(c));const w=p.move(v);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:_.outside},a+u+w}function tw(n,s,l){return l.options.emphasis||"*"}function nw(n,s){let l=!1;return kc(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return l=!0,lc}),!!((!n.depth||n.depth<3)&&Sc(n)&&(s.options.setext||l))}function iw(n,s,l,o){const v=Math.max(Math.min(6,n.depth||1),1),b=l.createTracker(o);if(nw(n,l)){const _=l.enter("headingSetext"),c=l.enter("phrasing"),C=l.containerPhrasing(n,{...b.current(),before:`
72
+ `}),l}function g_(n){let s=0,l=n.charCodeAt(s);for(;l===9||l===32;)s++,l=n.charCodeAt(s);return n.slice(s)}function v_(n,s){const l=Ab(n,s),o=l.one(n,void 0),v=gb(l),b=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return v&&b.children.push({type:"text",value:`
73
+ `},v),b}function Mb(n,s){return n&&"run"in n?async function(l,o){const v=v_(l,{file:o,...s});await n.run(v,o)}:function(l,o){return v_(l,{file:o,...n||s})}}function S_(n){if(n)throw n}var Fu,y_;function Ob(){if(y_)return Fu;y_=1;var n=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,v=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},b=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var m=n.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!c)return!1;var C;for(C in h);return typeof C>"u"||n.call(h,C)},p=function(h,m){l&&m.name==="__proto__"?l(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},a=function(h,m){if(m==="__proto__")if(n.call(h,m)){if(o)return o(h,m).value}else return;return h[m]};return Fu=function u(){var h,m,c,C,w,k,x=arguments[0],S=1,_=arguments.length,d=!1;for(typeof x=="boolean"&&(d=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<_;++S)if(h=arguments[S],h!=null)for(m in h)c=a(x,m),C=a(h,m),x!==C&&(d&&C&&(b(C)||(w=v(C)))?(w?(w=!1,k=c&&v(c)?c:[]):k=c&&b(c)?c:{},p(x,{name:m,newValue:u(d,k,C)})):typeof C<"u"&&p(x,{name:m,newValue:C}));return x},Fu}var Bb=Ob();const qu=B_(Bb);function oc(n){if(typeof n!="object"||n===null)return!1;const s=Object.getPrototypeOf(n);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function zb(){const n=[],s={run:l,use:o};return s;function l(...v){let b=-1;const p=v.pop();if(typeof p!="function")throw new TypeError("Expected function as last argument, not "+p);a(null,...v);function a(u,...h){const m=n[++b];let c=-1;if(u){p(u);return}for(;++c<v.length;)(h[c]===null||h[c]===void 0)&&(h[c]=v[c]);v=h,m?Hb(m,a)(...h):p(null,...h)}}function o(v){if(typeof v!="function")throw new TypeError("Expected `middelware` to be a function, not "+v);return n.push(v),s}}function Hb(n,s){let l;return o;function o(...p){const a=n.length>p.length;let u;a&&p.push(v);try{u=n.apply(this,p)}catch(h){const m=h;if(a&&l)throw m;return v(m)}a||(u&&u.then&&typeof u.then=="function"?u.then(b,v):u instanceof Error?v(u):b(u))}function v(p,...a){l||(l=!0,s(p,...a))}function b(p){v(null,p)}}const wn={basename:Nb,dirname:jb,extname:Ub,join:Ib,sep:"/"};function Nb(n,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');Hs(n);let l=0,o=-1,v=n.length,b;if(s===void 0||s.length===0||s.length>n.length){for(;v--;)if(n.codePointAt(v)===47){if(b){l=v+1;break}}else o<0&&(b=!0,o=v+1);return o<0?"":n.slice(l,o)}if(s===n)return"";let p=-1,a=s.length-1;for(;v--;)if(n.codePointAt(v)===47){if(b){l=v+1;break}}else p<0&&(b=!0,p=v+1),a>-1&&(n.codePointAt(v)===s.codePointAt(a--)?a<0&&(o=v):(a=-1,o=p));return l===o?o=p:o<0&&(o=n.length),n.slice(l,o)}function jb(n){if(Hs(n),n.length===0)return".";let s=-1,l=n.length,o;for(;--l;)if(n.codePointAt(l)===47){if(o){s=l;break}}else o||(o=!0);return s<0?n.codePointAt(0)===47?"/":".":s===1&&n.codePointAt(0)===47?"//":n.slice(0,s)}function Ub(n){Hs(n);let s=n.length,l=-1,o=0,v=-1,b=0,p;for(;s--;){const a=n.codePointAt(s);if(a===47){if(p){o=s+1;break}continue}l<0&&(p=!0,l=s+1),a===46?v<0?v=s:b!==1&&(b=1):v>-1&&(b=-1)}return v<0||l<0||b===0||b===1&&v===l-1&&v===o+1?"":n.slice(v,l)}function Ib(...n){let s=-1,l;for(;++s<n.length;)Hs(n[s]),n[s]&&(l=l===void 0?n[s]:l+"/"+n[s]);return l===void 0?".":Pb(l)}function Pb(n){Hs(n);const s=n.codePointAt(0)===47;let l=Fb(n,!s);return l.length===0&&!s&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),s?"/"+l:l}function Fb(n,s){let l="",o=0,v=-1,b=0,p=-1,a,u;for(;++p<=n.length;){if(p<n.length)a=n.codePointAt(p);else{if(a===47)break;a=47}if(a===47){if(!(v===p-1||b===1))if(v!==p-1&&b===2){if(l.length<2||o!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(u=l.lastIndexOf("/"),u!==l.length-1){u<0?(l="",o=0):(l=l.slice(0,u),o=l.length-1-l.lastIndexOf("/")),v=p,b=0;continue}}else if(l.length>0){l="",o=0,v=p,b=0;continue}}s&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+n.slice(v+1,p):l=n.slice(v+1,p),o=p-v-1;v=p,b=0}else a===46&&b>-1?b++:b=-1}return l}function Hs(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const qb={cwd:Vb};function Vb(){return"/"}function uc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Gb(n){if(typeof n=="string")n=new URL(n);else if(!uc(n)){const s=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw s.code="ERR_INVALID_ARG_TYPE",s}if(n.protocol!=="file:"){const s=new TypeError("The URL must be of scheme file");throw s.code="ERR_INVALID_URL_SCHEME",s}return Yb(n)}function Yb(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 s=n.pathname;let l=-1;for(;++l<s.length;)if(s.codePointAt(l)===37&&s.codePointAt(l+1)===50){const o=s.codePointAt(l+2);if(o===70||o===102){const v=new TypeError("File URL path must not include encoded / characters");throw v.code="ERR_INVALID_FILE_URL_PATH",v}}return decodeURIComponent(s)}const Vu=["history","path","basename","stem","extname","dirname"];class gm{constructor(s){let l;s?uc(s)?l={path:s}:typeof s=="string"||Wb(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":qb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Vu.length;){const b=Vu[o];b in l&&l[b]!==void 0&&l[b]!==null&&(this[b]=b==="history"?[...l[b]]:l[b])}let v;for(v in l)Vu.includes(v)||(this[v]=l[v])}get basename(){return typeof this.path=="string"?wn.basename(this.path):void 0}set basename(s){Yu(s,"basename"),Gu(s,"basename"),this.path=wn.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?wn.dirname(this.path):void 0}set dirname(s){b_(this.basename,"dirname"),this.path=wn.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?wn.extname(this.path):void 0}set extname(s){if(Gu(s,"extname"),b_(this.dirname,"extname"),s){if(s.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(s.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wn.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){uc(s)&&(s=Gb(s)),Yu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?wn.basename(this.path,this.extname):void 0}set stem(s){Yu(s,"stem"),Gu(s,"stem"),this.path=wn.join(this.dirname||"",s+(this.extname||""))}fail(s,l,o){const v=this.message(s,l,o);throw v.fatal=!0,v}info(s,l,o){const v=this.message(s,l,o);return v.fatal=void 0,v}message(s,l,o){const v=new Rt(s,l,o);return this.path&&(v.name=this.path+":"+v.name,v.file=this.path),v.fatal=!1,this.messages.push(v),v}toString(s){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(s||void 0).decode(this.value)}}function Gu(n,s){if(n&&n.includes(wn.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+wn.sep+"`")}function Yu(n,s){if(!n)throw new Error("`"+s+"` cannot be empty")}function b_(n,s){if(!n)throw new Error("Setting `"+s+"` requires `path` to be set too")}function Wb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Kb=(function(n){const o=this.constructor.prototype,v=o[n],b=function(){return v.apply(b,arguments)};return Object.setPrototypeOf(b,o),b}),Xb={}.hasOwnProperty;class Tc extends Kb{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=zb()}copy(){const s=new Tc;let l=-1;for(;++l<this.attachers.length;){const o=this.attachers[l];s.use(...o)}return s.data(qu(!0,{},this.namespace)),s}data(s,l){return typeof s=="string"?arguments.length===2?(Xu("data",this.frozen),this.namespace[s]=l,this):Xb.call(this.namespace,s)&&this.namespace[s]||void 0:s?(Xu("data",this.frozen),this.namespace=s,this):this.namespace}freeze(){if(this.frozen)return this;const s=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const v=l.call(s,...o);typeof v=="function"&&this.transformers.use(v)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(s){this.freeze();const l=ta(s),o=this.parser||this.Parser;return Wu("parse",o),o(String(l),l)}process(s,l){const o=this;return this.freeze(),Wu("process",this.parser||this.Parser),Ku("process",this.compiler||this.Compiler),l?v(void 0,l):new Promise(v);function v(b,p){const a=ta(s),u=o.parse(a);o.run(u,a,function(m,c,C){if(m||!c||!C)return h(m);const w=c,k=o.stringify(w,C);Zb(k)?C.value=k:C.result=k,h(m,C)});function h(m,c){m||!c?p(m):b?b(c):l(void 0,c)}}}processSync(s){let l=!1,o;return this.freeze(),Wu("processSync",this.parser||this.Parser),Ku("processSync",this.compiler||this.Compiler),this.process(s,v),w_("processSync","process",l),o;function v(b,p){l=!0,S_(b),o=p}}run(s,l,o){C_(s),this.freeze();const v=this.transformers;return!o&&typeof l=="function"&&(o=l,l=void 0),o?b(void 0,o):new Promise(b);function b(p,a){const u=ta(l);v.run(s,u,h);function h(m,c,C){const w=c||s;m?a(m):p?p(w):o(void 0,w,C)}}}runSync(s,l){let o=!1,v;return this.run(s,l,b),w_("runSync","run",o),v;function b(p,a){S_(p),v=a,o=!0}}stringify(s,l){this.freeze();const o=ta(l),v=this.compiler||this.Compiler;return Ku("stringify",v),C_(s),v(s,o)}use(s,...l){const o=this.attachers,v=this.namespace;if(Xu("use",this.frozen),s!=null)if(typeof s=="function")u(s,l);else if(typeof s=="object")Array.isArray(s)?a(s):p(s);else throw new TypeError("Expected usable value, not `"+s+"`");return this;function b(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...c]=h;u(m,c)}else p(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function p(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&&(v.settings=qu(!0,v.settings,h.settings))}function a(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const c=h[m];b(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,m){let c=-1,C=-1;for(;++c<o.length;)if(o[c][0]===h){C=c;break}if(C===-1)o.push([h,...m]);else if(m.length>0){let[w,...k]=m;const x=o[C][1];oc(x)&&oc(w)&&(w=qu(!0,x,w)),o[C]=[h,w,...k]}}}}const $b=new Tc().freeze();function Wu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Ku(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Xu(n,s){if(s)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function C_(n){if(!oc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function w_(n,s,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+s+"` instead")}function ta(n){return Qb(n)?n:new gm(n)}function Qb(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Zb(n){return typeof n=="string"||Jb(n)}function Jb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const eC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",x_=[],E_={allowDangerousHtml:!0},tC=/^(https?|ircs?|mailto|xmpp)$/i,nC=[{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 iC(n){const s=rC(n),l=sC(n);return lC(s.runSync(s.parse(l),l),n)}function rC(n){const s=n.rehypePlugins||x_,l=n.remarkPlugins||x_,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...E_}:E_;return $b().use(N1).use(l).use(Mb,o).use(s)}function sC(n){const s=n.children||"",l=new gm;return typeof s=="string"&&(l.value=s),l}function lC(n,s){const l=s.allowedElements,o=s.allowElement,v=s.components,b=s.disallowedElements,p=s.skipHtml,a=s.unwrapDisallowed,u=s.urlTransform||aC;for(const m of nC)Object.hasOwn(s,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+eC+m.id,void 0);return Ac(n,h),yS(n,{Fragment:V.Fragment,components:v,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function h(m,c,C){if(m.type==="raw"&&C&&typeof c=="number")return p?C.children.splice(c,1):C.children[c]={type:"text",value:m.value},c;if(m.type==="element"){let w;for(w in Uu)if(Object.hasOwn(Uu,w)&&Object.hasOwn(m.properties,w)){const k=m.properties[w],x=Uu[w];(x===null||x.includes(m.tagName))&&(m.properties[w]=u(String(k||""),w,m))}}if(m.type==="element"){let w=l?!l.includes(m.tagName):b?b.includes(m.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(m,c,C)),w&&C&&typeof c=="number")return a&&m.children?C.children.splice(c,1,...m.children):C.children.splice(c,1),c}}}function aC(n){const s=n.indexOf(":"),l=n.indexOf("?"),o=n.indexOf("#"),v=n.indexOf("/");return s===-1||v!==-1&&s>v||l!==-1&&s>l||o!==-1&&s>o||tC.test(n.slice(0,s))?n:""}function k_(n,s){const l=String(n);if(typeof s!="string")throw new TypeError("Expected character");let o=0,v=l.indexOf(s);for(;v!==-1;)o++,v=l.indexOf(s,v+s.length);return o}function oC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function uC(n,s,l){const v=da((l||{}).ignore||[]),b=cC(s);let p=-1;for(;++p<b.length;)mm(n,"text",a);function a(h,m){let c=-1,C;for(;++c<m.length;){const w=m[c],k=C?C.children:void 0;if(v(w,k?k.indexOf(w):void 0,C))return;C=w}if(C)return u(h,m)}function u(h,m){const c=m[m.length-1],C=b[p][0],w=b[p][1];let k=0;const S=c.children.indexOf(h);let _=!1,d=[];C.lastIndex=0;let g=C.exec(h.value);for(;g;){const E=g.index,R={index:g.index,input:g.input,stack:[...m,h]};let A=w(...g,R);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?C.lastIndex=E+1:(k!==E&&d.push({type:"text",value:h.value.slice(k,E)}),Array.isArray(A)?d.push(...A):A&&d.push(A),k=E+g[0].length,_=!0),!C.global)break;g=C.exec(h.value)}return _?(k<h.value.length&&d.push({type:"text",value:h.value.slice(k)}),c.children.splice(S,1,...d)):d=[h],S+d.length}}function cC(n){const s=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<l.length;){const v=l[o];s.push([hC(v[0]),fC(v[1])])}return s}function hC(n){return typeof n=="string"?new RegExp(oC(n),"g"):n}function fC(n){return typeof n=="function"?n:function(){return n}}const $u="phrasing",Qu=["autolink","link","image","label"];function dC(){return{transforms:[yC],enter:{literalAutolink:_C,literalAutolinkEmail:Zu,literalAutolinkHttp:Zu,literalAutolinkWww:Zu},exit:{literalAutolink:SC,literalAutolinkEmail:vC,literalAutolinkHttp:mC,literalAutolinkWww:gC}}}function pC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$u,notInConstruct:Qu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$u,notInConstruct:Qu},{character:":",before:"[ps]",after:"\\/",inConstruct:$u,notInConstruct:Qu}]}}function _C(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function Zu(n){this.config.enter.autolinkProtocol.call(this,n)}function mC(n){this.config.exit.autolinkProtocol.call(this,n)}function gC(n){this.config.exit.data.call(this,n);const s=this.stack[this.stack.length-1];s.type,s.url="http://"+this.sliceSerialize(n)}function vC(n){this.config.exit.autolinkEmail.call(this,n)}function SC(n){this.exit(n)}function yC(n){uC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,bC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),CC]],{ignore:["link","linkReference"]})}function bC(n,s,l,o,v){let b="";if(!vm(v)||(/^w/i.test(s)&&(l=s+l,s="",b="http://"),!wC(l)))return!1;const p=xC(l+o);if(!p[0])return!1;const a={type:"link",title:null,url:b+s+p[0],children:[{type:"text",value:s+p[0]}]};return p[1]?[a,{type:"text",value:p[1]}]:a}function CC(n,s,l,o){return!vm(o,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+s+"@"+l,children:[{type:"text",value:s+"@"+l}]}}function wC(n){const s=n.split(".");return!(s.length<2||s[s.length-1]&&(/_/.test(s[s.length-1])||!/[a-zA-Z\d]/.test(s[s.length-1]))||s[s.length-2]&&(/_/.test(s[s.length-2])||!/[a-zA-Z\d]/.test(s[s.length-2])))}function xC(n){const s=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!s)return[n,void 0];n=n.slice(0,s.index);let l=s[0],o=l.indexOf(")");const v=k_(n,"(");let b=k_(n,")");for(;o!==-1&&v>b;)n+=l.slice(0,o+1),l=l.slice(o+1),o=l.indexOf(")"),b++;return[n,l]}function vm(n,s){const l=n.input.charCodeAt(n.index-1);return(n.index===0||ji(l)||ca(l))&&(!s||l!==47)}Sm.peek=OC;function EC(){this.buffer()}function kC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function AC(){this.buffer()}function TC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function DC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function RC(n){this.exit(n)}function LC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function MC(n){this.exit(n)}function OC(){return"["}function Sm(n,s,l,o){const v=l.createTracker(o);let b=v.move("[^");const p=l.enter("footnoteReference"),a=l.enter("reference");return b+=v.move(l.safe(l.associationId(n),{after:"]",before:b})),a(),p(),b+=v.move("]"),b}function BC(){return{enter:{gfmFootnoteCallString:EC,gfmFootnoteCall:kC,gfmFootnoteDefinitionLabelString:AC,gfmFootnoteDefinition:TC},exit:{gfmFootnoteCallString:DC,gfmFootnoteCall:RC,gfmFootnoteDefinitionLabelString:LC,gfmFootnoteDefinition:MC}}}function zC(n){let s=!1;return n&&n.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:Sm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(o,v,b,p){const a=b.createTracker(p);let u=a.move("[^");const h=b.enter("footnoteDefinition"),m=b.enter("label");return u+=a.move(b.safe(b.associationId(o),{before:u,after:"]"})),m(),u+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),u+=a.move((s?`
74
+ `:" ")+b.indentLines(b.containerFlow(o,a.current()),s?ym:HC))),h(),u}}function HC(n,s,l){return s===0?n:ym(n,s,l)}function ym(n,s,l){return(l?"":" ")+n}const NC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];bm.peek=FC;function jC(){return{canContainEols:["delete"],enter:{strikethrough:IC},exit:{strikethrough:PC}}}function UC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:NC}],handlers:{delete:bm}}}function IC(n){this.enter({type:"delete",children:[]},n)}function PC(n){this.exit(n)}function bm(n,s,l,o){const v=l.createTracker(o),b=l.enter("strikethrough");let p=v.move("~~");return p+=l.containerPhrasing(n,{...v.current(),before:p,after:"~"}),p+=v.move("~~"),b(),p}function FC(){return"~"}function qC(n){return n.length}function VC(n,s){const l=s||{},o=(l.align||[]).concat(),v=l.stringLength||qC,b=[],p=[],a=[],u=[];let h=0,m=-1;for(;++m<n.length;){const x=[],S=[];let _=-1;for(n[m].length>h&&(h=n[m].length);++_<n[m].length;){const d=GC(n[m][_]);if(l.alignDelimiters!==!1){const g=v(d);S[_]=g,(u[_]===void 0||g>u[_])&&(u[_]=g)}x.push(d)}p[m]=x,a[m]=S}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)b[c]=A_(o[c]);else{const x=A_(o);for(;++c<h;)b[c]=x}c=-1;const C=[],w=[];for(;++c<h;){const x=b[c];let S="",_="";x===99?(S=":",_=":"):x===108?S=":":x===114&&(_=":");let d=l.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-_.length);const g=S+"-".repeat(d)+_;l.alignDelimiters!==!1&&(d=S.length+d+_.length,d>u[c]&&(u[c]=d),w[c]=d),C[c]=g}p.splice(1,0,C),a.splice(1,0,w),m=-1;const k=[];for(;++m<p.length;){const x=p[m],S=a[m];c=-1;const _=[];for(;++c<h;){const d=x[c]||"";let g="",E="";if(l.alignDelimiters!==!1){const R=u[c]-(S[c]||0),A=b[c];A===114?g=" ".repeat(R):A===99?R%2?(g=" ".repeat(R/2+.5),E=" ".repeat(R/2-.5)):(g=" ".repeat(R/2),E=g):E=" ".repeat(R)}l.delimiterStart!==!1&&!c&&_.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&d==="")&&(l.delimiterStart!==!1||c)&&_.push(" "),l.alignDelimiters!==!1&&_.push(g),_.push(d),l.alignDelimiters!==!1&&_.push(E),l.padding!==!1&&_.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&_.push("|")}k.push(l.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return k.join(`
75
+ `)}function GC(n){return n==null?"":String(n)}function A_(n){const s=typeof n=="string"?n.codePointAt(0):0;return s===67||s===99?99:s===76||s===108?108:s===82||s===114?114:0}function YC(n,s,l,o){const v=l.enter("blockquote"),b=l.createTracker(o);b.move("> "),b.shift(2);const p=l.indentLines(l.containerFlow(n,b.current()),WC);return v(),p}function WC(n,s,l){return">"+(l?"":" ")+n}function KC(n,s){return T_(n,s.inConstruct,!0)&&!T_(n,s.notInConstruct,!1)}function T_(n,s,l){if(typeof s=="string"&&(s=[s]),!s||s.length===0)return l;let o=-1;for(;++o<s.length;)if(n.includes(s[o]))return!0;return!1}function D_(n,s,l,o){let v=-1;for(;++v<l.unsafe.length;)if(l.unsafe[v].character===`
76
+ `&&KC(l.stack,l.unsafe[v]))return/[ \t]/.test(o.before)?"":" ";return`\\
77
+ `}function XC(n,s){const l=String(n);let o=l.indexOf(s),v=o,b=0,p=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===v?++b>p&&(p=b):b=1,v=o+s.length,o=l.indexOf(s,v);return p}function $C(n,s){return!!(s.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function QC(n){const s=n.options.fence||"`";if(s!=="`"&&s!=="~")throw new Error("Cannot serialize code with `"+s+"` for `options.fence`, expected `` ` `` or `~`");return s}function ZC(n,s,l,o){const v=QC(l),b=n.value||"",p=v==="`"?"GraveAccent":"Tilde";if($C(n,l)){const c=l.enter("codeIndented"),C=l.indentLines(b,JC);return c(),C}const a=l.createTracker(o),u=v.repeat(Math.max(XC(b,v)+1,3)),h=l.enter("codeFenced");let m=a.move(u);if(n.lang){const c=l.enter(`codeFencedLang${p}`);m+=a.move(l.safe(n.lang,{before:m,after:" ",encode:["`"],...a.current()})),c()}if(n.lang&&n.meta){const c=l.enter(`codeFencedMeta${p}`);m+=a.move(" "),m+=a.move(l.safe(n.meta,{before:m,after:`
78
+ `,encode:["`"],...a.current()})),c()}return m+=a.move(`
79
+ `),b&&(m+=a.move(b+`
80
+ `)),m+=a.move(u),h(),m}function JC(n,s,l){return(l?"":" ")+n}function Dc(n){const s=n.options.quote||'"';if(s!=='"'&&s!=="'")throw new Error("Cannot serialize title with `"+s+"` for `options.quote`, expected `\"`, or `'`");return s}function ew(n,s,l,o){const v=Dc(l),b=v==='"'?"Quote":"Apostrophe",p=l.enter("definition");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("[");return h+=u.move(l.safe(l.associationId(n),{before:h,after:"]",...u.current()})),h+=u.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":`
81
+ `,...u.current()}))),a(),n.title&&(a=l.enter(`title${b}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),a()),p(),h}function tw(n){const s=n.options.emphasis||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize emphasis with `"+s+"` for `options.emphasis`, expected `*`, or `_`");return s}function Os(n){return"&#x"+n.toString(16).toUpperCase()+";"}function oa(n,s,l){const o=Dr(n),v=Dr(s);return o===void 0?v===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:v===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?v===void 0?{inside:!1,outside:!1}:v===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:v===void 0?{inside:!1,outside:!1}:v===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Cm.peek=nw;function Cm(n,s,l,o){const v=tw(l),b=l.enter("emphasis"),p=l.createTracker(o),a=p.move(v);let u=p.move(l.containerPhrasing(n,{after:v,before:a,...p.current()}));const h=u.charCodeAt(0),m=oa(o.before.charCodeAt(o.before.length-1),h,v);m.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=oa(o.after.charCodeAt(0),c,v);C.inside&&(u=u.slice(0,-1)+Os(c));const w=p.move(v);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:m.outside},a+u+w}function nw(n,s,l){return l.options.emphasis||"*"}function iw(n,s){let l=!1;return Ac(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return l=!0,lc}),!!((!n.depth||n.depth<3)&&yc(n)&&(s.options.setext||l))}function rw(n,s,l,o){const v=Math.max(Math.min(6,n.depth||1),1),b=l.createTracker(o);if(iw(n,l)){const m=l.enter("headingSetext"),c=l.enter("phrasing"),C=l.containerPhrasing(n,{...b.current(),before:`
81
82
  `,after:`
82
- `});return c(),_(),C+`
83
+ `});return c(),m(),C+`
83
84
  `+(v===1?"=":"-").repeat(C.length-(Math.max(C.lastIndexOf("\r"),C.lastIndexOf(`
84
85
  `))+1))}const p="#".repeat(v),a=l.enter("headingAtx"),u=l.enter("phrasing");b.move(p+" ");let h=l.containerPhrasing(n,{before:"# ",after:`
85
- `,...b.current()});return/^[\t ]/.test(h)&&(h=Os(h.charCodeAt(0))+h.slice(1)),h=h?p+" "+h:p,l.options.closeAtx&&(h+=" "+p),u(),a(),h}xm.peek=rw;function xm(n){return n.value||""}function rw(){return"<"}Em.peek=sw;function Em(n,s,l,o){const v=Tc(l),b=v==='"'?"Quote":"Apostrophe",p=l.enter("image");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("![");return h+=u.move(l.safe(n.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":")",...u.current()}))),a(),n.title&&(a=l.enter(`title${b}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),a()),h+=u.move(")"),p(),h}function sw(){return"!"}km.peek=lw;function km(n,s,l,o){const v=n.referenceType,b=l.enter("imageReference");let p=l.enter("label");const a=l.createTracker(o);let u=a.move("![");const h=l.safe(n.alt,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),p();const _=l.stack;l.stack=[],p=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return p(),l.stack=_,b(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function lw(){return"!"}Am.peek=aw;function Am(n,s,l){let o=n.value||"",v="`",b=-1;for(;new RegExp("(^|[^`])"+v+"([^`]|$)").test(o);)v+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++b<l.unsafe.length;){const p=l.unsafe[b],a=l.compilePattern(p);let u;if(p.atBreak)for(;u=a.exec(o);){let h=u.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(u.index+1)}}return v+o+v}function aw(){return"`"}function Tm(n,s){const l=Sc(n);return!!(!s.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(l===n.url||"mailto:"+l===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}Dm.peek=ow;function Dm(n,s,l,o){const v=Tc(l),b=v==='"'?"Quote":"Apostrophe",p=l.createTracker(o);let a,u;if(Tm(n,l)){const _=l.stack;l.stack=[],a=l.enter("autolink");let c=p.move("<");return c+=p.move(l.containerPhrasing(n,{before:c,after:">",...p.current()})),c+=p.move(">"),a(),l.stack=_,c}a=l.enter("link"),u=l.enter("label");let h=p.move("[");return h+=p.move(l.containerPhrasing(n,{before:h,after:"](",...p.current()})),h+=p.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=l.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(l.safe(n.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(u=l.enter("destinationRaw"),h+=p.move(l.safe(n.url,{before:h,after:n.title?" ":")",...p.current()}))),u(),n.title&&(u=l.enter(`title${b}`),h+=p.move(" "+v),h+=p.move(l.safe(n.title,{before:h,after:v,...p.current()})),h+=p.move(v),u()),h+=p.move(")"),a(),h}function ow(n,s,l){return Tm(n,l)?"<":"["}Rm.peek=uw;function Rm(n,s,l,o){const v=n.referenceType,b=l.enter("linkReference");let p=l.enter("label");const a=l.createTracker(o);let u=a.move("[");const h=l.containerPhrasing(n,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),p();const _=l.stack;l.stack=[],p=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return p(),l.stack=_,b(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function uw(){return"["}function Dc(n){const s=n.options.bullet||"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bullet`, expected `*`, `+`, or `-`");return s}function cw(n){const s=Dc(n),l=n.options.bulletOther;if(!l)return s==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===s)throw new Error("Expected `bullet` (`"+s+"`) and `bulletOther` (`"+l+"`) to be different");return l}function hw(n){const s=n.options.bulletOrdered||".";if(s!=="."&&s!==")")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOrdered`, expected `.` or `)`");return s}function Lm(n){const s=n.options.rule||"*";if(s!=="*"&&s!=="-"&&s!=="_")throw new Error("Cannot serialize rules with `"+s+"` for `options.rule`, expected `*`, `-`, or `_`");return s}function fw(n,s,l,o){const v=l.enter("list"),b=l.bulletCurrent;let p=n.ordered?hw(l):Dc(l);const a=n.ordered?p==="."?")":".":cw(l);let u=s&&l.bulletLastUsed?p===l.bulletLastUsed:!1;if(!n.ordered){const _=n.children?n.children[0]:void 0;if((p==="*"||p==="-")&&_&&(!_.children||!_.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(u=!0),Lm(l)===p&&_){let c=-1;for(;++c<n.children.length;){const C=n.children[c];if(C&&C.type==="listItem"&&C.children&&C.children[0]&&C.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(p=a),l.bulletCurrent=p;const h=l.containerFlow(n,o);return l.bulletLastUsed=p,l.bulletCurrent=b,v(),h}function dw(n){const s=n.options.listItemIndent||"one";if(s!=="tab"&&s!=="one"&&s!=="mixed")throw new Error("Cannot serialize items with `"+s+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return s}function pw(n,s,l,o){const v=dw(l);let b=l.bulletCurrent||Dc(l);s&&s.type==="list"&&s.ordered&&(b=(typeof s.start=="number"&&s.start>-1?s.start:1)+(l.options.incrementListMarker===!1?0:s.children.indexOf(n))+b);let p=b.length+1;(v==="tab"||v==="mixed"&&(s&&s.type==="list"&&s.spread||n.spread))&&(p=Math.ceil(p/4)*4);const a=l.createTracker(o);a.move(b+" ".repeat(p-b.length)),a.shift(p);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(n,a.current()),_);return u(),h;function _(c,C,w){return C?(w?"":" ".repeat(p))+c:(w?b:b+" ".repeat(p-b.length))+c}}function _w(n,s,l,o){const v=l.enter("paragraph"),b=l.enter("phrasing"),p=l.containerPhrasing(n,o);return b(),v(),p}const mw=da(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gw(n,s,l,o){return(n.children.some(function(p){return mw(p)})?l.containerPhrasing:l.containerFlow).call(l,n,o)}function vw(n){const s=n.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}Mm.peek=Sw;function Mm(n,s,l,o){const v=vw(l),b=l.enter("strong"),p=l.createTracker(o),a=p.move(v+v);let u=p.move(l.containerPhrasing(n,{after:v,before:a,...p.current()}));const h=u.charCodeAt(0),_=aa(o.before.charCodeAt(o.before.length-1),h,v);_.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=aa(o.after.charCodeAt(0),c,v);C.inside&&(u=u.slice(0,-1)+Os(c));const w=p.move(v+v);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:_.outside},a+u+w}function Sw(n,s,l){return l.options.strong||"*"}function yw(n,s,l,o){return l.safe(n.value,o)}function bw(n){const s=n.options.ruleRepetition||3;if(s<3)throw new Error("Cannot serialize rules with repetition `"+s+"` for `options.ruleRepetition`, expected `3` or more");return s}function Cw(n,s,l){const o=(Lm(l)+(l.options.ruleSpaces?" ":"")).repeat(bw(l));return l.options.ruleSpaces?o.slice(0,-1):o}const Om={blockquote:GC,break:D_,code:QC,definition:JC,emphasis:wm,hardBreak:D_,heading:iw,html:xm,image:Em,imageReference:km,inlineCode:Am,link:Dm,linkReference:Rm,list:fw,listItem:pw,paragraph:_w,root:gw,strong:Mm,text:yw,thematicBreak:Cw};function ww(){return{enter:{table:xw,tableData:R_,tableHeader:R_,tableRow:kw},exit:{codeText:Aw,table:Ew,tableData:Ju,tableHeader:Ju,tableRow:Ju}}}function xw(n){const s=n._align;this.enter({type:"table",align:s.map(function(l){return l==="none"?null:l}),children:[]},n),this.data.inTable=!0}function Ew(n){this.exit(n),this.data.inTable=void 0}function kw(n){this.enter({type:"tableRow",children:[]},n)}function Ju(n){this.exit(n)}function R_(n){this.enter({type:"tableCell",children:[]},n)}function Aw(n){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,Tw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(n)}function Tw(n,s){return s==="|"?s:n}function Dw(n){const s=n||{},l=s.tableCellPadding,o=s.tablePipeAlign,v=s.stringLength,b=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
86
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:C,table:p,tableCell:u,tableRow:a}};function p(w,k,x,S){return h(_(w,x,S),w.align)}function a(w,k,x,S){const m=c(w,x,S),d=h([m]);return d.slice(0,d.indexOf(`
87
- `))}function u(w,k,x,S){const m=x.enter("tableCell"),d=x.enter("phrasing"),g=x.containerPhrasing(w,{...S,before:b,after:b});return d(),m(),g}function h(w,k){return qC(w,{align:k,alignDelimiters:o,padding:l,stringLength:v})}function _(w,k,x){const S=w.children;let m=-1;const d=[],g=k.enter("table");for(;++m<S.length;)d[m]=c(S[m],k,x);return g(),d}function c(w,k,x){const S=w.children;let m=-1;const d=[],g=k.enter("tableRow");for(;++m<S.length;)d[m]=u(S[m],w,k,x);return g(),d}function C(w,k,x){let S=Om.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Rw(){return{exit:{taskListCheckValueChecked:L_,taskListCheckValueUnchecked:L_,paragraph:Mw}}}function Lw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ow}}}function L_(n){const s=this.stack[this.stack.length-2];s.type,s.checked=n.type==="taskListCheckValueChecked"}function Mw(n){const s=this.stack[this.stack.length-2];if(s&&s.type==="listItem"&&typeof s.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const o=l.children[0];if(o&&o.type==="text"){const v=s.children;let b=-1,p;for(;++b<v.length;){const a=v[b];if(a.type==="paragraph"){p=a;break}}p===l&&(o.value=o.value.slice(1),o.value.length===0?l.children.shift():l.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,l.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function Ow(n,s,l,o){const v=n.children[0],b=typeof n.checked=="boolean"&&v&&v.type==="paragraph",p="["+(n.checked?"x":" ")+"] ",a=l.createTracker(o);b&&a.move(p);let u=Om.listItem(n,s,l,{...o,...a.current()});return b&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(_){return _+p}}function Bw(){return[fC(),OC(),NC(),ww(),Rw()]}function zw(n){return{extensions:[dC(),BC(n),jC(),Dw(n),Lw()]}}const Hw={tokenize:Fw,partial:!0},Bm={tokenize:qw,partial:!0},zm={tokenize:Vw,partial:!0},Hm={tokenize:Gw,partial:!0},Nw={tokenize:Yw,partial:!0},Nm={name:"wwwAutolink",tokenize:Iw,previous:Um},jm={name:"protocolAutolink",tokenize:Pw,previous:Im},Vn={name:"emailAutolink",tokenize:Uw,previous:Pm},xn={};function jw(){return{text:xn}}let Ni=48;for(;Ni<123;)xn[Ni]=Vn,Ni++,Ni===58?Ni=65:Ni===91&&(Ni=97);xn[43]=Vn;xn[45]=Vn;xn[46]=Vn;xn[95]=Vn;xn[72]=[Vn,jm];xn[104]=[Vn,jm];xn[87]=[Vn,Nm];xn[119]=[Vn,Nm];function Uw(n,s,l){const o=this;let v,b;return p;function p(c){return!cc(c)||!Pm.call(o,o.previous)||Rc(o.events)?l(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(c))}function a(c){return cc(c)?(n.consume(c),a):c===64?(n.consume(c),u):l(c)}function u(c){return c===46?n.check(Nw,_,h)(c):c===45||c===95||Dt(c)?(b=!0,n.consume(c),u):_(c)}function h(c){return n.consume(c),v=!0,u}function _(c){return b&&v&&Mt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),s(c)):l(c)}}function Iw(n,s,l){const o=this;return v;function v(p){return p!==87&&p!==119||!Um.call(o,o.previous)||Rc(o.events)?l(p):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Hw,n.attempt(Bm,n.attempt(zm,b),l),l)(p))}function b(p){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),s(p)}}function Pw(n,s,l){const o=this;let v="",b=!1;return p;function p(c){return(c===72||c===104)&&Im.call(o,o.previous)&&!Rc(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),v+=String.fromCodePoint(c),n.consume(c),a):l(c)}function a(c){if(Mt(c)&&v.length<5)return v+=String.fromCodePoint(c),n.consume(c),a;if(c===58){const C=v.toLowerCase();if(C==="http"||C==="https")return n.consume(c),u}return l(c)}function u(c){return c===47?(n.consume(c),b?h:(b=!0,u)):l(c)}function h(c){return c===null||ra(c)||et(c)||ji(c)||ca(c)?l(c):n.attempt(Bm,n.attempt(zm,_),l)(c)}function _(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),s(c)}}function Fw(n,s,l){let o=0;return v;function v(p){return(p===87||p===119)&&o<3?(o++,n.consume(p),v):p===46&&o===3?(n.consume(p),b):l(p)}function b(p){return p===null?l(p):s(p)}}function qw(n,s,l){let o,v,b;return p;function p(h){return h===46||h===95?n.check(Hm,u,a)(h):h===null||et(h)||ji(h)||h!==45&&ca(h)?u(h):(b=!0,n.consume(h),p)}function a(h){return h===95?o=!0:(v=o,o=void 0),n.consume(h),p}function u(h){return v||o||!b?l(h):s(h)}}function Vw(n,s){let l=0,o=0;return v;function v(p){return p===40?(l++,n.consume(p),v):p===41&&o<l?b(p):p===33||p===34||p===38||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===60||p===63||p===93||p===95||p===126?n.check(Hm,s,b)(p):p===null||et(p)||ji(p)?s(p):(n.consume(p),v)}function b(p){return p===41&&o++,n.consume(p),v}}function Gw(n,s,l){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),b):a===93?(n.consume(a),v):a===60||a===null||et(a)||ji(a)?s(a):l(a)}function v(a){return a===null||a===40||a===91||et(a)||ji(a)?s(a):o(a)}function b(a){return Mt(a)?p(a):l(a)}function p(a){return a===59?(n.consume(a),o):Mt(a)?(n.consume(a),p):l(a)}}function Yw(n,s,l){return o;function o(b){return n.consume(b),v}function v(b){return Dt(b)?l(b):s(b)}}function Um(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||et(n)}function Im(n){return!Mt(n)}function Pm(n){return!(n===47||cc(n))}function cc(n){return n===43||n===45||n===46||n===95||Dt(n)}function Rc(n){let s=n.length,l=!1;for(;s--;){const o=n[s][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){l=!0;break}if(o._gfmAutolinkLiteralWalkedInto){l=!1;break}}return n.length>0&&!l&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const Ww={tokenize:tx,partial:!0};function Kw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Zw,continuation:{tokenize:Jw},exit:ex}},text:{91:{name:"gfmFootnoteCall",tokenize:Qw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xw,resolveTo:$w}}}}function Xw(n,s,l){const o=this;let v=o.events.length;const b=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let p;for(;v--;){const u=o.events[v][1];if(u.type==="labelImage"){p=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!p||!p._balanced)return l(u);const h=_n(o.sliceSerialize({start:p.end,end:o.now()}));return h.codePointAt(0)!==94||!b.includes(h.slice(1))?l(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),s(u))}}function $w(n,s){let l=n.length;for(;l--;)if(n[l][1].type==="labelImage"&&n[l][0]==="enter"){n[l][1];break}n[l+1][1].type="data",n[l+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[l+3][1].start),end:Object.assign({},n[n.length-1][1].end)},v={type:"gfmFootnoteCallMarker",start:Object.assign({},n[l+3][1].end),end:Object.assign({},n[l+3][1].end)};v.end.column++,v.end.offset++,v.end._bufferIndex++;const b={type:"gfmFootnoteCallString",start:Object.assign({},v.end),end:Object.assign({},n[n.length-1][1].start)},p={type:"chunkString",contentType:"string",start:Object.assign({},b.start),end:Object.assign({},b.end)},a=[n[l+1],n[l+2],["enter",o,s],n[l+3],n[l+4],["enter",v,s],["exit",v,s],["enter",b,s],["enter",p,s],["exit",p,s],["exit",b,s],n[n.length-2],n[n.length-1],["exit",o,s]];return n.splice(l,n.length-l+1,...a),n}function Qw(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b=0,p;return a;function a(c){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?l(c):(n.enter("gfmFootnoteCallMarker"),n.consume(c),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(c){if(b>999||c===93&&!p||c===null||c===91||et(c))return l(c);if(c===93){n.exit("chunkString");const C=n.exit("gfmFootnoteCallString");return v.includes(_n(o.sliceSerialize(C)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),s):l(c)}return et(c)||(p=!0),b++,n.consume(c),c===92?_:h}function _(c){return c===91||c===92||c===93?(n.consume(c),b++,h):h(c)}}function Zw(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b,p=0,a;return u;function u(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",_):l(k)}function _(k){if(p>999||k===93&&!a||k===null||k===91||et(k))return l(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return b=_n(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),C}return et(k)||(a=!0),p++,n.consume(k),k===92?c:_}function c(k){return k===91||k===92||k===93?(n.consume(k),p++,_):_(k)}function C(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),v.includes(b)||v.push(b),Ie(n,w,"gfmFootnoteDefinitionWhitespace")):l(k)}function w(k){return s(k)}}function Jw(n,s,l){return n.check(zs,s,n.attempt(Ww,s,l))}function ex(n){n.exit("gfmFootnoteDefinition")}function tx(n,s,l){const o=this;return Ie(n,v,"gfmFootnoteDefinitionIndent",5);function v(b){const p=o.events[o.events.length-1];return p&&p[1].type==="gfmFootnoteDefinitionIndent"&&p[2].sliceSerialize(p[1],!0).length===4?s(b):l(b)}}function nx(n){let l=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:b,resolveAll:v};return l==null&&(l=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function v(p,a){let u=-1;for(;++u<p.length;)if(p[u][0]==="enter"&&p[u][1].type==="strikethroughSequenceTemporary"&&p[u][1]._close){let h=u;for(;h--;)if(p[h][0]==="exit"&&p[h][1].type==="strikethroughSequenceTemporary"&&p[h][1]._open&&p[u][1].end.offset-p[u][1].start.offset===p[h][1].end.offset-p[h][1].start.offset){p[u][1].type="strikethroughSequence",p[h][1].type="strikethroughSequence";const _={type:"strikethrough",start:Object.assign({},p[h][1].start),end:Object.assign({},p[u][1].end)},c={type:"strikethroughText",start:Object.assign({},p[h][1].end),end:Object.assign({},p[u][1].start)},C=[["enter",_,a],["enter",p[h][1],a],["exit",p[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&Zt(C,C.length,0,ha(w,p.slice(h+1,u),a)),Zt(C,C.length,0,[["exit",c,a],["enter",p[u][1],a],["exit",p[u][1],a],["exit",_,a]]),Zt(p,h-1,u-h+3,C),u=h+C.length-2;break}}for(u=-1;++u<p.length;)p[u][1].type==="strikethroughSequenceTemporary"&&(p[u][1].type="data");return p}function b(p,a,u){const h=this.previous,_=this.events;let c=0;return C;function C(k){return h===126&&_[_.length-1][1].type!=="characterEscape"?u(k):(p.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=Dr(h);if(k===126)return c>1?u(k):(p.consume(k),c++,w);if(c<2&&!l)return u(k);const S=p.exit("strikethroughSequenceTemporary"),m=Dr(k);return S._open=!m||m===2&&!!x,S._close=!x||x===2&&!!m,a(k)}}}class ix{constructor(){this.map=[]}add(s,l,o){rx(this,s,l,o)}consume(s){if(this.map.sort(function(b,p){return b[0]-p[0]}),this.map.length===0)return;let l=this.map.length;const o=[];for(;l>0;)l-=1,o.push(s.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),s.length=this.map[l][0];o.push(s.slice()),s.length=0;let v=o.pop();for(;v;){for(const b of v)s.push(b);v=o.pop()}this.map.length=0}}function rx(n,s,l,o){let v=0;if(!(l===0&&o.length===0)){for(;v<n.map.length;){if(n.map[v][0]===s){n.map[v][1]+=l,n.map[v][2].push(...o);return}v+=1}n.map.push([s,l,o])}}function sx(n,s){let l=!1;const o=[];for(;s<n.length;){const v=n[s];if(l){if(v[0]==="enter")v[1].type==="tableContent"&&o.push(n[s+1][1].type==="tableDelimiterMarker"?"left":"none");else if(v[1].type==="tableContent"){if(n[s-1][1].type==="tableDelimiterMarker"){const b=o.length-1;o[b]=o[b]==="left"?"center":"right"}}else if(v[1].type==="tableDelimiterRow")break}else v[0]==="enter"&&v[1].type==="tableDelimiterRow"&&(l=!0);s+=1}return o}function lx(){return{flow:{null:{name:"table",tokenize:ax,resolveAll:ox}}}}function ax(n,s,l){const o=this;let v=0,b=0,p;return a;function a(N){let V=o.events.length-1;for(;V>-1;){const Y=o.events[V][1].type;if(Y==="lineEnding"||Y==="linePrefix")V--;else break}const F=V>-1?o.events[V][1].type:null,U=F==="tableHead"||F==="tableRow"?A:u;return U===A&&o.parser.lazy[o.now().line]?l(N):U(N)}function u(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(p=!0,b+=1),_(N)}function _(N){return N===null?l(N):we(N)?b>1?(b=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):l(N):He(N)?Ie(n,_,"whitespace")(N):(b+=1,p&&(p=!1,v+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),p=!0,_):(n.enter("data"),c(N)))}function c(N){return N===null||N===124||et(N)?(n.exit("data"),_(N)):(n.consume(N),N===92?C:c)}function C(N){return N===92||N===124?(n.consume(N),c):c(N)}function w(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?l(N):(n.enter("tableDelimiterRow"),p=!1,He(N)?Ie(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?(p=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):R(N)}function x(N){return He(N)?Ie(n,S,"whitespace")(N):S(N)}function S(N){return N===58?(b+=1,p=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),m):N===45?(b+=1,m(N)):N===null||we(N)?E(N):R(N)}function m(N){return N===45?(n.enter("tableDelimiterFiller"),d(N)):R(N)}function d(N){return N===45?(n.consume(N),d):N===58?(p=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),g):(n.exit("tableDelimiterFiller"),g(N))}function g(N){return He(N)?Ie(n,E,"whitespace")(N):E(N)}function E(N){return N===124?k(N):N===null||we(N)?!p||v!==b?R(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),s(N)):R(N)}function R(N){return l(N)}function A(N){return n.enter("tableRow"),L(N)}function L(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),L):N===null||we(N)?(n.exit("tableRow"),s(N)):He(N)?Ie(n,L,"whitespace")(N):(n.enter("data"),T(N))}function T(N){return N===null||N===124||et(N)?(n.exit("data"),L(N)):(n.consume(N),N===92?B:T)}function B(N){return N===92||N===124?(n.consume(N),T):T(N)}}function ox(n,s){let l=-1,o=!0,v=0,b=[0,0,0,0],p=[0,0,0,0],a=!1,u=0,h,_,c;const C=new ix;for(;++l<n.length;){const w=n[l],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,u!==0&&(M_(C,s,u,h,_),_=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},C.add(l,0,[["enter",h,s]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,c=void 0,b=[0,0,0,0],p=[0,l+1,0,0],a&&(a=!1,_={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},C.add(l,0,[["enter",_,s]])),v=k.type==="tableDelimiterRow"?2:_?3:1):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(o=!1,p[2]===0&&(b[1]!==0&&(p[0]=p[1],c=na(C,s,b,v,void 0,c),b=[0,0,0,0]),p[2]=l)):k.type==="tableCellDivider"&&(o?o=!1:(b[1]!==0&&(p[0]=p[1],c=na(C,s,b,v,void 0,c)),b=p,p=[b[1],l,0,0])):k.type==="tableHead"?(a=!0,u=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=l,b[1]!==0?(p[0]=p[1],c=na(C,s,b,v,l,c)):p[1]!==0&&(c=na(C,s,p,v,l,c)),v=0):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(p[3]=l)}for(u!==0&&M_(C,s,u,h,_),C.consume(s.events),l=-1;++l<s.events.length;){const w=s.events[l];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=sx(s.events,l))}return n}function na(n,s,l,o,v,b){const p=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";l[0]!==0&&(b.end=Object.assign({},Ar(s.events,l[0])),n.add(l[0],0,[["exit",b,s]]));const u=Ar(s.events,l[1]);if(b={type:p,start:Object.assign({},u),end:Object.assign({},u)},n.add(l[1],0,[["enter",b,s]]),l[2]!==0){const h=Ar(s.events,l[2]),_=Ar(s.events,l[3]),c={type:a,start:Object.assign({},h),end:Object.assign({},_)};if(n.add(l[2],0,[["enter",c,s]]),o!==2){const C=s.events[l[2]],w=s.events[l[3]];if(C[1].end=Object.assign({},w[1].end),C[1].type="chunkText",C[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,x=l[3]-l[2]-1;n.add(k,x,[])}}n.add(l[3]+1,0,[["exit",c,s]])}return v!==void 0&&(b.end=Object.assign({},Ar(s.events,v)),n.add(v,0,[["exit",b,s]]),b=void 0),b}function M_(n,s,l,o,v){const b=[],p=Ar(s.events,l);v&&(v.end=Object.assign({},p),b.push(["exit",v,s])),o.end=Object.assign({},p),b.push(["exit",o,s]),n.add(l+1,0,b)}function Ar(n,s){const l=n[s],o=l[0]==="enter"?"start":"end";return l[1][o]}const ux={name:"tasklistCheck",tokenize:hx};function cx(){return{text:{91:ux}}}function hx(n,s,l){const o=this;return v;function v(u){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?l(u):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),b)}function b(u){return et(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),p):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),p):l(u)}function p(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):l(u)}function a(u){return we(u)?s(u):He(u)?n.check({tokenize:fx},s,l)(u):l(u)}}function fx(n,s,l){return Ie(n,o,"whitespace");function o(v){return v===null?l(v):s(v)}}function dx(n){return Z_([jw(),Kw(),nx(n),lx(),cx()])}const px={};function _x(n){const s=this,l=n||px,o=s.data(),v=o.micromarkExtensions||(o.micromarkExtensions=[]),b=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),p=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);v.push(dx(l)),b.push(Bw()),p.push(zw(l))}function mx({settings:n,busy:s=!1,promptPreviews:l,testResult:o,onSave:v,onTest:b,onClose:p}){const[a,u]=me.useState(n),[h,_]=me.useState(n.apiKey??"");return me.useEffect(()=>{u(n),_(n.apiKey??"")},[n]),q.jsx("div",{className:"modal-backdrop",children:q.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[q.jsxs("header",{children:[q.jsxs("div",{children:[q.jsx("h2",{children:"Translation Settings"}),q.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),q.jsx("button",{type:"button",onClick:p,children:"Close"})]}),q.jsxs("div",{className:"translation-settings-grid",children:[q.jsxs("label",{children:[q.jsx("span",{children:"Base URL"}),q.jsx("input",{value:a.baseUrl,onChange:c=>u({...a,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),q.jsxs("label",{children:[q.jsx("span",{children:"API key"}),q.jsx("input",{value:h,onChange:c=>_(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),q.jsxs("label",{children:[q.jsx("span",{children:"Model"}),q.jsx("input",{value:a.model,onChange:c=>u({...a,model:c.target.value})})]}),q.jsxs("label",{children:[q.jsx("span",{children:"Target language"}),q.jsx("input",{value:a.targetLanguage,onChange:c=>u({...a,targetLanguage:c.target.value})})]}),q.jsxs("label",{children:[q.jsx("span",{children:"Use context"}),q.jsx("input",{checked:a.contextEnabled,type:"checkbox",onChange:c=>u({...a,contextEnabled:c.target.checked})})]}),q.jsxs("label",{children:[q.jsx("span",{children:"Timeout ms"}),q.jsx("input",{min:3e3,type:"number",value:a.requestTimeoutMs,onChange:c=>u({...a,requestTimeoutMs:Number(c.target.value)})})]}),q.jsxs("label",{children:[q.jsx("span",{children:"Temperature"}),q.jsx("input",{min:0,max:1,step:.1,type:"number",value:a.temperature,onChange:c=>u({...a,temperature:Number(c.target.value)})})]})]}),q.jsxs("section",{className:"translation-prompt-settings",children:[q.jsxs("header",{children:[q.jsxs("div",{children:[q.jsx("h3",{children:"Translation Prompts"}),q.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),q.jsx("button",{type:"button",disabled:s,onClick:()=>u({...a,prompts:void 0}),children:"Reset prompts"})]}),q.jsx("div",{className:"translation-prompt-stack",children:l.map(c=>q.jsxs("label",{children:[q.jsx("span",{children:c.label}),q.jsx("textarea",{value:vx(a,c),onChange:C=>u({...a,prompts:gx(a.prompts,c.key,C.target.value,c.defaultPrompt)})})]},c.key))})]}),o?q.jsx("div",{className:o.ok?"translation-test-result is-ok":"translation-test-result is-error",children:o.ok?`Connection ok: ${o.model} in ${o.elapsedMs}ms`:o.error}):null,q.jsxs("footer",{children:[q.jsx("button",{type:"button",disabled:s,onClick:b,children:"Test Connection"}),q.jsx("button",{type:"button",disabled:s,onClick:()=>void v({...a,enabled:!0,translateOutput:!0,translateUserInput:!0,inputMode:"review-before-send"},h.trim()),children:"Save"})]})]})})}function gx(n,s,l,o){const v={...n??{}};return l.trim()&&l!==o?v[s]=l:delete v[s],Object.keys(v).length>0?v:void 0}function vx(n,s){var l;return((l=n.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function Sx({active:n=!0,taskSlug:s,role:l,sessionId:o}){const[v,b]=me.useState(null),[p,a]=me.useState([]),[u,h]=me.useState(""),[_,c]=me.useState(!1),[C,w]=me.useState(!1),[k,x]=me.useState(!1),[S,m]=me.useState("ready"),[d,g]=me.useState(""),[E,R]=me.useState(Date.now()),[A,L]=me.useState(!1),[T,B]=me.useState(""),[N,V]=me.useState(!1),[F,U]=me.useState([]),[Y,$]=me.useState(),[G,X]=me.useState(0),se=me.useRef(n),z=me.useRef(1),M=me.useRef(null);me.useEffect(()=>{se.current=n},[n]),me.useEffect(()=>{Promise.all([Oe.getTranslationSettings(),Oe.getTranslationPrompts()]).then(([Z,ee])=>{b(Z),U(ee)}).catch(Z=>B(Z.message))},[]),me.useEffect(()=>{a([]),B(""),m("ready"),g(""),z.current=1;let Z=!1,ee;const oe=()=>{Z||(ee=window.setTimeout(Se,se.current?200:1e3))},Se=async()=>{if(!Z)try{const xe=await Oe.pollTranslationSession(o,z.current);if(Z)return;H(xe.events),z.current=xe.nextCursor,m(xe.status),se.current&&g(Ax(new Date().toISOString()))}catch(xe){Z||B(xe instanceof Error?xe.message:"Translation poll failed.")}finally{oe()}};return Oe.startTranslationSession(s,l).then(xe=>{Z||(m(xe.status),z.current=xe.nextCursor,Se())}).catch(xe=>{Z||B(xe instanceof Error?xe.message:"Translation start failed.")}),()=>{Z=!0,ee!==void 0&&window.clearTimeout(ee)}},[o,s,l,G]),me.useEffect(()=>{var Z;n&&((Z=M.current)==null||Z.scrollIntoView({block:"nearest"}))},[n,p.length]);const O=bx(p);me.useEffect(()=>{if(!O)return;R(Date.now());const Z=window.setInterval(()=>R(Date.now()),250);return()=>window.clearInterval(Z)},[O]);async function P(Z=!1){if(v){L(!0),B(""),c(!1);try{const ee=await Oe.translateUserInput(s,l,{text:u,mode:Z?"auto-send":"review-before-send",useContext:v.contextEnabled,send:Z});x(ee.contextUsed),ee.sent?(h(""),c(!1)):(h(ee.englishPreview),c(!0))}catch(ee){B(ee instanceof Error?ee.message:"Translation failed.")}finally{L(!1)}}}function H(Z){if(Z.length===0)return;for(const oe of Z)oe.type==="status"?m(oe.status):oe.type==="error"&&B(oe.message);const ee=Z.filter(oe=>oe.type==="entry");ee.length>0&&a(oe=>ee.reduce((Se,xe)=>Ex(Se,xe.entry),oe))}async function ne(){if(u.trim()){L(!0),B("");try{await Oe.sendTranslatedInput(s,l,{englishText:u}),h(""),c(!1),x(!1)}catch(Z){B(Z instanceof Error?Z.message:"Failed to send English input.")}finally{L(!1)}}}function de(Z){Z.key!=="Enter"||Z.shiftKey||Z.nativeEvent.isComposing||(Z.preventDefault(),!A&&u.trim()&&(_?ne():P(C)))}async function pe(Z,ee){L(!0),B("");try{const oe=await Oe.updateTranslationSettings({...Z,...ee!==void 0?{apiKey:ee}:{}}),Se=await Oe.getTranslationPrompts();b(oe),U(Se),V(!1),X(xe=>xe+1)}catch(oe){B(oe instanceof Error?oe.message:"Failed to save translation settings.")}finally{L(!1)}}async function K(){L(!0),B("");try{$(await Oe.testTranslationProvider())}catch(Z){B(Z instanceof Error?Z.message:"Provider test failed.")}finally{L(!1)}}async function I(){a([]),z.current=1,await Oe.clearTranslationSession(o).catch(Z=>B(Z.message))}if(!v)return q.jsx("aside",{className:"translation-panel",children:q.jsx("p",{className:"muted",children:"Loading translation settings..."})});const ae=Cx(p,S,E);return q.jsxs("aside",{className:"translation-panel",children:[q.jsxs("header",{className:"translation-panel-header",children:[q.jsxs("div",{className:"translation-panel-titlebar",children:[q.jsx("h2",{children:"Translation"}),q.jsxs("div",{className:"translation-panel-actions",children:[q.jsx("button",{"aria-pressed":C,className:`auto-send-toggle${C?" is-active":""}`,type:"button",onClick:()=>w(Z=>!Z),children:C?"✅ Auto-send":"× Auto-send"}),q.jsx("button",{type:"button",onClick:()=>V(!0),children:"Settings"}),q.jsx("button",{type:"button",onClick:()=>void I(),children:"Clear"})]})]}),q.jsxs("div",{className:"translation-status-row",children:[q.jsxs("p",{children:[v.model," · ",ae,k?" · context used":""]}),q.jsx("p",{children:d?`poll ${d}`:"poll -"})]})]}),T?q.jsx("div",{className:"error-banner",children:T}):null,q.jsxs("div",{className:"translation-entry-list",children:[p.length===0?q.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,p.map(Z=>q.jsx(yx,{entry:Z},Z.id)),q.jsx("div",{ref:M})]}),q.jsx("div",{className:"translation-composer",children:q.jsxs("div",{className:"translation-composer-row",children:[q.jsx("textarea",{value:u,onChange:Z=>{h(Z.target.value),Z.target.value.trim()||c(!1)},onKeyDown:de,placeholder:"输入中文,先翻译成英文工程指令..."}),q.jsx("div",{className:"translation-composer-actions",children:q.jsx("button",{type:"button",disabled:A||!_||!u.trim(),onClick:()=>void ne(),children:"Send English"})})]})}),N?q.jsx(mx,{settings:v,busy:A,promptPreviews:F,testResult:Y,onSave:pe,onTest:K,onClose:()=>V(!1)}):null]})}function yx({entry:n}){const s=xx(n),l=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",v=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return q.jsxs("article",{className:v,children:[l?q.jsx("pre",{children:s}):q.jsx("div",{className:"translation-markdown",children:q.jsx(nC,{remarkPlugins:[_x],children:s})}),n.warning?q.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?q.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function bx(n){const s=n.find(Fm);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function Cx(n,s,l){const o=n.find(Fm);if(o)return`translating ${kx(Math.max(0,l-wx(o)))}`;const v=n.at(-1);return(v==null?void 0:v.status)==="failed"||s==="failed"?"error":s}function Fm(n){return n.status==="queued"||n.status==="translating"}function wx(n){const s=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(s)?s:Date.now()}function xx(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function Ex(n,s){return n.findIndex(o=>o.id===s.id)===-1?[...n,s]:n.map(o=>o.id===s.id?s:o)}function kx(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const s=n/1e3;if(s<60)return`${s.toFixed(1)}s`;const l=Math.floor(s/60),o=Math.floor(s%60).toString().padStart(2,"0");return`${l}:${o}`}function Ax(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function Tx({role:n,session:s,permissionMode:l,active:o=!0,busy:v,orchestrationMode:b,onPermissionModeChange:p,onOrchestrationModeChange:a,onStart:u,onResume:h,onStop:_,onRestart:c,onTerminalEvent:C}){const[w,k]=me.useState(!1),x=b==="auto";return q.jsxs("section",{className:"session-console",children:[q.jsxs("div",{className:"session-console-top",children:[q.jsx(q0,{role:n,session:s,permissionMode:l,busy:v,onPermissionModeChange:p,onStart:u,onResume:h,onStop:_,onRestart:c}),q.jsxs("div",{className:"session-console-actions",children:[q.jsx("button",{"aria-label":`Auto orchestration is ${x?"on":"off"}`,"aria-pressed":x,className:`translation-toggle${x?" is-active":""}`,disabled:v,type:"button",onClick:()=>a(x?"manual":"auto"),children:x?"✅ Auto orchestration":"× Auto orchestration"}),q.jsx("button",{"aria-pressed":w,className:`translation-toggle${w?" is-active":""}`,type:"button",onClick:()=>k(S=>!S),children:w?"✅ Translate":"× Translate"})]})]}),(s==null?void 0:s.status)==="running"?q.jsx(Dx,{active:o,onTerminalEvent:C,role:n,session:s,taskSlug:s.taskSlug,translationEnabled:w}):q.jsxs("div",{className:"terminal-empty",children:[q.jsx("strong",{children:n}),q.jsx("span",{children:s!=null&&s.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function Dx({active:n,onTerminalEvent:s,role:l,session:o,taskSlug:v,translationEnabled:b}){return q.jsxs("div",{className:b?"session-console-body has-translation":"session-console-body",children:[q.jsx("div",{className:"terminal-pane",children:q.jsx(N0,{sessionId:o.id,active:n,onEvent:s},o.id)}),b?q.jsx("div",{className:"translation-pane",children:q.jsx(Sx,{active:n,taskSlug:v,role:l,sessionId:o.id},o.id)}):null]})}function Rx(n,s,l){var b;if(!n||l.mode!=="auto")return null;const o=new Map(n.map(p=>[p.id,p])),v=s.filter(p=>{var a;return p.status!=="submitted"?!1:((a=o.get(p.id))==null?void 0:a.status)!=="submitted"});return v.length===0?null:((b=v.sort(Lx)[v.length-1])==null?void 0:b.toRole)??null}function Lx(n,s){const l=n.submittedAt??n.deliveredAt??"",o=s.submittedAt??s.deliveredAt??"";return l!==o?l.localeCompare(o):n.createdAt.localeCompare(s.createdAt)}function Mx({task:n,activeRole:s,onTaskChanged:l,onActiveRoleChange:o,onMessagesChanged:v,onOrchestrationChanged:b,onRoundStateChanged:p,onEventsChanged:a}){const[u,h]=me.useState(null),[_,c]=me.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[C,w]=me.useState(!1),[k,x]=me.useState(""),[S,m]=me.useState([]),[d,g]=me.useState(null),E=me.useRef(null),R=me.useCallback((F,U,Y,$)=>{var se;const G=((se=E.current)==null?void 0:se.taskSlug)===n.taskSlug?E.current.messages:null,X=Rx(G,U,Y);E.current={taskSlug:n.taskSlug,messages:U},h(F),g(Y),v==null||v(U),b==null||b(Y),p==null||p($),X&&(o(X),B(`auto switched to ${X} for submitted VCM message`))},[o,v,b,p,n.taskSlug]),A=me.useCallback(async()=>{const[F,U,Y,$]=await Promise.all([Oe.getTaskStatus(n.taskSlug),Oe.listMessages(n.taskSlug),Oe.getOrchestrationState(n.taskSlug),Oe.getTaskRoundState(n.taskSlug)]);R(F,U,Y,$)},[R,n.taskSlug]);me.useEffect(()=>{A().catch(F=>x(F.message))},[A]),me.useEffect(()=>{m([]),a==null||a([])},[a,n.taskSlug]),me.useEffect(()=>{c(F=>{let U=!1;const Y={...F};for(const $ of(u==null?void 0:u.sessions)??[])Y[$.role]!==$.permissionMode&&(Y[$.role]=$.permissionMode,U=!0);return U?Y:F})},[u==null?void 0:u.sessions]),me.useEffect(()=>{const F=window.setInterval(()=>{Promise.all([Oe.getTaskStatus(n.taskSlug),Oe.listMessages(n.taskSlug),Oe.getOrchestrationState(n.taskSlug),Oe.getTaskRoundState(n.taskSlug)]).then(([U,Y,$,G])=>{R(U,Y,$,G)}).catch(U=>x(U.message))},3e3);return()=>window.clearInterval(F)},[R,n.taskSlug]);async function L(F){w(!0),x("");try{await F(),await A(),await l()}catch(U){x(U instanceof Error?U.message:"Action failed.")}finally{w(!1)}}async function T(){const F=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(`
86
+ `,...b.current()});return/^[\t ]/.test(h)&&(h=Os(h.charCodeAt(0))+h.slice(1)),h=h?p+" "+h:p,l.options.closeAtx&&(h+=" "+p),u(),a(),h}wm.peek=sw;function wm(n){return n.value||""}function sw(){return"<"}xm.peek=lw;function xm(n,s,l,o){const v=Dc(l),b=v==='"'?"Quote":"Apostrophe",p=l.enter("image");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("![");return h+=u.move(l.safe(n.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":")",...u.current()}))),a(),n.title&&(a=l.enter(`title${b}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),a()),h+=u.move(")"),p(),h}function lw(){return"!"}Em.peek=aw;function Em(n,s,l,o){const v=n.referenceType,b=l.enter("imageReference");let p=l.enter("label");const a=l.createTracker(o);let u=a.move("![");const h=l.safe(n.alt,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),p();const m=l.stack;l.stack=[],p=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return p(),l.stack=m,b(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function aw(){return"!"}km.peek=ow;function km(n,s,l){let o=n.value||"",v="`",b=-1;for(;new RegExp("(^|[^`])"+v+"([^`]|$)").test(o);)v+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++b<l.unsafe.length;){const p=l.unsafe[b],a=l.compilePattern(p);let u;if(p.atBreak)for(;u=a.exec(o);){let h=u.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(u.index+1)}}return v+o+v}function ow(){return"`"}function Am(n,s){const l=yc(n);return!!(!s.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(l===n.url||"mailto:"+l===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}Tm.peek=uw;function Tm(n,s,l,o){const v=Dc(l),b=v==='"'?"Quote":"Apostrophe",p=l.createTracker(o);let a,u;if(Am(n,l)){const m=l.stack;l.stack=[],a=l.enter("autolink");let c=p.move("<");return c+=p.move(l.containerPhrasing(n,{before:c,after:">",...p.current()})),c+=p.move(">"),a(),l.stack=m,c}a=l.enter("link"),u=l.enter("label");let h=p.move("[");return h+=p.move(l.containerPhrasing(n,{before:h,after:"](",...p.current()})),h+=p.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=l.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(l.safe(n.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(u=l.enter("destinationRaw"),h+=p.move(l.safe(n.url,{before:h,after:n.title?" ":")",...p.current()}))),u(),n.title&&(u=l.enter(`title${b}`),h+=p.move(" "+v),h+=p.move(l.safe(n.title,{before:h,after:v,...p.current()})),h+=p.move(v),u()),h+=p.move(")"),a(),h}function uw(n,s,l){return Am(n,l)?"<":"["}Dm.peek=cw;function Dm(n,s,l,o){const v=n.referenceType,b=l.enter("linkReference");let p=l.enter("label");const a=l.createTracker(o);let u=a.move("[");const h=l.containerPhrasing(n,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),p();const m=l.stack;l.stack=[],p=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return p(),l.stack=m,b(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function cw(){return"["}function Rc(n){const s=n.options.bullet||"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bullet`, expected `*`, `+`, or `-`");return s}function hw(n){const s=Rc(n),l=n.options.bulletOther;if(!l)return s==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===s)throw new Error("Expected `bullet` (`"+s+"`) and `bulletOther` (`"+l+"`) to be different");return l}function fw(n){const s=n.options.bulletOrdered||".";if(s!=="."&&s!==")")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOrdered`, expected `.` or `)`");return s}function Rm(n){const s=n.options.rule||"*";if(s!=="*"&&s!=="-"&&s!=="_")throw new Error("Cannot serialize rules with `"+s+"` for `options.rule`, expected `*`, `-`, or `_`");return s}function dw(n,s,l,o){const v=l.enter("list"),b=l.bulletCurrent;let p=n.ordered?fw(l):Rc(l);const a=n.ordered?p==="."?")":".":hw(l);let u=s&&l.bulletLastUsed?p===l.bulletLastUsed:!1;if(!n.ordered){const m=n.children?n.children[0]:void 0;if((p==="*"||p==="-")&&m&&(!m.children||!m.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(u=!0),Rm(l)===p&&m){let c=-1;for(;++c<n.children.length;){const C=n.children[c];if(C&&C.type==="listItem"&&C.children&&C.children[0]&&C.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(p=a),l.bulletCurrent=p;const h=l.containerFlow(n,o);return l.bulletLastUsed=p,l.bulletCurrent=b,v(),h}function pw(n){const s=n.options.listItemIndent||"one";if(s!=="tab"&&s!=="one"&&s!=="mixed")throw new Error("Cannot serialize items with `"+s+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return s}function _w(n,s,l,o){const v=pw(l);let b=l.bulletCurrent||Rc(l);s&&s.type==="list"&&s.ordered&&(b=(typeof s.start=="number"&&s.start>-1?s.start:1)+(l.options.incrementListMarker===!1?0:s.children.indexOf(n))+b);let p=b.length+1;(v==="tab"||v==="mixed"&&(s&&s.type==="list"&&s.spread||n.spread))&&(p=Math.ceil(p/4)*4);const a=l.createTracker(o);a.move(b+" ".repeat(p-b.length)),a.shift(p);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(n,a.current()),m);return u(),h;function m(c,C,w){return C?(w?"":" ".repeat(p))+c:(w?b:b+" ".repeat(p-b.length))+c}}function mw(n,s,l,o){const v=l.enter("paragraph"),b=l.enter("phrasing"),p=l.containerPhrasing(n,o);return b(),v(),p}const gw=da(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vw(n,s,l,o){return(n.children.some(function(p){return gw(p)})?l.containerPhrasing:l.containerFlow).call(l,n,o)}function Sw(n){const s=n.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}Lm.peek=yw;function Lm(n,s,l,o){const v=Sw(l),b=l.enter("strong"),p=l.createTracker(o),a=p.move(v+v);let u=p.move(l.containerPhrasing(n,{after:v,before:a,...p.current()}));const h=u.charCodeAt(0),m=oa(o.before.charCodeAt(o.before.length-1),h,v);m.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=oa(o.after.charCodeAt(0),c,v);C.inside&&(u=u.slice(0,-1)+Os(c));const w=p.move(v+v);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:m.outside},a+u+w}function yw(n,s,l){return l.options.strong||"*"}function bw(n,s,l,o){return l.safe(n.value,o)}function Cw(n){const s=n.options.ruleRepetition||3;if(s<3)throw new Error("Cannot serialize rules with repetition `"+s+"` for `options.ruleRepetition`, expected `3` or more");return s}function ww(n,s,l){const o=(Rm(l)+(l.options.ruleSpaces?" ":"")).repeat(Cw(l));return l.options.ruleSpaces?o.slice(0,-1):o}const Mm={blockquote:YC,break:D_,code:ZC,definition:ew,emphasis:Cm,hardBreak:D_,heading:rw,html:wm,image:xm,imageReference:Em,inlineCode:km,link:Tm,linkReference:Dm,list:dw,listItem:_w,paragraph:mw,root:vw,strong:Lm,text:bw,thematicBreak:ww};function xw(){return{enter:{table:Ew,tableData:R_,tableHeader:R_,tableRow:Aw},exit:{codeText:Tw,table:kw,tableData:Ju,tableHeader:Ju,tableRow:Ju}}}function Ew(n){const s=n._align;this.enter({type:"table",align:s.map(function(l){return l==="none"?null:l}),children:[]},n),this.data.inTable=!0}function kw(n){this.exit(n),this.data.inTable=void 0}function Aw(n){this.enter({type:"tableRow",children:[]},n)}function Ju(n){this.exit(n)}function R_(n){this.enter({type:"tableCell",children:[]},n)}function Tw(n){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,Dw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(n)}function Dw(n,s){return s==="|"?s:n}function Rw(n){const s=n||{},l=s.tableCellPadding,o=s.tablePipeAlign,v=s.stringLength,b=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
87
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:C,table:p,tableCell:u,tableRow:a}};function p(w,k,x,S){return h(m(w,x,S),w.align)}function a(w,k,x,S){const _=c(w,x,S),d=h([_]);return d.slice(0,d.indexOf(`
88
+ `))}function u(w,k,x,S){const _=x.enter("tableCell"),d=x.enter("phrasing"),g=x.containerPhrasing(w,{...S,before:b,after:b});return d(),_(),g}function h(w,k){return VC(w,{align:k,alignDelimiters:o,padding:l,stringLength:v})}function m(w,k,x){const S=w.children;let _=-1;const d=[],g=k.enter("table");for(;++_<S.length;)d[_]=c(S[_],k,x);return g(),d}function c(w,k,x){const S=w.children;let _=-1;const d=[],g=k.enter("tableRow");for(;++_<S.length;)d[_]=u(S[_],w,k,x);return g(),d}function C(w,k,x){let S=Mm.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Lw(){return{exit:{taskListCheckValueChecked:L_,taskListCheckValueUnchecked:L_,paragraph:Ow}}}function Mw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Bw}}}function L_(n){const s=this.stack[this.stack.length-2];s.type,s.checked=n.type==="taskListCheckValueChecked"}function Ow(n){const s=this.stack[this.stack.length-2];if(s&&s.type==="listItem"&&typeof s.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const o=l.children[0];if(o&&o.type==="text"){const v=s.children;let b=-1,p;for(;++b<v.length;){const a=v[b];if(a.type==="paragraph"){p=a;break}}p===l&&(o.value=o.value.slice(1),o.value.length===0?l.children.shift():l.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,l.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function Bw(n,s,l,o){const v=n.children[0],b=typeof n.checked=="boolean"&&v&&v.type==="paragraph",p="["+(n.checked?"x":" ")+"] ",a=l.createTracker(o);b&&a.move(p);let u=Mm.listItem(n,s,l,{...o,...a.current()});return b&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(m){return m+p}}function zw(){return[dC(),BC(),jC(),xw(),Lw()]}function Hw(n){return{extensions:[pC(),zC(n),UC(),Rw(n),Mw()]}}const Nw={tokenize:qw,partial:!0},Om={tokenize:Vw,partial:!0},Bm={tokenize:Gw,partial:!0},zm={tokenize:Yw,partial:!0},jw={tokenize:Ww,partial:!0},Hm={name:"wwwAutolink",tokenize:Pw,previous:jm},Nm={name:"protocolAutolink",tokenize:Fw,previous:Um},Vn={name:"emailAutolink",tokenize:Iw,previous:Im},xn={};function Uw(){return{text:xn}}let Ni=48;for(;Ni<123;)xn[Ni]=Vn,Ni++,Ni===58?Ni=65:Ni===91&&(Ni=97);xn[43]=Vn;xn[45]=Vn;xn[46]=Vn;xn[95]=Vn;xn[72]=[Vn,Nm];xn[104]=[Vn,Nm];xn[87]=[Vn,Hm];xn[119]=[Vn,Hm];function Iw(n,s,l){const o=this;let v,b;return p;function p(c){return!cc(c)||!Im.call(o,o.previous)||Lc(o.events)?l(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(c))}function a(c){return cc(c)?(n.consume(c),a):c===64?(n.consume(c),u):l(c)}function u(c){return c===46?n.check(jw,m,h)(c):c===45||c===95||Dt(c)?(b=!0,n.consume(c),u):m(c)}function h(c){return n.consume(c),v=!0,u}function m(c){return b&&v&&Mt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),s(c)):l(c)}}function Pw(n,s,l){const o=this;return v;function v(p){return p!==87&&p!==119||!jm.call(o,o.previous)||Lc(o.events)?l(p):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Nw,n.attempt(Om,n.attempt(Bm,b),l),l)(p))}function b(p){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),s(p)}}function Fw(n,s,l){const o=this;let v="",b=!1;return p;function p(c){return(c===72||c===104)&&Um.call(o,o.previous)&&!Lc(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),v+=String.fromCodePoint(c),n.consume(c),a):l(c)}function a(c){if(Mt(c)&&v.length<5)return v+=String.fromCodePoint(c),n.consume(c),a;if(c===58){const C=v.toLowerCase();if(C==="http"||C==="https")return n.consume(c),u}return l(c)}function u(c){return c===47?(n.consume(c),b?h:(b=!0,u)):l(c)}function h(c){return c===null||sa(c)||et(c)||ji(c)||ca(c)?l(c):n.attempt(Om,n.attempt(Bm,m),l)(c)}function m(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),s(c)}}function qw(n,s,l){let o=0;return v;function v(p){return(p===87||p===119)&&o<3?(o++,n.consume(p),v):p===46&&o===3?(n.consume(p),b):l(p)}function b(p){return p===null?l(p):s(p)}}function Vw(n,s,l){let o,v,b;return p;function p(h){return h===46||h===95?n.check(zm,u,a)(h):h===null||et(h)||ji(h)||h!==45&&ca(h)?u(h):(b=!0,n.consume(h),p)}function a(h){return h===95?o=!0:(v=o,o=void 0),n.consume(h),p}function u(h){return v||o||!b?l(h):s(h)}}function Gw(n,s){let l=0,o=0;return v;function v(p){return p===40?(l++,n.consume(p),v):p===41&&o<l?b(p):p===33||p===34||p===38||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===60||p===63||p===93||p===95||p===126?n.check(zm,s,b)(p):p===null||et(p)||ji(p)?s(p):(n.consume(p),v)}function b(p){return p===41&&o++,n.consume(p),v}}function Yw(n,s,l){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),b):a===93?(n.consume(a),v):a===60||a===null||et(a)||ji(a)?s(a):l(a)}function v(a){return a===null||a===40||a===91||et(a)||ji(a)?s(a):o(a)}function b(a){return Mt(a)?p(a):l(a)}function p(a){return a===59?(n.consume(a),o):Mt(a)?(n.consume(a),p):l(a)}}function Ww(n,s,l){return o;function o(b){return n.consume(b),v}function v(b){return Dt(b)?l(b):s(b)}}function jm(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||et(n)}function Um(n){return!Mt(n)}function Im(n){return!(n===47||cc(n))}function cc(n){return n===43||n===45||n===46||n===95||Dt(n)}function Lc(n){let s=n.length,l=!1;for(;s--;){const o=n[s][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){l=!0;break}if(o._gfmAutolinkLiteralWalkedInto){l=!1;break}}return n.length>0&&!l&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const Kw={tokenize:nx,partial:!0};function Xw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Jw,continuation:{tokenize:ex},exit:tx}},text:{91:{name:"gfmFootnoteCall",tokenize:Zw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$w,resolveTo:Qw}}}}function $w(n,s,l){const o=this;let v=o.events.length;const b=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let p;for(;v--;){const u=o.events[v][1];if(u.type==="labelImage"){p=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!p||!p._balanced)return l(u);const h=_n(o.sliceSerialize({start:p.end,end:o.now()}));return h.codePointAt(0)!==94||!b.includes(h.slice(1))?l(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),s(u))}}function Qw(n,s){let l=n.length;for(;l--;)if(n[l][1].type==="labelImage"&&n[l][0]==="enter"){n[l][1];break}n[l+1][1].type="data",n[l+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[l+3][1].start),end:Object.assign({},n[n.length-1][1].end)},v={type:"gfmFootnoteCallMarker",start:Object.assign({},n[l+3][1].end),end:Object.assign({},n[l+3][1].end)};v.end.column++,v.end.offset++,v.end._bufferIndex++;const b={type:"gfmFootnoteCallString",start:Object.assign({},v.end),end:Object.assign({},n[n.length-1][1].start)},p={type:"chunkString",contentType:"string",start:Object.assign({},b.start),end:Object.assign({},b.end)},a=[n[l+1],n[l+2],["enter",o,s],n[l+3],n[l+4],["enter",v,s],["exit",v,s],["enter",b,s],["enter",p,s],["exit",p,s],["exit",b,s],n[n.length-2],n[n.length-1],["exit",o,s]];return n.splice(l,n.length-l+1,...a),n}function Zw(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b=0,p;return a;function a(c){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?l(c):(n.enter("gfmFootnoteCallMarker"),n.consume(c),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(c){if(b>999||c===93&&!p||c===null||c===91||et(c))return l(c);if(c===93){n.exit("chunkString");const C=n.exit("gfmFootnoteCallString");return v.includes(_n(o.sliceSerialize(C)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),s):l(c)}return et(c)||(p=!0),b++,n.consume(c),c===92?m:h}function m(c){return c===91||c===92||c===93?(n.consume(c),b++,h):h(c)}}function Jw(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b,p=0,a;return u;function u(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",m):l(k)}function m(k){if(p>999||k===93&&!a||k===null||k===91||et(k))return l(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return b=_n(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),C}return et(k)||(a=!0),p++,n.consume(k),k===92?c:m}function c(k){return k===91||k===92||k===93?(n.consume(k),p++,m):m(k)}function C(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),v.includes(b)||v.push(b),Ie(n,w,"gfmFootnoteDefinitionWhitespace")):l(k)}function w(k){return s(k)}}function ex(n,s,l){return n.check(zs,s,n.attempt(Kw,s,l))}function tx(n){n.exit("gfmFootnoteDefinition")}function nx(n,s,l){const o=this;return Ie(n,v,"gfmFootnoteDefinitionIndent",5);function v(b){const p=o.events[o.events.length-1];return p&&p[1].type==="gfmFootnoteDefinitionIndent"&&p[2].sliceSerialize(p[1],!0).length===4?s(b):l(b)}}function ix(n){let l=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:b,resolveAll:v};return l==null&&(l=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function v(p,a){let u=-1;for(;++u<p.length;)if(p[u][0]==="enter"&&p[u][1].type==="strikethroughSequenceTemporary"&&p[u][1]._close){let h=u;for(;h--;)if(p[h][0]==="exit"&&p[h][1].type==="strikethroughSequenceTemporary"&&p[h][1]._open&&p[u][1].end.offset-p[u][1].start.offset===p[h][1].end.offset-p[h][1].start.offset){p[u][1].type="strikethroughSequence",p[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},p[h][1].start),end:Object.assign({},p[u][1].end)},c={type:"strikethroughText",start:Object.assign({},p[h][1].end),end:Object.assign({},p[u][1].start)},C=[["enter",m,a],["enter",p[h][1],a],["exit",p[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&Zt(C,C.length,0,ha(w,p.slice(h+1,u),a)),Zt(C,C.length,0,[["exit",c,a],["enter",p[u][1],a],["exit",p[u][1],a],["exit",m,a]]),Zt(p,h-1,u-h+3,C),u=h+C.length-2;break}}for(u=-1;++u<p.length;)p[u][1].type==="strikethroughSequenceTemporary"&&(p[u][1].type="data");return p}function b(p,a,u){const h=this.previous,m=this.events;let c=0;return C;function C(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?u(k):(p.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=Dr(h);if(k===126)return c>1?u(k):(p.consume(k),c++,w);if(c<2&&!l)return u(k);const S=p.exit("strikethroughSequenceTemporary"),_=Dr(k);return S._open=!_||_===2&&!!x,S._close=!x||x===2&&!!_,a(k)}}}class rx{constructor(){this.map=[]}add(s,l,o){sx(this,s,l,o)}consume(s){if(this.map.sort(function(b,p){return b[0]-p[0]}),this.map.length===0)return;let l=this.map.length;const o=[];for(;l>0;)l-=1,o.push(s.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),s.length=this.map[l][0];o.push(s.slice()),s.length=0;let v=o.pop();for(;v;){for(const b of v)s.push(b);v=o.pop()}this.map.length=0}}function sx(n,s,l,o){let v=0;if(!(l===0&&o.length===0)){for(;v<n.map.length;){if(n.map[v][0]===s){n.map[v][1]+=l,n.map[v][2].push(...o);return}v+=1}n.map.push([s,l,o])}}function lx(n,s){let l=!1;const o=[];for(;s<n.length;){const v=n[s];if(l){if(v[0]==="enter")v[1].type==="tableContent"&&o.push(n[s+1][1].type==="tableDelimiterMarker"?"left":"none");else if(v[1].type==="tableContent"){if(n[s-1][1].type==="tableDelimiterMarker"){const b=o.length-1;o[b]=o[b]==="left"?"center":"right"}}else if(v[1].type==="tableDelimiterRow")break}else v[0]==="enter"&&v[1].type==="tableDelimiterRow"&&(l=!0);s+=1}return o}function ax(){return{flow:{null:{name:"table",tokenize:ox,resolveAll:ux}}}}function ox(n,s,l){const o=this;let v=0,b=0,p;return a;function a(N){let F=o.events.length-1;for(;F>-1;){const $=o.events[F][1].type;if($==="lineEnding"||$==="linePrefix")F--;else break}const G=F>-1?o.events[F][1].type:null,q=G==="tableHead"||G==="tableRow"?A:u;return q===A&&o.parser.lazy[o.now().line]?l(N):q(N)}function u(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(p=!0,b+=1),m(N)}function m(N){return N===null?l(N):we(N)?b>1?(b=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):l(N):He(N)?Ie(n,m,"whitespace")(N):(b+=1,p&&(p=!1,v+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),p=!0,m):(n.enter("data"),c(N)))}function c(N){return N===null||N===124||et(N)?(n.exit("data"),m(N)):(n.consume(N),N===92?C:c)}function C(N){return N===92||N===124?(n.consume(N),c):c(N)}function w(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?l(N):(n.enter("tableDelimiterRow"),p=!1,He(N)?Ie(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?(p=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):R(N)}function x(N){return He(N)?Ie(n,S,"whitespace")(N):S(N)}function S(N){return N===58?(b+=1,p=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),_):N===45?(b+=1,_(N)):N===null||we(N)?E(N):R(N)}function _(N){return N===45?(n.enter("tableDelimiterFiller"),d(N)):R(N)}function d(N){return N===45?(n.consume(N),d):N===58?(p=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),g):(n.exit("tableDelimiterFiller"),g(N))}function g(N){return He(N)?Ie(n,E,"whitespace")(N):E(N)}function E(N){return N===124?k(N):N===null||we(N)?!p||v!==b?R(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),s(N)):R(N)}function R(N){return l(N)}function A(N){return n.enter("tableRow"),L(N)}function L(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),L):N===null||we(N)?(n.exit("tableRow"),s(N)):He(N)?Ie(n,L,"whitespace")(N):(n.enter("data"),T(N))}function T(N){return N===null||N===124||et(N)?(n.exit("data"),L(N)):(n.consume(N),N===92?B:T)}function B(N){return N===92||N===124?(n.consume(N),T):T(N)}}function ux(n,s){let l=-1,o=!0,v=0,b=[0,0,0,0],p=[0,0,0,0],a=!1,u=0,h,m,c;const C=new rx;for(;++l<n.length;){const w=n[l],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,u!==0&&(M_(C,s,u,h,m),m=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},C.add(l,0,[["enter",h,s]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,c=void 0,b=[0,0,0,0],p=[0,l+1,0,0],a&&(a=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},C.add(l,0,[["enter",m,s]])),v=k.type==="tableDelimiterRow"?2:m?3:1):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(o=!1,p[2]===0&&(b[1]!==0&&(p[0]=p[1],c=na(C,s,b,v,void 0,c),b=[0,0,0,0]),p[2]=l)):k.type==="tableCellDivider"&&(o?o=!1:(b[1]!==0&&(p[0]=p[1],c=na(C,s,b,v,void 0,c)),b=p,p=[b[1],l,0,0])):k.type==="tableHead"?(a=!0,u=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=l,b[1]!==0?(p[0]=p[1],c=na(C,s,b,v,l,c)):p[1]!==0&&(c=na(C,s,p,v,l,c)),v=0):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(p[3]=l)}for(u!==0&&M_(C,s,u,h,m),C.consume(s.events),l=-1;++l<s.events.length;){const w=s.events[l];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=lx(s.events,l))}return n}function na(n,s,l,o,v,b){const p=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";l[0]!==0&&(b.end=Object.assign({},Ar(s.events,l[0])),n.add(l[0],0,[["exit",b,s]]));const u=Ar(s.events,l[1]);if(b={type:p,start:Object.assign({},u),end:Object.assign({},u)},n.add(l[1],0,[["enter",b,s]]),l[2]!==0){const h=Ar(s.events,l[2]),m=Ar(s.events,l[3]),c={type:a,start:Object.assign({},h),end:Object.assign({},m)};if(n.add(l[2],0,[["enter",c,s]]),o!==2){const C=s.events[l[2]],w=s.events[l[3]];if(C[1].end=Object.assign({},w[1].end),C[1].type="chunkText",C[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,x=l[3]-l[2]-1;n.add(k,x,[])}}n.add(l[3]+1,0,[["exit",c,s]])}return v!==void 0&&(b.end=Object.assign({},Ar(s.events,v)),n.add(v,0,[["exit",b,s]]),b=void 0),b}function M_(n,s,l,o,v){const b=[],p=Ar(s.events,l);v&&(v.end=Object.assign({},p),b.push(["exit",v,s])),o.end=Object.assign({},p),b.push(["exit",o,s]),n.add(l+1,0,b)}function Ar(n,s){const l=n[s],o=l[0]==="enter"?"start":"end";return l[1][o]}const cx={name:"tasklistCheck",tokenize:fx};function hx(){return{text:{91:cx}}}function fx(n,s,l){const o=this;return v;function v(u){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?l(u):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),b)}function b(u){return et(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),p):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),p):l(u)}function p(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):l(u)}function a(u){return we(u)?s(u):He(u)?n.check({tokenize:dx},s,l)(u):l(u)}}function dx(n,s,l){return Ie(n,o,"whitespace");function o(v){return v===null?l(v):s(v)}}function px(n){return Q_([Uw(),Xw(),ix(n),ax(),hx()])}const _x={};function mx(n){const s=this,l=n||_x,o=s.data(),v=o.micromarkExtensions||(o.micromarkExtensions=[]),b=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),p=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);v.push(px(l)),b.push(zw()),p.push(Hw(l))}function gx({settings:n,busy:s=!1,promptPreviews:l,testResult:o,onSave:v,onTest:b,onClose:p}){const[a,u]=me.useState(n),[h,m]=me.useState(n.apiKey??"");return me.useEffect(()=>{u(n),m(n.apiKey??"")},[n]),V.jsx("div",{className:"modal-backdrop",children:V.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[V.jsxs("header",{children:[V.jsxs("div",{children:[V.jsx("h2",{children:"Translation Settings"}),V.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),V.jsx("button",{type:"button",onClick:p,children:"Close"})]}),V.jsxs("div",{className:"translation-settings-grid",children:[V.jsxs("label",{children:[V.jsx("span",{children:"Base URL"}),V.jsx("input",{value:a.baseUrl,onChange:c=>u({...a,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),V.jsxs("label",{children:[V.jsx("span",{children:"API key"}),V.jsx("input",{value:h,onChange:c=>m(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),V.jsxs("label",{children:[V.jsx("span",{children:"Model"}),V.jsx("input",{value:a.model,onChange:c=>u({...a,model:c.target.value})})]}),V.jsxs("label",{children:[V.jsx("span",{children:"Target language"}),V.jsx("input",{value:a.targetLanguage,onChange:c=>u({...a,targetLanguage:c.target.value})})]}),V.jsxs("label",{children:[V.jsx("span",{children:"Use context"}),V.jsx("input",{checked:a.contextEnabled,type:"checkbox",onChange:c=>u({...a,contextEnabled:c.target.checked})})]}),V.jsxs("label",{children:[V.jsx("span",{children:"Timeout ms"}),V.jsx("input",{min:3e3,type:"number",value:a.requestTimeoutMs,onChange:c=>u({...a,requestTimeoutMs:Number(c.target.value)})})]}),V.jsxs("label",{children:[V.jsx("span",{children:"Temperature"}),V.jsx("input",{min:0,max:1,step:.1,type:"number",value:a.temperature,onChange:c=>u({...a,temperature:Number(c.target.value)})})]})]}),V.jsxs("section",{className:"translation-prompt-settings",children:[V.jsxs("header",{children:[V.jsxs("div",{children:[V.jsx("h3",{children:"Translation Prompts"}),V.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),V.jsx("button",{type:"button",disabled:s,onClick:()=>u({...a,prompts:void 0}),children:"Reset prompts"})]}),V.jsx("div",{className:"translation-prompt-stack",children:l.map(c=>V.jsxs("label",{children:[V.jsx("span",{children:c.label}),V.jsx("textarea",{value:Sx(a,c),onChange:C=>u({...a,prompts:vx(a.prompts,c.key,C.target.value,c.defaultPrompt)})})]},c.key))})]}),o?V.jsx("div",{className:o.ok?"translation-test-result is-ok":"translation-test-result is-error",children:o.ok?`Connection ok: ${o.model} in ${o.elapsedMs}ms`:o.error}):null,V.jsxs("footer",{children:[V.jsx("button",{type:"button",disabled:s,onClick:b,children:"Test Connection"}),V.jsx("button",{type:"button",disabled:s,onClick:()=>void v({...a,enabled:!0,translateOutput:!0,translateUserInput:!0,inputMode:"review-before-send"},h.trim()),children:"Save"})]})]})})}function vx(n,s,l,o){const v={...n??{}};return l.trim()&&l!==o?v[s]=l:delete v[s],Object.keys(v).length>0?v:void 0}function Sx(n,s){var l;return((l=n.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function yx({active:n=!0,taskSlug:s,role:l,sessionId:o}){const[v,b]=me.useState(null),[p,a]=me.useState([]),[u,h]=me.useState(""),[m,c]=me.useState(!1),[C,w]=me.useState(!1),[k,x]=me.useState(!1),[S,_]=me.useState("ready"),[d,g]=me.useState(""),[E,R]=me.useState(Date.now()),[A,L]=me.useState(!1),[T,B]=me.useState(""),[N,F]=me.useState(!1),[G,q]=me.useState([]),[$,W]=me.useState(),[P,Y]=me.useState(0),ee=me.useRef(n),z=me.useRef(1),M=me.useRef(null);me.useEffect(()=>{ee.current=n},[n]),me.useEffect(()=>{Promise.all([Me.getTranslationSettings(),Me.getTranslationPrompts()]).then(([Z,te])=>{b(Z),q(te)}).catch(Z=>B(Z.message))},[]),me.useEffect(()=>{a([]),B(""),_("ready"),g(""),z.current=1;let Z=!1,te;const oe=()=>{Z||(te=window.setTimeout(Se,ee.current?200:1e3))},Se=async()=>{if(!Z)try{const xe=await Me.pollTranslationSession(o,z.current);if(Z)return;H(xe.events),z.current=xe.nextCursor,_(xe.status),ee.current&&g(Tx(new Date().toISOString()))}catch(xe){Z||B(xe instanceof Error?xe.message:"Translation poll failed.")}finally{oe()}};return Me.startTranslationSession(s,l).then(xe=>{Z||(_(xe.status),z.current=xe.nextCursor,Se())}).catch(xe=>{Z||B(xe instanceof Error?xe.message:"Translation start failed.")}),()=>{Z=!0,te!==void 0&&window.clearTimeout(te)}},[o,s,l,P]),me.useEffect(()=>{var Z;n&&((Z=M.current)==null||Z.scrollIntoView({block:"nearest"}))},[n,p.length]);const O=Cx(p);me.useEffect(()=>{if(!O)return;R(Date.now());const Z=window.setInterval(()=>R(Date.now()),250);return()=>window.clearInterval(Z)},[O]);async function I(Z=!1){if(v){L(!0),B(""),c(!1);try{const te=await Me.translateUserInput(s,l,{text:u,mode:Z?"auto-send":"review-before-send",useContext:v.contextEnabled,send:Z});x(te.contextUsed),te.sent?(h(""),c(!1)):(h(te.englishPreview),c(!0))}catch(te){B(te instanceof Error?te.message:"Translation failed.")}finally{L(!1)}}}function H(Z){if(Z.length===0)return;for(const oe of Z)oe.type==="status"?_(oe.status):oe.type==="error"&&B(oe.message);const te=Z.filter(oe=>oe.type==="entry");te.length>0&&a(oe=>te.reduce((Se,xe)=>kx(Se,xe.entry),oe))}async function ie(){if(u.trim()){L(!0),B("");try{await Me.sendTranslatedInput(s,l,{englishText:u}),h(""),c(!1),x(!1)}catch(Z){B(Z instanceof Error?Z.message:"Failed to send English input.")}finally{L(!1)}}}function pe(Z){Z.key!=="Enter"||Z.shiftKey||Z.nativeEvent.isComposing||(Z.preventDefault(),!A&&u.trim()&&(m?ie():I(C)))}async function de(Z,te){L(!0),B("");try{const oe=await Me.updateTranslationSettings({...Z,...te!==void 0?{apiKey:te}:{}}),Se=await Me.getTranslationPrompts();b(oe),q(Se),F(!1),Y(xe=>xe+1)}catch(oe){B(oe instanceof Error?oe.message:"Failed to save translation settings.")}finally{L(!1)}}async function X(){L(!0),B("");try{W(await Me.testTranslationProvider())}catch(Z){B(Z instanceof Error?Z.message:"Provider test failed.")}finally{L(!1)}}async function U(){a([]),z.current=1,await Me.clearTranslationSession(o).catch(Z=>B(Z.message))}if(!v)return V.jsx("aside",{className:"translation-panel",children:V.jsx("p",{className:"muted",children:"Loading translation settings..."})});const ae=wx(p,S,E);return V.jsxs("aside",{className:"translation-panel",children:[V.jsxs("header",{className:"translation-panel-header",children:[V.jsxs("div",{className:"translation-panel-titlebar",children:[V.jsx("h2",{children:"Translation"}),V.jsxs("div",{className:"translation-panel-actions",children:[V.jsx("button",{"aria-pressed":C,className:`auto-send-toggle${C?" is-active":""}`,type:"button",onClick:()=>w(Z=>!Z),children:C?"✅ Auto-send":"× Auto-send"}),V.jsx("button",{type:"button",onClick:()=>F(!0),children:"Settings"}),V.jsx("button",{type:"button",onClick:()=>void U(),children:"Clear"})]})]}),V.jsxs("div",{className:"translation-status-row",children:[V.jsxs("p",{children:[v.model," · ",ae,k?" · context used":""]}),V.jsx("p",{children:d?`poll ${d}`:"poll -"})]})]}),T?V.jsx("div",{className:"error-banner",children:T}):null,V.jsxs("div",{className:"translation-entry-list",children:[p.length===0?V.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,p.map(Z=>V.jsx(bx,{entry:Z},Z.id)),V.jsx("div",{ref:M})]}),V.jsx("div",{className:"translation-composer",children:V.jsxs("div",{className:"translation-composer-row",children:[V.jsx("textarea",{value:u,onChange:Z=>{h(Z.target.value),Z.target.value.trim()||c(!1)},onKeyDown:pe,placeholder:"输入中文,先翻译成英文工程指令..."}),V.jsx("div",{className:"translation-composer-actions",children:V.jsx("button",{type:"button",disabled:A||!m||!u.trim(),onClick:()=>void ie(),children:"Send English"})})]})}),N?V.jsx(gx,{settings:v,busy:A,promptPreviews:G,testResult:$,onSave:de,onTest:X,onClose:()=>F(!1)}):null]})}function bx({entry:n}){const s=Ex(n),l=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",v=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return V.jsxs("article",{className:v,children:[l?V.jsx("pre",{children:s}):V.jsx("div",{className:"translation-markdown",children:V.jsx(iC,{remarkPlugins:[mx],children:s})}),n.warning?V.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?V.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function Cx(n){const s=n.find(Pm);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function wx(n,s,l){const o=n.find(Pm);if(o)return`translating ${Ax(Math.max(0,l-xx(o)))}`;const v=n.at(-1);return(v==null?void 0:v.status)==="failed"||s==="failed"?"error":s}function Pm(n){return n.status==="queued"||n.status==="translating"}function xx(n){const s=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(s)?s:Date.now()}function Ex(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function kx(n,s){return n.findIndex(o=>o.id===s.id)===-1?[...n,s]:n.map(o=>o.id===s.id?s:o)}function Ax(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const s=n/1e3;if(s<60)return`${s.toFixed(1)}s`;const l=Math.floor(s/60),o=Math.floor(s%60).toString().padStart(2,"0");return`${l}:${o}`}function Tx(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function Dx({role:n,session:s,permissionMode:l,active:o=!0,busy:v,orchestrationMode:b,translationEnabled:p,onPermissionModeChange:a,onOrchestrationModeChange:u,onStart:h,onResume:m,onStop:c,onRestart:C,onTerminalEvent:w}){const k=b==="auto";return V.jsxs("section",{className:"session-console",children:[V.jsxs("div",{className:"session-console-top",children:[V.jsx(V0,{role:n,session:s,permissionMode:l,busy:v,onPermissionModeChange:a,onStart:h,onResume:m,onStop:c,onRestart:C}),V.jsx("div",{className:"session-console-actions",children:V.jsx("button",{"aria-label":`Auto orchestration is ${k?"on":"off"}`,"aria-pressed":k,className:`translation-toggle${k?" is-active":""}`,disabled:v,type:"button",onClick:()=>u(k?"manual":"auto"),children:k?"✅ Auto orchestration":"× Auto orchestration"})})]}),(s==null?void 0:s.status)==="running"?V.jsx(Rx,{active:o,onTerminalEvent:w,role:n,session:s,taskSlug:s.taskSlug,translationEnabled:p}):V.jsxs("div",{className:"terminal-empty",children:[V.jsx("strong",{children:n}),V.jsx("span",{children:s!=null&&s.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function Rx({active:n,onTerminalEvent:s,role:l,session:o,taskSlug:v,translationEnabled:b}){return V.jsxs("div",{className:b?"session-console-body has-translation":"session-console-body",children:[V.jsx("div",{className:"terminal-pane",children:V.jsx(j0,{sessionId:o.id,active:n,onEvent:s},o.id)}),b?V.jsx("div",{className:"translation-pane",children:V.jsx(yx,{active:n,taskSlug:v,role:l,sessionId:o.id},o.id)}):null]})}function Lx(n,s,l){var b;if(!n||l.mode!=="auto")return null;const o=new Map(n.map(p=>[p.id,p])),v=s.filter(p=>{var a;return p.dispatchingAt?((a=o.get(p.id))==null?void 0:a.dispatchingAt)!==p.dispatchingAt:!1});return v.length===0?null:((b=v.sort(Mx)[v.length-1])==null?void 0:b.toRole)??null}function Mx(n,s){const l=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",o=s.dispatchingAt??s.deliveredAt??s.acceptedAt??"";return l!==o?l.localeCompare(o):n.createdAt.localeCompare(s.createdAt)}function Ox({task:n,activeRole:s,onTaskChanged:l,onActiveRoleChange:o,onMessagesChanged:v,onOrchestrationChanged:b,onRoundStateChanged:p,onEventsChanged:a}){const[u,h]=me.useState(null),[m,c]=me.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[C,w]=me.useState(!1),[k,x]=me.useState(""),[S,_]=me.useState([]),[d,g]=me.useState(null),[E,R]=me.useState(!1),A=me.useRef(null),L=me.useCallback((W,P)=>{var z;const Y=((z=A.current)==null?void 0:z.taskSlug)===n.taskSlug?A.current.messages:null,ee=Lx(Y,W,P);A.current={taskSlug:n.taskSlug,messages:W},g(P),v==null||v(W),b==null||b(P),ee&&(o(ee),G(`auto switched to ${ee} before VCM dispatch`))},[o,v,b,n.taskSlug]),T=me.useCallback((W,P,Y,ee)=>{h(W),L(P,Y),p==null||p(ee)},[L,p]),B=me.useCallback(async()=>{const[W,P,Y,ee]=await Promise.all([Me.getTaskStatus(n.taskSlug),Me.listMessages(n.taskSlug),Me.getOrchestrationState(n.taskSlug),Me.getTaskRoundState(n.taskSlug)]);T(W,P,Y,ee)},[T,n.taskSlug]);me.useEffect(()=>{B().catch(W=>x(W.message))},[B]),me.useEffect(()=>{_([]),a==null||a([])},[a,n.taskSlug]),me.useEffect(()=>{c(W=>{let P=!1;const Y={...W};for(const ee of(u==null?void 0:u.sessions)??[])Y[ee.role]!==ee.permissionMode&&(Y[ee.role]=ee.permissionMode,P=!0);return P?Y:W})},[u==null?void 0:u.sessions]),me.useEffect(()=>{const W=window.setInterval(()=>{Promise.all([Me.getTaskStatus(n.taskSlug),Me.listMessages(n.taskSlug),Me.getOrchestrationState(n.taskSlug),Me.getTaskRoundState(n.taskSlug)]).then(([P,Y,ee,z])=>{T(P,Y,ee,z)}).catch(P=>x(P.message))},3e3);return()=>window.clearInterval(W)},[T,n.taskSlug]),me.useEffect(()=>{let W=!1,P=!1;const Y=window.setInterval(()=>{P||(P=!0,Promise.all([Me.listMessages(n.taskSlug),Me.getOrchestrationState(n.taskSlug)]).then(([ee,z])=>{W||L(ee,z)}).catch(ee=>{W||x(ee.message)}).finally(()=>{P=!1}))},200);return()=>{W=!0,window.clearInterval(Y)}},[L,n.taskSlug]);async function N(W){w(!0),x("");try{await W(),await B(),await l()}catch(P){x(P instanceof Error?P.message:"Action failed.")}finally{w(!1)}}async function F(){const W=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(`
88
89
  `):[`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(`
89
- `);if(window.confirm(F)){w(!0),x("");try{await Oe.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),B(`closed ${n.taskSlug}`),await l()}catch(Y){x(Y instanceof Error?Y.message:"Close task failed.")}finally{w(!1)}}}function B(F){m(U=>{const Y=[...U,`${new Date().toLocaleTimeString()} ${F}`];return a==null||a(Y),Y})}function N(F,U){c(Y=>({...Y,[F]:U}))}async function V(F){w(!0),x("");try{const U=await Oe.updateOrchestrationState(n.taskSlug,{mode:F});g(U),b==null||b(U),B(`auto orchestration ${F==="auto"?"enabled":"disabled"}`)}catch(U){x(U instanceof Error?U.message:"Failed to update orchestration mode.")}finally{w(!1)}}return q.jsxs("div",{className:"task-workspace",children:[q.jsxs("header",{className:"workspace-header",children:[q.jsxs("div",{className:"workspace-title-line",children:[q.jsx("span",{className:"eyebrow",children:"Task Workspace"}),q.jsx("h1",{children:n.title||n.taskSlug}),q.jsx("span",{className:"workspace-branch",children:n.branch}),n.worktreePath?q.jsx("span",{className:"workspace-worktree",children:n.worktreePath}):null]}),q.jsx(D0,{activeRole:s,sessions:(u==null?void 0:u.sessions)??[],onSelect:o}),q.jsx("button",{type:"button",onClick:()=>void A(),children:"Refresh"}),q.jsx("button",{className:"danger-button",type:"button",disabled:C,onClick:()=>void T(),children:"Close Task"})]}),k?q.jsx("div",{className:"error-banner",children:k}):null,q.jsx("div",{className:"workspace-grid",children:q.jsx("div",{className:"workspace-main",children:q.jsx("div",{className:"role-console-stack",children:ua.map(F=>{const U=F.name,Y=U===s,$=H_((u==null?void 0:u.sessions)??[],U);return q.jsx("div",{className:Y?"role-console-panel is-active":"role-console-panel","aria-hidden":!Y,children:q.jsx(Tx,{role:U,session:$,permissionMode:_[U],active:Y,busy:C,orchestrationMode:(d==null?void 0:d.mode)??"manual",onPermissionModeChange:G=>N(U,G),onOrchestrationModeChange:G=>void V(G),onStart:()=>void L(async()=>{await Oe.startRoleSession(n.taskSlug,U,{cols:100,rows:28,permissionMode:_[U]}),B(`started ${U} with ${_[U]}`)}),onResume:()=>void L(async()=>{await Oe.resumeRoleSession(n.taskSlug,U,{cols:100,rows:28,permissionMode:_[U]}),B(`resumed ${U} with ${_[U]}`)}),onStop:()=>void L(async()=>{await Oe.stopRoleSession(n.taskSlug,U),B(`stopped ${U}`)}),onRestart:()=>void L(async()=>{await Oe.restartRoleSession(n.taskSlug,U,{cols:100,rows:28,permissionMode:_[U]}),B(`restarted ${U} with ${_[U]}`)}),onTerminalEvent:G=>B(`${F.label}: ${G}`)})},U)})})})})]})}function Ox(){const[n,s]=me.useState(null),[l,o]=me.useState([]),[v,b]=me.useState(null),[p,a]=me.useState(null),[u,h]=me.useState([]),[_,c]=me.useState(null),[C,w]=me.useState(null),[k,x]=me.useState(null),[S,m]=me.useState(null),[d,g]=me.useState("project-manager"),[E,R]=me.useState("system"),[A,L]=me.useState(!0),[T,B]=me.useState(null),[N,V]=me.useState(!1),[F,U]=me.useState(!1),[Y,$]=me.useState(""),G=me.useRef({}),X=me.useMemo(()=>g0(u,_),[u,_]),se=me.useCallback((ee,oe=`manual-${Date.now()}`)=>{B({id:oe,text:ee}),Bx(),window.setTimeout(()=>{B(Se=>(Se==null?void 0:Se.id)===oe?null:Se)},5e3)},[]),z=me.useCallback(ee=>{X!=null&&X.taskSlug&&w({taskSlug:X.taskSlug,messages:ee})},[X==null?void 0:X.taskSlug]),M=me.useCallback(ee=>{X!=null&&X.taskSlug&&x({taskSlug:X.taskSlug,orchestration:ee})},[X==null?void 0:X.taskSlug]),O=me.useCallback(ee=>{X!=null&&X.taskSlug&&m({taskSlug:X.taskSlug,events:ee})},[X==null?void 0:X.taskSlug]),P=me.useCallback(ee=>{if(!(X!=null&&X.taskSlug)||ee.taskSlug!==X.taskSlug||ee.status!=="completed"||!ee.completionId||G.current[ee.taskSlug]===ee.completionId||(G.current[ee.taskSlug]=ee.completionId,!A))return;const Se=ee.activeRole??"role";se(`Round complete: ${Se} finished.`,ee.completionId)},[X==null?void 0:X.taskSlug,A,se]);async function H(){const ee=await Oe.listTasks();return h(ee),c(oe=>{var Se;return oe&&ee.some(xe=>xe.taskSlug===oe)?oe:((Se=ee[0])==null?void 0:Se.taskSlug)??null}),ee}async function ne(){const ee=await Oe.getHarnessStatus();return b(ee),ee}async function de(){const ee=await Oe.getRecentRepositoryPaths();return o(ee),ee}async function pe(ee){const[oe,Se]=await Promise.all([Oe.listMessages(ee),Oe.getOrchestrationState(ee)]);w({taskSlug:ee,messages:oe}),x({taskSlug:ee,orchestration:Se})}me.useEffect(()=>{Promise.all([Oe.getCurrentProject(),Oe.getRecentRepositoryPaths(),Oe.getAppPreferences()]).then(async([ee,oe,Se])=>{s(ee),o(oe),R(Se.themeMode),L(Se.roundCompletionAlerts),ee&&await Promise.all([H(),ne()])}).catch(ee=>$(ee.message))},[]),me.useEffect(()=>{const ee=window.matchMedia("(prefers-color-scheme: dark)"),oe=()=>V(ee.matches);return oe(),ee.addEventListener("change",oe),()=>ee.removeEventListener("change",oe)},[]),me.useEffect(()=>{const ee=E==="system"?N?"dark":"light":E;document.documentElement.dataset.theme=ee,document.documentElement.dataset.themeMode=E},[N,E]);async function K(ee){U(!0),$("");try{await ee()}catch(oe){$(oe instanceof Error?oe.message:"Action failed.")}finally{U(!1)}}const I=C&&C.taskSlug===(X==null?void 0:X.taskSlug)?C.messages:[],ae=k&&k.taskSlug===(X==null?void 0:X.taskSlug)?k.orchestration:null,Z=S&&S.taskSlug===(X==null?void 0:X.taskSlug)?S.events:[];return q.jsxs(m0,{sidebar:q.jsx(E0,{project:n,recentRepositoryPaths:l,tasks:u,activeTaskSlug:(X==null?void 0:X.taskSlug)??null,messages:I,orchestration:ae,events:Z,harnessStatus:v,harnessApplyResult:p,busy:F,onConnect:ee=>K(async()=>{const oe=await Oe.connectProject({repoPath:ee});s(oe),a(null),await Promise.all([H(),ne(),de()])}),onRefreshHarness:()=>K(async()=>{a(null),await ne()}),onApplyHarness:()=>K(async()=>{const ee=await Oe.applyHarness();a(ee),await ne()}),onCreateTask:ee=>K(async()=>{const oe=await Oe.createTask(ee);await H(),c(oe.taskSlug)}),onSelectTask:c,themeMode:E,onThemeModeChange:ee=>{R(ee),K(async()=>{const oe=await Oe.updateAppPreferences({themeMode:ee});R(oe.themeMode),L(oe.roundCompletionAlerts)})},roundCompletionAlerts:A,onRoundCompletionAlertsChange:ee=>{L(ee),K(async()=>{const oe=await Oe.updateAppPreferences({roundCompletionAlerts:ee});R(oe.themeMode),L(oe.roundCompletionAlerts)})},onTryRoundAlert:()=>{se("This is a test round completion alert.")},onMarkAllMessagesDone:ee=>{K(async()=>{const oe=await Oe.markAllMessagesDone(ee);w({taskSlug:ee,messages:oe.messages}),await pe(ee)})}}),children:[Y?q.jsx("div",{className:"error-banner",children:Y}):null,T?q.jsxs("div",{className:"round-notice",role:"status",children:[q.jsx("strong",{children:"Round complete"}),q.jsx("span",{children:T.text})]}):null,n&&X?q.jsx(Mx,{task:X,activeRole:d,onTaskChanged:async()=>{await H()},onActiveRoleChange:g,onMessagesChanged:z,onOrchestrationChanged:M,onRoundStateChanged:P,onEventsChanged:O}):q.jsxs("section",{className:"empty-workspace",children:[q.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),q.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."})]})]})}function Bx(){var s;const n=window.AudioContext??window.webkitAudioContext;if(n)try{const l=new n,o=l.createGain(),v=l.currentTime+.025;o.gain.setValueAtTime(.85,l.currentTime),o.connect(l.destination),O_(l,o,{frequency:587.33,startAt:v,duration:.18,peakGain:.045}),O_(l,o,{frequency:783.99,startAt:v+.11,duration:.28,peakGain:.055}),(s=l.resume)==null||s.call(l).catch(()=>{}),window.setTimeout(()=>{l.close().catch(()=>{})},800)}catch{}}function O_(n,s,l){const o=n.createGain(),v=n.createOscillator(),b=n.createOscillator(),p=l.startAt+l.duration;o.gain.setValueAtTime(1e-4,l.startAt),o.gain.exponentialRampToValueAtTime(l.peakGain,l.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,p),v.type="sine",v.frequency.setValueAtTime(l.frequency,l.startAt),b.type="triangle",b.frequency.setValueAtTime(l.frequency*2.01,l.startAt),v.connect(o),b.connect(o),o.connect(s),v.start(l.startAt),b.start(l.startAt),v.stop(p+.02),b.stop(p+.02)}const qm=document.getElementById("root");if(!qm)throw new Error("Missing #root element.");_0.createRoot(qm).render(q.jsx(me.StrictMode,{children:q.jsx(Ox,{})}));
90
+ `);if(window.confirm(W)){w(!0),x("");try{await Me.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),G(`closed ${n.taskSlug}`),await l()}catch(Y){x(Y instanceof Error?Y.message:"Close task failed.")}finally{w(!1)}}}function G(W){_(P=>{const Y=[...P,`${new Date().toLocaleTimeString()} ${W}`];return a==null||a(Y),Y})}function q(W,P){c(Y=>({...Y,[W]:P}))}async function $(W){w(!0),x("");try{const P=await Me.updateOrchestrationState(n.taskSlug,{mode:W});g(P),b==null||b(P),G(`auto orchestration ${W==="auto"?"enabled":"disabled"}`)}catch(P){x(P instanceof Error?P.message:"Failed to update orchestration mode.")}finally{w(!1)}}return V.jsxs("div",{className:"task-workspace",children:[V.jsxs("header",{className:"workspace-header",children:[V.jsx("div",{className:"workspace-title-line",children:V.jsx("h1",{children:n.title||n.taskSlug})}),V.jsx(R0,{activeRole:s,sessions:(u==null?void 0:u.sessions)??[],onSelect:o}),V.jsxs("div",{className:"workspace-header-actions",children:[V.jsx("button",{"aria-pressed":E,className:`translation-toggle${E?" is-active":""}`,type:"button",onClick:()=>R(W=>!W),children:E?"✅ Translate":"× Translate"}),V.jsx("button",{className:"danger-button",type:"button",disabled:C,onClick:()=>void F(),children:"Close Task"})]})]}),k?V.jsx("div",{className:"error-banner",children:k}):null,V.jsx("div",{className:"workspace-grid",children:V.jsx("div",{className:"workspace-main",children:V.jsx("div",{className:"role-console-stack",children:ua.map(W=>{const P=W.name,Y=P===s,ee=z_((u==null?void 0:u.sessions)??[],P);return V.jsx("div",{className:Y?"role-console-panel is-active":"role-console-panel","aria-hidden":!Y,children:V.jsx(Dx,{role:P,session:ee,permissionMode:m[P],active:Y,busy:C,orchestrationMode:(d==null?void 0:d.mode)??"manual",translationEnabled:E,onPermissionModeChange:z=>q(P,z),onOrchestrationModeChange:z=>void $(z),onStart:()=>void N(async()=>{await Me.startRoleSession(n.taskSlug,P,{cols:100,rows:28,permissionMode:m[P]}),G(`started ${P} with ${m[P]}`)}),onResume:()=>void N(async()=>{await Me.resumeRoleSession(n.taskSlug,P,{cols:100,rows:28,permissionMode:m[P]}),G(`resumed ${P} with ${m[P]}`)}),onStop:()=>void N(async()=>{await Me.stopRoleSession(n.taskSlug,P),G(`stopped ${P}`)}),onRestart:()=>void N(async()=>{await Me.restartRoleSession(n.taskSlug,P,{cols:100,rows:28,permissionMode:m[P]}),G(`restarted ${P} with ${m[P]}`)}),onTerminalEvent:z=>G(`${W.label}: ${z}`)})},P)})})})})]})}function Bx(){const[n,s]=me.useState(null),[l,o]=me.useState([]),[v,b]=me.useState(null),[p,a]=me.useState(null),[u,h]=me.useState([]),[m,c]=me.useState(null),[C,w]=me.useState(null),[k,x]=me.useState(null),[S,_]=me.useState(null),[d,g]=me.useState("project-manager"),[E,R]=me.useState("system"),[A,L]=me.useState(!0),[T,B]=me.useState(null),[N,F]=me.useState(!1),[G,q]=me.useState(!1),[$,W]=me.useState(""),P=me.useRef({}),Y=me.useMemo(()=>m0(u,m),[u,m]),ee=me.useCallback((te,oe=`manual-${Date.now()}`)=>{B({id:oe,text:te}),zx(),window.setTimeout(()=>{B(Se=>(Se==null?void 0:Se.id)===oe?null:Se)},5e3)},[]),z=me.useCallback(te=>{Y!=null&&Y.taskSlug&&w({taskSlug:Y.taskSlug,messages:te})},[Y==null?void 0:Y.taskSlug]),M=me.useCallback(te=>{Y!=null&&Y.taskSlug&&x({taskSlug:Y.taskSlug,orchestration:te})},[Y==null?void 0:Y.taskSlug]),O=me.useCallback(te=>{Y!=null&&Y.taskSlug&&_({taskSlug:Y.taskSlug,events:te})},[Y==null?void 0:Y.taskSlug]),I=me.useCallback(te=>{if(!(Y!=null&&Y.taskSlug)||te.taskSlug!==Y.taskSlug||te.status!=="completed"||!te.completionId||P.current[te.taskSlug]===te.completionId||(P.current[te.taskSlug]=te.completionId,!A))return;const Se=te.activeRole??"role";ee(`Round complete: ${Se} finished.`,te.completionId)},[Y==null?void 0:Y.taskSlug,A,ee]);async function H(){const te=await Me.listTasks();return h(te),c(oe=>{var Se;return oe&&te.some(xe=>xe.taskSlug===oe)?oe:((Se=te[0])==null?void 0:Se.taskSlug)??null}),te}async function ie(){const te=await Me.getHarnessStatus();return b(te),te}async function pe(){const te=await Me.getRecentRepositoryPaths();return o(te),te}async function de(te){const[oe,Se]=await Promise.all([Me.listMessages(te),Me.getOrchestrationState(te)]);w({taskSlug:te,messages:oe}),x({taskSlug:te,orchestration:Se})}me.useEffect(()=>{Promise.all([Me.getCurrentProject(),Me.getRecentRepositoryPaths(),Me.getAppPreferences()]).then(async([te,oe,Se])=>{s(te),o(oe),R(Se.themeMode),L(Se.roundCompletionAlerts),te&&await Promise.all([H(),ie()])}).catch(te=>W(te.message))},[]),me.useEffect(()=>{const te=window.matchMedia("(prefers-color-scheme: dark)"),oe=()=>F(te.matches);return oe(),te.addEventListener("change",oe),()=>te.removeEventListener("change",oe)},[]),me.useEffect(()=>{const te=E==="system"?N?"dark":"light":E;document.documentElement.dataset.theme=te,document.documentElement.dataset.themeMode=E},[N,E]);async function X(te){q(!0),W("");try{await te()}catch(oe){W(oe instanceof Error?oe.message:"Action failed.")}finally{q(!1)}}const U=C&&C.taskSlug===(Y==null?void 0:Y.taskSlug)?C.messages:[],ae=k&&k.taskSlug===(Y==null?void 0:Y.taskSlug)?k.orchestration:null,Z=S&&S.taskSlug===(Y==null?void 0:Y.taskSlug)?S.events:[];return V.jsxs(_0,{sidebar:V.jsx(k0,{project:n,recentRepositoryPaths:l,tasks:u,activeTaskSlug:(Y==null?void 0:Y.taskSlug)??null,messages:U,orchestration:ae,events:Z,harnessStatus:v,harnessApplyResult:p,busy:G,onConnect:te=>X(async()=>{const oe=await Me.connectProject({repoPath:te});s(oe),a(null),await Promise.all([H(),ie(),pe()])}),onRefreshHarness:()=>X(async()=>{a(null),await ie()}),onApplyHarness:()=>X(async()=>{const te=await Me.applyHarness();a(te),await ie()}),onCreateTask:te=>X(async()=>{const oe=await Me.createTask(te);await H(),c(oe.taskSlug)}),onSelectTask:c,themeMode:E,onThemeModeChange:te=>{R(te),X(async()=>{const oe=await Me.updateAppPreferences({themeMode:te});R(oe.themeMode),L(oe.roundCompletionAlerts)})},roundCompletionAlerts:A,onRoundCompletionAlertsChange:te=>{L(te),X(async()=>{const oe=await Me.updateAppPreferences({roundCompletionAlerts:te});R(oe.themeMode),L(oe.roundCompletionAlerts)})},onTryRoundAlert:()=>{ee("This is a test round completion alert.")},onMarkAllMessagesDone:te=>{X(async()=>{const oe=await Me.markAllMessagesDone(te);w({taskSlug:te,messages:oe.messages}),await de(te)})},onDeleteMessageHistory:te=>{X(async()=>{const oe=await Me.deleteMessageHistory(te);w({taskSlug:te,messages:oe.messages}),await de(te)})}}),children:[$?V.jsx("div",{className:"error-banner",children:$}):null,T?V.jsxs("div",{className:"round-notice",role:"status",children:[V.jsx("strong",{children:"Round complete"}),V.jsx("span",{children:T.text})]}):null,n&&Y?V.jsx(Ox,{task:Y,activeRole:d,onTaskChanged:async()=>{await H()},onActiveRoleChange:g,onMessagesChanged:z,onOrchestrationChanged:M,onRoundStateChanged:I,onEventsChanged:O}):V.jsxs("section",{className:"empty-workspace",children:[V.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),V.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."})]})]})}function zx(){var s;const n=window.AudioContext??window.webkitAudioContext;if(n)try{const l=new n,o=l.createGain(),v=l.currentTime+.025;o.gain.setValueAtTime(.85,l.currentTime),o.connect(l.destination),O_(l,o,{frequency:587.33,startAt:v,duration:.18,peakGain:.045}),O_(l,o,{frequency:783.99,startAt:v+.11,duration:.28,peakGain:.055}),(s=l.resume)==null||s.call(l).catch(()=>{}),window.setTimeout(()=>{l.close().catch(()=>{})},800)}catch{}}function O_(n,s,l){const o=n.createGain(),v=n.createOscillator(),b=n.createOscillator(),p=l.startAt+l.duration;o.gain.setValueAtTime(1e-4,l.startAt),o.gain.exponentialRampToValueAtTime(l.peakGain,l.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,p),v.type="sine",v.frequency.setValueAtTime(l.frequency,l.startAt),b.type="triangle",b.frequency.setValueAtTime(l.frequency*2.01,l.startAt),v.connect(o),b.connect(o),o.connect(s),v.start(l.startAt),b.start(l.startAt),v.stop(p+.02),b.stop(p+.02)}const Fm=document.getElementById("root");if(!Fm)throw new Error("Missing #root element.");p0.createRoot(Fm).render(V.jsx(me.StrictMode,{children:V.jsx(Bx,{})}));