vibe-coding-master 0.2.3 → 0.2.5

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,90 +0,0 @@
1
- var d0=Object.defineProperty;var p0=(n,s,l)=>s in n?d0(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var Op=(n,s,l)=>p0(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 _ of b.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&o(_)}).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 F_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mu={exports:{}},xs={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Bp;function _0(){if(Bp)return xs;Bp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,v,b){var _=null;if(b!==void 0&&(_=""+b),v.key!==void 0&&(_=""+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:_,ref:v!==void 0?v:null,props:b}}return xs.Fragment=s,xs.jsx=l,xs.jsxs=l,xs}var zp;function m0(){return zp||(zp=1,Mu.exports=_0()),Mu.exports}var j=m0(),Lu={exports:{}},Re={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Hp;function g0(){if(Hp)return Re;Hp=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"),_=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=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 g(O,I,H){this.props=O,this.context=I,this.refs=S,this.updater=H||k}g.prototype.isReactComponent={},g.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")},g.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function p(){}p.prototype=g.prototype;function m(O,I,H){this.props=O,this.context=I,this.refs=S,this.updater=H||k}var E=m.prototype=new p;E.constructor=m,x(E,g.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 ne=H.ref;return{$$typeof:n,type:O,key:I,ref:ne!==void 0?ne: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 V=/\/+/g;function $(O,I){return typeof O=="object"&&O!==null&&O.key!=null?G(""+O.key):I.toString(36)}function Y(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 q(O,I,H,ne,fe){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var K=!1;if(O===null)K=!0;else switch(he){case"bigint":case"string":case"number":K=!0;break;case"object":switch(O.$$typeof){case n:case s:K=!0;break;case d:return K=O._init,q(K(O._payload),I,H,ne,fe)}}if(K)return fe=fe(O),K=ne===""?"."+$(O,0):ne,R(fe)?(H="",K!=null&&(H=K.replace(V,"$&/")+"/"),q(fe,I,H,"",function(re){return re})):fe!=null&&(F(fe)&&(fe=N(fe,H+(fe.key==null||O&&O.key===fe.key?"":(""+fe.key).replace(V,"$&/")+"/")+K)),I.push(fe)),1;K=0;var P=ne===""?".":ne+":";if(R(O))for(var le=0;le<O.length;le++)ne=O[le],he=P+$(ne,le),K+=q(ne,I,H,he,fe);else if(le=w(O),typeof le=="function")for(O=le.call(O),le=0;!(ne=O.next()).done;)ne=ne.value,he=P+$(ne,le++),K+=q(ne,I,H,he,fe);else if(he==="object"){if(typeof O.then=="function")return q(Y(O),I,H,ne,fe);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 K}function Q(O,I,H){if(O==null)return O;var ne=[],fe=0;return q(O,ne,"","",function(he){return I.call(H,he,fe++)}),ne}function J(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:Q,forEach:function(O,I,H){Q(O,function(){I.apply(this,arguments)},H)},count:function(O){var I=0;return Q(O,function(){I++}),I},toArray:function(O){return Q(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 Re.Activity=c,Re.Children=M,Re.Component=g,Re.Fragment=l,Re.Profiler=v,Re.PureComponent=m,Re.StrictMode=o,Re.Suspense=u,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Re.__COMPILER_RUNTIME={__proto__:null,c:function(O){return L.H.useMemoCache(O)}},Re.cache=function(O){return function(){return O.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(O,I,H){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ne=x({},O.props),fe=O.key;if(I!=null)for(he in I.key!==void 0&&(fe=""+I.key),I)!T.call(I,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&I.ref===void 0||(ne[he]=I[he]);var he=arguments.length-2;if(he===1)ne.children=H;else if(1<he){for(var K=Array(he),P=0;P<he;P++)K[P]=arguments[P+2];ne.children=K}return B(O.type,fe,ne)},Re.createContext=function(O){return O={$$typeof:_,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:b,_context:O},O},Re.createElement=function(O,I,H){var ne,fe={},he=null;if(I!=null)for(ne in I.key!==void 0&&(he=""+I.key),I)T.call(I,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(fe[ne]=I[ne]);var K=arguments.length-2;if(K===1)fe.children=H;else if(1<K){for(var P=Array(K),le=0;le<K;le++)P[le]=arguments[le+2];fe.children=P}if(O&&O.defaultProps)for(ne in K=O.defaultProps,K)fe[ne]===void 0&&(fe[ne]=K[ne]);return B(O,he,fe)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(O){return{$$typeof:a,render:O}},Re.isValidElement=F,Re.lazy=function(O){return{$$typeof:d,_payload:{_status:-1,_result:O},_init:J}},Re.memo=function(O,I){return{$$typeof:h,type:O,compare:I===void 0?null:I}},Re.startTransition=function(O){var I=L.T,H={};L.T=H;try{var ne=O(),fe=L.S;fe!==null&&fe(H,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(A,z)}catch(he){z(he)}finally{I!==null&&H.types!==null&&(I.types=H.types),L.T=I}},Re.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Re.use=function(O){return L.H.use(O)},Re.useActionState=function(O,I,H){return L.H.useActionState(O,I,H)},Re.useCallback=function(O,I){return L.H.useCallback(O,I)},Re.useContext=function(O){return L.H.useContext(O)},Re.useDebugValue=function(){},Re.useDeferredValue=function(O,I){return L.H.useDeferredValue(O,I)},Re.useEffect=function(O,I){return L.H.useEffect(O,I)},Re.useEffectEvent=function(O){return L.H.useEffectEvent(O)},Re.useId=function(){return L.H.useId()},Re.useImperativeHandle=function(O,I,H){return L.H.useImperativeHandle(O,I,H)},Re.useInsertionEffect=function(O,I){return L.H.useInsertionEffect(O,I)},Re.useLayoutEffect=function(O,I){return L.H.useLayoutEffect(O,I)},Re.useMemo=function(O,I){return L.H.useMemo(O,I)},Re.useOptimistic=function(O,I){return L.H.useOptimistic(O,I)},Re.useReducer=function(O,I,H){return L.H.useReducer(O,I,H)},Re.useRef=function(O){return L.H.useRef(O)},Re.useState=function(O){return L.H.useState(O)},Re.useSyncExternalStore=function(O,I,H){return L.H.useSyncExternalStore(O,I,H)},Re.useTransition=function(){return L.H.useTransition()},Re.version="19.2.6",Re}var Np;function _c(){return Np||(Np=1,Lu.exports=g0()),Lu.exports}var de=_c(),Ou={exports:{}},Es={},Bu={exports:{}},zu={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var jp;function v0(){return jp||(jp=1,(function(n){function s(q,Q){var J=q.length;q.push(Q);e:for(;0<J;){var z=J-1>>>1,M=q[z];if(0<v(M,Q))q[z]=Q,q[J]=M,J=z;else break e}}function l(q){return q.length===0?null:q[0]}function o(q){if(q.length===0)return null;var Q=q[0],J=q.pop();if(J!==Q){q[0]=J;e:for(var z=0,M=q.length,O=M>>>1;z<O;){var I=2*(z+1)-1,H=q[I],ne=I+1,fe=q[ne];if(0>v(H,J))ne<M&&0>v(fe,H)?(q[z]=fe,q[ne]=J,z=ne):(q[z]=H,q[I]=J,z=I);else if(ne<M&&0>v(fe,J))q[z]=fe,q[ne]=J,z=ne;else break e}}return Q}function v(q,Q){var J=q.sortIndex-Q.sortIndex;return J!==0?J:q.id-Q.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 _=Date,a=_.now();n.unstable_now=function(){return _.now()-a}}var u=[],h=[],d=1,c=null,C=3,w=!1,k=!1,x=!1,S=!1,g=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;function E(q){for(var Q=l(h);Q!==null;){if(Q.callback===null)o(h);else if(Q.startTime<=q)o(h),Q.sortIndex=Q.expirationTime,s(u,Q);else break;Q=l(h)}}function R(q){if(x=!1,E(q),!k)if(l(u)!==null)k=!0,A||(A=!0,G());else{var Q=l(h);Q!==null&&Y(R,Q.startTime-q)}}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 q=n.unstable_now();B=q;var Q=!0;try{e:{k=!1,x&&(x=!1,p(L),L=-1),w=!0;var J=C;try{t:{for(E(q),c=l(u);c!==null&&!(c.expirationTime>q&&N());){var z=c.callback;if(typeof z=="function"){c.callback=null,C=c.priorityLevel;var M=z(c.expirationTime<=q);if(q=n.unstable_now(),typeof M=="function"){c.callback=M,E(q),Q=!0;break t}c===l(u)&&o(u),E(q)}else o(u);c=l(u)}if(c!==null)Q=!0;else{var O=l(h);O!==null&&Y(R,O.startTime-q),Q=!1}}break e}finally{c=null,C=J,w=!1}Q=void 0}}finally{Q?G():A=!1}}}var G;if(typeof m=="function")G=function(){m(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,$=V.port2;V.port1.onmessage=F,G=function(){$.postMessage(null)}}else G=function(){g(F,0)};function Y(q,Q){L=g(function(){q(n.unstable_now())},Q)}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(q){q.callback=null},n.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<q?Math.floor(1e3/q):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_next=function(q){switch(C){case 1:case 2:case 3:var Q=3;break;default:Q=C}var J=C;C=Q;try{return q()}finally{C=J}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(q,Q){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var J=C;C=q;try{return Q()}finally{C=J}},n.unstable_scheduleCallback=function(q,Q,J){var z=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?z+J:z):J=z,q){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=J+M,q={id:d++,callback:Q,priorityLevel:q,startTime:J,expirationTime:M,sortIndex:-1},J>z?(q.sortIndex=J,s(h,q),l(u)===null&&q===l(h)&&(x?(p(L),L=-1):x=!0,Y(R,J-z))):(q.sortIndex=M,s(u,q),k||w||(k=!0,A||(A=!0,G()))),q},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(q){var Q=C;return function(){var J=C;C=Q;try{return q.apply(this,arguments)}finally{C=J}}}})(zu)),zu}var Ip;function S0(){return Ip||(Ip=1,Bu.exports=v0()),Bu.exports}var Hu={exports:{}},Ot={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Up;function y0(){if(Up)return Ot;Up=1;var n=_c();function s(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+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,d){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:d}}var _=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 Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ot.createPortal=function(u,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(s(299));return b(u,h,null,d)},Ot.flushSync=function(u){var h=_.T,d=o.p;try{if(_.T=null,o.p=2,u)return u()}finally{_.T=h,o.p=d,o.d.f()}},Ot.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))},Ot.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Ot.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var d=h.as,c=a(d,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:C,fetchPriority:w}):d==="script"&&o.d.X(u,{crossOrigin:c,integrity:C,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ot.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=a(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(u)},Ot.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,c=a(d,h.crossOrigin);o.d.L(u,d,{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})}},Ot.preloadModule=function(u,h){if(typeof u=="string")if(h){var d=a(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(u)},Ot.requestFormReset=function(u){o.d.r(u)},Ot.unstable_batchedUpdates=function(u,h){return u(h)},Ot.useFormState=function(u,h,d){return _.H.useFormState(u,h,d)},Ot.useFormStatus=function(){return _.H.useHostTransitionStatus()},Ot.version="19.2.6",Ot}var Pp;function b0(){if(Pp)return Hu.exports;Pp=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(),Hu.exports=y0(),Hu.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var Fp;function C0(){if(Fp)return Es;Fp=1;var n=S0(),s=_c(),l=b0();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 _(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,U=f.child;U;){if(U===i){D=!0,i=f,r=y;break}if(U===r){D=!0,r=f,i=y;break}U=U.sibling}if(!D){for(U=y.child;U;){if(U===i){D=!0,i=y,r=f;break}if(U===r){D=!0,r=y,i=f;break}U=U.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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var 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"),g=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=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 V=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case g: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 m:return e.displayName||"Context";case p: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 Y=Array.isArray,q=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={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 ne=O(null),fe=O(null),he=O(null),K=O(null);function P(e,t){switch(H(he,t),H(fe,e),H(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?np(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=np(t),e=ip(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ne),H(ne,e)}function le(){I(ne),I(fe),I(he)}function re(e){e.memoizedState!==null&&H(K,e);var t=ne.current,i=ip(t,e.type);t!==i&&(H(fe,e),H(ne,i))}function Se(e){fe.current===e&&(I(ne),I(fe)),K.current===e&&(I(K),ys._currentValue=J)}var ge,Te;function Be(e){if(ge===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||"",Te=-1<i.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ge+e+Te}var _e=!1;function Me(e,t){if(!e||_e)return"";_e=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(se){var ie=se}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(se){ie=se}e.call(ce.prototype)}}else{try{throw Error()}catch(se){ie=se}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(se){if(se&&ie&&typeof se.stack=="string")return[se.stack,ie.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],U=y[1];if(D&&U){var W=D.split(`
44
- `),te=U.split(`
45
- `);for(f=r=0;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;for(;f<te.length&&!te[f].includes("DetermineComponentFrameRoot");)f++;if(r===W.length||f===te.length)for(r=W.length-1,f=te.length-1;1<=r&&0<=f&&W[r]!==te[f];)f--;for(;1<=r&&0<=f;r--,f--)if(W[r]!==te[f]){if(r!==1||f!==1)do if(r--,f--,0>f||W[r]!==te[f]){var oe=`
46
- `+W[r].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=r&&0<=f);break}}}finally{_e=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Be(i):""}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return Be(e.type);case 16:return Be("Lazy");case 13:return e.child!==t&&t!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Be("Activity");default:return""}}function St(e){try{var t="",i=null;do t+=ye(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
47
- Error generating stack: `+r.message+`
48
- `+r.stack}}var $e=Object.prototype.hasOwnProperty,Mt=n.unstable_scheduleCallback,Ht=n.unstable_cancelCallback,me=n.unstable_shouldYield,Ae=n.unstable_requestPaint,Xe=n.unstable_now,Lt=n.unstable_getCurrentPriorityLevel,ae=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,we=n.unstable_NormalPriority,Le=n.unstable_LowPriority,Ne=n.unstable_IdlePriority,yt=n.log,Ye=n.unstable_setDisableYieldValue,Et=null,bt=null;function It(e){if(typeof yt=="function"&&Ye(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Et,e)}catch{}}var it=Math.clz32?Math.clz32:Jm,Yn=Math.log,mn=Math.LN2;function Jm(e){return e>>>=0,e===0?32:31-(Yn(e)/mn|0)|0}var js=256,Is=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 Ps(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 U=r&134217727;return U!==0?(r=U&~y,r!==0?f=Si(r):(D&=U,D!==0?f=Si(D):i||(i=U&~e,i!==0&&(f=Si(i))))):(U=r&~y,U!==0?f=Si(U):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 Or(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function eg(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 Hc(){var e=Us;return Us<<=1,(Us&62914560)===0&&(Us=4194304),e}function va(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Br(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tg(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 U=e.entanglements,W=e.expirationTimes,te=e.hiddenUpdates;for(i=D&~i;0<i;){var oe=31-it(i),ce=1<<oe;U[oe]=0,W[oe]=-1;var ie=te[oe];if(ie!==null)for(te[oe]=null,oe=0;oe<ie.length;oe++){var se=ie[oe];se!==null&&(se.lane&=-536870913)}i&=~ce}r!==0&&Nc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(D&~t))}function Nc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-it(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function jc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-it(i),f=1<<r;f&t|e[r]&t&&(e[r]|=t),i&=~f}}function Ic(e,t){var i=t&-t;return i=(i&42)!==0?1:Sa(i),(i&(e.suspendedLanes|t))!==0?0:i}function Sa(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 ya(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Uc(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:kp(e.type))}function Pc(e,t){var i=Q.p;try{return Q.p=e,t()}finally{Q.p=i}}var Wn=Math.random().toString(36).slice(2),kt="__reactFiber$"+Wn,Ut="__reactProps$"+Wn,Ui="__reactContainer$"+Wn,ba="__reactEvents$"+Wn,ng="__reactListeners$"+Wn,ig="__reactHandles$"+Wn,Fc="__reactResources$"+Wn,zr="__reactMarker$"+Wn;function Ca(e){delete e[kt],delete e[Ut],delete e[ba],delete e[ng],delete e[ig]}function Pi(e){var t=e[kt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ui]||i[kt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=cp(e);e!==null;){if(i=e[kt])return i;e=cp(e)}return t}e=i,i=e.parentNode}return null}function Fi(e){if(e=e[kt]||e[Ui]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Hr(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[Fc];return t||(t=e[Fc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function wt(e){e[zr]=!0}var qc=new Set,Vc={};function yi(e,t){Vi(e,t),Vi(e+"Capture",t)}function Vi(e,t){for(Vc[e]=t,e=0;e<t.length;e++)qc.add(t[e])}var rg=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]*$"),Gc={},Yc={};function sg(e){return $e.call(Yc,e)?!0:$e.call(Gc,e)?!1:rg.test(e)?Yc[e]=!0:(Gc[e]=!0,!1)}function Fs(e,t,i){if(sg(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 qs(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 An(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 sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lg(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 wa(e){if(!e._valueTracker){var t=Wc(e)?"checked":"value";e._valueTracker=lg(e,t,""+e[t])}}function Kc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=Wc(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function Vs(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 ag=/[\n"\\]/g;function ln(e){return e.replace(ag,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xa(e,t,i,r,f,y,D,U){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=""+sn(t)):e.value!==""+sn(t)&&(e.value=""+sn(t)):D!=="submit"&&D!=="reset"||e.removeAttribute("value"),t!=null?Ea(e,D,sn(t)):i!=null?Ea(e,D,sn(i)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+sn(U):e.removeAttribute("name")}function $c(e,t,i,r,f,y,D,U){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)){wa(e);return}i=i!=null?""+sn(i):"",t=t!=null?""+sn(t):i,U||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=U?e.checked:!!r,e.defaultChecked=!!r,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(e.name=D),wa(e)}function Ea(e,t,i){t==="number"&&Vs(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=""+sn(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 Xc(e,t,i){if(t!=null&&(t=""+sn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+sn(i):""}function Qc(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(o(92));if(Y(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=sn(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),wa(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 og=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 Zc(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||og.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Jc(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&&Zc(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&Zc(e,y,t[y])}function ka(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 ug=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"]]),cg=/^[\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 Gs(e){return cg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Tn(){}var Aa=null;function Ta(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 eh(e){var t=Fi(e);if(t&&(e=t.stateNode)){var i=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(xa(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="'+ln(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var f=r[Ut]||null;if(!f)throw Error(o(90));xa(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&&Kc(r)}break e;case"textarea":Xc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Gi(e,!!i.multiple,t,!1)}}}var Da=!1;function th(e,t,i){if(Da)return e(t,i);Da=!0;try{var r=e(t);return r}finally{if(Da=!1,(Wi!==null||Ki!==null)&&(Ll(),Wi&&(t=Wi,e=Ki,Ki=Wi=null,eh(t),e)))for(t=0;t<e.length;t++)eh(e[t])}}function Nr(e,t){var i=e.stateNode;if(i===null)return null;var r=i[Ut]||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 Dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ra=!1;if(Dn)try{var jr={};Object.defineProperty(jr,"passive",{get:function(){Ra=!0}}),window.addEventListener("test",jr,jr),window.removeEventListener("test",jr,jr)}catch{Ra=!1}var Kn=null,Ma=null,Ys=null;function nh(){if(Ys)return Ys;var e,t=Ma,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 Ys=f.slice(e,1<r?1-r:void 0)}function Ws(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 Ks(){return!0}function ih(){return!1}function Pt(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 U in e)e.hasOwnProperty(U)&&(i=e[U],this[U]=i?i(y):y[U]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ks:ih,this.isPropagationStopped=ih,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=Ks)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ks)},persist:function(){},isPersistent:Ks}),t}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$s=Pt(bi),Ir=c({},bi,{view:0,detail:0}),hg=Pt(Ir),La,Oa,Ur,Xs=c({},Ir,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:za,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ur&&(Ur&&e.type==="mousemove"?(La=e.screenX-Ur.screenX,Oa=e.screenY-Ur.screenY):Oa=La=0,Ur=e),La)},movementY:function(e){return"movementY"in e?e.movementY:Oa}}),rh=Pt(Xs),fg=c({},Xs,{dataTransfer:0}),dg=Pt(fg),pg=c({},Ir,{relatedTarget:0}),Ba=Pt(pg),_g=c({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),mg=Pt(_g),gg=c({},bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vg=Pt(gg),Sg=c({},bi,{data:0}),sh=Pt(Sg),yg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bg={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"},Cg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cg[e])?!!t[e]:!1}function za(){return wg}var xg=c({},Ir,{key:function(e){if(e.key){var t=yg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ws(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:za,charCode:function(e){return e.type==="keypress"?Ws(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ws(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Eg=Pt(xg),kg=c({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lh=Pt(kg),Ag=c({},Ir,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:za}),Tg=Pt(Ag),Dg=c({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rg=Pt(Dg),Mg=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}),Lg=Pt(Mg),Og=c({},bi,{newState:0,oldState:0}),Bg=Pt(Og),zg=[9,13,27,32],Ha=Dn&&"CompositionEvent"in window,Pr=null;Dn&&"documentMode"in document&&(Pr=document.documentMode);var Hg=Dn&&"TextEvent"in window&&!Pr,ah=Dn&&(!Ha||Pr&&8<Pr&&11>=Pr),oh=" ",uh=!1;function ch(e,t){switch(e){case"keyup":return zg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $i=!1;function Ng(e,t){switch(e){case"compositionend":return hh(t);case"keypress":return t.which!==32?null:(uh=!0,oh);case"textInput":return e=t.data,e===oh&&uh?null:e;default:return null}}function jg(e,t){if($i)return e==="compositionend"||!Ha&&ch(e,t)?(e=nh(),Ys=Ma=Kn=null,$i=!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 ah&&t.locale!=="ko"?null:t.data;default:return null}}var Ig={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 fh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ig[e.type]:t==="textarea"}function dh(e,t,i,r){Wi?Ki?Ki.push(r):Ki=[r]:Wi=r,t=Il(t,"onChange"),0<t.length&&(i=new $s("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var Fr=null,qr=null;function Ug(e){Xd(e,0)}function Qs(e){var t=Hr(e);if(Kc(t))return e}function ph(e,t){if(e==="change")return t}var _h=!1;if(Dn){var Na;if(Dn){var ja="oninput"in document;if(!ja){var mh=document.createElement("div");mh.setAttribute("oninput","return;"),ja=typeof mh.oninput=="function"}Na=ja}else Na=!1;_h=Na&&(!document.documentMode||9<document.documentMode)}function gh(){Fr&&(Fr.detachEvent("onpropertychange",vh),qr=Fr=null)}function vh(e){if(e.propertyName==="value"&&Qs(qr)){var t=[];dh(t,qr,e,Ta(e)),th(Ug,t)}}function Pg(e,t,i){e==="focusin"?(gh(),Fr=t,qr=i,Fr.attachEvent("onpropertychange",vh)):e==="focusout"&&gh()}function Fg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qs(qr)}function qg(e,t){if(e==="click")return Qs(t)}function Vg(e,t){if(e==="input"||e==="change")return Qs(t)}function Gg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:Gg;function Vr(e,t){if($t(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(!$e.call(t,f)||!$t(e[f],t[f]))return!1}return!0}function Sh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yh(e,t){var i=Sh(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=Sh(i)}}function bh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ch(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vs(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=Vs(e.document)}return t}function Ia(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 Yg=Dn&&"documentMode"in document&&11>=document.documentMode,Xi=null,Ua=null,Gr=null,Pa=!1;function wh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Pa||Xi==null||Xi!==Vs(r)||(r=Xi,"selectionStart"in r&&Ia(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}),Gr&&Vr(Gr,r)||(Gr=r,r=Il(Ua,"onSelect"),0<r.length&&(t=new $s("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=Xi)))}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")},Fa={},xh={};Dn&&(xh=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(Fa[e])return Fa[e];if(!Qi[e])return e;var t=Qi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in xh)return Fa[e]=t[i];return e}var Eh=wi("animationend"),kh=wi("animationiteration"),Ah=wi("animationstart"),Wg=wi("transitionrun"),Kg=wi("transitionstart"),$g=wi("transitioncancel"),Th=wi("transitionend"),Dh=new Map,qa="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(" ");qa.push("scrollEnd");function gn(e,t){Dh.set(e,t),yi(t,[e])}var Zs=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)},an=[],Zi=0,Va=0;function Js(){for(var e=Zi,t=Va=Zi=0;t<e;){var i=an[t];an[t++]=null;var r=an[t];an[t++]=null;var f=an[t];an[t++]=null;var y=an[t];if(an[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&&Rh(i,f,y)}}function el(e,t,i,r){an[Zi++]=e,an[Zi++]=t,an[Zi++]=i,an[Zi++]=r,Va|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ga(e,t,i,r){return el(e,t,i,r),tl(e)}function xi(e,t){return el(e,null,null,t),tl(e)}function Rh(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-it(i),e=y.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=i|536870912),y):null}function tl(e){if(50<ds)throw ds=0,tu=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 Xg(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 Xt(e,t,i,r){return new Xg(e,t,i,r)}function Ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Rn(e,t){var i=e.alternate;return i===null?(i=Xt(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 Mh(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 nl(e,t,i,r,f,y){var D=0;if(r=e,typeof e=="function")Ya(e)&&(D=1);else if(typeof e=="string")D=t0(e,i,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=Xt(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 g:return e=Xt(12,i,t,f|2),e.elementType=g,e.lanes=y,e;case R:return e=Xt(13,i,t,f),e.elementType=R,e.lanes=y,e;case A:return e=Xt(19,i,t,f),e.elementType=A,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case m:D=10;break e;case p: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=Xt(D,i,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function Ei(e,t,i,r){return e=Xt(7,e,r,t),e.lanes=i,e}function Wa(e,t,i){return e=Xt(6,e,null,t),e.lanes=i,e}function Lh(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function Ka(e,t,i){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oh=new WeakMap;function on(e,t){if(typeof e=="object"&&e!==null){var i=Oh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:St(t)},Oh.set(e,t),t)}return{value:e,source:t,stack:St(t)}}var er=[],tr=0,il=null,Yr=0,un=[],cn=0,$n=null,bn=1,Cn="";function Mn(e,t){er[tr++]=Yr,er[tr++]=il,il=e,Yr=t}function Bh(e,t,i){un[cn++]=bn,un[cn++]=Cn,un[cn++]=$n,$n=e;var r=bn;e=Cn;var f=32-it(r)-1;r&=~(1<<f),i+=1;var y=32-it(t)+f;if(30<y){var D=f-f%5;y=(r&(1<<D)-1).toString(32),r>>=D,f-=D,bn=1<<32-it(t)+f|i<<f|r,Cn=y+e}else bn=1<<y|i<<f|r,Cn=e}function $a(e){e.return!==null&&(Mn(e,1),Bh(e,1,0))}function Xa(e){for(;e===il;)il=er[--tr],er[tr]=null,Yr=er[--tr],er[tr]=null;for(;e===$n;)$n=un[--cn],un[cn]=null,Cn=un[--cn],un[cn]=null,bn=un[--cn],un[cn]=null}function zh(e,t){un[cn++]=bn,un[cn++]=Cn,un[cn++]=$n,bn=t.id,Cn=t.overflow,$n=e}var At=null,at=null,Ve=!1,Xn=null,hn=!1,Qa=Error(o(519));function Qn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wr(on(t,e)),Qa}function Hh(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[kt]=e,t[Ut]=r,i){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(i=0;i<_s.length;i++)Ie(_s[i],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),$c(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),Qc(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||ep(t.textContent,i)?(r.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),r.onScroll!=null&&Ie("scroll",t),r.onScrollEnd!=null&&Ie("scrollend",t),r.onClick!=null&&(t.onclick=Tn),t=!0):t=!1,t||Qn(e,!0)}function Nh(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:At=At.return}}function nr(e){if(e!==At)return!1;if(!Ve)return Nh(e),Ve=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||mu(e.type,e.memoizedProps)),i=!i),i&&at&&Qn(e),Nh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=up(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=up(e)}else t===27?(t=at,hi(e.type)?(e=bu,bu=null,at=e):at=t):at=At?dn(e.stateNode.nextSibling):null;return!0}function ki(){at=At=null,Ve=!1}function Za(){var e=Xn;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Xn=null),e}function Wr(e){Xn===null?Xn=[e]:Xn.push(e)}var Ja=O(null),Ai=null,Ln=null;function Zn(e,t,i){H(Ja,t._currentValue),t._currentValue=i}function On(e){e._currentValue=Ja.current,I(Ja)}function eo(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 to(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 U=y;y=f;for(var W=0;W<t.length;W++)if(U.context===t[W]){y.lanes|=i,U=y.alternate,U!==null&&(U.lanes|=i),eo(y.return,i,e),r||(D=null);break e}y=U.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),eo(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 U=f.type;$t(f.pendingProps.value,D.value)||(e!==null?e.push(U):e=[U])}}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(ys):e=[ys])}f=f.return}e!==null&&to(t,e,i,r),t.flags|=262144}function rl(e){for(e=e.firstContext;e!==null;){if(!$t(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 Tt(e){return jh(Ai,e)}function sl(e,t){return Ai===null&&Ti(e),jh(e,t)}function jh(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 Qg=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()})}},Zg=n.unstable_scheduleCallback,Jg=n.unstable_NormalPriority,pt={$$typeof:m,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function no(){return{controller:new Qg,data:new Map,refCount:0}}function Kr(e){e.refCount--,e.refCount===0&&Zg(Jg,function(){e.controller.abort()})}var $r=null,io=0,rr=0,sr=null;function ev(e,t){if($r===null){var i=$r=[];io=0,rr=au(),sr={status:"pending",value:void 0,then:function(r){i.push(r)}}}return io++,t.then(Ih,Ih),t}function Ih(){if(--io===0&&$r!==null){sr!==null&&(sr.status="fulfilled");var e=$r;$r=null,rr=0,sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function tv(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 Uh=q.S;q.S=function(e,t){xd=Xe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ev(e,t),Uh!==null&&Uh(e,t)};var Di=O(null);function ro(){var e=Di.current;return e!==null?e:rt.pooledCache}function ll(e,t){t===null?H(Di,Di.current):H(Di,t.pool)}function Ph(){var e=ro();return e===null?null:{parent:pt._currentValue,pool:e}}var lr=Error(o(460)),so=Error(o(474)),al=Error(o(542)),ol={then:function(){}};function Fh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Tn,Tn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gh(e),e;default:if(typeof t.status=="string")t.then(Tn,Tn);else{if(e=rt,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,Gh(e),e}throw Mi=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"?(Mi=i,lr):i}}var Mi=null;function Vh(){if(Mi===null)throw Error(o(459));var e=Mi;return Mi=null,e}function Gh(e){if(e===lr||e===al)throw Error(o(483))}var ar=null,Xr=0;function ul(e){var t=Xr;return Xr+=1,ar===null&&(ar=[]),qh(ar,e,t)}function Qr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function cl(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 Yh(e){function t(Z,X){if(e){var ee=Z.deletions;ee===null?(Z.deletions=[X],Z.flags|=16):ee.push(X)}}function i(Z,X){if(!e)return null;for(;X!==null;)t(Z,X),X=X.sibling;return null}function r(Z){for(var X=new Map;Z!==null;)Z.key!==null?X.set(Z.key,Z):X.set(Z.index,Z),Z=Z.sibling;return X}function f(Z,X){return Z=Rn(Z,X),Z.index=0,Z.sibling=null,Z}function y(Z,X,ee){return Z.index=ee,e?(ee=Z.alternate,ee!==null?(ee=ee.index,ee<X?(Z.flags|=67108866,X):ee):(Z.flags|=67108866,X)):(Z.flags|=1048576,X)}function D(Z){return e&&Z.alternate===null&&(Z.flags|=67108866),Z}function U(Z,X,ee,ue){return X===null||X.tag!==6?(X=Wa(ee,Z.mode,ue),X.return=Z,X):(X=f(X,ee),X.return=Z,X)}function W(Z,X,ee,ue){var xe=ee.type;return xe===x?oe(Z,X,ee.props.children,ue,ee.key):X!==null&&(X.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===T&&Ri(xe)===X.type)?(X=f(X,ee.props),Qr(X,ee),X.return=Z,X):(X=nl(ee.type,ee.key,ee.props,null,Z.mode,ue),Qr(X,ee),X.return=Z,X)}function te(Z,X,ee,ue){return X===null||X.tag!==4||X.stateNode.containerInfo!==ee.containerInfo||X.stateNode.implementation!==ee.implementation?(X=Ka(ee,Z.mode,ue),X.return=Z,X):(X=f(X,ee.children||[]),X.return=Z,X)}function oe(Z,X,ee,ue,xe){return X===null||X.tag!==7?(X=Ei(ee,Z.mode,ue,xe),X.return=Z,X):(X=f(X,ee),X.return=Z,X)}function ce(Z,X,ee){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Wa(""+X,Z.mode,ee),X.return=Z,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case w:return ee=nl(X.type,X.key,X.props,null,Z.mode,ee),Qr(ee,X),ee.return=Z,ee;case k:return X=Ka(X,Z.mode,ee),X.return=Z,X;case T:return X=Ri(X),ce(Z,X,ee)}if(Y(X)||G(X))return X=Ei(X,Z.mode,ee,null),X.return=Z,X;if(typeof X.then=="function")return ce(Z,ul(X),ee);if(X.$$typeof===m)return ce(Z,sl(Z,X),ee);cl(Z,X)}return null}function ie(Z,X,ee,ue){var xe=X!==null?X.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return xe!==null?null:U(Z,X,""+ee,ue);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:return ee.key===xe?W(Z,X,ee,ue):null;case k:return ee.key===xe?te(Z,X,ee,ue):null;case T:return ee=Ri(ee),ie(Z,X,ee,ue)}if(Y(ee)||G(ee))return xe!==null?null:oe(Z,X,ee,ue,null);if(typeof ee.then=="function")return ie(Z,X,ul(ee),ue);if(ee.$$typeof===m)return ie(Z,X,sl(Z,ee),ue);cl(Z,ee)}return null}function se(Z,X,ee,ue,xe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Z=Z.get(ee)||null,U(X,Z,""+ue,xe);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case w:return Z=Z.get(ue.key===null?ee:ue.key)||null,W(X,Z,ue,xe);case k:return Z=Z.get(ue.key===null?ee:ue.key)||null,te(X,Z,ue,xe);case T:return ue=Ri(ue),se(Z,X,ee,ue,xe)}if(Y(ue)||G(ue))return Z=Z.get(ee)||null,oe(X,Z,ue,xe,null);if(typeof ue.then=="function")return se(Z,X,ee,ul(ue),xe);if(ue.$$typeof===m)return se(Z,X,ee,sl(X,ue),xe);cl(X,ue)}return null}function be(Z,X,ee,ue){for(var xe=null,We=null,Ce=X,ze=X=0,qe=null;Ce!==null&&ze<ee.length;ze++){Ce.index>ze?(qe=Ce,Ce=null):qe=Ce.sibling;var Ke=ie(Z,Ce,ee[ze],ue);if(Ke===null){Ce===null&&(Ce=qe);break}e&&Ce&&Ke.alternate===null&&t(Z,Ce),X=y(Ke,X,ze),We===null?xe=Ke:We.sibling=Ke,We=Ke,Ce=qe}if(ze===ee.length)return i(Z,Ce),Ve&&Mn(Z,ze),xe;if(Ce===null){for(;ze<ee.length;ze++)Ce=ce(Z,ee[ze],ue),Ce!==null&&(X=y(Ce,X,ze),We===null?xe=Ce:We.sibling=Ce,We=Ce);return Ve&&Mn(Z,ze),xe}for(Ce=r(Ce);ze<ee.length;ze++)qe=se(Ce,Z,ze,ee[ze],ue),qe!==null&&(e&&qe.alternate!==null&&Ce.delete(qe.key===null?ze:qe.key),X=y(qe,X,ze),We===null?xe=qe:We.sibling=qe,We=qe);return e&&Ce.forEach(function(mi){return t(Z,mi)}),Ve&&Mn(Z,ze),xe}function ke(Z,X,ee,ue){if(ee==null)throw Error(o(151));for(var xe=null,We=null,Ce=X,ze=X=0,qe=null,Ke=ee.next();Ce!==null&&!Ke.done;ze++,Ke=ee.next()){Ce.index>ze?(qe=Ce,Ce=null):qe=Ce.sibling;var mi=ie(Z,Ce,Ke.value,ue);if(mi===null){Ce===null&&(Ce=qe);break}e&&Ce&&mi.alternate===null&&t(Z,Ce),X=y(mi,X,ze),We===null?xe=mi:We.sibling=mi,We=mi,Ce=qe}if(Ke.done)return i(Z,Ce),Ve&&Mn(Z,ze),xe;if(Ce===null){for(;!Ke.done;ze++,Ke=ee.next())Ke=ce(Z,Ke.value,ue),Ke!==null&&(X=y(Ke,X,ze),We===null?xe=Ke:We.sibling=Ke,We=Ke);return Ve&&Mn(Z,ze),xe}for(Ce=r(Ce);!Ke.done;ze++,Ke=ee.next())Ke=se(Ce,Z,ze,Ke.value,ue),Ke!==null&&(e&&Ke.alternate!==null&&Ce.delete(Ke.key===null?ze:Ke.key),X=y(Ke,X,ze),We===null?xe=Ke:We.sibling=Ke,We=Ke);return e&&Ce.forEach(function(f0){return t(Z,f0)}),Ve&&Mn(Z,ze),xe}function nt(Z,X,ee,ue){if(typeof ee=="object"&&ee!==null&&ee.type===x&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:e:{for(var xe=ee.key;X!==null;){if(X.key===xe){if(xe=ee.type,xe===x){if(X.tag===7){i(Z,X.sibling),ue=f(X,ee.props.children),ue.return=Z,Z=ue;break e}}else if(X.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===T&&Ri(xe)===X.type){i(Z,X.sibling),ue=f(X,ee.props),Qr(ue,ee),ue.return=Z,Z=ue;break e}i(Z,X);break}else t(Z,X);X=X.sibling}ee.type===x?(ue=Ei(ee.props.children,Z.mode,ue,ee.key),ue.return=Z,Z=ue):(ue=nl(ee.type,ee.key,ee.props,null,Z.mode,ue),Qr(ue,ee),ue.return=Z,Z=ue)}return D(Z);case k:e:{for(xe=ee.key;X!==null;){if(X.key===xe)if(X.tag===4&&X.stateNode.containerInfo===ee.containerInfo&&X.stateNode.implementation===ee.implementation){i(Z,X.sibling),ue=f(X,ee.children||[]),ue.return=Z,Z=ue;break e}else{i(Z,X);break}else t(Z,X);X=X.sibling}ue=Ka(ee,Z.mode,ue),ue.return=Z,Z=ue}return D(Z);case T:return ee=Ri(ee),nt(Z,X,ee,ue)}if(Y(ee))return be(Z,X,ee,ue);if(G(ee)){if(xe=G(ee),typeof xe!="function")throw Error(o(150));return ee=xe.call(ee),ke(Z,X,ee,ue)}if(typeof ee.then=="function")return nt(Z,X,ul(ee),ue);if(ee.$$typeof===m)return nt(Z,X,sl(Z,ee),ue);cl(Z,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,X!==null&&X.tag===6?(i(Z,X.sibling),ue=f(X,ee),ue.return=Z,Z=ue):(i(Z,X),ue=Wa(ee,Z.mode,ue),ue.return=Z,Z=ue),D(Z)):i(Z,X)}return function(Z,X,ee,ue){try{Xr=0;var xe=nt(Z,X,ee,ue);return ar=null,xe}catch(Ce){if(Ce===lr||Ce===al)throw Ce;var We=Xt(29,Ce,null,Z.mode);return We.lanes=ue,We.return=Z,We}finally{}}}var Li=Yh(!0),Wh=Yh(!1),Jn=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(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,(Qe&2)!==0){var f=r.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),r.pending=t,t=tl(e),Rh(e,null,i),t}return el(e,r,t,i),tl(e)}function Zr(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,jc(e,i)}}function oo(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 uo=!1;function Jr(){if(uo){var e=sr;if(e!==null)throw e}}function es(e,t,i,r){uo=!1;var f=e.updateQueue;Jn=!1;var y=f.firstBaseUpdate,D=f.lastBaseUpdate,U=f.shared.pending;if(U!==null){f.shared.pending=null;var W=U,te=W.next;W.next=null,D===null?y=te:D.next=te,D=W;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,U=oe.lastBaseUpdate,U!==D&&(U===null?oe.firstBaseUpdate=te:U.next=te,oe.lastBaseUpdate=W))}if(y!==null){var ce=f.baseState;D=0,oe=te=W=null,U=y;do{var ie=U.lane&-536870913,se=ie!==U.lane;if(se?(Fe&ie)===ie:(r&ie)===ie){ie!==0&&ie===rr&&(uo=!0),oe!==null&&(oe=oe.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var be=e,ke=U;ie=t;var nt=i;switch(ke.tag){case 1:if(be=ke.payload,typeof be=="function"){ce=be.call(nt,ce,ie);break e}ce=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=ke.payload,ie=typeof be=="function"?be.call(nt,ce,ie):be,ie==null)break e;ce=c({},ce,ie);break e;case 2:Jn=!0}}ie=U.callback,ie!==null&&(e.flags|=64,se&&(e.flags|=8192),se=f.callbacks,se===null?f.callbacks=[ie]:se.push(ie))}else se={lane:ie,tag:U.tag,payload:U.payload,callback:U.callback,next:null},oe===null?(te=oe=se,W=ce):oe=oe.next=se,D|=ie;if(U=U.next,U===null){if(U=f.shared.pending,U===null)break;se=U,U=se.next,se.next=null,f.lastBaseUpdate=se,f.shared.pending=null}}while(!0);oe===null&&(W=ce),f.baseState=W,f.firstBaseUpdate=te,f.lastBaseUpdate=oe,y===null&&(f.shared.lanes=0),li|=D,e.lanes=D,e.memoizedState=ce}}function Kh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function $h(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Kh(i[e],t)}var or=O(null),hl=O(0);function Xh(e,t){e=Fn,H(hl,e),H(or,t),Fn=e|t.baseLanes}function co(){H(hl,Fn),H(or,or.current)}function ho(){Fn=hl.current,I(or),I(hl)}var Qt=O(null),fn=null;function ni(e){var t=e.alternate;H(ft,ft.current&1),H(Qt,e),fn===null&&(t===null||or.current!==null||t.memoizedState!==null)&&(fn=e)}function fo(e){H(ft,ft.current),H(Qt,e),fn===null&&(fn=e)}function Qh(e){e.tag===22?(H(ft,ft.current),H(Qt,e),fn===null&&(fn=e)):ii()}function ii(){H(ft,ft.current),H(Qt,Qt.current)}function Zt(e){I(Qt),fn===e&&(fn=null),I(ft)}var ft=O(0);function fl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Su(i)||yu(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 Bn=0,Oe=null,et=null,_t=null,dl=!1,ur=!1,Oi=!1,pl=0,ts=0,cr=null,nv=0;function ct(){throw Error(o(321))}function po(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!$t(e[i],t[i]))return!1;return!0}function _o(e,t,i,r,f,y){return Bn=y,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?zf:Ro,Oi=!1,y=i(r,f),Oi=!1,ur&&(y=Jh(t,i,r,f)),Zh(e),y}function Zh(e){q.H=rs;var t=et!==null&&et.next!==null;if(Bn=0,_t=et=Oe=null,dl=!1,ts=0,cr=null,t)throw Error(o(300));e===null||mt||(e=e.dependencies,e!==null&&rl(e)&&(mt=!0))}function Jh(e,t,i,r){Oe=e;var f=0;do{if(ur&&(cr=null),ts=0,ur=!1,25<=f)throw Error(o(301));if(f+=1,_t=et=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}q.H=Hf,y=t(i,r)}while(ur);return y}function iv(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?ns(t):t,e=e.useState()[0],(et!==null?et.memoizedState:null)!==e&&(Oe.flags|=1024),t}function mo(){var e=pl!==0;return pl=0,e}function go(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function vo(e){if(dl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}dl=!1}Bn=0,_t=et=Oe=null,ur=!1,ts=pl=0,cr=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Oe.memoizedState=_t=e:_t=_t.next=e,_t}function dt(){if(et===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=_t===null?Oe.memoizedState:_t.next;if(t!==null)_t=t,et=e;else{if(e===null)throw Oe.alternate===null?Error(o(467)):Error(o(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},_t===null?Oe.memoizedState=_t=e:_t=_t.next=e}return _t}function _l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ns(e){var t=ts;return ts+=1,cr===null&&(cr=[]),e=qh(cr,e,t),t=Oe,(_t===null?t.memoizedState:_t.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?zf:Ro),e}function ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ns(e);if(e.$$typeof===m)return Tt(e)}throw Error(o(438,String(e)))}function So(e){var t=null,i=Oe.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=Oe.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=_l(),Oe.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 zn(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=dt();return yo(t,et,e)}function yo(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 U=D=null,W=null,te=t,oe=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Fe&ce)===ce:(Bn&ce)===ce){var ie=te.revertLane;if(ie===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===rr&&(oe=!0);else if((Bn&ie)===ie){te=te.next,ie===rr&&(oe=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(U=W=ce,D=y):W=W.next=ce,Oe.lanes|=ie,li|=ie;ce=te.action,Oi&&i(y,ce),y=te.hasEagerState?te.eagerState:i(y,ce)}else ie={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(U=W=ie,D=y):W=W.next=ie,Oe.lanes|=ce,li|=ce;te=te.next}while(te!==null&&te!==t);if(W===null?D=y:W.next=U,!$t(y,e.memoizedState)&&(mt=!0,oe&&(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 bo(e){var t=dt(),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);$t(y,t.memoizedState)||(mt=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,r]}function ef(e,t,i){var r=Oe,f=dt(),y=Ve;if(y){if(i===void 0)throw Error(o(407));i=i()}else i=t();var D=!$t((et||f).memoizedState,i);if(D&&(f.memoizedState=i,mt=!0),f=f.queue,xo(rf.bind(null,r,f,e),[e]),f.getSnapshot!==t||D||_t!==null&&_t.memoizedState.tag&1){if(r.flags|=2048,hr(9,{destroy:void 0},nf.bind(null,r,f,i,t),null),rt===null)throw Error(o(349));y||(Bn&127)!==0||tf(r,t,i)}return i}function tf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Oe.updateQueue,t===null?(t=_l(),Oe.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function nf(e,t,i,r){t.value=i,t.getSnapshot=r,sf(t)&&lf(e)}function rf(e,t,i){return i(function(){sf(t)&&lf(e)})}function sf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!$t(e,i)}catch{return!0}}function lf(e){var t=xi(e,2);t!==null&&Yt(t,e,2)}function Co(e){var t=Nt();if(typeof e=="function"){var i=e;if(e=i(),Oi){It(!0);try{i()}finally{It(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:e},t}function af(e,t,i,r){return e.baseState=i,yo(e,et,typeof r=="function"?r:zn)}function rv(e,t,i,r,f){if(yl(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)}};q.T!==null?i(!0):y.isTransition=!1,r(y),i=t.pending,i===null?(y.next=t.pending=y,of(t,y)):(y.next=i.next,t.pending=i.next=y)}}function of(e,t){var i=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=q.T,D={};q.T=D;try{var U=i(f,r),W=q.S;W!==null&&W(D,U),uf(e,t,U)}catch(te){wo(e,t,te)}finally{y!==null&&D.types!==null&&(y.types=D.types),q.T=y}}else try{y=i(f,r),uf(e,t,y)}catch(te){wo(e,t,te)}}function uf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){cf(e,t,r)},function(r){return wo(e,t,r)}):cf(e,t,i)}function cf(e,t,i){t.status="fulfilled",t.value=i,hf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,of(e,i)))}function wo(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,hf(t),t=t.next;while(t!==r)}e.action=null}function hf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ff(e,t){return t}function df(e,t){if(Ve){var i=rt.formState;if(i!==null){e:{var r=Oe;if(Ve){if(at){t:{for(var f=at,y=hn;f.nodeType!==8;){if(!y){f=null;break t}if(f=dn(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){at=dn(f.nextSibling),r=f.data==="F!";break e}}Qn(r)}r=!1}r&&(t=i[0])}}return i=Nt(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ff,lastRenderedState:t},i.queue=r,i=Lf.bind(null,Oe,r),r.dispatch=i,r=Co(!1),y=Do.bind(null,Oe,!1,r.queue),r=Nt(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,i=rv.bind(null,Oe,f,y,i),f.dispatch=i,r.memoizedState=e,[t,i,!1]}function pf(e){var t=dt();return _f(t,et,e)}function _f(e,t,i){if(t=yo(e,t,ff)[0],e=gl(zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ns(t)}catch(D){throw D===lr?al:D}else r=t;t=dt();var f=t.queue,y=f.dispatch;return i!==t.memoizedState&&(Oe.flags|=2048,hr(9,{destroy:void 0},sv.bind(null,f,i),null)),[r,y,e]}function sv(e,t){e.action=t}function mf(e){var t=dt(),i=et;if(i!==null)return _f(t,i,e);dt(),t=t.memoizedState,i=dt();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=Oe.updateQueue,t===null&&(t=_l(),Oe.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 gf(){return dt().memoizedState}function vl(e,t,i,r){var f=Nt();Oe.flags|=e,f.memoizedState=hr(1|t,{destroy:void 0},i,r===void 0?null:r)}function Sl(e,t,i,r){var f=dt();r=r===void 0?null:r;var y=f.memoizedState.inst;et!==null&&r!==null&&po(r,et.memoizedState.deps)?f.memoizedState=hr(t,y,i,r):(Oe.flags|=e,f.memoizedState=hr(1|t,y,i,r))}function vf(e,t){vl(8390656,8,e,t)}function xo(e,t){Sl(2048,8,e,t)}function lv(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=_l(),Oe.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Sf(e){var t=dt().memoizedState;return lv({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function yf(e,t){return Sl(4,2,e,t)}function bf(e,t){return Sl(4,4,e,t)}function Cf(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 wf(e,t,i){i=i!=null?i.concat([e]):null,Sl(4,4,Cf.bind(null,t,e),i)}function Eo(){}function xf(e,t){var i=dt();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&po(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function Ef(e,t){var i=dt();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&po(t,r[1]))return r[0];if(r=e(),Oi){It(!0);try{e()}finally{It(!1)}}return i.memoizedState=[r,t],r}function ko(e,t,i){return i===void 0||(Bn&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=kd(),Oe.lanes|=e,li|=e,i)}function kf(e,t,i,r){return $t(i,t)?i:or.current!==null?(e=ko(e,i,r),$t(e,t)||(mt=!0),e):(Bn&42)===0||(Bn&1073741824)!==0&&(Fe&261930)===0?(mt=!0,e.memoizedState=i):(e=kd(),Oe.lanes|=e,li|=e,t)}function Af(e,t,i,r,f){var y=Q.p;Q.p=y!==0&&8>y?y:8;var D=q.T,U={};q.T=U,Do(e,!1,t,i);try{var W=f(),te=q.S;if(te!==null&&te(U,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var oe=tv(W,r);is(e,t,oe,tn(e))}else is(e,t,r,tn(e))}catch(ce){is(e,t,{then:function(){},status:"rejected",reason:ce},tn())}finally{Q.p=y,D!==null&&U.types!==null&&(D.types=U.types),q.T=D}}function av(){}function Ao(e,t,i,r){if(e.tag!==5)throw Error(o(476));var f=Tf(e).queue;Af(e,f,t,J,i===null?av:function(){return Df(e),i(r)})}function Tf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Df(e){var t=Tf(e);t.next===null&&(t=e.alternate.memoizedState),is(e,t.next.queue,{},tn())}function To(){return Tt(ys)}function Rf(){return dt().memoizedState}function Mf(){return dt().memoizedState}function ov(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=tn();e=ei(i);var r=ti(t,e,i);r!==null&&(Yt(r,t,i),Zr(r,t,i)),t={cache:no()},e.payload=t;return}t=t.return}}function uv(e,t,i){var r=tn();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yl(e)?Of(t,i):(i=Ga(e,t,i,r),i!==null&&(Yt(i,e,r),Bf(i,t,r)))}function Lf(e,t,i){var r=tn();is(e,t,i,r)}function is(e,t,i,r){var f={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(yl(e))Of(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,U=y(D,i);if(f.hasEagerState=!0,f.eagerState=U,$t(U,D))return el(e,t,f,0),rt===null&&Js(),!1}catch{}finally{}if(i=Ga(e,t,f,r),i!==null)return Yt(i,e,r),Bf(i,t,r),!0}return!1}function Do(e,t,i,r){if(r={lane:2,revertLane:au(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},yl(e)){if(t)throw Error(o(479))}else t=Ga(e,i,r,2),t!==null&&Yt(t,e,2)}function yl(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Of(e,t){ur=dl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Bf(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,jc(e,i)}}var rs={readContext:Tt,use:ml,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};rs.useEffectEvent=ct;var zf={readContext:Tt,use:ml,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:vf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,vl(4194308,4,Cf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){vl(4,2,e,t)},useMemo:function(e,t){var i=Nt();t=t===void 0?null:t;var r=e();if(Oi){It(!0);try{e()}finally{It(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Nt();if(i!==void 0){var f=i(t);if(Oi){It(!0);try{i(t)}finally{It(!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=uv.bind(null,Oe,e),[r.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=Co(e);var t=e.queue,i=Lf.bind(null,Oe,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Eo,useDeferredValue:function(e,t){var i=Nt();return ko(i,e,t)},useTransition:function(){var e=Co(!1);return e=Af.bind(null,Oe,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=Oe,f=Nt();if(Ve){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),rt===null)throw Error(o(349));(Fe&127)!==0||tf(r,t,i)}f.memoizedState=i;var y={value:i,getSnapshot:t};return f.queue=y,vf(rf.bind(null,r,y,e),[e]),r.flags|=2048,hr(9,{destroy:void 0},nf.bind(null,r,y,i,t),null),i},useId:function(){var e=Nt(),t=rt.identifierPrefix;if(Ve){var i=Cn,r=bn;i=(r&~(1<<32-it(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=pl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=nv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:To,useFormState:df,useActionState:df,useOptimistic:function(e){var t=Nt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Do.bind(null,Oe,!0,i),i.dispatch=t,[e,t]},useMemoCache:So,useCacheRefresh:function(){return Nt().memoizedState=ov.bind(null,Oe)},useEffectEvent:function(e){var t=Nt(),i={impl:e};return t.memoizedState=i,function(){if((Qe&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Ro={readContext:Tt,use:ml,useCallback:xf,useContext:Tt,useEffect:xo,useImperativeHandle:wf,useInsertionEffect:yf,useLayoutEffect:bf,useMemo:Ef,useReducer:gl,useRef:gf,useState:function(){return gl(zn)},useDebugValue:Eo,useDeferredValue:function(e,t){var i=dt();return kf(i,et.memoizedState,e,t)},useTransition:function(){var e=gl(zn)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ns(e),t]},useSyncExternalStore:ef,useId:Rf,useHostTransitionStatus:To,useFormState:pf,useActionState:pf,useOptimistic:function(e,t){var i=dt();return af(i,et,e,t)},useMemoCache:So,useCacheRefresh:Mf};Ro.useEffectEvent=Sf;var Hf={readContext:Tt,use:ml,useCallback:xf,useContext:Tt,useEffect:xo,useImperativeHandle:wf,useInsertionEffect:yf,useLayoutEffect:bf,useMemo:Ef,useReducer:bo,useRef:gf,useState:function(){return bo(zn)},useDebugValue:Eo,useDeferredValue:function(e,t){var i=dt();return et===null?ko(i,e,t):kf(i,et.memoizedState,e,t)},useTransition:function(){var e=bo(zn)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ns(e),t]},useSyncExternalStore:ef,useId:Rf,useHostTransitionStatus:To,useFormState:mf,useActionState:mf,useOptimistic:function(e,t){var i=dt();return et!==null?af(i,et,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:So,useCacheRefresh:Mf};Hf.useEffectEvent=Sf;function Mo(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 Lo={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=tn(),f=ei(r);f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Yt(t,e,r),Zr(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=tn(),f=ei(r);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Yt(t,e,r),Zr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=tn(),r=ei(i);r.tag=2,t!=null&&(r.callback=t),t=ti(e,r,i),t!==null&&(Yt(t,e,i),Zr(t,e,i))}};function Nf(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?!Vr(i,r)||!Vr(f,y):!0}function jf(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&&Lo.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 If(e){Zs(e)}function Uf(e){console.error(e)}function Pf(e){Zs(e)}function bl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Ff(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 Oo(e,t,i){return i=ei(i),i.tag=3,i.payload={element:null},i.callback=function(){bl(e,t)},i}function qf(e){return e=ei(e),e.tag=3,e}function Vf(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(){Ff(t,i,r)}}var D=i.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){Ff(t,i,r),typeof f!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var U=r.stack;this.componentDidCatch(r.value,{componentStack:U!==null?U:""})})}function cv(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=Qt.current,i!==null){switch(i.tag){case 31:case 13:return fn===null?Ol():i.alternate===null&&ht===0&&(ht=3),i.flags&=-257,i.flags|=65536,i.lanes=f,r===ol?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),ru(e,r,f)),!1;case 22:return i.flags|=65536,r===ol?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)),ru(e,r,f)),!1}throw Error(o(435,i.tag))}return ru(e,r,f),Ol(),!1}if(Ve)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Qa&&(e=Error(o(422),{cause:r}),Wr(on(e,i)))):(r!==Qa&&(t=Error(o(423),{cause:r}),Wr(on(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=on(r,i),f=Oo(e.stateNode,r,f),oo(e,f),ht!==4&&(ht=2)),!1;var y=Error(o(520),{cause:r});if(y=on(y,i),fs===null?fs=[y]:fs.push(y),ht!==4&&(ht=2),t===null)return!0;r=on(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Oo(i.stateNode,r,e),oo(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=qf(f),Vf(f,e,i,r),oo(i,f),!1}i=i.return}while(i!==null);return!1}var Bo=Error(o(461)),mt=!1;function Dt(e,t,i,r){t.child=e===null?Wh(t,null,i,r):Li(t,e.child,i,r)}function Gf(e,t,i,r,f){i=i.render;var y=t.ref;if("ref"in r){var D={};for(var U in r)U!=="ref"&&(D[U]=r[U])}else D=r;return Ti(t),r=_o(e,t,i,D,y,f),U=mo(),e!==null&&!mt?(go(e,t,f),Hn(e,t,f)):(Ve&&U&&$a(t),t.flags|=1,Dt(e,t,r,f),t.child)}function Yf(e,t,i,r,f){if(e===null){var y=i.type;return typeof y=="function"&&!Ya(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,Wf(e,t,y,r,f)):(e=nl(i.type,null,r,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,!Fo(e,f)){var D=y.memoizedProps;if(i=i.compare,i=i!==null?i:Vr,i(D,r)&&e.ref===t.ref)return Hn(e,t,f)}return t.flags|=1,e=Rn(y,r),e.ref=t.ref,e.return=t,t.child=e}function Wf(e,t,i,r,f){if(e!==null){var y=e.memoizedProps;if(Vr(y,r)&&e.ref===t.ref)if(mt=!1,t.pendingProps=r=y,Fo(e,f))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,Hn(e,t,f)}return zo(e,t,i,r,f)}function Kf(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 $f(e,t,y,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ll(t,y!==null?y.cachePool:null),y!==null?Xh(t,y):co(),Qh(t);else return r=t.lanes=536870912,$f(e,t,y!==null?y.baseLanes|i:i,i,r)}else y!==null?(ll(t,y.cachePool),Xh(t,y),ii(),t.memoizedState=null):(e!==null&&ll(t,null),co(),ii());return Dt(e,t,f,i),t.child}function ss(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $f(e,t,i,r,f){var y=ro();return y=y===null?null:{parent:pt._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&ll(t,null),co(),Qh(t),e!==null&&ir(e,t,r,!0),t.childLanes=f,null}function Cl(e,t){return t=xl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xf(e,t,i){return Li(t,e.child,null,i),e=Cl(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function hv(e,t,i){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(r.mode==="hidden")return e=Cl(t,r),t.lanes=536870912,ss(null,e);if(fo(t),(e=at)?(e=op(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$n!==null?{id:bn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},i=Lh(e),i.return=t,t.child=i,At=t,at=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return Cl(t,r)}var y=e.memoizedState;if(y!==null){var D=y.dehydrated;if(fo(t),f)if(t.flags&256)t.flags&=-257,t=Xf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(mt||ir(e,t,i,!1),f=(i&e.childLanes)!==0,mt||f){if(r=rt,r!==null&&(D=Ic(r,i),D!==0&&D!==y.retryLane))throw y.retryLane=D,xi(e,D),Yt(r,e,D),Bo;Ol(),t=Xf(e,t,i)}else e=y.treeContext,at=dn(D.nextSibling),At=t,Ve=!0,Xn=null,hn=!1,e!==null&&zh(t,e),t=Cl(t,r),t.flags|=4096;return t}return e=Rn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function wl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function zo(e,t,i,r,f){return Ti(t),i=_o(e,t,i,r,void 0,f),r=mo(),e!==null&&!mt?(go(e,t,f),Hn(e,t,f)):(Ve&&r&&$a(t),t.flags|=1,Dt(e,t,i,f),t.child)}function Qf(e,t,i,r,f,y){return Ti(t),t.updateQueue=null,i=Jh(t,r,i,f),Zh(e),r=mo(),e!==null&&!mt?(go(e,t,y),Hn(e,t,y)):(Ve&&r&&$a(t),t.flags|=1,Dt(e,t,i,y),t.child)}function Zf(e,t,i,r,f){if(Ti(t),t.stateNode===null){var y=Ji,D=i.contextType;typeof D=="object"&&D!==null&&(y=Tt(D)),y=new i(r,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Lo,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=r,y.state=t.memoizedState,y.refs={},lo(t),D=i.contextType,y.context=typeof D=="object"&&D!==null?Tt(D):Ji,y.state=t.memoizedState,D=i.getDerivedStateFromProps,typeof D=="function"&&(Mo(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&&Lo.enqueueReplaceState(y,y.state,null),es(t,r,y,f),Jr(),y.state=t.memoizedState),typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){y=t.stateNode;var U=t.memoizedProps,W=Bi(i,U);y.props=W;var te=y.context,oe=i.contextType;D=Ji,typeof oe=="object"&&oe!==null&&(D=Tt(oe));var ce=i.getDerivedStateFromProps;oe=typeof ce=="function"||typeof y.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,oe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(U||te!==D)&&jf(t,y,r,D),Jn=!1;var ie=t.memoizedState;y.state=ie,es(t,r,y,f),Jr(),te=t.memoizedState,U||ie!==te||Jn?(typeof ce=="function"&&(Mo(t,i,ce,r),te=t.memoizedState),(W=Jn||Nf(t,i,W,r,ie,te,D))?(oe||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=te),y.props=r,y.state=te,y.context=D,r=W):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,ao(e,t),D=t.memoizedProps,oe=Bi(i,D),y.props=oe,ce=t.pendingProps,ie=y.context,te=i.contextType,W=Ji,typeof te=="object"&&te!==null&&(W=Tt(te)),U=i.getDerivedStateFromProps,(te=typeof U=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D!==ce||ie!==W)&&jf(t,y,r,W),Jn=!1,ie=t.memoizedState,y.state=ie,es(t,r,y,f),Jr();var se=t.memoizedState;D!==ce||ie!==se||Jn||e!==null&&e.dependencies!==null&&rl(e.dependencies)?(typeof U=="function"&&(Mo(t,i,U,r),se=t.memoizedState),(oe=Jn||Nf(t,i,oe,r,ie,se,W)||e!==null&&e.dependencies!==null&&rl(e.dependencies))?(te||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(r,se,W),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(r,se,W)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=se),y.props=r,y.state=se,y.context=W,r=oe):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),r=!1)}return y=r,wl(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=Li(t,e.child,null,f),t.child=Li(t,null,i,f)):Dt(e,t,i,f),t.memoizedState=y.state,e=t.child):e=Hn(e,t,f),e}function Jf(e,t,i,r){return ki(),t.flags|=256,Dt(e,t,i,r),t.child}var Ho={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function No(e){return{baseLanes:e,cachePool:Ph()}}function jo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=en),e}function ed(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:(ft.current&2)!==0),D&&(f=!0,t.flags&=-129),D=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(f?ni(t):ii(),(e=at)?(e=op(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$n!==null?{id:bn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},i=Lh(e),i.return=t,t.child=i,At=t,at=null)):e=null,e===null)throw Qn(t);return yu(e)?t.lanes=32:t.lanes=536870912,null}var U=r.children;return r=r.fallback,f?(ii(),f=t.mode,U=xl({mode:"hidden",children:U},f),r=Ei(r,f,i,null),U.return=t,r.return=t,U.sibling=r,t.child=U,r=t.child,r.memoizedState=No(i),r.childLanes=jo(e,D,i),t.memoizedState=Ho,ss(null,r)):(ni(t),Io(t,U))}var W=e.memoizedState;if(W!==null&&(U=W.dehydrated,U!==null)){if(y)t.flags&256?(ni(t),t.flags&=-257,t=Uo(e,t,i)):t.memoizedState!==null?(ii(),t.child=e.child,t.flags|=128,t=null):(ii(),U=r.fallback,f=t.mode,r=xl({mode:"visible",children:r.children},f),U=Ei(U,f,i,null),U.flags|=2,r.return=t,U.return=t,r.sibling=U,t.child=r,Li(t,e.child,null,i),r=t.child,r.memoizedState=No(i),r.childLanes=jo(e,D,i),t.memoizedState=Ho,t=ss(null,r));else if(ni(t),yu(U)){if(D=U.nextSibling&&U.nextSibling.dataset,D)var te=D.dgst;D=te,r=Error(o(419)),r.stack="",r.digest=D,Wr({value:r,source:null,stack:null}),t=Uo(e,t,i)}else if(mt||ir(e,t,i,!1),D=(i&e.childLanes)!==0,mt||D){if(D=rt,D!==null&&(r=Ic(D,i),r!==0&&r!==W.retryLane))throw W.retryLane=r,xi(e,r),Yt(D,e,r),Bo;Su(U)||Ol(),t=Uo(e,t,i)}else Su(U)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,at=dn(U.nextSibling),At=t,Ve=!0,Xn=null,hn=!1,e!==null&&zh(t,e),t=Io(t,r.children),t.flags|=4096);return t}return f?(ii(),U=r.fallback,f=t.mode,W=e.child,te=W.sibling,r=Rn(W,{mode:"hidden",children:r.children}),r.subtreeFlags=W.subtreeFlags&65011712,te!==null?U=Rn(te,U):(U=Ei(U,f,i,null),U.flags|=2),U.return=t,r.return=t,r.sibling=U,t.child=r,ss(null,r),r=t.child,U=e.child.memoizedState,U===null?U=No(i):(f=U.cachePool,f!==null?(W=pt._currentValue,f=f.parent!==W?{parent:W,pool:W}:f):f=Ph(),U={baseLanes:U.baseLanes|i,cachePool:f}),r.memoizedState=U,r.childLanes=jo(e,D,i),t.memoizedState=Ho,ss(e.child,r)):(ni(t),i=e.child,e=i.sibling,i=Rn(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 Io(e,t){return t=xl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xl(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function Uo(e,t,i){return Li(t,e.child,null,i),e=Io(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function td(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),eo(e.return,t,i)}function Po(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 nd(e,t,i){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var D=ft.current,U=(D&2)!==0;if(U?(D=D&1|2,t.flags|=128):D&=1,H(ft,D),Dt(e,t,r,i),r=Ve?Yr:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&td(e,i,t);else if(e.tag===19)td(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&&fl(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),Po(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&&fl(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Po(t,!0,i,null,y,r);break;case"together":Po(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Hn(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=Rn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Rn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Fo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&rl(e)))}function fv(e,t,i){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),Zn(t,pt,e.memoizedState.cache),ki();break;case 27:case 5:re(t);break;case 4:P(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,fo(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?ed(e,t,i):(ni(t),e=Hn(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 nd(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),H(ft,ft.current),r)break;return null;case 22:return t.lanes=0,Kf(e,t,i,t.pendingProps);case 24:Zn(t,pt,e.memoizedState.cache)}return Hn(e,t,i)}function id(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Fo(e,i)&&(t.flags&128)===0)return mt=!1,fv(e,t,i);mt=(e.flags&131072)!==0}else mt=!1,Ve&&(t.flags&1048576)!==0&&Bh(t,Yr,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")Ya(e)?(r=Bi(e,r),t.tag=1,t=Zf(null,t,e,r,i)):(t.tag=0,t=zo(null,t,e,r,i));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=Gf(null,t,e,r,i);break e}else if(f===L){t.tag=14,t=Yf(null,t,e,r,i);break e}}throw t=$(e)||e,Error(o(306,t,""))}}return t;case 0:return zo(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,f=Bi(r,t.pendingProps),Zf(e,t,r,f,i);case 3:e:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var y=t.memoizedState;f=y.element,ao(e,t),es(t,r,null,i);var D=t.memoizedState;if(r=D.cache,Zn(t,pt,r),r!==y.cache&&to(t,[pt],i,!0),Jr(),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=Jf(e,t,r,i);break e}else if(r!==f){f=on(Error(o(424)),t),Wr(f),t=Jf(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(at=dn(e.firstChild),At=t,Ve=!0,Xn=null,hn=!0,i=Wh(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ki(),r===f){t=Hn(e,t,i);break e}Dt(e,t,r,i)}t=t.child}return t;case 26:return wl(e,t),e===null?(i=pp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ve||(i=t.type,e=t.pendingProps,r=Ul(he.current).createElement(i),r[kt]=t,r[Ut]=e,Rt(r,i,e),wt(r),t.stateNode=r):t.memoizedState=pp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return re(t),e===null&&Ve&&(r=t.stateNode=hp(t.type,t.pendingProps,he.current),At=t,hn=!0,f=at,hi(t.type)?(bu=f,at=dn(r.firstChild)):at=f),Dt(e,t,t.pendingProps.children,i),wl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((f=r=at)&&(r=Fv(r,t.type,t.pendingProps,hn),r!==null?(t.stateNode=r,At=t,at=dn(r.firstChild),hn=!1,f=!0):f=!1),f||Qn(t)),re(t),f=t.type,y=t.pendingProps,D=e!==null?e.memoizedProps:null,r=y.children,mu(f,y)?r=null:D!==null&&mu(f,D)&&(t.flags|=32),t.memoizedState!==null&&(f=_o(e,t,iv,null,null,i),ys._currentValue=f),wl(e,t),Dt(e,t,r,i),t.child;case 6:return e===null&&Ve&&((e=i=at)&&(i=qv(i,t.pendingProps,hn),i!==null?(t.stateNode=i,At=t,at=null,e=!0):e=!1),e||Qn(t)),null;case 13:return ed(e,t,i);case 4:return P(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Li(t,null,r,i):Dt(e,t,r,i),t.child;case 11:return Gf(e,t,t.type,t.pendingProps,i);case 7:return Dt(e,t,t.pendingProps,i),t.child;case 8:return Dt(e,t,t.pendingProps.children,i),t.child;case 12:return Dt(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Zn(t,t.type,r.value),Dt(e,t,r.children,i),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Ti(t),f=Tt(f),r=r(f),t.flags|=1,Dt(e,t,r,i),t.child;case 14:return Yf(e,t,t.type,t.pendingProps,i);case 15:return Wf(e,t,t.type,t.pendingProps,i);case 19:return nd(e,t,i);case 31:return hv(e,t,i);case 22:return Kf(e,t,i,t.pendingProps);case 24:return Ti(t),r=Tt(pt),e===null?(f=ro(),f===null&&(f=rt,y=no(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=i),f=y),t.memoizedState={parent:r,cache:f},lo(t),Zn(t,pt,f)):((e.lanes&i)!==0&&(ao(e,t),es(t,null,null,i),Jr()),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,pt,r)):(r=y.cache,Zn(t,pt,r),r!==f.cache&&to(t,[pt],i,!0))),Dt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Nn(e){e.flags|=4}function qo(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(Rd())e.flags|=8192;else throw Mi=ol,so}else e.flags&=-16777217}function rd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sp(t))if(Rd())e.flags|=8192;else throw Mi=ol,so}function El(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hc():536870912,e.lanes|=t,_r|=t)}function ls(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var 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 ot(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 dv(e,t,i){var r=t.pendingProps;switch(Xa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return ot(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),On(pt),le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(nr(t)?Nn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Za())),ot(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(Nn(t),y!==null?(ot(t),rd(t,y)):(ot(t),qo(t,f,null,r,i))):y?y!==e.memoizedState?(Nn(t),ot(t),rd(t,y)):(ot(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Nn(t),ot(t),qo(t,f,e,r,i)),null;case 27:if(Se(t),i=he.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return ot(t),null}e=ne.current,nr(t)?Hh(t):(e=hp(f,r,i),t.stateNode=e,Nn(t))}return ot(t),null;case 5:if(Se(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return ot(t),null}if(y=ne.current,nr(t))Hh(t);else{var D=Ul(he.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[kt]=t,y[Ut]=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(Rt(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&&Nn(t)}}return ot(t),qo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,nr(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,f=At,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[kt]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||ep(e.nodeValue,i)),e||Qn(t,!0)}else e=Ul(e).createTextNode(r),e[kt]=t,t.stateNode=e}return ot(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[kt]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),e=!1}else i=Za(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ot(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[kt]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),f=!1}else f=Za(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(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),El(t,t.updateQueue),ot(t),null);case 4:return le(),e===null&&hu(t.stateNode.containerInfo),ot(t),null;case 10:return On(t.type),ot(t),null;case 19:if(I(ft),r=t.memoizedState,r===null)return ot(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)ls(r,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=fl(e),y!==null){for(t.flags|=128,ls(r,!1),e=y.updateQueue,t.updateQueue=e,El(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Mh(i,e),i=i.sibling;return H(ft,ft.current&1|2),Ve&&Mn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Xe()>Rl&&(t.flags|=128,f=!0,ls(r,!1),t.lanes=4194304)}else{if(!f)if(e=fl(y),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,El(t,e),ls(r,!0),r.tail===null&&r.tailMode==="hidden"&&!y.alternate&&!Ve)return ot(t),null}else 2*Xe()-r.renderingStartTime>Rl&&i!==536870912&&(t.flags|=128,f=!0,ls(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=Xe(),e.sibling=null,i=ft.current,H(ft,f?i&1|2:i&1),Ve&&Mn(t,r.treeForkCount),e):(ot(t),null);case 22:case 23:return Zt(t),ho(),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&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),i=t.updateQueue,i!==null&&El(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),On(pt),ot(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function pv(e,t){switch(Xa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(pt),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(Zt(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(Zt(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(ft),null;case 4:return le(),null;case 10:return On(t.type),null;case 22:case 23:return Zt(t),ho(),e!==null&&I(Di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return On(pt),null;case 25:return null;default:return null}}function sd(e,t){switch(Xa(t),t.tag){case 3:On(pt),le();break;case 26:case 27:case 5:Se(t);break;case 4:le();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:I(ft);break;case 10:On(t.type);break;case 22:case 23:Zt(t),ho(),e!==null&&I(Di);break;case 24:On(pt)}}function as(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(U){Je(t,t.return,U)}}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,U=D.destroy;if(U!==void 0){D.destroy=void 0,f=t;var W=i,te=U;try{te()}catch(oe){Je(f,W,oe)}}}r=r.next}while(r!==y)}}catch(oe){Je(t,t.return,oe)}}function ld(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{$h(t,i)}catch(r){Je(e,e.return,r)}}}function ad(e,t,i){i.props=Bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Je(e,t,r)}}function os(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){Je(e,t,f)}}function wn(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(f){Je(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){Je(e,t,f)}else i.current=null}function od(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){Je(e,e.return,f)}}function Vo(e,t,i){try{var r=e.stateNode;Hv(r,e.type,i,t),r[Ut]=t}catch(f){Je(e,e.return,f)}}function ud(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hi(e.type)||e.tag===4}function Go(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ud(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 Yo(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=Tn));else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Yo(e,t,i),e=e.sibling;e!==null;)Yo(e,t,i),e=e.sibling}function kl(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(kl(e,t,i),e=e.sibling;e!==null;)kl(e,t,i),e=e.sibling}function cd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Rt(t,r,i),t[kt]=e,t[Ut]=i}catch(y){Je(e,e.return,y)}}var jn=!1,gt=!1,Wo=!1,hd=typeof WeakSet=="function"?WeakSet:Set,xt=null;function _v(e,t){if(e=e.containerInfo,pu=Wl,e=Ch(e),Ia(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,U=-1,W=-1,te=0,oe=0,ce=e,ie=null;t:for(;;){for(var se;ce!==i||f!==0&&ce.nodeType!==3||(U=D+f),ce!==y||r!==0&&ce.nodeType!==3||(W=D+r),ce.nodeType===3&&(D+=ce.nodeValue.length),(se=ce.firstChild)!==null;)ie=ce,ce=se;for(;;){if(ce===e)break t;if(ie===i&&++te===f&&(U=D),ie===y&&++oe===r&&(W=D),(se=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=se}i=U===-1||W===-1?null:{start:U,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(_u={focusedElem:e,selectionRange:i},Wl=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,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 be=Bi(i.type,f);e=r.getSnapshotBeforeUpdate(be,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(ke){Je(i,i.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)vu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vu(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,xt=e;break}xt=t.return}}function fd(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Un(e,i),r&4&&as(5,i);break;case 1:if(Un(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(D){Je(i,i.return,D)}else{var f=Bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){Je(i,i.return,D)}}r&64&&ld(i),r&512&&os(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{$h(e,t)}catch(D){Je(i,i.return,D)}}break;case 27:t===null&&r&4&&cd(i);case 26:case 5:Un(e,i),t===null&&r&4&&od(i),r&512&&os(i,i.return);break;case 12:Un(e,i);break;case 31:Un(e,i),r&4&&_d(e,i);break;case 13:Un(e,i),r&4&&md(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=xv.bind(null,i),Vv(e,i))));break;case 22:if(r=i.memoizedState!==null||jn,!r){t=t!==null&&t.memoizedState!==null||gt,f=jn;var y=gt;jn=r,(gt=t)&&!y?Pn(e,i,(i.subtreeFlags&8772)!==0):Un(e,i),jn=f,gt=y}break;case 30:break;default:Un(e,i)}}function dd(e){var t=e.alternate;t!==null&&(e.alternate=null,dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ca(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 ut=null,Ft=!1;function In(e,t,i){for(i=i.child;i!==null;)pd(e,t,i),i=i.sibling}function pd(e,t,i){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Et,i)}catch{}switch(i.tag){case 26:gt||wn(i,t),In(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:gt||wn(i,t);var r=ut,f=Ft;hi(i.type)&&(ut=i.stateNode,Ft=!1),In(e,t,i),gs(i.stateNode),ut=r,Ft=f;break;case 5:gt||wn(i,t);case 6:if(r=ut,f=Ft,ut=null,In(e,t,i),ut=r,Ft=f,ut!==null)if(Ft)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(i.stateNode)}catch(y){Je(i,t,y)}else try{ut.removeChild(i.stateNode)}catch(y){Je(i,t,y)}break;case 18:ut!==null&&(Ft?(e=ut,lp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wr(e)):lp(ut,i.stateNode));break;case 4:r=ut,f=Ft,ut=i.stateNode.containerInfo,Ft=!0,In(e,t,i),ut=r,Ft=f;break;case 0:case 11:case 14:case 15:ri(2,i,t),gt||ri(4,i,t),In(e,t,i);break;case 1:gt||(wn(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&ad(i,t,r)),In(e,t,i);break;case 21:In(e,t,i);break;case 22:gt=(r=gt)||i.memoizedState!==null,In(e,t,i),gt=r;break;default:In(e,t,i)}}function _d(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wr(e)}catch(i){Je(t,t.return,i)}}}function md(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){Je(t,t.return,i)}}function mv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hd),t;default:throw Error(o(435,e.tag))}}function Al(e,t){var i=mv(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var f=Ev.bind(null,e,r);r.then(f,f)}})}function qt(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,U=D;e:for(;U!==null;){switch(U.tag){case 27:if(hi(U.type)){ut=U.stateNode,Ft=!1;break e}break;case 5:ut=U.stateNode,Ft=!1;break e;case 3:case 4:ut=U.stateNode.containerInfo,Ft=!0;break e}U=U.return}if(ut===null)throw Error(o(160));pd(y,D,f),ut=null,Ft=!1,y=f.alternate,y!==null&&(y.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gd(t,e),t=t.sibling}var vn=null;function gd(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qt(t,e),Vt(e),r&4&&(ri(3,e,e.return),as(3,e),ri(5,e,e.return));break;case 1:qt(t,e),Vt(e),r&512&&(gt||i===null||wn(i,i.return)),r&64&&jn&&(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=vn;if(qt(t,e),Vt(e),r&512&&(gt||i===null||wn(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[zr]||y[kt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=f.createElement(r),f.head.insertBefore(y,f.querySelector("head > title"))),Rt(y,r,i),y[kt]=e,wt(y),r=y;break e;case"link":var D=gp("link","href",f).get(r+(i.href||""));if(D){for(var U=0;U<D.length;U++)if(y=D[U],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(U,1);break t}}y=f.createElement(r),Rt(y,r,i),f.head.appendChild(y);break;case"meta":if(D=gp("meta","content",f).get(r+(i.content||""))){for(U=0;U<D.length;U++)if(y=D[U],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(U,1);break t}}y=f.createElement(r),Rt(y,r,i),f.head.appendChild(y);break;default:throw Error(o(468,r))}y[kt]=e,wt(y),r=y}e.stateNode=r}else vp(f,e.type,e.stateNode);else e.stateNode=mp(f,r,e.memoizedProps);else y!==r?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,r===null?vp(f,e.type,e.stateNode):mp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Vo(e,e.memoizedProps,i.memoizedProps)}break;case 27:qt(t,e),Vt(e),r&512&&(gt||i===null||wn(i,i.return)),i!==null&&r&4&&Vo(e,e.memoizedProps,i.memoizedProps);break;case 5:if(qt(t,e),Vt(e),r&512&&(gt||i===null||wn(i,i.return)),e.flags&32){f=e.stateNode;try{Yi(f,"")}catch(be){Je(e,e.return,be)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Vo(e,f,i!==null?i.memoizedProps:f)),r&1024&&(Wo=!0);break;case 6:if(qt(t,e),Vt(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(be){Je(e,e.return,be)}}break;case 3:if(ql=null,f=vn,vn=Pl(t.containerInfo),qt(t,e),vn=f,Vt(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{wr(t.containerInfo)}catch(be){Je(e,e.return,be)}Wo&&(Wo=!1,vd(e));break;case 4:r=vn,vn=Pl(e.stateNode.containerInfo),qt(t,e),Vt(e),vn=r;break;case 12:qt(t,e),Vt(e);break;case 31:qt(t,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 13:qt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Dl=Xe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 22:f=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,te=jn,oe=gt;if(jn=te||f,gt=oe||W,qt(t,e),gt=oe,jn=te,Vt(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||W||jn||gt||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{U=W.stateNode;var ce=W.memoizedProps.style,ie=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;U.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(be){Je(W,W.return,be)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=f?"":W.memoizedProps}catch(be){Je(W,W.return,be)}}}else if(t.tag===18){if(i===null){W=t;try{var se=W.stateNode;f?ap(se,!0):ap(W.stateNode,!1)}catch(be){Je(W,W.return,be)}}}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,Al(e,i))));break;case 19:qt(t,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 30:break;case 21:break;default:qt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(ud(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var f=i.stateNode,y=Go(e);kl(e,y,f);break;case 5:var D=i.stateNode;i.flags&32&&(Yi(D,""),i.flags&=-33);var U=Go(e);kl(e,U,D);break;case 3:case 4:var W=i.stateNode.containerInfo,te=Go(e);Yo(e,te,W);break;default:throw Error(o(161))}}catch(oe){Je(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vd(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;)fd(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:wn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&ad(t,t.return,i),zi(t);break;case 27:gs(t.stateNode);case 26:case 5:wn(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 Pn(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:Pn(f,y,i),as(4,y);break;case 1:if(Pn(f,y,i),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(te){Je(r,r.return,te)}if(r=y,f=r.updateQueue,f!==null){var U=r.stateNode;try{var W=f.shared.hiddenCallbacks;if(W!==null)for(f.shared.hiddenCallbacks=null,f=0;f<W.length;f++)Kh(W[f],U)}catch(te){Je(r,r.return,te)}}i&&D&64&&ld(y),os(y,y.return);break;case 27:cd(y);case 26:case 5:Pn(f,y,i),i&&r===null&&D&4&&od(y),os(y,y.return);break;case 12:Pn(f,y,i);break;case 31:Pn(f,y,i),i&&D&4&&_d(f,y);break;case 13:Pn(f,y,i),i&&D&4&&md(f,y);break;case 22:y.memoizedState===null&&Pn(f,y,i),os(y,y.return);break;case 30:break;default:Pn(f,y,i)}t=t.sibling}}function Ko(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&&Kr(i))}function $o(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kr(e))}function Sn(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sd(e,t,i,r),t=t.sibling}function Sd(e,t,i,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:Sn(e,t,i,r),f&2048&&as(9,t);break;case 1:Sn(e,t,i,r);break;case 3:Sn(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&&Kr(e)));break;case 12:if(f&2048){Sn(e,t,i,r),e=t.stateNode;try{var y=t.memoizedProps,D=y.id,U=y.onPostCommit;typeof U=="function"&&U(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Je(t,t.return,W)}}else Sn(e,t,i,r);break;case 31:Sn(e,t,i,r);break;case 13:Sn(e,t,i,r);break;case 23:break;case 22:y=t.stateNode,D=t.alternate,t.memoizedState!==null?y._visibility&2?Sn(e,t,i,r):us(e,t):y._visibility&2?Sn(e,t,i,r):(y._visibility|=2,fr(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Ko(D,t);break;case 24:Sn(e,t,i,r),f&2048&&$o(t.alternate,t);break;default:Sn(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,U=i,W=r,te=D.flags;switch(D.tag){case 0:case 11:case 15:fr(y,D,U,W,f),as(8,D);break;case 23:break;case 22:var oe=D.stateNode;D.memoizedState!==null?oe._visibility&2?fr(y,D,U,W,f):us(y,D):(oe._visibility|=2,fr(y,D,U,W,f)),f&&te&2048&&Ko(D.alternate,D);break;case 24:fr(y,D,U,W,f),f&&te&2048&&$o(D.alternate,D);break;default:fr(y,D,U,W,f)}t=t.sibling}}function us(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:us(i,r),f&2048&&Ko(r.alternate,r);break;case 24:us(i,r),f&2048&&$o(r.alternate,r);break;default:us(i,r)}t=t.sibling}}var cs=8192;function dr(e,t,i){if(e.subtreeFlags&cs)for(e=e.child;e!==null;)yd(e,t,i),e=e.sibling}function yd(e,t,i){switch(e.tag){case 26:dr(e,t,i),e.flags&cs&&e.memoizedState!==null&&n0(i,vn,e.memoizedState,e.memoizedProps);break;case 5:dr(e,t,i);break;case 3:case 4:var r=vn;vn=Pl(e.stateNode.containerInfo),dr(e,t,i),vn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=cs,cs=16777216,dr(e,t,i),cs=r):dr(e,t,i));break;default:dr(e,t,i)}}function bd(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 hs(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];xt=r,wd(r,e)}bd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Cd(e),e=e.sibling}function Cd(e){switch(e.tag){case 0:case 11:case 15:hs(e),e.flags&2048&&ri(9,e,e.return);break;case 3:hs(e);break;case 12:hs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Tl(e)):hs(e);break;default:hs(e)}}function Tl(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];xt=r,wd(r,e)}bd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ri(8,t,t.return),Tl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Tl(t));break;default:Tl(t)}e=e.sibling}}function wd(e,t){for(;xt!==null;){var i=xt;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:Kr(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,xt=r;else e:for(i=e;xt!==null;){r=xt;var f=r.sibling,y=r.return;if(dd(r),r===i){xt=null;break e}if(f!==null){f.return=y,xt=f;break e}xt=y}}}var gv={getCacheForType:function(e){var t=Tt(pt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Tt(pt).controller.signal}},vv=typeof WeakMap=="function"?WeakMap:Map,Qe=0,rt=null,je=null,Fe=0,Ze=0,Jt=null,si=!1,pr=!1,Xo=!1,Fn=0,ht=0,li=0,Hi=0,Qo=0,en=0,_r=0,fs=null,Gt=null,Zo=!1,Dl=0,xd=0,Rl=1/0,Ml=null,ai=null,Ct=0,oi=null,mr=null,qn=0,Jo=0,eu=null,Ed=null,ds=0,tu=null;function tn(){return(Qe&2)!==0&&Fe!==0?Fe&-Fe:q.T!==null?au():Uc()}function kd(){if(en===0)if((Fe&536870912)===0||Ve){var e=Is;Is<<=1,(Is&3932160)===0&&(Is=262144),en=e}else en=536870912;return e=Qt.current,e!==null&&(e.flags|=32),en}function Yt(e,t,i){(e===rt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(gr(e,0),ui(e,Fe,en,!1)),Br(e,i),((Qe&2)===0||e!==rt)&&(e===rt&&((Qe&2)===0&&(Hi|=i),ht===4&&ui(e,Fe,en,!1)),xn(e))}function Ad(e,t,i){if((Qe&6)!==0)throw Error(o(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Or(e,t),f=r?bv(e,t):iu(e,t,!0),y=r;do{if(f===0){pr&&!r&&ui(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!Sv(i)){f=iu(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 U=e;f=fs;var W=U.current.memoizedState.isDehydrated;if(W&&(gr(U,D).flags|=256),D=iu(U,D,!1),D!==2){if(Xo&&!W){U.errorRecoveryDisabledLanes|=y,Hi|=y,f=4;break e}y=Gt,Gt=f,y!==null&&(Gt===null?Gt=y:Gt.push.apply(Gt,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,en,!si);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(f=Dl+300-Xe(),10<f)){if(ui(r,t,en,!si),Ps(r,0,!0)!==0)break e;qn=t,r.timeoutHandle=rp(Td.bind(null,r,i,Gt,Ml,Zo,t,en,Hi,_r,si,y,"Throttled",-0,0),f);break e}Td(r,i,Gt,Ml,Zo,t,en,Hi,_r,si,y,null,-0,0)}}break}while(!0);xn(e)}function Td(e,t,i,r,f,y,D,U,W,te,oe,ce,ie,se){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tn},yd(t,y,ce);var be=(y&62914560)===y?Dl-Xe():(y&4194048)===y?xd-Xe():0;if(be=i0(ce,be),be!==null){qn=y,e.cancelPendingCommit=be(Hd.bind(null,e,t,y,i,r,f,D,U,W,oe,ce,null,ie,se)),ui(e,y,D,!te);return}}Hd(e,t,y,i,r,f,D,U,W)}function Sv(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(!$t(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&=~Qo,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-it(f),D=1<<y;r[y]=-1,f&=~D}i!==0&&Nc(e,i,t)}function Ll(){return(Qe&6)===0?(ps(0),!1):!0}function nu(){if(je!==null){if(Ze===0)var e=je.return;else e=je,Ln=Ai=null,vo(e),ar=null,Xr=0,e=je;for(;e!==null;)sd(e.alternate,e),e=e.return;je=null}}function gr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Iv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),qn=0,nu(),rt=e,je=i=Rn(e.current,null),Fe=t,Ze=0,Jt=null,si=!1,pr=Or(e,t),Xo=!1,_r=en=Qo=Hi=li=ht=0,Gt=fs=null,Zo=!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-it(r),y=1<<f;t|=e[f],r&=~y}return Fn=t,Js(),i}function Dd(e,t){Oe=null,q.H=rs,t===lr||t===al?(t=Vh(),Ze=3):t===so?(t=Vh(),Ze=4):Ze=t===Bo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,je===null&&(ht=1,bl(e,on(t,e.current)))}function Rd(){var e=Qt.current;return e===null?!0:(Fe&4194048)===Fe?fn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===fn:!1}function Md(){var e=q.H;return q.H=rs,e===null?rs:e}function Ld(){var e=q.A;return q.A=gv,e}function Ol(){ht=4,si||(Fe&4194048)!==Fe&&Qt.current!==null||(pr=!0),(li&134217727)===0&&(Hi&134217727)===0||rt===null||ui(rt,Fe,en,!1)}function iu(e,t,i){var r=Qe;Qe|=2;var f=Md(),y=Ld();(rt!==e||Fe!==t)&&(Ml=null,gr(e,t)),t=!1;var D=ht;e:do try{if(Ze!==0&&je!==null){var U=je,W=Jt;switch(Ze){case 8:nu(),D=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var te=Ze;if(Ze=0,Jt=null,vr(e,U,W,te),i&&pr){D=0;break e}break;default:te=Ze,Ze=0,Jt=null,vr(e,U,W,te)}}yv(),D=ht;break}catch(oe){Dd(e,oe)}while(!0);return t&&e.shellSuspendCounter++,Ln=Ai=null,Qe=r,q.H=f,q.A=y,je===null&&(rt=null,Fe=0,Js()),D}function yv(){for(;je!==null;)Od(je)}function bv(e,t){var i=Qe;Qe|=2;var r=Md(),f=Ld();rt!==e||Fe!==t?(Ml=null,Rl=Xe()+500,gr(e,t)):pr=Or(e,t);e:do try{if(Ze!==0&&je!==null){t=je;var y=Jt;t:switch(Ze){case 1:Ze=0,Jt=null,vr(e,t,y,1);break;case 2:case 9:if(Fh(y)){Ze=0,Jt=null,Bd(t);break}t=function(){Ze!==2&&Ze!==9||rt!==e||(Ze=7),xn(e)},y.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:Fh(y)?(Ze=0,Jt=null,Bd(t)):(Ze=0,Jt=null,vr(e,t,y,7));break;case 5:var D=null;switch(je.tag){case 26:D=je.memoizedState;case 5:case 27:var U=je;if(D?Sp(D):U.stateNode.complete){Ze=0,Jt=null;var W=U.sibling;if(W!==null)je=W;else{var te=U.return;te!==null?(je=te,Bl(te)):je=null}break t}}Ze=0,Jt=null,vr(e,t,y,5);break;case 6:Ze=0,Jt=null,vr(e,t,y,6);break;case 8:nu(),ht=6;break e;default:throw Error(o(462))}}Cv();break}catch(oe){Dd(e,oe)}while(!0);return Ln=Ai=null,q.H=r,q.A=f,Qe=i,je!==null?0:(rt=null,Fe=0,Js(),ht)}function Cv(){for(;je!==null&&!me();)Od(je)}function Od(e){var t=id(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,t===null?Bl(e):je=t}function Bd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Qf(i,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=Qf(i,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:vo(t);default:sd(i,t),t=je=Mh(t,Fn),t=id(i,t,Fn)}e.memoizedProps=e.pendingProps,t===null?Bl(e):je=t}function vr(e,t,i,r){Ln=Ai=null,vo(t),ar=null,Xr=0;var f=t.return;try{if(cv(e,f,t,i,Fe)){ht=1,bl(e,on(i,e.current)),je=null;return}}catch(y){if(f!==null)throw je=f,y;ht=1,bl(e,on(i,e.current)),je=null;return}t.flags&32768?(Ve||r===1?e=!0:pr||(Fe&536870912)!==0?e=!1:(si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qt.current,r!==null&&r.tag===13&&(r.flags|=16384))),zd(t,e)):Bl(t)}function Bl(e){var t=e;do{if((t.flags&32768)!==0){zd(t,si);return}e=t.return;var i=dv(t.alternate,t,Fn);if(i!==null){je=i;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);ht===0&&(ht=5)}function zd(e,t){do{var i=pv(e.alternate,e);if(i!==null){i.flags&=32767,je=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=i}while(e!==null);ht=6,je=null}function Hd(e,t,i,r,f,y,D,U,W){e.cancelPendingCommit=null;do zl();while(Ct!==0);if((Qe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(y=t.lanes|t.childLanes,y|=Va,tg(e,i,y,D,U,W),e===rt&&(je=rt=null,Fe=0),mr=t,oi=e,qn=i,Jo=y,eu=f,Ed=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kv(we,function(){return Pd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=q.T,q.T=null,f=Q.p,Q.p=2,D=Qe,Qe|=4;try{_v(e,t,i)}finally{Qe=D,Q.p=f,q.T=r}}Ct=1,Nd(),jd(),Id()}}function Nd(){if(Ct===1){Ct=0;var e=oi,t=mr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var r=Q.p;Q.p=2;var f=Qe;Qe|=4;try{gd(t,e);var y=_u,D=Ch(e.containerInfo),U=y.focusedElem,W=y.selectionRange;if(D!==U&&U&&U.ownerDocument&&bh(U.ownerDocument.documentElement,U)){if(W!==null&&Ia(U)){var te=W.start,oe=W.end;if(oe===void 0&&(oe=te),"selectionStart"in U)U.selectionStart=te,U.selectionEnd=Math.min(oe,U.value.length);else{var ce=U.ownerDocument||document,ie=ce&&ce.defaultView||window;if(ie.getSelection){var se=ie.getSelection(),be=U.textContent.length,ke=Math.min(W.start,be),nt=W.end===void 0?ke:Math.min(W.end,be);!se.extend&&ke>nt&&(D=nt,nt=ke,ke=D);var Z=yh(U,ke),X=yh(U,nt);if(Z&&X&&(se.rangeCount!==1||se.anchorNode!==Z.node||se.anchorOffset!==Z.offset||se.focusNode!==X.node||se.focusOffset!==X.offset)){var ee=ce.createRange();ee.setStart(Z.node,Z.offset),se.removeAllRanges(),ke>nt?(se.addRange(ee),se.extend(X.node,X.offset)):(ee.setEnd(X.node,X.offset),se.addRange(ee))}}}}for(ce=[],se=U;se=se.parentNode;)se.nodeType===1&&ce.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ce.length;U++){var ue=ce[U];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Wl=!!pu,_u=pu=null}finally{Qe=f,Q.p=r,q.T=i}}e.current=t,Ct=2}}function jd(){if(Ct===2){Ct=0;var e=oi,t=mr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var r=Q.p;Q.p=2;var f=Qe;Qe|=4;try{fd(e,t.alternate,t)}finally{Qe=f,Q.p=r,q.T=i}}Ct=3}}function Id(){if(Ct===4||Ct===3){Ct=0,Ae();var e=oi,t=mr,i=qn,r=Ed;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ct=5:(Ct=0,mr=oi=null,Ud(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ai=null),ya(i),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Et,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=q.T,f=Q.p,Q.p=2,q.T=null;try{for(var y=e.onRecoverableError,D=0;D<r.length;D++){var U=r[D];y(U.value,{componentStack:U.stack})}}finally{q.T=t,Q.p=f}}(qn&3)!==0&&zl(),xn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===tu?ds++:(ds=0,tu=e):ds=0,ps(0)}}function Ud(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Kr(t)))}function zl(){return Nd(),jd(),Id(),Pd()}function Pd(){if(Ct!==5)return!1;var e=oi,t=Jo;Jo=0;var i=ya(qn),r=q.T,f=Q.p;try{Q.p=32>i?32:i,q.T=null,i=eu,eu=null;var y=oi,D=qn;if(Ct=0,mr=oi=null,qn=0,(Qe&6)!==0)throw Error(o(331));var U=Qe;if(Qe|=4,Cd(y.current),Sd(y,y.current,D,i),Qe=U,ps(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Et,y)}catch{}return!0}finally{Q.p=f,q.T=r,Ud(e,t)}}function Fd(e,t,i){t=on(i,t),t=Oo(e.stateNode,t,2),e=ti(e,t,2),e!==null&&(Br(e,2),xn(e))}function Je(e,t,i){if(e.tag===3)Fd(e,e,i);else for(;t!==null;){if(t.tag===3){Fd(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=on(i,e),i=qf(2),r=ti(t,i,2),r!==null&&(Vf(i,r,t,e),Br(r,2),xn(r));break}}t=t.return}}function ru(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new vv;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)||(Xo=!0,f.add(i),e=wv.bind(null,e,t,i),t.then(e,e))}function wv(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,rt===e&&(Fe&i)===i&&(ht===4||ht===3&&(Fe&62914560)===Fe&&300>Xe()-Dl?(Qe&2)===0&&gr(e,0):Qo|=i,_r===Fe&&(_r=0)),xn(e)}function qd(e,t){t===0&&(t=Hc()),e=xi(e,t),e!==null&&(Br(e,t),xn(e))}function xv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),qd(e,i)}function Ev(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),qd(e,i)}function kv(e,t){return Mt(e,t)}var Hl=null,Sr=null,su=!1,Nl=!1,lu=!1,ci=0;function xn(e){e!==Sr&&e.next===null&&(Sr===null?Hl=Sr=e:Sr=Sr.next=e),Nl=!0,su||(su=!0,Tv())}function ps(e,t){if(!lu&&Nl){lu=!0;do for(var i=!1,r=Hl;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var y=0;else{var D=r.suspendedLanes,U=r.pingedLanes;y=(1<<31-it(42|e)+1)-1,y&=f&~(D&~U),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,Wd(r,y))}else y=Fe,y=Ps(r,r===rt?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||Or(r,y)||(i=!0,Wd(r,y));r=r.next}while(i);lu=!1}}function Av(){Vd()}function Vd(){Nl=su=!1;var e=0;ci!==0&&jv()&&(e=ci);for(var t=Xe(),i=null,r=Hl;r!==null;){var f=r.next,y=Gd(r,t);y===0?(r.next=null,i===null?Hl=f:i.next=f,f===null&&(Sr=i)):(i=r,(e!==0||(y&3)!==0)&&(Nl=!0)),r=f}Ct!==0&&Ct!==5||ps(e),ci!==0&&(ci=0)}function Gd(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var D=31-it(y),U=1<<D,W=f[D];W===-1?((U&i)===0||(U&r)!==0)&&(f[D]=eg(U,t)):W<=t&&(e.expiredLanes|=U),y&=~U}if(t=rt,i=Fe,i=Ps(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ht(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Or(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&Ht(r),ya(i)){case 2:case 8:i=ve;break;case 32:i=we;break;case 268435456:i=Ne;break;default:i=we}return r=Yd.bind(null,e),i=Mt(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&Ht(r),e.callbackPriority=2,e.callbackNode=null,2}function Yd(e,t){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(zl()&&e.callbackNode!==i)return null;var r=Fe;return r=Ps(e,e===rt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ad(e,r,t),Gd(e,Xe()),e.callbackNode!=null&&e.callbackNode===i?Yd.bind(null,e):null)}function Wd(e,t){if(zl())return null;Ad(e,t,!0)}function Tv(){Uv(function(){(Qe&6)!==0?Mt(ae,Av):Vd()})}function au(){if(ci===0){var e=rr;e===0&&(e=js,js<<=1,(js&261888)===0&&(js=256)),ci=e}return ci}function Kd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gs(""+e)}function $d(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 Dv(e,t,i,r,f){if(t==="submit"&&i&&i.stateNode===f){var y=Kd((f[Ut]||null).action),D=r.submitter;D&&(t=(t=D[Ut]||null)?Kd(t.formAction):D.getAttribute("formAction"),t!==null&&(y=t,D=null));var U=new $s("action","action",null,r,f);e.push({event:U,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ci!==0){var W=D?$d(f,D):new FormData(f);Ao(i,{pending:!0,data:W,method:f.method,action:y},null,W)}}else typeof y=="function"&&(U.preventDefault(),W=D?$d(f,D):new FormData(f),Ao(i,{pending:!0,data:W,method:f.method,action:y},y,W))},currentTarget:f}]})}}for(var ou=0;ou<qa.length;ou++){var uu=qa[ou],Rv=uu.toLowerCase(),Mv=uu[0].toUpperCase()+uu.slice(1);gn(Rv,"on"+Mv)}gn(Eh,"onAnimationEnd"),gn(kh,"onAnimationIteration"),gn(Ah,"onAnimationStart"),gn("dblclick","onDoubleClick"),gn("focusin","onFocus"),gn("focusout","onBlur"),gn(Wg,"onTransitionRun"),gn(Kg,"onTransitionStart"),gn($g,"onTransitionCancel"),gn(Th,"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 _s="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(" "),Lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_s));function Xd(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 U=r[D],W=U.instance,te=U.currentTarget;if(U=U.listener,W!==y&&f.isPropagationStopped())break e;y=U,f.currentTarget=te;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=W}else for(D=0;D<r.length;D++){if(U=r[D],W=U.instance,te=U.currentTarget,U=U.listener,W!==y&&f.isPropagationStopped())break e;y=U,f.currentTarget=te;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=W}}}}function Ie(e,t){var i=t[ba];i===void 0&&(i=t[ba]=new Set);var r=e+"__bubble";i.has(r)||(Qd(t,e,2,!1),i.add(r))}function cu(e,t,i){var r=0;t&&(r|=4),Qd(i,e,r,t)}var jl="_reactListening"+Math.random().toString(36).slice(2);function hu(e){if(!e[jl]){e[jl]=!0,qc.forEach(function(i){i!=="selectionchange"&&(Lv.has(i)||cu(i,!1,e),cu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jl]||(t[jl]=!0,cu("selectionchange",!1,t))}}function Qd(e,t,i,r){switch(kp(t)){case 2:var f=l0;break;case 8:f=a0;break;default:f=ku}i=f.bind(null,t,i,e),f=void 0,!Ra||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 fu(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 U=r.stateNode.containerInfo;if(U===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(;U!==null;){if(D=Pi(U),D===null)return;if(W=D.tag,W===5||W===6||W===26||W===27){r=y=D;continue e}U=U.parentNode}}r=r.return}th(function(){var te=y,oe=Ta(i),ce=[];e:{var ie=Dh.get(e);if(ie!==void 0){var se=$s,be=e;switch(e){case"keypress":if(Ws(i)===0)break e;case"keydown":case"keyup":se=Eg;break;case"focusin":be="focus",se=Ba;break;case"focusout":be="blur",se=Ba;break;case"beforeblur":case"afterblur":se=Ba;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":se=rh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=dg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Tg;break;case Eh:case kh:case Ah:se=mg;break;case Th:se=Rg;break;case"scroll":case"scrollend":se=hg;break;case"wheel":se=Lg;break;case"copy":case"cut":case"paste":se=vg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=lh;break;case"toggle":case"beforetoggle":se=Bg}var ke=(t&4)!==0,nt=!ke&&(e==="scroll"||e==="scrollend"),Z=ke?ie!==null?ie+"Capture":null:ie;ke=[];for(var X=te,ee;X!==null;){var ue=X;if(ee=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||ee===null||Z===null||(ue=Nr(X,Z),ue!=null&&ke.push(ms(X,ue,ee))),nt)break;X=X.return}0<ke.length&&(ie=new se(ie,be,null,i,oe),ce.push({event:ie,listeners:ke}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",ie&&i!==Aa&&(be=i.relatedTarget||i.fromElement)&&(Pi(be)||be[Ui]))break e;if((se||ie)&&(ie=oe.window===oe?oe:(ie=oe.ownerDocument)?ie.defaultView||ie.parentWindow:window,se?(be=i.relatedTarget||i.toElement,se=te,be=be?Pi(be):null,be!==null&&(nt=b(be),ke=be.tag,be!==nt||ke!==5&&ke!==27&&ke!==6)&&(be=null)):(se=null,be=te),se!==be)){if(ke=rh,ue="onMouseLeave",Z="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(ke=lh,ue="onPointerLeave",Z="onPointerEnter",X="pointer"),nt=se==null?ie:Hr(se),ee=be==null?ie:Hr(be),ie=new ke(ue,X+"leave",se,i,oe),ie.target=nt,ie.relatedTarget=ee,ue=null,Pi(oe)===te&&(ke=new ke(Z,X+"enter",be,i,oe),ke.target=ee,ke.relatedTarget=nt,ue=ke),nt=ue,se&&be)t:{for(ke=Ov,Z=se,X=be,ee=0,ue=Z;ue;ue=ke(ue))ee++;ue=0;for(var xe=X;xe;xe=ke(xe))ue++;for(;0<ee-ue;)Z=ke(Z),ee--;for(;0<ue-ee;)X=ke(X),ue--;for(;ee--;){if(Z===X||X!==null&&Z===X.alternate){ke=Z;break t}Z=ke(Z),X=ke(X)}ke=null}else ke=null;se!==null&&Zd(ce,ie,se,ke,!1),be!==null&&nt!==null&&Zd(ce,nt,be,ke,!0)}}e:{if(ie=te?Hr(te):window,se=ie.nodeName&&ie.nodeName.toLowerCase(),se==="select"||se==="input"&&ie.type==="file")var We=ph;else if(fh(ie))if(_h)We=Vg;else{We=Fg;var Ce=Pg}else se=ie.nodeName,!se||se.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&ka(te.elementType)&&(We=ph):We=qg;if(We&&(We=We(e,te))){dh(ce,We,i,oe);break e}Ce&&Ce(e,ie,te),e==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&Ea(ie,"number",ie.value)}switch(Ce=te?Hr(te):window,e){case"focusin":(fh(Ce)||Ce.contentEditable==="true")&&(Xi=Ce,Ua=te,Gr=null);break;case"focusout":Gr=Ua=Xi=null;break;case"mousedown":Pa=!0;break;case"contextmenu":case"mouseup":case"dragend":Pa=!1,wh(ce,i,oe);break;case"selectionchange":if(Yg)break;case"keydown":case"keyup":wh(ce,i,oe)}var ze;if(Ha)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else $i?ch(e,i)&&(qe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(qe="onCompositionStart");qe&&(ah&&i.locale!=="ko"&&($i||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&$i&&(ze=nh()):(Kn=oe,Ma="value"in Kn?Kn.value:Kn.textContent,$i=!0)),Ce=Il(te,qe),0<Ce.length&&(qe=new sh(qe,e,null,i,oe),ce.push({event:qe,listeners:Ce}),ze?qe.data=ze:(ze=hh(i),ze!==null&&(qe.data=ze)))),(ze=Hg?Ng(e,i):jg(e,i))&&(qe=Il(te,"onBeforeInput"),0<qe.length&&(Ce=new sh("onBeforeInput","beforeinput",null,i,oe),ce.push({event:Ce,listeners:qe}),Ce.data=ze)),Dv(ce,e,te,i,oe)}Xd(ce,t)})}function ms(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Il(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=Nr(e,i),f!=null&&r.unshift(ms(e,f,y)),f=Nr(e,t),f!=null&&r.push(ms(e,f,y))),e.tag===3)return r;e=e.return}return[]}function Ov(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zd(e,t,i,r,f){for(var y=t._reactName,D=[];i!==null&&i!==r;){var U=i,W=U.alternate,te=U.stateNode;if(U=U.tag,W!==null&&W===r)break;U!==5&&U!==26&&U!==27||te===null||(W=te,f?(te=Nr(i,y),te!=null&&D.unshift(ms(i,te,W))):f||(te=Nr(i,y),te!=null&&D.push(ms(i,te,W)))),i=i.return}D.length!==0&&e.push({event:t,listeners:D})}var Bv=/\r\n?/g,zv=/\u0000|\uFFFD/g;function Jd(e){return(typeof e=="string"?e:""+e).replace(Bv,`
49
- `).replace(zv,"")}function ep(e,t){return t=Jd(t),Jd(e)===t}function tt(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":qs(e,"class",r);break;case"tabIndex":qs(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":qs(e,i,r);break;case"style":Jc(e,r,y);break;case"data":if(t!=="object"){qs(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=Gs(""+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"&&tt(e,t,"name",f.name,f,null),tt(e,t,"formEncType",f.formEncType,f,null),tt(e,t,"formMethod",f.formMethod,f,null),tt(e,t,"formTarget",f.formTarget,f,null)):(tt(e,t,"encType",f.encType,f,null),tt(e,t,"method",f.method,f,null),tt(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Gs(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=Tn);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("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=Gs(""+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":Ie("beforetoggle",e),Ie("toggle",e),Fs(e,"popover",r);break;case"xlinkActuate":An(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":An(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":An(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":An(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":An(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":An(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":An(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":An(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":An(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Fs(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=ug.get(i)||i,Fs(e,i,r))}}function du(e,t,i,r,f,y){switch(i){case"style":Jc(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&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vc.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[Ut]||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,""):Fs(e,i,r)}}}function Rt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("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:tt(e,t,y,D,i,null)}}f&&tt(e,t,"srcSet",i.srcSet,i,null),r&&tt(e,t,"src",i.src,i,null);return;case"input":Ie("invalid",e);var U=y=D=f=null,W=null,te=null;for(r in i)if(i.hasOwnProperty(r)){var oe=i[r];if(oe!=null)switch(r){case"name":f=oe;break;case"type":D=oe;break;case"checked":W=oe;break;case"defaultChecked":te=oe;break;case"value":y=oe;break;case"defaultValue":U=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:tt(e,t,r,oe,i,null)}}$c(e,y,U,W,te,D,f,!1);return;case"select":Ie("invalid",e),r=D=y=null;for(f in i)if(i.hasOwnProperty(f)&&(U=i[f],U!=null))switch(f){case"value":y=U;break;case"defaultValue":D=U;break;case"multiple":r=U;default:tt(e,t,f,U,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":Ie("invalid",e),y=f=r=null;for(D in i)if(i.hasOwnProperty(D)&&(U=i[D],U!=null))switch(D){case"value":r=U;break;case"defaultValue":f=U;break;case"children":y=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:tt(e,t,D,U,i,null)}Qc(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:tt(e,t,W,r,i,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(r=0;r<_s.length;r++)Ie(_s[r],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(te in i)if(i.hasOwnProperty(te)&&(r=i[te],r!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:tt(e,t,te,r,i,null)}return;default:if(ka(t)){for(oe in i)i.hasOwnProperty(oe)&&(r=i[oe],r!==void 0&&du(e,t,oe,r,i,void 0));return}}for(U in i)i.hasOwnProperty(U)&&(r=i[U],r!=null&&tt(e,t,U,r,i,null))}function Hv(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,U=null,W=null,te=null,oe=null;for(se in i){var ce=i[se];if(i.hasOwnProperty(se)&&ce!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":W=ce;default:r.hasOwnProperty(se)||tt(e,t,se,null,r,ce)}}for(var ie in r){var se=r[ie];if(ce=i[ie],r.hasOwnProperty(ie)&&(se!=null||ce!=null))switch(ie){case"type":y=se;break;case"name":f=se;break;case"checked":te=se;break;case"defaultChecked":oe=se;break;case"value":D=se;break;case"defaultValue":U=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:se!==ce&&tt(e,t,ie,se,r,ce)}}xa(e,D,U,W,te,oe,y,f);return;case"select":se=D=U=ie=null;for(y in i)if(W=i[y],i.hasOwnProperty(y)&&W!=null)switch(y){case"value":break;case"multiple":se=W;default:r.hasOwnProperty(y)||tt(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":ie=y;break;case"defaultValue":U=y;break;case"multiple":D=y;default:y!==W&&tt(e,t,f,y,r,W)}t=U,i=D,r=se,ie!=null?Gi(e,!!i,ie,!1):!!r!=!!i&&(t!=null?Gi(e,!!i,t,!0):Gi(e,!!i,i?[]:"",!1));return;case"textarea":se=ie=null;for(U in i)if(f=i[U],i.hasOwnProperty(U)&&f!=null&&!r.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:tt(e,t,U,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":ie=f;break;case"defaultValue":se=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==y&&tt(e,t,D,f,r,y)}Xc(e,ie,se);return;case"option":for(var be in i)if(ie=i[be],i.hasOwnProperty(be)&&ie!=null&&!r.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:tt(e,t,be,null,r,ie)}for(W in r)if(ie=r[W],se=i[W],r.hasOwnProperty(W)&&ie!==se&&(ie!=null||se!=null))switch(W){case"selected":e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:tt(e,t,W,ie,r,se)}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 ke in i)ie=i[ke],i.hasOwnProperty(ke)&&ie!=null&&!r.hasOwnProperty(ke)&&tt(e,t,ke,null,r,ie);for(te in r)if(ie=r[te],se=i[te],r.hasOwnProperty(te)&&ie!==se&&(ie!=null||se!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:tt(e,t,te,ie,r,se)}return;default:if(ka(t)){for(var nt in i)ie=i[nt],i.hasOwnProperty(nt)&&ie!==void 0&&!r.hasOwnProperty(nt)&&du(e,t,nt,void 0,r,ie);for(oe in r)ie=r[oe],se=i[oe],!r.hasOwnProperty(oe)||ie===se||ie===void 0&&se===void 0||du(e,t,oe,ie,r,se);return}}for(var Z in i)ie=i[Z],i.hasOwnProperty(Z)&&ie!=null&&!r.hasOwnProperty(Z)&&tt(e,t,Z,null,r,ie);for(ce in r)ie=r[ce],se=i[ce],!r.hasOwnProperty(ce)||ie===se||ie==null&&se==null||tt(e,t,ce,ie,r,se)}function tp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Nv(){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,U=f.duration;if(y&&U&&tp(D)){for(D=0,U=f.responseEnd,r+=1;r<i.length;r++){var W=i[r],te=W.startTime;if(te>U)break;var oe=W.transferSize,ce=W.initiatorType;oe&&tp(ce)&&(W=W.responseEnd,D+=oe*(W<U?1:(U-te)/(W-te)))}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 pu=null,_u=null;function Ul(e){return e.nodeType===9?e:e.ownerDocument}function np(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 ip(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 mu(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 gu=null;function jv(){var e=window.event;return e&&e.type==="popstate"?e===gu?!1:(gu=e,!0):(gu=null,!1)}var rp=typeof setTimeout=="function"?setTimeout:void 0,Iv=typeof clearTimeout=="function"?clearTimeout:void 0,sp=typeof Promise=="function"?Promise:void 0,Uv=typeof queueMicrotask=="function"?queueMicrotask:typeof sp<"u"?function(e){return sp.resolve(null).then(e).catch(Pv)}:rp;function Pv(e){setTimeout(function(){throw e})}function hi(e){return e==="head"}function lp(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")gs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,gs(i);for(var y=i.firstChild;y;){var D=y.nextSibling,U=y.nodeName;y[zr]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=D}}else i==="body"&&gs(e.ownerDocument.body);i=f}while(i);wr(t)}function ap(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 vu(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":vu(i),Ca(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Fv(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[zr])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=dn(e.nextSibling),e===null)break}return null}function qv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=dn(e.nextSibling),e===null))return null;return e}function op(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=dn(e.nextSibling),e===null))return null;return e}function Su(e){return e.data==="$?"||e.data==="$~"}function yu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vv(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 dn(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 bu=null;function up(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return dn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function cp(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 hp(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 gs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ca(e)}var pn=new Map,fp=new Set;function Pl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Vn=Q.d;Q.d={f:Gv,r:Yv,D:Wv,C:Kv,L:$v,m:Xv,X:Zv,S:Qv,M:Jv};function Gv(){var e=Vn.f(),t=Ll();return e||t}function Yv(e){var t=Fi(e);t!==null&&t.tag===5&&t.type==="form"?Df(t):Vn.r(e)}var yr=typeof document>"u"?null:document;function dp(e,t,i){var r=yr;if(r&&typeof t=="string"&&t){var f=ln(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),fp.has(f)||(fp.add(f),e={rel:e,crossOrigin:i,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),Rt(t,"link",e),wt(t),r.head.appendChild(t)))}}function Wv(e){Vn.D(e),dp("dns-prefetch",e,null)}function Kv(e,t){Vn.C(e,t),dp("preconnect",e,t)}function $v(e,t,i){Vn.L(e,t,i);var r=yr;if(r&&e&&t){var f='link[rel="preload"][as="'+ln(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+ln(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+ln(i.imageSizes)+'"]')):f+='[href="'+ln(e)+'"]';var y=f;switch(t){case"style":y=br(e);break;case"script":y=Cr(e)}pn.has(y)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),pn.set(y,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(vs(y))||t==="script"&&r.querySelector(Ss(y))||(t=r.createElement("link"),Rt(t,"link",e),wt(t),r.head.appendChild(t)))}}function Xv(e,t){Vn.m(e,t);var i=yr;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+ln(r)+'"][href="'+ln(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Cr(e)}if(!pn.has(y)&&(e=c({rel:"modulepreload",href:e},t),pn.set(y,e),i.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ss(y)))return}r=i.createElement("link"),Rt(r,"link",e),wt(r),i.head.appendChild(r)}}}function Qv(e,t,i){Vn.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 U={loading:0,preload:null};if(D=r.querySelector(vs(y)))U.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=pn.get(y))&&Cu(e,i);var W=D=r.createElement("link");wt(W),Rt(W,"link",e),W._p=new Promise(function(te,oe){W.onload=te,W.onerror=oe}),W.addEventListener("load",function(){U.loading|=1}),W.addEventListener("error",function(){U.loading|=2}),U.loading|=4,Fl(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:U},f.set(y,D)}}}function Zv(e,t){Vn.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(Ss(f)),y||(e=c({src:e,async:!0},t),(t=pn.get(f))&&wu(e,t),y=i.createElement("script"),wt(y),Rt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function Jv(e,t){Vn.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(Ss(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=pn.get(f))&&wu(e,t),y=i.createElement("script"),wt(y),Rt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function pp(e,t,i,r){var f=(f=he.current)?Pl(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(vs(e)))&&!y._p&&(D.instance=y,D.state.loading=5),pn.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},pn.set(e,i),y||e0(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="'+ln(e)+'"'}function vs(e){return'link[rel="stylesheet"]['+e+"]"}function _p(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function e0(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}),Rt(t,"link",i),wt(t),e.head.appendChild(t))}function Cr(e){return'[src="'+ln(e)+'"]'}function Ss(e){return"script[async]"+e}function mp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+ln(i.href)+'"]');if(r)return t.instance=r,wt(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"),wt(r),Rt(r,"style",f),Fl(r,i.precedence,e),t.instance=r;case"stylesheet":f=br(i.href);var y=e.querySelector(vs(f));if(y)return t.state.loading|=4,t.instance=y,wt(y),y;r=_p(i),(f=pn.get(f))&&Cu(r,f),y=(e.ownerDocument||e).createElement("link"),wt(y);var D=y;return D._p=new Promise(function(U,W){D.onload=U,D.onerror=W}),Rt(y,"link",r),t.state.loading|=4,Fl(y,i.precedence,e),t.instance=y;case"script":return y=Cr(i.src),(f=e.querySelector(Ss(y)))?(t.instance=f,wt(f),f):(r=i,(f=pn.get(y))&&(r=c({},i),wu(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),wt(f),Rt(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,Fl(r,i.precedence,e));return t.instance}function Fl(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 U=r[D];if(U.dataset.precedence===t)y=U;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 Cu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ql=null;function gp(e,t,i){if(ql===null){var r=new Map,f=ql=new Map;f.set(i,r)}else f=ql,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[zr]||y[kt]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var D=y.getAttribute(t)||"";D=e+D;var U=r.get(D);U?U.push(y):r.set(D,[y])}}return r}function vp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function t0(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 Sp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function n0(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(vs(f));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=y,wt(y);return}y=t.ownerDocument||t,r=_p(r),(f=pn.get(f))&&Cu(r,f),y=y.createElement("link"),wt(y);var D=y;D._p=new Promise(function(U,W){D.onload=U,D.onerror=W}),Rt(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=Vl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var xu=0;function i0(e,t){return e.stylesheets&&e.count===0&&Yl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Yl(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+t);0<e.imgBytes&&xu===0&&(xu=62500*Nv());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yl(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>xu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function Vl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Gl=null;function Yl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gl=new Map,t.forEach(r0,e),Gl=null,Vl.call(e))}function r0(e,t){if(!(t.state.loading&4)){var i=Gl.get(e);if(i)var r=i.get(null);else{i=new Map,Gl.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=Vl.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 ys={$$typeof:m,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function s0(e,t,i,r,f,y,D,U,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=va(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.hiddenUpdates=va(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 yp(e,t,i,r,f,y,D,U,W,te,oe,ce){return e=new s0(e,t,i,D,W,te,oe,ce,U),t=1,y===!0&&(t|=24),y=Xt(3,null,null,t),e.current=y,y.stateNode=e,t=no(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:r,isDehydrated:i,cache:t},lo(y),e}function bp(e){return e?(e=Ji,e):Ji}function Cp(e,t,i,r,f,y){f=bp(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&&(Yt(i,e,t),Zr(i,e,t))}function wp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Eu(e,t){wp(e,t),(e=e.alternate)&&wp(e,t)}function xp(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Yt(t,e,67108864),Eu(e,67108864)}}function Ep(e){if(e.tag===13||e.tag===31){var t=tn();t=Sa(t);var i=xi(e,t);i!==null&&Yt(i,e,t),Eu(e,t)}}var Wl=!0;function l0(e,t,i,r){var f=q.T;q.T=null;var y=Q.p;try{Q.p=2,ku(e,t,i,r)}finally{Q.p=y,q.T=f}}function a0(e,t,i,r){var f=q.T;q.T=null;var y=Q.p;try{Q.p=8,ku(e,t,i,r)}finally{Q.p=y,q.T=f}}function ku(e,t,i,r){if(Wl){var f=Au(r);if(f===null)fu(e,t,r,Kl,i),Ap(e,r);else if(u0(f,e,t,i,r))r.stopPropagation();else if(Ap(e,r),t&4&&-1<o0.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 U=y;for(U.pendingLanes|=2,U.entangledLanes|=2;D;){var W=1<<31-it(D);U.entanglements[1]|=W,D&=~W}xn(y),(Qe&6)===0&&(Rl=Xe()+500,ps(0))}}break;case 31:case 13:U=xi(y,2),U!==null&&Yt(U,y,2),Ll(),Eu(y,2)}if(y=Au(r),y===null&&fu(e,t,r,Kl,i),y===f)break;f=y}f!==null&&r.stopPropagation()}else fu(e,t,r,null,i)}}function Au(e){return e=Ta(e),Tu(e)}var Kl=null;function Tu(e){if(Kl=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=_(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 Kl=e,null}function kp(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(Lt()){case ae:return 2;case ve:return 8;case we:case Le:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var Du=!1,fi=null,di=null,pi=null,bs=new Map,Cs=new Map,_i=[],o0="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 Ap(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":bs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cs.delete(t.pointerId)}}function ws(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&&xp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function u0(e,t,i,r,f){switch(t){case"focusin":return fi=ws(fi,e,t,i,r,f),!0;case"dragenter":return di=ws(di,e,t,i,r,f),!0;case"mouseover":return pi=ws(pi,e,t,i,r,f),!0;case"pointerover":var y=f.pointerId;return bs.set(y,ws(bs.get(y)||null,e,t,i,r,f)),!0;case"gotpointercapture":return y=f.pointerId,Cs.set(y,ws(Cs.get(y)||null,e,t,i,r,f)),!0}return!1}function Tp(e){var t=Pi(e.target);if(t!==null){var i=b(t);if(i!==null){if(t=i.tag,t===13){if(t=_(i),t!==null){e.blockedOn=t,Pc(e.priority,function(){Ep(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Pc(e.priority,function(){Ep(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 $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Au(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);Aa=r,i.target.dispatchEvent(r),Aa=null}else return t=Fi(i),t!==null&&xp(t),e.blockedOn=i,!1;t.shift()}return!0}function Dp(e,t,i){$l(e)&&i.delete(t)}function c0(){Du=!1,fi!==null&&$l(fi)&&(fi=null),di!==null&&$l(di)&&(di=null),pi!==null&&$l(pi)&&(pi=null),bs.forEach(Dp),Cs.forEach(Dp)}function Xl(e,t){e.blockedOn===t&&(e.blockedOn=null,Du||(Du=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,c0)))}var Ql=null;function Rp(e){Ql!==e&&(Ql=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ql===e&&(Ql=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(Tu(r||i)===null)continue;break}var y=Fi(i);y!==null&&(e.splice(t,3),t-=3,Ao(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),bs.forEach(t),Cs.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);)Tp(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[Ut]||null;if(typeof y=="function")D||Rp(i);else if(D){var U=null;if(y&&y.hasAttribute("formAction")){if(f=y,D=y[Ut]||null)U=D.formAction;else if(Tu(f)!==null)continue}else U=D.action;typeof U=="function"?i[r+1]=U:(i.splice(r,3),r-=3),Rp(i)}}}function Mp(){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 Ru(e){this._internalRoot=e}Zl.prototype.render=Ru.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,r=tn();Cp(i,r,e,t,null,null)},Zl.prototype.unmount=Ru.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cp(e.current,2,null,e,null,null),Ll(),t[Ui]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uc();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&&Tp(e)}};var Lp=s.version;if(Lp!=="19.2.6")throw Error(o(527,Lp,"19.2.6"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var h0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jl.isDisabled&&Jl.supportsFiber)try{Et=Jl.inject(h0),bt=Jl}catch{}}return Es.createRoot=function(e,t){if(!v(e))throw Error(o(299));var i=!1,r="",f=If,y=Uf,D=Pf;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=yp(e,1,!1,null,null,i,r,null,f,y,D,Mp),e[Ui]=t.current,hu(e),new Ru(t)},Es.hydrateRoot=function(e,t,i){if(!v(e))throw Error(o(299));var r=!1,f="",y=If,D=Uf,U=Pf,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&&(U=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=yp(e,1,!0,t,i??null,r,f,W,y,D,U,Mp),t.context=bp(null),i=t.current,r=tn(),r=Sa(r),f=ei(r),f.callback=null,ti(i,f,r),i=r,t.current.lanes=i,Br(t,i),xn(t),e[Ui]=t.current,hu(e),new Zl(t)},Es.version="19.2.6",Es}var qp;function w0(){if(qp)return Ou.exports;qp=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}var x0=w0();function E0({sidebar:n,children:s}){const[l,o]=de.useState(!1);return j.jsxs("div",{className:l?"app-shell is-sidebar-collapsed":"app-shell",children:[j.jsxs("aside",{className:"app-sidebar",children:[j.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":l?"Expand sidebar":"Collapse sidebar",title:l?"Expand sidebar":"Collapse sidebar",onClick:()=>o(v=>!v)}),j.jsx("div",{className:"sidebar-content",children:n})]}),j.jsx("main",{className:"app-main",children:s})]})}function k0(n,s){return n.find(l=>l.taskSlug===s)??n[0]??null}const De={getAppPreferences(){return Ue("/api/settings/preferences")},updateAppPreferences(n){return Ue("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return Ue("/api/projects/current")},getRecentRepositoryPaths(){return Ue("/api/projects/recent")},connectProject(n){return Ue("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Ue("/api/tasks")},createTask(n){return Ue("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,s={}){return Ue(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return Ue("/api/projects/harness")},applyHarness(){return Ue("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return Ue("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Ue("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,s,l={}){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(n,s){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(n,s,l={}){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(n,s,l={}){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(n,s){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,s){return Ue(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTaskRoundState(n){return Ue(`/api/tasks/${encodeURIComponent(n)}/round`)},getTranslationSettings(){return Ue("/api/translation/settings")},updateTranslationSettings(n){return Ue("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return Ue("/api/translation/prompts")},testTranslationProvider(){return Ue("/api/translation/test",{method:"POST"})},startTranslationSession(n,s){return Ue(`/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)),Ue(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,s,l){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(n,s,l){return Ue(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(n){return Ue(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,s){return Ue(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(s)}`,{method:"POST"})},ignoreTranslationFailures(n){return Ue(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Ue(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})}};async function Ue(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 _=await o.json().catch(()=>null),a=(v=_==null?void 0:_.error)!=null&&v.hint?`${_.error.message} ${_.error.hint}`:((b=_==null?void 0:_.error)==null?void 0:b.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function A0({events:n,maxEvents:s=8,showHeader:l=!0}){const o=s===null?n:n.slice(-s);return j.jsxs("section",{className:"event-log",children:[l?j.jsx("h2",{children:"Events"}):null,n.length===0?j.jsx("p",{className:"muted",children:"No terminal events yet."}):j.jsx("ol",{children:o.map((v,b)=>j.jsx("li",{children:v},`${v}-${b}`))})]})}var Nu={exports:{}},Vp;function T0(){return Vp||(Vp=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 _=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"))),d=window.getComputedStyle(this._terminal.element),c=u-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),C=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-_;return{cols:Math.max(2,Math.floor(C/b.css.cell.width)),rows:Math.max(1,Math.floor(c/b.css.cell.height))}}}})(),l})()))})(Nu)),Nu.exports}var D0=T0(),ju={exports:{}},Gp;function R0(){return Gp||(Gp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={6:(_,a)=>{function u(d){try{const c=new URL(d),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 d.toLocaleLowerCase().startsWith(C.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(d,c,C,w={}){this._terminal=d,this._regex=c,this._handler=C,this._options=w}provideLinks(d,c){const C=h.computeLink(d,this._regex,this._terminal,this._handler);c(this._addCallbacks(C))}_addCallbacks(d){return d.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,g]=h._getWindowedLineStrings(c-1,w),p=S.join("");let m;const E=[];for(;m=x.exec(p);){const R=m[0];if(!u(R))continue;const[A,L]=h._mapStrIdx(w,g,0,m.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,g="";const p=[];if(w=C.buffer.active.getLine(c)){const m=w.translateToString(!0);if(w.isWrapped&&m[0]!==" "){for(S=0;(w=C.buffer.active.getLine(--k))&&S<2048&&(g=w.translateToString(!0),S+=g.length,p.push(g),w.isWrapped&&g.indexOf(" ")===-1););p.reverse()}for(p.push(m),S=0;(w=C.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(g=w.translateToString(!0),S+=g.length,p.push(g),g.indexOf(" ")===-1););}return[p,k]}static _mapStrIdx(c,C,w,k){const x=c.buffer.active,S=x.getNullCell();let g=w;for(;k;){const p=x.getLine(C);if(!p)return[-1,-1];for(let m=g;m<p.length;++m){p.getCell(m,S);const E=S.getChars();if(S.getWidth()&&(k-=E.length||1,m===p.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,m]}C++,g=0}return[C,g]}}a.LinkComputer=h}},o={};function v(_){var a=o[_];if(a!==void 0)return a.exports;var u=o[_]={exports:{}};return l[_](u,u.exports,v),u.exports}var b={};return(()=>{var _=b;Object.defineProperty(_,"__esModule",{value:!0}),_.WebLinksAddon=void 0;const a=v(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,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")}_.WebLinksAddon=class{constructor(d=h,c={}){this._handler=d,this._options=c}activate(d){this._terminal=d;const c=this._options,C=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,C,this._handler,c))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),b})()))})(ju)),ju.exports}var M0=R0(),Iu={exports:{}},Yp;function L0(){return Yp||(Yp=1,(function(n,s){(function(l,o){n.exports=o()})(globalThis,(()=>(()=>{var l={4567:function(_,a,u){var h=this&&this.__decorate||function(p,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,m,E,R);else for(var B=p.length-1;B>=0;B--)(A=p[B])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},d=this&&this.__param||function(p,m){return function(E,R){m(E,R,p)}};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 g=a.AccessibilityManager=class extends w.Disposable{constructor(p,m,E,R){super(),this._terminal=p,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(`
50
- `)))),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(p){for(let m=0;m<p;m++)this._handleChar(" ")}_handleChar(p){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==p&&(this._charsToAnnounce+=p):this._charsToAnnounce+=p,p===`
51
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(p){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(p)||this._charsToConsume.push(p)}_refreshRows(p,m){this._liveRegionDebouncer.refresh(p,m,this._terminal.rows)}_renderRows(p,m){const E=this._terminal.buffer,R=E.lines.length.toString();for(let A=p;A<=m;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(p,m){const E=p.target,R=this._rowElements[m===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(m===0?"1":`${this._terminal.buffer.lines.length}`)||p.relatedTarget!==R)return;let A,L;if(m===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),m===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(m===0?-1:1),this._rowElements[m===0?1:this._rowElements.length-2].focus(),p.preventDefault(),p.stopImmediatePropagation()}_handleSelectionChange(){var B;if(this._rowElements.length===0)return;const p=document.getSelection();if(!p)return;if(p.isCollapsed)return void(this._rowContainer.contains(p.anchorNode)&&this._terminal.clearSelection());if(!p.anchorNode||!p.focusNode)return void console.error("anchorNode and/or focusNode are null");let m={node:p.anchorNode,offset:p.anchorOffset},E={node:p.focusNode,offset:p.focusOffset};if((m.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||m.node===E.node&&m.offset>E.offset)&&([m,E]=[E,m]),m.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(m={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(m.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 V=parseInt(G==null?void 0:G.getAttribute("aria-posinset"),10)-1;if(isNaN(V))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 Y=F<$.length?$[F]:$.slice(-1)[0]+1;return Y>=this._terminal.cols&&(++V,Y=0),{row:V,column:Y}},L=A(m),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(p){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let m=this._rowContainer.children.length;m<this._terminal.rows;m++)this._rowElements[m]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[m]);for(;this._rowElements.length>p;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const p=this._coreBrowserService.mainDocument.createElement("div");return p.setAttribute("role","listitem"),p.tabIndex=-1,this._refreshRowDimensions(p),p}_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 p=0;p<this._terminal.rows;p++)this._refreshRowDimensions(this._rowElements[p])}}_refreshRowDimensions(p){p.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=g=h([d(1,x.IInstantiationService),d(2,k.ICoreBrowserService),d(3,k.IRenderService)],g)},3614:(_,a)=>{function u(C){return C.replace(/\r?\n/g,"\r")}function h(C,w){return w?"\x1B[200~"+C+"\x1B[201~":C}function d(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,g=C.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${S}px`,w.style.top=`${g}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&&d(C.clipboardData.getData("text/plain"),w,k,x)},a.paste=d,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:(_,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(d,c,C){this._css.set(d,c,C)}getCss(d,c){return this._css.get(d,c)}setColor(d,c,C){this._color.set(d,c,C)}getColor(d,c){return this._color.get(d,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,h,d,c){u.addEventListener(h,d,c);let C=!1;return{dispose:()=>{C||(C=!0,u.removeEventListener(h,d,c))}}}},3551:function(_,a,u){var h=this&&this.__decorate||function(g,p,m,E){var R,A=arguments.length,L=A<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(g,p,m,E);else for(var T=g.length-1;T>=0;T--)(R=g[T])&&(L=(A<3?R(L):A>3?R(p,m,L):R(p,m))||L);return A>3&&L&&Object.defineProperty(p,m,L),L},d=this&&this.__param||function(g,p){return function(m,E){p(m,E,g)}};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(g,p,m,E,R){super(),this._element=g,this._mouseService=p,this._renderService=m,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(g){this._lastMouseEvent=g;const p=this._positionFromMouseEvent(g,this._element,this._mouseService);if(!p)return;this._isMouseOut=!1;const m=g.composedPath();for(let E=0;E<m.length;E++){const R=m[E];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&p.x===this._lastBufferCell.x&&p.y===this._lastBufferCell.y||(this._handleHover(p),this._lastBufferCell=p)}_handleHover(g){if(this._activeLine!==g.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(g,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,g)||(this._clearCurrentLink(),this._askForLink(g,!0))}_askForLink(g,p){var E,R;this._activeProviderReplies&&p||((E=this._activeProviderReplies)==null||E.forEach((A=>{A==null||A.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=g.y);let m=!1;for(const[A,L]of this._linkProviderService.linkProviders.entries())p?(R=this._activeProviderReplies)!=null&&R.get(A)&&(m=this._checkLinkProviderResult(A,g,m)):L.provideLinks(g.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),m=this._checkLinkProviderResult(A,g,m),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(g.y,this._activeProviderReplies)}))}_removeIntersectingLinks(g,p){const m=new Set;for(let E=0;E<p.size;E++){const R=p.get(E);if(R)for(let A=0;A<R.length;A++){const L=R[A],T=L.link.range.start.y<g?0:L.link.range.start.x,B=L.link.range.end.y>g?this._bufferService.cols:L.link.range.end.x;for(let N=T;N<=B;N++){if(m.has(N)){R.splice(A--,1);break}m.add(N)}}}}_checkLinkProviderResult(g,p,m){var A;if(!this._activeProviderReplies)return m;const E=this._activeProviderReplies.get(g);let R=!1;for(let L=0;L<g;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&E){const L=E.find((T=>this._linkAtPosition(T.link,p)));L&&(m=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!m)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,p)));if(T){m=!0,this._handleNewLink(T);break}}return m}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(g){if(!this._currentLink)return;const p=this._positionFromMouseEvent(g,this._element,this._mouseService);p&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,p)&&this._currentLink.link.activate(g,this._currentLink.link.text)}_clearCurrentLink(g,p){this._currentLink&&this._lastMouseEvent&&(!g||!p||this._currentLink.link.range.start.y>=g&&this._currentLink.link.range.end.y<=p)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(g){if(!this._lastMouseEvent)return;const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._linkAtPosition(g.link,p)&&(this._currentLink=g,this._currentLink.state={decorations:{underline:g.link.decorations===void 0||g.link.decorations.underline,pointerCursor:g.link.decorations===void 0||g.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,g.link,this._lastMouseEvent),g.link.decorations={},Object.defineProperties(g.link.decorations,{pointerCursor:{get:()=>{var m,E;return(E=(m=this._currentLink)==null?void 0:m.state)==null?void 0:E.decorations.pointerCursor},set:m=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==m&&(this._currentLink.state.decorations.pointerCursor=m,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",m))}},underline:{get:()=>{var m,E;return(E=(m=this._currentLink)==null?void 0:m.state)==null?void 0:E.decorations.underline},set:m=>{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)!==m&&(this._currentLink.state.decorations.underline=m,this._currentLink.state.isHovered&&this._fireUnderlineEvent(g.link,m))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((m=>{if(!this._currentLink)return;const E=m.start===0?0:m.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+m.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(g,p,m){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(p,!0),this._currentLink.state.decorations.pointerCursor&&g.classList.add("xterm-cursor-pointer")),p.hover&&p.hover(m,p.text)}_fireUnderlineEvent(g,p){const m=g.range,E=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(m.start.x-1,m.start.y-E-1,m.end.x,m.end.y-E-1,void 0);(p?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(g,p,m){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(p,!1),this._currentLink.state.decorations.pointerCursor&&g.classList.remove("xterm-cursor-pointer")),p.leave&&p.leave(m,p.text)}_linkAtPosition(g,p){const m=g.range.start.y*this._bufferService.cols+g.range.start.x,E=g.range.end.y*this._bufferService.cols+g.range.end.x,R=p.y*this._bufferService.cols+p.x;return m<=R&&R<=E}_positionFromMouseEvent(g,p,m){const E=m.getCoords(g,p,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(g,p,m,E,R){return{x1:g,y1:p,x2:m,y2:E,cols:this._bufferService.cols,fg:R}}};a.Linkifier=S=h([d(1,x.IMouseService),d(2,x.IRenderService),d(3,k.IBufferService),d(4,x.ILinkProviderService)],S)},9042:(_,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(_,a,u){var h=this&&this.__decorate||function(x,S,g,p){var m,E=arguments.length,R=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,g):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,g,p);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(S,g,R):m(S,g))||R);return E>3&&R&&Object.defineProperty(S,g,R),R},d=this&&this.__param||function(x,S){return function(g,p){S(g,p,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,g){this._bufferService=x,this._optionsService=S,this._oscLinkService=g}provideLinks(x,S){var B;const g=this._bufferService.buffer.lines.get(x-1);if(!g)return void S(void 0);const p=[],m=this._optionsService.rawOptions.linkHandler,E=new c.CellData,R=g.getTrimmedLength();let A=-1,L=-1,T=!1;for(let N=0;N<R;N++)if(L!==-1||g.hasContent(N)){if(g.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 V=!1;if(!(m!=null&&m.allowNonHttpProtocols))try{const $=new URL(F);["http:","https:"].includes($.protocol)||(V=!0)}catch{V=!0}V||p.push({text:F,range:G,activate:($,Y)=>m?m.activate($,Y,G):k(0,Y),hover:($,Y)=>{var q;return(q=m==null?void 0:m.hover)==null?void 0:q.call(m,$,Y,G)},leave:($,Y)=>{var q;return(q=m==null?void 0:m.leave)==null?void 0:q.call(m,$,Y,G)}})}T=!1,E.hasExtendedAttrs()&&E.extended.urlId?(L=N,A=E.extended.urlId):(L=-1,A=-1)}}S(p)}};function k(x,S){if(confirm(`Do you want to navigate to ${S}?
52
-
53
- WARNING: This link could potentially be dangerous`)){const g=window.open();if(g){try{g.opener=null}catch{}g.location.href=S}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([d(0,C.IBufferService),d(1,C.IOptionsService),d(2,C.IOscLinkService)],w)},6193:(_,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,d){this._rowCount=d,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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=u(3614),d=u(3656),c=u(3551),C=u(9042),w=u(3730),k=u(1680),x=u(3107),S=u(5744),g=u(2950),p=u(1296),m=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),V=u(8460),$=u(844),Y=u(6114),q=u(8437),Q=u(2584),J=u(7399),z=u(5941),M=u(9074),O=u(2585),I=u(5435),H=u(4567),ne=u(779);class fe 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(K={}){super(K),this.browser=Y,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new $.MutableDisposable),this._onCursorMove=this.register(new V.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new V.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new V.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new V.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new V.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new V.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new V.EventEmitter),this._onBlur=this.register(new V.EventEmitter),this._onA11yCharEmitter=this.register(new V.EventEmitter),this._onA11yTabEmitter=this.register(new V.EventEmitter),this._onWillOpen=this.register(new V.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(((P,le)=>this.refresh(P,le)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((P=>this._reportWindowsOptions(P)))),this.register(this._inputHandler.onColor((P=>this._handleColorEvent(P)))),this.register((0,V.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,V.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,V.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((P=>this._afterResize(P.cols,P.rows)))),this.register((0,$.toDisposable)((()=>{var P,le;this._customKeyEventHandler=void 0,(le=(P=this.element)==null?void 0:P.parentNode)==null||le.removeChild(this.element)})))}_handleColorEvent(K){if(this._themeService)for(const P of K){let le,re="";switch(P.index){case 256:le="foreground",re="10";break;case 257:le="background",re="11";break;case 258:le="cursor",re="12";break;default:le="ansi",re="4;"+P.index}switch(P.type){case 0:const Se=F.color.toColorRGB(le==="ansi"?this._themeService.colors.ansi[P.index]:this._themeService.colors[le]);this.coreService.triggerDataEvent(`${Q.C0.ESC}]${re};${(0,z.toRgbString)(Se)}${Q.C1_ESCAPED.ST}`);break;case 1:if(le==="ansi")this._themeService.modifyColors((ge=>ge.ansi[P.index]=F.channels.toColor(...P.color)));else{const ge=le;this._themeService.modifyColors((Te=>Te[ge]=F.channels.toColor(...P.color)))}break;case 2:this._themeService.restoreColor(P.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(Q.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(Q.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const K=this.buffer.ybase+this.buffer.y,P=this.buffer.lines.get(K);if(!P)return;const le=Math.min(this.buffer.x,this.cols-1),re=this._renderService.dimensions.css.cell.height,Se=P.getWidth(le),ge=this._renderService.dimensions.css.cell.width*Se,Te=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=le*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Te+"px",this.textarea.style.width=ge+"px",this.textarea.style.height=re+"px",this.textarea.style.lineHeight=re+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(P=>{this.hasSelection()&&(0,h.copyHandler)(P,this._selectionService)})));const K=P=>(0,h.handlePasteEvent)(P,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",K)),this.register((0,d.addDisposableDomListener)(this.element,"paste",K)),Y.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(P=>{P.button===2&&(0,h.rightClickHandler)(P,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(P=>{(0,h.rightClickHandler)(P,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Y.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(P=>{P.button===1&&(0,h.moveTextAreaUnderMouseCursor)(P,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(K=>this._keyUp(K)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(K=>this._keyDown(K)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(K=>this._keyPress(K)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(K=>this._compositionHelper.compositionupdate(K)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(K=>this._inputEvent(K)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(K){var le;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"),((le=this.element)==null?void 0:le.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 P=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(re=>this.updateCursorStyle(re)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",C.promptLabel),Y.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,d.addDisposableDomListener)(this.textarea,"focus",(re=>this._handleTextAreaFocus(re)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(m.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((re=>this._onRender.fire(re)))),this.onResize((re=>this._renderService.resize(re.cols,re.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(g.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(P);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((re=>this.scrollLines(re.amount,re.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((re=>this.scrollLines(re.amount,re.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((re=>this._renderService.handleSelectionChanged(re.start,re.end,re.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((re=>{this.textarea.value=re,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((re=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(re=>this._selectionService.handleMouseDown(re)))),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",(re=>this._handleScreenReaderModeOptionChange(re)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(re=>{!this._overviewRulerRenderer&&re&&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(p.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const K=this,P=this.element;function le(ge){const Te=K._mouseService.getMouseReportCoords(ge,K.screenElement);if(!Te)return!1;let Be,_e;switch(ge.overrideType||ge.type){case"mousemove":_e=32,ge.buttons===void 0?(Be=3,ge.button!==void 0&&(Be=ge.button<3?ge.button:3)):Be=1&ge.buttons?0:4&ge.buttons?1:2&ge.buttons?2:3;break;case"mouseup":_e=0,Be=ge.button<3?ge.button:3;break;case"mousedown":_e=1,Be=ge.button<3?ge.button:3;break;case"wheel":if(K._customWheelEventHandler&&K._customWheelEventHandler(ge)===!1||K.viewport.getLinesScrolled(ge)===0)return!1;_e=ge.deltaY<0?0:1,Be=4;break;default:return!1}return!(_e===void 0||Be===void 0||Be>4)&&K.coreMouseService.triggerMouseEvent({col:Te.col,row:Te.row,x:Te.x,y:Te.y,button:Be,action:_e,ctrl:ge.ctrlKey,alt:ge.altKey,shift:ge.shiftKey})}const re={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Se={mouseup:ge=>(le(ge),ge.buttons||(this._document.removeEventListener("mouseup",re.mouseup),re.mousedrag&&this._document.removeEventListener("mousemove",re.mousedrag)),this.cancel(ge)),wheel:ge=>(le(ge),this.cancel(ge,!0)),mousedrag:ge=>{ge.buttons&&le(ge)},mousemove:ge=>{ge.buttons||le(ge)}};this.register(this.coreMouseService.onProtocolChange((ge=>{ge?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ge)),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&ge?re.mousemove||(P.addEventListener("mousemove",Se.mousemove),re.mousemove=Se.mousemove):(P.removeEventListener("mousemove",re.mousemove),re.mousemove=null),16&ge?re.wheel||(P.addEventListener("wheel",Se.wheel,{passive:!1}),re.wheel=Se.wheel):(P.removeEventListener("wheel",re.wheel),re.wheel=null),2&ge?re.mouseup||(re.mouseup=Se.mouseup):(this._document.removeEventListener("mouseup",re.mouseup),re.mouseup=null),4&ge?re.mousedrag||(re.mousedrag=Se.mousedrag):(this._document.removeEventListener("mousemove",re.mousedrag),re.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(P,"mousedown",(ge=>{if(ge.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ge))return le(ge),re.mouseup&&this._document.addEventListener("mouseup",re.mouseup),re.mousedrag&&this._document.addEventListener("mousemove",re.mousedrag),this.cancel(ge)}))),this.register((0,d.addDisposableDomListener)(P,"wheel",(ge=>{if(!re.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ge)===!1)return!1;if(!this.buffer.hasScrollback){const Te=this.viewport.getLinesScrolled(ge);if(Te===0)return;const Be=Q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ge.deltaY<0?"A":"B");let _e="";for(let Me=0;Me<Math.abs(Te);Me++)_e+=Be;return this.coreService.triggerDataEvent(_e,!0),this.cancel(ge,!0)}return this.viewport.handleWheel(ge)?this.cancel(ge):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(P,"touchstart",(ge=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ge),this.cancel(ge)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(P,"touchmove",(ge=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ge)?void 0:this.cancel(ge)}),{passive:!1}))}refresh(K,P){var le;(le=this._renderService)==null||le.refreshRows(K,P)}updateCursorStyle(K){var P;(P=this._selectionService)!=null&&P.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,P,le=0){var re;le===1?(super.scrollLines(K,P,le),this.refresh(0,this.rows-1)):(re=this.viewport)==null||re.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 P=this._characterJoinerService.register(K);return this.refresh(0,this.rows-1),P}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,P,le){this._selectionService.setSelection(K,P,le)}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,P){var le;(le=this._selectionService)==null||le.selectLines(K,P)}_keyDown(K){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;const P=this.browser.isMac&&this.options.macOptionIsMeta&&K.altKey;if(!P&&!this._compositionHelper.keydown(K))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;P||K.key!=="Dead"&&K.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const le=(0,J.evaluateKeyboardEvent)(K,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),le.type===3||le.type===2){const re=this.rows-1;return this.scrollLines(le.type===2?-re:re),this.cancel(K,!0)}return le.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(le.cancel&&this.cancel(K,!0),!le.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):(le.key!==Q.C0.ETX&&le.key!==Q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:le.key,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(le.key,!0),!this.optionsService.rawOptions.screenReaderMode||K.altKey||K.ctrlKey?this.cancel(K,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(K,P){const le=K.isMac&&!this.options.macOptionIsMeta&&P.altKey&&!P.ctrlKey&&!P.metaKey||K.isWindows&&P.altKey&&P.ctrlKey&&!P.metaKey||K.isWindows&&P.getModifierState("AltGraph");return P.type==="keypress"?le:le&&(!P.keyCode||P.keyCode>47)}_keyUp(K){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||((function(P){return P.keyCode===16||P.keyCode===17||P.keyCode===18})(K)||this.focus(),this.updateCursorStyle(K),this._keyPressHandled=!1)}_keyPress(K){let P;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)P=K.charCode;else if(K.which===null||K.which===void 0)P=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;P=K.which}return!(!P||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K)||(P=String.fromCharCode(P),this._onKey.fire({key:P,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(P,!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 P=K.data;return this.coreService.triggerDataEvent(P,!0),this.cancel(K),!0}return!1}resize(K,P){K!==this.cols||P!==this.rows?super.resize(K,P):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(K,P){var le,re;(le=this._charSizeService)==null||le.measure(),(re=this.viewport)==null||re.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 P=1;P<this.rows;P++)this.buffer.lines.push(this.buffer.getBlankLine(q.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 P,le;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(P=this._selectionService)==null||P.reset(),this._decorationService.reset(),(le=this.viewport)==null||le.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(Q.C0.ESC+"[I"):this.coreService.triggerDataEvent(Q.C0.ESC+"[O")}_reportWindowsOptions(K){if(this._renderService)switch(K){case I.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const P=this._renderService.dimensions.css.canvas.width.toFixed(0),le=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.C0.ESC}[4;${le};${P}t`);break;case I.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const re=this._renderService.dimensions.css.cell.width.toFixed(0),Se=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.C0.ESC}[6;${Se};${re}t`)}}cancel(K,P){if(this.options.cancelEvents||P)return K.preventDefault(),K.stopPropagation(),!1}}a.Terminal=fe},9924:(_,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,d){this._rowCount=d,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(_,a,u){var h=this&&this.__decorate||function(g,p,m,E){var R,A=arguments.length,L=A<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(g,p,m,E);else for(var T=g.length-1;T>=0;T--)(R=g[T])&&(L=(A<3?R(L):A>3?R(p,m,L):R(p,m))||L);return A>3&&L&&Object.defineProperty(p,m,L),L},d=this&&this.__param||function(g,p){return function(m,E){p(m,E,g)}};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(g,p,m,E,R,A,L,T){super(),this._viewportElement=g,this._scrollArea=p,this._bufferService=m,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(g){this._viewportElement.style.backgroundColor=g.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(g){if(g)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 p=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==p&&(this._lastRecordedBufferHeight=p,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const g=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==g&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=g),this._refreshAnimationFrame=null}syncScrollArea(g=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(g);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(g)}_handleScroll(g){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 p=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:p,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const g=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(g*(this._smoothScrollState.target-this._smoothScrollState.origin)),g<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(g,p){const m=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(p<0&&this._viewportElement.scrollTop!==0||p>0&&m<this._lastRecordedBufferHeight)||(g.cancelable&&g.preventDefault(),!1)}handleWheel(g){const p=this._getPixelsScrolled(g);return p!==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+p:this._smoothScrollState.target+=p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=p,this._bubbleScroll(g,p))}scrollLines(g){if(g!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const p=g*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:g,suppressScrollEvent:!1})}_getPixelsScrolled(g){if(g.deltaY===0||g.shiftKey)return 0;let p=this._applyScrollModifier(g.deltaY,g);return g.deltaMode===WheelEvent.DOM_DELTA_LINE?p*=this._currentRowHeight:g.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._currentRowHeight*this._bufferService.rows),p}getBufferElements(g,p){var T;let m,E="";const R=[],A=p??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let B=g;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&&(m=G),E=""}}return{bufferElements:R,cursorElement:m}}getLinesScrolled(g){if(g.deltaY===0||g.shiftKey)return 0;let p=this._applyScrollModifier(g.deltaY,g);return g.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(p/=this._currentRowHeight+0,this._wheelPartialScroll+=p,p=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):g.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._bufferService.rows),p}_applyScrollModifier(g,p){const m=this._optionsService.rawOptions.fastScrollModifier;return m==="alt"&&p.altKey||m==="ctrl"&&p.ctrlKey||m==="shift"&&p.shiftKey?g*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:g*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(g){this._lastTouchY=g.touches[0].pageY}handleTouchMove(g){const p=this._lastTouchY-g.touches[0].pageY;return this._lastTouchY=g.touches[0].pageY,p!==0&&(this._viewportElement.scrollTop+=p,this._bubbleScroll(g,p))}};a.Viewport=S=h([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,C.ICharSizeService),d(5,C.IRenderService),d(6,C.ICoreBrowserService),d(7,C.IThemeService)],S)},3107:function(_,a,u){var h=this&&this.__decorate||function(x,S,g,p){var m,E=arguments.length,R=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,g):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,g,p);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(S,g,R):m(S,g))||R);return E>3&&R&&Object.defineProperty(S,g,R),R},d=this&&this.__param||function(x,S){return function(g,p){S(g,p,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,g,p,m){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=g,this._decorationService=p,this._renderService=m,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 p;const S=this._coreBrowserService.mainDocument.createElement("div");S.classList.add("xterm-decoration"),S.classList.toggle("xterm-decoration-top-layer",((p=x==null?void 0:x.options)==null?void 0:p.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 g=x.options.x??0;return g&&g>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 g=this._decorationElements.get(x);g||(g=this._createElement(x),x.element=g,this._decorationElements.set(x,g),this._container.appendChild(g),x.onDispose((()=>{this._decorationElements.delete(x),g.remove()}))),g.style.top=S*this._renderService.dimensions.css.cell.height+"px",g.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(g)}}_refreshXPosition(x,S=x.element){if(!S)return;const g=x.options.x??0;(x.options.anchor||"left")==="right"?S.style.right=g?g*this._renderService.dimensions.css.cell.width+"px":"":S.style.left=g?g*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var S;(S=this._decorationElements.get(x))==null||S.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=k=h([d(1,w.IBufferService),d(2,c.ICoreBrowserService),d(3,w.IDecorationService),d(4,c.IRenderService)],k)},5871:(_,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,d){return h>=u.startBufferLine-this._linePadding[d||"full"]&&h<=u.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(_,a,u){var h=this&&this.__decorate||function(m,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(m,E,R,A);else for(var N=m.length-1;N>=0;N--)(L=m[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},d=this&&this.__param||function(m,E){return function(R,A){E(R,A,m)}};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},g={full:0,left:0,center:0,right:0};let p=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(m,E,R,A,L,T,B){var F;super(),this._viewportElement=m,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 m=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=m,S.center=E,S.right=m,this._refreshDrawHeightConstants(),g.full=0,g.left=0,g.center=S.left,g.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const m=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(m,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 m=this._colorZoneStore.zones;for(const E of m)E.position!=="full"&&this._renderColorZone(E);for(const E of m)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(m){this._ctx.fillStyle=m.color,this._ctx.fillRect(g[m.position||"full"],Math.round((this._canvas.height-1)*(m.startBufferLine/this._bufferService.buffers.active.lines.length)-x[m.position||"full"]/2),S[m.position||"full"],Math.round((this._canvas.height-1)*((m.endBufferLine-m.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[m.position||"full"]))}_queueRefresh(m,E){this._shouldUpdateDimensions=m||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=p=h([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,C.IRenderService),d(5,k.IOptionsService),d(6,C.ICoreBrowserService)],p)},2950:function(_,a,u){var h=this&&this.__decorate||function(x,S,g,p){var m,E=arguments.length,R=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,g):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,g,p);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(S,g,R):m(S,g))||R);return E>3&&R&&Object.defineProperty(S,g,R),R},d=this&&this.__param||function(x,S){return function(g,p){S(g,p,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,g,p,m,E){this._textarea=x,this._compositionView=S,this._bufferService=g,this._optionsService=p,this._coreService=m,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 g;this._isSendingComposition=!1,S.start+=this._dataAlreadySent.length,g=this._isComposing?this._textarea.value.substring(S.start,S.end):this._textarea.value.substring(S.start),g.length>0&&this._coreService.triggerDataEvent(g,!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,g=S.replace(x,"");this._dataAlreadySent=g,S.length>x.length?this._coreService.triggerDataEvent(g,!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),g=this._renderService.dimensions.css.cell.height,p=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,m=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=m+"px",this._compositionView.style.top=p+"px",this._compositionView.style.height=g+"px",this._compositionView.style.lineHeight=g+"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=m+"px",this._textarea.style.top=p+"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([d(2,C.IBufferService),d(3,C.IOptionsService),d(4,C.ICoreService),d(5,c.IRenderService)],k)},9806:(_,a)=>{function u(h,d,c){const C=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-C.left-k,d.clientY-C.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(h,d,c,C,w,k,x,S,g){if(!k)return;const p=u(h,d,c);return p?(p[0]=Math.ceil((p[0]+(g?x/2:0))/x),p[1]=Math.ceil(p[1]/S),p[0]=Math.min(Math.max(p[0],1),C+(g?1:0)),p[1]=Math.min(Math.max(p[1],1),w),p):void 0}},9504:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=u(2584);function d(S,g,p,m){const E=S-c(S,p),R=g-c(g,p),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 V=0;V<Math.abs(F-G);V++){const $=C(L,T)==="A"?-1:1,Y=B.buffer.lines.get(F+$*V);Y!=null&&Y.isWrapped&&N++}return N})(S,g,p);return x(A,k(C(S,g),m))}function c(S,g){let p=0,m=g.buffer.lines.get(S),E=m==null?void 0:m.isWrapped;for(;E&&S>=0&&S<g.rows;)p++,m=g.buffer.lines.get(--S),E=m==null?void 0:m.isWrapped;return p}function C(S,g){return S>g?"A":"B"}function w(S,g,p,m,E,R){let A=S,L=g,T="";for(;A!==p||L!==m;)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,g){const p=g?"O":"[";return h.C0.ESC+p+S}function x(S,g){S=Math.floor(S);let p="";for(let m=0;m<S;m++)p+=g;return p}a.moveToCellSequence=function(S,g,p,m){const E=p.buffer.x,R=p.buffer.y;if(!p.buffer.hasScrollback)return(function(T,B,N,F,G,V){return d(B,F,G,V).length===0?"":x(w(T,B,T,B-c(B,G),!1,G).length,k("D",V))})(E,R,0,g,p,m)+d(R,g,p,m)+(function(T,B,N,F,G,V){let $;$=d(B,F,G,V).length>0?F-c(F,G):B;const Y=F,q=(function(Q,J,z,M,O,I){let H;return H=d(z,M,O,I).length>0?M-c(M,O):J,Q<z&&H<=M||Q>=z&&H<M?"C":"D"})(T,B,N,F,G,V);return x(w(T,$,N,Y,q==="C",G).length,k(q,V))})(E,R,S,g,p,m);let A;if(R===g)return A=E>S?"D":"C",x(Math.abs(E-S),k(A,m));A=R>g?"D":"C";const L=Math.abs(R-g);return x((function(T,B){return B.cols-T})(R>g?S:E,p)+(L-1)*p.cols+1+((R>g?E:S)-1),k(A,m))}},1296:function(_,a,u){var h=this&&this.__decorate||function(V,$,Y,q){var Q,J=arguments.length,z=J<3?$:q===null?q=Object.getOwnPropertyDescriptor($,Y):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(V,$,Y,q);else for(var M=V.length-1;M>=0;M--)(Q=V[M])&&(z=(J<3?Q(z):J>3?Q($,Y,z):Q($,Y))||z);return J>3&&z&&Object.defineProperty($,Y,z),z},d=this&&this.__param||function(V,$){return function(Y,q){$(Y,q,V)}};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),g=u(8055),p=u(8460),m=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 m.Disposable{constructor(V,$,Y,q,Q,J,z,M,O,I,H,ne,fe){super(),this._terminal=V,this._document=$,this._element=Y,this._screenElement=q,this._viewportElement=Q,this._helperContainer=J,this._linkifier2=z,this._charSizeService=O,this._optionsService=I,this._bufferService=H,this._coreBrowserService=ne,this._themeService=fe,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new p.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((he=>this._injectCss(he)))),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((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,m.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 V=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*V,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*V),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/V),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/V),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 Y of this._rowElements)Y.style.width=`${this.dimensions.css.canvas.width}px`,Y.style.height=`${this.dimensions.css.cell.height}px`,Y.style.lineHeight=`${this.dimensions.css.cell.height}px`,Y.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(V){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let $=`${this._terminalSelector} .${A} { color: ${V.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: ${g.color.multiplyOpacity(V.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 Y=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,Q=`blink_block_${this._terminalClass}`;$+=`@keyframes ${Y} { 50% { border-bottom-style: hidden; }}`,$+=`@keyframes ${q} { 50% { box-shadow: none; }}`,$+=`@keyframes ${Q} { 0% { background-color: ${V.cursor.css}; color: ${V.cursorAccent.css}; } 50% { background-color: inherit; color: ${V.cursor.css}; }}`,$+=`${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${A}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${V.cursor.css}; color: ${V.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${V.cursor.css} !important; color: ${V.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${V.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${V.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${V.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: ${V.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${V.selectionInactiveBackgroundOpaque.css};}`;for(const[J,z]of V.ansi.entries())$+=`${this._terminalSelector} .${L}${J} { color: ${z.css}; }${this._terminalSelector} .${L}${J}.xterm-dim { color: ${g.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${T}${J} { background-color: ${z.css}; }`;$+=`${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR} { color: ${g.color.opaque(V.background).css}; }${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${g.color.multiplyOpacity(g.color.opaque(V.background),.5).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { background-color: ${V.foreground.css}; }`,this._themeStyleElement.textContent=$}_setDefaultSpacing(){const V=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${V}px`,this._rowFactory.defaultSpacing=V}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(V,$){for(let Y=this._rowElements.length;Y<=$;Y++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>$;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(V,$){this._refreshRowElements(V,$),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(V,$,Y){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(V,$,Y),this.renderRows(0,this._bufferService.rows-1),!V||!$)return;this._selectionRenderModel.update(this._terminal,V,$,Y);const q=this._selectionRenderModel.viewportStartRow,Q=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||z<0)return;const M=this._document.createDocumentFragment();if(Y){const O=V[0]>$[0];M.appendChild(this._createSelectionElement(J,O?$[0]:V[0],O?V[0]:$[0],z-J+1))}else{const O=q===J?V[0]:0,I=J===Q?$[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(J,O,I));const H=z-J-1;if(M.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,H)),J!==z){const ne=Q===z?$[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(z,0,ne))}}this._selectionContainer.appendChild(M)}_createSelectionElement(V,$,Y,q=1){const Q=this._document.createElement("div"),J=$*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*(Y-$);return J+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-J),Q.style.height=q*this.dimensions.css.cell.height+"px",Q.style.top=V*this.dimensions.css.cell.height+"px",Q.style.left=`${J}px`,Q.style.width=`${z}px`,Q}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const V of this._rowElements)V.replaceChildren()}renderRows(V,$){const Y=this._bufferService.buffer,q=Y.ybase+Y.y,Q=Math.min(Y.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let O=V;O<=$;O++){const I=O+Y.ydisp,H=this._rowElements[O],ne=Y.lines.get(I);if(!H||!ne)break;H.replaceChildren(...this._rowFactory.createRow(ne,I,I===q,z,M,Q,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(V){this._setCellUnderline(V.x1,V.x2,V.y1,V.y2,V.cols,!0)}_handleLinkLeave(V){this._setCellUnderline(V.x1,V.x2,V.y1,V.y2,V.cols,!1)}_setCellUnderline(V,$,Y,q,Q,J){Y<0&&(V=0),q<0&&($=0);const z=this._bufferService.rows-1;Y=Math.max(Math.min(Y,z),0),q=Math.max(Math.min(q,z),0),Q=Math.min(Q,this._bufferService.cols);const M=this._bufferService.buffer,O=M.ybase+M.y,I=Math.min(M.x,Q-1),H=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,fe=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=Y;he<=q;++he){const K=he+M.ydisp,P=this._rowElements[he],le=M.lines.get(K);if(!P||!le)break;P.replaceChildren(...this._rowFactory.createRow(le,K,K===O,ne,fe,I,H,this.dimensions.css.cell.width,this._widthCache,J?he===Y?V:0:-1,J?(he===q?$:Q)-1:-1))}}};a.DomRenderer=G=h([d(7,E.IInstantiationService),d(8,S.ICharSizeService),d(9,E.IOptionsService),d(10,E.IBufferService),d(11,S.ICoreBrowserService),d(12,S.IThemeService)],G)},3787:function(_,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 V=A.length-1;V>=0;V--)(N=A[V])&&(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},d=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),g=u(4269),p=u(6171),m=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,V,$,Y,q){const Q=[],J=this._characterJoinerService.getJoinedCharacters(L),z=this._themeService.colors;let M,O=A.getNoBgTrimmedLength();T&&O<F+1&&(O=F+1);let I=0,H="",ne=0,fe=0,he=0,K=!1,P=0,le=!1,re=0;const Se=[],ge=Y!==-1&&q!==-1;for(let Te=0;Te<O;Te++){A.loadCell(Te,this._workCell);let Be=this._workCell.getWidth();if(Be===0)continue;let _e=!1,Me=Te,ye=this._workCell;if(J.length>0&&Te===J[0][0]){_e=!0;const Ye=J.shift();ye=new g.JoinedCellData(this._workCell,A.translateToString(!0,Ye[0],Ye[1]),Ye[1]-Ye[0]),Me=Ye[1]-1,Be=ye.getWidth()}const St=this._isCellInSelection(Te,L),$e=T&&Te===F,Mt=ge&&Te>=Y&&Te<=q;let Ht=!1;this._decorationService.forEachDecorationAtCell(Te,L,void 0,(Ye=>{Ht=!0}));let me=ye.getChars()||C.WHITESPACE_CELL_CHAR;if(me===" "&&(ye.isUnderline()||ye.isOverline())&&(me=" "),re=Be*V-$.get(me,ye.isBold(),ye.isItalic()),M){if(I&&(St&&le||!St&&!le&&ye.bg===ne)&&(St&&le&&z.selectionForeground||ye.fg===fe)&&ye.extended.ext===he&&Mt===K&&re===P&&!$e&&!_e&&!Ht){ye.isInvisible()?H+=C.WHITESPACE_CELL_CHAR:H+=me,I++;continue}I&&(M.textContent=H),M=this._document.createElement("span"),I=0,H=""}else M=this._document.createElement("span");if(ne=ye.bg,fe=ye.fg,he=ye.extended.ext,K=Mt,P=re,le=St,_e&&F>=Te&&F<=Me&&(F=Te),!this._coreService.isCursorHidden&&$e&&this._coreService.isCursorInitialized){if(Se.push("xterm-cursor"),this._coreBrowserService.isFocused)G&&Se.push("xterm-cursor-blink"),Se.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":Se.push("xterm-cursor-outline");break;case"block":Se.push("xterm-cursor-block");break;case"bar":Se.push("xterm-cursor-bar");break;case"underline":Se.push("xterm-cursor-underline")}}if(ye.isBold()&&Se.push("xterm-bold"),ye.isItalic()&&Se.push("xterm-italic"),ye.isDim()&&Se.push("xterm-dim"),H=ye.isInvisible()?C.WHITESPACE_CELL_CHAR:ye.getChars()||C.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(Se.push(`xterm-underline-${ye.extended.underlineStyle}`),H===" "&&(H=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${m.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let Ye=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&Ye<8&&(Ye+=8),M.style.textDecorationColor=z.ansi[Ye].css}ye.isOverline()&&(Se.push("xterm-overline"),H===" "&&(H=" ")),ye.isStrikethrough()&&Se.push("xterm-strikethrough"),Mt&&(M.style.textDecoration="underline");let Ae=ye.getFgColor(),Xe=ye.getFgColorMode(),Lt=ye.getBgColor(),ae=ye.getBgColorMode();const ve=!!ye.isInverse();if(ve){const Ye=Ae;Ae=Lt,Lt=Ye;const Et=Xe;Xe=ae,ae=Et}let we,Le,Ne,yt=!1;switch(this._decorationService.forEachDecorationAtCell(Te,L,void 0,(Ye=>{Ye.options.layer!=="top"&&yt||(Ye.backgroundColorRGB&&(ae=50331648,Lt=Ye.backgroundColorRGB.rgba>>8&16777215,we=Ye.backgroundColorRGB),Ye.foregroundColorRGB&&(Xe=50331648,Ae=Ye.foregroundColorRGB.rgba>>8&16777215,Le=Ye.foregroundColorRGB),yt=Ye.options.layer==="top")})),!yt&&St&&(we=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Lt=we.rgba>>8&16777215,ae=50331648,yt=!0,z.selectionForeground&&(Xe=50331648,Ae=z.selectionForeground.rgba>>8&16777215,Le=z.selectionForeground)),yt&&Se.push("xterm-decoration-top"),ae){case 16777216:case 33554432:Ne=z.ansi[Lt],Se.push(`xterm-bg-${Lt}`);break;case 50331648:Ne=x.channels.toColor(Lt>>16,Lt>>8&255,255&Lt),this._addStyle(M,`background-color:#${R((Lt>>>0).toString(16),"0",6)}`);break;default:ve?(Ne=z.foreground,Se.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Ne=z.background}switch(we||ye.isDim()&&(we=x.color.multiplyOpacity(Ne,.5)),Xe){case 16777216:case 33554432:ye.isBold()&&Ae<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ae+=8),this._applyMinimumContrast(M,Ne,z.ansi[Ae],ye,we,void 0)||Se.push(`xterm-fg-${Ae}`);break;case 50331648:const Ye=x.channels.toColor(Ae>>16&255,Ae>>8&255,255&Ae);this._applyMinimumContrast(M,Ne,Ye,ye,we,Le)||this._addStyle(M,`color:#${R(Ae.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Ne,z.foreground,ye,we,Le)||ve&&Se.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}Se.length&&(M.className=Se.join(" "),Se.length=0),$e||_e||Ht?M.textContent=H:I++,re!==this.defaultSpacing&&(M.style.letterSpacing=`${re}px`),Q.push(M),Te=Me}return M&&I&&(M.textContent=H),Q}_applyMinimumContrast(A,L,T,B,N,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,p.treatGlyphAsBackgroundColor)(B.getCode()))return!1;const G=this._getContrastCache(B);let V;if(N||F||(V=G.getColor(L.rgba,T.rgba)),V===void 0){const $=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);V=x.color.ensureContrastRatio(N||L,F||T,$),G.setColor((N||L).rgba,(F||T).rgba,V??null)}return!!V&&(this._addStyle(A,`color:${V.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([d(1,S.ICharacterJoinerService),d(2,k.IOptionsService),d(3,S.ICoreBrowserService),d(4,k.ICoreService),d(5,k.IDecorationService),d(6,S.IThemeService)],E)},2550:(_,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 d=u.createElement("span");d.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=[d,c,C,w],this._container.appendChild(d),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,d,c){u===this._font&&h===this._fontSize&&d===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=d,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,d){let c=0;if(!h&&!d&&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"),d&&(C+="I");let w=this._holey.get(C);if(w===void 0){let k=0;h&&(k|=1),d&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(C,w)}return w}_measure(u,h){const d=this._measureElements[h];return d.textContent=u.repeat(32),d.offsetWidth/32}}},2223:(_,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:(_,a)=>{function u(d){return 57508<=d&&d<=57558}function h(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},a.isEmoji=h,a.allowRescaling=function(d,c,C,w){return c===1&&C>Math.ceil(1.5*w)&&d!==void 0&&d>255&&!h(d)&&!u(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},a.treatGlyphAsBackgroundColor=function(d){return u(d)||(function(c){return 9472<=c&&c<=9631})(d)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(d,c,C=0){return(d-(2*Math.round(c)-C))%(2*Math.round(c))}},6052:(_,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(d,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=d.buffers.active.ydisp,x=c[1]-k,S=C[1]-k,g=Math.max(x,0),p=Math.min(S,d.rows-1);g>=d.rows||p<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=g,this.viewportCappedEndRow=p,this.startCol=c[0],this.endCol=C[0])}isCellSelected(d,c,C){return!!this.hasSelection&&(C-=d.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:(_,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(_,a,u){var h=this&&this.__decorate||function(p,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,m,E,R);else for(var B=p.length-1;B>=0;B--)(A=p[B])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},d=this&&this.__param||function(p,m){return function(E,R){m(E,R,p)}};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(p,m,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 g(this._optionsService))}catch{this._measureStrategy=this.register(new S(p,m,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const p=this._measureStrategy.measure();p.width===this.width&&p.height===this.height||(this.width=p.width,this.height=p.height,this._onCharSizeChange.fire())}};a.CharSizeService=k=h([d(2,c.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(m,E){m!==void 0&&m>0&&E!==void 0&&E>0&&(this._result.width=m,this._result.height=E)}}class S extends x{constructor(m,E,R){super(),this._document=m,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 g extends x{constructor(m){super(),this._optionsService=m,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 m=this._ctx.measureText("W");return this._validateAndSet(m.width,m.fontBoundingBoxAscent+m.fontBoundingBoxDescent),this._result}}},4269:function(_,a,u){var h=this&&this.__decorate||function(g,p,m,E){var R,A=arguments.length,L=A<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(g,p,m,E);else for(var T=g.length-1;T>=0;T--)(R=g[T])&&(L=(A<3?R(L):A>3?R(p,m,L):R(p,m))||L);return A>3&&L&&Object.defineProperty(p,m,L),L},d=this&&this.__param||function(g,p){return function(m,E){p(m,E,g)}};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(p,m,E){super(),this.content=0,this.combinedData="",this.fg=p.fg,this.bg=p.bg,this.combinedData=m,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(p){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let S=a.CharacterJoinerService=class q_{constructor(p){this._bufferService=p,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(p){const m={id:this._nextCharacterJoinerId++,handler:p};return this._characterJoiners.push(m),m.id}deregister(p){for(let m=0;m<this._characterJoiners.length;m++)if(this._characterJoiners[m].id===p)return this._characterJoiners.splice(m,1),!0;return!1}getJoinedCharacters(p){if(this._characterJoiners.length===0)return[];const m=this._bufferService.buffer.lines.get(p);if(!m||m.length===0)return[];const E=[],R=m.translateToString(!0);let A=0,L=0,T=0,B=m.getFg(0),N=m.getBg(0);for(let F=0;F<m.getTrimmedLength();F++)if(m.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,m,A);for(let V=0;V<G.length;V++)E.push(G[V])}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,m,A);for(let G=0;G<F.length;G++)E.push(F[G])}return E}_getJoinedRanges(p,m,E,R,A){const L=p.substring(m,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++)q_._mergeRanges(T,N[F])}catch(N){console.error(N)}return this._stringRangesToCellRanges(T,R,A),T}_stringRangesToCellRanges(p,m,E){let R=0,A=!1,L=0,T=p[R];if(T){for(let B=E;B<this._bufferService.cols;B++){const N=m.getWidth(B),F=m.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=p[++R],!T)break;T[0]<=L?(T[0]=B,A=!0):A=!1}L+=F}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(p,m){let E=!1;for(let R=0;R<p.length;R++){const A=p[R];if(E){if(m[1]<=A[0])return p[R-1][1]=m[1],p;if(m[1]<=A[1])return p[R-1][1]=Math.max(m[1],A[1]),p.splice(R,1),p;p.splice(R,1),R--}else{if(m[1]<=A[0])return p.splice(R,0,m),p;if(m[1]<=A[1])return A[0]=Math.min(m[0],A[0]),p;m[0]<A[1]&&(A[0]=Math.min(m[0],A[0]),E=!0)}}return E?p[p.length-1][1]=m[1]:p.push(m),p}};a.CharacterJoinerService=S=h([d(0,k.IBufferService)],S)},5114:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=u(844),d=u(8460),c=u(3656);class C extends h.Disposable{constructor(x,S,g){super(),this._textarea=x,this._window=S,this.mainDocument=g,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((p=>this._screenDprMonitor.setWindow(p)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=C;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=u(844);class d 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=d},8934:function(_,a,u){var h=this&&this.__decorate||function(k,x,S,g){var p,m=arguments.length,E=m<3?x:g===null?g=Object.getOwnPropertyDescriptor(x,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,S,g);else for(var R=k.length-1;R>=0;R--)(p=k[R])&&(E=(m<3?p(E):m>3?p(x,S,E):p(x,S))||E);return m>3&&E&&Object.defineProperty(x,S,E),E},d=this&&this.__param||function(k,x){return function(S,g){x(S,g,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,g,p){return(0,C.getCoords)(window,k,x,S,g,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,p)}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([d(0,c.IRenderService),d(1,c.ICharSizeService)],w)},3230:function(_,a,u){var h=this&&this.__decorate||function(p,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,m,E,R);else for(var B=p.length-1;B>=0;B--)(A=p[B])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},d=this&&this.__param||function(p,m){return function(E,R){m(E,R,p)}};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 g=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(p,m,E,R,A,L,T,B){super(),this._rowCount=p,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,m),this.register(T.onWindowChange((N=>this._registerIntersectionObserver(N,m))))}_registerIntersectionObserver(p,m){if("IntersectionObserver"in p){const E=new p.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});E.observe(m),this._observerDisposable.value=(0,k.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(p){this._isPaused=p.isIntersecting===void 0?p.intersectionRatio===0:!p.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(p,m,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(p,m,this._rowCount))}_renderRows(p,m){this._renderer.value&&(p=Math.min(p,this._rowCount-1),m=Math.min(m,this._rowCount-1),this._renderer.value.renderRows(p,m),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:p,end:m}),this._onRender.fire({start:p,end:m}),this._isNextRenderRedrawOnly=!0)}resize(p,m){this._rowCount=m,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(p){this._renderer.value=p,this._renderer.value&&(this._renderer.value.onRequestRedraw((m=>this.refreshRows(m.start,m.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(p){return this._renderDebouncer.addRefreshCallback(p)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var p,m;this._renderer.value&&((m=(p=this._renderer.value).clearTextureAtlas)==null||m.call(p),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(p,m){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(p,m)})):this._renderer.value.handleResize(p,m),this._fullRefresh())}handleCharSizeChanged(){var p;(p=this._renderer.value)==null||p.handleCharSizeChanged()}handleBlur(){var p;(p=this._renderer.value)==null||p.handleBlur()}handleFocus(){var p;(p=this._renderer.value)==null||p.handleFocus()}handleSelectionChanged(p,m,E){var R;this._selectionState.start=p,this._selectionState.end=m,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(p,m,E)}handleCursorMove(){var p;(p=this._renderer.value)==null||p.handleCursorMove()}clear(){var p;(p=this._renderer.value)==null||p.clear()}};a.RenderService=g=h([d(2,S.IOptionsService),d(3,C.ICharSizeService),d(4,S.IDecorationService),d(5,S.IBufferService),d(6,C.ICoreBrowserService),d(7,C.IThemeService)],g)},9312:function(_,a,u){var h=this&&this.__decorate||function(T,B,N,F){var G,V=arguments.length,$=V<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 Y=T.length-1;Y>=0;Y--)(G=T[Y])&&($=(V<3?G($):V>3?G(B,N,$):G(B,N))||$);return V>3&&$&&Object.defineProperty(B,N,$),$},d=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),g=u(6114),p=u(4841),m=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,V,$,Y,q){super(),this._element=T,this._screenElement=B,this._linkifier=N,this._bufferService=F,this._coreService=G,this._mouseService=V,this._optionsService=$,this._renderService=Y,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new m.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=Q=>this._handleMouseMove(Q),this._mouseUpListener=Q=>this._handleMouseUp(Q),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Q=>this._handleTrim(Q))),this.register(this._bufferService.buffers.onBufferActivate((Q=>this._handleBufferActivate(Q)))),this.enable(),this._model=new 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],V=T[0]<B[0]?B[0]:T[0];for(let $=T[1];$<=B[1];$++){const Y=N.translateBufferLineToString($,!0,G,V);F.push(Y)}}else{const G=T[1]===B[1]?B[0]:void 0;F.push(N.translateBufferLineToString(T[1],!0,T[0],G));for(let V=T[1]+1;V<=B[1]-1;V++){const $=N.lines.get(V),Y=N.translateBufferLineToString(V,!0);$!=null&&$.isWrapped?F[F.length-1]+=Y:F.push(Y)}if(T[1]!==B[1]){const V=N.lines.get(B[1]),$=N.translateBufferLineToString(B[1],!0,0,B[0]);V&&V.isWrapped?F[F.length-1]+=$:F.push($)}}return F.map((G=>G.replace(A," "))).join(g.isWindows?`\r
54
- `:`
55
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),g.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,V;const N=(V=(G=this._linkifier.currentLink)==null?void 0:G.link)==null?void 0:V.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,p.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 g.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&&!(g.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,V=G.lines.get(T[1]);if(!V)return;const $=G.translateBufferLineToString(T[1],!1);let Y=this._convertViewportColToCharacterIndex(V,T[0]),q=Y;const Q=T[0]-Y;let J=0,z=0,M=0,O=0;if($.charAt(Y)===" "){for(;Y>0&&$.charAt(Y-1)===" ";)Y--;for(;q<$.length&&$.charAt(q+1)===" ";)q++}else{let ne=T[0],fe=T[0];V.getWidth(ne)===0&&(J++,ne--),V.getWidth(fe)===2&&(z++,fe++);const he=V.getString(fe).length;for(he>1&&(O+=he-1,q+=he-1);ne>0&&Y>0&&!this._isCharWordSeparator(V.loadCell(ne-1,this._workCell));){V.loadCell(ne-1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,ne--):K>1&&(M+=K-1,Y-=K-1),Y--,ne--}for(;fe<V.length&&q+1<$.length&&!this._isCharWordSeparator(V.loadCell(fe+1,this._workCell));){V.loadCell(fe+1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,fe++):K>1&&(O+=K-1,q+=K-1),q++,fe++}}q++;let I=Y+Q-J+M,H=Math.min(this._bufferService.cols,q-Y+J+z-M-O);if(B||$.slice(Y,q).trim()!==""){if(N&&I===0&&V.getCodePoint(0)!==32){const ne=G.lines.get(T[1]-1);if(ne&&V.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const fe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(fe){const he=this._bufferService.cols-fe.start;I-=he,H+=he}}}if(F&&I+H===this._bufferService.cols&&V.getCodePoint(this._bufferService.cols-1)!==32){const ne=G.lines.get(T[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const fe=this._getWordAt([0,T[1]+1],!1,!1,!0);fe&&(H+=fe.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,p.getRangeLength)(N,this._bufferService.cols)}};a.SelectionService=L=h([d(3,E.IBufferService),d(4,E.ICoreService),d(5,k.IMouseService),d(6,E.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],L)},4725:(_,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(_,a,u){var h=this&&this.__decorate||function(L,T,B,N){var F,G=arguments.length,V=G<3?T:N===null?N=Object.getOwnPropertyDescriptor(T,B):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(L,T,B,N);else for(var $=L.length-1;$>=0;$--)(F=L[$])&&(V=(G<3?F(V):G>3?F(T,B,V):F(T,B))||V);return G>3&&V&&Object.defineProperty(T,B,V),V},d=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"),g=C.css.toColor("#000000"),p=C.css.toColor("#ffffff"),m=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:g,cursor:p,cursorAccent:m,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:C.color.blend(g,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:C.color.blend(g,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,g),T.cursor=A(L.cursor,p),T.cursorAccent=A(L.cursorAccent,m),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([d(0,x.IOptionsService)],R)},6349:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=u(8460),d=u(844);class c extends d.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(w){if(this._maxLength===w)return;const k=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)k[x]=this._array[this._getCyclicIndex(x)];this._array=k,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let k=this._length;k<w;k++)this._array[k]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,k){this._array[this._getCyclicIndex(w)]=k}push(w){this._array[this._getCyclicIndex(this._length)]=w,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(w,k,...x){if(k){for(let S=w;S<this._length-k;S++)this._array[this._getCyclicIndex(S)]=this._array[this._getCyclicIndex(S+k)];this._length-=k,this.onDeleteEmitter.fire({index:w,amount:k})}for(let S=this._length-1;S>=w;S--)this._array[this._getCyclicIndex(S+x.length)]=this._array[this._getCyclicIndex(S)];for(let S=0;S<x.length;S++)this._array[this._getCyclicIndex(w+S)]=x[S];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const S=this._length+x.length-this._maxLength;this._startIndex+=S,this._length=this._maxLength,this.onTrimEmitter.fire(S)}else this._length+=x.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,k,x){if(!(k<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let g=k-1;g>=0;g--)this.set(w+g+x,this.get(w+g));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:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(h,d=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const C in h)c[C]=d<=1?h[C]:h[C]&&u(h[C],d-1);return c}},8055:(_,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,d=0,c=0;var C,w,k,x,S;function g(m){const E=m.toString(16);return E.length<2?"0"+E:E}function p(m,E){return m<E?(E+.05)/(m+.05):(m+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(m){m.toCss=function(E,R,A,L){return L!==void 0?`#${g(E)}${g(R)}${g(A)}${g(L)}`:`#${g(E)}${g(R)}${g(A)}`},m.toRgba=function(E,R,A,L=255){return(E<<24|R<<16|A<<8|L)>>>0},m.toColor=function(E,R,A,L){return{css:m.toCss(E,R,A,L),rgba:m.toRgba(E,R,A,L)}}})(C||(a.channels=C={})),(function(m){function E(R,A){return c=Math.round(255*A),[u,h,d]=S.toChannels(R.rgba),{css:C.toCss(u,h,d,c),rgba:C.toRgba(u,h,d,c)}}m.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),d=G+Math.round((B-G)*c),{css:C.toCss(u,h,d),rgba:C.toRgba(u,h,d)}},m.isOpaque=function(R){return(255&R.rgba)==255},m.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)},m.opaque=function(R){const A=(255|R.rgba)>>>0;return[u,h,d]=S.toChannels(A),{css:C.toCss(u,h,d),rgba:A}},m.opacity=E,m.multiplyOpacity=function(R,A){return c=255&R.rgba,E(R,c*A/255)},m.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(w||(a.color=w={})),(function(m){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{}m.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),d=parseInt(A.slice(3,4).repeat(2),16),C.toColor(u,h,d);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),d=parseInt(A.slice(3,4).repeat(2),16),c=parseInt(A.slice(4,5).repeat(2),16),C.toColor(u,h,d,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]),d=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),C.toColor(u,h,d,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,d,c]=E.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:C.toRgba(u,h,d,c),css:A}}})(k||(a.css=k={})),(function(m){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))}m.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},m.relativeLuminance2=E})(x||(a.rgb=x={})),(function(m){function E(A,L,T){const B=A>>24&255,N=A>>16&255,F=A>>8&255;let G=L>>24&255,V=L>>16&255,$=L>>8&255,Y=p(x.relativeLuminance2(G,V,$),x.relativeLuminance2(B,N,F));for(;Y<T&&(G>0||V>0||$>0);)G-=Math.max(0,Math.ceil(.1*G)),V-=Math.max(0,Math.ceil(.1*V)),$-=Math.max(0,Math.ceil(.1*$)),Y=p(x.relativeLuminance2(G,V,$),x.relativeLuminance2(B,N,F));return(G<<24|V<<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,V=L>>16&255,$=L>>8&255,Y=p(x.relativeLuminance2(G,V,$),x.relativeLuminance2(B,N,F));for(;Y<T&&(G<255||V<255||$<255);)G=Math.min(255,G+Math.ceil(.1*(255-G))),V=Math.min(255,V+Math.ceil(.1*(255-V))),$=Math.min(255,$+Math.ceil(.1*(255-$))),Y=p(x.relativeLuminance2(G,V,$),x.relativeLuminance2(B,N,F));return(G<<24|V<<16|$<<8|255)>>>0}m.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,V=A>>8&255;return u=F+Math.round((T-F)*c),h=G+Math.round((B-G)*c),d=V+Math.round((N-V)*c),C.toRgba(u,h,d)},m.ensureContrastRatio=function(A,L,T){const B=x.relativeLuminance(A>>8),N=x.relativeLuminance(L>>8);if(p(B,N)<T){if(N<B){const V=E(A,L,T),$=p(B,x.relativeLuminance(V>>8));if($<T){const Y=R(A,L,T);return $>p(B,x.relativeLuminance(Y>>8))?V:Y}return V}const F=R(A,L,T),G=p(B,x.relativeLuminance(F>>8));if(G<T){const V=E(A,L,T);return G>p(B,x.relativeLuminance(V>>8))?F:V}return F}},m.reduceLuminance=E,m.increaseLuminance=R,m.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(S||(a.rgba=S={})),a.toPaddedHex=g,a.contrastRatio=p},8969:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),d=u(2585),c=u(4348),C=u(7866),w=u(744),k=u(7302),x=u(6975),S=u(8460),g=u(1753),p=u(1480),m=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(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(C.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(g.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(p.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(m.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(L.OscLinkService),this._instantiationService.setService(d.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,V)=>this._inputHandler.parse(G,V)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,G){this._writeBuffer.write(F,G)}writeSync(F,G){this._logService.logLevel<=d.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,V){this._bufferService.scrollLines(F,G,V)}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:(_,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 d=[];for(let c=0;c<this._listeners.length;c++)d.push(this._listeners[c]);for(let c=0;c<d.length;c++)d[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((d=>h.fire(d)))},a.runAndSubscribe=function(u,h){return h(void 0),u((d=>h(d)))}},5435:function(_,a,u){var h=this&&this.__decorate||function(J,z,M,O){var I,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(J,z,M,O);else for(var fe=J.length-1;fe>=0;fe--)(I=J[fe])&&(ne=(H<3?I(ne):H>3?I(z,M,ne):I(z,M))||ne);return H>3&&ne&&Object.defineProperty(z,M,ne),ne},d=this&&this.__param||function(J,z){return function(M,O){z(M,O,J)}};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),g=u(8460),p=u(643),m=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(J,z){if(J>24)return z.setWinLines||!1;switch(J){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 V;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(V||(a.WindowsOptionsReportType=V={}));let $=0;class Y extends k.Disposable{getAttrData(){return this._curAttrData}constructor(z,M,O,I,H,ne,fe,he,K=new w.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=M,this._coreService=O,this._logService=I,this._optionsService=H,this._oscLinkService=ne,this._coreMouseService=fe,this._unicodeService=he,this._parser=K,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new m.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 g.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new g.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new g.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new g.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new g.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new g.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new g.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new g.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new g.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new g.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new g.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new g.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new g.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 q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((P=>this._activeBuffer=P.activeBuffer))),this._parser.setCsiHandlerFallback(((P,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(P),params:le.toArray()})})),this._parser.setEscHandlerFallback((P=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(P)})})),this._parser.setExecuteHandlerFallback((P=>{this._logService.debug("Unknown EXECUTE code: ",{code:P})})),this._parser.setOscHandlerFallback(((P,le,re)=>{this._logService.debug("Unknown OSC code: ",{identifier:P,action:le,data:re})})),this._parser.setDcsHandlerFallback(((P,le,re)=>{le==="HOOK"&&(re=re.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(P),action:le,payload:re})})),this._parser.setPrintHandler(((P,le,re)=>this.print(P,le,re))),this._parser.registerCsiHandler({final:"@"},(P=>this.insertChars(P))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(P=>this.scrollLeft(P))),this._parser.registerCsiHandler({final:"A"},(P=>this.cursorUp(P))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(P=>this.scrollRight(P))),this._parser.registerCsiHandler({final:"B"},(P=>this.cursorDown(P))),this._parser.registerCsiHandler({final:"C"},(P=>this.cursorForward(P))),this._parser.registerCsiHandler({final:"D"},(P=>this.cursorBackward(P))),this._parser.registerCsiHandler({final:"E"},(P=>this.cursorNextLine(P))),this._parser.registerCsiHandler({final:"F"},(P=>this.cursorPrecedingLine(P))),this._parser.registerCsiHandler({final:"G"},(P=>this.cursorCharAbsolute(P))),this._parser.registerCsiHandler({final:"H"},(P=>this.cursorPosition(P))),this._parser.registerCsiHandler({final:"I"},(P=>this.cursorForwardTab(P))),this._parser.registerCsiHandler({final:"J"},(P=>this.eraseInDisplay(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(P=>this.eraseInDisplay(P,!0))),this._parser.registerCsiHandler({final:"K"},(P=>this.eraseInLine(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(P=>this.eraseInLine(P,!0))),this._parser.registerCsiHandler({final:"L"},(P=>this.insertLines(P))),this._parser.registerCsiHandler({final:"M"},(P=>this.deleteLines(P))),this._parser.registerCsiHandler({final:"P"},(P=>this.deleteChars(P))),this._parser.registerCsiHandler({final:"S"},(P=>this.scrollUp(P))),this._parser.registerCsiHandler({final:"T"},(P=>this.scrollDown(P))),this._parser.registerCsiHandler({final:"X"},(P=>this.eraseChars(P))),this._parser.registerCsiHandler({final:"Z"},(P=>this.cursorBackwardTab(P))),this._parser.registerCsiHandler({final:"`"},(P=>this.charPosAbsolute(P))),this._parser.registerCsiHandler({final:"a"},(P=>this.hPositionRelative(P))),this._parser.registerCsiHandler({final:"b"},(P=>this.repeatPrecedingCharacter(P))),this._parser.registerCsiHandler({final:"c"},(P=>this.sendDeviceAttributesPrimary(P))),this._parser.registerCsiHandler({prefix:">",final:"c"},(P=>this.sendDeviceAttributesSecondary(P))),this._parser.registerCsiHandler({final:"d"},(P=>this.linePosAbsolute(P))),this._parser.registerCsiHandler({final:"e"},(P=>this.vPositionRelative(P))),this._parser.registerCsiHandler({final:"f"},(P=>this.hVPosition(P))),this._parser.registerCsiHandler({final:"g"},(P=>this.tabClear(P))),this._parser.registerCsiHandler({final:"h"},(P=>this.setMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(P=>this.setModePrivate(P))),this._parser.registerCsiHandler({final:"l"},(P=>this.resetMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(P=>this.resetModePrivate(P))),this._parser.registerCsiHandler({final:"m"},(P=>this.charAttributes(P))),this._parser.registerCsiHandler({final:"n"},(P=>this.deviceStatus(P))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(P=>this.deviceStatusPrivate(P))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(P=>this.softReset(P))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(P=>this.setCursorStyle(P))),this._parser.registerCsiHandler({final:"r"},(P=>this.setScrollRegion(P))),this._parser.registerCsiHandler({final:"s"},(P=>this.saveCursor(P))),this._parser.registerCsiHandler({final:"t"},(P=>this.windowOptions(P))),this._parser.registerCsiHandler({final:"u"},(P=>this.restoreCursor(P))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(P=>this.insertColumns(P))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(P=>this.deleteColumns(P))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(P=>this.selectProtected(P))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(P=>this.requestMode(P,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(P=>this.requestMode(P,!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((P=>(this.setTitle(P),this.setIconName(P),!0)))),this._parser.registerOscHandler(1,new L.OscHandler((P=>this.setIconName(P)))),this._parser.registerOscHandler(2,new L.OscHandler((P=>this.setTitle(P)))),this._parser.registerOscHandler(4,new L.OscHandler((P=>this.setOrReportIndexedColor(P)))),this._parser.registerOscHandler(8,new L.OscHandler((P=>this.setHyperlink(P)))),this._parser.registerOscHandler(10,new L.OscHandler((P=>this.setOrReportFgColor(P)))),this._parser.registerOscHandler(11,new L.OscHandler((P=>this.setOrReportBgColor(P)))),this._parser.registerOscHandler(12,new L.OscHandler((P=>this.setOrReportCursorColor(P)))),this._parser.registerOscHandler(104,new L.OscHandler((P=>this.restoreIndexedColor(P)))),this._parser.registerOscHandler(110,new L.OscHandler((P=>this.restoreFgColor(P)))),this._parser.registerOscHandler(111,new L.OscHandler((P=>this.restoreBgColor(P)))),this._parser.registerOscHandler(112,new L.OscHandler((P=>this.restoreCursorColor(P)))),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 P in C.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:P},(()=>this.selectCharset("("+P))),this._parser.registerEscHandler({intermediates:")",final:P},(()=>this.selectCharset(")"+P))),this._parser.registerEscHandler({intermediates:"*",final:P},(()=>this.selectCharset("*"+P))),this._parser.registerEscHandler({intermediates:"+",final:P},(()=>this.selectCharset("+"+P))),this._parser.registerEscHandler({intermediates:"-",final:P},(()=>this.selectCharset("-"+P))),this._parser.registerEscHandler({intermediates:".",final:P},(()=>this.selectCharset("."+P))),this._parser.registerEscHandler({intermediates:"/",final:P},(()=>this.selectCharset("/"+P)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((P=>(this._logService.error("Parsing error: ",P),P))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((P,le)=>this.requestStatusString(P,le))))}_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,ne=0;const fe=this._parseStack.paused;if(fe){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&&(ne=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,(P=>String.fromCharCode(P))).join("")}"`),typeof z=="string"?z.split("").map((P=>P.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(z.length,F))),fe||this._dirtyRowTracker.clearRange(),z.length>F)for(let P=ne;P<z.length;P+=F){const le=P+F<z.length?P+F:z.length,re=typeof z=="string"?this._stringDecoder.decode(z.substring(P,le),this._parseBuffer):this._utf8Decoder.decode(z.subarray(P,le),this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,re))return this._preserveStack(I,H,re,P),this._logSlowResolvingAsync(O),O}else if(!fe){const P=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,P))return this._preserveStack(I,H,P,0),this._logSlowResolvingAsync(O),O}this._activeBuffer.x===I&&this._activeBuffer.y===H||this._onCursorMove.fire();const he=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(he,this._bufferService.rows-1))}print(z,M,O){let I,H;const ne=this._charsetService.charset,fe=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,K=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,le=this._curAttrData;let re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&O-M>0&&re.getWidth(this._activeBuffer.x-1)===2&&re.setCellFromCodepoint(this._activeBuffer.x-1,0,1,le);let Se=this._parser.precedingJoinState;for(let ge=M;ge<O;++ge){if(I=z[ge],I<127&&ne){const Me=ne[String.fromCharCode(I)];Me&&(I=Me.charCodeAt(0))}const Te=this._unicodeService.charProperties(I,Se);H=A.UnicodeService.extractWidth(Te);const Be=A.UnicodeService.extractShouldJoin(Te),_e=Be?A.UnicodeService.extractWidth(Se):0;if(Se=Te,fe&&this._onA11yChar.fire((0,x.stringFromCodePoint)(I)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+H-_e>he){if(K){const Me=re;let ye=this._activeBuffer.x-_e;for(this._activeBuffer.x=_e,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),_e>0&&re instanceof S.BufferLine&&re.copyCellsFrom(Me,ye,0,_e,!1);ye<he;)Me.setCellFromCodepoint(ye++,0,1,le)}else if(this._activeBuffer.x=he-1,H===2)continue}if(Be&&this._activeBuffer.x){const Me=re.getWidth(this._activeBuffer.x-1)?1:2;re.addCodepointToCell(this._activeBuffer.x-Me,I,H);for(let ye=H-_e;--ye>=0;)re.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}else if(P&&(re.insertCells(this._activeBuffer.x,H-_e,this._activeBuffer.getNullCell(le)),re.getWidth(he-1)===2&&re.setCellFromCodepoint(he-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,le)),re.setCellFromCodepoint(this._activeBuffer.x++,I,H,le),H>0)for(;--H;)re.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}this._parser.precedingJoinState=Se,this._activeBuffer.x<he&&O-M>0&&re.getWidth(this._activeBuffer.x)===0&&!re.hasContent(this._activeBuffer.x)&&re.setCellFromCodepoint(this._activeBuffer.x,0,1,le),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 ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);ne.replaceCells(M,O,this._activeBuffer.getNullCell(this._eraseAttrData()),H),I&&(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 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,ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(H),fe=new Uint32Array(ne.length*O);let he=0;for(let P=0;P<ne.length;){const le=ne.codePointAt(P)||0;fe[he++]=le,P+=le>65535?2:1}let K=he;for(let P=1;P<O;++P)fe.copyWithin(K,0,he),K+=he;return this.print(fe,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:I,activeEncoding:H}=this._coreMouseService,ne=this._coreService,{buffers:fe,cols:he}=this._bufferService,{active:K,alt:P}=fe,le=this._optionsService.rawOptions,re=Be=>Be?1:2,Se=z.params[0];return ge=Se,Te=M?Se===2?4:Se===4?re(ne.modes.insertMode):Se===12?3:Se===20?re(le.convertEol):0:Se===1?re(O.applicationCursorKeys):Se===3?le.windowOptions.setWinLines?he===80?2:he===132?1:0:0:Se===6?re(O.origin):Se===7?re(O.wraparound):Se===8?3:Se===9?re(I==="X10"):Se===12?re(le.cursorBlink):Se===25?re(!ne.isCursorHidden):Se===45?re(O.reverseWraparound):Se===66?re(O.applicationKeypad):Se===67?4:Se===1e3?re(I==="VT200"):Se===1002?re(I==="DRAG"):Se===1003?re(I==="ANY"):Se===1004?re(O.sendFocus):Se===1005?4:Se===1006?re(H==="SGR"):Se===1015?4:Se===1016?re(H==="SGR_PIXELS"):Se===1048?1:Se===47||Se===1047||Se===1049?re(K===P):Se===2004?re(O.bracketedPasteMode):0,ne.triggerDataEvent(`${c.C0.ESC}[${M?"":"?"}${ge};${Te}$y`),!0;var ge,Te}_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,ne=0;do{if(I[ne+H]=z.params[M+ne],z.hasSubParams(M+ne)){const fe=z.getSubParams(M+ne);let he=0;do I[1]===5&&(H=1),I[ne+he+1+H]=fe[he];while(++he<fe.length&&he+ne+1+H<I.length);break}if(I[1]===5&&ne+H>=2||I[1]===2&&ne+H>=5)break;I[1]&&(H=1)}while(++ne+M<z.length&&ne+H<I.length);for(let fe=2;fe<I.length;++fe)I[fe]===-1&&(I[fe]=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 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 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(V.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(V.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 ne=parseInt(I);if(Q(ne))if(H==="?")M.push({type:0,index:ne});else{const fe=(0,B.parseColor)(H);fe&&M.push({type:1,index:ne,color:fe})}}}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((ne=>ne.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]);Q(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 m.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=Y;let q=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){J<this.start?this.start=J:J>this.end&&(this.end=J)}markRangeDirty(J,z){J>z&&($=J,J=z,z=$),J<this.start&&(this.start=J),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Q(J){return 0<=J&&J<256}q=h([d(0,R.IBufferService)],q)},844:(_,a)=>{function u(h){for(const d of h)d.dispose();h.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const d=this._disposables.indexOf(h);d!==-1&&this._disposables.splice(d,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var d;this._isDisposed||h===this._value||((d=this._value)==null||d.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},a.toDisposable=function(h){return{dispose:h}},a.disposeArray=u,a.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(d,c,C){this._data[d]||(this._data[d]={}),this._data[d][c]=C}get(d,c){return this._data[d]?this._data[d][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(h,d,c,C,w){this._data.get(h,d)||this._data.set(h,d,new u),this._data.get(h,d).set(c,C,w)}get(h,d,c,C){var w;return(w=this._data.get(h,d))==null?void 0:w.get(c,C)}clear(){this._data.clear()}}},6114:(_,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 d=u.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),a.isIpad=h==="iPad",a.isIphone=h==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),a.isLinux=h.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(_,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 d=this._getKey(h);if(d===void 0||(u=this._search(d),u===-1)||this._getKey(this._array[u])!==d)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])===d);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,d){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do d(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let d=0,c=this._array.length-1;for(;c>=d;){let C=d+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}d=C+1}}return d}}},7226:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=u(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(w){this._idleCallback=void 0;let k=0,x=0,S=w.timeRemaining(),g=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),g=w.timeRemaining(),1.5*x>g)return S-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-k))}ms`),void this._start();S=g}this.clear()}}class c extends d{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const k=Date.now()+w;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}a.PriorityTaskQueue=c,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends d{_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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=u(643);a.updateWindowsModeWrappedState=function(d){const c=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),C=c==null?void 0:c.get(d.cols-1),w=d.buffer.lines.get(d.buffer.ybase+d.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:(_,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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=u(6349),d=u(7226),c=u(3734),C=u(8437),w=u(4634),k=u(511),x=u(643),S=u(4863),g=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(p,m,E){this._hasScrollback=p,this._optionsService=m,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=g.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(p){return p?(this._nullCell.fg=p.fg,this._nullCell.bg=p.bg,this._nullCell.extended=p.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(p){return p?(this._whitespaceCell.fg=p.fg,this._whitespaceCell.bg=p.bg,this._whitespaceCell.extended=p.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(p,m){return new C.BufferLine(this._bufferService.cols,this.getNullCell(p),m)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const p=this.ybase+this.y-this.ydisp;return p>=0&&p<this._rows}_getCorrectBufferLength(p){if(!this._hasScrollback)return p;const m=p+this._optionsService.rawOptions.scrollback;return m>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:m}fillViewportRows(p){if(this.lines.length===0){p===void 0&&(p=C.DEFAULT_ATTR_DATA);let m=this._rows;for(;m--;)this.lines.push(this.getBlankLine(p))}}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(p,m){const E=this.getNullCell(C.DEFAULT_ATTR_DATA);let R=0;const A=this._getCorrectBufferLength(m);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<p)for(let T=0;T<this.lines.length;T++)R+=+this.lines.get(T).resize(p,E);let L=0;if(this._rows<m)for(let T=this._rows;T<m;T++)this.lines.length<m+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(p,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(p,E)));else for(let T=this._rows;T>m;T--)this.lines.length>m+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,p-1),this.y=Math.min(this.y,m-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,p-1),this.scrollTop=0}if(this.scrollBottom=m-1,this._isReflowEnabled&&(this._reflow(p,m),this._cols>p))for(let L=0;L<this.lines.length;L++)R+=+this.lines.get(L).resize(p,E);this._cols=p,this._rows=m,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let p=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,p=!1);let m=0;for(;this._memoryCleanupPosition<this.lines.length;)if(m+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),m>100)return!0;return p}get _isReflowEnabled(){const p=this._optionsService.rawOptions.windowsPty;return p&&p.buildNumber?this._hasScrollback&&p.backend==="conpty"&&p.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(p,m){this._cols!==p&&(p>this._cols?this._reflowLarger(p,m):this._reflowSmaller(p,m))}_reflowLarger(p,m){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,p,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(p,m,R.countRemoved)}}_reflowLargerAdjustViewport(p,m,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<m&&this.lines.push(new C.BufferLine(p,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(p,m){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()<=p)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,p),V=G.length-B.length;let $;$=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+V):Math.max(0,this.lines.length-this.lines.maxLength+V);const Y=[];for(let O=0;O<V;O++){const I=this.getBlankLine(C.DEFAULT_ATTR_DATA,!0);Y.push(I)}Y.length>0&&(R.push({start:L+B.length+A,newLines:Y}),A+=Y.length),B.push(...Y);let q=G.length-1,Q=G[q];Q===0&&(q--,Q=G[q]);let J=B.length-V-1,z=F;for(;J>=0;){const O=Math.min(z,Q);if(B[q]===void 0)break;if(B[q].copyCellsFrom(B[J],z-O,Q-O,O,!0),Q-=O,Q===0&&(q--,Q=G[q]),z-=O,z===0){J--;const I=Math.max(J,0);z=(0,w.getWrappedLineTrimmedLength)(B,I,this._cols)}}for(let O=0;O<B.length;O++)G[O]<p&&B[O].setCell(G[O],E);let M=V-$;for(;M-- >0;)this.ybase===0?this.y<m-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-m&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+V,this.ybase+m-1)}if(R.length>0){const L=[],T=[];for(let q=0;q<this.lines.length;q++)T.push(this.lines.get(q));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 V=0;for(let q=Math.min(this.lines.maxLength-1,B+A-1);q>=0;q--)if(G&&G.start>N+V){for(let Q=G.newLines.length-1;Q>=0;Q--)this.lines.set(q--,G.newLines[Q]);q++,L.push({index:N+1,amount:G.newLines.length}),V+=G.newLines.length,G=R[++F]}else this.lines.set(q,T[N--]);let $=0;for(let q=L.length-1;q>=0;q--)L[q].index+=$,this.lines.onInsertEmitter.fire(L[q]),$+=L[q].amount;const Y=Math.max(0,B+A-this.lines.maxLength);Y>0&&this.lines.onTrimEmitter.fire(Y)}}translateBufferLineToString(p,m,E=0,R){const A=this.lines.get(p);return A?A.translateToString(m,E,R):""}getWrappedRangeForLine(p){let m=p,E=p;for(;m>0&&this.lines.get(m).isWrapped;)m--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:m,last:E}}setupTabStops(p){for(p!=null?this.tabs[p]||(p=this.prevStop(p)):(this.tabs={},p=0);p<this._cols;p+=this._optionsService.rawOptions.tabStopWidth)this.tabs[p]=!0}prevStop(p){for(p==null&&(p=this.x);!this.tabs[--p]&&p>0;);return p>=this._cols?this._cols-1:p<0?0:p}nextStop(p){for(p==null&&(p=this.x);!this.tabs[++p]&&p<this._cols;);return p>=this._cols?this._cols-1:p<0?0:p}clearMarkers(p){this._isClearing=!0;for(let m=0;m<this.markers.length;m++)this.markers[m].line===p&&(this.markers[m].dispose(),this.markers.splice(m--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].dispose(),this.markers.splice(p--,1);this._isClearing=!1}addMarker(p){const m=new S.Marker(p);return this.markers.push(m),m.register(this.lines.onTrim((E=>{m.line-=E,m.line<0&&m.dispose()}))),m.register(this.lines.onInsert((E=>{m.line>=E.index&&(m.line+=E.amount)}))),m.register(this.lines.onDelete((E=>{m.line>=E.index&&m.line<E.index+E.amount&&m.dispose(),m.line>E.index&&(m.line-=E.amount)}))),m.register(m.onDispose((()=>this._removeMarker(m)))),m}_removeMarker(p){this._isClearing||this.markers.splice(this.markers.indexOf(p),1)}}},8437:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=u(3734),d=u(511),c=u(643),C=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(S,g,p=!1){this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const m=g||d.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,m);this.length=S}get(S){const g=this._data[3*S+0],p=2097151&g;return[this._data[3*S+1],2097152&g?this._combined[S]:p?(0,C.stringFromCodePoint)(p):"",g>>22,2097152&g?this._combined[S].charCodeAt(this._combined[S].length-1):p]}set(S,g){this._data[3*S+1]=g[c.CHAR_DATA_ATTR_INDEX],g[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=g[1],this._data[3*S+0]=2097152|S|g[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=g[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[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 g=this._data[3*S+0];return 2097152&g?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&g}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const g=this._data[3*S+0];return 2097152&g?this._combined[S]:2097151&g?(0,C.stringFromCodePoint)(2097151&g):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,g){return w=3*S,g.content=this._data[w+0],g.fg=this._data[w+1],g.bg=this._data[w+2],2097152&g.content&&(g.combinedData=this._combined[S]),268435456&g.bg&&(g.extended=this._extendedAttrs[S]),g}setCell(S,g){2097152&g.content&&(this._combined[S]=g.combinedData),268435456&g.bg&&(this._extendedAttrs[S]=g.extended),this._data[3*S+0]=g.content,this._data[3*S+1]=g.fg,this._data[3*S+2]=g.bg}setCellFromCodepoint(S,g,p,m){268435456&m.bg&&(this._extendedAttrs[S]=m.extended),this._data[3*S+0]=g|p<<22,this._data[3*S+1]=m.fg,this._data[3*S+2]=m.bg}addCodepointToCell(S,g,p){let m=this._data[3*S+0];2097152&m?this._combined[S]+=(0,C.stringFromCodePoint)(g):2097151&m?(this._combined[S]=(0,C.stringFromCodePoint)(2097151&m)+(0,C.stringFromCodePoint)(g),m&=-2097152,m|=2097152):m=g|4194304,p&&(m&=-12582913,m|=p<<22),this._data[3*S+0]=m}insertCells(S,g,p){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),g<this.length-S){const m=new d.CellData;for(let E=this.length-S-g-1;E>=0;--E)this.setCell(S+g+E,this.loadCell(S+E,m));for(let E=0;E<g;++E)this.setCell(S+E,p)}else for(let m=S;m<this.length;++m)this.setCell(m,p);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,p)}deleteCells(S,g,p){if(S%=this.length,g<this.length-S){const m=new d.CellData;for(let E=0;E<this.length-S-g;++E)this.setCell(S+E,this.loadCell(S+g+E,m));for(let E=this.length-g;E<this.length;++E)this.setCell(E,p)}else for(let m=S;m<this.length;++m)this.setCell(m,p);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,p)}replaceCells(S,g,p,m=!1){if(m)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,p),g<this.length&&this.getWidth(g-1)===2&&!this.isProtected(g)&&this.setCellFromCodepoint(g,0,1,p);S<g&&S<this.length;)this.isProtected(S)||this.setCell(S,p),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),g<this.length&&this.getWidth(g-1)===2&&this.setCellFromCodepoint(g,0,1,p);S<g&&S<this.length;)this.setCell(S++,p)}resize(S,g){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const p=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*p)this._data=new Uint32Array(this._data.buffer,0,p);else{const m=new Uint32Array(p);m.set(this._data),this._data=m}for(let m=this.length;m<S;++m)this.setCell(m,g)}else{this._data=this._data.subarray(0,p);const m=Object.keys(this._combined);for(let R=0;R<m.length;R++){const A=parseInt(m[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*p*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,g=!1){if(g)for(let p=0;p<this.length;++p)this.isProtected(p)||this.setCell(p,S);else{this._combined={},this._extendedAttrs={};for(let p=0;p<this.length;++p)this.setCell(p,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 g in S._combined)this._combined[g]=S._combined[g];this._extendedAttrs={};for(const g in S._extendedAttrs)this._extendedAttrs[g]=S._extendedAttrs[g];this.isWrapped=S.isWrapped}clone(){const S=new k(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const g in this._combined)S._combined[g]=this._combined[g];for(const g in this._extendedAttrs)S._extendedAttrs[g]=this._extendedAttrs[g];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,g,p,m,E){const R=S._data;if(E)for(let L=m-1;L>=0;L--){for(let T=0;T<3;T++)this._data[3*(p+L)+T]=R[3*(g+L)+T];268435456&R[3*(g+L)+2]&&(this._extendedAttrs[p+L]=S._extendedAttrs[g+L])}else for(let L=0;L<m;L++){for(let T=0;T<3;T++)this._data[3*(p+L)+T]=R[3*(g+L)+T];268435456&R[3*(g+L)+2]&&(this._extendedAttrs[p+L]=S._extendedAttrs[g+L])}const A=Object.keys(S._combined);for(let L=0;L<A.length;L++){const T=parseInt(A[L],10);T>=g&&(this._combined[T-g+p]=S._combined[T])}}translateToString(S,g,p,m){g=g??0,p=p??this.length,S&&(p=Math.min(p,this.getTrimmedLength())),m&&(m.length=0);let E="";for(;g<p;){const R=this._data[3*g+0],A=2097151&R,L=2097152&R?this._combined[g]:A?(0,C.stringFromCodePoint)(A):c.WHITESPACE_CELL_CHAR;if(E+=L,m)for(let T=0;T<L.length;++T)m.push(g);g+=R>>22||1}return m&&m.push(g),E}}a.BufferLine=k},4841:(_,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:(_,a)=>{function u(h,d,c){if(d===h.length-1)return h[d].getTrimmedLength();const C=!h[d].hasContent(c-1)&&h[d].getWidth(c-1)===1,w=h[d+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,d,c,C,w){const k=[];for(let x=0;x<h.length-1;x++){let S=x,g=h.get(++S);if(!g.isWrapped)continue;const p=[h.get(x)];for(;S<h.length&&g.isWrapped;)p.push(g),g=h.get(++S);if(C>=x&&C<S){x+=p.length-1;continue}let m=0,E=u(p,m,d),R=1,A=0;for(;R<p.length;){const T=u(p,R,d),B=T-A,N=c-E,F=Math.min(B,N);p[m].copyCellsFrom(p[R],A,E,F,!1),E+=F,E===c&&(m++,E=0),A+=F,A===T&&(R++,A=0),E===0&&m!==0&&p[m-1].getWidth(c-1)===2&&(p[m].copyCellsFrom(p[m-1],c-1,E++,1,!1),p[m-1].setCell(c-1,w))}p[m].replaceCells(E,c,w);let L=0;for(let T=p.length-1;T>0&&(T>m||p[T].getTrimmedLength()===0);T--)L++;L>0&&(k.push(x+p.length-L),k.push(L)),x+=p.length-1}return k},a.reflowLargerCreateNewLayout=function(h,d){const c=[];let C=0,w=d[C],k=0;for(let x=0;x<h.length;x++)if(w===x){const S=d[++C];h.onDeleteEmitter.fire({index:x-k,amount:S}),x+=S-1,k+=S,w=d[++C]}else c.push(x);return{layout:c,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,d){const c=[];for(let C=0;C<d.length;C++)c.push(h.get(d[C]));for(let C=0;C<c.length;C++)h.set(C,c[C]);h.length=d.length},a.reflowSmallerGetNewLineLengths=function(h,d,c){const C=[],w=h.map(((g,p)=>u(h,p,d))).reduce(((g,p)=>g+p));let k=0,x=0,S=0;for(;S<w;){if(w-S<c){C.push(w-S);break}k+=c;const g=u(h,x,d);k>g&&(k-=g,x++);const p=h[x].getWidth(k-1)===2;p&&k--;const m=p?c-1:c;C.push(m),S+=m}return C},a.getWrappedLineTrimmedLength=u},5295:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=u(8460),d=u(844),c=u(9092);class C extends d.Disposable{constructor(k,x){super(),this._optionsService=k,this._bufferService=x,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new 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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),d=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[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const S=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const g=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=g&&g<=57343?this.content=1024*(S-55296)+g-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=C},643:(_,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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=u(8460),d=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,d.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=c,c._nextId=1},7116:(_,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:(_,a)=>{var u,h,d;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=`
56
- `,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}\\`})(d||(a.C1_ESCAPED=d={}))},7399:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=u(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(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 g=d[c.keyCode],p=g==null?void 0:g[c.shiftKey?1:0];if(p)x.key=h.C0.ESC+p;else if(c.keyCode>=65&&c.keyCode<=90){const m=c.ctrlKey?c.keyCode-64:c.keyCode+32;let E=String.fromCharCode(m);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 m=c.code.slice(3,4);c.shiftKey||(m=m.toLowerCase()),x.key=h.C0.ESC+m,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:(_,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,d=u.length){let c="";for(let C=h;C<d;++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 d=u.length;if(!d)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<d;++w){const k=u.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=d)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 d=u.length;if(!d)return 0;let c,C,w,k,x=0,S=0,g=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(;g<B;){if(g>=d)return 0;if(A=u[g++],(192&A)!=128){g--,E=!0;break}this.interim[L++]=A,R<<=6,R|=63&A}E||(T===2?R<128?g--: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 p=d-4;let m=g;for(;m<d;){for(;!(!(m<p)||128&(c=u[m])||128&(C=u[m+1])||128&(w=u[m+2])||128&(k=u[m+3]));)h[x++]=c,h[x++]=C,h[x++]=w,h[x++]=k,m+=4;if(c=u[m++],c<128)h[x++]=c;else if((224&c)==192){if(m>=d)return this.interim[0]=c,x;if(C=u[m++],(192&C)!=128){m--;continue}if(S=(31&c)<<6|63&C,S<128){m--;continue}h[x++]=S}else if((240&c)==224){if(m>=d)return this.interim[0]=c,x;if(C=u[m++],(192&C)!=128){m--;continue}if(m>=d)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[m++],(192&w)!=128){m--;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(m>=d)return this.interim[0]=c,x;if(C=u[m++],(192&C)!=128){m--;continue}if(m>=d)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[m++],(192&w)!=128){m--;continue}if(m>=d)return this.interim[0]=c,this.interim[1]=C,this.interim[2]=w,x;if(k=u[m++],(192&k)!=128){m--;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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=u(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],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<d.length;++w)C.fill(0,d[w][0],d[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?C[w]:(function(k,x){let S,g=0,p=x.length-1;if(k<x[0][0]||k>x[p][1])return!1;for(;p>=g;)if(S=g+p>>1,k>x[S][1])g=S+1;else{if(!(k<x[S][0]))return!0;p=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 g=h.UnicodeService.extractWidth(k);g===0?S=!1:g>x&&(x=g)}return h.UnicodeService.createPropertyValue(0,x,S)}}},5981:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=u(8460),d=u(844);class c extends d.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const S=this._callbacks.shift();S&&S()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,k){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k)}_innerWrite(w=0,k=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const S=this._writeBuffer[this._bufferOffset],g=this._action(S,k);if(g){const m=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void g.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(m)}const p=this._callbacks[this._bufferOffset];if(p&&p(),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:(_,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 d(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:${d(w,C)}/${d(k,C)}/${d(x,C)}`}},5770:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=u(482),d=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 g=S.indexOf(x);g!==-1&&S.splice(g,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 g=this._active.length-1;g>=0;g--)this._active[g].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,g=this._active.length-1,p=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,S=x,p=this._stack.fallThrough,this._stack.paused=!1),!p&&S===!1){for(;g>=0&&(S=this._active[g].unhook(k),S!==!0);g--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,S;g--}for(;g>=0;g--)if(S=this._active[g].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",k);this._active=C,this._ident=0}};const w=new d.Params;w.addParam(0),a.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=w,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():w,this._data="",this._hitLimit=!1}put(k,x,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,S),this._data.length>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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=u(844),d=u(8742),c=u(6242),C=u(6351);class w{constructor(g){this.table=new Uint8Array(g)}setDefault(g,p){this.table.fill(g<<4|p)}add(g,p,m,E){this.table[p<<8|g]=m<<4|E}addMany(g,p,m,E){for(let R=0;R<g.length;R++)this.table[p<<8|g[R]]=m<<4|E}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),g=Array.apply(null,Array(256)).map(((L,T)=>T)),p=(L,T)=>g.slice(L,T),m=p(32,127),E=p(0,24);E.push(25),E.push.apply(E,p(28,32));const R=p(0,14);let A;for(A in S.setDefault(1,0),S.addMany(m,0,2,0),R)S.addMany([24,26,153,154],A,3,0),S.addMany(p(128,144),A,3,0),S.addMany(p(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(m,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(p(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(m,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(p(64,127),3,7,0),S.addMany(p(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(p(48,60),4,8,4),S.addMany(p(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(p(32,64),6,0,6),S.add(127,6,0,6),S.addMany(p(64,127),6,0,0),S.addMany(p(32,48),3,9,5),S.addMany(p(32,48),5,9,5),S.addMany(p(48,64),5,0,6),S.addMany(p(64,127),5,7,0),S.addMany(p(32,48),4,9,5),S.addMany(p(32,48),1,9,2),S.addMany(p(32,48),2,9,2),S.addMany(p(48,127),2,10,0),S.addMany(p(48,80),1,10,0),S.addMany(p(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(p(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(p(28,32),9,0,9),S.addMany(p(32,48),9,9,12),S.addMany(p(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(E,11,0,11),S.addMany(p(32,128),11,0,11),S.addMany(p(28,32),11,0,11),S.addMany(E,10,0,10),S.add(127,10,0,10),S.addMany(p(28,32),10,0,10),S.addMany(p(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(p(32,48),10,9,12),S.addMany(E,12,0,12),S.add(127,12,0,12),S.addMany(p(28,32),12,0,12),S.addMany(p(32,48),12,9,12),S.addMany(p(48,64),12,0,11),S.addMany(p(64,127),12,12,13),S.addMany(p(64,127),10,12,13),S.addMany(p(64,127),9,12,13),S.addMany(E,13,13,13),S.addMany(m,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(g=a.VT500_TRANSITION_TABLE){super(),this._transitions=g,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(p,m,E)=>{},this._executeHandlerFb=p=>{},this._csiHandlerFb=(p,m)=>{},this._escHandlerFb=p=>{},this._errorHandlerFb=p=>p,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(g,p=[64,126]){let m=0;if(g.prefix){if(g.prefix.length>1)throw new Error("only one byte as prefix supported");if(m=g.prefix.charCodeAt(0),m&&60>m||m>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(g.intermediates){if(g.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<g.intermediates.length;++R){const A=g.intermediates.charCodeAt(R);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");m<<=8,m|=A}}if(g.final.length!==1)throw new Error("final must be a single byte");const E=g.final.charCodeAt(0);if(p[0]>E||E>p[1])throw new Error(`final must be in range ${p[0]} .. ${p[1]}`);return m<<=8,m|=E,m}identToString(g){const p=[];for(;g;)p.push(String.fromCharCode(255&g)),g>>=8;return p.reverse().join("")}setPrintHandler(g){this._printHandler=g}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(g,p){const m=this._identifier(g,[48,126]);this._escHandlers[m]===void 0&&(this._escHandlers[m]=[]);const E=this._escHandlers[m];return E.push(p),{dispose:()=>{const R=E.indexOf(p);R!==-1&&E.splice(R,1)}}}clearEscHandler(g){this._escHandlers[this._identifier(g,[48,126])]&&delete this._escHandlers[this._identifier(g,[48,126])]}setEscHandlerFallback(g){this._escHandlerFb=g}setExecuteHandler(g,p){this._executeHandlers[g.charCodeAt(0)]=p}clearExecuteHandler(g){this._executeHandlers[g.charCodeAt(0)]&&delete this._executeHandlers[g.charCodeAt(0)]}setExecuteHandlerFallback(g){this._executeHandlerFb=g}registerCsiHandler(g,p){const m=this._identifier(g);this._csiHandlers[m]===void 0&&(this._csiHandlers[m]=[]);const E=this._csiHandlers[m];return E.push(p),{dispose:()=>{const R=E.indexOf(p);R!==-1&&E.splice(R,1)}}}clearCsiHandler(g){this._csiHandlers[this._identifier(g)]&&delete this._csiHandlers[this._identifier(g)]}setCsiHandlerFallback(g){this._csiHandlerFb=g}registerDcsHandler(g,p){return this._dcsParser.registerHandler(this._identifier(g),p)}clearDcsHandler(g){this._dcsParser.clearHandler(this._identifier(g))}setDcsHandlerFallback(g){this._dcsParser.setHandlerFallback(g)}registerOscHandler(g,p){return this._oscParser.registerHandler(g,p)}clearOscHandler(g){this._oscParser.clearHandler(g)}setOscHandlerFallback(g){this._oscParser.setHandlerFallback(g)}setErrorHandler(g){this._errorHandler=g}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(g,p,m,E,R){this._parseStack.state=g,this._parseStack.handlers=p,this._parseStack.handlerPos=m,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(g,p,m){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(m===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(m===!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(m===!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=g[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,m),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=g[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,m),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<p;++T){switch(R=g[T],A=this._transitions.table[this.currentState<<8|(R<160?R:k)],A>>4){case 2:for(let V=T+1;;++V){if(V>=p||(R=g[V])<32||R>126&&R<k){this._printHandler(g,T,V),T=V-1;break}if(++V>=p||(R=g[V])<32||R>126&&R<k){this._printHandler(g,T,V),T=V-1;break}if(++V>=p||(R=g[V])<32||R>126&&R<k){this._printHandler(g,T,V),T=V-1;break}if(++V>=p||(R=g[V])<32||R>126&&R<k){this._printHandler(g,T,V),T=V-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<p&&(R=g[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 V=T+1;;++V)if(V>=p||(R=g[V])===24||R===26||R===27||R>127&&R<k){this._dcsParser.put(g,T,V),T=V-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 V=T+1;;V++)if(V>=p||(R=g[V])<32||R>127&&R<k){this._oscParser.put(g,T,V),T=V-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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=u(5770),d=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,d.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,d.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:(_,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:(_,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 d={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(d),h.dispose=()=>this._wrappedAddonDispose(d),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let d=0;d<this._addons.length;d++)if(this._addons[d]===u){h=d;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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=u(3785),d=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 d.CellData}}},3785:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=u(511);a.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,c){if(!(d<0||d>=this._line.length))return c?(this._line.loadCell(d,c),c):this._line.loadCell(d,new h.CellData)}translateToString(d,c,C){return this._line.translateToString(d,c,C)}}},8285:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),d=u(8460),c=u(844);class C extends c.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=C},7975:(_,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,(d=>h(d.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((d,c)=>h(d,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:(_,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(_,a,u){var h=this&&this.__decorate||function(S,g,p,m){var E,R=arguments.length,A=R<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,p):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,g,p,m);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(g,p,A):E(g,p))||A);return R>3&&A&&Object.defineProperty(g,p,A),A},d=this&&this.__param||function(S,g){return function(p,m){g(p,m,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,g){this.cols=S,this.rows=g,this.buffers.resize(S,g),this._onResize.fire({cols:S,rows:g})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,g=!1){const p=this.buffer;let m;m=this._cachedBlankLine,m&&m.length===this.cols&&m.getFg(0)===S.fg&&m.getBg(0)===S.bg||(m=p.getBlankLine(S,g),this._cachedBlankLine=m),m.isWrapped=g;const E=p.ybase+p.scrollTop,R=p.ybase+p.scrollBottom;if(p.scrollTop===0){const A=p.lines.isFull;R===p.lines.length-1?A?p.lines.recycle().copyFrom(m):p.lines.push(m.clone()):p.lines.splice(R+1,0,m.clone()),A?this.isUserScrolling&&(p.ydisp=Math.max(p.ydisp-1,0)):(p.ybase++,this.isUserScrolling||p.ydisp++)}else{const A=R-E+1;p.lines.shiftElements(E+1,A-1,-1),p.lines.set(R,m.clone())}this.isUserScrolling||(p.ydisp=p.ybase),this._onScroll.fire(p.ydisp)}scrollLines(S,g,p){const m=this.buffer;if(S<0){if(m.ydisp===0)return;this.isUserScrolling=!0}else S+m.ydisp>=m.ybase&&(this.isUserScrolling=!1);const E=m.ydisp;m.ydisp=Math.max(Math.min(m.ydisp+S,m.ybase),0),E!==m.ydisp&&(g||this._onScroll.fire(m.ydisp))}};a.BufferService=x=h([d(0,k.IOptionsService)],x)},7994:(_,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(_,a,u){var h=this&&this.__decorate||function(m,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(m,E,R,A);else for(var N=m.length-1;N>=0;N--)(L=m[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},d=this&&this.__param||function(m,E){return function(R,A){E(R,A,m)}};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:m=>m.button!==4&&m.action===1&&(m.ctrl=!1,m.alt=!1,m.shift=!1,!0)},VT200:{events:19,restrict:m=>m.action!==32},DRAG:{events:23,restrict:m=>m.action!==32||m.button!==3},ANY:{events:31,restrict:m=>!0}};function x(m,E){let R=(m.ctrl?16:0)|(m.shift?4:0)|(m.alt?8:0);return m.button===4?(R|=64,R|=m.action):(R|=3&m.button,4&m.button&&(R|=64),8&m.button&&(R|=128),m.action===32?R|=32:m.action!==0||E||(R|=3)),R}const S=String.fromCharCode,g={DEFAULT:m=>{const E=[x(m,!1)+32,m.col+32,m.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${S(E[0])}${S(E[1])}${S(E[2])}`},SGR:m=>{const E=m.action===0&&m.button!==4?"m":"M";return`\x1B[<${x(m,!0)};${m.col};${m.row}${E}`},SGR_PIXELS:m=>{const E=m.action===0&&m.button!==4?"m":"M";return`\x1B[<${x(m,!0)};${m.x};${m.y}${E}`}};let p=a.CoreMouseService=class extends w.Disposable{constructor(m,E){super(),this._bufferService=m,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(g))this.addEncoding(R,g[R]);this.reset()}addProtocol(m,E){this._protocols[m]=E}addEncoding(m,E){this._encodings[m]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(m){if(!this._protocols[m])throw new Error(`unknown protocol "${m}"`);this._activeProtocol=m,this._onProtocolChange.fire(this._protocols[m].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(m){if(!this._encodings[m])throw new Error(`unknown encoding "${m}"`);this._activeEncoding=m}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(m){if(m.col<0||m.col>=this._bufferService.cols||m.row<0||m.row>=this._bufferService.rows||m.button===4&&m.action===32||m.button===3&&m.action!==32||m.button!==4&&(m.action===2||m.action===3)||(m.col++,m.row++,m.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,m,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(m))return!1;const E=this._encodings[this._activeEncoding](m);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=m,!0}explainEvents(m){return{down:!!(1&m),up:!!(2&m),drag:!!(4&m),move:!!(8&m),wheel:!!(16&m)}}_equalEvents(m,E,R){if(R){if(m.x!==E.x||m.y!==E.y)return!1}else if(m.col!==E.col||m.row!==E.row)return!1;return m.button===E.button&&m.action===E.action&&m.ctrl===E.ctrl&&m.alt===E.alt&&m.shift===E.shift}};a.CoreMouseService=p=h([d(0,c.IBufferService),d(1,c.ICoreService)],p)},6975:function(_,a,u){var h=this&&this.__decorate||function(p,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,m,E,R);else for(var B=p.length-1;B>=0;B--)(A=p[B])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},d=this&&this.__param||function(p,m){return function(E,R){m(E,R,p)}};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 g=a.CoreService=class extends w.Disposable{constructor(p,m,E){super(),this._bufferService=p,this._logService=m,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(p,m=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;m&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),m&&this._onUserInput.fire(),this._logService.debug(`sending data "${p}"`,(()=>p.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(p)}triggerBinaryEvent(p){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${p}"`,(()=>p.split("").map((m=>m.charCodeAt(0))))),this._onBinary.fire(p))}};a.CoreService=g=h([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],g)},9074:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),d=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((p=>p==null?void 0:p.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,c.toDisposable)((()=>this.reset())))}registerDecoration(p){if(p.marker.isDisposed)return;const m=new S(p);if(m){const E=m.marker.onDispose((()=>m.dispose()));m.onDispose((()=>{m&&(this._decorations.delete(m)&&this._onDecorationRemoved.fire(m),E.dispose())})),this._decorations.insert(m),this._onDecorationRegistered.fire(m)}return m}reset(){for(const p of this._decorations.values())p.dispose();this._decorations.clear()}*getDecorationsAtCell(p,m,E){let R=0,A=0;for(const L of this._decorations.getKeyIterator(m))R=L.options.x??0,A=R+(L.options.width??1),p>=R&&p<A&&(!E||(L.options.layer??"bottom")===E)&&(yield L)}forEachDecorationAtCell(p,m,E,R){this._decorations.forEachByKey(m,(A=>{w=A.options.x??0,k=w+(A.options.width??1),p>=w&&p<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(p){super(),this.options=p,this.onRenderEmitter=this.register(new d.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=p.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=u(2585),d=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,d.getServiceDependencies)(C).sort(((g,p)=>g.index-p.index)),x=[];for(const g of k){const p=this._services.get(g.id);if(!p)throw new Error(`[createInstance] ${C.name} depends on UNKNOWN service ${g.id}.`);x.push(p)}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(_,a,u){var h=this&&this.__decorate||function(S,g,p,m){var E,R=arguments.length,A=R<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,p):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,g,p,m);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(g,p,A):E(g,p))||A);return R>3&&A&&Object.defineProperty(g,p,A),A},d=this&&this.__param||function(S,g){return function(p,m){g(p,m,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 g=0;g<S.length;g++)typeof S[g]=="function"&&(S[g]=S[g]())}_log(S,g,p){this._evalLazyOptionalParams(p),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+g,...p)}trace(S,...g){var p;this._logLevel<=C.LogLevelEnum.TRACE&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.trace.bind(this._optionsService.options.logger))??console.log,S,g)}debug(S,...g){var p;this._logLevel<=C.LogLevelEnum.DEBUG&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.debug.bind(this._optionsService.options.logger))??console.log,S,g)}info(S,...g){var p;this._logLevel<=C.LogLevelEnum.INFO&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.info.bind(this._optionsService.options.logger))??console.info,S,g)}warn(S,...g){var p;this._logLevel<=C.LogLevelEnum.WARN&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.warn.bind(this._optionsService.options.logger))??console.warn,S,g)}error(S,...g){var p;this._logLevel<=C.LogLevelEnum.ERROR&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.error.bind(this._optionsService.options.logger))??console.error,S,g)}};a.LogService=x=h([d(0,C.IOptionsService)],x),a.setTraceLogger=function(S){k=S},a.traceCall=function(S,g,p){if(typeof p.value!="function")throw new Error("not supported");const m=p.value;p.value=function(...E){if(k.logLevel!==C.LogLevelEnum.TRACE)return m.apply(this,E);k.trace(`GlyphRenderer#${m.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const R=m.apply(this,E);return k.trace(`GlyphRenderer#${m.name} return`,R),R}}},7302:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=u(8460),d=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 d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...a.DEFAULT_OPTIONS};for(const g in x)if(g in S)try{const p=x[g];S[g]=this._sanitizeAndValidateOption(g,p)}catch(p){console.error(p)}this.rawOptions=S,this.options={...S},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,S){return this.onOptionChange((g=>{g===x&&S(this.rawOptions[x])}))}onMultipleOptionChange(x,S){return this.onOptionChange((g=>{x.indexOf(g)!==-1&&S()}))}_setupOptions(){const x=g=>{if(!(g in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${g}"`);return this.rawOptions[g]},S=(g,p)=>{if(!(g in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${g}"`);p=this._sanitizeAndValidateOption(g,p),this.rawOptions[g]!==p&&(this.rawOptions[g]=p,this._onOptionChange.fire(g))};for(const g in this.rawOptions){const p={get:x.bind(this,g),set:S.bind(this,g)};Object.defineProperty(this.options,g,p)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=a.DEFAULT_OPTIONS[x]),!(function(g){return g==="block"||g==="underline"||g==="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(_,a,u){var h=this&&this.__decorate||function(w,k,x,S){var g,p=arguments.length,m=p<3?k:S===null?S=Object.getOwnPropertyDescriptor(k,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,k,x,S);else for(var E=w.length-1;E>=0;E--)(g=w[E])&&(m=(p<3?g(m):p>3?g(k,x,m):g(k,x))||m);return p>3&&m&&Object.defineProperty(k,x,m),m},d=this&&this.__param||function(w,k){return function(x,S){k(x,S,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const 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),g=this._entriesWithId.get(S);if(g)return this.addLineToLink(g.id,k.ybase+k.y),g.id;const p=k.addMarker(k.ybase+k.y),m={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[p]};return p.onDispose((()=>this._removeMarkerFromLink(m,p))),this._entriesWithId.set(m.key,m),this._dataByLinkId.set(m.id,m),m.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([d(0,c.IBufferService)],C)},8343:(_,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(d){return d[h]||[]},a.createDecorator=function(d){if(a.serviceRegistry.has(d))return a.serviceRegistry.get(d);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,g){S[u]===S?S[h].push({id:x,index:g}):(S[h]=[{id:x,index:g}],S[u]=S)})(c,C,k)};return c.toString=()=>d,a.serviceRegistry.set(d,c),c}},2585:(_,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 d;a.IBufferService=(0,h.createDecorator)("BufferService"),a.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),a.ICoreService=(0,h.createDecorator)("CoreService"),a.ICharsetService=(0,h.createDecorator)("CharsetService"),a.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(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"})(d||(a.LogLevelEnum=d={})),a.ILogService=(0,h.createDecorator)("LogService"),a.IOptionsService=(0,h.createDecorator)("OptionsService"),a.IOscLinkService=(0,h.createDecorator)("OscLinkService"),a.IUnicodeService=(0,h.createDecorator)("UnicodeService"),a.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=u(8460),d=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 d.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let k=0,x=0;const S=w.length;for(let g=0;g<S;++g){let p=w.charCodeAt(g);if(55296<=p&&p<=56319){if(++g>=S)return k+this.wcwidth(p);const R=w.charCodeAt(g);56320<=R&&R<=57343?p=1024*(p-55296)+R-56320+65536:k+=this.wcwidth(R)}const m=this.charProperties(p,x);let E=c.extractWidth(m);c.extractShouldJoin(m)&&(E-=c.extractWidth(x)),k+=E,x=m}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=c}},o={};function v(_){var a=o[_];if(a!==void 0)return a.exports;var u=o[_]={exports:{}};return l[_].call(u.exports,u,u.exports,v),u.exports}var b={};return(()=>{var _=b;Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;const a=v(9042),u=v(3236),h=v(844),d=v(5741),c=v(8285),C=v(7975),w=v(7090),k=["cols","rows"];class x extends h.Disposable{constructor(g){super(),this._core=this.register(new u.Terminal(g)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const p=E=>this._core.options[E],m=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:p.bind(this,E),set:m.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_checkReadonlyOptions(g){if(k.includes(g))throw new Error(`Option "${g}" 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 g=this._core.coreService.decPrivateModes;let p="none";switch(this._core.coreMouseService.activeProtocol){case"X10":p="x10";break;case"VT200":p="vt200";break;case"DRAG":p="drag";break;case"ANY":p="any"}return{applicationCursorKeysMode:g.applicationCursorKeys,applicationKeypadMode:g.applicationKeypad,bracketedPasteMode:g.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:p,originMode:g.origin,reverseWraparoundMode:g.reverseWraparound,sendFocusMode:g.sendFocus,wraparoundMode:g.wraparound}}get options(){return this._publicOptions}set options(g){for(const p in g)this._publicOptions[p]=g[p]}blur(){this._core.blur()}focus(){this._core.focus()}input(g,p=!0){this._core.input(g,p)}resize(g,p){this._verifyIntegers(g,p),this._core.resize(g,p)}open(g){this._core.open(g)}attachCustomKeyEventHandler(g){this._core.attachCustomKeyEventHandler(g)}attachCustomWheelEventHandler(g){this._core.attachCustomWheelEventHandler(g)}registerLinkProvider(g){return this._core.registerLinkProvider(g)}registerCharacterJoiner(g){return this._checkProposedApi(),this._core.registerCharacterJoiner(g)}deregisterCharacterJoiner(g){this._checkProposedApi(),this._core.deregisterCharacterJoiner(g)}registerMarker(g=0){return this._verifyIntegers(g),this._core.registerMarker(g)}registerDecoration(g){return this._checkProposedApi(),this._verifyPositiveIntegers(g.x??0,g.width??0,g.height??0),this._core.registerDecoration(g)}hasSelection(){return this._core.hasSelection()}select(g,p,m){this._verifyIntegers(g,p,m),this._core.select(g,p,m)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(g,p){this._verifyIntegers(g,p),this._core.selectLines(g,p)}dispose(){super.dispose()}scrollLines(g){this._verifyIntegers(g),this._core.scrollLines(g)}scrollPages(g){this._verifyIntegers(g),this._core.scrollPages(g)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(g){this._verifyIntegers(g),this._core.scrollToLine(g)}clear(){this._core.clear()}write(g,p){this._core.write(g,p)}writeln(g,p){this._core.write(g),this._core.write(`\r
57
- `,p)}paste(g){this._core.paste(g)}refresh(g,p){this._verifyIntegers(g,p),this._core.refresh(g,p)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(g){this._addonManager.loadAddon(this,g)}static get strings(){return a}_verifyIntegers(...g){for(const p of g)if(p===1/0||isNaN(p)||p%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...g){for(const p of g)if(p&&(p===1/0||isNaN(p)||p%1!=0||p<0))throw new Error("This API only accepts positive integers")}}_.Terminal=x})(),b})()))})(Iu)),Iu.exports}var O0=L0();class B0{constructor(s,l){Op(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 _,a;const b=JSON.parse(v.data);b.type==="output"?l.onOutput(b.data):b.type==="error"?(_=l.onError)==null||_.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 V_({sessionId:n,active:s=!0,onEvent:l}){const o=de.useRef(null),v=de.useRef(null),b=de.useRef(null),_=de.useRef(null),a=de.useRef(s),u=de.useRef(l);function h(d={}){const c=o.current,C=v.current,w=b.current,k=_.current;if(!c||!C||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<z0||x.height<H0||(w.fit(),k.cols<N0||k.rows<j0)?!1:(C.resize(k.cols,k.rows),d.focus&&k.focus(),!0)}return de.useEffect(()=>{u.current=l},[l]),de.useEffect(()=>{a.current=s},[s]),de.useEffect(()=>{if(!o.current)return;const d=new O0.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:I0}),c=new D0.FitAddon;d.loadAddon(c),d.loadAddon(new M0.WebLinksAddon),d.open(o.current),_.current=d,b.current=c;const C=new B0(n,{onOutput(m){d.write(m)},onStatus(m){var E;(E=u.current)==null||E.call(u,m.type)},onError(m){var E;d.writeln(`\r
58
- [VCM] ${m}`),(E=u.current)==null||E.call(u,m)}});v.current=C;const w=d.onData(m=>{C.sendInput(m)});let k=0,x=0,S=0;const g=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},p=new ResizeObserver(()=>{g()});return p.observe(o.current),x=window.requestAnimationFrame(g),S=window.setTimeout(g,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),p.disconnect(),w.dispose(),C.close(),d.dispose(),v.current=null,_.current=null,b.current=null}},[n]),de.useEffect(()=>{if(!s)return;const d=[],c=[];return d.push(window.requestAnimationFrame(()=>{h({focus:!0}),d.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 d)window.cancelAnimationFrame(C);for(const C of c)window.clearTimeout(C)}},[s]),de.useEffect(()=>{const d=()=>{a.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),j.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var d;return(d=_.current)==null?void 0:d.focus()}})}const z0=160,H0=80,N0=20,j0=5,I0={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 Tr({status:n}){return j.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function U0({status:n,bootstrapStatus:s,applyResult:l,busy:o=!1,onRefresh:v,onApply:b,onStartBootstrap:_}){const[a,u]=de.useState(!1),h=s==null?void 0:s.session;return de.useEffect(()=>{h||u(!1)},[h]),n?j.jsxs("section",{className:"harness-panel",children:[j.jsxs("div",{className:"harness-stage",children:[j.jsxs("div",{className:"harness-panel-header",children:[j.jsxs("div",{children:[j.jsx("strong",{children:"Fixed install"}),j.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"})]}),j.jsxs("div",{className:"harness-actions",children:[j.jsx("button",{type:"button",disabled:o,onClick:()=>void v(),children:"Refresh"}),j.jsx("button",{type:"button",disabled:o||!n.needsApply,onClick:()=>void b(),children:"Install / Update"})]})]}),j.jsx("ol",{className:"harness-file-list",children:n.files.map(d=>j.jsxs("li",{children:[j.jsx("span",{children:d.path}),j.jsx(Tr,{status:d.action})]},d.path))})]}),j.jsxs("div",{className:"harness-stage",children:[j.jsxs("div",{className:"harness-panel-header",children:[j.jsxs("div",{children:[j.jsx("strong",{children:"Bootstrap"}),j.jsx("p",{className:"muted",children:s?P0(s.status):"not loaded"})]}),j.jsx("div",{className:"harness-actions",children:j.jsx("button",{type:"button",disabled:o||!(s!=null&&s.canStart),onClick:()=>{u(!0),_()},children:"Run Bootstrap"})})]}),s?j.jsxs(j.Fragment,{children:[j.jsx("ol",{className:"harness-file-list",children:s.checks.map(d=>j.jsxs("li",{title:d.detail??d.path??"",children:[j.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),j.jsx(Tr,{status:d.status})]},d.key))}),h?j.jsxs("div",{className:"harness-bootstrap-session",children:[j.jsxs("div",{children:[j.jsx("span",{children:h.command}),j.jsx(Tr,{status:h.status})]}),j.jsx("button",{type:"button",onClick:()=>u(!0),children:"Open Terminal"})]}):null]}):j.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),n.plannedChanges.length>0?j.jsxs("div",{className:"harness-changes",children:[j.jsx("h3",{children:"Planned Changes"}),j.jsx("ul",{children:n.plannedChanges.map(d=>j.jsxs("li",{children:[j.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))})]}):null,l?j.jsxs("div",{className:"harness-result",children:[j.jsx("p",{children:l.message}),l.changedFiles.length>0?j.jsx("ul",{children:l.changedFiles.map(d=>j.jsxs("li",{children:[j.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?j.jsx("ul",{className:"warnings",children:n.warnings.map(d=>j.jsx("li",{children:d},d))}):null,s!=null&&s.warnings.length?j.jsx("ul",{className:"warnings",children:s.warnings.map(d=>j.jsx("li",{children:d},d))}):null,a&&h?j.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:j.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[j.jsxs("header",{className:"harness-bootstrap-modal-header",children:[j.jsxs("div",{children:[j.jsx("strong",{children:"Harness Bootstrap Terminal"}),j.jsx("p",{className:"muted",children:h.command})]}),j.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[j.jsx(Tr,{status:h.status}),j.jsx("button",{type:"button",onClick:()=>u(!1),children:"Close"})]})]}),j.jsx("div",{className:"harness-bootstrap-terminal",children:j.jsx(V_,{sessionId:h.id,active:a})})]})}):null]}):null}function P0(n){return n.replaceAll("_"," ")}function mc(n){return{total:n.length,accepted:n.filter(s=>s.acceptedAt).length,delivered:n.filter(s=>s.deliveredAt).length}}function F0(n,s=6){const l=[...n].sort(G0).map((v,b)=>({message:v,sequence:b+1}));return[...s===null?l:l.slice(-s)].sort((v,b)=>b.sequence-v.sequence)}function q0({messages:n,orchestration:s,busy:l,maxMessages:o=6,showControls:v=!0,showHeader:b=!0,onModeChange:_,onMarkAllDone:a}){const[u,h]=de.useState(null),d=mc(n),c=(s==null?void 0:s.mode)??"manual",C=F0(n,o);async function w(k){await Y0(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return j.jsxs("section",{className:"message-panel",children:[b?j.jsxs("div",{className:"message-panel-header",children:[j.jsxs("div",{children:[j.jsx("h2",{children:"Messages"}),j.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),v&&_?j.jsx("div",{className:"message-controls",children:j.jsxs("label",{className:"message-mode-toggle",children:[j.jsx("input",{type:"checkbox",checked:c==="auto",disabled:l,onChange:k=>_(k.target.checked?"auto":"manual")}),j.jsx("span",{children:"Auto orchestration"})]})}):null,v&&a?j.jsx("button",{type:"button",disabled:l,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?j.jsx("p",{className:"muted",children:"No role messages yet."}):j.jsx("ol",{className:"message-list",children:C.map(({message:k,sequence:x})=>j.jsxs("li",{className:"message-item",children:[j.jsxs("div",{className:"message-item-main",children:[j.jsxs("div",{className:"message-meta",children:[j.jsxs("span",{className:"message-sequence",children:["#",x]}),j.jsx("time",{dateTime:aa(k),children:V0(aa(k))}),j.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),j.jsx("span",{children:k.type})]}),j.jsx("p",{children:k.body}),k.failureReason?j.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?j.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),j.jsx("div",{className:"message-actions",children:j.jsx("button",{type:"button",disabled:l,onClick:()=>void w(k),children:u===k.id?"Copied":"Copy"})})]},k.id))})]})}function V0(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 aa(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function G0(n,s){const l=aa(n).localeCompare(aa(s));if(l!==0)return l;const o=n.createdAt.localeCompare(s.createdAt);return o!==0?o:n.id.localeCompare(s.id)}async function Y0(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]=de.useState(n);de.useEffect(()=>{n&&b(n)},[n]);async function _(a){a.preventDefault(),await o(v)}return j.jsx("form",{className:"repo-connect",onSubmit:_,children:j.jsxs("div",{className:s.length>0?"inline-form has-recent-paths":"inline-form",children:[j.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:v,onChange:a=>b(a.target.value),placeholder:"/path/to/repo"}),s.length>0?j.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&b(a.target.value)},children:[j.jsx("option",{value:"",children:"Recent"}),s.map(a=>j.jsx("option",{value:a,children:a},a))]}):null,j.jsx("button",{type:"submit",disabled:l||!v.trim(),children:"Connect"})]})})}function K0({tasks:n,activeTaskSlug:s,onSelect:l}){return j.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>j.jsxs("button",{className:o.taskSlug===s?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>l(o.taskSlug),children:[j.jsx("span",{children:o.title||o.taskSlug}),j.jsx(Tr,{status:o.status==="created"?"unknown":"running"})]},o.taskSlug))})}function $0({project:n,recentRepositoryPaths:s,tasks:l,activeTaskSlug:o,messages:v,orchestration:b,events:_,roundState:a,harnessStatus:u,harnessBootstrapStatus:h,harnessApplyResult:d,busy:c,onConnect:C,onRefreshHarness:w,onApplyHarness:k,onStartHarnessBootstrap:x,onCreateTask:S,onSelectTask:g,themeMode:p,onThemeModeChange:m,flowPauseAlerts:E,onFlowPauseAlertsChange:R,onTryFlowPauseAlert:A,onMarkAllMessagesDone:L,onDeleteMessageHistory:T}){const[B,N]=de.useState(""),[F,G]=de.useState(!0),[V,$]=de.useState(!1),[Y,q]=de.useState(!1),Q=mc(v),J=B.trim(),z=l.find(O=>O.taskSlug===o)??null;async function M(O){O.preventDefault(),await S({taskSlug:J,createWorktree:F}),N(""),G(!0)}return j.jsxs("div",{className:"project-dashboard",children:[j.jsx("header",{className:"brand-header",children:j.jsx("strong",{children:"VibeCodingMaster"})}),j.jsx(xr,{title:"Repository Path",defaultOpen:!o,children:j.jsx(W0,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:s,busy:c,onConnect:C})}),n?j.jsx(xr,{title:"Repository",children:j.jsxs("div",{className:"project-summary",children:[j.jsxs("dl",{children:[j.jsxs("div",{children:[j.jsx("dt",{children:"Path"}),j.jsx("dd",{children:n.repoRoot})]}),j.jsxs("div",{children:[j.jsx("dt",{children:"Branch"}),j.jsx("dd",{children:n.branch})]}),j.jsxs("div",{children:[j.jsx("dt",{children:"Working tree"}),j.jsx("dd",{children:n.isDirty?"uncommitted changes":"clean"})]})]}),n.warnings.length>0?j.jsx("ul",{className:"warnings",children:n.warnings.map(O=>j.jsx("li",{children:O},O))}):null]})}):null,j.jsx(xr,{title:"Settings",children:j.jsxs("div",{className:"sidebar-settings",children:[j.jsxs("button",{"aria-label":`Theme mode: ${$p(p)}`,className:"settings-toggle theme-mode-toggle",disabled:c,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>m(Z0(p)),children:[j.jsx("span",{children:"Theme"}),j.jsx("span",{children:$p(p)})]}),j.jsxs("button",{"aria-pressed":E,className:E?"settings-toggle is-active":"settings-toggle",disabled:c,type:"button",onClick:()=>R(!E),children:[j.jsx("span",{children:"Flow pause alert"}),j.jsx("span",{children:E?"on":"off"})]}),j.jsxs("button",{className:"settings-toggle",type:"button",onClick:A,children:[j.jsx("span",{children:"Try alert"}),j.jsx("span",{children:"test"})]}),o?j.jsxs(j.Fragment,{children:[j.jsxs("button",{type:"button",onClick:()=>$(!0),children:[j.jsx("span",{children:"Messages"}),j.jsxs("span",{className:"muted",children:[Q.total," total"]})]}),j.jsxs("button",{type:"button",onClick:()=>q(!0),children:[j.jsx("span",{children:"Events"}),j.jsxs("span",{className:"muted",children:[_.length," total"]})]})]}):null]})}),n?j.jsx(xr,{title:"VCM Harness",children:j.jsx(U0,{status:u,bootstrapStatus:h,applyResult:d,busy:c,onRefresh:w,onApply:k,onStartBootstrap:x})}):null,n?j.jsx(xr,{title:"New Task",children:j.jsx("div",{className:"task-create",children:j.jsxs("form",{onSubmit:M,children:[j.jsx("input",{value:B,onChange:O=>N(O.target.value),placeholder:"task name"}),j.jsxs("label",{className:"task-create-option",children:[j.jsx("input",{type:"checkbox",checked:F,onChange:O=>G(O.target.checked)}),j.jsx("span",{children:"Create worktree and branch"})]}),F?j.jsxs("div",{className:"task-create-preview",children:[j.jsxs("small",{children:["branch: ",J?`feature/${J}`:"feature/<task>"]}),j.jsxs("small",{children:["worktree: ",J?`.claude/worktrees/${J}`:".claude/worktrees/<task>"]})]}):j.jsx("div",{className:"task-create-preview",children:j.jsx("small",{children:"uses current repository path and current branch"})}),j.jsx("button",{type:"submit",disabled:c||!J,children:"Create"})]})})}):null,l.length>0?j.jsx(xr,{title:"Tasks",children:j.jsx(K0,{tasks:l,activeTaskSlug:o,onSelect:g})}):null,n&&z?j.jsx(X0,{task:z,roundState:a}):null,V?j.jsx(eS,{busy:c,messages:v,orchestration:b,onClose:()=>$(!1),onMarkAllDone:()=>{o&&L(o)},onDeleteMessageHistory:()=>{o&&T(o)}}):null,Y?j.jsx(J0,{events:_,onClose:()=>q(!1)}):null]})}function X0({roundState:n,task:s}){var h;const[l,o]=de.useState(()=>Date.now()),v=!!(n!=null&&n.startedAt&&(n.status==="active"||n.status==="settling")),b=Q0(s.createdAt,l),_=Wp(n,(n==null?void 0:n.totalCcActiveMs)??0,l),a=v&&n?Wp(n,n.currentRoundCcActiveMs,l):0,u=((h=s.title)==null?void 0:h.trim())||s.taskSlug;return de.useEffect(()=>{const d=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(d)},[]),j.jsxs("section",{className:"task-status-dock","aria-label":"Task status",children:[j.jsxs("div",{className:"task-status-dock-title",children:[j.jsx("strong",{title:u,children:u}),j.jsx("span",{className:`status-badge status-${s.status}`,children:s.status})]}),j.jsxs("dl",{className:"task-status-stats",children:[j.jsxs("div",{children:[j.jsx("dt",{children:"Started"}),j.jsx("dd",{children:Kp(s.createdAt)})]}),j.jsxs("div",{children:[j.jsx("dt",{children:"Total"}),j.jsx("dd",{children:Uu(b)})]}),j.jsxs("div",{children:[j.jsx("dt",{children:"Rounds"}),j.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),j.jsxs("div",{children:[j.jsx("dt",{children:"CC runtime"}),j.jsx("dd",{children:Uu(_)})]})]}),v&&n?j.jsxs("div",{className:"current-round-status",children:[j.jsxs("div",{className:"current-round-title",children:[j.jsx("span",{children:"Current round"}),j.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),j.jsxs("dl",{className:"task-status-stats",children:[j.jsxs("div",{children:[j.jsx("dt",{children:"Started"}),j.jsx("dd",{children:Kp(n.startedAt)})]}),j.jsxs("div",{children:[j.jsx("dt",{children:"CC runtime"}),j.jsx("dd",{children:Uu(a)})]})]})]}):null]})}function Wp(n,s,l){if(!(n!=null&&n.runningSince)||n.status!=="active")return s;const o=Date.parse(n.updatedAt);return Number.isFinite(o)?s+Math.max(0,l-o):s}function Q0(n,s){const l=Date.parse(n);return Number.isFinite(l)?Math.max(0,s-l):0}function Kp(n){if(!n)return"-";const s=new Date(n);return Number.isNaN(s.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(s)}function Uu(n){const s=Math.max(0,Math.floor(n/1e3)),l=Math.floor(s/3600),o=Math.floor(s%3600/60),v=s%60;return l>0?o>0?`${l}h ${o}m`:`${l}h`:o>0?v>0?`${o}m ${v}s`:`${o}m`:`${v}s`}function Z0(n){return n==="system"?"light":n==="light"?"dark":"system"}function $p(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function J0({events:n,onClose:s}){return j.jsx("div",{className:"modal-backdrop",children:j.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[j.jsxs("header",{children:[j.jsxs("div",{children:[j.jsx("h2",{children:"Events"}),j.jsxs("p",{className:"muted",children:[n.length," total"]})]}),j.jsx("button",{type:"button",onClick:s,children:"Close"})]}),j.jsx(A0,{events:n,maxEvents:null,showHeader:!1})]})})}function eS({busy:n,messages:s,orchestration:l,onClose:o,onMarkAllDone:v,onDeleteMessageHistory:b}){const _=mc(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(`
59
- `))&&v()}function u(){window.confirm([`Delete ${_.total} message histor${_.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
60
- `))&&b()}return j.jsx("div",{className:"modal-backdrop",children:j.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[j.jsxs("header",{children:[j.jsxs("div",{children:[j.jsx("h2",{children:"Messages"}),j.jsxs("p",{className:"muted",children:[_.total," total / ",_.accepted," accepted",l?` · ${l.mode}`:""]})]}),j.jsxs("div",{className:"modal-actions",children:[j.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),j.jsx("button",{type:"button",disabled:n||_.total===0,onClick:u,children:"Delete All"}),j.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),j.jsx(q0,{busy:n,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1})]})})}function xr({children:n,defaultOpen:s=!1,title:l}){const[o,v]=de.useState(s);return de.useEffect(()=>{v(s)},[s]),j.jsxs("section",{className:"sidebar-section",children:[j.jsxs("button",{"aria-expanded":o,className:"sidebar-section-toggle",type:"button",onClick:()=>v(b=>!b),children:[j.jsx("span",{children:l}),j.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),o?j.jsx("div",{className:"sidebar-section-content",children:n}):null]})}const fa=[{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}];fa.map(n=>n.name);fa.filter(n=>n.dispatchable).map(n=>n.name);function G_(n,s){return n.find(l=>l.role===s)}function tS({activeRole:n,sessions:s,onSelect:l}){return j.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:fa.map(o=>{const v=G_(s,o.name),b=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return j.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:[j.jsx("span",{children:o.label}),j.jsx(Tr,{status:b})]},o.name)})})}function nS({role:n,session:s,permissionMode:l,busy:o=!1,onPermissionModeChange:v,onStart:b,onResume:_,onStop:a,onRestart:u}){const h=(s==null?void 0:s.status)==="running",d=!!(s!=null&&s.claudeSessionId&&!h),c=!h&&!(s!=null&&s.claudeSessionId),C=!!(s&&s.permissionMode!==l);return j.jsxs("div",{className:"session-controls",children:[j.jsxs("label",{className:"permission-mode-field",children:[j.jsxs("span",{children:["Permission",j.jsx("small",{children:s?`current: ${s.permissionMode}${C?" / next launch":""}`:"applies on start"})]}),j.jsxs("select",{value:l,onChange:w=>v(w.target.value),children:[j.jsx("option",{value:"default",children:"默认"}),j.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),j.jsxs("div",{className:"session-toolbar",children:[j.jsx("button",{type:"button",disabled:o||!c,onClick:b,children:"Start"}),j.jsx("button",{type:"button",disabled:o||!d,onClick:_,children:"Resume"}),j.jsx("button",{type:"button",disabled:o||!s,onClick:u,children:"Restart"}),j.jsx("button",{type:"button",disabled:o||!s,onClick:a,children:"Stop"})]})]})}function iS(n,s){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const rS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lS={};function Xp(n,s){return(lS.jsx?sS:rS).test(n)}const aS=/[ \t\n\f\r]/g;function oS(n){return typeof n=="object"?n.type==="text"?Qp(n.value):!1:Qp(n)}function Qp(n){return n.replace(aS,"")===""}class zs{constructor(s,l,o){this.normal=l,this.property=s,o&&(this.space=o)}}zs.prototype.normal={};zs.prototype.property={};zs.prototype.space=void 0;function Y_(n,s){const l={},o={};for(const v of n)Object.assign(l,v.property),Object.assign(o,v.normal);return new zs(l,o,s)}function rc(n){return n.toLowerCase()}class Kt{constructor(s,l){this.attribute=l,this.property=s}}Kt.prototype.attribute="";Kt.prototype.booleanish=!1;Kt.prototype.boolean=!1;Kt.prototype.commaOrSpaceSeparated=!1;Kt.prototype.commaSeparated=!1;Kt.prototype.defined=!1;Kt.prototype.mustUseProperty=!1;Kt.prototype.number=!1;Kt.prototype.overloadedBoolean=!1;Kt.prototype.property="";Kt.prototype.spaceSeparated=!1;Kt.prototype.space=void 0;let uS=0;const He=Ii(),vt=Ii(),sc=Ii(),pe=Ii(),lt=Ii(),Dr=Ii(),nn=Ii();function Ii(){return 2**++uS}const lc=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:vt,commaOrSpaceSeparated:nn,commaSeparated:Dr,number:pe,overloadedBoolean:sc,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Pu=Object.keys(lc);class gc extends Kt{constructor(s,l,o,v){let b=-1;if(super(s,l),Zp(this,"space",v),typeof o=="number")for(;++b<Pu.length;){const _=Pu[b];Zp(this,Pu[b],(o&lc[_])===lc[_])}}}gc.prototype.defined=!0;function Zp(n,s,l){l&&(n[s]=l)}function Mr(n){const s={},l={};for(const[o,v]of Object.entries(n.properties)){const b=new gc(o,n.transform(n.attributes||{},o),v,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(b.mustUseProperty=!0),s[o]=b,l[rc(o)]=o,l[rc(b.attribute)]=o}return new zs(s,l,n.space)}const W_=Mr({properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:lt,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:pe,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:lt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:vt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(n,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function K_(n,s){return s in n?n[s]:s}function $_(n,s){return K_(n,s.toLowerCase())}const cS=Mr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dr,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:lt,autoFocus:He,autoPlay:He,blocking:lt,capture:null,charSet:null,checked:He,cite:null,className:lt,cols:pe,colSpan:null,content:null,contentEditable:vt,controls:He,controlsList:lt,coords:pe|Dr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:sc,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:lt,height:pe,hidden:sc,high:pe,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:lt,itemRef:lt,itemScope:He,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,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:He,optimum:pe,pattern:null,ping:lt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:lt,required:He,reversed:He,rows:pe,rowSpan:pe,sandbox:lt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:vt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:$_}),hS=Mr({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:nn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:lt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Dr,g2:Dr,glyphName:Dr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K_}),X_=Mr({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_=Mr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$_}),Z_=Mr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,s){return"xml:"+s.slice(3).toLowerCase()}}),fS={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"},dS=/[A-Z]/g,Jp=/-[a-z]/g,pS=/^data[-\w.:]+$/i;function _S(n,s){const l=rc(s);let o=s,v=Kt;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&pS.test(s)){if(s.charAt(4)==="-"){const b=s.slice(5).replace(Jp,gS);o="data"+b.charAt(0).toUpperCase()+b.slice(1)}else{const b=s.slice(4);if(!Jp.test(b)){let _=b.replace(dS,mS);_.charAt(0)!=="-"&&(_="-"+_),s="data"+_}}v=gc}return new v(o,s)}function mS(n){return"-"+n.toLowerCase()}function gS(n){return n.charAt(1).toUpperCase()}const vS=Y_([W_,cS,X_,Q_,Z_],"html"),vc=Y_([W_,hS,X_,Q_,Z_],"svg");function SS(n){return n.join(" ").trim()}var Er={},Fu,e_;function yS(){if(e_)return Fu;e_=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,v=/^:\s*/,b=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
61
- `,h="/",d="*",c="",C="comment",w="declaration";function k(S,g){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];g=g||{};var p=1,m=1;function E($){var Y=$.match(s);Y&&(p+=Y.length);var q=$.lastIndexOf(u);m=~q?$.length-q:m+$.length}function R(){var $={line:p,column:m};return function(Y){return Y.position=new A($),B(),Y}}function A($){this.start=$,this.end={line:p,column:m},this.source=g.source}A.prototype.content=S;function L($){var Y=new Error(g.source+":"+p+":"+m+": "+$);if(Y.reason=$,Y.filename=g.source,Y.line=p,Y.column=m,Y.source=S,!g.silent)throw Y}function T($){var Y=$.exec(S);if(Y){var q=Y[0];return E(q),S=S.slice(q.length),Y}}function B(){T(l)}function N($){var Y;for($=$||[];Y=F();)Y!==!1&&$.push(Y);return $}function F(){var $=R();if(!(h!=S.charAt(0)||d!=S.charAt(1))){for(var Y=2;c!=S.charAt(Y)&&(d!=S.charAt(Y)||h!=S.charAt(Y+1));)++Y;if(Y+=2,c===S.charAt(Y-1))return L("End of comment missing");var q=S.slice(2,Y-2);return m+=2,E(q),S=S.slice(Y),m+=2,$({type:C,comment:q})}}function G(){var $=R(),Y=T(o);if(Y){if(F(),!T(v))return L("property missing ':'");var q=T(b),Q=$({type:w,property:x(Y[0].replace(n,c)),value:q?x(q[0].replace(n,c)):c});return T(_),Q}}function V(){var $=[];N($);for(var Y;Y=G();)Y!==!1&&($.push(Y),N($));return $}return B(),V()}function x(S){return S?S.replace(a,c):c}return Fu=k,Fu}var t_;function bS(){if(t_)return Er;t_=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(yS());function l(o,v){let b=null;if(!o||typeof o!="string")return b;const _=(0,s.default)(o),a=typeof v=="function";return _.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:d}=u;a?v(h,d,u):d&&(b=b||{},b[h]=d)}),b}return Er}var ks={},n_;function CS(){if(n_)return ks;n_=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.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)},_=function(h,d){return d.toUpperCase()},a=function(h,d){return"".concat(d,"-")},u=function(h,d){return d===void 0&&(d={}),b(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(v,a):h=h.replace(o,a),h.replace(s,_))};return ks.camelCase=u,ks}var As,i_;function wS(){if(i_)return As;i_=1;var n=As&&As.__importDefault||function(v){return v&&v.__esModule?v:{default:v}},s=n(bS()),l=CS();function o(v,b){var _={};return!v||typeof v!="string"||(0,s.default)(v,function(a,u){a&&u&&(_[(0,l.camelCase)(a,b)]=u)}),_}return o.default=o,As=o,As}var xS=wS();const ES=F_(xS),J_=em("end"),Sc=em("start");function em(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 kS(n){const s=Sc(n),l=J_(n);if(s&&l)return{start:s,end:l}}function Rs(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?r_(n.position):"start"in n||"end"in n?r_(n):"line"in n||"column"in n?ac(n):""}function ac(n){return s_(n&&n.line)+":"+s_(n&&n.column)}function r_(n){return ac(n&&n.start)+"-"+ac(n&&n.end)}function s_(n){return n&&typeof n=="number"?n:1}class zt extends Error{constructor(s,l,o){super(),typeof l=="string"&&(o=l,l=void 0);let v="",b={},_=!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&&(_=!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=Rs(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=_&&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}}zt.prototype.file="";zt.prototype.name="";zt.prototype.reason="";zt.prototype.message="";zt.prototype.stack="";zt.prototype.column=void 0;zt.prototype.line=void 0;zt.prototype.ancestors=void 0;zt.prototype.cause=void 0;zt.prototype.fatal=void 0;zt.prototype.place=void 0;zt.prototype.ruleId=void 0;zt.prototype.source=void 0;const yc={}.hasOwnProperty,AS=new Map,TS=/[A-Z]/g,DS=new Set(["table","tbody","thead","tfoot","tr"]),RS=new Set(["td","th"]),tm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MS(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=IS(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=jS(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"?vc:vS,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},b=nm(v,n,void 0);return b&&typeof b!="string"?b:v.create(n,v.Fragment,{children:b||void 0},void 0)}function nm(n,s,l){if(s.type==="element")return LS(n,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return OS(n,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return zS(n,s,l);if(s.type==="mdxjsEsm")return BS(n,s);if(s.type==="root")return HS(n,s,l);if(s.type==="text")return NS(n,s)}function LS(n,s,l){const o=n.schema;let v=o;s.tagName.toLowerCase()==="svg"&&o.space==="html"&&(v=vc,n.schema=v),n.ancestors.push(s);const b=rm(n,s.tagName,!1),_=US(n,s);let a=Cc(n,s);return DS.has(s.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!oS(u):!0})),im(n,_,b,s),bc(_,a),n.ancestors.pop(),n.schema=o,n.create(s,b,_,l)}function OS(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)}Os(n,s.position)}function BS(n,s){if(s.data&&s.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(s.data.estree);Os(n,s.position)}function zS(n,s,l){const o=n.schema;let v=o;s.name==="svg"&&o.space==="html"&&(v=vc,n.schema=v),n.ancestors.push(s);const b=s.name===null?n.Fragment:rm(n,s.name,!0),_=PS(n,s),a=Cc(n,s);return im(n,_,b,s),bc(_,a),n.ancestors.pop(),n.schema=o,n.create(s,b,_,l)}function HS(n,s,l){const o={};return bc(o,Cc(n,s)),n.create(s,n.Fragment,o,l)}function NS(n,s){return s.value}function im(n,s,l,o){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(s.node=o)}function bc(n,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(n.children=l)}}function jS(n,s,l){return o;function o(v,b,_,a){const h=Array.isArray(_.children)?l:s;return a?h(b,_,a):h(b,_)}}function IS(n,s){return l;function l(o,v,b,_){const a=Array.isArray(b.children),u=Sc(o);return s(v,b,_,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function US(n,s){const l={};let o,v;for(v in s.properties)if(v!=="children"&&yc.call(s.properties,v)){const b=FS(n,v,s.properties[v]);if(b){const[_,a]=b;n.tableCellAlignToStyle&&_==="align"&&typeof a=="string"&&RS.has(s.tagName)?o=a:l[_]=a}}if(o){const b=l.style||(l.style={});b[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return l}function PS(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 _=b.expression;_.type;const a=_.properties[0];a.type,Object.assign(l,n.evaluater.evaluateExpression(a.argument))}else Os(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 Os(n,s.position);else b=o.value===null?!0:o.value;l[v]=b}return l}function Cc(n,s){const l=[];let o=-1;const v=n.passKeys?new Map:AS;for(;++o<s.children.length;){const b=s.children[o];let _;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;_=u+"-"+h,v.set(u,h+1)}}const a=nm(n,b,_);a!==void 0&&l.push(a)}return l}function FS(n,s,l){const o=_S(n.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=o.commaSeparated?iS(l):SS(l)),o.property==="style"){let v=typeof l=="object"?l:qS(n,String(l));return n.stylePropertyNameCase==="css"&&(v=VS(v)),["style",v]}return[n.elementAttributeNameCase==="react"&&o.space?fS[o.property]||o.property:o.attribute,l]}}function qS(n,s){try{return ES(s,{reactCompat:!0})}catch(l){if(n.ignoreInvalidStyle)return{};const o=l,v=new zt("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=tm+"#cannot-parse-style-attribute",v}}function rm(n,s,l){let o;if(!l)o={type:"Literal",value:s};else if(s.includes(".")){const v=s.split(".");let b=-1,_;for(;++b<v.length;){const a=Xp(v[b])?{type:"Identifier",name:v[b]}:{type:"Literal",value:v[b]};_=_?{type:"MemberExpression",object:_,property:a,computed:!!(b&&a.type==="Literal"),optional:!1}:a}o=_}else o=Xp(s)&&!/^[a-z]/.test(s)?{type:"Identifier",name:s}:{type:"Literal",value:s};if(o.type==="Literal"){const v=o.value;return yc.call(n.components,v)?n.components[v]:v}if(n.evaluater)return n.evaluater.evaluateExpression(o);Os(n)}function Os(n,s){const l=new zt("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=tm+"#cannot-handle-mdx-estrees-without-createevaluater",l}function VS(n){const s={};let l;for(l in n)yc.call(n,l)&&(s[GS(l)]=n[l]);return s}function GS(n){let s=n.replace(TS,YS);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function YS(n){return"-"+n.toLowerCase()}const qu={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"]},WS={};function wc(n,s){const l=WS,o=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,v=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return sm(n,o,v)}function sm(n,s,l){if(KS(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 l_(n.children,s,l)}return Array.isArray(n)?l_(n,s,l):""}function l_(n,s,l){const o=[];let v=-1;for(;++v<n.length;)o[v]=sm(n[v],s,l);return o.join("")}function KS(n){return!!(n&&typeof n=="object")}const a_=document.createElement("i");function xc(n){const s="&"+n+";";a_.innerHTML=s;const l=a_.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===s?!1:l}function rn(n,s,l,o){const v=n.length;let b=0,_;if(s<0?s=-s>v?0:v+s:s=s>v?v:s,l=l>0?l:0,o.length<1e4)_=Array.from(o),_.unshift(s,l),n.splice(..._);else for(l&&n.splice(s,l);b<o.length;)_=o.slice(b,b+1e4),_.unshift(s,0),n.splice(..._),b+=1e4,s+=1e4}function _n(n,s){return n.length>0?(rn(n,n.length,0,s),n):s}const o_={}.hasOwnProperty;function lm(n){const s={};let l=-1;for(;++l<n.length;)$S(s,n[l]);return s}function $S(n,s){let l;for(l in s){const v=(o_.call(n,l)?n[l]:void 0)||(n[l]={}),b=s[l];let _;if(b)for(_ in b){o_.call(v,_)||(v[_]=[]);const a=b[_];XS(v[_],Array.isArray(a)?a:a?[a]:[])}}}function XS(n,s){let l=-1;const o=[];for(;++l<s.length;)(s[l].add==="after"?n:o).push(s[l]);rn(n,0,0,o)}function am(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 yn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jt=vi(/[A-Za-z]/),Bt=vi(/[\dA-Za-z]/),QS=vi(/[#-'*+\--9=?A-Z^-~]/);function oa(n){return n!==null&&(n<32||n===127)}const oc=vi(/\d/),ZS=vi(/[\dA-Fa-f]/),JS=vi(/[!-/:-@[-`{-~]/);function Ee(n){return n!==null&&n<-2}function st(n){return n!==null&&(n<0||n===32)}function Pe(n){return n===-2||n===-1||n===32}const da=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 _="";if(b===37&&Bt(n.charCodeAt(l+1))&&Bt(n.charCodeAt(l+2)))v=2;else if(b<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(b))||(_=String.fromCharCode(b));else if(b>55295&&b<57344){const a=n.charCodeAt(l+1);b<56320&&a>56319&&a<57344?(_=String.fromCharCode(b,a),v=1):_="�"}else _=String.fromCharCode(b);_&&(s.push(n.slice(o,l),encodeURIComponent(_)),o=l+v+1,_=""),v&&(l+=v,v=0)}return s.join("")+n.slice(o)}function Ge(n,s,l,o){const v=o?o-1:Number.POSITIVE_INFINITY;let b=0;return _;function _(u){return Pe(u)?(n.enter(l),a(u)):s(u)}function a(u){return Pe(u)&&b++<v?(n.consume(u),a):(n.exit(l),s(u))}}const ey={tokenize:ty};function ty(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"),Ge(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,_(a)}function _(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Ee(a)?(n.consume(a),n.exit("chunkText"),b):(n.consume(a),_)}}const ny={tokenize:iy},u_={tokenize:ry};function iy(n){const s=this,l=[];let o=0,v,b,_;return a;function a(m){if(o<l.length){const E=l[o];return s.containerState=E[1],n.attempt(E[0].continuation,u,h)(m)}return h(m)}function u(m){if(o++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,v&&p();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}g(o);let L=E;for(;L<s.events.length;)s.events[L][1].end={...A},L++;return rn(s.events,R+1,0,s.events.slice(E)),s.events.length=L,h(m)}return a(m)}function h(m){if(o===l.length){if(!v)return C(m);if(v.currentConstruct&&v.currentConstruct.concrete)return k(m);s.interrupt=!!(v.currentConstruct&&!v._gfmTableDynamicInterruptHack)}return s.containerState={},n.check(u_,d,c)(m)}function d(m){return v&&p(),g(o),C(m)}function c(m){return s.parser.lazy[s.now().line]=o!==l.length,_=s.now().offset,k(m)}function C(m){return s.containerState={},n.attempt(u_,w,k)(m)}function w(m){return o++,l.push([s.currentConstruct,s.containerState]),C(m)}function k(m){if(m===null){v&&p(),g(0),n.consume(m);return}return v=v||s.parser.flow(s.now()),n.enter("chunkFlow",{_tokenizer:v,contentType:"flow",previous:b}),x(m)}function x(m){if(m===null){S(n.exit("chunkFlow"),!0),g(0),n.consume(m);return}return Ee(m)?(n.consume(m),S(n.exit("chunkFlow")),o=0,s.interrupt=void 0,a):(n.consume(m),x)}function S(m,E){const R=s.sliceStream(m);if(E&&R.push(null),m.previous=b,b&&(b.next=m),b=m,v.defineSkip(m.start),v.write(R),s.parser.lazy[m.start.line]){let A=v.events.length;for(;A--;)if(v.events[A][1].start.offset<_&&(!v.events[A][1].end||v.events[A][1].end.offset>_))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(g(o),A=L;A<s.events.length;)s.events[A][1].end={...N},A++;rn(s.events,T+1,0,s.events.slice(L)),s.events.length=A}}function g(m){let E=l.length;for(;E-- >m;){const R=l[E];s.containerState=R[1],R[0].exit.call(s,n)}l.length=m}function p(){v.write([null]),b=void 0,v=void 0,s.containerState._closeFlow=void 0}}function ry(n,s,l){return Ge(n,n.attempt(this.parser.constructs.document,s,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(n){if(n===null||st(n)||ji(n))return 1;if(da(n))return 2}function pa(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 uc={name:"attention",resolveAll:sy,tokenize:ly};function sy(n,s){let l=-1,o,v,b,_,a,u,h,d;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};c_(c,-u),c_(C,u),_={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:{..._.start},end:{...a.end}},n[o][1].end={..._.start},n[l][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=_n(h,[["enter",n[o][1],s],["exit",n[o][1],s]])),h=_n(h,[["enter",v,s],["enter",_,s],["exit",_,s],["enter",b,s]]),h=_n(h,pa(s.parser.constructs.insideSpan.null,n.slice(o+1,l),s)),h=_n(h,[["exit",b,s],["enter",a,s],["exit",a,s],["exit",v,s]]),n[l][1].end.offset-n[l][1].start.offset?(d=2,h=_n(h,[["enter",n[l][1],s],["exit",n[l][1],s]])):d=0,rn(n,o-1,l-o+3,h),l=o+h.length-d-2;break}}for(l=-1;++l<n.length;)n[l][1].type==="attentionSequence"&&(n[l][1].type="data");return n}function ly(n,s){const l=this.parser.constructs.attentionMarkers.null,o=this.previous,v=Rr(o);let b;return _;function _(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"),d=Rr(u),c=!d||d===2&&v||l.includes(u),C=!v||v===2&&d||l.includes(o);return h._open=!!(b===42?c:c&&(v||!C)),h._close=!!(b===42?C:C&&(d||!c)),s(u)}}function c_(n,s){n.column+=s,n.offset+=s,n._bufferIndex+=s}const ay={name:"autolink",tokenize:oy};function oy(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 jt(w)?(n.consume(w),_):w===64?l(w):h(w)}function _(w){return w===43||w===45||w===46||Bt(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||Bt(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||oa(w)?l(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),d):QS(w)?(n.consume(w),h):l(w)}function d(w){return Bt(w)?c(w):l(w)}function c(w){return w===46?(n.consume(w),o=0,d):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):C(w)}function C(w){if((w===45||Bt(w))&&o++<63){const k=w===45?C:c;return n.consume(w),k}return l(w)}}const Hs={partial:!0,tokenize:uy};function uy(n,s,l){return o;function o(b){return Pe(b)?Ge(n,v,"linePrefix")(b):v(b)}function v(b){return b===null||Ee(b)?s(b):l(b)}}const om={continuation:{tokenize:hy},exit:fy,name:"blockQuote",tokenize:cy};function cy(n,s,l){const o=this;return v;function v(_){if(_===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(_),n.exit("blockQuoteMarker"),b}return l(_)}function b(_){return Pe(_)?(n.enter("blockQuotePrefixWhitespace"),n.consume(_),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),s):(n.exit("blockQuotePrefix"),s(_))}}function hy(n,s,l){const o=this;return v;function v(_){return Pe(_)?Ge(n,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):b(_)}function b(_){return n.attempt(om,s,l)(_)}}function fy(n){n.exit("blockQuote")}const um={name:"characterEscape",tokenize:dy};function dy(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 JS(b)?(n.enter("characterEscapeValue"),n.consume(b),n.exit("characterEscapeValue"),n.exit("characterEscape"),s):l(b)}}const cm={name:"characterReference",tokenize:py};function py(n,s,l){const o=this;let v=0,b,_;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,_=Bt,d(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),b=6,_=ZS,d):(n.enter("characterReferenceValue"),b=7,_=oc,d(c))}function d(c){if(c===59&&v){const C=n.exit("characterReferenceValue");return _===Bt&&!xc(o.sliceSerialize(C))?l(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),s)}return _(c)&&v++<b?(n.consume(c),d):l(c)}}const h_={partial:!0,tokenize:my},f_={concrete:!0,name:"codeFenced",tokenize:_y};function _y(n,s,l){const o=this,v={partial:!0,tokenize:R};let b=0,_=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"),d(A)}function d(A){return A===a?(_++,n.consume(A),d):_<3?l(A):(n.exit("codeFencedFenceSequence"),Pe(A)?Ge(n,c,"whitespace")(A):c(A))}function c(A){return A===null||Ee(A)?(n.exit("codeFencedFence"),o.interrupt?s(A):n.check(h_,x,E)(A)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||Ee(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(A)):Pe(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ge(n,w,"whitespace")(A)):A===96&&A===a?l(A):(n.consume(A),C)}function w(A){return A===null||Ee(A)?c(A):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||Ee(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"),g}function g(A){return b>0&&Pe(A)?Ge(n,p,"linePrefix",b+1)(A):p(A)}function p(A){return A===null||Ee(A)?n.check(h_,x,E)(A):(n.enter("codeFlowValue"),m(A))}function m(A){return A===null||Ee(A)?(n.exit("codeFlowValue"),p(A)):(n.consume(A),m)}function E(A){return n.exit("codeFenced"),s(A)}function R(A,L,T){let B=0;return N;function N(Y){return A.enter("lineEnding"),A.consume(Y),A.exit("lineEnding"),F}function F(Y){return A.enter("codeFencedFence"),Pe(Y)?Ge(A,G,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):G(Y)}function G(Y){return Y===a?(A.enter("codeFencedFenceSequence"),V(Y)):T(Y)}function V(Y){return Y===a?(B++,A.consume(Y),V):B>=_?(A.exit("codeFencedFenceSequence"),Pe(Y)?Ge(A,$,"whitespace")(Y):$(Y)):T(Y)}function $(Y){return Y===null||Ee(Y)?(A.exit("codeFencedFence"),L(Y)):T(Y)}}}function my(n,s,l){const o=this;return v;function v(_){return _===null?l(_):(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),b)}function b(_){return o.parser.lazy[o.now().line]?l(_):s(_)}}const Vu={name:"codeIndented",tokenize:vy},gy={partial:!0,tokenize:Sy};function vy(n,s,l){const o=this;return v;function v(h){return n.enter("codeIndented"),Ge(n,b,"linePrefix",5)(h)}function b(h){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?_(h):l(h)}function _(h){return h===null?u(h):Ee(h)?n.attempt(gy,_,u)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Ee(h)?(n.exit("codeFlowValue"),_(h)):(n.consume(h),a)}function u(h){return n.exit("codeIndented"),s(h)}}function Sy(n,s,l){const o=this;return v;function v(_){return o.parser.lazy[o.now().line]?l(_):Ee(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),v):Ge(n,b,"linePrefix",5)(_)}function b(_){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?s(_):Ee(_)?v(_):l(_)}}const yy={name:"codeText",previous:Cy,resolve:by,tokenize:wy};function by(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 wy(n,s,l){let o=0,v,b;return _;function _(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,d(c)):Ee(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||Ee(c)?(n.exit("codeTextData"),u(c)):(n.consume(c),h)}function d(c){return c===96?(n.consume(c),v++,d):v===o?(n.exit("codeTextSequence"),n.exit("codeText"),s(c)):(b.type="codeTextData",h(c))}}class xy{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&&Ts(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),Ts(this.left,s)}unshift(s){this.setCursor(0),this.right.push(s)}unshiftMany(s){this.setCursor(0),Ts(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);Ts(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-s,Number.POSITIVE_INFINITY);Ts(this.left,l.reverse())}}}function Ts(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 hm(n){const s={};let l=-1,o,v,b,_,a,u,h;const d=new xy(n);for(;++l<d.length;){for(;l in s;)l=s[l];if(o=d.get(l),l&&o[1].type==="chunkFlow"&&d.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,Ey(d,l)),l=s[l],h=!0);else if(o[1]._container){for(b=l,v=void 0;b--;)if(_=d.get(b),_[1].type==="lineEnding"||_[1].type==="lineEndingBlank")_[0]==="enter"&&(v&&(d.get(v)[1].type="lineEndingBlank"),_[1].type="lineEnding",v=b);else if(!(_[1].type==="linePrefix"||_[1].type==="listItemIndent"))break;v&&(o[1].end={...d.get(v)[1].start},a=d.slice(v,l),a.unshift(o),d.splice(v,l-v+1,a))}}return rn(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function Ey(n,s){const l=n.get(s)[1],o=n.get(s)[2];let v=s-1;const b=[];let _=l._tokenizer;_||(_=o.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(_._contentTypeTextTrailing=!0));const a=_.events,u=[],h={};let d,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||(d=o.sliceStream(w),w.next||d.push(null),c&&_.defineSkip(w.start),w._isInFirstContentOfListItem&&(_._gfmTasklistFirstContentOfListItem=!0),_.write(d),w._isInFirstContentOfListItem&&(_._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(_.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),C=S.length;C--;){const g=a.slice(S[C],S[C+1]),p=b.pop();u.push([p,p+g.length-1]),n.splice(p,2,g)}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 ky={resolve:Ty,tokenize:Dy},Ay={partial:!0,tokenize:Ry};function Ty(n){return hm(n),n}function Dy(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):Ee(a)?n.check(Ay,_,b)(a):(n.consume(a),v)}function b(a){return n.exit("chunkContent"),n.exit("content"),s(a)}function _(a){return n.consume(a),n.exit("chunkContent"),l.next=n.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,v}}function Ry(n,s,l){const o=this;return v;function v(_){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),Ge(n,b,"linePrefix")}function b(_){if(_===null||Ee(_))return l(_);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(_):n.interrupt(o.parser.constructs.flow,l,s)(_)}}function fm(n,s,l,o,v,b,_,a,u){const h=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(g){return g===60?(n.enter(o),n.enter(v),n.enter(b),n.consume(g),n.exit(b),C):g===null||g===32||g===41||oa(g)?l(g):(n.enter(o),n.enter(_),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(g))}function C(g){return g===62?(n.enter(b),n.consume(g),n.exit(b),n.exit(v),n.exit(o),s):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(g))}function w(g){return g===62?(n.exit("chunkString"),n.exit(a),C(g)):g===null||g===60||Ee(g)?l(g):(n.consume(g),g===92?k:w)}function k(g){return g===60||g===62||g===92?(n.consume(g),w):w(g)}function x(g){return!d&&(g===null||g===41||st(g))?(n.exit("chunkString"),n.exit(a),n.exit(_),n.exit(o),s(g)):d<h&&g===40?(n.consume(g),d++,x):g===41?(n.consume(g),d--,x):g===null||g===32||g===40||oa(g)?l(g):(n.consume(g),g===92?S:x)}function S(g){return g===40||g===41||g===92?(n.consume(g),x):x(g)}}function dm(n,s,l,o,v,b){const _=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),d}function d(w){return a>999||w===null||w===91||w===93&&!u||w===94&&!a&&"_hiddenFootnoteSupport"in _.parser.constructs?l(w):w===93?(n.exit(b),n.enter(v),n.consume(w),n.exit(v),n.exit(o),s):Ee(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),d):(n.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||Ee(w)||a++>999?(n.exit("chunkString"),d(w)):(n.consume(w),u||(u=!Pe(w)),w===92?C:c)}function C(w){return w===91||w===92||w===93?(n.consume(w),a++,c):c(w)}}function pm(n,s,l,o,v,b){let _;return a;function a(C){return C===34||C===39||C===40?(n.enter(o),n.enter(v),n.consume(C),n.exit(v),_=C===40?41:C,u):l(C)}function u(C){return C===_?(n.enter(v),n.consume(C),n.exit(v),n.exit(o),s):(n.enter(b),h(C))}function h(C){return C===_?(n.exit(b),u(_)):C===null?l(C):Ee(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),Ge(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(C))}function d(C){return C===_||C===null||Ee(C)?(n.exit("chunkString"),h(C)):(n.consume(C),C===92?c:d)}function c(C){return C===_||C===92?(n.consume(C),d):d(C)}}function Ms(n,s){let l;return o;function o(v){return Ee(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),l=!0,o):Pe(v)?Ge(n,o,l?"linePrefix":"lineSuffix")(v):s(v)}}const My={name:"definition",tokenize:Oy},Ly={partial:!0,tokenize:By};function Oy(n,s,l){const o=this;let v;return b;function b(w){return n.enter("definition"),_(w)}function _(w){return dm.call(o,n,a,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return v=yn(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 st(w)?Ms(n,h)(w):h(w)}function h(w){return fm(n,d,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(Ly,c,c)(w)}function c(w){return Pe(w)?Ge(n,C,"whitespace")(w):C(w)}function C(w){return w===null||Ee(w)?(n.exit("definition"),o.parser.defined.push(v),s(w)):l(w)}}function By(n,s,l){return o;function o(a){return st(a)?Ms(n,v)(a):l(a)}function v(a){return pm(n,b,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function b(a){return Pe(a)?Ge(n,_,"whitespace")(a):_(a)}function _(a){return a===null||Ee(a)?s(a):l(a)}}const zy={name:"hardBreakEscape",tokenize:Hy};function Hy(n,s,l){return o;function o(b){return n.enter("hardBreakEscape"),n.consume(b),v}function v(b){return Ee(b)?(n.exit("hardBreakEscape"),s(b)):l(b)}}const Ny={name:"headingAtx",resolve:jy,tokenize:Iy};function jy(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"},rn(n,o,l-o+1,[["enter",v,s],["enter",b,s],["exit",b,s],["exit",v,s]])),n}function Iy(n,s,l){let o=0;return v;function v(d){return n.enter("atxHeading"),b(d)}function b(d){return n.enter("atxHeadingSequence"),_(d)}function _(d){return d===35&&o++<6?(n.consume(d),_):d===null||st(d)?(n.exit("atxHeadingSequence"),a(d)):l(d)}function a(d){return d===35?(n.enter("atxHeadingSequence"),u(d)):d===null||Ee(d)?(n.exit("atxHeading"),s(d)):Pe(d)?Ge(n,a,"whitespace")(d):(n.enter("atxHeadingText"),h(d))}function u(d){return d===35?(n.consume(d),u):(n.exit("atxHeadingSequence"),a(d))}function h(d){return d===null||d===35||st(d)?(n.exit("atxHeadingText"),a(d)):(n.consume(d),h)}}const Uy=["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"],d_=["pre","script","style","textarea"],Py={concrete:!0,name:"htmlFlow",resolveTo:Vy,tokenize:Gy},Fy={partial:!0,tokenize:Wy},qy={partial:!0,tokenize:Yy};function Vy(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 Gy(n,s,l){const o=this;let v,b,_,a,u;return h;function h(H){return d(H)}function d(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):jt(H)?(n.consume(H),_=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):jt(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:G:k):l(H)}function x(H){return jt(H)?(n.consume(H),_=String.fromCharCode(H),S):l(H)}function S(H){if(H===null||H===47||H===62||st(H)){const ne=H===47,fe=_.toLowerCase();return!ne&&!b&&d_.includes(fe)?(v=1,o.interrupt?s(H):G(H)):Uy.includes(_.toLowerCase())?(v=6,ne?(n.consume(H),g):o.interrupt?s(H):G(H)):(v=7,o.interrupt&&!o.parser.lazy[o.now().line]?l(H):b?p(H):m(H))}return H===45||Bt(H)?(n.consume(H),_+=String.fromCharCode(H),S):l(H)}function g(H){return H===62?(n.consume(H),o.interrupt?s:G):l(H)}function p(H){return Pe(H)?(n.consume(H),p):N(H)}function m(H){return H===47?(n.consume(H),N):H===58||H===95||jt(H)?(n.consume(H),E):Pe(H)?(n.consume(H),m):N(H)}function E(H){return H===45||H===46||H===58||H===95||Bt(H)?(n.consume(H),E):R(H)}function R(H){return H===61?(n.consume(H),A):Pe(H)?(n.consume(H),R):m(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):Pe(H)?(n.consume(H),A):T(H)}function L(H){return H===u?(n.consume(H),u=null,B):H===null||Ee(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||st(H)?R(H):(n.consume(H),T)}function B(H){return H===47||H===62||Pe(H)?m(H):l(H)}function N(H){return H===62?(n.consume(H),F):l(H)}function F(H){return H===null||Ee(H)?G(H):Pe(H)?(n.consume(H),F):l(H)}function G(H){return H===45&&v===2?(n.consume(H),q):H===60&&v===1?(n.consume(H),Q):H===62&&v===4?(n.consume(H),O):H===63&&v===3?(n.consume(H),M):H===93&&v===5?(n.consume(H),z):Ee(H)&&(v===6||v===7)?(n.exit("htmlFlowData"),n.check(Fy,I,V)(H)):H===null||Ee(H)?(n.exit("htmlFlowData"),V(H)):(n.consume(H),G)}function V(H){return n.check(qy,$,I)(H)}function $(H){return n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),Y}function Y(H){return H===null||Ee(H)?V(H):(n.enter("htmlFlowData"),G(H))}function q(H){return H===45?(n.consume(H),M):G(H)}function Q(H){return H===47?(n.consume(H),_="",J):G(H)}function J(H){if(H===62){const ne=_.toLowerCase();return d_.includes(ne)?(n.consume(H),O):G(H)}return jt(H)&&_.length<8?(n.consume(H),_+=String.fromCharCode(H),J):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||Ee(H)?(n.exit("htmlFlowData"),I(H)):(n.consume(H),O)}function I(H){return n.exit("htmlFlow"),s(H)}}function Yy(n,s,l){const o=this;return v;function v(_){return Ee(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),b):l(_)}function b(_){return o.parser.lazy[o.now().line]?l(_):s(_)}}function Wy(n,s,l){return o;function o(v){return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),n.attempt(Hs,s,l)}}const Ky={name:"htmlText",tokenize:$y};function $y(n,s,l){const o=this;let v,b,_;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),m):jt(M)?(n.consume(M),T):l(M)}function h(M){return M===45?(n.consume(M),d):M===91?(n.consume(M),b=0,k):jt(M)?(n.consume(M),p):l(M)}function d(M){return M===45?(n.consume(M),w):l(M)}function c(M){return M===null?l(M):M===45?(n.consume(M),C):Ee(M)?(_=c,Q(M)):(n.consume(M),c)}function C(M){return M===45?(n.consume(M),w):c(M)}function w(M){return M===62?q(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):Ee(M)?(_=x,Q(M)):(n.consume(M),x)}function S(M){return M===93?(n.consume(M),g):x(M)}function g(M){return M===62?q(M):M===93?(n.consume(M),g):x(M)}function p(M){return M===null||M===62?q(M):Ee(M)?(_=p,Q(M)):(n.consume(M),p)}function m(M){return M===null?l(M):M===63?(n.consume(M),E):Ee(M)?(_=m,Q(M)):(n.consume(M),m)}function E(M){return M===62?q(M):m(M)}function R(M){return jt(M)?(n.consume(M),A):l(M)}function A(M){return M===45||Bt(M)?(n.consume(M),A):L(M)}function L(M){return Ee(M)?(_=L,Q(M)):Pe(M)?(n.consume(M),L):q(M)}function T(M){return M===45||Bt(M)?(n.consume(M),T):M===47||M===62||st(M)?B(M):l(M)}function B(M){return M===47?(n.consume(M),q):M===58||M===95||jt(M)?(n.consume(M),N):Ee(M)?(_=B,Q(M)):Pe(M)?(n.consume(M),B):q(M)}function N(M){return M===45||M===46||M===58||M===95||Bt(M)?(n.consume(M),N):F(M)}function F(M){return M===61?(n.consume(M),G):Ee(M)?(_=F,Q(M)):Pe(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,V):Ee(M)?(_=G,Q(M)):Pe(M)?(n.consume(M),G):(n.consume(M),$)}function V(M){return M===v?(n.consume(M),v=void 0,Y):M===null?l(M):Ee(M)?(_=V,Q(M)):(n.consume(M),V)}function $(M){return M===null||M===34||M===39||M===60||M===61||M===96?l(M):M===47||M===62||st(M)?B(M):(n.consume(M),$)}function Y(M){return M===47||M===62||st(M)?B(M):l(M)}function q(M){return M===62?(n.consume(M),n.exit("htmlTextData"),n.exit("htmlText"),s):l(M)}function Q(M){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),J}function J(M){return Pe(M)?Ge(n,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return n.enter("htmlTextData"),_(M)}}const Ec={name:"labelEnd",resolveAll:Jy,resolveTo:e1,tokenize:t1},Xy={tokenize:n1},Qy={tokenize:i1},Zy={tokenize:r1};function Jy(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&&rn(n,0,n.length,l),n}function e1(n,s){let l=n.length,o=0,v,b,_,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(_){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"&&(_=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[_][1].end}},d={type:"labelText",start:{...n[b+o+2][1].end},end:{...n[_-2][1].start}};return a=[["enter",u,s],["enter",h,s]],a=_n(a,n.slice(b+1,b+o+3)),a=_n(a,[["enter",d,s]]),a=_n(a,pa(s.parser.constructs.insideSpan.null,n.slice(b+o+4,_-3),s)),a=_n(a,[["exit",d,s],n[_-2],n[_-1],["exit",h,s]]),a=_n(a,n.slice(_+1)),a=_n(a,[["exit",u,s]]),rn(n,b,n.length,a),n}function t1(n,s,l){const o=this;let v=o.events.length,b,_;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):(_=o.parser.defined.includes(yn(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(Xy,d,_?d:c)(C):C===91?n.attempt(Qy,d,_?h:c)(C):_?d(C):c(C)}function h(C){return n.attempt(Zy,d,c)(C)}function d(C){return s(C)}function c(C){return b._balanced=!0,l(C)}}function n1(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 st(c)?Ms(n,b)(c):b(c)}function b(c){return c===41?d(c):fm(n,_,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function _(c){return st(c)?Ms(n,u)(c):d(c)}function a(c){return l(c)}function u(c){return c===34||c===39||c===40?pm(n,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function h(c){return st(c)?Ms(n,d)(c):d(c)}function d(c){return c===41?(n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),n.exit("resource"),s):l(c)}}function i1(n,s,l){const o=this;return v;function v(a){return dm.call(o,n,b,_,"reference","referenceMarker","referenceString")(a)}function b(a){return o.parser.defined.includes(yn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?s(a):l(a)}function _(a){return l(a)}}function r1(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 s1={name:"labelStartImage",resolveAll:Ec.resolveAll,tokenize:l1};function l1(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"),_):l(a)}function _(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(a):s(a)}}const a1={name:"labelStartLink",resolveAll:Ec.resolveAll,tokenize:o1};function o1(n,s,l){const o=this;return v;function v(_){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(_),n.exit("labelMarker"),n.exit("labelLink"),b}function b(_){return _===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(_):s(_)}}const Gu={name:"lineEnding",tokenize:u1};function u1(n,s){return l;function l(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ge(n,s,"linePrefix")}}const la={name:"thematicBreak",tokenize:c1};function c1(n,s,l){let o=0,v;return b;function b(h){return n.enter("thematicBreak"),_(h)}function _(h){return v=h,a(h)}function a(h){return h===v?(n.enter("thematicBreakSequence"),u(h)):o>=3&&(h===null||Ee(h))?(n.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===v?(n.consume(h),o++,u):(n.exit("thematicBreakSequence"),Pe(h)?Ge(n,a,"whitespace")(h):a(h))}}const Wt={continuation:{tokenize:p1},exit:m1,name:"list",tokenize:d1},h1={partial:!0,tokenize:g1},f1={partial:!0,tokenize:_1};function d1(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,_=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:oc(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(la,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 oc(w)&&++_<10?(n.consume(w),u):(!o.interrupt||_<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(Hs,o.interrupt?l:d,n.attempt(h1,C,c))}function d(w){return o.containerState.initialBlankLine=!0,b++,C(w)}function c(w){return Pe(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 p1(n,s,l){const o=this;return o.containerState._closeFlow=void 0,n.check(Hs,v,b);function v(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ge(n,s,"listItemIndent",o.containerState.size+1)(a)}function b(a){return o.containerState.furtherBlankLines||!Pe(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,_(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(f1,s,_)(a))}function _(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ge(n,n.attempt(Wt,s,l),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function _1(n,s,l){const o=this;return Ge(n,v,"listItemIndent",o.containerState.size+1);function v(b){const _=o.events[o.events.length-1];return _&&_[1].type==="listItemIndent"&&_[2].sliceSerialize(_[1],!0).length===o.containerState.size?s(b):l(b)}}function m1(n){n.exit(this.containerState.type)}function g1(n,s,l){const o=this;return Ge(n,v,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function v(b){const _=o.events[o.events.length-1];return!Pe(b)&&_&&_[1].type==="listItemPrefixWhitespace"?s(b):l(b)}}const p_={name:"setextUnderline",resolveTo:v1,tokenize:S1};function v1(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 _={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",_,s]),n.splice(b+1,0,["exit",n[o][1],s]),n[o][1].end={...n[b][1].end}):n[o][1]=_,n.push(["exit",_,s]),n}function S1(n,s,l){const o=this;let v;return b;function b(h){let d=o.events.length,c;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){c=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||c)?(n.enter("setextHeadingLine"),v=h,_(h)):l(h)}function _(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===v?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),Pe(h)?Ge(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Ee(h)?(n.exit("setextHeadingLine"),s(h)):l(h)}}const y1={tokenize:b1};function b1(n){const s=this,l=n.attempt(Hs,o,n.attempt(this.parser.constructs.flowInitial,v,Ge(n,n.attempt(this.parser.constructs.flow,v,n.attempt(ky,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:mm()},w1=_m("string"),x1=_m("text");function _m(n){return{resolveAll:mm(n==="text"?E1:void 0),tokenize:s};function s(l){const o=this,v=this.parser.constructs[n],b=l.attempt(v,_,a);return _;function _(d){return h(d)?b(d):a(d)}function a(d){if(d===null){l.consume(d);return}return l.enter("data"),l.consume(d),u}function u(d){return h(d)?(l.exit("data"),b(d)):(l.consume(d),u)}function h(d){if(d===null)return!0;const c=v[d];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 mm(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 E1(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,_=-1,a=0,u;for(;b--;){const h=v[b];if(typeof h=="string"){for(_=h.length;h.charCodeAt(_-1)===32;)a++,_--;if(_)break;_=-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?_:o.start._bufferIndex+_,_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 k1={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:om},A1={91:My},T1={[-2]:Vu,[-1]:Vu,32:Vu},D1={35:Ny,42:la,45:[p_,la],60:Py,61:p_,95:la,96:f_,126:f_},R1={38:cm,92:um},M1={[-5]:Gu,[-4]:Gu,[-3]:Gu,33:s1,38:cm,42:uc,60:[ay,Ky],91:a1,92:[zy,um],93:Ec,95:uc,96:yy},L1={null:[uc,C1]},O1={null:[42,95]},B1={null:[]},z1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:O1,contentInitial:A1,disable:B1,document:k1,flow:D1,flowInitial:T1,insideSpan:L1,string:R1,text:M1},Symbol.toStringTag,{value:"Module"}));function H1(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 _=[],a=[];const u={attempt:L(R),check:L(A),consume:p,enter:m,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 d=s.tokenize.call(h,u);return s.resolveAll&&b.push(s),h;function c(F){return _=_n(_,F),S(),_[_.length-1]!==null?[]:(T(s,0),h.events=pa(b,h.events,h),h.events)}function C(F,G){return j1(w(F),G)}function w(F){return N1(_,F)}function k(){const{_bufferIndex:F,_index:G,line:V,column:$,offset:Y}=o;return{_bufferIndex:F,_index:G,line:V,column:$,offset:Y}}function x(F){v[F.line]=F.column,N()}function S(){let F;for(;o._index<_.length;){const G=_[o._index];if(typeof G=="string")for(F=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===F&&o._bufferIndex<G.length;)g(G.charCodeAt(o._bufferIndex));else g(G)}}function g(F){d=d(F)}function p(F){Ee(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===_[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=F}function m(F,G){const V=G||{};return V.type=F,V.start=k(),h.events.push(["enter",V,h]),a.push(V),V}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 V;function V($,Y,q){let Q,J,z,M;return Array.isArray($)?I($):"tokenize"in $?I([$]):O($);function O(he){return K;function K(P){const le=P!==null&&he[P],re=P!==null&&he.null,Se=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(re)?re:re?[re]:[]];return I(Se)(P)}}function I(he){return Q=he,J=0,he.length===0?q:H(he[J])}function H(he){return K;function K(P){return M=B(),z=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?fe():he.tokenize.call(G?Object.assign(Object.create(h),G):h,u,ne,fe)(P)}}function ne(he){return F(z,M),Y}function fe(he){return M.restore(),++J<Q.length?H(Q[J]):q}}}function T(F,G){F.resolveAll&&!b.includes(F)&&b.push(F),F.resolve&&rn(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,V=h.currentConstruct,$=h.events.length,Y=Array.from(a);return{from:$,restore:q};function q(){o=F,h.previous=G,h.currentConstruct=V,h.events.length=$,a=Y,N()}}function N(){o.line in v&&o.column<2&&(o.column=v[o.line],o.offset+=v[o.line]-1)}}function N1(n,s){const l=s.start._index,o=s.start._bufferIndex,v=s.end._index,b=s.end._bufferIndex;let _;if(l===v)_=[n[l].slice(o,b)];else{if(_=n.slice(l,v),o>-1){const a=_[0];typeof a=="string"?_[0]=a.slice(o):_.shift()}b>0&&_.push(n[v].slice(0,b))}return _}function j1(n,s){let l=-1;const o=[];let v;for(;++l<n.length;){const b=n[l];let _;if(typeof b=="string")_=b;else switch(b){case-5:{_="\r";break}case-4:{_=`
62
- `;break}case-3:{_=`\r
63
- `;break}case-2:{_=s?" ":" ";break}case-1:{if(!s&&v)continue;_=" ";break}default:_=String.fromCharCode(b)}v=b===-2,o.push(_)}return o.join("")}function I1(n){const o={constructs:lm([z1,...(n||{}).extensions||[]]),content:v(ey),defined:[],document:v(ny),flow:v(y1),lazy:{},string:v(w1),text:v(x1)};return o;function v(b){return _;function _(a){return H1(o,b,a)}}}function U1(n){for(;!hm(n););return n}const __=/[\0\t\n\r]/g;function P1(){let n=1,s="",l=!0,o;return v;function v(b,_,a){const u=[];let h,d,c,C,w;for(b=s+(typeof b=="string"?b.toString():new TextDecoder(_||void 0).decode(b)),c=0,s="",l&&(b.charCodeAt(0)===65279&&c++,l=void 0);c<b.length;){if(__.lastIndex=c,h=__.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(d=Math.ceil(n/4)*4,u.push(-2);n++<d;)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 F1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function q1(n){return n.replace(F1,V1)}function V1(n,s,l){if(s)return s;if(l.charCodeAt(0)===35){const v=l.charCodeAt(1),b=v===120||v===88;return am(l.slice(b?2:1),b?16:10)}return xc(l)||n}const gm={}.hasOwnProperty;function G1(n,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),Y1(l)(U1(I1(l).document().write(P1()(n,s,!0))))}function Y1(n){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:b($e),autolinkProtocol:B,autolinkEmail:B,atxHeading:b(_e),blockQuote:b(re),characterEscape:B,characterReference:B,codeFenced:b(Se),codeFencedFenceInfo:_,codeFencedFenceMeta:_,codeIndented:b(Se,_),codeText:b(ge,_),codeTextData:B,data:B,codeFlowValue:B,definition:b(Te),definitionDestinationString:_,definitionLabelString:_,definitionTitleString:_,emphasis:b(Be),hardBreakEscape:b(Me),hardBreakTrailing:b(Me),htmlFlow:b(ye,_),htmlFlowData:B,htmlText:b(ye,_),htmlTextData:B,image:b(St),label:_,link:b($e),listItem:b(Ht),listItemValue:C,listOrdered:b(Mt,c),listUnordered:b(Mt),paragraph:b(me),reference:H,referenceString:_,resourceDestinationString:_,resourceTitleString:_,setextHeading:b(_e),strong:b(Ae),thematicBreak:b(Lt)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:le,autolinkProtocol:P,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:he,characterReference:K,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:N,codeIndented:u(g),codeText:u(Y),codeTextData:N,data:N,definition:u(),definitionDestinationString:E,definitionLabelString:p,definitionTitleString:m,emphasis:u(),hardBreakEscape:u(G),hardBreakTrailing:u(G),htmlFlow:u(V),htmlFlowData:N,htmlText:u($),htmlTextData:N,image:u(Q),label:z,labelText:J,lineEnding:F,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ne,resourceDestinationString:M,resourceTitleString:O,resource:I,setextHeading:u(T),setextHeadingLineSequence:L,setextHeadingText:A,strong:u(),thematicBreak:u()}};vm(s,(n||{}).mdastExtensions||[]);const l={};return o;function o(ae){let ve={type:"root",children:[]};const we={stack:[ve],tokenStack:[],config:s,enter:a,exit:h,buffer:_,resume:d,data:l},Le=[];let Ne=-1;for(;++Ne<ae.length;)if(ae[Ne][1].type==="listOrdered"||ae[Ne][1].type==="listUnordered")if(ae[Ne][0]==="enter")Le.push(Ne);else{const yt=Le.pop();Ne=v(ae,yt,Ne)}for(Ne=-1;++Ne<ae.length;){const yt=s[ae[Ne][0]];gm.call(yt,ae[Ne][1].type)&&yt[ae[Ne][1].type].call(Object.assign({sliceSerialize:ae[Ne][2].sliceSerialize},we),ae[Ne][1])}if(we.tokenStack.length>0){const yt=we.tokenStack[we.tokenStack.length-1];(yt[1]||m_).call(we,void 0,yt[0])}for(ve.position={start:gi(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:gi(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<s.transforms.length;)ve=s.transforms[Ne](ve)||ve;return ve}function v(ae,ve,we){let Le=ve-1,Ne=-1,yt=!1,Ye,Et,bt,It;for(;++Le<=we;){const it=ae[Le];switch(it[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{it[0]==="enter"?Ne++:Ne--,It=void 0;break}case"lineEndingBlank":{it[0]==="enter"&&(Ye&&!It&&!Ne&&!bt&&(bt=Le),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Ne&&it[0]==="enter"&&it[1].type==="listItemPrefix"||Ne===-1&&it[0]==="exit"&&(it[1].type==="listUnordered"||it[1].type==="listOrdered")){if(Ye){let Yn=Le;for(Et=void 0;Yn--;){const mn=ae[Yn];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;Et&&(ae[Et][1].type="lineEndingBlank",yt=!0),mn[1].type="lineEnding",Et=Yn}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}bt&&(!Et||bt<Et)&&(Ye._spread=!0),Ye.end=Object.assign({},Et?ae[Et][1].start:it[1].end),ae.splice(Et||Le,0,["exit",Ye,it[2]]),Le++,we++}if(it[1].type==="listItemPrefix"){const Yn={type:"listItem",_spread:!1,start:Object.assign({},it[1].start),end:void 0};Ye=Yn,ae.splice(Le,0,["enter",Yn,it[2]]),Le++,we++,bt=void 0,It=!0}}}return ae[ve][1]._spread=yt,we}function b(ae,ve){return we;function we(Le){a.call(this,ae(Le),Le),ve&&ve.call(this,Le)}}function _(){this.stack.push({type:"fragment",children:[]})}function a(ae,ve,we){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([ve,we||void 0]),ae.position={start:gi(ve.start),end:void 0}}function u(ae){return ve;function ve(we){ae&&ae.call(this,we),h.call(this,we)}}function h(ae,ve){const we=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==ae.type&&(ve?ve.call(this,ae,Le[0]):(Le[1]||m_).call(this,ae,Le[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Rs({start:ae.start,end:ae.end})+"): it’s not open");we.position.end=gi(ae.end)}function d(){return wc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function C(ae){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ae}function k(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ae}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae.replace(/(\r?\n|\r)$/g,"")}function p(ae){const ve=this.resume(),we=this.stack[this.stack.length-1];we.label=ve,we.identifier=yn(this.sliceSerialize(ae)).toLowerCase()}function m(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function E(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function R(ae){const ve=this.stack[this.stack.length-1];if(!ve.depth){const we=this.sliceSerialize(ae).length;ve.depth=we}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function L(ae){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ae){const we=this.stack[this.stack.length-1].children;let Le=we[we.length-1];(!Le||Le.type!=="text")&&(Le=Xe(),Le.position={start:gi(ae.start),end:void 0},we.push(Le)),this.stack.push(Le)}function N(ae){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ae),ve.position.end=gi(ae.end)}function F(ae){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ve.children[ve.children.length-1];we.position.end=gi(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(ve.type)&&(B.call(this,ae),N.call(this,ae))}function G(){this.data.atHardBreak=!0}function V(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function $(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function Y(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function q(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ve,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function Q(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ve,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function J(ae){const ve=this.sliceSerialize(ae),we=this.stack[this.stack.length-2];we.label=q1(ve),we.identifier=yn(ve).toLowerCase()}function z(){const ae=this.stack[this.stack.length-1],ve=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Le=ae.children;we.children=Le}else we.alt=ve}function M(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function O(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function I(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ne(ae){const ve=this.resume(),we=this.stack[this.stack.length-1];we.label=ve,we.identifier=yn(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function fe(ae){this.data.characterReferenceType=ae.type}function he(ae){const ve=this.sliceSerialize(ae),we=this.data.characterReferenceType;let Le;we?(Le=am(ve,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=xc(ve);const Ne=this.stack[this.stack.length-1];Ne.value+=Le}function K(ae){const ve=this.stack.pop();ve.position.end=gi(ae.end)}function P(ae){N.call(this,ae);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ae)}function le(ae){N.call(this,ae);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ae)}function re(){return{type:"blockquote",children:[]}}function Se(){return{type:"code",lang:null,meta:null,value:""}}function ge(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Be(){return{type:"emphasis",children:[]}}function _e(){return{type:"heading",depth:0,children:[]}}function Me(){return{type:"break"}}function ye(){return{type:"html",value:""}}function St(){return{type:"image",title:null,url:"",alt:null}}function $e(){return{type:"link",title:null,url:"",children:[]}}function Mt(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function Ht(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function Ae(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function Lt(){return{type:"thematicBreak"}}}function gi(n){return{line:n.line,column:n.column,offset:n.offset}}function vm(n,s){let l=-1;for(;++l<s.length;){const o=s[l];Array.isArray(o)?vm(n,o):W1(n,o)}}function W1(n,s){let l;for(l in s)if(gm.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 m_(n,s){throw n?new Error("Cannot close `"+n.type+"` ("+Rs({start:n.start,end:n.end})+"): a different token (`"+s.type+"`, "+Rs({start:s.start,end:s.end})+") is open"):new Error("Cannot close document, a token (`"+s.type+"`, "+Rs({start:s.start,end:s.end})+") is still open")}function K1(n){const s=this;s.parser=l;function l(o){return G1(o,{...s.data("settings"),...n,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function $1(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 X1(n,s){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(s,l),[n.applyData(s,l),{type:"text",value:`
64
- `}]}function Q1(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 Z1(n,s){const l={type:"element",tagName:"del",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function J1(n,s){const l={type:"element",tagName:"em",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function eb(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 _,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),_=n.footnoteOrder.length):_=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(_)}]};n.patch(s,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(s,h),n.applyData(s,h)}function tb(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 nb(n,s){if(n.options.allowDangerousHtml){const l={type:"raw",value:s.value};return n.patch(s,l),n.applyData(s,l)}}function Sm(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 _=v[v.length-1];return _&&_.type==="text"?_.value+=o:v.push({type:"text",value:o}),v}function ib(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return Sm(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 rb(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 sb(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 lb(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return Sm(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 ab(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 ob(n,s,l){const o=n.all(s),v=l?ub(l):ym(s),b={},_=[];if(typeof s.checked=="boolean"){const d=o[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(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 d=o[a];(v||a!==0||d.type!=="element"||d.tagName!=="p")&&_.push({type:"text",value:`
66
- `}),d.type==="element"&&d.tagName==="p"&&!v?_.push(...d.children):_.push(d)}const u=o[o.length-1];u&&(v||u.type!=="element"||u.tagName!=="p")&&_.push({type:"text",value:`
67
- `});const h={type:"element",tagName:"li",properties:b,children:_};return n.patch(s,h),n.applyData(s,h)}function ub(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=ym(l[o])}return s}function ym(n){const s=n.spread;return s??n.children.length>1}function cb(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 _=o[v];if(_.type==="element"&&_.tagName==="li"&&_.properties&&Array.isArray(_.properties.className)&&_.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 hb(n,s){const l={type:"element",tagName:"p",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function fb(n,s){const l={type:"root",children:n.wrap(n.all(s))};return n.patch(s,l),n.applyData(s,l)}function db(n,s){const l={type:"element",tagName:"strong",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function pb(n,s){const l=n.all(s),o=l.shift(),v=[];if(o){const _={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(s.children[0],_),v.push(_)}if(l.length>0){const _={type:"element",tagName:"tbody",properties:{},children:n.wrap(l,!0)},a=Sc(s.children[1]),u=J_(s.children[s.children.length-1]);a&&u&&(_.position={start:a,end:u}),v.push(_)}const b={type:"element",tagName:"table",properties:{},children:n.wrap(v,!0)};return n.patch(s,b),n.applyData(s,b)}function _b(n,s,l){const o=l?l.children:void 0,b=(o?o.indexOf(s):1)===0?"th":"td",_=l&&l.type==="table"?l.align:void 0,a=_?_.length:s.children.length;let u=-1;const h=[];for(;++u<a;){const c=s.children[u],C={},w=_?_[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 d={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(s,d),n.applyData(s,d)}function mb(n,s){const l={type:"element",tagName:"td",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}const g_=9,v_=32;function gb(n){const s=String(n),l=/\r?\n|\r/g;let o=l.exec(s),v=0;const b=[];for(;o;)b.push(S_(s.slice(v,o.index),v>0,!0),o[0]),v=o.index+o[0].length,o=l.exec(s);return b.push(S_(s.slice(v),v>0,!1)),b.join("")}function S_(n,s,l){let o=0,v=n.length;if(s){let b=n.codePointAt(o);for(;b===g_||b===v_;)o++,b=n.codePointAt(o)}if(l){let b=n.codePointAt(v-1);for(;b===g_||b===v_;)v--,b=n.codePointAt(v-1)}return v>o?n.slice(o,v):""}function vb(n,s){const l={type:"text",value:gb(String(s.value))};return n.patch(s,l),n.applyData(s,l)}function Sb(n,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(s,l),n.applyData(s,l)}const yb={blockquote:$1,break:X1,code:Q1,delete:Z1,emphasis:J1,footnoteReference:eb,heading:tb,html:nb,imageReference:ib,image:rb,inlineCode:sb,linkReference:lb,link:ab,listItem:ob,list:cb,paragraph:hb,root:fb,strong:db,table:pb,tableCell:mb,tableRow:_b,text:vb,thematicBreak:Sb,toml:ea,yaml:ea,definition:ea,footnoteDefinition:ea};function ea(){}const bm=-1,_a=0,Ls=1,ua=2,kc=3,Ac=4,Tc=5,Dc=6,Cm=7,wm=8,bb=typeof self=="object"?self:globalThis,y_=(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 bb[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,_]=s[v];switch(b){case _a:case bm:return l(_,v);case Ls:{const a=l([],v);for(const u of _)a.push(o(u));return a}case ua:{const a=l({},v);for(const[u,h]of _)a[o(u)]=o(h);return a}case kc:return l(new Date(_),v);case Ac:{const{source:a,flags:u}=_;return l(new RegExp(a,u),v)}case Tc:{const a=l(new Map,v);for(const[u,h]of _)a.set(o(u),o(h));return a}case Dc:{const a=l(new Set,v);for(const u of _)a.add(o(u));return a}case Cm:{const{name:a,message:u}=_;return l(y_(a,u),v)}case wm:return l(BigInt(_),v);case"BigInt":return l(Object(BigInt(_)),v);case"ArrayBuffer":return l(new Uint8Array(_).buffer,_);case"DataView":{const{buffer:a}=new Uint8Array(_);return l(new DataView(a),_)}}return l(y_(b,_),v)};return o},b_=n=>Cb(new Map,n)(0),kr="",{toString:wb}={},{keys:xb}=Object,Ds=n=>{const s=typeof n;if(s!=="object"||!n)return[_a,s];const l=wb.call(n).slice(8,-1);switch(l){case"Array":return[Ls,kr];case"Object":return[ua,kr];case"Date":return[kc,kr];case"RegExp":return[Ac,kr];case"Map":return[Tc,kr];case"Set":return[Dc,kr];case"DataView":return[Ls,l]}return l.includes("Array")?[Ls,l]:l.includes("Error")?[Cm,l]:[ua,l]},ta=([n,s])=>n===_a&&(s==="function"||s==="symbol"),Eb=(n,s,l,o)=>{const v=(_,a)=>{const u=o.push(_)-1;return l.set(a,u),u},b=_=>{if(l.has(_))return l.get(_);let[a,u]=Ds(_);switch(a){case _a:{let d=_;switch(u){case"bigint":a=wm,d=_.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return v([bm],_)}return v([a,d],_)}case Ls:{if(u){let C=_;return u==="DataView"?C=new Uint8Array(_.buffer):u==="ArrayBuffer"&&(C=new Uint8Array(_)),v([u,[...C]],_)}const d=[],c=v([a,d],_);for(const C of _)d.push(b(C));return c}case ua:{if(u)switch(u){case"BigInt":return v([u,_.toString()],_);case"Boolean":case"Number":case"String":return v([u,_.valueOf()],_)}if(s&&"toJSON"in _)return b(_.toJSON());const d=[],c=v([a,d],_);for(const C of xb(_))(n||!ta(Ds(_[C])))&&d.push([b(C),b(_[C])]);return c}case kc:return v([a,_.toISOString()],_);case Ac:{const{source:d,flags:c}=_;return v([a,{source:d,flags:c}],_)}case Tc:{const d=[],c=v([a,d],_);for(const[C,w]of _)(n||!(ta(Ds(C))||ta(Ds(w))))&&d.push([b(C),b(w)]);return c}case Dc:{const d=[],c=v([a,d],_);for(const C of _)(n||!ta(Ds(C)))&&d.push(b(C));return c}}const{message:h}=_;return v([a,{name:u,message:h}],_)};return b},C_=(n,{json:s,lossy:l}={})=>{const o=[];return Eb(!(s||l),!!s,new Map,o)(n),o},ca=typeof structuredClone=="function"?(n,s)=>s&&("json"in s||"lossy"in s)?b_(C_(n,s)):structuredClone(n):(n,s)=>b_(C_(n,s));function kb(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 Ab(n,s){return"Back to reference "+(n+1)+(s>1?"-"+s:"")}function Tb(n){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||kb,o=n.options.footnoteBackLabel||Ab,v=n.options.footnoteLabel||"Footnotes",b=n.options.footnoteLabelTagName||"h2",_=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 d=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 p=typeof l=="string"?l:l(u,w);typeof p=="string"&&(p={type:"text",value:p}),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(p)?p:[p]})}const S=d[d.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const p=S.children[S.children.length-1];p&&p.type==="text"?p.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else d.push(...k);const g={type:"element",tagName:"li",properties:{id:s+"fn-"+C},children:n.wrap(d,!0)};n.patch(h,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:b,properties:{...ca(_),id:"footnote-label"},children:[{type:"text",value:v}]},{type:"text",value:`
68
- `},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
69
- `}]}}const ma=(function(n){if(n==null)return Lb;if(typeof n=="function")return ga(n);if(typeof n=="object")return Array.isArray(n)?Db(n):Rb(n);if(typeof n=="string")return Mb(n);throw new Error("Expected function, string, or object as test")});function Db(n){const s=[];let l=-1;for(;++l<n.length;)s[l]=ma(n[l]);return ga(o);function o(...v){let b=-1;for(;++b<s.length;)if(s[b].apply(this,v))return!0;return!1}}function Rb(n){const s=n;return ga(l);function l(o){const v=o;let b;for(b in n)if(v[b]!==s[b])return!1;return!0}}function Mb(n){return ga(s);function s(l){return l&&l.type===n}}function ga(n){return s;function s(l,o,v){return!!(Ob(l)&&n.call(this,l,typeof o=="number"?o:void 0,v||void 0))}}function Lb(){return!0}function Ob(n){return n!==null&&typeof n=="object"&&"type"in n}const xm=[],Bb=!0,cc=!1,zb="skip";function Em(n,s,l,o){let v;typeof s=="function"&&typeof l!="function"?(o=l,l=s):v=s;const b=ma(v),_=o?-1:1;a(n,void 0,[])();function a(u,h,d){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=xm,k,x,S;if((!s||b(u,h,d[d.length-1]||void 0))&&(w=Hb(l(u,d)),w[0]===cc))return w;if("children"in u&&u.children){const g=u;if(g.children&&w[0]!==zb)for(x=(o?g.children.length:-1)+_,S=d.concat(g);x>-1&&x<g.children.length;){const p=g.children[x];if(k=a(p,x,S)(),k[0]===cc)return k;x=typeof k[1]=="number"?k[1]:x+_}}return w}}}function Hb(n){return Array.isArray(n)?n:typeof n=="number"?[Bb,n]:n==null?xm:[n]}function Rc(n,s,l,o){let v,b,_;typeof s=="function"&&typeof l!="function"?(b=void 0,_=s,v=l):(b=s,_=l,v=o),Em(n,b,a,v);function a(u,h){const d=h[h.length-1],c=d?d.children.indexOf(u):void 0;return _(u,c,d)}}const hc={}.hasOwnProperty,Nb={};function jb(n,s){const l=s||Nb,o=new Map,v=new Map,b=new Map,_={...yb,...l.handlers},a={all:h,applyData:Ub,definitionById:o,footnoteById:v,footnoteCounts:b,footnoteOrder:[],handlers:_,one:u,options:l,patch:Ib,wrap:Fb};return Rc(n,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?o:v,C=String(d.identifier).toUpperCase();c.has(C)||c.set(C,d)}}),a;function u(d,c){const C=d.type,w=a.handlers[C];if(hc.call(a.handlers,C)&&w)return w(a,d,c);if(a.options.passThrough&&a.options.passThrough.includes(C)){if("children"in d){const{children:x,...S}=d,g=ca(S);return g.children=a.all(d),g}return ca(d)}return(a.options.unknownHandler||Pb)(a,d,c)}function h(d){const c=[];if("children"in d){const C=d.children;let w=-1;for(;++w<C.length;){const k=a.one(C[w],d);if(k){if(w&&C[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=w_(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=w_(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function Ib(n,s){n.position&&(s.position=kS(n))}function Ub(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 _="children"in l?l.children:[l];l={type:"element",tagName:o,properties:{},children:_}}l.type==="element"&&b&&Object.assign(l.properties,ca(b)),"children"in l&&l.children&&v!==null&&v!==void 0&&(l.children=v)}return l}function Pb(n,s){const l=s.data||{},o="value"in s&&!(hc.call(l,"hProperties")||hc.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 Fb(n,s){const l=[];let o=-1;for(s&&l.push({type:"text",value:`
70
- `});++o<n.length;)o&&l.push({type:"text",value:`
71
- `}),l.push(n[o]);return s&&n.length>0&&l.push({type:"text",value:`
72
- `}),l}function w_(n){let s=0,l=n.charCodeAt(s);for(;l===9||l===32;)s++,l=n.charCodeAt(s);return n.slice(s)}function x_(n,s){const l=jb(n,s),o=l.one(n,void 0),v=Tb(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 qb(n,s){return n&&"run"in n?async function(l,o){const v=x_(l,{file:o,...s});await n.run(v,o)}:function(l,o){return x_(l,{file:o,...n||s})}}function E_(n){if(n)throw n}var Yu,k_;function Vb(){if(k_)return Yu;k_=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 d=n.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!c)return!1;var C;for(C in h);return typeof C>"u"||n.call(h,C)},_=function(h,d){l&&d.name==="__proto__"?l(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},a=function(h,d){if(d==="__proto__")if(n.call(h,d)){if(o)return o(h,d).value}else return;return h[d]};return Yu=function u(){var h,d,c,C,w,k,x=arguments[0],S=1,g=arguments.length,p=!1;for(typeof x=="boolean"&&(p=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<g;++S)if(h=arguments[S],h!=null)for(d in h)c=a(x,d),C=a(h,d),x!==C&&(p&&C&&(b(C)||(w=v(C)))?(w?(w=!1,k=c&&v(c)?c:[]):k=c&&b(c)?c:{},_(x,{name:d,newValue:u(p,k,C)})):typeof C<"u"&&_(x,{name:d,newValue:C}));return x},Yu}var Gb=Vb();const Wu=F_(Gb);function fc(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 Yb(){const n=[],s={run:l,use:o};return s;function l(...v){let b=-1;const _=v.pop();if(typeof _!="function")throw new TypeError("Expected function as last argument, not "+_);a(null,...v);function a(u,...h){const d=n[++b];let c=-1;if(u){_(u);return}for(;++c<v.length;)(h[c]===null||h[c]===void 0)&&(h[c]=v[c]);v=h,d?Wb(d,a)(...h):_(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 Wb(n,s){let l;return o;function o(..._){const a=n.length>_.length;let u;a&&_.push(v);try{u=n.apply(this,_)}catch(h){const d=h;if(a&&l)throw d;return v(d)}a||(u&&u.then&&typeof u.then=="function"?u.then(b,v):u instanceof Error?v(u):b(u))}function v(_,...a){l||(l=!0,s(_,...a))}function b(_){v(null,_)}}const En={basename:Kb,dirname:$b,extname:Xb,join:Qb,sep:"/"};function Kb(n,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');Ns(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 _=-1,a=s.length-1;for(;v--;)if(n.codePointAt(v)===47){if(b){l=v+1;break}}else _<0&&(b=!0,_=v+1),a>-1&&(n.codePointAt(v)===s.codePointAt(a--)?a<0&&(o=v):(a=-1,o=_));return l===o?o=_:o<0&&(o=n.length),n.slice(l,o)}function $b(n){if(Ns(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 Xb(n){Ns(n);let s=n.length,l=-1,o=0,v=-1,b=0,_;for(;s--;){const a=n.codePointAt(s);if(a===47){if(_){o=s+1;break}continue}l<0&&(_=!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 Qb(...n){let s=-1,l;for(;++s<n.length;)Ns(n[s]),n[s]&&(l=l===void 0?n[s]:l+"/"+n[s]);return l===void 0?".":Zb(l)}function Zb(n){Ns(n);const s=n.codePointAt(0)===47;let l=Jb(n,!s);return l.length===0&&!s&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),s?"/"+l:l}function Jb(n,s){let l="",o=0,v=-1,b=0,_=-1,a,u;for(;++_<=n.length;){if(_<n.length)a=n.codePointAt(_);else{if(a===47)break;a=47}if(a===47){if(!(v===_-1||b===1))if(v!==_-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=_,b=0;continue}}else if(l.length>0){l="",o=0,v=_,b=0;continue}}s&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+n.slice(v+1,_):l=n.slice(v+1,_),o=_-v-1;v=_,b=0}else a===46&&b>-1?b++:b=-1}return l}function Ns(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const eC={cwd:tC};function tC(){return"/"}function dc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function nC(n){if(typeof n=="string")n=new URL(n);else if(!dc(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 iC(n)}function iC(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 Ku=["history","path","basename","stem","extname","dirname"];class km{constructor(s){let l;s?dc(s)?l={path:s}:typeof s=="string"||rC(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":eC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Ku.length;){const b=Ku[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)Ku.includes(v)||(this[v]=l[v])}get basename(){return typeof this.path=="string"?En.basename(this.path):void 0}set basename(s){Xu(s,"basename"),$u(s,"basename"),this.path=En.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?En.dirname(this.path):void 0}set dirname(s){A_(this.basename,"dirname"),this.path=En.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?En.extname(this.path):void 0}set extname(s){if($u(s,"extname"),A_(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=En.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){dc(s)&&(s=nC(s)),Xu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?En.basename(this.path,this.extname):void 0}set stem(s){Xu(s,"stem"),$u(s,"stem"),this.path=En.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 zt(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 $u(n,s){if(n&&n.includes(En.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+En.sep+"`")}function Xu(n,s){if(!n)throw new Error("`"+s+"` cannot be empty")}function A_(n,s){if(!n)throw new Error("Setting `"+s+"` requires `path` to be set too")}function rC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const sC=(function(n){const o=this.constructor.prototype,v=o[n],b=function(){return v.apply(b,arguments)};return Object.setPrototypeOf(b,o),b}),lC={}.hasOwnProperty;class Mc extends sC{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=Yb()}copy(){const s=new Mc;let l=-1;for(;++l<this.attachers.length;){const o=this.attachers[l];s.use(...o)}return s.data(Wu(!0,{},this.namespace)),s}data(s,l){return typeof s=="string"?arguments.length===2?(Ju("data",this.frozen),this.namespace[s]=l,this):lC.call(this.namespace,s)&&this.namespace[s]||void 0:s?(Ju("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=na(s),o=this.parser||this.Parser;return Qu("parse",o),o(String(l),l)}process(s,l){const o=this;return this.freeze(),Qu("process",this.parser||this.Parser),Zu("process",this.compiler||this.Compiler),l?v(void 0,l):new Promise(v);function v(b,_){const a=na(s),u=o.parse(a);o.run(u,a,function(d,c,C){if(d||!c||!C)return h(d);const w=c,k=o.stringify(w,C);uC(k)?C.value=k:C.result=k,h(d,C)});function h(d,c){d||!c?_(d):b?b(c):l(void 0,c)}}}processSync(s){let l=!1,o;return this.freeze(),Qu("processSync",this.parser||this.Parser),Zu("processSync",this.compiler||this.Compiler),this.process(s,v),D_("processSync","process",l),o;function v(b,_){l=!0,E_(b),o=_}}run(s,l,o){T_(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(_,a){const u=na(l);v.run(s,u,h);function h(d,c,C){const w=c||s;d?a(d):_?_(w):o(void 0,w,C)}}}runSync(s,l){let o=!1,v;return this.run(s,l,b),D_("runSync","run",o),v;function b(_,a){E_(_),v=a,o=!0}}stringify(s,l){this.freeze();const o=na(l),v=this.compiler||this.Compiler;return Zu("stringify",v),T_(s),v(s,o)}use(s,...l){const o=this.attachers,v=this.namespace;if(Ju("use",this.frozen),s!=null)if(typeof s=="function")u(s,l);else if(typeof s=="object")Array.isArray(s)?a(s):_(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[d,...c]=h;u(d,c)}else _(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function _(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=Wu(!0,v.settings,h.settings))}function a(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const c=h[d];b(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,d){let c=-1,C=-1;for(;++c<o.length;)if(o[c][0]===h){C=c;break}if(C===-1)o.push([h,...d]);else if(d.length>0){let[w,...k]=d;const x=o[C][1];fc(x)&&fc(w)&&(w=Wu(!0,x,w)),o[C]=[h,w,...k]}}}}const aC=new Mc().freeze();function Qu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Zu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Ju(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 T_(n){if(!fc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function D_(n,s,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+s+"` instead")}function na(n){return oC(n)?n:new km(n)}function oC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function uC(n){return typeof n=="string"||cC(n)}function cC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const hC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",R_=[],M_={allowDangerousHtml:!0},fC=/^(https?|ircs?|mailto|xmpp)$/i,dC=[{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 pC(n){const s=_C(n),l=mC(n);return gC(s.runSync(s.parse(l),l),n)}function _C(n){const s=n.rehypePlugins||R_,l=n.remarkPlugins||R_,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...M_}:M_;return aC().use(K1).use(l).use(qb,o).use(s)}function mC(n){const s=n.children||"",l=new km;return typeof s=="string"&&(l.value=s),l}function gC(n,s){const l=s.allowedElements,o=s.allowElement,v=s.components,b=s.disallowedElements,_=s.skipHtml,a=s.unwrapDisallowed,u=s.urlTransform||vC;for(const d of dC)Object.hasOwn(s,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+hC+d.id,void 0);return Rc(n,h),MS(n,{Fragment:j.Fragment,components:v,ignoreInvalidStyle:!0,jsx:j.jsx,jsxs:j.jsxs,passKeys:!0,passNode:!0});function h(d,c,C){if(d.type==="raw"&&C&&typeof c=="number")return _?C.children.splice(c,1):C.children[c]={type:"text",value:d.value},c;if(d.type==="element"){let w;for(w in qu)if(Object.hasOwn(qu,w)&&Object.hasOwn(d.properties,w)){const k=d.properties[w],x=qu[w];(x===null||x.includes(d.tagName))&&(d.properties[w]=u(String(k||""),w,d))}}if(d.type==="element"){let w=l?!l.includes(d.tagName):b?b.includes(d.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(d,c,C)),w&&C&&typeof c=="number")return a&&d.children?C.children.splice(c,1,...d.children):C.children.splice(c,1),c}}}function vC(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||fC.test(n.slice(0,s))?n:""}function L_(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 SC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yC(n,s,l){const v=ma((l||{}).ignore||[]),b=bC(s);let _=-1;for(;++_<b.length;)Em(n,"text",a);function a(h,d){let c=-1,C;for(;++c<d.length;){const w=d[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,d)}function u(h,d){const c=d[d.length-1],C=b[_][0],w=b[_][1];let k=0;const S=c.children.indexOf(h);let g=!1,p=[];C.lastIndex=0;let m=C.exec(h.value);for(;m;){const E=m.index,R={index:m.index,input:m.input,stack:[...d,h]};let A=w(...m,R);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?C.lastIndex=E+1:(k!==E&&p.push({type:"text",value:h.value.slice(k,E)}),Array.isArray(A)?p.push(...A):A&&p.push(A),k=E+m[0].length,g=!0),!C.global)break;m=C.exec(h.value)}return g?(k<h.value.length&&p.push({type:"text",value:h.value.slice(k)}),c.children.splice(S,1,...p)):p=[h],S+p.length}}function bC(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]),wC(v[1])])}return s}function CC(n){return typeof n=="string"?new RegExp(SC(n),"g"):n}function wC(n){return typeof n=="function"?n:function(){return n}}const ec="phrasing",tc=["autolink","link","image","label"];function xC(){return{transforms:[MC],enter:{literalAutolink:kC,literalAutolinkEmail:nc,literalAutolinkHttp:nc,literalAutolinkWww:nc},exit:{literalAutolink:RC,literalAutolinkEmail:DC,literalAutolinkHttp:AC,literalAutolinkWww:TC}}}function EC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ec,notInConstruct:tc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ec,notInConstruct:tc},{character:":",before:"[ps]",after:"\\/",inConstruct:ec,notInConstruct:tc}]}}function kC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function nc(n){this.config.enter.autolinkProtocol.call(this,n)}function AC(n){this.config.exit.autolinkProtocol.call(this,n)}function TC(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 DC(n){this.config.exit.autolinkEmail.call(this,n)}function RC(n){this.exit(n)}function MC(n){yC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),OC]],{ignore:["link","linkReference"]})}function LC(n,s,l,o,v){let b="";if(!Am(v)||(/^w/i.test(s)&&(l=s+l,s="",b="http://"),!BC(l)))return!1;const _=zC(l+o);if(!_[0])return!1;const a={type:"link",title:null,url:b+s+_[0],children:[{type:"text",value:s+_[0]}]};return _[1]?[a,{type:"text",value:_[1]}]:a}function OC(n,s,l,o){return!Am(o,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+s+"@"+l,children:[{type:"text",value:s+"@"+l}]}}function BC(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 zC(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=L_(n,"(");let b=L_(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 Am(n,s){const l=n.input.charCodeAt(n.index-1);return(n.index===0||ji(l)||da(l))&&(!s||l!==47)}Tm.peek=VC;function HC(){this.buffer()}function NC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function jC(){this.buffer()}function IC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function UC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=yn(this.sliceSerialize(n)).toLowerCase(),l.label=s}function PC(n){this.exit(n)}function FC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=yn(this.sliceSerialize(n)).toLowerCase(),l.label=s}function qC(n){this.exit(n)}function VC(){return"["}function Tm(n,s,l,o){const v=l.createTracker(o);let b=v.move("[^");const _=l.enter("footnoteReference"),a=l.enter("reference");return b+=v.move(l.safe(l.associationId(n),{after:"]",before:b})),a(),_(),b+=v.move("]"),b}function GC(){return{enter:{gfmFootnoteCallString:HC,gfmFootnoteCall:NC,gfmFootnoteDefinitionLabelString:jC,gfmFootnoteDefinition:IC},exit:{gfmFootnoteCallString:UC,gfmFootnoteCall:PC,gfmFootnoteDefinitionLabelString:FC,gfmFootnoteDefinition:qC}}}function YC(n){let s=!1;return n&&n.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:Tm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(o,v,b,_){const a=b.createTracker(_);let u=a.move("[^");const h=b.enter("footnoteDefinition"),d=b.enter("label");return u+=a.move(b.safe(b.associationId(o),{before:u,after:"]"})),d(),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?Dm:WC))),h(),u}}function WC(n,s,l){return s===0?n:Dm(n,s,l)}function Dm(n,s,l){return(l?"":" ")+n}const KC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rm.peek=JC;function $C(){return{canContainEols:["delete"],enter:{strikethrough:QC},exit:{strikethrough:ZC}}}function XC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:KC}],handlers:{delete:Rm}}}function QC(n){this.enter({type:"delete",children:[]},n)}function ZC(n){this.exit(n)}function Rm(n,s,l,o){const v=l.createTracker(o),b=l.enter("strikethrough");let _=v.move("~~");return _+=l.containerPhrasing(n,{...v.current(),before:_,after:"~"}),_+=v.move("~~"),b(),_}function JC(){return"~"}function ew(n){return n.length}function tw(n,s){const l=s||{},o=(l.align||[]).concat(),v=l.stringLength||ew,b=[],_=[],a=[],u=[];let h=0,d=-1;for(;++d<n.length;){const x=[],S=[];let g=-1;for(n[d].length>h&&(h=n[d].length);++g<n[d].length;){const p=nw(n[d][g]);if(l.alignDelimiters!==!1){const m=v(p);S[g]=m,(u[g]===void 0||m>u[g])&&(u[g]=m)}x.push(p)}_[d]=x,a[d]=S}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)b[c]=O_(o[c]);else{const x=O_(o);for(;++c<h;)b[c]=x}c=-1;const C=[],w=[];for(;++c<h;){const x=b[c];let S="",g="";x===99?(S=":",g=":"):x===108?S=":":x===114&&(g=":");let p=l.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-g.length);const m=S+"-".repeat(p)+g;l.alignDelimiters!==!1&&(p=S.length+p+g.length,p>u[c]&&(u[c]=p),w[c]=p),C[c]=m}_.splice(1,0,C),a.splice(1,0,w),d=-1;const k=[];for(;++d<_.length;){const x=_[d],S=a[d];c=-1;const g=[];for(;++c<h;){const p=x[c]||"";let m="",E="";if(l.alignDelimiters!==!1){const R=u[c]-(S[c]||0),A=b[c];A===114?m=" ".repeat(R):A===99?R%2?(m=" ".repeat(R/2+.5),E=" ".repeat(R/2-.5)):(m=" ".repeat(R/2),E=m):E=" ".repeat(R)}l.delimiterStart!==!1&&!c&&g.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&p==="")&&(l.delimiterStart!==!1||c)&&g.push(" "),l.alignDelimiters!==!1&&g.push(m),g.push(p),l.alignDelimiters!==!1&&g.push(E),l.padding!==!1&&g.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&g.push("|")}k.push(l.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return k.join(`
75
- `)}function nw(n){return n==null?"":String(n)}function O_(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 iw(n,s,l,o){const v=l.enter("blockquote"),b=l.createTracker(o);b.move("> "),b.shift(2);const _=l.indentLines(l.containerFlow(n,b.current()),rw);return v(),_}function rw(n,s,l){return">"+(l?"":" ")+n}function sw(n,s){return B_(n,s.inConstruct,!0)&&!B_(n,s.notInConstruct,!1)}function B_(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 z_(n,s,l,o){let v=-1;for(;++v<l.unsafe.length;)if(l.unsafe[v].character===`
76
- `&&sw(l.stack,l.unsafe[v]))return/[ \t]/.test(o.before)?"":" ";return`\\
77
- `}function lw(n,s){const l=String(n);let o=l.indexOf(s),v=o,b=0,_=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===v?++b>_&&(_=b):b=1,v=o+s.length,o=l.indexOf(s,v);return _}function aw(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 ow(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 uw(n,s,l,o){const v=ow(l),b=n.value||"",_=v==="`"?"GraveAccent":"Tilde";if(aw(n,l)){const c=l.enter("codeIndented"),C=l.indentLines(b,cw);return c(),C}const a=l.createTracker(o),u=v.repeat(Math.max(lw(b,v)+1,3)),h=l.enter("codeFenced");let d=a.move(u);if(n.lang){const c=l.enter(`codeFencedLang${_}`);d+=a.move(l.safe(n.lang,{before:d,after:" ",encode:["`"],...a.current()})),c()}if(n.lang&&n.meta){const c=l.enter(`codeFencedMeta${_}`);d+=a.move(" "),d+=a.move(l.safe(n.meta,{before:d,after:`
78
- `,encode:["`"],...a.current()})),c()}return d+=a.move(`
79
- `),b&&(d+=a.move(b+`
80
- `)),d+=a.move(u),h(),d}function cw(n,s,l){return(l?"":" ")+n}function Lc(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 hw(n,s,l,o){const v=Lc(l),b=v==='"'?"Quote":"Apostrophe",_=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()),_(),h}function fw(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 Bs(n){return"&#x"+n.toString(16).toUpperCase()+";"}function ha(n,s,l){const o=Rr(n),v=Rr(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}}Mm.peek=dw;function Mm(n,s,l,o){const v=fw(l),b=l.enter("emphasis"),_=l.createTracker(o),a=_.move(v);let u=_.move(l.containerPhrasing(n,{after:v,before:a,..._.current()}));const h=u.charCodeAt(0),d=ha(o.before.charCodeAt(o.before.length-1),h,v);d.inside&&(u=Bs(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=ha(o.after.charCodeAt(0),c,v);C.inside&&(u=u.slice(0,-1)+Bs(c));const w=_.move(v);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:d.outside},a+u+w}function dw(n,s,l){return l.options.emphasis||"*"}function pw(n,s){let l=!1;return Rc(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return l=!0,cc}),!!((!n.depth||n.depth<3)&&wc(n)&&(s.options.setext||l))}function _w(n,s,l,o){const v=Math.max(Math.min(6,n.depth||1),1),b=l.createTracker(o);if(pw(n,l)){const d=l.enter("headingSetext"),c=l.enter("phrasing"),C=l.containerPhrasing(n,{...b.current(),before:`
82
- `,after:`
83
- `});return c(),d(),C+`
84
- `+(v===1?"=":"-").repeat(C.length-(Math.max(C.lastIndexOf("\r"),C.lastIndexOf(`
85
- `))+1))}const _="#".repeat(v),a=l.enter("headingAtx"),u=l.enter("phrasing");b.move(_+" ");let h=l.containerPhrasing(n,{before:"# ",after:`
86
- `,...b.current()});return/^[\t ]/.test(h)&&(h=Bs(h.charCodeAt(0))+h.slice(1)),h=h?_+" "+h:_,l.options.closeAtx&&(h+=" "+_),u(),a(),h}Lm.peek=mw;function Lm(n){return n.value||""}function mw(){return"<"}Om.peek=gw;function Om(n,s,l,o){const v=Lc(l),b=v==='"'?"Quote":"Apostrophe",_=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(")"),_(),h}function gw(){return"!"}Bm.peek=vw;function Bm(n,s,l,o){const v=n.referenceType,b=l.enter("imageReference");let _=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+"]["),_();const d=l.stack;l.stack=[],_=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return _(),l.stack=d,b(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function vw(){return"!"}zm.peek=Sw;function zm(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 _=l.unsafe[b],a=l.compilePattern(_);let u;if(_.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 Sw(){return"`"}function Hm(n,s){const l=wc(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))}Nm.peek=yw;function Nm(n,s,l,o){const v=Lc(l),b=v==='"'?"Quote":"Apostrophe",_=l.createTracker(o);let a,u;if(Hm(n,l)){const d=l.stack;l.stack=[],a=l.enter("autolink");let c=_.move("<");return c+=_.move(l.containerPhrasing(n,{before:c,after:">",..._.current()})),c+=_.move(">"),a(),l.stack=d,c}a=l.enter("link"),u=l.enter("label");let h=_.move("[");return h+=_.move(l.containerPhrasing(n,{before:h,after:"](",..._.current()})),h+=_.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=l.enter("destinationLiteral"),h+=_.move("<"),h+=_.move(l.safe(n.url,{before:h,after:">",..._.current()})),h+=_.move(">")):(u=l.enter("destinationRaw"),h+=_.move(l.safe(n.url,{before:h,after:n.title?" ":")",..._.current()}))),u(),n.title&&(u=l.enter(`title${b}`),h+=_.move(" "+v),h+=_.move(l.safe(n.title,{before:h,after:v,..._.current()})),h+=_.move(v),u()),h+=_.move(")"),a(),h}function yw(n,s,l){return Hm(n,l)?"<":"["}jm.peek=bw;function jm(n,s,l,o){const v=n.referenceType,b=l.enter("linkReference");let _=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+"]["),_();const d=l.stack;l.stack=[],_=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return _(),l.stack=d,b(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function bw(){return"["}function Oc(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=Oc(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 ww(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 Im(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 xw(n,s,l,o){const v=l.enter("list"),b=l.bulletCurrent;let _=n.ordered?ww(l):Oc(l);const a=n.ordered?_==="."?")":".":Cw(l);let u=s&&l.bulletLastUsed?_===l.bulletLastUsed:!1;if(!n.ordered){const d=n.children?n.children[0]:void 0;if((_==="*"||_==="-")&&d&&(!d.children||!d.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),Im(l)===_&&d){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&&(_=a),l.bulletCurrent=_;const h=l.containerFlow(n,o);return l.bulletLastUsed=_,l.bulletCurrent=b,v(),h}function Ew(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 kw(n,s,l,o){const v=Ew(l);let b=l.bulletCurrent||Oc(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 _=b.length+1;(v==="tab"||v==="mixed"&&(s&&s.type==="list"&&s.spread||n.spread))&&(_=Math.ceil(_/4)*4);const a=l.createTracker(o);a.move(b+" ".repeat(_-b.length)),a.shift(_);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(n,a.current()),d);return u(),h;function d(c,C,w){return C?(w?"":" ".repeat(_))+c:(w?b:b+" ".repeat(_-b.length))+c}}function Aw(n,s,l,o){const v=l.enter("paragraph"),b=l.enter("phrasing"),_=l.containerPhrasing(n,o);return b(),v(),_}const Tw=ma(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dw(n,s,l,o){return(n.children.some(function(_){return Tw(_)})?l.containerPhrasing:l.containerFlow).call(l,n,o)}function Rw(n){const s=n.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}Um.peek=Mw;function Um(n,s,l,o){const v=Rw(l),b=l.enter("strong"),_=l.createTracker(o),a=_.move(v+v);let u=_.move(l.containerPhrasing(n,{after:v,before:a,..._.current()}));const h=u.charCodeAt(0),d=ha(o.before.charCodeAt(o.before.length-1),h,v);d.inside&&(u=Bs(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=ha(o.after.charCodeAt(0),c,v);C.inside&&(u=u.slice(0,-1)+Bs(c));const w=_.move(v+v);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:d.outside},a+u+w}function Mw(n,s,l){return l.options.strong||"*"}function Lw(n,s,l,o){return l.safe(n.value,o)}function Ow(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 Bw(n,s,l){const o=(Im(l)+(l.options.ruleSpaces?" ":"")).repeat(Ow(l));return l.options.ruleSpaces?o.slice(0,-1):o}const Pm={blockquote:iw,break:z_,code:uw,definition:hw,emphasis:Mm,hardBreak:z_,heading:_w,html:Lm,image:Om,imageReference:Bm,inlineCode:zm,link:Nm,linkReference:jm,list:xw,listItem:kw,paragraph:Aw,root:Dw,strong:Um,text:Lw,thematicBreak:Bw};function zw(){return{enter:{table:Hw,tableData:H_,tableHeader:H_,tableRow:jw},exit:{codeText:Iw,table:Nw,tableData:ic,tableHeader:ic,tableRow:ic}}}function Hw(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 Nw(n){this.exit(n),this.data.inTable=void 0}function jw(n){this.enter({type:"tableRow",children:[]},n)}function ic(n){this.exit(n)}function H_(n){this.enter({type:"tableCell",children:[]},n)}function Iw(n){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,Uw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(n)}function Uw(n,s){return s==="|"?s:n}function Pw(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:_,tableCell:u,tableRow:a}};function _(w,k,x,S){return h(d(w,x,S),w.align)}function a(w,k,x,S){const g=c(w,x,S),p=h([g]);return p.slice(0,p.indexOf(`
88
- `))}function u(w,k,x,S){const g=x.enter("tableCell"),p=x.enter("phrasing"),m=x.containerPhrasing(w,{...S,before:b,after:b});return p(),g(),m}function h(w,k){return tw(w,{align:k,alignDelimiters:o,padding:l,stringLength:v})}function d(w,k,x){const S=w.children;let g=-1;const p=[],m=k.enter("table");for(;++g<S.length;)p[g]=c(S[g],k,x);return m(),p}function c(w,k,x){const S=w.children;let g=-1;const p=[],m=k.enter("tableRow");for(;++g<S.length;)p[g]=u(S[g],w,k,x);return m(),p}function C(w,k,x){let S=Pm.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Fw(){return{exit:{taskListCheckValueChecked:N_,taskListCheckValueUnchecked:N_,paragraph:Vw}}}function qw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Gw}}}function N_(n){const s=this.stack[this.stack.length-2];s.type,s.checked=n.type==="taskListCheckValueChecked"}function Vw(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,_;for(;++b<v.length;){const a=v[b];if(a.type==="paragraph"){_=a;break}}_===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 Gw(n,s,l,o){const v=n.children[0],b=typeof n.checked=="boolean"&&v&&v.type==="paragraph",_="["+(n.checked?"x":" ")+"] ",a=l.createTracker(o);b&&a.move(_);let u=Pm.listItem(n,s,l,{...o,...a.current()});return b&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(d){return d+_}}function Yw(){return[xC(),GC(),$C(),zw(),Fw()]}function Ww(n){return{extensions:[EC(),YC(n),XC(),Pw(n),qw()]}}const Kw={tokenize:ex,partial:!0},Fm={tokenize:tx,partial:!0},qm={tokenize:nx,partial:!0},Vm={tokenize:ix,partial:!0},$w={tokenize:rx,partial:!0},Gm={name:"wwwAutolink",tokenize:Zw,previous:Wm},Ym={name:"protocolAutolink",tokenize:Jw,previous:Km},Gn={name:"emailAutolink",tokenize:Qw,previous:$m},kn={};function Xw(){return{text:kn}}let Ni=48;for(;Ni<123;)kn[Ni]=Gn,Ni++,Ni===58?Ni=65:Ni===91&&(Ni=97);kn[43]=Gn;kn[45]=Gn;kn[46]=Gn;kn[95]=Gn;kn[72]=[Gn,Ym];kn[104]=[Gn,Ym];kn[87]=[Gn,Gm];kn[119]=[Gn,Gm];function Qw(n,s,l){const o=this;let v,b;return _;function _(c){return!pc(c)||!$m.call(o,o.previous)||Bc(o.events)?l(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(c))}function a(c){return pc(c)?(n.consume(c),a):c===64?(n.consume(c),u):l(c)}function u(c){return c===46?n.check($w,d,h)(c):c===45||c===95||Bt(c)?(b=!0,n.consume(c),u):d(c)}function h(c){return n.consume(c),v=!0,u}function d(c){return b&&v&&jt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),s(c)):l(c)}}function Zw(n,s,l){const o=this;return v;function v(_){return _!==87&&_!==119||!Wm.call(o,o.previous)||Bc(o.events)?l(_):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Kw,n.attempt(Fm,n.attempt(qm,b),l),l)(_))}function b(_){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),s(_)}}function Jw(n,s,l){const o=this;let v="",b=!1;return _;function _(c){return(c===72||c===104)&&Km.call(o,o.previous)&&!Bc(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),v+=String.fromCodePoint(c),n.consume(c),a):l(c)}function a(c){if(jt(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||oa(c)||st(c)||ji(c)||da(c)?l(c):n.attempt(Fm,n.attempt(qm,d),l)(c)}function d(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),s(c)}}function ex(n,s,l){let o=0;return v;function v(_){return(_===87||_===119)&&o<3?(o++,n.consume(_),v):_===46&&o===3?(n.consume(_),b):l(_)}function b(_){return _===null?l(_):s(_)}}function tx(n,s,l){let o,v,b;return _;function _(h){return h===46||h===95?n.check(Vm,u,a)(h):h===null||st(h)||ji(h)||h!==45&&da(h)?u(h):(b=!0,n.consume(h),_)}function a(h){return h===95?o=!0:(v=o,o=void 0),n.consume(h),_}function u(h){return v||o||!b?l(h):s(h)}}function nx(n,s){let l=0,o=0;return v;function v(_){return _===40?(l++,n.consume(_),v):_===41&&o<l?b(_):_===33||_===34||_===38||_===39||_===41||_===42||_===44||_===46||_===58||_===59||_===60||_===63||_===93||_===95||_===126?n.check(Vm,s,b)(_):_===null||st(_)||ji(_)?s(_):(n.consume(_),v)}function b(_){return _===41&&o++,n.consume(_),v}}function ix(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||st(a)||ji(a)?s(a):l(a)}function v(a){return a===null||a===40||a===91||st(a)||ji(a)?s(a):o(a)}function b(a){return jt(a)?_(a):l(a)}function _(a){return a===59?(n.consume(a),o):jt(a)?(n.consume(a),_):l(a)}}function rx(n,s,l){return o;function o(b){return n.consume(b),v}function v(b){return Bt(b)?l(b):s(b)}}function Wm(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||st(n)}function Km(n){return!jt(n)}function $m(n){return!(n===47||pc(n))}function pc(n){return n===43||n===45||n===46||n===95||Bt(n)}function Bc(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 sx={tokenize:dx,partial:!0};function lx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cx,continuation:{tokenize:hx},exit:fx}},text:{91:{name:"gfmFootnoteCall",tokenize:ux},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ax,resolveTo:ox}}}}function ax(n,s,l){const o=this;let v=o.events.length;const b=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let _;for(;v--;){const u=o.events[v][1];if(u.type==="labelImage"){_=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(!_||!_._balanced)return l(u);const h=yn(o.sliceSerialize({start:_.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 ox(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)},_={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",_,s],["exit",_,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 ux(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b=0,_;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&&!_||c===null||c===91||st(c))return l(c);if(c===93){n.exit("chunkString");const C=n.exit("gfmFootnoteCallString");return v.includes(yn(o.sliceSerialize(C)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),s):l(c)}return st(c)||(_=!0),b++,n.consume(c),c===92?d:h}function d(c){return c===91||c===92||c===93?(n.consume(c),b++,h):h(c)}}function cx(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b,_=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",d):l(k)}function d(k){if(_>999||k===93&&!a||k===null||k===91||st(k))return l(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return b=yn(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),C}return st(k)||(a=!0),_++,n.consume(k),k===92?c:d}function c(k){return k===91||k===92||k===93?(n.consume(k),_++,d):d(k)}function C(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),v.includes(b)||v.push(b),Ge(n,w,"gfmFootnoteDefinitionWhitespace")):l(k)}function w(k){return s(k)}}function hx(n,s,l){return n.check(Hs,s,n.attempt(sx,s,l))}function fx(n){n.exit("gfmFootnoteDefinition")}function dx(n,s,l){const o=this;return Ge(n,v,"gfmFootnoteDefinitionIndent",5);function v(b){const _=o.events[o.events.length-1];return _&&_[1].type==="gfmFootnoteDefinitionIndent"&&_[2].sliceSerialize(_[1],!0).length===4?s(b):l(b)}}function px(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(_,a){let u=-1;for(;++u<_.length;)if(_[u][0]==="enter"&&_[u][1].type==="strikethroughSequenceTemporary"&&_[u][1]._close){let h=u;for(;h--;)if(_[h][0]==="exit"&&_[h][1].type==="strikethroughSequenceTemporary"&&_[h][1]._open&&_[u][1].end.offset-_[u][1].start.offset===_[h][1].end.offset-_[h][1].start.offset){_[u][1].type="strikethroughSequence",_[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},_[h][1].start),end:Object.assign({},_[u][1].end)},c={type:"strikethroughText",start:Object.assign({},_[h][1].end),end:Object.assign({},_[u][1].start)},C=[["enter",d,a],["enter",_[h][1],a],["exit",_[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&rn(C,C.length,0,pa(w,_.slice(h+1,u),a)),rn(C,C.length,0,[["exit",c,a],["enter",_[u][1],a],["exit",_[u][1],a],["exit",d,a]]),rn(_,h-1,u-h+3,C),u=h+C.length-2;break}}for(u=-1;++u<_.length;)_[u][1].type==="strikethroughSequenceTemporary"&&(_[u][1].type="data");return _}function b(_,a,u){const h=this.previous,d=this.events;let c=0;return C;function C(k){return h===126&&d[d.length-1][1].type!=="characterEscape"?u(k):(_.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=Rr(h);if(k===126)return c>1?u(k):(_.consume(k),c++,w);if(c<2&&!l)return u(k);const S=_.exit("strikethroughSequenceTemporary"),g=Rr(k);return S._open=!g||g===2&&!!x,S._close=!x||x===2&&!!g,a(k)}}}class _x{constructor(){this.map=[]}add(s,l,o){mx(this,s,l,o)}consume(s){if(this.map.sort(function(b,_){return b[0]-_[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 mx(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 gx(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 vx(){return{flow:{null:{name:"table",tokenize:Sx,resolveAll:yx}}}}function Sx(n,s,l){const o=this;let v=0,b=0,_;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,V=G==="tableHead"||G==="tableRow"?A:u;return V===A&&o.parser.lazy[o.now().line]?l(N):V(N)}function u(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(_=!0,b+=1),d(N)}function d(N){return N===null?l(N):Ee(N)?b>1?(b=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):l(N):Pe(N)?Ge(n,d,"whitespace")(N):(b+=1,_&&(_=!1,v+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),_=!0,d):(n.enter("data"),c(N)))}function c(N){return N===null||N===124||st(N)?(n.exit("data"),d(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"),_=!1,Pe(N)?Ge(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?(_=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):R(N)}function x(N){return Pe(N)?Ge(n,S,"whitespace")(N):S(N)}function S(N){return N===58?(b+=1,_=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),g):N===45?(b+=1,g(N)):N===null||Ee(N)?E(N):R(N)}function g(N){return N===45?(n.enter("tableDelimiterFiller"),p(N)):R(N)}function p(N){return N===45?(n.consume(N),p):N===58?(_=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),m):(n.exit("tableDelimiterFiller"),m(N))}function m(N){return Pe(N)?Ge(n,E,"whitespace")(N):E(N)}function E(N){return N===124?k(N):N===null||Ee(N)?!_||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||Ee(N)?(n.exit("tableRow"),s(N)):Pe(N)?Ge(n,L,"whitespace")(N):(n.enter("data"),T(N))}function T(N){return N===null||N===124||st(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 yx(n,s){let l=-1,o=!0,v=0,b=[0,0,0,0],_=[0,0,0,0],a=!1,u=0,h,d,c;const C=new _x;for(;++l<n.length;){const w=n[l],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,u!==0&&(j_(C,s,u,h,d),d=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],_=[0,l+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},C.add(l,0,[["enter",d,s]])),v=k.type==="tableDelimiterRow"?2:d?3:1):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(o=!1,_[2]===0&&(b[1]!==0&&(_[0]=_[1],c=ia(C,s,b,v,void 0,c),b=[0,0,0,0]),_[2]=l)):k.type==="tableCellDivider"&&(o?o=!1:(b[1]!==0&&(_[0]=_[1],c=ia(C,s,b,v,void 0,c)),b=_,_=[b[1],l,0,0])):k.type==="tableHead"?(a=!0,u=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=l,b[1]!==0?(_[0]=_[1],c=ia(C,s,b,v,l,c)):_[1]!==0&&(c=ia(C,s,_,v,l,c)),v=0):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(_[3]=l)}for(u!==0&&j_(C,s,u,h,d),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=gx(s.events,l))}return n}function ia(n,s,l,o,v,b){const _=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:_,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]),d=Ar(s.events,l[3]),c={type:a,start:Object.assign({},h),end:Object.assign({},d)};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 j_(n,s,l,o,v){const b=[],_=Ar(s.events,l);v&&(v.end=Object.assign({},_),b.push(["exit",v,s])),o.end=Object.assign({},_),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 bx={name:"tasklistCheck",tokenize:wx};function Cx(){return{text:{91:bx}}}function wx(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 st(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),_):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),_):l(u)}function _(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):l(u)}function a(u){return Ee(u)?s(u):Pe(u)?n.check({tokenize:xx},s,l)(u):l(u)}}function xx(n,s,l){return Ge(n,o,"whitespace");function o(v){return v===null?l(v):s(v)}}function Ex(n){return lm([Xw(),lx(),px(n),vx(),Cx()])}const kx={};function Ax(n){const s=this,l=n||kx,o=s.data(),v=o.micromarkExtensions||(o.micromarkExtensions=[]),b=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),_=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);v.push(Ex(l)),b.push(Yw()),_.push(Ww(l))}const Tx=500;function Dx({settings:n,busy:s=!1,promptPreviews:l,testResult:o,onSave:v,onTest:b,onClose:_}){const[a,u]=de.useState(n),[h,d]=de.useState(n.apiKey??"");return de.useEffect(()=>{u(n),d(n.apiKey??"")},[n]),j.jsx("div",{className:"modal-backdrop",children:j.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[j.jsxs("header",{children:[j.jsxs("div",{children:[j.jsx("h2",{children:"Translation Settings"}),j.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),j.jsx("button",{type:"button",onClick:_,children:"Close"})]}),j.jsxs("div",{className:"translation-settings-grid",children:[j.jsxs("label",{children:[j.jsx("span",{children:"Base URL"}),j.jsx("input",{value:a.baseUrl,onChange:c=>u({...a,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),j.jsxs("label",{children:[j.jsx("span",{children:"API key"}),j.jsx("input",{value:h,onChange:c=>d(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),j.jsxs("label",{children:[j.jsx("span",{children:"Model"}),j.jsx("input",{value:a.model,onChange:c=>u({...a,model:c.target.value})})]}),j.jsxs("label",{children:[j.jsx("span",{children:"Target language"}),j.jsx("input",{value:a.targetLanguage,onChange:c=>u({...a,targetLanguage:c.target.value})})]}),j.jsxs("label",{children:[j.jsx("span",{children:"Use context"}),j.jsx("input",{checked:a.contextEnabled,type:"checkbox",onChange:c=>u({...a,contextEnabled:c.target.checked})})]}),j.jsxs("label",{children:[j.jsx("span",{children:"Timeout ms"}),j.jsx("input",{min:3e3,type:"number",value:a.requestTimeoutMs,onChange:c=>u({...a,requestTimeoutMs:Number(c.target.value)})})]}),j.jsxs("label",{children:[j.jsx("span",{children:"Temperature"}),j.jsx("input",{min:0,max:1,step:.1,type:"number",value:a.temperature,onChange:c=>u({...a,temperature:Number(c.target.value)})})]})]}),j.jsxs("section",{className:"translation-prompt-settings",children:[j.jsxs("header",{children:[j.jsxs("div",{children:[j.jsx("h3",{children:"Translation Prompts"}),j.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),j.jsx("button",{type:"button",disabled:s,onClick:()=>u({...a,prompts:void 0}),children:"Reset prompts"})]}),j.jsx("div",{className:"translation-prompt-stack",children:l.map(c=>j.jsxs("label",{children:[j.jsx("span",{children:c.label}),j.jsx("textarea",{value:Mx(a,c),onChange:C=>u({...a,prompts:Rx(a.prompts,c.key,C.target.value,c.defaultPrompt)})})]},c.key))})]}),o?j.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,j.jsxs("footer",{children:[j.jsx("button",{type:"button",disabled:s,onClick:b,children:"Test Connection"}),j.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 Rx(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 Mx(n,s){var l;return((l=n.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function Lx({active:n=!0,taskSlug:s,role:l,sessionId:o}){const[v,b]=de.useState(null),[_,a]=de.useState([]),[u,h]=de.useState([]),[d,c]=de.useState(""),[C,w]=de.useState(!1),[k,x]=de.useState(!1),[S,g]=de.useState(!1),[p,m]=de.useState("ready"),[E,R]=de.useState(""),[A,L]=de.useState(Date.now()),[T,B]=de.useState(!1),[N,F]=de.useState(""),[G,V]=de.useState(!1),[$,Y]=de.useState([]),[q,Q]=de.useState(),[J,z]=de.useState(0),M=de.useRef(n),O=de.useRef(1),I=de.useRef(null);de.useEffect(()=>{M.current=n},[n]),de.useEffect(()=>{Promise.all([De.getTranslationSettings(),De.getTranslationPrompts()]).then(([_e,Me])=>{b(_e),Y(Me)}).catch(_e=>F(_e.message))},[]),de.useEffect(()=>{a([]),h([]),F(""),m("ready"),R(""),O.current=1;let _e=!1,Me;const ye=()=>{_e||(Me=window.setTimeout(St,M.current?200:1e3))},St=async()=>{if(!_e)try{const $e=await De.pollTranslationSession(o,O.current);if(_e)return;fe($e.events),O.current=$e.nextCursor,m($e.status),M.current&&R(Fx(new Date().toISOString()))}catch($e){_e||F($e instanceof Error?$e.message:"Translation poll failed.")}finally{ye()}};return De.startTranslationSession(s,l).then($e=>{_e||(m($e.status),O.current=$e.nextCursor,St())}).catch($e=>{_e||F($e instanceof Error?$e.message:"Translation start failed.")}),()=>{_e=!0,Me!==void 0&&window.clearTimeout(Me)}},[o,s,l,J]),de.useEffect(()=>{var _e;n&&((_e=I.current)==null||_e.scrollIntoView({block:"nearest"}))},[n,_.length]);const H=zx(_);de.useEffect(()=>{if(!H)return;L(Date.now());const _e=window.setInterval(()=>L(Date.now()),250);return()=>window.clearInterval(_e)},[H]);async function ne(_e=!1){if(v){B(!0),F(""),w(!1);try{const Me=await De.translateUserInput(s,l,{text:d,mode:_e?"auto-send":"review-before-send",useContext:v.contextEnabled,send:_e});g(Me.contextUsed),Me.sent?(c(""),w(!1)):(c(Me.englishPreview),w(!0))}catch(Me){F(Me instanceof Error?Me.message:"Translation failed.")}finally{B(!1)}}}function fe(_e){if(_e.length===0)return;for(const ye of _e)ye.type==="status"?m(ye.status):ye.type==="error"?F(ye.message):ye.type==="failures"&&h(ye.failures);const Me=_e.filter(ye=>ye.type==="entry");Me.length>0&&a(ye=>{const St=Me.reduce((Mt,Ht)=>Ux(Mt,Ht.entry),ye),$e=Nx(St);return $e.removedIds.size>0&&h(Mt=>Mt.filter(Ht=>!$e.removedIds.has(Ht.translationId))),$e.entries})}async function he(){if(d.trim()){B(!0),F("");try{await De.sendTranslatedInput(s,l,{englishText:d}),c(""),w(!1),g(!1)}catch(_e){F(_e instanceof Error?_e.message:"Failed to send English input.")}finally{B(!1)}}}function K(_e){_e.key!=="Enter"||_e.shiftKey||_e.nativeEvent.isComposing||(_e.preventDefault(),!T&&d.trim()&&(C?he():ne(k)))}async function P(_e,Me){B(!0),F("");try{const ye=await De.updateTranslationSettings({..._e,...Me!==void 0?{apiKey:Me}:{}}),St=await De.getTranslationPrompts();b(ye),Y(St),V(!1),z($e=>$e+1)}catch(ye){F(ye instanceof Error?ye.message:"Failed to save translation settings.")}finally{B(!1)}}async function le(){B(!0),F("");try{Q(await De.testTranslationProvider())}catch(_e){F(_e instanceof Error?_e.message:"Provider test failed.")}finally{B(!1)}}async function re(){a([]),h([]),O.current=1,await De.clearTranslationSession(o).catch(_e=>F(_e.message))}async function Se(){B(!0),F("");try{const _e=await De.ignoreTranslationFailures(o);h(_e.failures)}catch(_e){F(_e instanceof Error?_e.message:"Failed to ignore translation failures.")}finally{B(!1)}}async function ge(){B(!0),F("");try{const _e=await De.retryTranslationFailures(o);h(_e.failures)}catch(_e){F(_e instanceof Error?_e.message:"Failed to retry translation failures.")}finally{B(!1)}}if(!v)return j.jsx("aside",{className:"translation-panel",children:j.jsx("p",{className:"muted",children:"Loading translation settings..."})});const Te=Hx(_,p,A),Be=u.length;return j.jsxs("aside",{className:"translation-panel",children:[j.jsxs("header",{className:"translation-panel-header",children:[j.jsxs("div",{className:"translation-panel-titlebar",children:[j.jsx("h2",{children:"Translation"}),j.jsxs("div",{className:"translation-panel-actions",children:[j.jsx("button",{"aria-pressed":k,className:`auto-send-toggle${k?" is-active":""}`,type:"button",onClick:()=>x(_e=>!_e),children:k?"✅ Auto-send":"× Auto-send"}),Be>0?j.jsxs(j.Fragment,{children:[j.jsxs("button",{type:"button",disabled:T,onClick:()=>void Se(),children:["Ignore ",Be]}),j.jsxs("button",{type:"button",disabled:T,onClick:()=>void ge(),children:["Retry ",Be]})]}):null,j.jsx("button",{type:"button",onClick:()=>V(!0),children:"Settings"}),j.jsx("button",{type:"button",onClick:()=>void re(),children:"Clear"})]})]}),j.jsxs("div",{className:"translation-status-row",children:[j.jsxs("p",{children:[v.model," · ",Te,S?" · context used":""]}),j.jsx("p",{children:E?`poll ${E}`:"poll -"})]})]}),N?j.jsx("div",{className:"error-banner",children:N}):null,j.jsxs("div",{className:"translation-entry-list",children:[_.length===0?j.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,_.map(_e=>j.jsx(Ox,{entry:_e},_e.id)),j.jsx("div",{ref:I})]}),j.jsx("div",{className:"translation-composer",children:j.jsxs("div",{className:"translation-composer-row",children:[j.jsx("textarea",{value:d,onChange:_e=>{c(_e.target.value),_e.target.value.trim()||w(!1)},onKeyDown:K,placeholder:"输入中文,先翻译成英文工程指令..."}),j.jsx("div",{className:"translation-composer-actions",children:j.jsx("button",{type:"button",disabled:T||!C||!d.trim(),onClick:()=>void he(),children:"Send English"})})]})}),G?j.jsx(Dx,{settings:v,busy:T,promptPreviews:$,testResult:q,onSave:P,onTest:le,onClose:()=>V(!1)}):null]})}function Ox({entry:n}){if(n.sourceKind==="conversation-boundary")return j.jsx(Bx,{entry:n});const s=Ix(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 j.jsxs("article",{className:v,children:[l?j.jsx("pre",{children:s}):j.jsx("div",{className:"translation-markdown",children:j.jsx(pC,{remarkPlugins:[Ax],children:s})}),n.warning?j.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?j.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function Bx({entry:n}){const s=n.boundaryKind==="end"?"结束":"开始",l=n.conversationTurn??0,o=qx(n.occurredAt??n.createdAt);return j.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${s} 第 ${l} 轮 ${o}`,children:[j.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),j.jsx("span",{children:s}),j.jsxs("span",{children:["第 ",l," 轮"]}),j.jsx("time",{children:o}),j.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function zx(n){const s=n.find(zc);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function Hx(n,s,l){const o=n.find(zc);if(o)return`translating ${Px(Math.max(0,l-jx(o)))}`;const v=n.at(-1);return(v==null?void 0:v.status)==="failed"||s==="failed"?"error":s}function zc(n){return n.status==="queued"||n.status==="translating"}function Nx(n){const s=n.length-Tx;if(s<=0)return{entries:n,removedIds:new Set};const l=new Set;for(const o of n){if(l.size>=s)break;zc(o)||l.add(o.id)}return l.size===0?{entries:n,removedIds:l}:{entries:n.filter(o=>!l.has(o.id)),removedIds:l}}function jx(n){const s=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(s)?s:Date.now()}function Ix(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function Ux(n,s){return n.findIndex(o=>o.id===s.id)===-1?[...n,s]:n.map(o=>o.id===s.id?s:o)}function Px(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 Fx(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function qx(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function Vx({role:n,session:s,permissionMode:l,active:o=!0,busy:v,orchestrationMode:b,translationEnabled:_,onPermissionModeChange:a,onOrchestrationModeChange:u,onStart:h,onResume:d,onStop:c,onRestart:C,onTerminalEvent:w}){const k=b==="auto";return j.jsxs("section",{className:"session-console",children:[j.jsxs("div",{className:"session-console-top",children:[j.jsx(nS,{role:n,session:s,permissionMode:l,busy:v,onPermissionModeChange:a,onStart:h,onResume:d,onStop:c,onRestart:C}),j.jsx("div",{className:"session-console-actions",children:j.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"?j.jsx(Gx,{active:o,onTerminalEvent:w,role:n,session:s,taskSlug:s.taskSlug,translationEnabled:_}):j.jsxs("div",{className:"terminal-empty",children:[j.jsx("strong",{children:n}),j.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 Gx({active:n,onTerminalEvent:s,role:l,session:o,taskSlug:v,translationEnabled:b}){return j.jsxs("div",{className:b?"session-console-body has-translation":"session-console-body",children:[j.jsx("div",{className:"terminal-pane",children:j.jsx(V_,{sessionId:o.id,active:n,onEvent:s},o.id)}),b?j.jsx("div",{className:"translation-pane",children:j.jsx(Lx,{active:n,taskSlug:v,role:l,sessionId:o.id},o.id)}):null]})}function Yx(n,s,l){var b;if(!n||l.mode!=="auto")return null;const o=new Map(n.map(_=>[_.id,_])),v=s.filter(_=>{var a;return _.dispatchingAt?((a=o.get(_.id))==null?void 0:a.dispatchingAt)!==_.dispatchingAt:!1});return v.length===0?null:((b=v.sort(Wx)[v.length-1])==null?void 0:b.toRole)??null}function Wx(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 Kx({task:n,activeRole:s,onTaskChanged:l,onActiveRoleChange:o,onMessagesChanged:v,onOrchestrationChanged:b,onRoundStateChanged:_,onEventsChanged:a}){const[u,h]=de.useState(null),[d,c]=de.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[C,w]=de.useState(!1),[k,x]=de.useState(""),[S,g]=de.useState([]),[p,m]=de.useState(null),[E,R]=de.useState(!1),A=de.useRef(null),L=de.useCallback((Y,q)=>{var z;const Q=((z=A.current)==null?void 0:z.taskSlug)===n.taskSlug?A.current.messages:null,J=Yx(Q,Y,q);A.current={taskSlug:n.taskSlug,messages:Y},m(q),v==null||v(Y),b==null||b(q),J&&(o(J),G(`auto switched to ${J} before VCM dispatch`))},[o,v,b,n.taskSlug]),T=de.useCallback((Y,q,Q,J)=>{h(Y),L(q,Q),_==null||_(J)},[L,_]),B=de.useCallback(async()=>{const[Y,q,Q,J]=await Promise.all([De.getTaskStatus(n.taskSlug),De.listMessages(n.taskSlug),De.getOrchestrationState(n.taskSlug),De.getTaskRoundState(n.taskSlug)]);T(Y,q,Q,J)},[T,n.taskSlug]);de.useEffect(()=>{B().catch(Y=>x(Y.message))},[B]),de.useEffect(()=>{g([]),a==null||a([])},[a,n.taskSlug]),de.useEffect(()=>{c(Y=>{let q=!1;const Q={...Y};for(const J of(u==null?void 0:u.sessions)??[])Q[J.role]!==J.permissionMode&&(Q[J.role]=J.permissionMode,q=!0);return q?Q:Y})},[u==null?void 0:u.sessions]),de.useEffect(()=>{const Y=window.setInterval(()=>{Promise.all([De.getTaskStatus(n.taskSlug),De.listMessages(n.taskSlug),De.getOrchestrationState(n.taskSlug),De.getTaskRoundState(n.taskSlug)]).then(([q,Q,J,z])=>{T(q,Q,J,z)}).catch(q=>x(q.message))},3e3);return()=>window.clearInterval(Y)},[T,n.taskSlug]),de.useEffect(()=>{let Y=!1,q=!1;const Q=window.setInterval(()=>{q||(q=!0,Promise.all([De.listMessages(n.taskSlug),De.getOrchestrationState(n.taskSlug)]).then(([J,z])=>{Y||L(J,z)}).catch(J=>{Y||x(J.message)}).finally(()=>{q=!1}))},200);return()=>{Y=!0,window.clearInterval(Q)}},[L,n.taskSlug]);async function N(Y){w(!0),x("");try{await Y(),await B(),await l()}catch(q){x(q instanceof Error?q.message:"Action failed.")}finally{w(!1)}}async function F(){const Y=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(`
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(`
90
- `);if(window.confirm(Y)){w(!0),x("");try{await De.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),G(`closed ${n.taskSlug}`),await l()}catch(Q){x(Q instanceof Error?Q.message:"Close task failed.")}finally{w(!1)}}}function G(Y){g(q=>{const Q=[...q,`${new Date().toLocaleTimeString()} ${Y}`];return a==null||a(Q),Q})}function V(Y,q){c(Q=>({...Q,[Y]:q}))}async function $(Y){w(!0),x("");try{const q=await De.updateOrchestrationState(n.taskSlug,{mode:Y});m(q),b==null||b(q),G(`auto orchestration ${Y==="auto"?"enabled":"disabled"}`)}catch(q){x(q instanceof Error?q.message:"Failed to update orchestration mode.")}finally{w(!1)}}return j.jsxs("div",{className:"task-workspace",children:[j.jsxs("header",{className:"workspace-header",children:[j.jsx("div",{className:"workspace-title-line",children:j.jsx("h1",{children:n.title||n.taskSlug})}),j.jsx(tS,{activeRole:s,sessions:(u==null?void 0:u.sessions)??[],onSelect:o}),j.jsxs("div",{className:"workspace-header-actions",children:[j.jsx("button",{"aria-pressed":E,className:`translation-toggle${E?" is-active":""}`,type:"button",onClick:()=>R(Y=>!Y),children:E?"✅ Translate":"× Translate"}),j.jsx("button",{className:"danger-button",type:"button",disabled:C,onClick:()=>void F(),children:"Close Task"})]})]}),k?j.jsx("div",{className:"error-banner",children:k}):null,j.jsx("div",{className:"workspace-grid",children:j.jsx("div",{className:"workspace-main",children:j.jsx("div",{className:"role-console-stack",children:fa.map(Y=>{const q=Y.name,Q=q===s,J=G_((u==null?void 0:u.sessions)??[],q);return j.jsx("div",{className:Q?"role-console-panel is-active":"role-console-panel","aria-hidden":!Q,children:j.jsx(Vx,{role:q,session:J,permissionMode:d[q],active:Q,busy:C,orchestrationMode:(p==null?void 0:p.mode)??"manual",translationEnabled:E,onPermissionModeChange:z=>V(q,z),onOrchestrationModeChange:z=>void $(z),onStart:()=>void N(async()=>{await De.startRoleSession(n.taskSlug,q,{cols:100,rows:28,permissionMode:d[q]}),G(`started ${q} with ${d[q]}`)}),onResume:()=>void N(async()=>{await De.resumeRoleSession(n.taskSlug,q,{cols:100,rows:28,permissionMode:d[q]}),G(`resumed ${q} with ${d[q]}`)}),onStop:()=>void N(async()=>{await De.stopRoleSession(n.taskSlug,q),G(`stopped ${q}`)}),onRestart:()=>void N(async()=>{await De.restartRoleSession(n.taskSlug,q,{cols:100,rows:28,permissionMode:d[q]}),G(`restarted ${q} with ${d[q]}`)}),onTerminalEvent:z=>G(`${Y.label}: ${z}`)})},q)})})})})]})}const $x=600*1e3,I_=1400,Xx=3;function Qx(){const[n,s]=de.useState(null),[l,o]=de.useState([]),[v,b]=de.useState(null),[_,a]=de.useState(null),[u,h]=de.useState(null),[d,c]=de.useState([]),[C,w]=de.useState(null),[k,x]=de.useState(null),[S,g]=de.useState(null),[p,m]=de.useState(null),[E,R]=de.useState(null),[A,L]=de.useState("project-manager"),[T,B]=de.useState("system"),[N,F]=de.useState(!0),[G,V]=de.useState(null),[$,Y]=de.useState(!1),[q,Q]=de.useState(!1),[J,z]=de.useState(""),M=de.useRef({}),O=de.useRef(null),I=de.useMemo(()=>k0(d,C),[d,C]),H=de.useCallback(()=>{O.current!==null&&(window.clearInterval(O.current),O.current=null)},[]),ne=de.useCallback(()=>{H(),sa(),O.current=window.setInterval(()=>{sa()},I_)},[H]),fe=de.useCallback(()=>{H(),V(null);let me=1;sa(),O.current=window.setInterval(()=>{me+=1,sa(),me>=Xx&&O.current!==null&&(window.clearInterval(O.current),O.current=null)},I_)},[H]),he=de.useCallback((me,Ae=`manual-${Date.now()}`)=>{V({id:Ae,text:me}),ne()},[ne]),K=de.useCallback(()=>{H(),V(null)},[H]),P=de.useCallback(me=>{I!=null&&I.taskSlug&&x({taskSlug:I.taskSlug,messages:me})},[I==null?void 0:I.taskSlug]),le=de.useCallback(me=>{I!=null&&I.taskSlug&&g({taskSlug:I.taskSlug,orchestration:me})},[I==null?void 0:I.taskSlug]),re=de.useCallback(me=>{I!=null&&I.taskSlug&&m({taskSlug:I.taskSlug,events:me})},[I==null?void 0:I.taskSlug]),Se=de.useCallback(me=>{if(!(I!=null&&I.taskSlug)||me.taskSlug!==I.taskSlug||(R({taskSlug:me.taskSlug,roundState:me}),me.status!=="paused"||!me.pauseId)||M.current[me.taskSlug]===me.pauseId||(M.current[me.taskSlug]=me.pauseId,!N))return;const Xe=me.activeRole??"role";Zx(me)>=$x?he(`No new turn started after ${Xe} stopped.`,me.pauseId):fe()},[I==null?void 0:I.taskSlug,N,fe,he]);async function ge(){const me=await De.listTasks();return c(me),w(Ae=>{var Xe;return Ae&&me.some(Lt=>Lt.taskSlug===Ae)?Ae:((Xe=me[0])==null?void 0:Xe.taskSlug)??null}),me}async function Te(){const me=await De.getHarnessStatus();return b(me),me}async function Be(){const me=await De.getHarnessBootstrapStatus();return a(me),me}async function _e(){const me=await De.getRecentRepositoryPaths();return o(me),me}async function Me(me){const[Ae,Xe]=await Promise.all([De.listMessages(me),De.getOrchestrationState(me)]);x({taskSlug:me,messages:Ae}),g({taskSlug:me,orchestration:Xe})}de.useEffect(()=>{Promise.all([De.getCurrentProject(),De.getRecentRepositoryPaths(),De.getAppPreferences()]).then(async([me,Ae,Xe])=>{s(me),o(Ae),B(Xe.themeMode),F(Xe.flowPauseAlerts),me&&await Promise.all([ge(),Te(),Be()])}).catch(me=>z(me.message))},[]),de.useEffect(()=>{const me=window.matchMedia("(prefers-color-scheme: dark)"),Ae=()=>Y(me.matches);return Ae(),me.addEventListener("change",Ae),()=>me.removeEventListener("change",Ae)},[]),de.useEffect(()=>()=>H(),[H]),de.useEffect(()=>{const me=T==="system"?$?"dark":"light":T;document.documentElement.dataset.theme=me,document.documentElement.dataset.themeMode=T},[$,T]);async function ye(me){Q(!0),z("");try{await me()}catch(Ae){z(Ae instanceof Error?Ae.message:"Action failed.")}finally{Q(!1)}}const St=k&&k.taskSlug===(I==null?void 0:I.taskSlug)?k.messages:[],$e=S&&S.taskSlug===(I==null?void 0:I.taskSlug)?S.orchestration:null,Mt=p&&p.taskSlug===(I==null?void 0:I.taskSlug)?p.events:[],Ht=E&&E.taskSlug===(I==null?void 0:I.taskSlug)?E.roundState:null;return j.jsxs(E0,{sidebar:j.jsx($0,{project:n,recentRepositoryPaths:l,tasks:d,activeTaskSlug:(I==null?void 0:I.taskSlug)??null,messages:St,orchestration:$e,events:Mt,roundState:Ht,harnessStatus:v,harnessBootstrapStatus:_,harnessApplyResult:u,busy:q,onConnect:me=>ye(async()=>{const Ae=await De.connectProject({repoPath:me});s(Ae),h(null),await Promise.all([ge(),Te(),Be(),_e()])}),onRefreshHarness:()=>ye(async()=>{h(null),await Promise.all([Te(),Be()])}),onApplyHarness:()=>ye(async()=>{const me=await De.applyHarness();h(me),await Promise.all([Te(),Be()])}),onStartHarnessBootstrap:()=>ye(async()=>{const me=await De.startHarnessBootstrap();a(me.status)}),onCreateTask:me=>ye(async()=>{const Ae=await De.createTask(me);await ge(),w(Ae.taskSlug)}),onSelectTask:w,themeMode:T,onThemeModeChange:me=>{B(me),ye(async()=>{const Ae=await De.updateAppPreferences({themeMode:me});B(Ae.themeMode),F(Ae.flowPauseAlerts)})},flowPauseAlerts:N,onFlowPauseAlertsChange:me=>{F(me),me&&Jx(),ye(async()=>{const Ae=await De.updateAppPreferences({flowPauseAlerts:me});B(Ae.themeMode),F(Ae.flowPauseAlerts)})},onTryFlowPauseAlert:()=>{he("This is a test flow pause alert.")},onMarkAllMessagesDone:me=>{ye(async()=>{const Ae=await De.markAllMessagesDone(me);x({taskSlug:me,messages:Ae.messages}),await Me(me)})},onDeleteMessageHistory:me=>{ye(async()=>{const Ae=await De.deleteMessageHistory(me);x({taskSlug:me,messages:Ae.messages}),await Me(me)})}}),children:[J?j.jsx("div",{className:"error-banner",children:J}):null,G?j.jsx("div",{className:"flow-pause-alert-backdrop",children:j.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[j.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),j.jsx("h2",{id:"flow-pause-alert-title",children:"Flow paused"}),j.jsx("p",{id:"flow-pause-alert-body",children:G.text}),j.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),j.jsx("button",{type:"button",autoFocus:!0,onClick:K,children:"Confirm"})]})}):null,n&&I?j.jsx(Kx,{task:I,activeRole:A,onTaskChanged:async()=>{await ge()},onActiveRoleChange:L,onMessagesChanged:P,onOrchestrationChanged:le,onRoundStateChanged:Se,onEventsChanged:re}):j.jsxs("section",{className:"empty-workspace",children:[j.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),j.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."})]})]})}let ra=null;function Zx(n){const s=Date.parse(n.startedAt??""),l=Date.parse(n.lastStopAt??"");return!Number.isFinite(s)||!Number.isFinite(l)?0:Math.max(0,l-s)}async function Jx(){const n=Xm();return n?Qm(n):!1}async function sa(){const n=Xm();if(!n||!await Qm(n))return!1;try{const l=n.createGain(),o=n.currentTime+.025;return l.gain.setValueAtTime(.85,n.currentTime),l.connect(n.destination),P_(n,l,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),P_(n,l,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{l.disconnect()},800),!0}catch{return!1}}function Xm(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!ra||ra.state==="closed")&&(ra=new n),ra}catch{return null}}async function Qm(n){if(U_(n))return!0;try{return await n.resume(),U_(n)}catch{return!1}}function U_(n){return n.state==="running"}function P_(n,s,l){const o=n.createGain(),v=n.createOscillator(),b=n.createOscillator(),_=l.startAt+l.duration;o.gain.setValueAtTime(1e-4,l.startAt),o.gain.exponentialRampToValueAtTime(l.peakGain,l.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,_),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(_+.02),b.stop(_+.02)}const Zm=document.getElementById("root");if(!Zm)throw new Error("Missing #root element.");x0.createRoot(Zm).render(j.jsx(de.StrictMode,{children:j.jsx(Qx,{})}));