vibe-coding-master 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -8
- package/dist/backend/adapters/claude-adapter.js +0 -3
- package/dist/backend/adapters/filesystem.js +14 -0
- package/dist/backend/api/round-routes.js +1 -10
- package/dist/backend/api/translation-routes.js +8 -0
- package/dist/backend/runtime/node-pty-runtime.js +21 -1
- package/dist/backend/server.js +9 -9
- package/dist/backend/services/app-settings-service.js +4 -1
- package/dist/backend/services/claude-hook-service.js +36 -0
- package/dist/backend/services/harness-service.js +0 -3
- package/dist/backend/services/round-service.js +309 -57
- package/dist/backend/services/session-service.js +14 -2
- package/dist/backend/services/translation-service.js +280 -13
- package/dist/backend/templates/harness/reviewer-agent.js +2 -0
- package/dist/shared/types/translation.js +1 -0
- package/dist-frontend/assets/index-CfH8XNnx.js +90 -0
- package/dist-frontend/assets/index-CfqduxVB.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/product-design.md +35 -16
- package/package.json +1 -1
- package/scripts/install-vcm-harness.mjs +2 -0
- package/dist-frontend/assets/index-BmpJxnNx.css +0 -32
- package/dist-frontend/assets/index-CGUkhVAP.js +0 -90
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var r0=Object.defineProperty;var s0=(n,s,l)=>s in n?r0(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var Dp=(n,s,l)=>s0(n,typeof s!="symbol"?s+"":s,l);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))o(v);new MutationObserver(v=>{for(const C of v)if(C.type==="childList")for(const _ of C.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&o(_)}).observe(document,{childList:!0,subtree:!0});function l(v){const C={};return v.integrity&&(C.integrity=v.integrity),v.referrerPolicy&&(C.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?C.credentials="include":v.crossOrigin==="anonymous"?C.credentials="omit":C.credentials="same-origin",C}function o(v){if(v.ep)return;v.ep=!0;const C=l(v);fetch(v.href,C)}})();function B_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Du={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 Rp;function l0(){if(Rp)return xs;Rp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,v,C){var _=null;if(C!==void 0&&(_=""+C),v.key!==void 0&&(_=""+v.key),"key"in v){C={};for(var a in v)a!=="key"&&(C[a]=v[a])}else C=v;return v=C.ref,{$$typeof:n,type:o,key:_,ref:v!==void 0?v:null,props:C}}return xs.Fragment=s,xs.jsx=l,xs.jsxs=l,xs}var Lp;function a0(){return Lp||(Lp=1,Du.exports=l0()),Du.exports}var I=a0(),Ru={exports:{}},Te={};/**
|
|
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 Mp;function o0(){if(Mp)return Te;Mp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),C=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"),b=Symbol.iterator;function w(B){return B===null||typeof B!="object"?null:(B=b&&B[b]||B["@@iterator"],typeof B=="function"?B:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function m(B,P,H){this.props=B,this.context=P,this.refs=S,this.updater=H||k}m.prototype.isReactComponent={},m.prototype.setState=function(B,P){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,P,"setState")},m.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function p(){}p.prototype=m.prototype;function g(B,P,H){this.props=B,this.context=P,this.refs=S,this.updater=H||k}var E=g.prototype=new p;E.constructor=g,x(E,m.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function A(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function z(B,P,H){var ie=H.ref;return{$$typeof:n,type:B,key:P,ref:ie!==void 0?ie:null,props:H}}function N(B,P){return z(B.type,P,B.props)}function q(B){return typeof B=="object"&&B!==null&&B.$$typeof===n}function G(B){var P={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(H){return P[H]})}var V=/\/+/g;function Q(B,P){return typeof B=="object"&&B!==null&&B.key!=null?G(""+B.key):P.toString(36)}function Y(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(A,A):(B.status="pending",B.then(function(P){B.status==="pending"&&(B.status="fulfilled",B.value=P)},function(P){B.status==="pending"&&(B.status="rejected",B.reason=P)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function F(B,P,H,ie,fe){var de=typeof B;(de==="undefined"||de==="boolean")&&(B=null);var K=!1;if(B===null)K=!0;else switch(de){case"bigint":case"string":case"number":K=!0;break;case"object":switch(B.$$typeof){case n:case s:K=!0;break;case d:return K=B._init,F(K(B._payload),P,H,ie,fe)}}if(K)return fe=fe(B),K=ie===""?"."+Q(B,0):ie,R(fe)?(H="",K!=null&&(H=K.replace(V,"$&/")+"/"),F(fe,P,H,"",function(Z){return Z})):fe!=null&&(q(fe)&&(fe=N(fe,H+(fe.key==null||B&&B.key===fe.key?"":(""+fe.key).replace(V,"$&/")+"/")+K)),P.push(fe)),1;K=0;var U=ie===""?".":ie+":";if(R(B))for(var le=0;le<B.length;le++)ie=B[le],de=U+Q(ie,le),K+=F(ie,P,H,de,fe);else if(le=w(B),typeof le=="function")for(B=le.call(B),le=0;!(ie=B.next()).done;)ie=ie.value,de=U+Q(ie,le++),K+=F(ie,P,H,de,fe);else if(de==="object"){if(typeof B.then=="function")return F(Y(B),P,H,ie,fe);throw P=String(B),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return K}function X(B,P,H){if(B==null)return B;var ie=[],fe=0;return F(B,ie,"","",function(de){return P.call(H,de,fe++)}),ie}function ee(B){if(B._status===-1){var P=B._result;P=P(),P.then(function(H){(B._status===0||B._status===-1)&&(B._status=1,B._result=H)},function(H){(B._status===0||B._status===-1)&&(B._status=2,B._result=H)}),B._status===-1&&(B._status=0,B._result=P)}if(B._status===1)return B._result.default;throw B._result}var O=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},M={map:X,forEach:function(B,P,H){X(B,function(){P.apply(this,arguments)},H)},count:function(B){var P=0;return X(B,function(){P++}),P},toArray:function(B){return X(B,function(P){return P})||[]},only:function(B){if(!q(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Te.Activity=c,Te.Children=M,Te.Component=m,Te.Fragment=l,Te.Profiler=v,Te.PureComponent=g,Te.StrictMode=o,Te.Suspense=u,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Te.__COMPILER_RUNTIME={__proto__:null,c:function(B){return L.H.useMemoCache(B)}},Te.cache=function(B){return function(){return B.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(B,P,H){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ie=x({},B.props),fe=B.key;if(P!=null)for(de in P.key!==void 0&&(fe=""+P.key),P)!T.call(P,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&P.ref===void 0||(ie[de]=P[de]);var de=arguments.length-2;if(de===1)ie.children=H;else if(1<de){for(var K=Array(de),U=0;U<de;U++)K[U]=arguments[U+2];ie.children=K}return z(B.type,fe,ie)},Te.createContext=function(B){return B={$$typeof:_,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:C,_context:B},B},Te.createElement=function(B,P,H){var ie,fe={},de=null;if(P!=null)for(ie in P.key!==void 0&&(de=""+P.key),P)T.call(P,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(fe[ie]=P[ie]);var K=arguments.length-2;if(K===1)fe.children=H;else if(1<K){for(var U=Array(K),le=0;le<K;le++)U[le]=arguments[le+2];fe.children=U}if(B&&B.defaultProps)for(ie in K=B.defaultProps,K)fe[ie]===void 0&&(fe[ie]=K[ie]);return z(B,de,fe)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(B){return{$$typeof:a,render:B}},Te.isValidElement=q,Te.lazy=function(B){return{$$typeof:d,_payload:{_status:-1,_result:B},_init:ee}},Te.memo=function(B,P){return{$$typeof:h,type:B,compare:P===void 0?null:P}},Te.startTransition=function(B){var P=L.T,H={};L.T=H;try{var ie=B(),fe=L.S;fe!==null&&fe(H,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(A,O)}catch(de){O(de)}finally{P!==null&&H.types!==null&&(P.types=H.types),L.T=P}},Te.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Te.use=function(B){return L.H.use(B)},Te.useActionState=function(B,P,H){return L.H.useActionState(B,P,H)},Te.useCallback=function(B,P){return L.H.useCallback(B,P)},Te.useContext=function(B){return L.H.useContext(B)},Te.useDebugValue=function(){},Te.useDeferredValue=function(B,P){return L.H.useDeferredValue(B,P)},Te.useEffect=function(B,P){return L.H.useEffect(B,P)},Te.useEffectEvent=function(B){return L.H.useEffectEvent(B)},Te.useId=function(){return L.H.useId()},Te.useImperativeHandle=function(B,P,H){return L.H.useImperativeHandle(B,P,H)},Te.useInsertionEffect=function(B,P){return L.H.useInsertionEffect(B,P)},Te.useLayoutEffect=function(B,P){return L.H.useLayoutEffect(B,P)},Te.useMemo=function(B,P){return L.H.useMemo(B,P)},Te.useOptimistic=function(B,P){return L.H.useOptimistic(B,P)},Te.useReducer=function(B,P,H){return L.H.useReducer(B,P,H)},Te.useRef=function(B){return L.H.useRef(B)},Te.useState=function(B){return L.H.useState(B)},Te.useSyncExternalStore=function(B,P,H){return L.H.useSyncExternalStore(B,P,H)},Te.useTransition=function(){return L.H.useTransition()},Te.version="19.2.6",Te}var Op;function fc(){return Op||(Op=1,Ru.exports=o0()),Ru.exports}var me=fc(),Lu={exports:{}},Es={},Mu={exports:{}},Ou={};/**
|
|
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 Bp;function u0(){return Bp||(Bp=1,(function(n){function s(F,X){var ee=F.length;F.push(X);e:for(;0<ee;){var O=ee-1>>>1,M=F[O];if(0<v(M,X))F[O]=X,F[ee]=M,ee=O;else break e}}function l(F){return F.length===0?null:F[0]}function o(F){if(F.length===0)return null;var X=F[0],ee=F.pop();if(ee!==X){F[0]=ee;e:for(var O=0,M=F.length,B=M>>>1;O<B;){var P=2*(O+1)-1,H=F[P],ie=P+1,fe=F[ie];if(0>v(H,ee))ie<M&&0>v(fe,H)?(F[O]=fe,F[ie]=ee,O=ie):(F[O]=H,F[P]=ee,O=P);else if(ie<M&&0>v(fe,ee))F[O]=fe,F[ie]=ee,O=ie;else break e}}return X}function v(F,X){var ee=F.sortIndex-X.sortIndex;return ee!==0?ee:F.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var C=performance;n.unstable_now=function(){return C.now()}}else{var _=Date,a=_.now();n.unstable_now=function(){return _.now()-a}}var u=[],h=[],d=1,c=null,b=3,w=!1,k=!1,x=!1,S=!1,m=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function E(F){for(var X=l(h);X!==null;){if(X.callback===null)o(h);else if(X.startTime<=F)o(h),X.sortIndex=X.expirationTime,s(u,X);else break;X=l(h)}}function R(F){if(x=!1,E(F),!k)if(l(u)!==null)k=!0,A||(A=!0,G());else{var X=l(h);X!==null&&Y(R,X.startTime-F)}}var A=!1,L=-1,T=5,z=-1;function N(){return S?!0:!(n.unstable_now()-z<T)}function q(){if(S=!1,A){var F=n.unstable_now();z=F;var X=!0;try{e:{k=!1,x&&(x=!1,p(L),L=-1),w=!0;var ee=b;try{t:{for(E(F),c=l(u);c!==null&&!(c.expirationTime>F&&N());){var O=c.callback;if(typeof O=="function"){c.callback=null,b=c.priorityLevel;var M=O(c.expirationTime<=F);if(F=n.unstable_now(),typeof M=="function"){c.callback=M,E(F),X=!0;break t}c===l(u)&&o(u),E(F)}else o(u);c=l(u)}if(c!==null)X=!0;else{var B=l(h);B!==null&&Y(R,B.startTime-F),X=!1}}break e}finally{c=null,b=ee,w=!1}X=void 0}}finally{X?G():A=!1}}}var G;if(typeof g=="function")G=function(){g(q)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,Q=V.port2;V.port1.onmessage=q,G=function(){Q.postMessage(null)}}else G=function(){m(q,0)};function Y(F,X){L=m(function(){F(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(F){F.callback=null},n.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<F?Math.floor(1e3/F):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(F){switch(b){case 1:case 2:case 3:var X=3;break;default:X=b}var ee=b;b=X;try{return F()}finally{b=ee}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(F,X){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ee=b;b=F;try{return X()}finally{b=ee}},n.unstable_scheduleCallback=function(F,X,ee){var O=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?O+ee:O):ee=O,F){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ee+M,F={id:d++,callback:X,priorityLevel:F,startTime:ee,expirationTime:M,sortIndex:-1},ee>O?(F.sortIndex=ee,s(h,F),l(u)===null&&F===l(h)&&(x?(p(L),L=-1):x=!0,Y(R,ee-O))):(F.sortIndex=M,s(u,F),k||w||(k=!0,A||(A=!0,G()))),F},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(F){var X=b;return function(){var ee=b;b=X;try{return F.apply(this,arguments)}finally{b=ee}}}})(Ou)),Ou}var zp;function c0(){return zp||(zp=1,Mu.exports=u0()),Mu.exports}var Bu={exports:{}},Tt={};/**
|
|
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 Hp;function h0(){if(Hp)return Tt;Hp=1;var n=fc();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 C(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 Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Tt.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 C(u,h,null,d)},Tt.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()}},Tt.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Tt.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Tt.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var d=h.as,c=a(d,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:b,fetchPriority:w}):d==="script"&&o.d.X(u,{crossOrigin:c,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tt.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var 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)},Tt.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})}},Tt.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)},Tt.requestFormReset=function(u){o.d.r(u)},Tt.unstable_batchedUpdates=function(u,h){return u(h)},Tt.useFormState=function(u,h,d){return _.H.useFormState(u,h,d)},Tt.useFormStatus=function(){return _.H.useHostTransitionStatus()},Tt.version="19.2.6",Tt}var Np;function f0(){if(Np)return Bu.exports;Np=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Bu.exports=h0(),Bu.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 jp;function d0(){if(jp)return Es;jp=1;var n=c0(),s=fc(),l=f0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function C(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(C(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=C(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,r=t;;){var f=i.return;if(f===null)break;var y=f.alternate;if(y===null){if(r=f.return,r!==null){i=r;continue}break}if(f.child===y.child){for(y=f.child;y;){if(y===i)return u(f),e;if(y===r)return u(f),t;y=y.sibling}throw Error(o(188))}if(i.return!==r.return)i=f,r=y;else{for(var D=!1,j=f.child;j;){if(j===i){D=!0,i=f,r=y;break}if(j===r){D=!0,r=f,i=y;break}j=j.sibling}if(!D){for(j=y.child;j;){if(j===i){D=!0,i=y,r=f;break}if(j===r){D=!0,r=y,i=f;break}j=j.sibling}if(!D)throw Error(o(189))}}if(i.alternate!==r)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function 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,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function Q(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 m:return"Profiler";case S:return"StrictMode";case R:return"Suspense";case A:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case g: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:Q(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var Y=Array.isArray,F=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},O=[],M=-1;function B(e){return{current:e}}function P(e){0>M||(e.current=O[M],O[M]=null,M--)}function H(e,t){M++,O[M]=e.current,e.current=t}var ie=B(null),fe=B(null),de=B(null),K=B(null);function U(e,t){switch(H(de,t),H(fe,e),H(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Jd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(ie),H(ie,e)}function le(){P(ie),P(fe),P(de)}function Z(e){e.memoizedState!==null&&H(K,e);var t=ie.current,i=Jd(t,e.type);t!==i&&(H(fe,e),H(ie,i))}function pe(e){fe.current===e&&(P(ie),P(fe)),K.current===e&&(P(K),ys._currentValue=ee)}var _e,Ae;function ue(e){if(_e===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||"",Ae=-1<i.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+_e+e+Ae}var ye=!1;function je(e,t){if(!e||ye)return"";ye=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(se){var re=se}Reflect.construct(e,[],he)}else{try{he.call()}catch(se){re=se}e.call(he.prototype)}}else{try{throw Error()}catch(se){re=se}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(se){if(se&&re&&typeof se.stack=="string")return[se.stack,re.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=r.DetermineComponentFrameRoot(),D=y[0],j=y[1];if(D&&j){var W=D.split(`
|
|
44
|
-
`),ne=j.split(`
|
|
45
|
-
`);for(f=r=0;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;for(;f<ne.length&&!ne[f].includes("DetermineComponentFrameRoot");)f++;if(r===W.length||f===ne.length)for(r=W.length-1,f=ne.length-1;1<=r&&0<=f&&W[r]!==ne[f];)f--;for(;1<=r&&0<=f;r--,f--)if(W[r]!==ne[f]){if(r!==1||f!==1)do if(r--,f--,0>f||W[r]!==ne[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{ye=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ue(i):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return ue(e.type);case 16:return ue("Lazy");case 13:return e.child!==t&&t!==null?ue("Suspense Fallback"):ue("Suspense");case 19:return ue("SuspenseList");case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ue("Activity");default:return""}}function mn(e){try{var t="",i=null;do t+=Ee(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
-
Error generating stack: `+r.message+`
|
|
48
|
-
`+r.stack}}var gn=Object.prototype.hasOwnProperty,vn=n.unstable_scheduleCallback,En=n.unstable_cancelCallback,Gn=n.unstable_shouldYield,At=n.unstable_requestPaint,ot=n.unstable_now,Ot=n.unstable_getCurrentPriorityLevel,ae=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,Re=n.unstable_LowPriority,Be=n.unstable_IdlePriority,mt=n.log,Ve=n.unstable_setDisableYieldValue,bt=null,gt=null;function Bt(e){if(typeof mt=="function"&&Ve(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(bt,e)}catch{}}var Je=Math.clz32?Math.clz32:Vm,Yn=Math.log,hn=Math.LN2;function Vm(e){return e>>>=0,e===0?32:31-(Yn(e)/hn|0)|0}var js=256,Us=262144,Is=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 j=r&134217727;return j!==0?(r=j&~y,r!==0?f=Si(r):(D&=j,D!==0?f=Si(D):i||(i=j&~e,i!==0&&(f=Si(i))))):(j=r&~y,j!==0?f=Si(j):D!==0?f=Si(D):i||(i=r&~e,i!==0&&(f=Si(i)))),f===0?0:t!==0&&t!==f&&(t&y)===0&&(y=f&-f,i=t&-t,y>=i||y===32&&(i&4194048)!==0)?t:f}function Or(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Gm(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mc(){var e=Is;return Is<<=1,(Is&62914560)===0&&(Is=4194304),e}function ma(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 Ym(e,t,i,r,f,y){var D=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var j=e.entanglements,W=e.expirationTimes,ne=e.hiddenUpdates;for(i=D&~i;0<i;){var oe=31-Je(i),he=1<<oe;j[oe]=0,W[oe]=-1;var re=ne[oe];if(re!==null)for(ne[oe]=null,oe=0;oe<re.length;oe++){var se=re[oe];se!==null&&(se.lane&=-536870913)}i&=~he}r!==0&&Oc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(D&~t))}function Oc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Bc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Je(i),f=1<<r;f&t|e[r]&t&&(e[r]|=t),i&=~f}}function zc(e,t){var i=t&-t;return i=(i&42)!==0?1:ga(i),(i&(e.suspendedLanes|t))!==0?0:i}function ga(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 va(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hc(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Cp(e.type))}function Nc(e,t){var i=X.p;try{return X.p=e,t()}finally{X.p=i}}var Wn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Wn,zt="__reactProps$"+Wn,Ii="__reactContainer$"+Wn,Sa="__reactEvents$"+Wn,Wm="__reactListeners$"+Wn,Km="__reactHandles$"+Wn,jc="__reactResources$"+Wn,zr="__reactMarker$"+Wn;function ya(e){delete e[Ct],delete e[zt],delete e[Sa],delete e[Wm],delete e[Km]}function Pi(e){var t=e[Ct];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ii]||i[Ct]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=lp(e);e!==null;){if(i=e[Ct])return i;e=lp(e)}return t}e=i,i=e.parentNode}return null}function Fi(e){if(e=e[Ct]||e[Ii]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function 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[jc];return t||(t=e[jc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[zr]=!0}var Uc=new Set,Ic={};function yi(e,t){Vi(e,t),Vi(e+"Capture",t)}function Vi(e,t){for(Ic[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var Xm=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Pc={},Fc={};function $m(e){return gn.call(Fc,e)?!0:gn.call(Pc,e)?!1:Xm.test(e)?Fc[e]=!0:(Pc[e]=!0,!1)}function Fs(e,t,i){if($m(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function 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 kn(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qm(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,y=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(D){i=""+D,y.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ba(e){if(!e._valueTracker){var t=qc(e)?"checked":"value";e._valueTracker=Qm(e,t,""+e[t])}}function Vc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=qc(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function 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 Zm=/[\n"\\]/g;function en(e){return e.replace(Zm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ca(e,t,i,r,f,y,D,j){e.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.type=D:e.removeAttribute("type"),t!=null?D==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):D!=="submit"&&D!=="reset"||e.removeAttribute("value"),t!=null?wa(e,D,Jt(t)):i!=null?wa(e,D,Jt(i)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+Jt(j):e.removeAttribute("name")}function Gc(e,t,i,r,f,y,D,j){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||i!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){ba(e);return}i=i!=null?""+Jt(i):"",t=t!=null?""+Jt(t):i,j||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=j?e.checked:!!r,e.defaultChecked=!!r,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(e.name=D),ba(e)}function wa(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=""+Jt(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Yc(e,t,i){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Jt(i):""}function Wc(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(o(92));if(Y(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Jt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),ba(e)}function Yi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Jm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Kc(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||Jm.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Xc(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in t)r=t[f],t.hasOwnProperty(f)&&i[f]!==r&&Kc(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&Kc(e,y,t[y])}function xa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var eg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gs(e){return tg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function An(){}var Ea=null;function ka(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,Ki=null;function $c(e){var t=Fi(e);if(t&&(e=t.stateNode)){var i=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ca(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+en(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var f=r[zt]||null;if(!f)throw Error(o(90));Ca(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&Vc(r)}break e;case"textarea":Yc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Gi(e,!!i.multiple,t,!1)}}}var Aa=!1;function Qc(e,t,i){if(Aa)return e(t,i);Aa=!0;try{var r=e(t);return r}finally{if(Aa=!1,(Wi!==null||Ki!==null)&&(Ml(),Wi&&(t=Wi,e=Ki,Ki=Wi=null,$c(t),e)))for(t=0;t<e.length;t++)$c(e[t])}}function Nr(e,t){var i=e.stateNode;if(i===null)return null;var r=i[zt]||null;if(r===null)return null;i=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ta=!1;if(Tn)try{var jr={};Object.defineProperty(jr,"passive",{get:function(){Ta=!0}}),window.addEventListener("test",jr,jr),window.removeEventListener("test",jr,jr)}catch{Ta=!1}var Kn=null,Da=null,Ys=null;function Zc(){if(Ys)return Ys;var e,t=Da,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 Jc(){return!1}function Ht(e){function t(i,r,f,y,D){this._reactName=i,this._targetInst=f,this.type=r,this.nativeEvent=y,this.target=D,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(i=e[j],this[j]=i?i(y):y[j]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ks:Jc,this.isPropagationStopped=Jc,this}return c(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=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},Xs=Ht(bi),Ur=c({},bi,{view:0,detail:0}),ng=Ht(Ur),Ra,La,Ir,$s=c({},Ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oa,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!==Ir&&(Ir&&e.type==="mousemove"?(Ra=e.screenX-Ir.screenX,La=e.screenY-Ir.screenY):La=Ra=0,Ir=e),Ra)},movementY:function(e){return"movementY"in e?e.movementY:La}}),eh=Ht($s),ig=c({},$s,{dataTransfer:0}),rg=Ht(ig),sg=c({},Ur,{relatedTarget:0}),Ma=Ht(sg),lg=c({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),ag=Ht(lg),og=c({},bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ug=Ht(og),cg=c({},bi,{data:0}),th=Ht(cg),hg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dg[e])?!!t[e]:!1}function Oa(){return pg}var _g=c({},Ur,{key:function(e){if(e.key){var t=hg[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"?fg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oa,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}}),mg=Ht(_g),gg=c({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nh=Ht(gg),vg=c({},Ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oa}),Sg=Ht(vg),yg=c({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),bg=Ht(yg),Cg=c({},$s,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wg=Ht(Cg),xg=c({},bi,{newState:0,oldState:0}),Eg=Ht(xg),kg=[9,13,27,32],Ba=Tn&&"CompositionEvent"in window,Pr=null;Tn&&"documentMode"in document&&(Pr=document.documentMode);var Ag=Tn&&"TextEvent"in window&&!Pr,ih=Tn&&(!Ba||Pr&&8<Pr&&11>=Pr),rh=" ",sh=!1;function lh(e,t){switch(e){case"keyup":return kg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ah(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function Tg(e,t){switch(e){case"compositionend":return ah(t);case"keypress":return t.which!==32?null:(sh=!0,rh);case"textInput":return e=t.data,e===rh&&sh?null:e;default:return null}}function Dg(e,t){if(Xi)return e==="compositionend"||!Ba&&lh(e,t)?(e=Zc(),Ys=Da=Kn=null,Xi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ih&&t.locale!=="ko"?null:t.data;default:return null}}var Rg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rg[e.type]:t==="textarea"}function uh(e,t,i,r){Wi?Ki?Ki.push(r):Ki=[r]:Wi=r,t=Ul(t,"onChange"),0<t.length&&(i=new Xs("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var Fr=null,qr=null;function Lg(e){Yd(e,0)}function Qs(e){var t=Hr(e);if(Vc(t))return e}function ch(e,t){if(e==="change")return t}var hh=!1;if(Tn){var za;if(Tn){var Ha="oninput"in document;if(!Ha){var fh=document.createElement("div");fh.setAttribute("oninput","return;"),Ha=typeof fh.oninput=="function"}za=Ha}else za=!1;hh=za&&(!document.documentMode||9<document.documentMode)}function dh(){Fr&&(Fr.detachEvent("onpropertychange",ph),qr=Fr=null)}function ph(e){if(e.propertyName==="value"&&Qs(qr)){var t=[];uh(t,qr,e,ka(e)),Qc(Lg,t)}}function Mg(e,t,i){e==="focusin"?(dh(),Fr=t,qr=i,Fr.attachEvent("onpropertychange",ph)):e==="focusout"&&dh()}function Og(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qs(qr)}function Bg(e,t){if(e==="click")return Qs(t)}function zg(e,t){if(e==="input"||e==="change")return Qs(t)}function Hg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:Hg;function Vr(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var f=i[r];if(!gn.call(t,f)||!Vt(e[f],t[f]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mh(e,t){var i=_h(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=_h(i)}}function gh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=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 Na(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Ng=Tn&&"documentMode"in document&&11>=document.documentMode,$i=null,ja=null,Gr=null,Ua=!1;function Sh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ua||$i==null||$i!==Vs(r)||(r=$i,"selectionStart"in r&&Na(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=Ul(ja,"onSelect"),0<r.length&&(t=new Xs("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=$i)))}function Ci(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Qi={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},Ia={},yh={};Tn&&(yh=document.createElement("div").style,"AnimationEvent"in window||(delete Qi.animationend.animation,delete Qi.animationiteration.animation,delete Qi.animationstart.animation),"TransitionEvent"in window||delete Qi.transitionend.transition);function wi(e){if(Ia[e])return Ia[e];if(!Qi[e])return e;var t=Qi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in yh)return Ia[e]=t[i];return e}var bh=wi("animationend"),Ch=wi("animationiteration"),wh=wi("animationstart"),jg=wi("transitionrun"),Ug=wi("transitionstart"),Ig=wi("transitioncancel"),xh=wi("transitionend"),Eh=new Map,Pa="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(" ");Pa.push("scrollEnd");function fn(e,t){Eh.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)},tn=[],Zi=0,Fa=0;function Js(){for(var e=Zi,t=Fa=Zi=0;t<e;){var i=tn[t];tn[t++]=null;var r=tn[t];tn[t++]=null;var f=tn[t];tn[t++]=null;var y=tn[t];if(tn[t++]=null,r!==null&&f!==null){var D=r.pending;D===null?f.next=f:(f.next=D.next,D.next=f),r.pending=f}y!==0&&kh(i,f,y)}}function el(e,t,i,r){tn[Zi++]=e,tn[Zi++]=t,tn[Zi++]=i,tn[Zi++]=r,Fa|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function qa(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 kh(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var f=!1,y=e.return;y!==null;)y.childLanes|=i,r=y.alternate,r!==null&&(r.childLanes|=i),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(f=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,f&&t!==null&&(f=31-Je(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,Jo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ji={};function Pg(e,t,i,r){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,i,r){return new Pg(e,t,i,r)}function Va(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dn(e,t){var i=e.alternate;return i===null?(i=Gt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Ah(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function nl(e,t,i,r,f,y){var D=0;if(r=e,typeof e=="function")Va(e)&&(D=1);else if(typeof e=="string")D=Yv(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case z:return e=Gt(31,i,t,f),e.elementType=z,e.lanes=y,e;case x:return Ei(i.children,f,y,t);case S:D=8,f|=24;break;case m:return e=Gt(12,i,t,f|2),e.elementType=m,e.lanes=y,e;case R:return e=Gt(13,i,t,f),e.elementType=R,e.lanes=y,e;case A:return e=Gt(19,i,t,f),e.elementType=A,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:D=10;break e;case 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=Gt(D,i,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function Ei(e,t,i,r){return e=Gt(7,e,r,t),e.lanes=i,e}function Ga(e,t,i){return e=Gt(6,e,null,t),e.lanes=i,e}function Th(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function Ya(e,t,i){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Dh=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var i=Dh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:mn(t)},Dh.set(e,t),t)}return{value:e,source:t,stack:mn(t)}}var er=[],tr=0,il=null,Yr=0,rn=[],sn=0,Xn=null,Sn=1,yn="";function Rn(e,t){er[tr++]=Yr,er[tr++]=il,il=e,Yr=t}function Rh(e,t,i){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Xn=e;var r=Sn;e=yn;var f=32-Je(r)-1;r&=~(1<<f),i+=1;var y=32-Je(t)+f;if(30<y){var D=f-f%5;y=(r&(1<<D)-1).toString(32),r>>=D,f-=D,Sn=1<<32-Je(t)+f|i<<f|r,yn=y+e}else Sn=1<<y|i<<f|r,yn=e}function Wa(e){e.return!==null&&(Rn(e,1),Rh(e,1,0))}function Ka(e){for(;e===il;)il=er[--tr],er[tr]=null,Yr=er[--tr],er[tr]=null;for(;e===Xn;)Xn=rn[--sn],rn[sn]=null,yn=rn[--sn],rn[sn]=null,Sn=rn[--sn],rn[sn]=null}function Lh(e,t){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Sn=t.id,yn=t.overflow,Xn=e}var wt=null,it=null,Pe=!1,$n=null,ln=!1,Xa=Error(o(519));function Qn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wr(nn(t,e)),Xa}function Mh(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[zt]=r,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<_s.length;i++)He(_s[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),Gc(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),Wc(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||$d(t.textContent,i)?(r.popover!=null&&(He("beforetoggle",t),He("toggle",t)),r.onScroll!=null&&He("scroll",t),r.onScrollEnd!=null&&He("scrollend",t),r.onClick!=null&&(t.onclick=An),t=!0):t=!1,t||Qn(e,!0)}function Oh(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:ln=!1;return;case 27:case 3:ln=!0;return;default:wt=wt.return}}function nr(e){if(e!==wt)return!1;if(!Pe)return Oh(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||pu(e.type,e.memoizedProps)),i=!i),i&&it&&Qn(e),Oh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=sp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=sp(e)}else t===27?(t=it,hi(e.type)?(e=Su,Su=null,it=e):it=t):it=wt?on(e.stateNode.nextSibling):null;return!0}function ki(){it=wt=null,Pe=!1}function $a(){var e=$n;return e!==null&&(It===null?It=e:It.push.apply(It,e),$n=null),e}function Wr(e){$n===null?$n=[e]:$n.push(e)}var Qa=B(null),Ai=null,Ln=null;function Zn(e,t,i){H(Qa,t._currentValue),t._currentValue=i}function Mn(e){e._currentValue=Qa.current,P(Qa)}function Za(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 Ja(e,t,i,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var y=f.dependencies;if(y!==null){var D=f.child;y=y.firstContext;e:for(;y!==null;){var j=y;y=f;for(var W=0;W<t.length;W++)if(j.context===t[W]){y.lanes|=i,j=y.alternate,j!==null&&(j.lanes|=i),Za(y.return,i,e),r||(D=null);break e}y=j.next}}else if(f.tag===18){if(D=f.return,D===null)throw Error(o(341));D.lanes|=i,y=D.alternate,y!==null&&(y.lanes|=i),Za(D,i,e),D=null}else D=f.child;if(D!==null)D.return=f;else for(D=f;D!==null;){if(D===e){D=null;break}if(f=D.sibling,f!==null){f.return=D.return,D=f;break}D=D.return}f=D}}function ir(e,t,i,r){e=null;for(var f=t,y=!1;f!==null;){if(!y){if((f.flags&524288)!==0)y=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var D=f.alternate;if(D===null)throw Error(o(387));if(D=D.memoizedProps,D!==null){var j=f.type;Vt(f.pendingProps.value,D.value)||(e!==null?e.push(j):e=[j])}}else if(f===K.current){if(D=f.alternate,D===null)throw Error(o(387));D.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(ys):e=[ys])}f=f.return}e!==null&&Ja(t,e,i,r),t.flags|=262144}function rl(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ti(e){Ai=e,Ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Bh(Ai,e)}function sl(e,t){return Ai===null&&Ti(e),Bh(e,t)}function Bh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ln===null){if(e===null)throw Error(o(308));Ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ln=Ln.next=t;return i}var Fg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},qg=n.unstable_scheduleCallback,Vg=n.unstable_NormalPriority,ht={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eo(){return{controller:new Fg,data:new Map,refCount:0}}function Kr(e){e.refCount--,e.refCount===0&&qg(Vg,function(){e.controller.abort()})}var Xr=null,to=0,rr=0,sr=null;function Gg(e,t){if(Xr===null){var i=Xr=[];to=0,rr=su(),sr={status:"pending",value:void 0,then:function(r){i.push(r)}}}return to++,t.then(zh,zh),t}function zh(){if(--to===0&&Xr!==null){sr!==null&&(sr.status="fulfilled");var e=Xr;Xr=null,rr=0,sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Yg(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),r}var Hh=F.S;F.S=function(e,t){yd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Gg(e,t),Hh!==null&&Hh(e,t)};var Di=B(null);function no(){var e=Di.current;return e!==null?e:et.pooledCache}function ll(e,t){t===null?H(Di,Di.current):H(Di,t.pool)}function Nh(){var e=no();return e===null?null:{parent:ht._currentValue,pool:e}}var lr=Error(o(460)),io=Error(o(474)),al=Error(o(542)),ol={then:function(){}};function jh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(An,An),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ph(e),e;default:if(typeof t.status=="string")t.then(An,An);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=r}},function(r){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ph(e),e}throw Li=t,lr}}function Ri(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Li=i,lr):i}}var Li=null;function Ih(){if(Li===null)throw Error(o(459));var e=Li;return Li=null,e}function Ph(e){if(e===lr||e===al)throw Error(o(483))}var ar=null,$r=0;function ul(e){var t=$r;return $r+=1,ar===null&&(ar=[]),Uh(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===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Fh(e){function t(J,$){if(e){var te=J.deletions;te===null?(J.deletions=[$],J.flags|=16):te.push($)}}function i(J,$){if(!e)return null;for(;$!==null;)t(J,$),$=$.sibling;return null}function r(J){for(var $=new Map;J!==null;)J.key!==null?$.set(J.key,J):$.set(J.index,J),J=J.sibling;return $}function f(J,$){return J=Dn(J,$),J.index=0,J.sibling=null,J}function y(J,$,te){return J.index=te,e?(te=J.alternate,te!==null?(te=te.index,te<$?(J.flags|=67108866,$):te):(J.flags|=67108866,$)):(J.flags|=1048576,$)}function D(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function j(J,$,te,ce){return $===null||$.tag!==6?($=Ga(te,J.mode,ce),$.return=J,$):($=f($,te),$.return=J,$)}function W(J,$,te,ce){var we=te.type;return we===x?oe(J,$,te.props.children,ce,te.key):$!==null&&($.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===T&&Ri(we)===$.type)?($=f($,te.props),Qr($,te),$.return=J,$):($=nl(te.type,te.key,te.props,null,J.mode,ce),Qr($,te),$.return=J,$)}function ne(J,$,te,ce){return $===null||$.tag!==4||$.stateNode.containerInfo!==te.containerInfo||$.stateNode.implementation!==te.implementation?($=Ya(te,J.mode,ce),$.return=J,$):($=f($,te.children||[]),$.return=J,$)}function oe(J,$,te,ce,we){return $===null||$.tag!==7?($=Ei(te,J.mode,ce,we),$.return=J,$):($=f($,te),$.return=J,$)}function he(J,$,te){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Ga(""+$,J.mode,te),$.return=J,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case w:return te=nl($.type,$.key,$.props,null,J.mode,te),Qr(te,$),te.return=J,te;case k:return $=Ya($,J.mode,te),$.return=J,$;case T:return $=Ri($),he(J,$,te)}if(Y($)||G($))return $=Ei($,J.mode,te,null),$.return=J,$;if(typeof $.then=="function")return he(J,ul($),te);if($.$$typeof===g)return he(J,sl(J,$),te);cl(J,$)}return null}function re(J,$,te,ce){var we=$!==null?$.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return we!==null?null:j(J,$,""+te,ce);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case w:return te.key===we?W(J,$,te,ce):null;case k:return te.key===we?ne(J,$,te,ce):null;case T:return te=Ri(te),re(J,$,te,ce)}if(Y(te)||G(te))return we!==null?null:oe(J,$,te,ce,null);if(typeof te.then=="function")return re(J,$,ul(te),ce);if(te.$$typeof===g)return re(J,$,sl(J,te),ce);cl(J,te)}return null}function se(J,$,te,ce,we){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return J=J.get(te)||null,j($,J,""+ce,we);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case w:return J=J.get(ce.key===null?te:ce.key)||null,W($,J,ce,we);case k:return J=J.get(ce.key===null?te:ce.key)||null,ne($,J,ce,we);case T:return ce=Ri(ce),se(J,$,te,ce,we)}if(Y(ce)||G(ce))return J=J.get(te)||null,oe($,J,ce,we,null);if(typeof ce.then=="function")return se(J,$,te,ul(ce),we);if(ce.$$typeof===g)return se(J,$,te,sl($,ce),we);cl($,ce)}return null}function Se(J,$,te,ce){for(var we=null,Ge=null,be=$,Me=$=0,Ie=null;be!==null&&Me<te.length;Me++){be.index>Me?(Ie=be,be=null):Ie=be.sibling;var Ye=re(J,be,te[Me],ce);if(Ye===null){be===null&&(be=Ie);break}e&&be&&Ye.alternate===null&&t(J,be),$=y(Ye,$,Me),Ge===null?we=Ye:Ge.sibling=Ye,Ge=Ye,be=Ie}if(Me===te.length)return i(J,be),Pe&&Rn(J,Me),we;if(be===null){for(;Me<te.length;Me++)be=he(J,te[Me],ce),be!==null&&($=y(be,$,Me),Ge===null?we=be:Ge.sibling=be,Ge=be);return Pe&&Rn(J,Me),we}for(be=r(be);Me<te.length;Me++)Ie=se(be,J,Me,te[Me],ce),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?Me:Ie.key),$=y(Ie,$,Me),Ge===null?we=Ie:Ge.sibling=Ie,Ge=Ie);return e&&be.forEach(function(mi){return t(J,mi)}),Pe&&Rn(J,Me),we}function ke(J,$,te,ce){if(te==null)throw Error(o(151));for(var we=null,Ge=null,be=$,Me=$=0,Ie=null,Ye=te.next();be!==null&&!Ye.done;Me++,Ye=te.next()){be.index>Me?(Ie=be,be=null):Ie=be.sibling;var mi=re(J,be,Ye.value,ce);if(mi===null){be===null&&(be=Ie);break}e&&be&&mi.alternate===null&&t(J,be),$=y(mi,$,Me),Ge===null?we=mi:Ge.sibling=mi,Ge=mi,be=Ie}if(Ye.done)return i(J,be),Pe&&Rn(J,Me),we;if(be===null){for(;!Ye.done;Me++,Ye=te.next())Ye=he(J,Ye.value,ce),Ye!==null&&($=y(Ye,$,Me),Ge===null?we=Ye:Ge.sibling=Ye,Ge=Ye);return Pe&&Rn(J,Me),we}for(be=r(be);!Ye.done;Me++,Ye=te.next())Ye=se(be,J,Me,Ye.value,ce),Ye!==null&&(e&&Ye.alternate!==null&&be.delete(Ye.key===null?Me:Ye.key),$=y(Ye,$,Me),Ge===null?we=Ye:Ge.sibling=Ye,Ge=Ye);return e&&be.forEach(function(i0){return t(J,i0)}),Pe&&Rn(J,Me),we}function Ze(J,$,te,ce){if(typeof te=="object"&&te!==null&&te.type===x&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case w:e:{for(var we=te.key;$!==null;){if($.key===we){if(we=te.type,we===x){if($.tag===7){i(J,$.sibling),ce=f($,te.props.children),ce.return=J,J=ce;break e}}else if($.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===T&&Ri(we)===$.type){i(J,$.sibling),ce=f($,te.props),Qr(ce,te),ce.return=J,J=ce;break e}i(J,$);break}else t(J,$);$=$.sibling}te.type===x?(ce=Ei(te.props.children,J.mode,ce,te.key),ce.return=J,J=ce):(ce=nl(te.type,te.key,te.props,null,J.mode,ce),Qr(ce,te),ce.return=J,J=ce)}return D(J);case k:e:{for(we=te.key;$!==null;){if($.key===we)if($.tag===4&&$.stateNode.containerInfo===te.containerInfo&&$.stateNode.implementation===te.implementation){i(J,$.sibling),ce=f($,te.children||[]),ce.return=J,J=ce;break e}else{i(J,$);break}else t(J,$);$=$.sibling}ce=Ya(te,J.mode,ce),ce.return=J,J=ce}return D(J);case T:return te=Ri(te),Ze(J,$,te,ce)}if(Y(te))return Se(J,$,te,ce);if(G(te)){if(we=G(te),typeof we!="function")throw Error(o(150));return te=we.call(te),ke(J,$,te,ce)}if(typeof te.then=="function")return Ze(J,$,ul(te),ce);if(te.$$typeof===g)return Ze(J,$,sl(J,te),ce);cl(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,$!==null&&$.tag===6?(i(J,$.sibling),ce=f($,te),ce.return=J,J=ce):(i(J,$),ce=Ga(te,J.mode,ce),ce.return=J,J=ce),D(J)):i(J,$)}return function(J,$,te,ce){try{$r=0;var we=Ze(J,$,te,ce);return ar=null,we}catch(be){if(be===lr||be===al)throw be;var Ge=Gt(29,be,null,J.mode);return Ge.lanes=ce,Ge.return=J,Ge}finally{}}}var Mi=Fh(!0),qh=Fh(!1),Jn=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function so(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,(We&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),kh(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,Bc(e,i)}}function lo(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 ao=!1;function Jr(){if(ao){var e=sr;if(e!==null)throw e}}function es(e,t,i,r){ao=!1;var f=e.updateQueue;Jn=!1;var y=f.firstBaseUpdate,D=f.lastBaseUpdate,j=f.shared.pending;if(j!==null){f.shared.pending=null;var W=j,ne=W.next;W.next=null,D===null?y=ne:D.next=ne,D=W;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,j=oe.lastBaseUpdate,j!==D&&(j===null?oe.firstBaseUpdate=ne:j.next=ne,oe.lastBaseUpdate=W))}if(y!==null){var he=f.baseState;D=0,oe=ne=W=null,j=y;do{var re=j.lane&-536870913,se=re!==j.lane;if(se?(Ue&re)===re:(r&re)===re){re!==0&&re===rr&&(ao=!0),oe!==null&&(oe=oe.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Se=e,ke=j;re=t;var Ze=i;switch(ke.tag){case 1:if(Se=ke.payload,typeof Se=="function"){he=Se.call(Ze,he,re);break e}he=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ke.payload,re=typeof Se=="function"?Se.call(Ze,he,re):Se,re==null)break e;he=c({},he,re);break e;case 2:Jn=!0}}re=j.callback,re!==null&&(e.flags|=64,se&&(e.flags|=8192),se=f.callbacks,se===null?f.callbacks=[re]:se.push(re))}else se={lane:re,tag:j.tag,payload:j.payload,callback:j.callback,next:null},oe===null?(ne=oe=se,W=he):oe=oe.next=se,D|=re;if(j=j.next,j===null){if(j=f.shared.pending,j===null)break;se=j,j=se.next,se.next=null,f.lastBaseUpdate=se,f.shared.pending=null}}while(!0);oe===null&&(W=he),f.baseState=W,f.firstBaseUpdate=ne,f.lastBaseUpdate=oe,y===null&&(f.shared.lanes=0),li|=D,e.lanes=D,e.memoizedState=he}}function Vh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Gh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Vh(i[e],t)}var or=B(null),hl=B(0);function Yh(e,t){e=Pn,H(hl,e),H(or,t),Pn=e|t.baseLanes}function oo(){H(hl,Pn),H(or,or.current)}function uo(){Pn=hl.current,P(or),P(hl)}var Yt=B(null),an=null;function ni(e){var t=e.alternate;H(ut,ut.current&1),H(Yt,e),an===null&&(t===null||or.current!==null||t.memoizedState!==null)&&(an=e)}function co(e){H(ut,ut.current),H(Yt,e),an===null&&(an=e)}function Wh(e){e.tag===22?(H(ut,ut.current),H(Yt,e),an===null&&(an=e)):ii()}function ii(){H(ut,ut.current),H(Yt,Yt.current)}function Wt(e){P(Yt),an===e&&(an=null),P(ut)}var ut=B(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||gu(i)||vu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var On=0,Le=null,$e=null,ft=null,dl=!1,ur=!1,Oi=!1,pl=0,ts=0,cr=null,Wg=0;function lt(){throw Error(o(321))}function ho(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Vt(e[i],t[i]))return!1;return!0}function fo(e,t,i,r,f,y){return On=y,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Lf:To,Oi=!1,y=i(r,f),Oi=!1,ur&&(y=Xh(t,i,r,f)),Kh(e),y}function Kh(e){F.H=rs;var t=$e!==null&&$e.next!==null;if(On=0,ft=$e=Le=null,dl=!1,ts=0,cr=null,t)throw Error(o(300));e===null||dt||(e=e.dependencies,e!==null&&rl(e)&&(dt=!0))}function Xh(e,t,i,r){Le=e;var f=0;do{if(ur&&(cr=null),ts=0,ur=!1,25<=f)throw Error(o(301));if(f+=1,ft=$e=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}F.H=Mf,y=t(i,r)}while(ur);return y}function Kg(){var e=F.H,t=e.useState()[0];return t=typeof t.then=="function"?ns(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Le.flags|=1024),t}function po(){var e=pl!==0;return pl=0,e}function _o(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function mo(e){if(dl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}dl=!1}On=0,ft=$e=Le=null,ur=!1,ts=pl=0,cr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Le.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if($e===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=ft===null?Le.memoizedState:ft.next;if(t!==null)ft=t,$e=e;else{if(e===null)throw Le.alternate===null?Error(o(467)):Error(o(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},ft===null?Le.memoizedState=ft=e:ft=ft.next=e}return ft}function _l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ns(e){var t=ts;return ts+=1,cr===null&&(cr=[]),e=Uh(cr,e,t),t=Le,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Lf:To),e}function ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ns(e);if(e.$$typeof===g)return xt(e)}throw Error(o(438,String(e)))}function go(e){var t=null,i=Le.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=Le.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(),Le.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=N;return t.index++,i}function Bn(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=ct();return vo(t,$e,e)}function vo(e,t,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var f=e.baseQueue,y=r.pending;if(y!==null){if(f!==null){var D=f.next;f.next=y.next,y.next=D}t.baseQueue=f=y,r.pending=null}if(y=e.baseState,f===null)e.memoizedState=y;else{t=f.next;var j=D=null,W=null,ne=t,oe=!1;do{var he=ne.lane&-536870913;if(he!==ne.lane?(Ue&he)===he:(On&he)===he){var re=ne.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),he===rr&&(oe=!0);else if((On&re)===re){ne=ne.next,re===rr&&(oe=!0);continue}else he={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},W===null?(j=W=he,D=y):W=W.next=he,Le.lanes|=re,li|=re;he=ne.action,Oi&&i(y,he),y=ne.hasEagerState?ne.eagerState:i(y,he)}else re={lane:he,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},W===null?(j=W=re,D=y):W=W.next=re,Le.lanes|=he,li|=he;ne=ne.next}while(ne!==null&&ne!==t);if(W===null?D=y:W.next=j,!Vt(y,e.memoizedState)&&(dt=!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 So(e){var t=ct(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,f=i.pending,y=t.memoizedState;if(f!==null){i.pending=null;var D=f=f.next;do y=e(y,D.action),D=D.next;while(D!==f);Vt(y,t.memoizedState)||(dt=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,r]}function $h(e,t,i){var r=Le,f=ct(),y=Pe;if(y){if(i===void 0)throw Error(o(407));i=i()}else i=t();var D=!Vt(($e||f).memoizedState,i);if(D&&(f.memoizedState=i,dt=!0),f=f.queue,Co(Jh.bind(null,r,f,e),[e]),f.getSnapshot!==t||D||ft!==null&&ft.memoizedState.tag&1){if(r.flags|=2048,hr(9,{destroy:void 0},Zh.bind(null,r,f,i,t),null),et===null)throw Error(o(349));y||(On&127)!==0||Qh(r,t,i)}return i}function Qh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Le.updateQueue,t===null?(t=_l(),Le.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Zh(e,t,i,r){t.value=i,t.getSnapshot=r,ef(t)&&tf(e)}function Jh(e,t,i){return i(function(){ef(t)&&tf(e)})}function ef(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Vt(e,i)}catch{return!0}}function tf(e){var t=xi(e,2);t!==null&&Pt(t,e,2)}function yo(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),Oi){Bt(!0);try{i()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function nf(e,t,i,r){return e.baseState=i,vo(e,$e,typeof r=="function"?r:Bn)}function Xg(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)}};F.T!==null?i(!0):y.isTransition=!1,r(y),i=t.pending,i===null?(y.next=t.pending=y,rf(t,y)):(y.next=i.next,t.pending=i.next=y)}}function rf(e,t){var i=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=F.T,D={};F.T=D;try{var j=i(f,r),W=F.S;W!==null&&W(D,j),sf(e,t,j)}catch(ne){bo(e,t,ne)}finally{y!==null&&D.types!==null&&(y.types=D.types),F.T=y}}else try{y=i(f,r),sf(e,t,y)}catch(ne){bo(e,t,ne)}}function sf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){lf(e,t,r)},function(r){return bo(e,t,r)}):lf(e,t,i)}function lf(e,t,i){t.status="fulfilled",t.value=i,af(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,rf(e,i)))}function bo(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,af(t),t=t.next;while(t!==r)}e.action=null}function af(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function of(e,t){return t}function uf(e,t){if(Pe){var i=et.formState;if(i!==null){e:{var r=Le;if(Pe){if(it){t:{for(var f=it,y=ln;f.nodeType!==8;){if(!y){f=null;break t}if(f=on(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){it=on(f.nextSibling),r=f.data==="F!";break e}}Qn(r)}r=!1}r&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:of,lastRenderedState:t},i.queue=r,i=Tf.bind(null,Le,r),r.dispatch=i,r=yo(!1),y=Ao.bind(null,Le,!1,r.queue),r=Lt(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,i=Xg.bind(null,Le,f,y,i),f.dispatch=i,r.memoizedState=e,[t,i,!1]}function cf(e){var t=ct();return hf(t,$e,e)}function hf(e,t,i){if(t=vo(e,t,of)[0],e=gl(Bn)[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=ct();var f=t.queue,y=f.dispatch;return i!==t.memoizedState&&(Le.flags|=2048,hr(9,{destroy:void 0},$g.bind(null,f,i),null)),[r,y,e]}function $g(e,t){e.action=t}function ff(e){var t=ct(),i=$e;if(i!==null)return hf(t,i,e);ct(),t=t.memoizedState,i=ct();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function hr(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=Le.updateQueue,t===null&&(t=_l(),Le.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function df(){return ct().memoizedState}function vl(e,t,i,r){var f=Lt();Le.flags|=e,f.memoizedState=hr(1|t,{destroy:void 0},i,r===void 0?null:r)}function Sl(e,t,i,r){var f=ct();r=r===void 0?null:r;var y=f.memoizedState.inst;$e!==null&&r!==null&&ho(r,$e.memoizedState.deps)?f.memoizedState=hr(t,y,i,r):(Le.flags|=e,f.memoizedState=hr(1|t,y,i,r))}function pf(e,t){vl(8390656,8,e,t)}function Co(e,t){Sl(2048,8,e,t)}function Qg(e){Le.flags|=4;var t=Le.updateQueue;if(t===null)t=_l(),Le.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function _f(e){var t=ct().memoizedState;return Qg({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function mf(e,t){return Sl(4,2,e,t)}function gf(e,t){return Sl(4,4,e,t)}function vf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sf(e,t,i){i=i!=null?i.concat([e]):null,Sl(4,4,vf.bind(null,t,e),i)}function wo(){}function yf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&ho(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function bf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&ho(t,r[1]))return r[0];if(r=e(),Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r}function xo(e,t,i){return i===void 0||(On&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Cd(),Le.lanes|=e,li|=e,i)}function Cf(e,t,i,r){return Vt(i,t)?i:or.current!==null?(e=xo(e,i,r),Vt(e,t)||(dt=!0),e):(On&42)===0||(On&1073741824)!==0&&(Ue&261930)===0?(dt=!0,e.memoizedState=i):(e=Cd(),Le.lanes|=e,li|=e,t)}function wf(e,t,i,r,f){var y=X.p;X.p=y!==0&&8>y?y:8;var D=F.T,j={};F.T=j,Ao(e,!1,t,i);try{var W=f(),ne=F.S;if(ne!==null&&ne(j,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var oe=Yg(W,r);is(e,t,oe,$t(e))}else is(e,t,r,$t(e))}catch(he){is(e,t,{then:function(){},status:"rejected",reason:he},$t())}finally{X.p=y,D!==null&&j.types!==null&&(D.types=j.types),F.T=D}}function Zg(){}function Eo(e,t,i,r){if(e.tag!==5)throw Error(o(476));var f=xf(e).queue;wf(e,f,t,ee,i===null?Zg:function(){return Ef(e),i(r)})}function xf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:ee},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ef(e){var t=xf(e);t.next===null&&(t=e.alternate.memoizedState),is(e,t.next.queue,{},$t())}function ko(){return xt(ys)}function kf(){return ct().memoizedState}function Af(){return ct().memoizedState}function Jg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=$t();e=ei(i);var r=ti(t,e,i);r!==null&&(Pt(r,t,i),Zr(r,t,i)),t={cache:eo()},e.payload=t;return}t=t.return}}function ev(e,t,i){var r=$t();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yl(e)?Df(t,i):(i=qa(e,t,i,r),i!==null&&(Pt(i,e,r),Rf(i,t,r)))}function Tf(e,t,i){var r=$t();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))Df(t,f);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=t.lastRenderedReducer,y!==null))try{var D=t.lastRenderedState,j=y(D,i);if(f.hasEagerState=!0,f.eagerState=j,Vt(j,D))return el(e,t,f,0),et===null&&Js(),!1}catch{}finally{}if(i=qa(e,t,f,r),i!==null)return Pt(i,e,r),Rf(i,t,r),!0}return!1}function Ao(e,t,i,r){if(r={lane:2,revertLane:su(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},yl(e)){if(t)throw Error(o(479))}else t=qa(e,i,r,2),t!==null&&Pt(t,e,2)}function yl(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function Df(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 Rf(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Bc(e,i)}}var rs={readContext:xt,use:ml,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};rs.useEffectEvent=lt;var Lf={readContext:xt,use:ml,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:pf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,vl(4194308,4,vf.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=Lt();t=t===void 0?null:t;var r=e();if(Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Lt();if(i!==void 0){var f=i(t);if(Oi){Bt(!0);try{i(t)}finally{Bt(!1)}}}else f=t;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=ev.bind(null,Le,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=yo(e);var t=e.queue,i=Tf.bind(null,Le,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:wo,useDeferredValue:function(e,t){var i=Lt();return xo(i,e,t)},useTransition:function(){var e=yo(!1);return e=wf.bind(null,Le,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=Le,f=Lt();if(Pe){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),et===null)throw Error(o(349));(Ue&127)!==0||Qh(r,t,i)}f.memoizedState=i;var y={value:i,getSnapshot:t};return f.queue=y,pf(Jh.bind(null,r,y,e),[e]),r.flags|=2048,hr(9,{destroy:void 0},Zh.bind(null,r,y,i,t),null),i},useId:function(){var e=Lt(),t=et.identifierPrefix;if(Pe){var i=yn,r=Sn;i=(r&~(1<<32-Je(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=pl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Wg++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ko,useFormState:uf,useActionState:uf,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ao.bind(null,Le,!0,i),i.dispatch=t,[e,t]},useMemoCache:go,useCacheRefresh:function(){return Lt().memoizedState=Jg.bind(null,Le)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if((We&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},To={readContext:xt,use:ml,useCallback:yf,useContext:xt,useEffect:Co,useImperativeHandle:Sf,useInsertionEffect:mf,useLayoutEffect:gf,useMemo:bf,useReducer:gl,useRef:df,useState:function(){return gl(Bn)},useDebugValue:wo,useDeferredValue:function(e,t){var i=ct();return Cf(i,$e.memoizedState,e,t)},useTransition:function(){var e=gl(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ns(e),t]},useSyncExternalStore:$h,useId:kf,useHostTransitionStatus:ko,useFormState:cf,useActionState:cf,useOptimistic:function(e,t){var i=ct();return nf(i,$e,e,t)},useMemoCache:go,useCacheRefresh:Af};To.useEffectEvent=_f;var Mf={readContext:xt,use:ml,useCallback:yf,useContext:xt,useEffect:Co,useImperativeHandle:Sf,useInsertionEffect:mf,useLayoutEffect:gf,useMemo:bf,useReducer:So,useRef:df,useState:function(){return So(Bn)},useDebugValue:wo,useDeferredValue:function(e,t){var i=ct();return $e===null?xo(i,e,t):Cf(i,$e.memoizedState,e,t)},useTransition:function(){var e=So(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ns(e),t]},useSyncExternalStore:$h,useId:kf,useHostTransitionStatus:ko,useFormState:ff,useActionState:ff,useOptimistic:function(e,t){var i=ct();return $e!==null?nf(i,$e,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:go,useCacheRefresh:Af};Mf.useEffectEvent=_f;function Do(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 Ro={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Zr(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Zr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=$t(),r=ei(i);r.tag=2,t!=null&&(r.callback=t),t=ti(e,r,i),t!==null&&(Pt(t,e,i),Zr(t,e,i))}};function Of(e,t,i,r,f,y,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,y,D):t.prototype&&t.prototype.isPureReactComponent?!Vr(i,r)||!Vr(f,y):!0}function Bf(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&Ro.enqueueReplaceState(t,t.state,null)}function Bi(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=c({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function zf(e){Zs(e)}function Hf(e){console.error(e)}function Nf(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 jf(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Lo(e,t,i){return i=ei(i),i.tag=3,i.payload={element:null},i.callback=function(){bl(e,t)},i}function Uf(e){return e=ei(e),e.tag=3,e}function If(e,t,i,r){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var y=r.value;e.payload=function(){return f(y)},e.callback=function(){jf(t,i,r)}}var D=i.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){jf(t,i,r),typeof f!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var j=r.stack;this.componentDidCatch(r.value,{componentStack:j!==null?j:""})})}function tv(e,t,i,r,f){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&ir(t,i,f,!0),i=Yt.current,i!==null){switch(i.tag){case 31:case 13:return an===null?Ol():i.alternate===null&&at===0&&(at=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),nu(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)),nu(e,r,f)),!1}throw Error(o(435,i.tag))}return nu(e,r,f),Ol(),!1}if(Pe)return t=Yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Xa&&(e=Error(o(422),{cause:r}),Wr(nn(e,i)))):(r!==Xa&&(t=Error(o(423),{cause:r}),Wr(nn(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=nn(r,i),f=Lo(e.stateNode,r,f),lo(e,f),at!==4&&(at=2)),!1;var y=Error(o(520),{cause:r});if(y=nn(y,i),fs===null?fs=[y]:fs.push(y),at!==4&&(at=2),t===null)return!0;r=nn(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Lo(i.stateNode,r,e),lo(i,e),!1;case 1:if(t=i.type,y=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ai===null||!ai.has(y))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Uf(f),If(f,e,i,r),lo(i,f),!1}i=i.return}while(i!==null);return!1}var Mo=Error(o(461)),dt=!1;function Et(e,t,i,r){t.child=e===null?qh(t,null,i,r):Mi(t,e.child,i,r)}function Pf(e,t,i,r,f){i=i.render;var y=t.ref;if("ref"in r){var D={};for(var j in r)j!=="ref"&&(D[j]=r[j])}else D=r;return Ti(t),r=fo(e,t,i,D,y,f),j=po(),e!==null&&!dt?(_o(e,t,f),zn(e,t,f)):(Pe&&j&&Wa(t),t.flags|=1,Et(e,t,r,f),t.child)}function Ff(e,t,i,r,f){if(e===null){var y=i.type;return typeof y=="function"&&!Va(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,qf(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,!Io(e,f)){var D=y.memoizedProps;if(i=i.compare,i=i!==null?i:Vr,i(D,r)&&e.ref===t.ref)return zn(e,t,f)}return t.flags|=1,e=Dn(y,r),e.ref=t.ref,e.return=t,t.child=e}function qf(e,t,i,r,f){if(e!==null){var y=e.memoizedProps;if(Vr(y,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=y,Io(e,f))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,zn(e,t,f)}return Oo(e,t,i,r,f)}function Vf(e,t,i,r){var f=r.children,y=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(y=y!==null?y.baseLanes|i:i,e!==null){for(r=t.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~y}else r=0,t.child=null;return Gf(e,t,y,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ll(t,y!==null?y.cachePool:null),y!==null?Yh(t,y):oo(),Wh(t);else return r=t.lanes=536870912,Gf(e,t,y!==null?y.baseLanes|i:i,i,r)}else y!==null?(ll(t,y.cachePool),Yh(t,y),ii(),t.memoizedState=null):(e!==null&&ll(t,null),oo(),ii());return Et(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 Gf(e,t,i,r,f){var y=no();return y=y===null?null:{parent:ht._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&ll(t,null),oo(),Wh(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 Yf(e,t,i){return Mi(t,e.child,null,i),e=Cl(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function nv(e,t,i){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(r.mode==="hidden")return e=Cl(t,r),t.lanes=536870912,ss(null,e);if(co(t),(e=it)?(e=rp(e,ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Th(e),i.return=t,t.child=i,wt=t,it=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(co(t),f)if(t.flags&256)t.flags&=-257,t=Yf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(dt||ir(e,t,i,!1),f=(i&e.childLanes)!==0,dt||f){if(r=et,r!==null&&(D=zc(r,i),D!==0&&D!==y.retryLane))throw y.retryLane=D,xi(e,D),Pt(r,e,D),Mo;Ol(),t=Yf(e,t,i)}else e=y.treeContext,it=on(D.nextSibling),wt=t,Pe=!0,$n=null,ln=!1,e!==null&&Lh(t,e),t=Cl(t,r),t.flags|=4096;return t}return e=Dn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function 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 Oo(e,t,i,r,f){return Ti(t),i=fo(e,t,i,r,void 0,f),r=po(),e!==null&&!dt?(_o(e,t,f),zn(e,t,f)):(Pe&&r&&Wa(t),t.flags|=1,Et(e,t,i,f),t.child)}function Wf(e,t,i,r,f,y){return Ti(t),t.updateQueue=null,i=Xh(t,r,i,f),Kh(e),r=po(),e!==null&&!dt?(_o(e,t,y),zn(e,t,y)):(Pe&&r&&Wa(t),t.flags|=1,Et(e,t,i,y),t.child)}function Kf(e,t,i,r,f){if(Ti(t),t.stateNode===null){var y=Ji,D=i.contextType;typeof D=="object"&&D!==null&&(y=xt(D)),y=new i(r,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Ro,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=r,y.state=t.memoizedState,y.refs={},ro(t),D=i.contextType,y.context=typeof D=="object"&&D!==null?xt(D):Ji,y.state=t.memoizedState,D=i.getDerivedStateFromProps,typeof D=="function"&&(Do(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&&Ro.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 j=t.memoizedProps,W=Bi(i,j);y.props=W;var ne=y.context,oe=i.contextType;D=Ji,typeof oe=="object"&&oe!==null&&(D=xt(oe));var he=i.getDerivedStateFromProps;oe=typeof he=="function"||typeof y.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,oe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(j||ne!==D)&&Bf(t,y,r,D),Jn=!1;var re=t.memoizedState;y.state=re,es(t,r,y,f),Jr(),ne=t.memoizedState,j||re!==ne||Jn?(typeof he=="function"&&(Do(t,i,he,r),ne=t.memoizedState),(W=Jn||Of(t,i,W,r,re,ne,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=ne),y.props=r,y.state=ne,y.context=D,r=W):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,so(e,t),D=t.memoizedProps,oe=Bi(i,D),y.props=oe,he=t.pendingProps,re=y.context,ne=i.contextType,W=Ji,typeof ne=="object"&&ne!==null&&(W=xt(ne)),j=i.getDerivedStateFromProps,(ne=typeof j=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D!==he||re!==W)&&Bf(t,y,r,W),Jn=!1,re=t.memoizedState,y.state=re,es(t,r,y,f),Jr();var se=t.memoizedState;D!==he||re!==se||Jn||e!==null&&e.dependencies!==null&&rl(e.dependencies)?(typeof j=="function"&&(Do(t,i,j,r),se=t.memoizedState),(oe=Jn||Of(t,i,oe,r,re,se,W)||e!==null&&e.dependencies!==null&&rl(e.dependencies))?(ne||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&&re===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&re===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&&re===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&re===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=Mi(t,e.child,null,f),t.child=Mi(t,null,i,f)):Et(e,t,i,f),t.memoizedState=y.state,e=t.child):e=zn(e,t,f),e}function Xf(e,t,i,r){return ki(),t.flags|=256,Et(e,t,i,r),t.child}var Bo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zo(e){return{baseLanes:e,cachePool:Nh()}}function Ho(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Xt),e}function $f(e,t,i){var r=t.pendingProps,f=!1,y=(t.flags&128)!==0,D;if((D=y)||(D=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),D&&(f=!0,t.flags&=-129),D=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(f?ni(t):ii(),(e=it)?(e=rp(e,ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Th(e),i.return=t,t.child=i,wt=t,it=null)):e=null,e===null)throw Qn(t);return vu(e)?t.lanes=32:t.lanes=536870912,null}var j=r.children;return r=r.fallback,f?(ii(),f=t.mode,j=xl({mode:"hidden",children:j},f),r=Ei(r,f,i,null),j.return=t,r.return=t,j.sibling=r,t.child=j,r=t.child,r.memoizedState=zo(i),r.childLanes=Ho(e,D,i),t.memoizedState=Bo,ss(null,r)):(ni(t),No(t,j))}var W=e.memoizedState;if(W!==null&&(j=W.dehydrated,j!==null)){if(y)t.flags&256?(ni(t),t.flags&=-257,t=jo(e,t,i)):t.memoizedState!==null?(ii(),t.child=e.child,t.flags|=128,t=null):(ii(),j=r.fallback,f=t.mode,r=xl({mode:"visible",children:r.children},f),j=Ei(j,f,i,null),j.flags|=2,r.return=t,j.return=t,r.sibling=j,t.child=r,Mi(t,e.child,null,i),r=t.child,r.memoizedState=zo(i),r.childLanes=Ho(e,D,i),t.memoizedState=Bo,t=ss(null,r));else if(ni(t),vu(j)){if(D=j.nextSibling&&j.nextSibling.dataset,D)var ne=D.dgst;D=ne,r=Error(o(419)),r.stack="",r.digest=D,Wr({value:r,source:null,stack:null}),t=jo(e,t,i)}else if(dt||ir(e,t,i,!1),D=(i&e.childLanes)!==0,dt||D){if(D=et,D!==null&&(r=zc(D,i),r!==0&&r!==W.retryLane))throw W.retryLane=r,xi(e,r),Pt(D,e,r),Mo;gu(j)||Ol(),t=jo(e,t,i)}else gu(j)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,it=on(j.nextSibling),wt=t,Pe=!0,$n=null,ln=!1,e!==null&&Lh(t,e),t=No(t,r.children),t.flags|=4096);return t}return f?(ii(),j=r.fallback,f=t.mode,W=e.child,ne=W.sibling,r=Dn(W,{mode:"hidden",children:r.children}),r.subtreeFlags=W.subtreeFlags&65011712,ne!==null?j=Dn(ne,j):(j=Ei(j,f,i,null),j.flags|=2),j.return=t,r.return=t,r.sibling=j,t.child=r,ss(null,r),r=t.child,j=e.child.memoizedState,j===null?j=zo(i):(f=j.cachePool,f!==null?(W=ht._currentValue,f=f.parent!==W?{parent:W,pool:W}:f):f=Nh(),j={baseLanes:j.baseLanes|i,cachePool:f}),r.memoizedState=j,r.childLanes=Ho(e,D,i),t.memoizedState=Bo,ss(e.child,r)):(ni(t),i=e.child,e=i.sibling,i=Dn(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(D=t.deletions,D===null?(t.deletions=[e],t.flags|=16):D.push(e)),t.child=i,t.memoizedState=null,i)}function No(e,t){return t=xl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xl(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function jo(e,t,i){return Mi(t,e.child,null,i),e=No(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qf(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Za(e.return,t,i)}function Uo(e,t,i,r,f,y){var D=e.memoizedState;D===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:f,treeForkCount:y}:(D.isBackwards=t,D.rendering=null,D.renderingStartTime=0,D.last=r,D.tail=i,D.tailMode=f,D.treeForkCount=y)}function Zf(e,t,i){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var D=ut.current,j=(D&2)!==0;if(j?(D=D&1|2,t.flags|=128):D&=1,H(ut,D),Et(e,t,r,i),r=Pe?Yr:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qf(e,i,t);else if(e.tag===19)Qf(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&fl(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),Uo(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}Uo(t,!0,i,null,y,r);break;case"together":Uo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function zn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),li|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ir(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=Dn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Dn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Io(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&rl(e)))}function iv(e,t,i){switch(t.tag){case 3:U(t,t.stateNode.containerInfo),Zn(t,ht,e.memoizedState.cache),ki();break;case 27:case 5:Z(t);break;case 4:U(t,t.stateNode.containerInfo);break;case 10:Zn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ni(t),t.flags|=128,null):(i&t.child.childLanes)!==0?$f(e,t,i):(ni(t),e=zn(e,t,i),e!==null?e.sibling:null);ni(t);break;case 19:var f=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(ir(e,t,i,!1),r=(i&t.childLanes)!==0),f){if(r)return Zf(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),H(ut,ut.current),r)break;return null;case 22:return t.lanes=0,Vf(e,t,i,t.pendingProps);case 24:Zn(t,ht,e.memoizedState.cache)}return zn(e,t,i)}function Jf(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Io(e,i)&&(t.flags&128)===0)return dt=!1,iv(e,t,i);dt=(e.flags&131072)!==0}else dt=!1,Pe&&(t.flags&1048576)!==0&&Rh(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")Va(e)?(r=Bi(e,r),t.tag=1,t=Kf(null,t,e,r,i)):(t.tag=0,t=Oo(null,t,e,r,i));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=Pf(null,t,e,r,i);break e}else if(f===L){t.tag=14,t=Ff(null,t,e,r,i);break e}}throw t=Q(e)||e,Error(o(306,t,""))}}return t;case 0:return Oo(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,f=Bi(r,t.pendingProps),Kf(e,t,r,f,i);case 3:e:{if(U(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var y=t.memoizedState;f=y.element,so(e,t),es(t,r,null,i);var D=t.memoizedState;if(r=D.cache,Zn(t,ht,r),r!==y.cache&&Ja(t,[ht],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=Xf(e,t,r,i);break e}else if(r!==f){f=nn(Error(o(424)),t),Wr(f),t=Xf(e,t,r,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(it=on(e.firstChild),wt=t,Pe=!0,$n=null,ln=!0,i=qh(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ki(),r===f){t=zn(e,t,i);break e}Et(e,t,r,i)}t=t.child}return t;case 26:return wl(e,t),e===null?(i=cp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,r=Il(de.current).createElement(i),r[Ct]=t,r[zt]=e,kt(r,i,e),St(r),t.stateNode=r):t.memoizedState=cp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),e===null&&Pe&&(r=t.stateNode=ap(t.type,t.pendingProps,de.current),wt=t,ln=!0,f=it,hi(t.type)?(Su=f,it=on(r.firstChild)):it=f),Et(e,t,t.pendingProps.children,i),wl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((f=r=it)&&(r=Ov(r,t.type,t.pendingProps,ln),r!==null?(t.stateNode=r,wt=t,it=on(r.firstChild),ln=!1,f=!0):f=!1),f||Qn(t)),Z(t),f=t.type,y=t.pendingProps,D=e!==null?e.memoizedProps:null,r=y.children,pu(f,y)?r=null:D!==null&&pu(f,D)&&(t.flags|=32),t.memoizedState!==null&&(f=fo(e,t,Kg,null,null,i),ys._currentValue=f),wl(e,t),Et(e,t,r,i),t.child;case 6:return e===null&&Pe&&((e=i=it)&&(i=Bv(i,t.pendingProps,ln),i!==null?(t.stateNode=i,wt=t,it=null,e=!0):e=!1),e||Qn(t)),null;case 13:return $f(e,t,i);case 4:return U(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mi(t,null,r,i):Et(e,t,r,i),t.child;case 11:return Pf(e,t,t.type,t.pendingProps,i);case 7:return Et(e,t,t.pendingProps,i),t.child;case 8:return Et(e,t,t.pendingProps.children,i),t.child;case 12:return Et(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Zn(t,t.type,r.value),Et(e,t,r.children,i),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Ti(t),f=xt(f),r=r(f),t.flags|=1,Et(e,t,r,i),t.child;case 14:return Ff(e,t,t.type,t.pendingProps,i);case 15:return qf(e,t,t.type,t.pendingProps,i);case 19:return Zf(e,t,i);case 31:return nv(e,t,i);case 22:return Vf(e,t,i,t.pendingProps);case 24:return Ti(t),r=xt(ht),e===null?(f=no(),f===null&&(f=et,y=eo(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=i),f=y),t.memoizedState={parent:r,cache:f},ro(t),Zn(t,ht,f)):((e.lanes&i)!==0&&(so(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,ht,r)):(r=y.cache,Zn(t,ht,r),r!==f.cache&&Ja(t,[ht],i,!0))),Et(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Hn(e){e.flags|=4}function Po(e,t,i,r,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(kd())e.flags|=8192;else throw Li=ol,io}else e.flags&=-16777217}function ed(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_p(t))if(kd())e.flags|=8192;else throw Li=ol,io}function El(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mc():536870912,e.lanes|=t,_r|=t)}function ls(e,t){if(!Pe)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 rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function rv(e,t,i){var r=t.pendingProps;switch(Ka(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Mn(ht),le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(nr(t)?Hn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$a())),rt(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(Hn(t),y!==null?(rt(t),ed(t,y)):(rt(t),Po(t,f,null,r,i))):y?y!==e.memoizedState?(Hn(t),rt(t),ed(t,y)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Hn(t),rt(t),Po(t,f,e,r,i)),null;case 27:if(pe(t),i=de.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return rt(t),null}e=ie.current,nr(t)?Mh(t):(e=ap(f,r,i),t.stateNode=e,Hn(t))}return rt(t),null;case 5:if(pe(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return rt(t),null}if(y=ie.current,nr(t))Mh(t);else{var D=Il(de.current);switch(y){case 1:y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":y=D.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof r.is=="string"?D.createElement("select",{is:r.is}):D.createElement("select"),r.multiple?y.multiple=!0:r.size&&(y.size=r.size);break;default:y=typeof r.is=="string"?D.createElement(f,{is:r.is}):D.createElement(f)}}y[Ct]=t,y[zt]=r;e:for(D=t.child;D!==null;){if(D.tag===5||D.tag===6)y.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===t)break e;for(;D.sibling===null;){if(D.return===null||D.return===t)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}t.stateNode=y;e:switch(kt(y,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Hn(t)}}return rt(t),Po(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=de.current,nr(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,f=wt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||$d(e.nodeValue,i)),e||Qn(t,!0)}else e=Il(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return rt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=nr(t),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else i=$a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return rt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=nr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),f=!1}else f=$a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),y=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(y=r.memoizedState.cachePool.pool),y!==f&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),El(t,t.updateQueue),rt(t),null);case 4:return le(),e===null&&uu(t.stateNode.containerInfo),rt(t),null;case 10:return Mn(t.type),rt(t),null;case 19:if(P(ut),r=t.memoizedState,r===null)return rt(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)ls(r,!1);else{if(at!==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;)Ah(i,e),i=i.sibling;return H(ut,ut.current&1|2),Pe&&Rn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ot()>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&&!Pe)return rt(t),null}else 2*ot()-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=ot(),e.sibling=null,i=ut.current,H(ut,f?i&1|2:i&1),Pe&&Rn(t,r.treeForkCount),e):(rt(t),null);case 22:case 23:return Wt(t),uo(),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&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(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&&P(Di),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Mn(ht),rt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function sv(e,t){switch(Ka(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mn(ht),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(ut),null;case 4:return le(),null;case 10:return Mn(t.type),null;case 22:case 23:return Wt(t),uo(),e!==null&&P(Di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mn(ht),null;case 25:return null;default:return null}}function td(e,t){switch(Ka(t),t.tag){case 3:Mn(ht),le();break;case 26:case 27:case 5:pe(t);break;case 4:le();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:P(ut);break;case 10:Mn(t.type);break;case 22:case 23:Wt(t),uo(),e!==null&&P(Di);break;case 24:Mn(ht)}}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(j){Xe(t,t.return,j)}}function ri(e,t,i){try{var r=t.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var y=f.next;r=y;do{if((r.tag&e)===e){var D=r.inst,j=D.destroy;if(j!==void 0){D.destroy=void 0,f=t;var W=i,ne=j;try{ne()}catch(oe){Xe(f,W,oe)}}}r=r.next}while(r!==y)}}catch(oe){Xe(t,t.return,oe)}}function nd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Gh(t,i)}catch(r){Xe(e,e.return,r)}}}function id(e,t,i){i.props=Bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Xe(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){Xe(e,t,f)}}function bn(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(f){Xe(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){Xe(e,t,f)}else i.current=null}function rd(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(f){Xe(e,e.return,f)}}function Fo(e,t,i){try{var r=e.stateNode;Av(r,e.type,i,t),r[zt]=t}catch(f){Xe(e,e.return,f)}}function sd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hi(e.type)||e.tag===4}function qo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&hi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vo(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=An));else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Vo(e,t,i),e=e.sibling;e!==null;)Vo(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 ld(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);kt(t,r,i),t[Ct]=e,t[zt]=i}catch(y){Xe(e,e.return,y)}}var Nn=!1,pt=!1,Go=!1,ad=typeof WeakSet=="function"?WeakSet:Set,yt=null;function lv(e,t){if(e=e.containerInfo,fu=Wl,e=vh(e),Na(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var f=r.anchorOffset,y=r.focusNode;r=r.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var D=0,j=-1,W=-1,ne=0,oe=0,he=e,re=null;t:for(;;){for(var se;he!==i||f!==0&&he.nodeType!==3||(j=D+f),he!==y||r!==0&&he.nodeType!==3||(W=D+r),he.nodeType===3&&(D+=he.nodeValue.length),(se=he.firstChild)!==null;)re=he,he=se;for(;;){if(he===e)break t;if(re===i&&++ne===f&&(j=D),re===y&&++oe===r&&(W=D),(se=he.nextSibling)!==null)break;he=re,re=he.parentNode}he=se}i=j===-1||W===-1?null:{start:j,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(du={focusedElem:e,selectionRange:i},Wl=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,y=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,i=t,f=y.memoizedProps,y=y.memoizedState,r=i.stateNode;try{var Se=Bi(i.type,f);e=r.getSnapshotBeforeUpdate(Se,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(ke){Xe(i,i.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)mu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":mu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}}function od(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Un(e,i),r&4&&as(5,i);break;case 1:if(Un(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(D){Xe(i,i.return,D)}else{var f=Bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){Xe(i,i.return,D)}}r&64&&nd(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{Gh(e,t)}catch(D){Xe(i,i.return,D)}}break;case 27:t===null&&r&4&&ld(i);case 26:case 5:Un(e,i),t===null&&r&4&&rd(i),r&512&&os(i,i.return);break;case 12:Un(e,i);break;case 31:Un(e,i),r&4&&hd(e,i);break;case 13:Un(e,i),r&4&&fd(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=_v.bind(null,i),zv(e,i))));break;case 22:if(r=i.memoizedState!==null||Nn,!r){t=t!==null&&t.memoizedState!==null||pt,f=Nn;var y=pt;Nn=r,(pt=t)&&!y?In(e,i,(i.subtreeFlags&8772)!==0):Un(e,i),Nn=f,pt=y}break;case 30:break;default:Un(e,i)}}function ud(e){var t=e.alternate;t!==null&&(e.alternate=null,ud(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ya(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 st=null,Nt=!1;function jn(e,t,i){for(i=i.child;i!==null;)cd(e,t,i),i=i.sibling}function cd(e,t,i){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(bt,i)}catch{}switch(i.tag){case 26:pt||bn(i,t),jn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:pt||bn(i,t);var r=st,f=Nt;hi(i.type)&&(st=i.stateNode,Nt=!1),jn(e,t,i),gs(i.stateNode),st=r,Nt=f;break;case 5:pt||bn(i,t);case 6:if(r=st,f=Nt,st=null,jn(e,t,i),st=r,Nt=f,st!==null)if(Nt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(i.stateNode)}catch(y){Xe(i,t,y)}else try{st.removeChild(i.stateNode)}catch(y){Xe(i,t,y)}break;case 18:st!==null&&(Nt?(e=st,np(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wr(e)):np(st,i.stateNode));break;case 4:r=st,f=Nt,st=i.stateNode.containerInfo,Nt=!0,jn(e,t,i),st=r,Nt=f;break;case 0:case 11:case 14:case 15:ri(2,i,t),pt||ri(4,i,t),jn(e,t,i);break;case 1:pt||(bn(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&id(i,t,r)),jn(e,t,i);break;case 21:jn(e,t,i);break;case 22:pt=(r=pt)||i.memoizedState!==null,jn(e,t,i),pt=r;break;default:jn(e,t,i)}}function hd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wr(e)}catch(i){Xe(t,t.return,i)}}}function fd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wr(e)}catch(i){Xe(t,t.return,i)}}function av(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ad),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ad),t;default:throw Error(o(435,e.tag))}}function Al(e,t){var i=av(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var f=mv.bind(null,e,r);r.then(f,f)}})}function jt(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var f=i[r],y=e,D=t,j=D;e:for(;j!==null;){switch(j.tag){case 27:if(hi(j.type)){st=j.stateNode,Nt=!1;break e}break;case 5:st=j.stateNode,Nt=!1;break e;case 3:case 4:st=j.stateNode.containerInfo,Nt=!0;break e}j=j.return}if(st===null)throw Error(o(160));cd(y,D,f),st=null,Nt=!1,y=f.alternate,y!==null&&(y.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dd(t,e),t=t.sibling}var dn=null;function dd(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Ut(e),r&4&&(ri(3,e,e.return),as(3,e),ri(5,e,e.return));break;case 1:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&64&&Nn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var f=dn;if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&4){var y=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":y=f.getElementsByTagName("title")[0],(!y||y[zr]||y[Ct]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=f.createElement(r),f.head.insertBefore(y,f.querySelector("head > title"))),kt(y,r,i),y[Ct]=e,St(y),r=y;break e;case"link":var D=dp("link","href",f).get(r+(i.href||""));if(D){for(var j=0;j<D.length;j++)if(y=D[j],y.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&y.getAttribute("rel")===(i.rel==null?null:i.rel)&&y.getAttribute("title")===(i.title==null?null:i.title)&&y.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;case"meta":if(D=dp("meta","content",f).get(r+(i.content||""))){for(j=0;j<D.length;j++)if(y=D[j],y.getAttribute("content")===(i.content==null?null:""+i.content)&&y.getAttribute("name")===(i.name==null?null:i.name)&&y.getAttribute("property")===(i.property==null?null:i.property)&&y.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&y.getAttribute("charset")===(i.charSet==null?null:i.charSet)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;default:throw Error(o(468,r))}y[Ct]=e,St(y),r=y}e.stateNode=r}else pp(f,e.type,e.stateNode);else e.stateNode=fp(f,r,e.memoizedProps);else y!==r?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,r===null?pp(f,e.type,e.stateNode):fp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Fo(e,e.memoizedProps,i.memoizedProps)}break;case 27:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),i!==null&&r&4&&Fo(e,e.memoizedProps,i.memoizedProps);break;case 5:if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),e.flags&32){f=e.stateNode;try{Yi(f,"")}catch(Se){Xe(e,e.return,Se)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Fo(e,f,i!==null?i.memoizedProps:f)),r&1024&&(Go=!0);break;case 6:if(jt(t,e),Ut(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(Se){Xe(e,e.return,Se)}}break;case 3:if(ql=null,f=dn,dn=Pl(t.containerInfo),jt(t,e),dn=f,Ut(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{wr(t.containerInfo)}catch(Se){Xe(e,e.return,Se)}Go&&(Go=!1,pd(e));break;case 4:r=dn,dn=Pl(e.stateNode.containerInfo),jt(t,e),Ut(e),dn=r;break;case 12:jt(t,e),Ut(e);break;case 31:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 13:jt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Dl=ot()),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,ne=Nn,oe=pt;if(Nn=ne||f,pt=oe||W,jt(t,e),pt=oe,Nn=ne,Ut(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||W||Nn||pt||zi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(y=W.stateNode,f)D=y.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{j=W.stateNode;var he=W.memoizedProps.style,re=he!=null&&he.hasOwnProperty("display")?he.display:null;j.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Se){Xe(W,W.return,Se)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=f?"":W.memoizedProps}catch(Se){Xe(W,W.return,Se)}}}else if(t.tag===18){if(i===null){W=t;try{var se=W.stateNode;f?ip(se,!0):ip(W.stateNode,!1)}catch(Se){Xe(W,W.return,Se)}}}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:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 30:break;case 21:break;default:jt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(sd(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var f=i.stateNode,y=qo(e);kl(e,y,f);break;case 5:var D=i.stateNode;i.flags&32&&(Yi(D,""),i.flags&=-33);var j=qo(e);kl(e,j,D);break;case 3:case 4:var W=i.stateNode.containerInfo,ne=qo(e);Vo(e,ne,W);break;default:throw Error(o(161))}}catch(oe){Xe(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)od(e,t.alternate,t),t=t.sibling}function zi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ri(4,t,t.return),zi(t);break;case 1:bn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&id(t,t.return,i),zi(t);break;case 27:gs(t.stateNode);case 26:case 5:bn(t,t.return),zi(t);break;case 22:t.memoizedState===null&&zi(t);break;case 30:zi(t);break;default:zi(t)}e=e.sibling}}function In(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,f=e,y=t,D=y.flags;switch(y.tag){case 0:case 11:case 15:In(f,y,i),as(4,y);break;case 1:if(In(f,y,i),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ne){Xe(r,r.return,ne)}if(r=y,f=r.updateQueue,f!==null){var j=r.stateNode;try{var W=f.shared.hiddenCallbacks;if(W!==null)for(f.shared.hiddenCallbacks=null,f=0;f<W.length;f++)Vh(W[f],j)}catch(ne){Xe(r,r.return,ne)}}i&&D&64&&nd(y),os(y,y.return);break;case 27:ld(y);case 26:case 5:In(f,y,i),i&&r===null&&D&4&&rd(y),os(y,y.return);break;case 12:In(f,y,i);break;case 31:In(f,y,i),i&&D&4&&hd(f,y);break;case 13:In(f,y,i),i&&D&4&&fd(f,y);break;case 22:y.memoizedState===null&&In(f,y,i),os(y,y.return);break;case 30:break;default:In(f,y,i)}t=t.sibling}}function Yo(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 Wo(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 pn(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_d(e,t,i,r),t=t.sibling}function _d(e,t,i,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:pn(e,t,i,r),f&2048&&as(9,t);break;case 1:pn(e,t,i,r);break;case 3:pn(e,t,i,r),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kr(e)));break;case 12:if(f&2048){pn(e,t,i,r),e=t.stateNode;try{var y=t.memoizedProps,D=y.id,j=y.onPostCommit;typeof j=="function"&&j(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Xe(t,t.return,W)}}else pn(e,t,i,r);break;case 31:pn(e,t,i,r);break;case 13:pn(e,t,i,r);break;case 23:break;case 22:y=t.stateNode,D=t.alternate,t.memoizedState!==null?y._visibility&2?pn(e,t,i,r):us(e,t):y._visibility&2?pn(e,t,i,r):(y._visibility|=2,fr(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Yo(D,t);break;case 24:pn(e,t,i,r),f&2048&&Wo(t.alternate,t);break;default:pn(e,t,i,r)}}function fr(e,t,i,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,D=t,j=i,W=r,ne=D.flags;switch(D.tag){case 0:case 11:case 15:fr(y,D,j,W,f),as(8,D);break;case 23:break;case 22:var oe=D.stateNode;D.memoizedState!==null?oe._visibility&2?fr(y,D,j,W,f):us(y,D):(oe._visibility|=2,fr(y,D,j,W,f)),f&&ne&2048&&Yo(D.alternate,D);break;case 24:fr(y,D,j,W,f),f&&ne&2048&&Wo(D.alternate,D);break;default:fr(y,D,j,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&&Yo(r.alternate,r);break;case 24:us(i,r),f&2048&&Wo(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;)md(e,t,i),e=e.sibling}function md(e,t,i){switch(e.tag){case 26:dr(e,t,i),e.flags&cs&&e.memoizedState!==null&&Wv(i,dn,e.memoizedState,e.memoizedProps);break;case 5:dr(e,t,i);break;case 3:case 4:var r=dn;dn=Pl(e.stateNode.containerInfo),dr(e,t,i),dn=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 gd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function 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];yt=r,Sd(r,e)}gd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vd(e),e=e.sibling}function vd(e){switch(e.tag){case 0:case 11:case 15: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];yt=r,Sd(r,e)}gd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ri(8,t,t.return),Tl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Tl(t));break;default:Tl(t)}e=e.sibling}}function Sd(e,t){for(;yt!==null;){var i=yt;switch(i.tag){case 0:case 11:case 15:ri(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Kr(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,yt=r;else e:for(i=e;yt!==null;){r=yt;var f=r.sibling,y=r.return;if(ud(r),r===i){yt=null;break e}if(f!==null){f.return=y,yt=f;break e}yt=y}}}var ov={getCacheForType:function(e){var t=xt(ht),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return xt(ht).controller.signal}},uv=typeof WeakMap=="function"?WeakMap:Map,We=0,et=null,ze=null,Ue=0,Ke=0,Kt=null,si=!1,pr=!1,Ko=!1,Pn=0,at=0,li=0,Hi=0,Xo=0,Xt=0,_r=0,fs=null,It=null,$o=!1,Dl=0,yd=0,Rl=1/0,Ll=null,ai=null,vt=0,oi=null,mr=null,Fn=0,Qo=0,Zo=null,bd=null,ds=0,Jo=null;function $t(){return(We&2)!==0&&Ue!==0?Ue&-Ue:F.T!==null?su():Hc()}function Cd(){if(Xt===0)if((Ue&536870912)===0||Pe){var e=Us;Us<<=1,(Us&3932160)===0&&(Us=262144),Xt=e}else Xt=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Xt}function Pt(e,t,i){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(gr(e,0),ui(e,Ue,Xt,!1)),Br(e,i),((We&2)===0||e!==et)&&(e===et&&((We&2)===0&&(Hi|=i),at===4&&ui(e,Ue,Xt,!1)),Cn(e))}function wd(e,t,i){if((We&6)!==0)throw Error(o(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Or(e,t),f=r?fv(e,t):tu(e,t,!0),y=r;do{if(f===0){pr&&!r&&ui(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!cv(i)){f=tu(e,t,!1),y=!1;continue}if(f===2){if(y=t,e.errorRecoveryDisabledLanes&y)var D=0;else D=e.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){t=D;e:{var j=e;f=fs;var W=j.current.memoizedState.isDehydrated;if(W&&(gr(j,D).flags|=256),D=tu(j,D,!1),D!==2){if(Ko&&!W){j.errorRecoveryDisabledLanes|=y,Hi|=y,f=4;break e}y=It,It=f,y!==null&&(It===null?It=y:It.push.apply(It,y))}f=D}if(y=!1,f!==2)continue}}if(f===1){gr(e,0),ui(e,t,0,!0);break}e:{switch(r=e,y=f,y){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ui(r,t,Xt,!si);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(f=Dl+300-ot(),10<f)){if(ui(r,t,Xt,!si),Ps(r,0,!0)!==0)break e;Fn=t,r.timeoutHandle=ep(xd.bind(null,r,i,It,Ll,$o,t,Xt,Hi,_r,si,y,"Throttled",-0,0),f);break e}xd(r,i,It,Ll,$o,t,Xt,Hi,_r,si,y,null,-0,0)}}break}while(!0);Cn(e)}function xd(e,t,i,r,f,y,D,j,W,ne,oe,he,re,se){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},md(t,y,he);var Se=(y&62914560)===y?Dl-ot():(y&4194048)===y?yd-ot():0;if(Se=Kv(he,Se),Se!==null){Fn=y,e.cancelPendingCommit=Se(Md.bind(null,e,t,y,i,r,f,D,j,W,oe,he,null,re,se)),ui(e,y,D,!ne);return}}Md(e,t,y,i,r,f,D,j,W)}function cv(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var f=i[r],y=f.getSnapshot;f=f.value;try{if(!Vt(y(),f))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ui(e,t,i,r){t&=~Xo,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-Je(f),D=1<<y;r[y]=-1,f&=~D}i!==0&&Oc(e,i,t)}function Ml(){return(We&6)===0?(ps(0),!1):!0}function eu(){if(ze!==null){if(Ke===0)var e=ze.return;else e=ze,Ln=Ai=null,mo(e),ar=null,$r=0,e=ze;for(;e!==null;)td(e.alternate,e),e=e.return;ze=null}}function gr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Rv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Fn=0,eu(),et=e,ze=i=Dn(e.current,null),Ue=t,Ke=0,Kt=null,si=!1,pr=Or(e,t),Ko=!1,_r=Xt=Xo=Hi=li=at=0,It=fs=null,$o=!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-Je(r),y=1<<f;t|=e[f],r&=~y}return Pn=t,Js(),i}function Ed(e,t){Le=null,F.H=rs,t===lr||t===al?(t=Ih(),Ke=3):t===io?(t=Ih(),Ke=4):Ke=t===Mo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,ze===null&&(at=1,bl(e,nn(t,e.current)))}function kd(){var e=Yt.current;return e===null?!0:(Ue&4194048)===Ue?an===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===an:!1}function Ad(){var e=F.H;return F.H=rs,e===null?rs:e}function Td(){var e=F.A;return F.A=ov,e}function Ol(){at=4,si||(Ue&4194048)!==Ue&&Yt.current!==null||(pr=!0),(li&134217727)===0&&(Hi&134217727)===0||et===null||ui(et,Ue,Xt,!1)}function tu(e,t,i){var r=We;We|=2;var f=Ad(),y=Td();(et!==e||Ue!==t)&&(Ll=null,gr(e,t)),t=!1;var D=at;e:do try{if(Ke!==0&&ze!==null){var j=ze,W=Kt;switch(Ke){case 8:eu(),D=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var ne=Ke;if(Ke=0,Kt=null,vr(e,j,W,ne),i&&pr){D=0;break e}break;default:ne=Ke,Ke=0,Kt=null,vr(e,j,W,ne)}}hv(),D=at;break}catch(oe){Ed(e,oe)}while(!0);return t&&e.shellSuspendCounter++,Ln=Ai=null,We=r,F.H=f,F.A=y,ze===null&&(et=null,Ue=0,Js()),D}function hv(){for(;ze!==null;)Dd(ze)}function fv(e,t){var i=We;We|=2;var r=Ad(),f=Td();et!==e||Ue!==t?(Ll=null,Rl=ot()+500,gr(e,t)):pr=Or(e,t);e:do try{if(Ke!==0&&ze!==null){t=ze;var y=Kt;t:switch(Ke){case 1:Ke=0,Kt=null,vr(e,t,y,1);break;case 2:case 9:if(jh(y)){Ke=0,Kt=null,Rd(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),Cn(e)},y.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:jh(y)?(Ke=0,Kt=null,Rd(t)):(Ke=0,Kt=null,vr(e,t,y,7));break;case 5:var D=null;switch(ze.tag){case 26:D=ze.memoizedState;case 5:case 27:var j=ze;if(D?_p(D):j.stateNode.complete){Ke=0,Kt=null;var W=j.sibling;if(W!==null)ze=W;else{var ne=j.return;ne!==null?(ze=ne,Bl(ne)):ze=null}break t}}Ke=0,Kt=null,vr(e,t,y,5);break;case 6:Ke=0,Kt=null,vr(e,t,y,6);break;case 8:eu(),at=6;break e;default:throw Error(o(462))}}dv();break}catch(oe){Ed(e,oe)}while(!0);return Ln=Ai=null,F.H=r,F.A=f,We=i,ze!==null?0:(et=null,Ue=0,Js(),at)}function dv(){for(;ze!==null&&!Gn();)Dd(ze)}function Dd(e){var t=Jf(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,t===null?Bl(e):ze=t}function Rd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Wf(i,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Wf(i,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:mo(t);default:td(i,t),t=ze=Ah(t,Pn),t=Jf(i,t,Pn)}e.memoizedProps=e.pendingProps,t===null?Bl(e):ze=t}function vr(e,t,i,r){Ln=Ai=null,mo(t),ar=null,$r=0;var f=t.return;try{if(tv(e,f,t,i,Ue)){at=1,bl(e,nn(i,e.current)),ze=null;return}}catch(y){if(f!==null)throw ze=f,y;at=1,bl(e,nn(i,e.current)),ze=null;return}t.flags&32768?(Pe||r===1?e=!0:pr||(Ue&536870912)!==0?e=!1:(si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Yt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ld(t,e)):Bl(t)}function Bl(e){var t=e;do{if((t.flags&32768)!==0){Ld(t,si);return}e=t.return;var i=rv(t.alternate,t,Pn);if(i!==null){ze=i;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);at===0&&(at=5)}function Ld(e,t){do{var i=sv(e.alternate,e);if(i!==null){i.flags&=32767,ze=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=i}while(e!==null);at=6,ze=null}function Md(e,t,i,r,f,y,D,j,W){e.cancelPendingCommit=null;do zl();while(vt!==0);if((We&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(y=t.lanes|t.childLanes,y|=Fa,Ym(e,i,y,D,j,W),e===et&&(ze=et=null,Ue=0),mr=t,oi=e,Fn=i,Qo=y,Zo=f,bd=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,gv(Ce,function(){return Nd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=F.T,F.T=null,f=X.p,X.p=2,D=We,We|=4;try{lv(e,t,i)}finally{We=D,X.p=f,F.T=r}}vt=1,Od(),Bd(),zd()}}function Od(){if(vt===1){vt=0;var e=oi,t=mr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=F.T,F.T=null;var r=X.p;X.p=2;var f=We;We|=4;try{dd(t,e);var y=du,D=vh(e.containerInfo),j=y.focusedElem,W=y.selectionRange;if(D!==j&&j&&j.ownerDocument&&gh(j.ownerDocument.documentElement,j)){if(W!==null&&Na(j)){var ne=W.start,oe=W.end;if(oe===void 0&&(oe=ne),"selectionStart"in j)j.selectionStart=ne,j.selectionEnd=Math.min(oe,j.value.length);else{var he=j.ownerDocument||document,re=he&&he.defaultView||window;if(re.getSelection){var se=re.getSelection(),Se=j.textContent.length,ke=Math.min(W.start,Se),Ze=W.end===void 0?ke:Math.min(W.end,Se);!se.extend&&ke>Ze&&(D=Ze,Ze=ke,ke=D);var J=mh(j,ke),$=mh(j,Ze);if(J&&$&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==$.node||se.focusOffset!==$.offset)){var te=he.createRange();te.setStart(J.node,J.offset),se.removeAllRanges(),ke>Ze?(se.addRange(te),se.extend($.node,$.offset)):(te.setEnd($.node,$.offset),se.addRange(te))}}}}for(he=[],se=j;se=se.parentNode;)se.nodeType===1&&he.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<he.length;j++){var ce=he[j];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Wl=!!fu,du=fu=null}finally{We=f,X.p=r,F.T=i}}e.current=t,vt=2}}function Bd(){if(vt===2){vt=0;var e=oi,t=mr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=F.T,F.T=null;var r=X.p;X.p=2;var f=We;We|=4;try{od(e,t.alternate,t)}finally{We=f,X.p=r,F.T=i}}vt=3}}function zd(){if(vt===4||vt===3){vt=0,At();var e=oi,t=mr,i=Fn,r=bd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,mr=oi=null,Hd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ai=null),va(i),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(bt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=F.T,f=X.p,X.p=2,F.T=null;try{for(var y=e.onRecoverableError,D=0;D<r.length;D++){var j=r[D];y(j.value,{componentStack:j.stack})}}finally{F.T=t,X.p=f}}(Fn&3)!==0&&zl(),Cn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Jo?ds++:(ds=0,Jo=e):ds=0,ps(0)}}function Hd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Kr(t)))}function zl(){return Od(),Bd(),zd(),Nd()}function Nd(){if(vt!==5)return!1;var e=oi,t=Qo;Qo=0;var i=va(Fn),r=F.T,f=X.p;try{X.p=32>i?32:i,F.T=null,i=Zo,Zo=null;var y=oi,D=Fn;if(vt=0,mr=oi=null,Fn=0,(We&6)!==0)throw Error(o(331));var j=We;if(We|=4,vd(y.current),_d(y,y.current,D,i),We=j,ps(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(bt,y)}catch{}return!0}finally{X.p=f,F.T=r,Hd(e,t)}}function jd(e,t,i){t=nn(i,t),t=Lo(e.stateNode,t,2),e=ti(e,t,2),e!==null&&(Br(e,2),Cn(e))}function Xe(e,t,i){if(e.tag===3)jd(e,e,i);else for(;t!==null;){if(t.tag===3){jd(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=nn(i,e),i=Uf(2),r=ti(t,i,2),r!==null&&(If(i,r,t,e),Br(r,2),Cn(r));break}}t=t.return}}function nu(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new uv;var f=new Set;r.set(t,f)}else f=r.get(t),f===void 0&&(f=new Set,r.set(t,f));f.has(i)||(Ko=!0,f.add(i),e=pv.bind(null,e,t,i),t.then(e,e))}function pv(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,et===e&&(Ue&i)===i&&(at===4||at===3&&(Ue&62914560)===Ue&&300>ot()-Dl?(We&2)===0&&gr(e,0):Xo|=i,_r===Ue&&(_r=0)),Cn(e)}function Ud(e,t){t===0&&(t=Mc()),e=xi(e,t),e!==null&&(Br(e,t),Cn(e))}function _v(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ud(e,i)}function mv(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Ud(e,i)}function gv(e,t){return vn(e,t)}var Hl=null,Sr=null,iu=!1,Nl=!1,ru=!1,ci=0;function Cn(e){e!==Sr&&e.next===null&&(Sr===null?Hl=Sr=e:Sr=Sr.next=e),Nl=!0,iu||(iu=!0,Sv())}function ps(e,t){if(!ru&&Nl){ru=!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,j=r.pingedLanes;y=(1<<31-Je(42|e)+1)-1,y&=f&~(D&~j),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,qd(r,y))}else y=Ue,y=Ps(r,r===et?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||Or(r,y)||(i=!0,qd(r,y));r=r.next}while(i);ru=!1}}function vv(){Id()}function Id(){Nl=iu=!1;var e=0;ci!==0&&Dv()&&(e=ci);for(var t=ot(),i=null,r=Hl;r!==null;){var f=r.next,y=Pd(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}vt!==0&&vt!==5||ps(e),ci!==0&&(ci=0)}function Pd(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var D=31-Je(y),j=1<<D,W=f[D];W===-1?((j&i)===0||(j&r)!==0)&&(f[D]=Gm(j,t)):W<=t&&(e.expiredLanes|=j),y&=~j}if(t=et,i=Ue,i=Ps(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&En(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&&En(r),va(i)){case 2:case 8:i=ve;break;case 32:i=Ce;break;case 268435456:i=Be;break;default:i=Ce}return r=Fd.bind(null,e),i=vn(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&En(r),e.callbackPriority=2,e.callbackNode=null,2}function Fd(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(zl()&&e.callbackNode!==i)return null;var r=Ue;return r=Ps(e,e===et?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wd(e,r,t),Pd(e,ot()),e.callbackNode!=null&&e.callbackNode===i?Fd.bind(null,e):null)}function qd(e,t){if(zl())return null;wd(e,t,!0)}function Sv(){Lv(function(){(We&6)!==0?vn(ae,vv):Id()})}function su(){if(ci===0){var e=rr;e===0&&(e=js,js<<=1,(js&261888)===0&&(js=256)),ci=e}return ci}function Vd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gs(""+e)}function Gd(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function yv(e,t,i,r,f){if(t==="submit"&&i&&i.stateNode===f){var y=Vd((f[zt]||null).action),D=r.submitter;D&&(t=(t=D[zt]||null)?Vd(t.formAction):D.getAttribute("formAction"),t!==null&&(y=t,D=null));var j=new Xs("action","action",null,r,f);e.push({event:j,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ci!==0){var W=D?Gd(f,D):new FormData(f);Eo(i,{pending:!0,data:W,method:f.method,action:y},null,W)}}else typeof y=="function"&&(j.preventDefault(),W=D?Gd(f,D):new FormData(f),Eo(i,{pending:!0,data:W,method:f.method,action:y},y,W))},currentTarget:f}]})}}for(var lu=0;lu<Pa.length;lu++){var au=Pa[lu],bv=au.toLowerCase(),Cv=au[0].toUpperCase()+au.slice(1);fn(bv,"on"+Cv)}fn(bh,"onAnimationEnd"),fn(Ch,"onAnimationIteration"),fn(wh,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(jg,"onTransitionRun"),fn(Ug,"onTransitionStart"),fn(Ig,"onTransitionCancel"),fn(xh,"onTransitionEnd"),Vi("onMouseEnter",["mouseout","mouseover"]),Vi("onMouseLeave",["mouseout","mouseover"]),Vi("onPointerEnter",["pointerout","pointerover"]),Vi("onPointerLeave",["pointerout","pointerover"]),yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yi("onBeforeInput",["compositionend","keypress","textInput","paste"]),yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _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(" "),wv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_s));function Yd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],f=r.event;r=r.listeners;e:{var y=void 0;if(t)for(var D=r.length-1;0<=D;D--){var j=r[D],W=j.instance,ne=j.currentTarget;if(j=j.listener,W!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=ne;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=W}else for(D=0;D<r.length;D++){if(j=r[D],W=j.instance,ne=j.currentTarget,j=j.listener,W!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=ne;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=W}}}}function He(e,t){var i=t[Sa];i===void 0&&(i=t[Sa]=new Set);var r=e+"__bubble";i.has(r)||(Wd(t,e,2,!1),i.add(r))}function ou(e,t,i){var r=0;t&&(r|=4),Wd(i,e,r,t)}var jl="_reactListening"+Math.random().toString(36).slice(2);function uu(e){if(!e[jl]){e[jl]=!0,Uc.forEach(function(i){i!=="selectionchange"&&(wv.has(i)||ou(i,!1,e),ou(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jl]||(t[jl]=!0,ou("selectionchange",!1,t))}}function Wd(e,t,i,r){switch(Cp(t)){case 2:var f=Qv;break;case 8:f=Zv;break;default:f=xu}i=f.bind(null,t,i,e),f=void 0,!Ta||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 cu(e,t,i,r,f){var y=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var D=r.tag;if(D===3||D===4){var j=r.stateNode.containerInfo;if(j===f)break;if(D===4)for(D=r.return;D!==null;){var W=D.tag;if((W===3||W===4)&&D.stateNode.containerInfo===f)return;D=D.return}for(;j!==null;){if(D=Pi(j),D===null)return;if(W=D.tag,W===5||W===6||W===26||W===27){r=y=D;continue e}j=j.parentNode}}r=r.return}Qc(function(){var ne=y,oe=ka(i),he=[];e:{var re=Eh.get(e);if(re!==void 0){var se=Xs,Se=e;switch(e){case"keypress":if(Ws(i)===0)break e;case"keydown":case"keyup":se=mg;break;case"focusin":Se="focus",se=Ma;break;case"focusout":Se="blur",se=Ma;break;case"beforeblur":case"afterblur":se=Ma;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=eh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=rg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Sg;break;case bh:case Ch:case wh:se=ag;break;case xh:se=bg;break;case"scroll":case"scrollend":se=ng;break;case"wheel":se=wg;break;case"copy":case"cut":case"paste":se=ug;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=nh;break;case"toggle":case"beforetoggle":se=Eg}var ke=(t&4)!==0,Ze=!ke&&(e==="scroll"||e==="scrollend"),J=ke?re!==null?re+"Capture":null:re;ke=[];for(var $=ne,te;$!==null;){var ce=$;if(te=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||te===null||J===null||(ce=Nr($,J),ce!=null&&ke.push(ms($,ce,te))),Ze)break;$=$.return}0<ke.length&&(re=new se(re,Se,null,i,oe),he.push({event:re,listeners:ke}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",re&&i!==Ea&&(Se=i.relatedTarget||i.fromElement)&&(Pi(Se)||Se[Ii]))break e;if((se||re)&&(re=oe.window===oe?oe:(re=oe.ownerDocument)?re.defaultView||re.parentWindow:window,se?(Se=i.relatedTarget||i.toElement,se=ne,Se=Se?Pi(Se):null,Se!==null&&(Ze=C(Se),ke=Se.tag,Se!==Ze||ke!==5&&ke!==27&&ke!==6)&&(Se=null)):(se=null,Se=ne),se!==Se)){if(ke=eh,ce="onMouseLeave",J="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ke=nh,ce="onPointerLeave",J="onPointerEnter",$="pointer"),Ze=se==null?re:Hr(se),te=Se==null?re:Hr(Se),re=new ke(ce,$+"leave",se,i,oe),re.target=Ze,re.relatedTarget=te,ce=null,Pi(oe)===ne&&(ke=new ke(J,$+"enter",Se,i,oe),ke.target=te,ke.relatedTarget=Ze,ce=ke),Ze=ce,se&&Se)t:{for(ke=xv,J=se,$=Se,te=0,ce=J;ce;ce=ke(ce))te++;ce=0;for(var we=$;we;we=ke(we))ce++;for(;0<te-ce;)J=ke(J),te--;for(;0<ce-te;)$=ke($),ce--;for(;te--;){if(J===$||$!==null&&J===$.alternate){ke=J;break t}J=ke(J),$=ke($)}ke=null}else ke=null;se!==null&&Kd(he,re,se,ke,!1),Se!==null&&Ze!==null&&Kd(he,Ze,Se,ke,!0)}}e:{if(re=ne?Hr(ne):window,se=re.nodeName&&re.nodeName.toLowerCase(),se==="select"||se==="input"&&re.type==="file")var Ge=ch;else if(oh(re))if(hh)Ge=zg;else{Ge=Og;var be=Mg}else se=re.nodeName,!se||se.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&xa(ne.elementType)&&(Ge=ch):Ge=Bg;if(Ge&&(Ge=Ge(e,ne))){uh(he,Ge,i,oe);break e}be&&be(e,re,ne),e==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&wa(re,"number",re.value)}switch(be=ne?Hr(ne):window,e){case"focusin":(oh(be)||be.contentEditable==="true")&&($i=be,ja=ne,Gr=null);break;case"focusout":Gr=ja=$i=null;break;case"mousedown":Ua=!0;break;case"contextmenu":case"mouseup":case"dragend":Ua=!1,Sh(he,i,oe);break;case"selectionchange":if(Ng)break;case"keydown":case"keyup":Sh(he,i,oe)}var Me;if(Ba)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Xi?lh(e,i)&&(Ie="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ie="onCompositionStart");Ie&&(ih&&i.locale!=="ko"&&(Xi||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Xi&&(Me=Zc()):(Kn=oe,Da="value"in Kn?Kn.value:Kn.textContent,Xi=!0)),be=Ul(ne,Ie),0<be.length&&(Ie=new th(Ie,e,null,i,oe),he.push({event:Ie,listeners:be}),Me?Ie.data=Me:(Me=ah(i),Me!==null&&(Ie.data=Me)))),(Me=Ag?Tg(e,i):Dg(e,i))&&(Ie=Ul(ne,"onBeforeInput"),0<Ie.length&&(be=new th("onBeforeInput","beforeinput",null,i,oe),he.push({event:be,listeners:Ie}),be.data=Me)),yv(he,e,ne,i,oe)}Yd(he,t)})}function ms(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Ul(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 xv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kd(e,t,i,r,f){for(var y=t._reactName,D=[];i!==null&&i!==r;){var j=i,W=j.alternate,ne=j.stateNode;if(j=j.tag,W!==null&&W===r)break;j!==5&&j!==26&&j!==27||ne===null||(W=ne,f?(ne=Nr(i,y),ne!=null&&D.unshift(ms(i,ne,W))):f||(ne=Nr(i,y),ne!=null&&D.push(ms(i,ne,W)))),i=i.return}D.length!==0&&e.push({event:t,listeners:D})}var Ev=/\r\n?/g,kv=/\u0000|\uFFFD/g;function Xd(e){return(typeof e=="string"?e:""+e).replace(Ev,`
|
|
49
|
-
`).replace(kv,"")}function $d(e,t){return t=Xd(t),Xd(e)===t}function Qe(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":Xc(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"&&Qe(e,t,"name",f.name,f,null),Qe(e,t,"formEncType",f.formEncType,f,null),Qe(e,t,"formMethod",f.formMethod,f,null),Qe(e,t,"formTarget",f.formTarget,f,null)):(Qe(e,t,"encType",f.encType,f,null),Qe(e,t,"method",f.method,f,null),Qe(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=An);break;case"onScroll":r!=null&&He("scroll",e);break;case"onScrollEnd":r!=null&&He("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":He("beforetoggle",e),He("toggle",e),Fs(e,"popover",r);break;case"xlinkActuate":kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":kn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":kn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":kn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":kn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":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=eg.get(i)||i,Fs(e,i,r))}}function hu(e,t,i,r,f,y){switch(i){case"style":Xc(e,r,y);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Yi(e,r):(typeof r=="number"||typeof r=="bigint")&&Yi(e,""+r);break;case"onScroll":r!=null&&He("scroll",e);break;case"onScrollEnd":r!=null&&He("scrollend",e);break;case"onClick":r!=null&&(e.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ic.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),y=e[zt]||null,y=y!=null?y[i]:null,typeof y=="function"&&e.removeEventListener(t,y,f),typeof r=="function")){typeof y!="function"&&y!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,f);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Fs(e,i,r)}}}function kt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("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:Qe(e,t,y,D,i,null)}}f&&Qe(e,t,"srcSet",i.srcSet,i,null),r&&Qe(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var j=y=D=f=null,W=null,ne=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":ne=oe;break;case"value":y=oe;break;case"defaultValue":j=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:Qe(e,t,r,oe,i,null)}}Gc(e,y,j,W,ne,D,f,!1);return;case"select":He("invalid",e),r=D=y=null;for(f in i)if(i.hasOwnProperty(f)&&(j=i[f],j!=null))switch(f){case"value":y=j;break;case"defaultValue":D=j;break;case"multiple":r=j;default:Qe(e,t,f,j,i,null)}t=y,i=D,e.multiple=!!r,t!=null?Gi(e,!!r,t,!1):i!=null&&Gi(e,!!r,i,!0);return;case"textarea":He("invalid",e),y=f=r=null;for(D in i)if(i.hasOwnProperty(D)&&(j=i[D],j!=null))switch(D){case"value":r=j;break;case"defaultValue":f=j;break;case"children":y=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:Qe(e,t,D,j,i,null)}Wc(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:Qe(e,t,W,r,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(r=0;r<_s.length;r++)He(_s[r],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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(ne in i)if(i.hasOwnProperty(ne)&&(r=i[ne],r!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,ne,r,i,null)}return;default:if(xa(t)){for(oe in i)i.hasOwnProperty(oe)&&(r=i[oe],r!==void 0&&hu(e,t,oe,r,i,void 0));return}}for(j in i)i.hasOwnProperty(j)&&(r=i[j],r!=null&&Qe(e,t,j,r,i,null))}function Av(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,y=null,D=null,j=null,W=null,ne=null,oe=null;for(se in i){var he=i[se];if(i.hasOwnProperty(se)&&he!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":W=he;default:r.hasOwnProperty(se)||Qe(e,t,se,null,r,he)}}for(var re in r){var se=r[re];if(he=i[re],r.hasOwnProperty(re)&&(se!=null||he!=null))switch(re){case"type":y=se;break;case"name":f=se;break;case"checked":ne=se;break;case"defaultChecked":oe=se;break;case"value":D=se;break;case"defaultValue":j=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:se!==he&&Qe(e,t,re,se,r,he)}}Ca(e,D,j,W,ne,oe,y,f);return;case"select":se=D=j=re=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)||Qe(e,t,y,null,r,W)}for(f in r)if(y=r[f],W=i[f],r.hasOwnProperty(f)&&(y!=null||W!=null))switch(f){case"value":re=y;break;case"defaultValue":j=y;break;case"multiple":D=y;default:y!==W&&Qe(e,t,f,y,r,W)}t=j,i=D,r=se,re!=null?Gi(e,!!i,re,!1):!!r!=!!i&&(t!=null?Gi(e,!!i,t,!0):Gi(e,!!i,i?[]:"",!1));return;case"textarea":se=re=null;for(j in i)if(f=i[j],i.hasOwnProperty(j)&&f!=null&&!r.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Qe(e,t,j,null,r,f)}for(D in r)if(f=r[D],y=i[D],r.hasOwnProperty(D)&&(f!=null||y!=null))switch(D){case"value":re=f;break;case"defaultValue":se=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==y&&Qe(e,t,D,f,r,y)}Yc(e,re,se);return;case"option":for(var Se in i)if(re=i[Se],i.hasOwnProperty(Se)&&re!=null&&!r.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:Qe(e,t,Se,null,r,re)}for(W in r)if(re=r[W],se=i[W],r.hasOwnProperty(W)&&re!==se&&(re!=null||se!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Qe(e,t,W,re,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)re=i[ke],i.hasOwnProperty(ke)&&re!=null&&!r.hasOwnProperty(ke)&&Qe(e,t,ke,null,r,re);for(ne in r)if(re=r[ne],se=i[ne],r.hasOwnProperty(ne)&&re!==se&&(re!=null||se!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:Qe(e,t,ne,re,r,se)}return;default:if(xa(t)){for(var Ze in i)re=i[Ze],i.hasOwnProperty(Ze)&&re!==void 0&&!r.hasOwnProperty(Ze)&&hu(e,t,Ze,void 0,r,re);for(oe in r)re=r[oe],se=i[oe],!r.hasOwnProperty(oe)||re===se||re===void 0&&se===void 0||hu(e,t,oe,re,r,se);return}}for(var J in i)re=i[J],i.hasOwnProperty(J)&&re!=null&&!r.hasOwnProperty(J)&&Qe(e,t,J,null,r,re);for(he in r)re=r[he],se=i[he],!r.hasOwnProperty(he)||re===se||re==null&&se==null||Qe(e,t,he,re,r,se)}function Qd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Tv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var f=i[r],y=f.transferSize,D=f.initiatorType,j=f.duration;if(y&&j&&Qd(D)){for(D=0,j=f.responseEnd,r+=1;r<i.length;r++){var W=i[r],ne=W.startTime;if(ne>j)break;var oe=W.transferSize,he=W.initiatorType;oe&&Qd(he)&&(W=W.responseEnd,D+=oe*(W<j?1:(j-ne)/(W-ne)))}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 fu=null,du=null;function Il(e){return e.nodeType===9?e:e.ownerDocument}function Zd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function pu(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 _u=null;function Dv(){var e=window.event;return e&&e.type==="popstate"?e===_u?!1:(_u=e,!0):(_u=null,!1)}var ep=typeof setTimeout=="function"?setTimeout:void 0,Rv=typeof clearTimeout=="function"?clearTimeout:void 0,tp=typeof Promise=="function"?Promise:void 0,Lv=typeof queueMicrotask=="function"?queueMicrotask:typeof tp<"u"?function(e){return tp.resolve(null).then(e).catch(Mv)}:ep;function Mv(e){setTimeout(function(){throw e})}function hi(e){return e==="head"}function np(e,t){var i=t,r=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(f),wr(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")gs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,gs(i);for(var y=i.firstChild;y;){var D=y.nextSibling,j=y.nodeName;y[zr]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=D}}else i==="body"&&gs(e.ownerDocument.body);i=f}while(i);wr(t)}function ip(e,t){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function mu(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":mu(i),ya(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Ov(e,t,i,r){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[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=on(e.nextSibling),e===null)break}return null}function Bv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=on(e.nextSibling),e===null))return null;return e}function rp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=on(e.nextSibling),e===null))return null;return e}function gu(e){return e.data==="$?"||e.data==="$~"}function vu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function on(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Su=null;function sp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return on(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function lp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function ap(e,t,i){switch(t=Il(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]);ya(e)}var un=new Map,op=new Set;function Pl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=X.d;X.d={f:Hv,r:Nv,D:jv,C:Uv,L:Iv,m:Pv,X:qv,S:Fv,M:Vv};function Hv(){var e=qn.f(),t=Ml();return e||t}function Nv(e){var t=Fi(e);t!==null&&t.tag===5&&t.type==="form"?Ef(t):qn.r(e)}var yr=typeof document>"u"?null:document;function up(e,t,i){var r=yr;if(r&&typeof t=="string"&&t){var f=en(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),op.has(f)||(op.add(f),e={rel:e,crossOrigin:i,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function jv(e){qn.D(e),up("dns-prefetch",e,null)}function Uv(e,t){qn.C(e,t),up("preconnect",e,t)}function Iv(e,t,i){qn.L(e,t,i);var r=yr;if(r&&e&&t){var f='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+en(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+en(i.imageSizes)+'"]')):f+='[href="'+en(e)+'"]';var y=f;switch(t){case"style":y=br(e);break;case"script":y=Cr(e)}un.has(y)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),un.set(y,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(vs(y))||t==="script"&&r.querySelector(Ss(y))||(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function Pv(e,t){qn.m(e,t);var i=yr;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+en(r)+'"][href="'+en(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Cr(e)}if(!un.has(y)&&(e=c({rel:"modulepreload",href:e},t),un.set(y,e),i.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ss(y)))return}r=i.createElement("link"),kt(r,"link",e),St(r),i.head.appendChild(r)}}}function Fv(e,t,i){qn.S(e,t,i);var r=yr;if(r&&e){var f=qi(r).hoistableStyles,y=br(e);t=t||"default";var D=f.get(y);if(!D){var j={loading:0,preload:null};if(D=r.querySelector(vs(y)))j.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=un.get(y))&&yu(e,i);var W=D=r.createElement("link");St(W),kt(W,"link",e),W._p=new Promise(function(ne,oe){W.onload=ne,W.onerror=oe}),W.addEventListener("load",function(){j.loading|=1}),W.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Fl(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:j},f.set(y,D)}}}function qv(e,t){qn.X(e,t);var i=yr;if(i&&e){var r=qi(i).hoistableScripts,f=Cr(e),y=r.get(f);y||(y=i.querySelector(Ss(f)),y||(e=c({src:e,async:!0},t),(t=un.get(f))&&bu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function Vv(e,t){qn.M(e,t);var i=yr;if(i&&e){var r=qi(i).hoistableScripts,f=Cr(e),y=r.get(f);y||(y=i.querySelector(Ss(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=un.get(f))&&bu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function cp(e,t,i,r){var f=(f=de.current)?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),un.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},un.set(e,i),y||Gv(f,e,i,D.state))),t&&r===null)throw Error(o(528,""));return D}if(t&&r!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Cr(i),i=qi(f).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function br(e){return'href="'+en(e)+'"'}function vs(e){return'link[rel="stylesheet"]['+e+"]"}function hp(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function Gv(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),kt(t,"link",i),St(t),e.head.appendChild(t))}function Cr(e){return'[src="'+en(e)+'"]'}function Ss(e){return"script[async]"+e}function fp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+en(i.href)+'"]');if(r)return t.instance=r,St(r),r;var f=c({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),St(r),kt(r,"style",f),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,St(y),y;r=hp(i),(f=un.get(f))&&yu(r,f),y=(e.ownerDocument||e).createElement("link"),St(y);var D=y;return D._p=new Promise(function(j,W){D.onload=j,D.onerror=W}),kt(y,"link",r),t.state.loading|=4,Fl(y,i.precedence,e),t.instance=y;case"script":return y=Cr(i.src),(f=e.querySelector(Ss(y)))?(t.instance=f,St(f),f):(r=i,(f=un.get(y))&&(r=c({},i),bu(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),St(f),kt(f,"link",r),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,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 j=r[D];if(j.dataset.precedence===t)y=j;else if(y!==f)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bu(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 dp(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[Ct]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var D=y.getAttribute(t)||"";D=e+D;var j=r.get(D);j?j.push(y):r.set(D,[y])}}return r}function pp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Yv(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function _p(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Wv(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=br(r.href),y=t.querySelector(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,St(y);return}y=t.ownerDocument||t,r=hp(r),(f=un.get(f))&&yu(r,f),y=y.createElement("link"),St(y);var D=y;D._p=new Promise(function(j,W){D.onload=j,D.onerror=W}),kt(y,"link",r),i.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Vl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Cu=0;function Kv(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&&Cu===0&&(Cu=62500*Tv());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>Cu?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(Xv,e),Gl=null,Vl.call(e))}function Xv(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:g,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function $v(e,t,i,r,f,y,D,j,W){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ma(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ma(0),this.hiddenUpdates=ma(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 mp(e,t,i,r,f,y,D,j,W,ne,oe,he){return e=new $v(e,t,i,D,W,ne,oe,he,j),t=1,y===!0&&(t|=24),y=Gt(3,null,null,t),e.current=y,y.stateNode=e,t=eo(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:r,isDehydrated:i,cache:t},ro(y),e}function gp(e){return e?(e=Ji,e):Ji}function vp(e,t,i,r,f,y){f=gp(f),r.context===null?r.context=f:r.pendingContext=f,r=ei(t),r.payload={element:i},y=y===void 0?null:y,y!==null&&(r.callback=y),i=ti(e,r,t),i!==null&&(Pt(i,e,t),Zr(i,e,t))}function Sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function wu(e,t){Sp(e,t),(e=e.alternate)&&Sp(e,t)}function yp(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Pt(t,e,67108864),wu(e,67108864)}}function bp(e){if(e.tag===13||e.tag===31){var t=$t();t=ga(t);var i=xi(e,t);i!==null&&Pt(i,e,t),wu(e,t)}}var Wl=!0;function Qv(e,t,i,r){var f=F.T;F.T=null;var y=X.p;try{X.p=2,xu(e,t,i,r)}finally{X.p=y,F.T=f}}function Zv(e,t,i,r){var f=F.T;F.T=null;var y=X.p;try{X.p=8,xu(e,t,i,r)}finally{X.p=y,F.T=f}}function xu(e,t,i,r){if(Wl){var f=Eu(r);if(f===null)cu(e,t,r,Kl,i),wp(e,r);else if(e0(f,e,t,i,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Jv.indexOf(e)){for(;f!==null;){var y=Fi(f);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var D=Si(y.pendingLanes);if(D!==0){var j=y;for(j.pendingLanes|=2,j.entangledLanes|=2;D;){var W=1<<31-Je(D);j.entanglements[1]|=W,D&=~W}Cn(y),(We&6)===0&&(Rl=ot()+500,ps(0))}}break;case 31:case 13:j=xi(y,2),j!==null&&Pt(j,y,2),Ml(),wu(y,2)}if(y=Eu(r),y===null&&cu(e,t,r,Kl,i),y===f)break;f=y}f!==null&&r.stopPropagation()}else cu(e,t,r,null,i)}}function Eu(e){return e=ka(e),ku(e)}var Kl=null;function ku(e){if(Kl=null,e=Pi(e),e!==null){var t=C(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 Cp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ot()){case ae:return 2;case ve:return 8;case Ce:case Re:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Au=!1,fi=null,di=null,pi=null,bs=new Map,Cs=new Map,_i=[],Jv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function wp(e,t){switch(e){case"focusin":case"focusout":fi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":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&&yp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function e0(e,t,i,r,f){switch(t){case"focusin":return fi=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 xp(e){var t=Pi(e.target);if(t!==null){var i=C(t);if(i!==null){if(t=i.tag,t===13){if(t=_(i),t!==null){e.blockedOn=t,Nc(e.priority,function(){bp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Nc(e.priority,function(){bp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Eu(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);Ea=r,i.target.dispatchEvent(r),Ea=null}else return t=Fi(i),t!==null&&yp(t),e.blockedOn=i,!1;t.shift()}return!0}function Ep(e,t,i){Xl(e)&&i.delete(t)}function t0(){Au=!1,fi!==null&&Xl(fi)&&(fi=null),di!==null&&Xl(di)&&(di=null),pi!==null&&Xl(pi)&&(pi=null),bs.forEach(Ep),Cs.forEach(Ep)}function $l(e,t){e.blockedOn===t&&(e.blockedOn=null,Au||(Au=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,t0)))}var Ql=null;function kp(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(ku(r||i)===null)continue;break}var y=Fi(i);y!==null&&(e.splice(t,3),t-=3,Eo(y,{pending:!0,data:f,method:i.method,action:r},r,f))}}))}function wr(e){function t(W){return $l(W,e)}fi!==null&&$l(fi,e),di!==null&&$l(di,e),pi!==null&&$l(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);)xp(i),i.blockedOn===null&&_i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var f=i[r],y=i[r+1],D=f[zt]||null;if(typeof y=="function")D||kp(i);else if(D){var j=null;if(y&&y.hasAttribute("formAction")){if(f=y,D=y[zt]||null)j=D.formAction;else if(ku(f)!==null)continue}else j=D.action;typeof j=="function"?i[r+1]=j:(i.splice(r,3),r-=3),kp(i)}}}function Ap(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(D){return f=D})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Tu(e){this._internalRoot=e}Zl.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,r=$t();vp(i,r,e,t,null,null)},Zl.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vp(e.current,2,null,e,null,null),Ml(),t[Ii]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hc();e={blockedOn:null,target:e,priority:t};for(var i=0;i<_i.length&&t!==0&&t<_i[i].priority;i++);_i.splice(i,0,e),i===0&&xp(e)}};var Tp=s.version;if(Tp!=="19.2.6")throw Error(o(527,Tp,"19.2.6"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var n0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jl.isDisabled&&Jl.supportsFiber)try{bt=Jl.inject(n0),gt=Jl}catch{}}return Es.createRoot=function(e,t){if(!v(e))throw Error(o(299));var i=!1,r="",f=zf,y=Hf,D=Nf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(y=t.onCaughtError),t.onRecoverableError!==void 0&&(D=t.onRecoverableError)),t=mp(e,1,!1,null,null,i,r,null,f,y,D,Ap),e[Ii]=t.current,uu(e),new Tu(t)},Es.hydrateRoot=function(e,t,i){if(!v(e))throw Error(o(299));var r=!1,f="",y=zf,D=Hf,j=Nf,W=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(D=i.onCaughtError),i.onRecoverableError!==void 0&&(j=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=mp(e,1,!0,t,i??null,r,f,W,y,D,j,Ap),t.context=gp(null),i=t.current,r=$t(),r=ga(r),f=ei(r),f.callback=null,ti(i,f,r),i=r,t.current.lanes=i,Br(t,i),Cn(t),e[Ii]=t.current,uu(e),new Zl(t)},Es.version="19.2.6",Es}var Up;function p0(){if(Up)return Lu.exports;Up=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Lu.exports=d0(),Lu.exports}var _0=p0();function m0({sidebar:n,children:s}){const[l,o]=me.useState(!1);return I.jsxs("div",{className:l?"app-shell is-sidebar-collapsed":"app-shell",children:[I.jsxs("aside",{className:"app-sidebar",children:[I.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":l?"Expand sidebar":"Collapse sidebar",title:l?"Expand sidebar":"Collapse sidebar",onClick:()=>o(v=>!v)}),I.jsx("div",{className:"sidebar-content",children:n})]}),I.jsx("main",{className:"app-main",children:s})]})}function g0(n,s){return n.find(l=>l.taskSlug===s)??n[0]??null}const De={getAppPreferences(){return Fe("/api/settings/preferences")},updateAppPreferences(n){return Fe("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return Fe("/api/projects/current")},getRecentRepositoryPaths(){return Fe("/api/projects/recent")},connectProject(n){return Fe("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Fe("/api/tasks")},createTask(n){return Fe("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,s={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return Fe("/api/projects/harness")},applyHarness(){return Fe("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return Fe("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Fe("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(n,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTaskRoundState(n){return Fe(`/api/tasks/${encodeURIComponent(n)}/round`)},getTranslationSettings(){return Fe("/api/translation/settings")},updateTranslationSettings(n){return Fe("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return Fe("/api/translation/prompts")},testTranslationProvider(){return Fe("/api/translation/test",{method:"POST"})},startTranslationSession(n,s){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/start`,{method:"POST"})},pollTranslationSession(n,s,l){const o=new URLSearchParams({after:String(s)});return l!==void 0&&o.set("limit",String(l)),Fe(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,s,l){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(n,s,l){return Fe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(n){return Fe(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,s){return Fe(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(s)}`,{method:"POST"})}};async function Fe(n,s={}){var v,C;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}`:((C=_==null?void 0:_.error)==null?void 0:C.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function v0({events:n,maxEvents:s=8,showHeader:l=!0}){const o=s===null?n:n.slice(-s);return I.jsxs("section",{className:"event-log",children:[l?I.jsx("h2",{children:"Events"}):null,n.length===0?I.jsx("p",{className:"muted",children:"No terminal events yet."}):I.jsx("ol",{children:o.map((v,C)=>I.jsx("li",{children:v},`${v}-${C}`))})]})}var zu={exports:{}},Ip;function S0(){return Ip||(Ip=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 C=this._terminal._core;this._terminal.rows===v.rows&&this._terminal.cols===v.cols||(C._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,C=v._renderService.dimensions;if(C.css.cell.width===0||C.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"))),b=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-_;return{cols:Math.max(2,Math.floor(b/C.css.cell.width)),rows:Math.max(1,Math.floor(c/C.css.cell.height))}}}})(),l})()))})(zu)),zu.exports}var y0=S0(),Hu={exports:{}},Pp;function b0(){return Pp||(Pp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={6:(_,a)=>{function u(d){try{const c=new URL(d),b=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(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(d,c,b,w={}){this._terminal=d,this._regex=c,this._handler=b,this._options=w}provideLinks(d,c){const b=h.computeLink(d,this._regex,this._terminal,this._handler);c(this._addCallbacks(b))}_addCallbacks(d){return d.map((c=>(c.leave=this._options.leave,c.hover=(b,w)=>{if(this._options.hover){const{range:k}=c;this._options.hover(b,w,k)}},c)))}};class h{static computeLink(c,b,w,k){const x=new RegExp(b.source,(b.flags||"")+"g"),[S,m]=h._getWindowedLineStrings(c-1,w),p=S.join("");let g;const E=[];for(;g=x.exec(p);){const R=g[0];if(!u(R))continue;const[A,L]=h._mapStrIdx(w,m,0,g.index),[T,z]=h._mapStrIdx(w,A,L,R.length);if(A===-1||L===-1||T===-1||z===-1)continue;const N={start:{x:L+1,y:A+1},end:{x:z,y:T+1}};E.push({range:N,text:R,activate:k})}return E}static _getWindowedLineStrings(c,b){let w,k=c,x=c,S=0,m="";const p=[];if(w=b.buffer.active.getLine(c)){const g=w.translateToString(!0);if(w.isWrapped&&g[0]!==" "){for(S=0;(w=b.buffer.active.getLine(--k))&&S<2048&&(m=w.translateToString(!0),S+=m.length,p.push(m),w.isWrapped&&m.indexOf(" ")===-1););p.reverse()}for(p.push(g),S=0;(w=b.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(m=w.translateToString(!0),S+=m.length,p.push(m),m.indexOf(" ")===-1););}return[p,k]}static _mapStrIdx(c,b,w,k){const x=c.buffer.active,S=x.getNullCell();let m=w;for(;k;){const p=x.getLine(b);if(!p)return[-1,-1];for(let g=m;g<p.length;++g){p.getCell(g,S);const E=S.getChars();if(S.getWidth()&&(k-=E.length||1,g===p.length-1&&E==="")){const R=x.getLine(b+1);R&&R.isWrapped&&(R.getCell(0,S),S.getWidth()===2&&(k+=1))}if(k<0)return[b,g]}b++,m=0}return[b,m]}}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 C={};return(()=>{var _=C;Object.defineProperty(_,"__esModule",{value:!0}),_.WebLinksAddon=void 0;const a=v(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,c){const b=window.open();if(b){try{b.opener=null}catch{}b.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,b=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,c))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),C})()))})(Hu)),Hu.exports}var C0=b0(),Nu={exports:{}},Fp;function w0(){return Fp||(Fp=1,(function(n,s){(function(l,o){n.exports=o()})(globalThis,(()=>(()=>{var l={4567:function(_,a,u){var h=this&&this.__decorate||function(p,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,g,E,R);else for(var z=p.length-1;z>=0;z--)(A=p[z])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},d=this&&this.__param||function(p,g){return function(E,R){g(E,R,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const c=u(9042),b=u(9924),w=u(844),k=u(4725),x=u(2585),S=u(3656);let m=a.AccessibilityManager=class extends w.Disposable{constructor(p,g,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 b.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((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 g=0;g<p;g++)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,g){this._liveRegionDebouncer.refresh(p,g,this._terminal.rows)}_renderRows(p,g){const E=this._terminal.buffer,R=E.lines.length.toString();for(let A=p;A<=g;A++){const L=E.lines.get(E.ydisp+A),T=[],z=(L==null?void 0:L.translateToString(!0,void 0,void 0,T))||"",N=(E.ydisp+A+1).toString(),q=this._rowElements[A];q&&(z.length===0?(q.innerText=" ",this._rowColumns.set(q,[0,1])):(q.textContent=z,this._rowColumns.set(q,T)),q.setAttribute("aria-posinset",N),q.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(p,g){const E=p.target,R=this._rowElements[g===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||p.relatedTarget!==R)return;let A,L;if(g===0?(A=E,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(A=this._rowElements.shift(),L=E,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),p.preventDefault(),p.stopImmediatePropagation()}_handleSelectionChange(){var z;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 g={node:p.anchorNode,offset:p.anchorOffset},E={node:p.focusNode,offset:p.focusOffset};if((g.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||g.node===E.node&&g.offset>E.offset)&&([g,E]=[E,g]),g.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(g={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(g.node))return;const R=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:R,offset:((z=R.textContent)==null?void 0:z.length)??0}),!this._rowContainer.contains(E.node))return;const A=({node:N,offset:q})=>{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 Q=this._rowColumns.get(G);if(!Q)return console.warn("columns is null. Race condition?"),null;let Y=q<Q.length?Q[q]:Q.slice(-1)[0]+1;return Y>=this._terminal.cols&&(++V,Y=0),{row:V,column:Y}},L=A(g),T=A(E);if(L&&T){if(L.row>T.row||L.row===T.row&&L.column>=T.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(T.row-L.row)*this._terminal.cols-L.column+T.column)}}_handleResize(p){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>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=m=h([d(1,x.IInstantiationService),d(2,k.ICoreBrowserService),d(3,k.IRenderService)],m)},3614:(_,a)=>{function u(b){return b.replace(/\r?\n/g,"\r")}function h(b,w){return w?"\x1B[200~"+b+"\x1B[201~":b}function d(b,w,k,x){b=h(b=u(b),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(b,!0),w.value=""}function c(b,w,k){const x=k.getBoundingClientRect(),S=b.clientX-x.left-10,m=b.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${S}px`,w.style.top=`${m}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=h,a.copyHandler=function(b,w){b.clipboardData&&b.clipboardData.setData("text/plain",w.selectionText),b.preventDefault()},a.handlePasteEvent=function(b,w,k,x){b.stopPropagation(),b.clipboardData&&d(b.clipboardData.getData("text/plain"),w,k,x)},a.paste=d,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(b,w,k,x,S){c(b,w,k),S&&x.rightClickSelect(b),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,b){this._css.set(d,c,b)}getCss(d,c){return this._css.get(d,c)}setColor(d,c,b){this._color.set(d,c,b)}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 b=!1;return{dispose:()=>{b||(b=!0,u.removeEventListener(h,d,c))}}}},3551:function(_,a,u){var h=this&&this.__decorate||function(m,p,g,E){var R,A=arguments.length,L=A<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,p,g,E);else for(var T=m.length-1;T>=0;T--)(R=m[T])&&(L=(A<3?R(L):A>3?R(p,g,L):R(p,g))||L);return A>3&&L&&Object.defineProperty(p,g,L),L},d=this&&this.__param||function(m,p){return function(g,E){p(g,E,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=u(3656),b=u(8460),w=u(844),k=u(2585),x=u(4725);let S=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(m,p,g,E,R){super(),this._element=m,this._mouseService=p,this._renderService=g,this._bufferService=E,this._linkProviderService=R,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(m){this._lastMouseEvent=m;const p=this._positionFromMouseEvent(m,this._element,this._mouseService);if(!p)return;this._isMouseOut=!1;const g=m.composedPath();for(let E=0;E<g.length;E++){const R=g[E];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&p.x===this._lastBufferCell.x&&p.y===this._lastBufferCell.y||(this._handleHover(p),this._lastBufferCell=p)}_handleHover(m){if(this._activeLine!==m.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(m,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,m)||(this._clearCurrentLink(),this._askForLink(m,!0))}_askForLink(m,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=m.y);let g=!1;for(const[A,L]of this._linkProviderService.linkProviders.entries())p?(R=this._activeProviderReplies)!=null&&R.get(A)&&(g=this._checkLinkProviderResult(A,m,g)):L.provideLinks(m.y,(T=>{var N,q;if(this._isMouseOut)return;const z=T==null?void 0:T.map((G=>({link:G})));(N=this._activeProviderReplies)==null||N.set(A,z),g=this._checkLinkProviderResult(A,m,g),((q=this._activeProviderReplies)==null?void 0:q.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(m.y,this._activeProviderReplies)}))}_removeIntersectingLinks(m,p){const g=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<m?0:L.link.range.start.x,z=L.link.range.end.y>m?this._bufferService.cols:L.link.range.end.x;for(let N=T;N<=z;N++){if(g.has(N)){R.splice(A--,1);break}g.add(N)}}}}_checkLinkProviderResult(m,p,g){var A;if(!this._activeProviderReplies)return g;const E=this._activeProviderReplies.get(m);let R=!1;for(let L=0;L<m;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&E){const L=E.find((T=>this._linkAtPosition(T.link,p)));L&&(g=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!g)for(let L=0;L<this._activeProviderReplies.size;L++){const T=(A=this._activeProviderReplies.get(L))==null?void 0:A.find((z=>this._linkAtPosition(z.link,p)));if(T){g=!0,this._handleNewLink(T);break}}return g}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(m){if(!this._currentLink)return;const p=this._positionFromMouseEvent(m,this._element,this._mouseService);p&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,p)&&this._currentLink.link.activate(m,this._currentLink.link.text)}_clearCurrentLink(m,p){this._currentLink&&this._lastMouseEvent&&(!m||!p||this._currentLink.link.range.start.y>=m&&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(m){if(!this._lastMouseEvent)return;const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._linkAtPosition(m.link,p)&&(this._currentLink=m,this._currentLink.state={decorations:{underline:m.link.decorations===void 0||m.link.decorations.underline,pointerCursor:m.link.decorations===void 0||m.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,m.link,this._lastMouseEvent),m.link.decorations={},Object.defineProperties(m.link.decorations,{pointerCursor:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.pointerCursor},set:g=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==g&&(this._currentLink.state.decorations.pointerCursor=g,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",g))}},underline:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.underline},set:g=>{var E,R,A;(E=this._currentLink)!=null&&E.state&&((A=(R=this._currentLink)==null?void 0:R.state)==null?void 0:A.decorations.underline)!==g&&(this._currentLink.state.decorations.underline=g,this._currentLink.state.isHovered&&this._fireUnderlineEvent(m.link,g))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((g=>{if(!this._currentLink)return;const E=g.start===0?0:g.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+g.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(E,R),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(m,p,g){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&&m.classList.add("xterm-cursor-pointer")),p.hover&&p.hover(g,p.text)}_fireUnderlineEvent(m,p){const g=m.range,E=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(g.start.x-1,g.start.y-E-1,g.end.x,g.end.y-E-1,void 0);(p?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(m,p,g){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&&m.classList.remove("xterm-cursor-pointer")),p.leave&&p.leave(g,p.text)}_linkAtPosition(m,p){const g=m.range.start.y*this._bufferService.cols+m.range.start.x,E=m.range.end.y*this._bufferService.cols+m.range.end.x,R=p.y*this._bufferService.cols+p.x;return g<=R&&R<=E}_positionFromMouseEvent(m,p,g){const E=g.getCoords(m,p,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(m,p,g,E,R){return{x1:m,y1:p,x2:g,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,m,p){var g,E=arguments.length,R=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,m,p);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,m,R):g(S,m))||R);return E>3&&R&&Object.defineProperty(S,m,R),R},d=this&&this.__param||function(x,S){return function(m,p){S(m,p,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=u(511),b=u(2585);let w=a.OscLinkProvider=class{constructor(x,S,m){this._bufferService=x,this._optionsService=S,this._oscLinkService=m}provideLinks(x,S){var z;const m=this._bufferService.buffer.lines.get(x-1);if(!m)return void S(void 0);const p=[],g=this._optionsService.rawOptions.linkHandler,E=new c.CellData,R=m.getTrimmedLength();let A=-1,L=-1,T=!1;for(let N=0;N<R;N++)if(L!==-1||m.hasContent(N)){if(m.loadCell(N,E),E.hasExtendedAttrs()&&E.extended.urlId){if(L===-1){L=N,A=E.extended.urlId;continue}T=E.extended.urlId!==A}else L!==-1&&(T=!0);if(T||L!==-1&&N===R-1){const q=(z=this._oscLinkService.getLinkData(A))==null?void 0:z.uri;if(q){const G={start:{x:L+1,y:x},end:{x:N+(T||N!==R-1?0:1),y:x}};let V=!1;if(!(g!=null&&g.allowNonHttpProtocols))try{const Q=new URL(q);["http:","https:"].includes(Q.protocol)||(V=!0)}catch{V=!0}V||p.push({text:q,range:G,activate:(Q,Y)=>g?g.activate(Q,Y,G):k(0,Y),hover:(Q,Y)=>{var F;return(F=g==null?void 0:g.hover)==null?void 0:F.call(g,Q,Y,G)},leave:(Q,Y)=>{var F;return(F=g==null?void 0:g.leave)==null?void 0:F.call(g,Q,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 m=window.open();if(m){try{m.opener=null}catch{}m.location.href=S}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([d(0,b.IBufferService),d(1,b.IOptionsService),d(2,b.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),b=u(9042),w=u(3730),k=u(1680),x=u(3107),S=u(5744),m=u(2950),p=u(1296),g=u(428),E=u(4269),R=u(5114),A=u(8934),L=u(3230),T=u(9312),z=u(4725),N=u(6731),q=u(8055),G=u(8969),V=u(8460),Q=u(844),Y=u(6114),F=u(8437),X=u(2584),ee=u(7399),O=u(5941),M=u(9074),B=u(2585),P=u(5435),H=u(4567),ie=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 Q.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(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(z.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,le)=>this.refresh(U,le)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,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((U=>this._afterResize(U.cols,U.rows)))),this.register((0,Q.toDisposable)((()=>{var U,le;this._customKeyEventHandler=void 0,(le=(U=this.element)==null?void 0:U.parentNode)==null||le.removeChild(this.element)})))}_handleColorEvent(K){if(this._themeService)for(const U of K){let le,Z="";switch(U.index){case 256:le="foreground",Z="10";break;case 257:le="background",Z="11";break;case 258:le="cursor",Z="12";break;default:le="ansi",Z="4;"+U.index}switch(U.type){case 0:const pe=q.color.toColorRGB(le==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[le]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${Z};${(0,O.toRgbString)(pe)}${X.C1_ESCAPED.ST}`);break;case 1:if(le==="ansi")this._themeService.modifyColors((_e=>_e.ansi[U.index]=q.channels.toColor(...U.color)));else{const _e=le;this._themeService.modifyColors((Ae=>Ae[_e]=q.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(K){K?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(H.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(K){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var K;return(K=this.textarea)==null?void 0:K.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const K=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(K);if(!U)return;const le=Math.min(this.buffer.x,this.cols-1),Z=this._renderService.dimensions.css.cell.height,pe=U.getWidth(le),_e=this._renderService.dimensions.css.cell.width*pe,Ae=this.buffer.y*this._renderService.dimensions.css.cell.height,ue=le*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ue+"px",this.textarea.style.top=Ae+"px",this.textarea.style.width=_e+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,h.copyHandler)(U,this._selectionService)})));const K=U=>(0,h.handlePasteEvent)(U,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",(U=>{U.button===2&&(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Y.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,h.moveTextAreaUnderMouseCursor)(U,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 U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(Z=>this.updateCursorStyle(Z)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.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(z.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(Z=>this._handleTextAreaFocus(Z)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(z.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(z.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(z.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(z.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Z=>this._onRender.fire(Z)))),this.onResize((Z=>this._renderService.resize(Z.cols,Z.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(z.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(U);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(z.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Z=>this._renderService.handleSelectionChanged(Z.start,Z.end,Z.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Z=>{this.textarea.value=Z,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,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",(Z=>this._selectionService.handleMouseDown(Z)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(H.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Z=>this._handleScreenReaderModeOptionChange(Z)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Z=>{!this._overviewRulerRenderer&&Z&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(p.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const K=this,U=this.element;function le(_e){const Ae=K._mouseService.getMouseReportCoords(_e,K.screenElement);if(!Ae)return!1;let ue,ye;switch(_e.overrideType||_e.type){case"mousemove":ye=32,_e.buttons===void 0?(ue=3,_e.button!==void 0&&(ue=_e.button<3?_e.button:3)):ue=1&_e.buttons?0:4&_e.buttons?1:2&_e.buttons?2:3;break;case"mouseup":ye=0,ue=_e.button<3?_e.button:3;break;case"mousedown":ye=1,ue=_e.button<3?_e.button:3;break;case"wheel":if(K._customWheelEventHandler&&K._customWheelEventHandler(_e)===!1||K.viewport.getLinesScrolled(_e)===0)return!1;ye=_e.deltaY<0?0:1,ue=4;break;default:return!1}return!(ye===void 0||ue===void 0||ue>4)&&K.coreMouseService.triggerMouseEvent({col:Ae.col,row:Ae.row,x:Ae.x,y:Ae.y,button:ue,action:ye,ctrl:_e.ctrlKey,alt:_e.altKey,shift:_e.shiftKey})}const Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:_e=>(le(_e),_e.buttons||(this._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.removeEventListener("mousemove",Z.mousedrag)),this.cancel(_e)),wheel:_e=>(le(_e),this.cancel(_e,!0)),mousedrag:_e=>{_e.buttons&&le(_e)},mousemove:_e=>{_e.buttons||le(_e)}};this.register(this.coreMouseService.onProtocolChange((_e=>{_e?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(_e)),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&_e?Z.mousemove||(U.addEventListener("mousemove",pe.mousemove),Z.mousemove=pe.mousemove):(U.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&_e?Z.wheel||(U.addEventListener("wheel",pe.wheel,{passive:!1}),Z.wheel=pe.wheel):(U.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&_e?Z.mouseup||(Z.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&_e?Z.mousedrag||(Z.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(U,"mousedown",(_e=>{if(_e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(_e))return le(_e),Z.mouseup&&this._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.addEventListener("mousemove",Z.mousedrag),this.cancel(_e)}))),this.register((0,d.addDisposableDomListener)(U,"wheel",(_e=>{if(!Z.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(_e)===!1)return!1;if(!this.buffer.hasScrollback){const Ae=this.viewport.getLinesScrolled(_e);if(Ae===0)return;const ue=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(_e.deltaY<0?"A":"B");let ye="";for(let je=0;je<Math.abs(Ae);je++)ye+=ue;return this.coreService.triggerDataEvent(ye,!0),this.cancel(_e,!0)}return this.viewport.handleWheel(_e)?this.cancel(_e):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(U,"touchstart",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(_e),this.cancel(_e)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(U,"touchmove",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(_e)?void 0:this.cancel(_e)}),{passive:!1}))}refresh(K,U){var le;(le=this._renderService)==null||le.refreshRows(K,U)}updateCursorStyle(K){var U;(U=this._selectionService)!=null&&U.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,U,le=0){var Z;le===1?(super.scrollLines(K,U,le),this.refresh(0,this.rows-1)):(Z=this.viewport)==null||Z.scrollLines(K)}paste(K){(0,h.paste)(K,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(K){this._customKeyEventHandler=K}attachCustomWheelEventHandler(K){this._customWheelEventHandler=K}registerLinkProvider(K){return this._linkProviderService.registerLinkProvider(K)}registerCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(K);return this.refresh(0,this.rows-1),U}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,U,le){this._selectionService.setSelection(K,U,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,U){var le;(le=this._selectionService)==null||le.selectLines(K,U)}_keyDown(K){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&K.altKey;if(!U&&!this._compositionHelper.keydown(K))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||K.key!=="Dead"&&K.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const le=(0,ee.evaluateKeyboardEvent)(K,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),le.type===3||le.type===2){const Z=this.rows-1;return this.scrollLines(le.type===2?-Z:Z),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!==X.C0.ETX&&le.key!==X.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,U){const le=K.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||K.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||K.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?le:le&&(!U.keyCode||U.keyCode>47)}_keyUp(K){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(K)||this.focus(),this.updateCursorStyle(K),this._keyPressHandled=!1)}_keyPress(K){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)U=K.charCode;else if(K.which===null||K.which===void 0)U=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;U=K.which}return!(!U||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(U,!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 U=K.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(K),!0}return!1}resize(K,U){K!==this.cols||U!==this.rows?super.resize(K,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(K,U){var le,Z;(le=this._charSizeService)==null||le.measure(),(Z=this.viewport)==null||Z.syncScrollArea(!0)}clear(){var K;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine(F.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 U,le;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.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(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(K){if(this._renderService)switch(K){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),le=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${le};${U}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Z=this._renderService.dimensions.css.cell.width.toFixed(0),pe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${pe};${Z}t`)}}cancel(K,U){if(this.options.cancelEvents||U)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 b=c-this._lastRefreshMs,w=this._debounceThresholdMS-b;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const 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(m,p,g,E){var R,A=arguments.length,L=A<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,p,g,E);else for(var T=m.length-1;T>=0;T--)(R=m[T])&&(L=(A<3?R(L):A>3?R(p,g,L):R(p,g))||L);return A>3&&L&&Object.defineProperty(p,g,L),L},d=this&&this.__param||function(m,p){return function(g,E){p(g,E,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=u(3656),b=u(4725),w=u(8460),k=u(844),x=u(2585);let S=a.Viewport=class extends k.Disposable{constructor(m,p,g,E,R,A,L,T){super(),this._viewportElement=m,this._scrollArea=p,this._bufferService=g,this._optionsService=E,this._charSizeService=R,this._renderService=A,this._coreBrowserService=L,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((z=>this._activeBuffer=z.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((z=>this._renderDimensions=z))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((z=>this._handleThemeChange(z)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(m){if(m)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const 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 m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const 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 m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(m,p){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(p<0&&this._viewportElement.scrollTop!==0||p>0&&g<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const p=this._getPixelsScrolled(m);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(m,p))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const p=m*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:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let p=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?p*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._currentRowHeight*this._bufferService.rows),p}getBufferElements(m,p){var T;let g,E="";const R=[],A=p??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let z=m;z<A;z++){const N=L.get(z);if(!N)continue;const q=(T=L.get(z+1))==null?void 0:T.isWrapped;if(E+=N.translateToString(!q),!q||z===L.length-1){const G=document.createElement("div");G.textContent=E,R.push(G),E.length>0&&(g=G),E=""}}return{bufferElements:R,cursorElement:g}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let p=this._applyScrollModifier(m.deltaY,m);return m.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):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._bufferService.rows),p}_applyScrollModifier(m,p){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&p.altKey||g==="ctrl"&&p.ctrlKey||g==="shift"&&p.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const p=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,p!==0&&(this._viewportElement.scrollTop+=p,this._bubbleScroll(m,p))}};a.Viewport=S=h([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,b.ICharSizeService),d(5,b.IRenderService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],S)},3107:function(_,a,u){var h=this&&this.__decorate||function(x,S,m,p){var g,E=arguments.length,R=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,m,p);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,m,R):g(S,m))||R);return E>3&&R&&Object.defineProperty(S,m,R),R},d=this&&this.__param||function(x,S){return function(m,p){S(m,p,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=u(4725),b=u(844),w=u(2585);let k=a.BufferDecorationRenderer=class extends b.Disposable{constructor(x,S,m,p,g){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=m,this._decorationService=p,this._renderService=g,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((E=>this._removeDecoration(E)))),this.register((0,b.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var 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 m=x.options.x??0;return m&&m>this._bufferService.cols&&(S.style.display="none"),this._refreshXPosition(x,S),S}_refreshStyle(x){const S=x.marker.line-this._bufferService.buffers.active.ydisp;if(S<0||S>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let m=this._decorationElements.get(x);m||(m=this._createElement(x),x.element=m,this._decorationElements.set(x,m),this._container.appendChild(m),x.onDispose((()=>{this._decorationElements.delete(x),m.remove()}))),m.style.top=S*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(m)}}_refreshXPosition(x,S=x.element){if(!S)return;const m=x.options.x??0;(x.options.anchor||"left")==="right"?S.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":S.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var S;(S=this._decorationElements.get(x))==null||S.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=k=h([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(g,E,R,A){var L,T=arguments.length,z=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(g,E,R,A);else for(var N=g.length-1;N>=0;N--)(L=g[N])&&(z=(T<3?L(z):T>3?L(E,R,z):L(E,R))||z);return T>3&&z&&Object.defineProperty(E,R,z),z},d=this&&this.__param||function(g,E){return function(R,A){E(R,A,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const c=u(5871),b=u(4725),w=u(844),k=u(2585),x={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let p=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,E,R,A,L,T,z){var q;super(),this._viewportElement=g,this._screenElement=E,this._bufferService=R,this._decorationService=A,this._renderService=L,this._optionsService=T,this._coreBrowserService=z,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(),(q=this._viewportElement.parentElement)==null||q.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var G;(G=this._canvas)==null||G.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const g=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=g,S.center=E,S.right=g,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=S.left,m.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const E of g)E.position!=="full"&&this._renderColorZone(E);for(const E of g)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(m[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-x[g.position||"full"]/2),S[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[g.position||"full"]))}_queueRefresh(g,E){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=p=h([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,b.IRenderService),d(5,k.IOptionsService),d(6,b.ICoreBrowserService)],p)},2950:function(_,a,u){var h=this&&this.__decorate||function(x,S,m,p){var g,E=arguments.length,R=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,S,m,p);else for(var A=x.length-1;A>=0;A--)(g=x[A])&&(R=(E<3?g(R):E>3?g(S,m,R):g(S,m))||R);return E>3&&R&&Object.defineProperty(S,m,R),R},d=this&&this.__param||function(x,S){return function(m,p){S(m,p,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=u(4725),b=u(2585),w=u(2584);let k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,S,m,p,g,E){this._textarea=x,this._compositionView=S,this._bufferService=m,this._optionsService=p,this._coreService=g,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const S={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let m;this._isSendingComposition=!1,S.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(S.start,S.end):this._textarea.value.substring(S.start),m.length>0&&this._coreService.triggerDataEvent(m,!0)}}),0)}else{this._isSendingComposition=!1;const S=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(S,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const S=this._textarea.value,m=S.replace(x,"");this._dataAlreadySent=m,S.length>x.length?this._coreService.triggerDataEvent(m,!0):S.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):S.length===x.length&&S!==x&&this._coreService.triggerDataEvent(S,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.css.cell.height,p=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=p+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=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,b.IBufferService),d(3,b.IOptionsService),d(4,b.ICoreService),d(5,c.IRenderService)],k)},9806:(_,a)=>{function u(h,d,c){const b=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-b.left-k,d.clientY-b.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(h,d,c,b,w,k,x,S,m){if(!k)return;const p=u(h,d,c);return p?(p[0]=Math.ceil((p[0]+(m?x/2:0))/x),p[1]=Math.ceil(p[1]/S),p[0]=Math.min(Math.max(p[0],1),b+(m?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,m,p,g){const E=S-c(S,p),R=m-c(m,p),A=Math.abs(E-R)-(function(L,T,z){let N=0;const q=L-c(L,z),G=T-c(T,z);for(let V=0;V<Math.abs(q-G);V++){const Q=b(L,T)==="A"?-1:1,Y=z.buffer.lines.get(q+Q*V);Y!=null&&Y.isWrapped&&N++}return N})(S,m,p);return x(A,k(b(S,m),g))}function c(S,m){let p=0,g=m.buffer.lines.get(S),E=g==null?void 0:g.isWrapped;for(;E&&S>=0&&S<m.rows;)p++,g=m.buffer.lines.get(--S),E=g==null?void 0:g.isWrapped;return p}function b(S,m){return S>m?"A":"B"}function w(S,m,p,g,E,R){let A=S,L=m,T="";for(;A!==p||L!==g;)A+=E?1:-1,E&&A>R.cols-1?(T+=R.buffer.translateBufferLineToString(L,!1,S,A),A=0,S=0,L++):!E&&A<0&&(T+=R.buffer.translateBufferLineToString(L,!1,0,S+1),A=R.cols-1,S=A,L--);return T+R.buffer.translateBufferLineToString(L,!1,S,A)}function k(S,m){const p=m?"O":"[";return h.C0.ESC+p+S}function x(S,m){S=Math.floor(S);let p="";for(let g=0;g<S;g++)p+=m;return p}a.moveToCellSequence=function(S,m,p,g){const E=p.buffer.x,R=p.buffer.y;if(!p.buffer.hasScrollback)return(function(T,z,N,q,G,V){return d(z,q,G,V).length===0?"":x(w(T,z,T,z-c(z,G),!1,G).length,k("D",V))})(E,R,0,m,p,g)+d(R,m,p,g)+(function(T,z,N,q,G,V){let Q;Q=d(z,q,G,V).length>0?q-c(q,G):z;const Y=q,F=(function(X,ee,O,M,B,P){let H;return H=d(O,M,B,P).length>0?M-c(M,B):ee,X<O&&H<=M||X>=O&&H<M?"C":"D"})(T,z,N,q,G,V);return x(w(T,Q,N,Y,F==="C",G).length,k(F,V))})(E,R,S,m,p,g);let A;if(R===m)return A=E>S?"D":"C",x(Math.abs(E-S),k(A,g));A=R>m?"D":"C";const L=Math.abs(R-m);return x((function(T,z){return z.cols-T})(R>m?S:E,p)+(L-1)*p.cols+1+((R>m?E:S)-1),k(A,g))}},1296:function(_,a,u){var h=this&&this.__decorate||function(V,Q,Y,F){var X,ee=arguments.length,O=ee<3?Q:F===null?F=Object.getOwnPropertyDescriptor(Q,Y):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(V,Q,Y,F);else for(var M=V.length-1;M>=0;M--)(X=V[M])&&(O=(ee<3?X(O):ee>3?X(Q,Y,O):X(Q,Y))||O);return ee>3&&O&&Object.defineProperty(Q,Y,O),O},d=this&&this.__param||function(V,Q){return function(Y,F){Q(Y,F,V)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=u(3787),b=u(2550),w=u(2223),k=u(6171),x=u(6052),S=u(4725),m=u(8055),p=u(8460),g=u(844),E=u(2585),R="xterm-dom-renderer-owner-",A="xterm-rows",L="xterm-fg-",T="xterm-bg-",z="xterm-focus",N="xterm-selection";let q=1,G=a.DomRenderer=class extends g.Disposable{constructor(V,Q,Y,F,X,ee,O,M,B,P,H,ie,fe){super(),this._terminal=V,this._document=Q,this._element=Y,this._screenElement=F,this._viewportElement=X,this._helperContainer=ee,this._linkifier2=O,this._charSizeService=B,this._optionsService=P,this._bufferService=H,this._coreBrowserService=ie,this._themeService=fe,this._terminalClass=q++,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((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=M.createInstance(c.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,g.toDisposable)((()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new b.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const 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 Q=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Q,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 Q=`${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}`;Q+=`${this._terminalSelector} .${A} .xterm-dim { color: ${m.color.multiplyOpacity(V.foreground,.5).css};}`,Q+=`${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}`,F=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;Q+=`@keyframes ${Y} { 50% { border-bottom-style: hidden; }}`,Q+=`@keyframes ${F} { 50% { box-shadow: none; }}`,Q+=`@keyframes ${X} { 0% { background-color: ${V.cursor.css}; color: ${V.cursorAccent.css}; } 50% { background-color: inherit; color: ${V.cursor.css}; }}`,Q+=`${this._terminalSelector} .${A}.${z} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A}.${z} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${A}.${z} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 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);}`,Q+=`${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[ee,O]of V.ansi.entries())Q+=`${this._terminalSelector} .${L}${ee} { color: ${O.css}; }${this._terminalSelector} .${L}${ee}.xterm-dim { color: ${m.color.multiplyOpacity(O,.5).css}; }${this._terminalSelector} .${T}${ee} { background-color: ${O.css}; }`;Q+=`${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(V.background).css}; }${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.color.opaque(V.background),.5).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { background-color: ${V.foreground.css}; }`,this._themeStyleElement.textContent=Q}_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,Q){for(let Y=this._rowElements.length;Y<=Q;Y++){const F=this._document.createElement("div");this._rowContainer.appendChild(F),this._rowElements.push(F)}for(;this._rowElements.length>Q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(V,Q){this._refreshRowElements(V,Q),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(z),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(z),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(V,Q,Y){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(V,Q,Y),this.renderRows(0,this._bufferService.rows-1),!V||!Q)return;this._selectionRenderModel.update(this._terminal,V,Q,Y);const F=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,O=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||O<0)return;const M=this._document.createDocumentFragment();if(Y){const B=V[0]>Q[0];M.appendChild(this._createSelectionElement(ee,B?Q[0]:V[0],B?V[0]:Q[0],O-ee+1))}else{const B=F===ee?V[0]:0,P=ee===X?Q[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(ee,B,P));const H=O-ee-1;if(M.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,H)),ee!==O){const ie=X===O?Q[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(O,0,ie))}}this._selectionContainer.appendChild(M)}_createSelectionElement(V,Q,Y,F=1){const X=this._document.createElement("div"),ee=Q*this.dimensions.css.cell.width;let O=this.dimensions.css.cell.width*(Y-Q);return ee+O>this.dimensions.css.canvas.width&&(O=this.dimensions.css.canvas.width-ee),X.style.height=F*this.dimensions.css.cell.height+"px",X.style.top=V*this.dimensions.css.cell.height+"px",X.style.left=`${ee}px`,X.style.width=`${O}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const V of this._rowElements)V.replaceChildren()}renderRows(V,Q){const Y=this._bufferService.buffer,F=Y.ybase+Y.y,X=Math.min(Y.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,O=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=V;B<=Q;B++){const P=B+Y.ydisp,H=this._rowElements[B],ie=Y.lines.get(P);if(!H||!ie)break;H.replaceChildren(...this._rowFactory.createRow(ie,P,P===F,O,M,X,ee,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,Q,Y,F,X,ee){Y<0&&(V=0),F<0&&(Q=0);const O=this._bufferService.rows-1;Y=Math.max(Math.min(Y,O),0),F=Math.max(Math.min(F,O),0),X=Math.min(X,this._bufferService.cols);const M=this._bufferService.buffer,B=M.ybase+M.y,P=Math.min(M.x,X-1),H=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,fe=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=Y;de<=F;++de){const K=de+M.ydisp,U=this._rowElements[de],le=M.lines.get(K);if(!U||!le)break;U.replaceChildren(...this._rowFactory.createRow(le,K,K===B,ie,fe,P,H,this.dimensions.css.cell.width,this._widthCache,ee?de===Y?V:0:-1,ee?(de===F?Q:X)-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,z){var N,q=arguments.length,G=q<3?L:z===null?z=Object.getOwnPropertyDescriptor(L,T):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,L,T,z);else for(var V=A.length-1;V>=0;V--)(N=A[V])&&(G=(q<3?N(G):q>3?N(L,T,G):N(L,T))||G);return q>3&&G&&Object.defineProperty(L,T,G),G},d=this&&this.__param||function(A,L){return function(T,z){L(T,z,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=u(2223),b=u(643),w=u(511),k=u(2585),x=u(8055),S=u(4725),m=u(4269),p=u(6171),g=u(3734);let E=a.DomRendererRowFactory=class{constructor(A,L,T,z,N,q,G){this._document=A,this._characterJoinerService=L,this._optionsService=T,this._coreBrowserService=z,this._coreService=N,this._decorationService=q,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,z,N,q,G,V,Q,Y,F){const X=[],ee=this._characterJoinerService.getJoinedCharacters(L),O=this._themeService.colors;let M,B=A.getNoBgTrimmedLength();T&&B<q+1&&(B=q+1);let P=0,H="",ie=0,fe=0,de=0,K=!1,U=0,le=!1,Z=0;const pe=[],_e=Y!==-1&&F!==-1;for(let Ae=0;Ae<B;Ae++){A.loadCell(Ae,this._workCell);let ue=this._workCell.getWidth();if(ue===0)continue;let ye=!1,je=Ae,Ee=this._workCell;if(ee.length>0&&Ae===ee[0][0]){ye=!0;const Ve=ee.shift();Ee=new m.JoinedCellData(this._workCell,A.translateToString(!0,Ve[0],Ve[1]),Ve[1]-Ve[0]),je=Ve[1]-1,ue=Ee.getWidth()}const mn=this._isCellInSelection(Ae,L),gn=T&&Ae===q,vn=_e&&Ae>=Y&&Ae<=F;let En=!1;this._decorationService.forEachDecorationAtCell(Ae,L,void 0,(Ve=>{En=!0}));let Gn=Ee.getChars()||b.WHITESPACE_CELL_CHAR;if(Gn===" "&&(Ee.isUnderline()||Ee.isOverline())&&(Gn=" "),Z=ue*V-Q.get(Gn,Ee.isBold(),Ee.isItalic()),M){if(P&&(mn&&le||!mn&&!le&&Ee.bg===ie)&&(mn&&le&&O.selectionForeground||Ee.fg===fe)&&Ee.extended.ext===de&&vn===K&&Z===U&&!gn&&!ye&&!En){Ee.isInvisible()?H+=b.WHITESPACE_CELL_CHAR:H+=Gn,P++;continue}P&&(M.textContent=H),M=this._document.createElement("span"),P=0,H=""}else M=this._document.createElement("span");if(ie=Ee.bg,fe=Ee.fg,de=Ee.extended.ext,K=vn,U=Z,le=mn,ye&&q>=Ae&&q<=je&&(q=Ae),!this._coreService.isCursorHidden&&gn&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)G&&pe.push("xterm-cursor-blink"),pe.push(z==="bar"?"xterm-cursor-bar":z==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if(Ee.isBold()&&pe.push("xterm-bold"),Ee.isItalic()&&pe.push("xterm-italic"),Ee.isDim()&&pe.push("xterm-dim"),H=Ee.isInvisible()?b.WHITESPACE_CELL_CHAR:Ee.getChars()||b.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(pe.push(`xterm-underline-${Ee.extended.underlineStyle}`),H===" "&&(H=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Ve=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Ve<8&&(Ve+=8),M.style.textDecorationColor=O.ansi[Ve].css}Ee.isOverline()&&(pe.push("xterm-overline"),H===" "&&(H=" ")),Ee.isStrikethrough()&&pe.push("xterm-strikethrough"),vn&&(M.style.textDecoration="underline");let At=Ee.getFgColor(),ot=Ee.getFgColorMode(),Ot=Ee.getBgColor(),ae=Ee.getBgColorMode();const ve=!!Ee.isInverse();if(ve){const Ve=At;At=Ot,Ot=Ve;const bt=ot;ot=ae,ae=bt}let Ce,Re,Be,mt=!1;switch(this._decorationService.forEachDecorationAtCell(Ae,L,void 0,(Ve=>{Ve.options.layer!=="top"&&mt||(Ve.backgroundColorRGB&&(ae=50331648,Ot=Ve.backgroundColorRGB.rgba>>8&16777215,Ce=Ve.backgroundColorRGB),Ve.foregroundColorRGB&&(ot=50331648,At=Ve.foregroundColorRGB.rgba>>8&16777215,Re=Ve.foregroundColorRGB),mt=Ve.options.layer==="top")})),!mt&&mn&&(Ce=this._coreBrowserService.isFocused?O.selectionBackgroundOpaque:O.selectionInactiveBackgroundOpaque,Ot=Ce.rgba>>8&16777215,ae=50331648,mt=!0,O.selectionForeground&&(ot=50331648,At=O.selectionForeground.rgba>>8&16777215,Re=O.selectionForeground)),mt&&pe.push("xterm-decoration-top"),ae){case 16777216:case 33554432:Be=O.ansi[Ot],pe.push(`xterm-bg-${Ot}`);break;case 50331648:Be=x.channels.toColor(Ot>>16,Ot>>8&255,255&Ot),this._addStyle(M,`background-color:#${R((Ot>>>0).toString(16),"0",6)}`);break;default:ve?(Be=O.foreground,pe.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Be=O.background}switch(Ce||Ee.isDim()&&(Ce=x.color.multiplyOpacity(Be,.5)),ot){case 16777216:case 33554432:Ee.isBold()&&At<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(At+=8),this._applyMinimumContrast(M,Be,O.ansi[At],Ee,Ce,void 0)||pe.push(`xterm-fg-${At}`);break;case 50331648:const Ve=x.channels.toColor(At>>16&255,At>>8&255,255&At);this._applyMinimumContrast(M,Be,Ve,Ee,Ce,Re)||this._addStyle(M,`color:#${R(At.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Be,O.foreground,Ee,Ce,Re)||ve&&pe.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}pe.length&&(M.className=pe.join(" "),pe.length=0),gn||ye||En?M.textContent=H:P++,Z!==this.defaultSpacing&&(M.style.letterSpacing=`${Z}px`),X.push(M),Ae=je}return M&&P&&(M.textContent=H),X}_applyMinimumContrast(A,L,T,z,N,q){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,p.treatGlyphAsBackgroundColor)(z.getCode()))return!1;const G=this._getContrastCache(z);let V;if(N||q||(V=G.getColor(L.rgba,T.rgba)),V===void 0){const Q=this._optionsService.rawOptions.minimumContrastRatio/(z.isDim()?2:1);V=x.color.ensureContrastRatio(N||L,q||T,Q),G.setColor((N||L).rgba,(q||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,z=this._selectionEnd;return!(!T||!z)&&(this._columnSelectMode?T[0]<=z[0]?A>=T[0]&&L>=T[1]&&A<z[0]&&L<=z[1]:A<T[0]&&L>=T[1]&&A>=z[0]&&L<=z[1]:L>T[1]&&L<z[1]||T[1]===z[1]&&L===T[1]&&A>=T[0]&&A<z[0]||T[1]<z[1]&&L===z[1]&&A<z[0]||T[1]<z[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 b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.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,b,w],this._container.appendChild(d),this._container.appendChild(c),this._container.appendChild(b),this._container.appendChild(w),h.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(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 b=u;h&&(b+="B"),d&&(b+="I");let w=this._holey.get(b);if(w===void 0){let k=0;h&&(k|=1),d&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(b,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,b,w){return c===1&&b>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,b=0){return(d-(2*Math.round(c)-b))%(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,b,w=!1){if(this.selectionStart=c,this.selectionEnd=b,!c||!b||c[0]===b[0]&&c[1]===b[1])return void this.clear();const k=d.buffers.active.ydisp,x=c[1]-k,S=b[1]-k,m=Math.max(x,0),p=Math.min(S,d.rows-1);m>=d.rows||p<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=m,this.viewportCappedEndRow=p,this.startCol=c[0],this.endCol=b[0])}isCellSelected(d,c,b){return!!this.hasSelection&&(b-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&b>=this.viewportCappedStartRow&&c<this.endCol&&b<=this.viewportCappedEndRow:c<this.startCol&&b>=this.viewportCappedStartRow&&c>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===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,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,g,E,R);else for(var z=p.length-1;z>=0;z--)(A=p[z])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},d=this&&this.__param||function(p,g){return function(E,R){g(E,R,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const c=u(2585),b=u(8460),w=u(844);let k=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(p,g,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new b.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new m(this._optionsService))}catch{this._measureStrategy=this.register(new S(p,g,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(g,E){g!==void 0&&g>0&&E!==void 0&&E>0&&(this._result.width=g,this._result.height=E)}}class S extends x{constructor(g,E,R){super(),this._document=g,this._parentElement=E,this._optionsService=R,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class m extends x{constructor(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(_,a,u){var h=this&&this.__decorate||function(m,p,g,E){var R,A=arguments.length,L=A<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(m,p,g,E);else for(var T=m.length-1;T>=0;T--)(R=m[T])&&(L=(A<3?R(L):A>3?R(p,g,L):R(p,g))||L);return A>3&&L&&Object.defineProperty(p,g,L),L},d=this&&this.__param||function(m,p){return function(g,E){p(g,E,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=u(3734),b=u(643),w=u(511),k=u(2585);class x extends c.AttributeData{constructor(p,g,E){super(),this.content=0,this.combinedData="",this.fg=p.fg,this.bg=p.bg,this.combinedData=g,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 z_{constructor(p){this._bufferService=p,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(p){const g={id:this._nextCharacterJoinerId++,handler:p};return this._characterJoiners.push(g),g.id}deregister(p){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===p)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(p){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(p);if(!g||g.length===0)return[];const E=[],R=g.translateToString(!0);let A=0,L=0,T=0,z=g.getFg(0),N=g.getBg(0);for(let q=0;q<g.getTrimmedLength();q++)if(g.loadCell(q,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==z||this._workCell.bg!==N){if(q-A>1){const G=this._getJoinedRanges(R,T,L,g,A);for(let V=0;V<G.length;V++)E.push(G[V])}A=q,T=L,z=this._workCell.fg,N=this._workCell.bg}L+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const q=this._getJoinedRanges(R,T,L,g,A);for(let G=0;G<q.length;G++)E.push(q[G])}return E}_getJoinedRanges(p,g,E,R,A){const L=p.substring(g,E);let T=[];try{T=this._characterJoiners[0].handler(L)}catch(z){console.error(z)}for(let z=1;z<this._characterJoiners.length;z++)try{const N=this._characterJoiners[z].handler(L);for(let q=0;q<N.length;q++)z_._mergeRanges(T,N[q])}catch(N){console.error(N)}return this._stringRangesToCellRanges(T,R,A),T}_stringRangesToCellRanges(p,g,E){let R=0,A=!1,L=0,T=p[R];if(T){for(let z=E;z<this._bufferService.cols;z++){const N=g.getWidth(z),q=g.getString(z).length||b.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!A&&T[0]<=L&&(T[0]=z,A=!0),T[1]<=L){if(T[1]=z,T=p[++R],!T)break;T[0]<=L?(T[0]=z,A=!0):A=!1}L+=q}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(p,g){let E=!1;for(let R=0;R<p.length;R++){const A=p[R];if(E){if(g[1]<=A[0])return p[R-1][1]=g[1],p;if(g[1]<=A[1])return p[R-1][1]=Math.max(g[1],A[1]),p.splice(R,1),p;p.splice(R,1),R--}else{if(g[1]<=A[0])return p.splice(R,0,g),p;if(g[1]<=A[1])return A[0]=Math.min(g[0],A[0]),p;g[0]<A[1]&&(A[0]=Math.min(g[0],A[0]),E=!0)}}return E?p[p.length-1][1]=g[1]:p.push(g),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 b extends h.Disposable{constructor(x,S,m){super(),this._textarea=x,this._window=S,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new 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=b;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,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(b){return this.linkProviders.push(b),{dispose:()=>{const w=this.linkProviders.indexOf(b);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=d},8934:function(_,a,u){var h=this&&this.__decorate||function(k,x,S,m){var p,g=arguments.length,E=g<3?x:m===null?m=Object.getOwnPropertyDescriptor(x,S):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,S,m);else for(var R=k.length-1;R>=0;R--)(p=k[R])&&(E=(g<3?p(E):g>3?p(x,S,E):p(x,S))||E);return g>3&&E&&Object.defineProperty(x,S,E),E},d=this&&this.__param||function(k,x){return function(S,m){x(S,m,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=u(4725),b=u(9806);let w=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,S,m,p){return(0,b.getCoords)(window,k,x,S,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,p)}getMouseReportCoords(k,x){const S=(0,b.getCoordsRelativeToElement)(window,k,x);if(this._charSizeService.hasValidSize)return S[0]=Math.min(Math.max(S[0],0),this._renderService.dimensions.css.canvas.width-1),S[1]=Math.min(Math.max(S[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(S[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(S[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(S[0]),y:Math.floor(S[1])}}};a.MouseService=w=h([d(0,c.IRenderService),d(1,c.ICharSizeService)],w)},3230:function(_,a,u){var h=this&&this.__decorate||function(p,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,g,E,R);else for(var z=p.length-1;z>=0;z--)(A=p[z])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},d=this&&this.__param||function(p,g){return function(E,R){g(E,R,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const c=u(6193),b=u(4725),w=u(8460),k=u(844),x=u(7226),S=u(2585);let m=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(p,g,E,R,A,L,T,z){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,q)=>this._renderRows(N,q)),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(z.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,g),this.register(T.onWindowChange((N=>this._registerIntersectionObserver(N,g))))}_registerIntersectionObserver(p,g){if("IntersectionObserver"in p){const E=new p.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});E.observe(g),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,g,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(p,g,this._rowCount))}_renderRows(p,g){this._renderer.value&&(p=Math.min(p,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(p,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:p,end:g}),this._onRender.fire({start:p,end:g}),this._isNextRenderRedrawOnly=!0)}resize(p,g){this._rowCount=g,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(p){this._renderer.value=p,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.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,g;this._renderer.value&&((g=(p=this._renderer.value).clearTextureAtlas)==null||g.call(p),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(p,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(p,g)})):this._renderer.value.handleResize(p,g),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,g,E){var R;this._selectionState.start=p,this._selectionState.end=g,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(p,g,E)}handleCursorMove(){var p;(p=this._renderer.value)==null||p.handleCursorMove()}clear(){var p;(p=this._renderer.value)==null||p.clear()}};a.RenderService=m=h([d(2,S.IOptionsService),d(3,b.ICharSizeService),d(4,S.IDecorationService),d(5,S.IBufferService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],m)},9312:function(_,a,u){var h=this&&this.__decorate||function(T,z,N,q){var G,V=arguments.length,Q=V<3?z:q===null?q=Object.getOwnPropertyDescriptor(z,N):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(T,z,N,q);else for(var Y=T.length-1;Y>=0;Y--)(G=T[Y])&&(Q=(V<3?G(Q):V>3?G(z,N,Q):G(z,N))||Q);return V>3&&Q&&Object.defineProperty(z,N,Q),Q},d=this&&this.__param||function(T,z){return function(N,q){z(N,q,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=u(9806),b=u(9504),w=u(456),k=u(4725),x=u(8460),S=u(844),m=u(6114),p=u(4841),g=u(511),E=u(2585),R=" ",A=new RegExp(R,"g");let L=a.SelectionService=class extends S.Disposable{constructor(T,z,N,q,G,V,Q,Y,F){super(),this._element=T,this._screenElement=z,this._linkifier=N,this._bufferService=q,this._coreService=G,this._mouseService=V,this._optionsService=Q,this._renderService=Y,this._coreBrowserService=F,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,S.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const T=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!(!T||!z||T[0]===z[0]&&T[1]===z[1])}get selectionText(){const T=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;if(!T||!z)return"";const N=this._bufferService.buffer,q=[];if(this._activeSelectionMode===3){if(T[0]===z[0])return"";const G=T[0]<z[0]?T[0]:z[0],V=T[0]<z[0]?z[0]:T[0];for(let Q=T[1];Q<=z[1];Q++){const Y=N.translateBufferLineToString(Q,!0,G,V);q.push(Y)}}else{const G=T[1]===z[1]?z[0]:void 0;q.push(N.translateBufferLineToString(T[1],!0,T[0],G));for(let V=T[1]+1;V<=z[1]-1;V++){const Q=N.lines.get(V),Y=N.translateBufferLineToString(V,!0);Q!=null&&Q.isWrapped?q[q.length-1]+=Y:q.push(Y)}if(T[1]!==z[1]){const V=N.lines.get(z[1]),Q=N.translateBufferLineToString(z[1],!0,0,z[0]);V&&V.isWrapped?q[q.length-1]+=Q:q.push(Q)}}return q.map((G=>G.replace(A," "))).join(m.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()))),m.isLinux&&T&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(T){const z=this._getMouseBufferCoords(T),N=this._model.finalSelectionStart,q=this._model.finalSelectionEnd;return!!(N&&q&&z)&&this._areCoordsInSelection(z,N,q)}isCellInSelection(T,z){const N=this._model.finalSelectionStart,q=this._model.finalSelectionEnd;return!(!N||!q)&&this._areCoordsInSelection([T,z],N,q)}_areCoordsInSelection(T,z,N){return T[1]>z[1]&&T[1]<N[1]||z[1]===N[1]&&T[1]===z[1]&&T[0]>=z[0]&&T[0]<N[0]||z[1]<N[1]&&T[1]===N[1]&&T[0]<N[0]||z[1]<N[1]&&T[1]===z[1]&&T[0]>=z[0]}_selectWordAtCursor(T,z){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 q=this._getMouseBufferCoords(T);return!!q&&(this._selectWordAt(q,z),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,z){this._model.clearSelection(),T=Math.max(T,0),z=Math.min(z,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,z],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const z=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(z)return z[0]--,z[1]--,z[1]+=this._bufferService.buffer.ydisp,z}_getMouseEventScrollAmount(T){let z=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return z>=0&&z<=N?0:(z>N&&(z-=N),z=Math.min(Math.max(z,-50),50),z/=50,z/Math.abs(z)+Math.round(14*z))}shouldForceSelection(T){return m.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const z=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);z&&z.length!==this._model.selectionStart[0]&&z.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const z=this._getMouseBufferCoords(T);z&&(this._activeSelectionMode=2,this._selectLineAt(z[1]))}shouldColumnSelect(T){return T.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const z=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 q=N.lines.get(this._model.selectionEnd[1]);q&&q.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}z&&z[0]===this._model.selectionEnd[0]&&z[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 z=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&z<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 q=(0,b.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(q,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,z=this._model.finalSelectionEnd,N=!(!T||!z||T[0]===z[0]&&T[1]===z[1]);N?T&&z&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&z[0]===this._oldSelectionEnd[0]&&z[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,z,N)):this._oldHasSelection&&this._fireOnSelectionChange(T,z,N)}_fireOnSelectionChange(T,z,N){this._oldSelectionStart=T,this._oldSelectionEnd=z,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((z=>this._handleTrim(z)))}_convertViewportColToCharacterIndex(T,z){let N=z;for(let q=0;z>=q;q++){const G=T.loadCell(q,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:G>1&&z!==q&&(N+=G-1)}return N}setSelection(T,z,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,z],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,z,N=!0,q=!0){if(T[0]>=this._bufferService.cols)return;const G=this._bufferService.buffer,V=G.lines.get(T[1]);if(!V)return;const Q=G.translateBufferLineToString(T[1],!1);let Y=this._convertViewportColToCharacterIndex(V,T[0]),F=Y;const X=T[0]-Y;let ee=0,O=0,M=0,B=0;if(Q.charAt(Y)===" "){for(;Y>0&&Q.charAt(Y-1)===" ";)Y--;for(;F<Q.length&&Q.charAt(F+1)===" ";)F++}else{let ie=T[0],fe=T[0];V.getWidth(ie)===0&&(ee++,ie--),V.getWidth(fe)===2&&(O++,fe++);const de=V.getString(fe).length;for(de>1&&(B+=de-1,F+=de-1);ie>0&&Y>0&&!this._isCharWordSeparator(V.loadCell(ie-1,this._workCell));){V.loadCell(ie-1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,ie--):K>1&&(M+=K-1,Y-=K-1),Y--,ie--}for(;fe<V.length&&F+1<Q.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?(O++,fe++):K>1&&(B+=K-1,F+=K-1),F++,fe++}}F++;let P=Y+X-ee+M,H=Math.min(this._bufferService.cols,F-Y+ee+O-M-B);if(z||Q.slice(Y,F).trim()!==""){if(N&&P===0&&V.getCodePoint(0)!==32){const ie=G.lines.get(T[1]-1);if(ie&&V.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const fe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(fe){const de=this._bufferService.cols-fe.start;P-=de,H+=de}}}if(q&&P+H===this._bufferService.cols&&V.getCodePoint(this._bufferService.cols-1)!==32){const ie=G.lines.get(T[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const fe=this._getWordAt([0,T[1]+1],!1,!1,!0);fe&&(H+=fe.length)}}return{start:P,length:H}}}_selectWordAt(T,z){const N=this._getWordAt(T,z);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 z=this._getWordAt(T,!0);if(z){let N=T[1];for(;z.start<0;)z.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;z.start+z.length>this._bufferService.cols;)z.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?z.start:z.start+z.length,N]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const z=this._bufferService.buffer.getWrappedRangeForLine(T),N={start:{x:0,y:z.first},end:{x:this._bufferService.cols-1,y:z.last}};this._model.selectionStart=[0,z.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,z,N){var q,G=arguments.length,V=G<3?T:N===null?N=Object.getOwnPropertyDescriptor(T,z):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(L,T,z,N);else for(var Q=L.length-1;Q>=0;Q--)(q=L[Q])&&(V=(G<3?q(V):G>3?q(T,z,V):q(T,z))||V);return G>3&&V&&Object.defineProperty(T,z,V),V},d=this&&this.__param||function(L,T){return function(z,N){T(z,N,L)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),b=u(8055),w=u(8460),k=u(844),x=u(2585),S=b.css.toColor("#ffffff"),m=b.css.toColor("#000000"),p=b.css.toColor("#ffffff"),g=b.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const L=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let z=0;z<216;z++){const N=T[z/36%6|0],q=T[z/6%6|0],G=T[z%6];L.push({css:b.channels.toCss(N,q,G),rgba:b.channels.toRgba(N,q,G)})}for(let z=0;z<24;z++){const N=8+10*z;L.push({css:b.channels.toCss(N,N,N),rgba:b.channels.toRgba(N,N,N)})}return L})());let R=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(L){super(),this._optionsService=L,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:m,cursor:p,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:b.color.blend(m,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:b.color.blend(m,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(L={}){const T=this._colors;if(T.foreground=A(L.foreground,S),T.background=A(L.background,m),T.cursor=A(L.cursor,p),T.cursorAccent=A(L.cursorAccent,g),T.selectionBackgroundTransparent=A(L.selectionBackground,E),T.selectionBackgroundOpaque=b.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(L.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=b.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=L.selectionForeground?A(L.selectionForeground,b.NULL_COLOR):void 0,T.selectionForeground===b.NULL_COLOR&&(T.selectionForeground=void 0),b.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=b.color.opacity(T.selectionBackgroundTransparent,.3)),b.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=b.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 z=Math.min(T.ansi.length-16,L.extendedAnsi.length);for(let N=0;N<z;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 b.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 m=k-1;m>=0;m--)this.set(w+m+x,this.get(w+m));const S=w+k+x-this._length;if(S>0)for(this._length+=S;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let S=0;S<k;S++)this.set(w+S+x,this.get(w+S))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=c},1439:(_,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 b in h)c[b]=d<=1?h[b]:h[b]&&u(h[b],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 b,w,k,x,S;function m(g){const E=g.toString(16);return E.length<2?"0"+E:E}function p(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(g){g.toCss=function(E,R,A,L){return L!==void 0?`#${m(E)}${m(R)}${m(A)}${m(L)}`:`#${m(E)}${m(R)}${m(A)}`},g.toRgba=function(E,R,A,L=255){return(E<<24|R<<16|A<<8|L)>>>0},g.toColor=function(E,R,A,L){return{css:g.toCss(E,R,A,L),rgba:g.toRgba(E,R,A,L)}}})(b||(a.channels=b={})),(function(g){function E(R,A){return c=Math.round(255*A),[u,h,d]=S.toChannels(R.rgba),{css:b.toCss(u,h,d,c),rgba:b.toRgba(u,h,d,c)}}g.blend=function(R,A){if(c=(255&A.rgba)/255,c===1)return{css:A.css,rgba:A.rgba};const L=A.rgba>>24&255,T=A.rgba>>16&255,z=A.rgba>>8&255,N=R.rgba>>24&255,q=R.rgba>>16&255,G=R.rgba>>8&255;return u=N+Math.round((L-N)*c),h=q+Math.round((T-q)*c),d=G+Math.round((z-G)*c),{css:b.toCss(u,h,d),rgba:b.toRgba(u,h,d)}},g.isOpaque=function(R){return(255&R.rgba)==255},g.ensureContrastRatio=function(R,A,L){const T=S.ensureContrastRatio(R.rgba,A.rgba,L);if(T)return b.toColor(T>>24&255,T>>16&255,T>>8&255)},g.opaque=function(R){const A=(255|R.rgba)>>>0;return[u,h,d]=S.toChannels(A),{css:b.toCss(u,h,d),rgba:A}},g.opacity=E,g.multiplyOpacity=function(R,A){return c=255&R.rgba,E(R,c*A/255)},g.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(w||(a.color=w={})),(function(g){let E,R;try{const A=document.createElement("canvas");A.width=1,A.height=1;const L=A.getContext("2d",{willReadFrequently:!0});L&&(E=L,E.globalCompositeOperation="copy",R=E.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),d=parseInt(A.slice(3,4).repeat(2),16),b.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),b.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]))),b.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:b.toRgba(u,h,d,c),css:A}}})(k||(a.css=k={})),(function(g){function E(R,A,L){const T=R/255,z=A/255,N=L/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}g.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},g.relativeLuminance2=E})(x||(a.rgb=x={})),(function(g){function E(A,L,T){const z=A>>24&255,N=A>>16&255,q=A>>8&255;let G=L>>24&255,V=L>>16&255,Q=L>>8&255,Y=p(x.relativeLuminance2(G,V,Q),x.relativeLuminance2(z,N,q));for(;Y<T&&(G>0||V>0||Q>0);)G-=Math.max(0,Math.ceil(.1*G)),V-=Math.max(0,Math.ceil(.1*V)),Q-=Math.max(0,Math.ceil(.1*Q)),Y=p(x.relativeLuminance2(G,V,Q),x.relativeLuminance2(z,N,q));return(G<<24|V<<16|Q<<8|255)>>>0}function R(A,L,T){const z=A>>24&255,N=A>>16&255,q=A>>8&255;let G=L>>24&255,V=L>>16&255,Q=L>>8&255,Y=p(x.relativeLuminance2(G,V,Q),x.relativeLuminance2(z,N,q));for(;Y<T&&(G<255||V<255||Q<255);)G=Math.min(255,G+Math.ceil(.1*(255-G))),V=Math.min(255,V+Math.ceil(.1*(255-V))),Q=Math.min(255,Q+Math.ceil(.1*(255-Q))),Y=p(x.relativeLuminance2(G,V,Q),x.relativeLuminance2(z,N,q));return(G<<24|V<<16|Q<<8|255)>>>0}g.blend=function(A,L){if(c=(255&L)/255,c===1)return L;const T=L>>24&255,z=L>>16&255,N=L>>8&255,q=A>>24&255,G=A>>16&255,V=A>>8&255;return u=q+Math.round((T-q)*c),h=G+Math.round((z-G)*c),d=V+Math.round((N-V)*c),b.toRgba(u,h,d)},g.ensureContrastRatio=function(A,L,T){const z=x.relativeLuminance(A>>8),N=x.relativeLuminance(L>>8);if(p(z,N)<T){if(N<z){const V=E(A,L,T),Q=p(z,x.relativeLuminance(V>>8));if(Q<T){const Y=R(A,L,T);return Q>p(z,x.relativeLuminance(Y>>8))?V:Y}return V}const q=R(A,L,T),G=p(z,x.relativeLuminance(q>>8));if(G<T){const V=E(A,L,T);return G>p(z,x.relativeLuminance(V>>8))?q:V}return q}},g.reduceLuminance=E,g.increaseLuminance=R,g.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(S||(a.rgba=S={})),a.toPaddedHex=m,a.contrastRatio=p},8969:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),d=u(2585),c=u(4348),b=u(7866),w=u(744),k=u(7302),x=u(6975),S=u(8460),m=u(1753),p=u(1480),g=u(7994),E=u(9282),R=u(5435),A=u(5981),L=u(2660);let T=!1;class z extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((q=>{var G;(G=this._onScrollApi)==null||G.fire(q.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(q){for(const G in q)this.optionsService.options[G]=q[G]}constructor(q){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(q)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.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(g.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(q,G){this._writeBuffer.write(q,G)}writeSync(q,G){this._logService.logLevel<=d.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(q,G)}input(q,G=!0){this.coreService.triggerDataEvent(q,G)}resize(q,G){isNaN(q)||isNaN(G)||(q=Math.max(q,w.MINIMUM_COLS),G=Math.max(G,w.MINIMUM_ROWS),this._bufferService.resize(q,G))}scroll(q,G=!1){this._bufferService.scroll(q,G)}scrollLines(q,G,V){this._bufferService.scrollLines(q,G,V)}scrollPages(q){this.scrollLines(q*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(q){const G=q-this._bufferService.buffer.ydisp;G!==0&&this.scrollLines(G)}registerEscHandler(q,G){return this._inputHandler.registerEscHandler(q,G)}registerDcsHandler(q,G){return this._inputHandler.registerDcsHandler(q,G)}registerCsiHandler(q,G){return this._inputHandler.registerCsiHandler(q,G)}registerOscHandler(q,G){return this._inputHandler.registerOscHandler(q,G)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let q=!1;const G=this.optionsService.rawOptions.windowsPty;G&&G.buildNumber!==void 0&&G.buildNumber!==void 0?q=G.backend==="conpty"&&G.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(q=!0),q?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const q=[];q.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),q.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const G of q)G.dispose()}))}}}a.CoreTerminal=z},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(ee,O,M,B){var P,H=arguments.length,ie=H<3?O:B===null?B=Object.getOwnPropertyDescriptor(O,M):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(ee,O,M,B);else for(var fe=ee.length-1;fe>=0;fe--)(P=ee[fe])&&(ie=(H<3?P(ie):H>3?P(O,M,ie):P(O,M))||ie);return H>3&&ie&&Object.defineProperty(O,M,ie),ie},d=this&&this.__param||function(ee,O){return function(M,B){O(M,B,ee)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=u(2584),b=u(7116),w=u(2015),k=u(844),x=u(482),S=u(8437),m=u(8460),p=u(643),g=u(511),E=u(3734),R=u(2585),A=u(1480),L=u(6242),T=u(6351),z=u(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},q=131072;function G(ee,O){if(ee>24)return O.setWinLines||!1;switch(ee){case 1:return!!O.restoreWin;case 2:return!!O.minimizeWin;case 3:return!!O.setWinPosition;case 4:return!!O.setWinSizePixels;case 5:return!!O.raiseWin;case 6:return!!O.lowerWin;case 7:return!!O.refreshWin;case 8:return!!O.setWinSizeChars;case 9:return!!O.maximizeWin;case 10:return!!O.fullscreenWin;case 11:return!!O.getWinState;case 13:return!!O.getWinPosition;case 14:return!!O.getWinSizePixels;case 15:return!!O.getScreenSizePixels;case 16:return!!O.getCellSizePixels;case 18:return!!O.getWinSizeChars;case 19:return!!O.getScreenSizeChars;case 20:return!!O.getIconTitle;case 21:return!!O.getWinTitle;case 22:return!!O.pushTitle;case 23:return!!O.popTitle;case 24:return!!O.setWinLines}return!1}var V;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(V||(a.WindowsOptionsReportType=V={}));let Q=0;class Y extends k.Disposable{getAttrData(){return this._curAttrData}constructor(O,M,B,P,H,ie,fe,de,K=new w.EscapeSequenceParser){super(),this._bufferService=O,this._charsetService=M,this._coreService=B,this._logService=P,this._optionsService=H,this._oscLinkService=ie,this._coreMouseService=fe,this._unicodeService=de,this._parser=K,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new g.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new F(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:le.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,le,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:le,data:Z})})),this._parser.setDcsHandlerFallback(((U,le,Z)=>{le==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:le,payload:Z})})),this._parser.setPrintHandler(((U,le,Z)=>this.print(U,le,Z))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new L.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new L.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new L.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new L.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new L.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new L.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new L.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new L.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new L.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new L.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new L.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new L.OscHandler((U=>this.restoreCursorColor(U)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const U in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((U,le)=>this.requestStatusString(U,le))))}_preserveStack(O,M,B,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=O,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=B,this._parseStack.position=P}_logSlowResolvingAsync(O){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([O,new Promise(((M,B)=>setTimeout((()=>B("#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(O,M){let B,P=this._activeBuffer.x,H=this._activeBuffer.y,ie=0;const fe=this._parseStack.paused;if(fe){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(B),B;P=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,O.length>q&&(ie=this._parseStack.position+q)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof O=="string"?` "${O}"`:` "${Array.prototype.map.call(O,(U=>String.fromCharCode(U))).join("")}"`),typeof O=="string"?O.split("").map((U=>U.charCodeAt(0))):O),this._parseBuffer.length<O.length&&this._parseBuffer.length<q&&(this._parseBuffer=new Uint32Array(Math.min(O.length,q))),fe||this._dirtyRowTracker.clearRange(),O.length>q)for(let U=ie;U<O.length;U+=q){const le=U+q<O.length?U+q:O.length,Z=typeof O=="string"?this._stringDecoder.decode(O.substring(U,le),this._parseBuffer):this._utf8Decoder.decode(O.subarray(U,le),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,Z))return this._preserveStack(P,H,Z,U),this._logSlowResolvingAsync(B),B}else if(!fe){const U=typeof O=="string"?this._stringDecoder.decode(O,this._parseBuffer):this._utf8Decoder.decode(O,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,U))return this._preserveStack(P,H,U,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===P&&this._activeBuffer.y===H||this._onCursorMove.fire();const de=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(de,this._bufferService.rows-1))}print(O,M,B){let P,H;const ie=this._charsetService.charset,fe=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,K=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,le=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-M>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodepoint(this._activeBuffer.x-1,0,1,le);let pe=this._parser.precedingJoinState;for(let _e=M;_e<B;++_e){if(P=O[_e],P<127&&ie){const je=ie[String.fromCharCode(P)];je&&(P=je.charCodeAt(0))}const Ae=this._unicodeService.charProperties(P,pe);H=A.UnicodeService.extractWidth(Ae);const ue=A.UnicodeService.extractShouldJoin(Ae),ye=ue?A.UnicodeService.extractWidth(pe):0;if(pe=Ae,fe&&this._onA11yChar.fire((0,x.stringFromCodePoint)(P)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+H-ye>de){if(K){const je=Z;let Ee=this._activeBuffer.x-ye;for(this._activeBuffer.x=ye,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ye>0&&Z instanceof S.BufferLine&&Z.copyCellsFrom(je,Ee,0,ye,!1);Ee<de;)je.setCellFromCodepoint(Ee++,0,1,le)}else if(this._activeBuffer.x=de-1,H===2)continue}if(ue&&this._activeBuffer.x){const je=Z.getWidth(this._activeBuffer.x-1)?1:2;Z.addCodepointToCell(this._activeBuffer.x-je,P,H);for(let Ee=H-ye;--Ee>=0;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}else if(U&&(Z.insertCells(this._activeBuffer.x,H-ye,this._activeBuffer.getNullCell(le)),Z.getWidth(de-1)===2&&Z.setCellFromCodepoint(de-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,le)),Z.setCellFromCodepoint(this._activeBuffer.x++,P,H,le),H>0)for(;--H;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}this._parser.precedingJoinState=pe,this._activeBuffer.x<de&&B-M>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodepoint(this._activeBuffer.x,0,1,le),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(O,M){return O.final!=="t"||O.prefix||O.intermediates?this._parser.registerCsiHandler(O,M):this._parser.registerCsiHandler(O,(B=>!G(B.params[0],this._optionsService.rawOptions.windowOptions)||M(B)))}registerDcsHandler(O,M){return this._parser.registerDcsHandler(O,new T.DcsHandler(M))}registerEscHandler(O,M){return this._parser.registerEscHandler(O,M)}registerOscHandler(O,M){return this._parser.registerOscHandler(O,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 O;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&&((O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&O.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 O=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-O),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(O=this._bufferService.cols-1){this._activeBuffer.x=Math.min(O,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(O,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=O,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=O,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(O,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+O,this._activeBuffer.y+M)}cursorUp(O){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,O.params[0]||1)):this._moveCursor(0,-(O.params[0]||1)),!0}cursorDown(O){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,O.params[0]||1)):this._moveCursor(0,O.params[0]||1),!0}cursorForward(O){return this._moveCursor(O.params[0]||1,0),!0}cursorBackward(O){return this._moveCursor(-(O.params[0]||1),0),!0}cursorNextLine(O){return this.cursorDown(O),this._activeBuffer.x=0,!0}cursorPrecedingLine(O){return this.cursorUp(O),this._activeBuffer.x=0,!0}cursorCharAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(O){return this._setCursor(O.length>=2?(O.params[1]||1)-1:0,(O.params[0]||1)-1),!0}charPosAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(O){return this._moveCursor(O.params[0]||1,0),!0}linePosAbsolute(O){return this._setCursor(this._activeBuffer.x,(O.params[0]||1)-1),!0}vPositionRelative(O){return this._moveCursor(0,O.params[0]||1),!0}hVPosition(O){return this.cursorPosition(O),!0}tabClear(O){const M=O.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=O.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=O.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(O){const M=O.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(O,M,B,P=!1,H=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);ie.replaceCells(M,B,this._activeBuffer.getNullCell(this._eraseAttrData()),H),P&&(ie.isWrapped=!1)}_resetBufferLine(O,M=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+O),B.isWrapped=!1)}eraseInDisplay(O,M=!1){let B;switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);B<this._bufferService.rows;B++)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine(O,M=!1){switch(this._restrictCursor(this._bufferService.cols),O.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(O){this._restrictCursor();let M=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-P+1;for(;M--;)this._activeBuffer.lines.splice(H-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(O){this._restrictCursor();let M=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let P;for(P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-P;M--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(O){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(O){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(O){let M=O.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(O){let M=O.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(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(O){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(O.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(O){const M=this._parser.precedingJoinState;if(!M)return!0;const B=O.params[0]||1,P=A.UnicodeService.extractWidth(M),H=this._activeBuffer.x-P,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(H),fe=new Uint32Array(ie.length*B);let de=0;for(let U=0;U<ie.length;){const le=ie.codePointAt(U)||0;fe[de++]=le,U+=le>65535?2:1}let K=de;for(let U=1;U<B;++U)fe.copyWithin(K,0,de),K+=de;return this.print(fe,0,K),!0}sendDeviceAttributesPrimary(O){return O.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(O){return O.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(O.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(O){return(this._optionsService.rawOptions.termName+"").indexOf(O)===0}setMode(O){for(let M=0;M<O.length;M++)switch(O.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(O){for(let M=0;M<O.length;M++)switch(O.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(O){for(let M=0;M<O.length;M++)switch(O.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(O){for(let M=0;M<O.length;M++)switch(O.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(),O.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(O,M){const B=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:H}=this._coreMouseService,ie=this._coreService,{buffers:fe,cols:de}=this._bufferService,{active:K,alt:U}=fe,le=this._optionsService.rawOptions,Z=ue=>ue?1:2,pe=O.params[0];return _e=pe,Ae=M?pe===2?4:pe===4?Z(ie.modes.insertMode):pe===12?3:pe===20?Z(le.convertEol):0:pe===1?Z(B.applicationCursorKeys):pe===3?le.windowOptions.setWinLines?de===80?2:de===132?1:0:0:pe===6?Z(B.origin):pe===7?Z(B.wraparound):pe===8?3:pe===9?Z(P==="X10"):pe===12?Z(le.cursorBlink):pe===25?Z(!ie.isCursorHidden):pe===45?Z(B.reverseWraparound):pe===66?Z(B.applicationKeypad):pe===67?4:pe===1e3?Z(P==="VT200"):pe===1002?Z(P==="DRAG"):pe===1003?Z(P==="ANY"):pe===1004?Z(B.sendFocus):pe===1005?4:pe===1006?Z(H==="SGR"):pe===1015?4:pe===1016?Z(H==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?Z(K===U):pe===2004?Z(B.bracketedPasteMode):0,ie.triggerDataEvent(`${c.C0.ESC}[${M?"":"?"}${_e};${Ae}$y`),!0;var _e,Ae}_updateAttrColor(O,M,B,P,H){return M===2?(O|=50331648,O&=-16777216,O|=E.AttributeData.fromColorRGB([B,P,H])):M===5&&(O&=-50331904,O|=33554432|255&B),O}_extractColor(O,M,B){const P=[0,0,-1,0,0,0];let H=0,ie=0;do{if(P[ie+H]=O.params[M+ie],O.hasSubParams(M+ie)){const fe=O.getSubParams(M+ie);let de=0;do P[1]===5&&(H=1),P[ie+de+1+H]=fe[de];while(++de<fe.length&&de+ie+1+H<P.length);break}if(P[1]===5&&ie+H>=2||P[1]===2&&ie+H>=5)break;P[1]&&(H=1)}while(++ie+M<O.length&&ie+H<P.length);for(let fe=2;fe<P.length;++fe)P[fe]===-1&&(P[fe]=0);switch(P[0]){case 38:B.fg=this._updateAttrColor(B.fg,P[1],P[3],P[4],P[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,P[1],P[3],P[4],P[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,P[1],P[3],P[4],P[5])}return ie}_processUnderline(O,M){M.extended=M.extended.clone(),(!~O||O>5)&&(O=1),M.extended.underlineStyle=O,M.fg|=268435456,O===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(O){O.fg=S.DEFAULT_ATTR_DATA.fg,O.bg=S.DEFAULT_ATTR_DATA.bg,O.extended=O.extended.clone(),O.extended.underlineStyle=0,O.extended.underlineColor&=-67108864,O.updateExtended()}charAttributes(O){if(O.length===1&&O.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=O.length;let B;const P=this._curAttrData;for(let H=0;H<M;H++)B=O.params[H],B>=30&&B<=37?(P.fg&=-50331904,P.fg|=16777216|B-30):B>=40&&B<=47?(P.bg&=-50331904,P.bg|=16777216|B-40):B>=90&&B<=97?(P.fg&=-50331904,P.fg|=16777224|B-90):B>=100&&B<=107?(P.bg&=-50331904,P.bg|=16777224|B-100):B===0?this._processSGR0(P):B===1?P.fg|=134217728:B===3?P.bg|=67108864:B===4?(P.fg|=268435456,this._processUnderline(O.hasSubParams(H)?O.getSubParams(H)[0]:1,P)):B===5?P.fg|=536870912:B===7?P.fg|=67108864:B===8?P.fg|=1073741824:B===9?P.fg|=2147483648:B===2?P.bg|=134217728:B===21?this._processUnderline(2,P):B===22?(P.fg&=-134217729,P.bg&=-134217729):B===23?P.bg&=-67108865:B===24?(P.fg&=-268435457,this._processUnderline(0,P)):B===25?P.fg&=-536870913:B===27?P.fg&=-67108865:B===28?P.fg&=-1073741825:B===29?P.fg&=2147483647:B===39?(P.fg&=-67108864,P.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):B===49?(P.bg&=-67108864,P.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?H+=this._extractColor(O,H,P):B===53?P.bg|=1073741824:B===55?P.bg&=-1073741825:B===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):B===100?(P.fg&=-67108864,P.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(O){switch(O.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${M};${B}R`)}return!0}deviceStatusPrivate(O){if(O.params[0]===6){const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${M};${B}R`)}return!0}softReset(O){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(O){const M=O.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 B=M%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(O){const M=O.params[0]||1;let B;return(O.length<2||(B=O.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(O){if(!G(O.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=O.length>1?O.params[1]:0;switch(O.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(O){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(O){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(O){return this._windowTitle=O,this._onTitleChange.fire(O),!0}setIconName(O){return this._iconName=O,!0}setOrReportIndexedColor(O){const M=[],B=O.split(";");for(;B.length>1;){const P=B.shift(),H=B.shift();if(/^\d+$/.exec(P)){const ie=parseInt(P);if(X(ie))if(H==="?")M.push({type:0,index:ie});else{const fe=(0,z.parseColor)(H);fe&&M.push({type:1,index:ie,color:fe})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(O){const M=O.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(O,M){this._getCurrentLinkId()&&this._finishHyperlink();const B=O.split(":");let P;const H=B.findIndex((ie=>ie.startsWith("id=")));return H!==-1&&(P=B[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(O,M){const B=O.split(";");for(let P=0;P<B.length&&!(M>=this._specialColors.length);++P,++M)if(B[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const H=(0,z.parseColor)(B[P]);H&&this._onColor.fire([{type:1,index:this._specialColors[M],color:H}])}return!0}setOrReportFgColor(O){return this._setOrReportSpecialColor(O,0)}setOrReportBgColor(O){return this._setOrReportSpecialColor(O,1)}setOrReportCursorColor(O){return this._setOrReportSpecialColor(O,2)}restoreIndexedColor(O){if(!O)return this._onColor.fire([{type:2}]),!0;const M=[],B=O.split(";");for(let P=0;P<B.length;++P)if(/^\d+$/.exec(B[P])){const H=parseInt(B[P]);X(H)&&M.push({type:2,index:H})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(O){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(O){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(O){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),!0}selectCharset(O){return O.length!==2?(this.selectDefaultCharset(),!0):(O[0]==="/"||this._charsetService.setgCharset(N[O[0]],b.CHARSETS[O[1]]||b.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const O=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,O,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(O){return this._charsetService.setgLevel(O),!0}screenAlignmentPattern(){const O=new g.CellData;O.content=4194373,O.fg=this._curAttrData.fg,O.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const B=this._activeBuffer.ybase+this._activeBuffer.y+M,P=this._activeBuffer.lines.get(B);P&&(P.fill(O),P.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(O,M){const B=this._bufferService.buffer,P=this._optionsService.rawOptions;return(H=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${H}${c.C0.ESC}\\`),!0))(O==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:O==='"p'?'P1$r61;1"p':O==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:O==="m"?"P1$r0m":O===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(O,M){this._dirtyRowTracker.markRangeDirty(O,M)}}a.InputHandler=Y;let F=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,O){ee>O&&(Q=ee,ee=O,O=Q),ee<this.start&&(this.start=ee),O>this.end&&(this.end=O)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(ee){return 0<=ee&&ee<256}F=h([d(0,R.IBufferService)],F)},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,b){this._data[d]||(this._data[d]={}),this._data[d][c]=b}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,b,w){this._data.get(h,d)||this._data.set(h,d,new u),this._data.get(h,d).set(c,b,w)}get(h,d,c,b){var w;return(w=this._data.get(h,d))==null?void 0:w.get(c,b)}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 b=d+c>>1;const w=this._getKey(this._array[b]);if(w>h)c=b-1;else{if(!(w<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}d=b+1}}return d}}},7226:(_,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(),m=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),x=Math.max(k,x),m=w.timeRemaining(),1.5*x>m)return S-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-k))}ms`),void this._start();S=m}this.clear()}}class c extends 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(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}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),b=c==null?void 0:c.get(d.cols-1),w=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);w&&b&&(w.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(_,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,b=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=b}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),b=u(8437),w=u(4634),k=u(511),x=u(643),S=u(4863),m=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(p,g,E){this._hasScrollback=p,this._optionsService=g,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new 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,g){return new b.BufferLine(this._bufferService.cols,this.getNullCell(p),g)}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 g=p+this._optionsService.rawOptions.scrollback;return g>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:g}fillViewportRows(p){if(this.lines.length===0){p===void 0&&(p=b.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)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,g){const E=this.getNullCell(b.DEFAULT_ATTR_DATA);let R=0;const A=this._getCorrectBufferLength(g);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<p)for(let T=0;T<this.lines.length;T++)R+=+this.lines.get(T).resize(p,E);let L=0;if(this._rows<g)for(let T=this._rows;T<g;T++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.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 b.BufferLine(p,E)));else for(let T=this._rows;T>g;T--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const T=this.lines.length-A;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=A}this.x=Math.min(this.x,p-1),this.y=Math.min(this.y,g-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,p-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(p,g),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=g,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 g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>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,g){this._cols!==p&&(p>this._cols?this._reflowLarger(p,g):this._reflowSmaller(p,g))}_reflowLarger(p,g){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,p,this.ybase+this.y,this.getNullCell(b.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,g,R.countRemoved)}}_reflowLargerAdjustViewport(p,g,E){const R=this.getNullCell(b.DEFAULT_ATTR_DATA);let A=E;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new b.BufferLine(p,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(p,g){const E=this.getNullCell(b.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 z=[T];for(;T.isWrapped&&L>0;)T=this.lines.get(--L),z.unshift(T);const N=this.ybase+this.y;if(N>=L&&N<L+z.length)continue;const q=z[z.length-1].getTrimmedLength(),G=(0,w.reflowSmallerGetNewLineLengths)(z,this._cols,p),V=G.length-z.length;let Q;Q=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 B=0;B<V;B++){const P=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);Y.push(P)}Y.length>0&&(R.push({start:L+z.length+A,newLines:Y}),A+=Y.length),z.push(...Y);let F=G.length-1,X=G[F];X===0&&(F--,X=G[F]);let ee=z.length-V-1,O=q;for(;ee>=0;){const B=Math.min(O,X);if(z[F]===void 0)break;if(z[F].copyCellsFrom(z[ee],O-B,X-B,B,!0),X-=B,X===0&&(F--,X=G[F]),O-=B,O===0){ee--;const P=Math.max(ee,0);O=(0,w.getWrappedLineTrimmedLength)(z,P,this._cols)}}for(let B=0;B<z.length;B++)G[B]<p&&z[B].setCell(G[B],E);let M=V-Q;for(;M-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+V,this.ybase+g-1)}if(R.length>0){const L=[],T=[];for(let F=0;F<this.lines.length;F++)T.push(this.lines.get(F));const z=this.lines.length;let N=z-1,q=0,G=R[q];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let V=0;for(let F=Math.min(this.lines.maxLength-1,z+A-1);F>=0;F--)if(G&&G.start>N+V){for(let X=G.newLines.length-1;X>=0;X--)this.lines.set(F--,G.newLines[X]);F++,L.push({index:N+1,amount:G.newLines.length}),V+=G.newLines.length,G=R[++q]}else this.lines.set(F,T[N--]);let Q=0;for(let F=L.length-1;F>=0;F--)L[F].index+=Q,this.lines.onInsertEmitter.fire(L[F]),Q+=L[F].amount;const Y=Math.max(0,z+A-this.lines.maxLength);Y>0&&this.lines.onTrimEmitter.fire(Y)}}translateBufferLineToString(p,g,E=0,R){const A=this.lines.get(p);return A?A.translateToString(g,E,R):""}getWrappedRangeForLine(p){let g=p,E=p;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:g,last:E}}setupTabStops(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 g=0;g<this.markers.length;g++)this.markers[g].line===p&&(this.markers[g].dispose(),this.markers.splice(g--,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 g=new S.Marker(p);return this.markers.push(g),g.register(this.lines.onTrim((E=>{g.line-=E,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((E=>{g.line>=E.index&&(g.line+=E.amount)}))),g.register(this.lines.onDelete((E=>{g.line>=E.index&&g.line<E.index+E.amount&&g.dispose(),g.line>E.index&&(g.line-=E.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(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),b=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(S,m,p=!1){this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const g=m||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,g);this.length=S}get(S){const m=this._data[3*S+0],p=2097151&m;return[this._data[3*S+1],2097152&m?this._combined[S]:p?(0,b.stringFromCodePoint)(p):"",m>>22,2097152&m?this._combined[S].charCodeAt(this._combined[S].length-1):p]}set(S,m){this._data[3*S+1]=m[c.CHAR_DATA_ATTR_INDEX],m[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=m[1],this._data[3*S+0]=2097152|S|m[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=m[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[c.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(S){return this._data[3*S+0]>>22}hasWidth(S){return 12582912&this._data[3*S+0]}getFg(S){return this._data[3*S+1]}getBg(S){return this._data[3*S+2]}hasContent(S){return 4194303&this._data[3*S+0]}getCodePoint(S){const m=this._data[3*S+0];return 2097152&m?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&m}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const m=this._data[3*S+0];return 2097152&m?this._combined[S]:2097151&m?(0,b.stringFromCodePoint)(2097151&m):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,m){return w=3*S,m.content=this._data[w+0],m.fg=this._data[w+1],m.bg=this._data[w+2],2097152&m.content&&(m.combinedData=this._combined[S]),268435456&m.bg&&(m.extended=this._extendedAttrs[S]),m}setCell(S,m){2097152&m.content&&(this._combined[S]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[S]=m.extended),this._data[3*S+0]=m.content,this._data[3*S+1]=m.fg,this._data[3*S+2]=m.bg}setCellFromCodepoint(S,m,p,g){268435456&g.bg&&(this._extendedAttrs[S]=g.extended),this._data[3*S+0]=m|p<<22,this._data[3*S+1]=g.fg,this._data[3*S+2]=g.bg}addCodepointToCell(S,m,p){let g=this._data[3*S+0];2097152&g?this._combined[S]+=(0,b.stringFromCodePoint)(m):2097151&g?(this._combined[S]=(0,b.stringFromCodePoint)(2097151&g)+(0,b.stringFromCodePoint)(m),g&=-2097152,g|=2097152):g=m|4194304,p&&(g&=-12582913,g|=p<<22),this._data[3*S+0]=g}insertCells(S,m,p){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),m<this.length-S){const g=new d.CellData;for(let E=this.length-S-m-1;E>=0;--E)this.setCell(S+m+E,this.loadCell(S+E,g));for(let E=0;E<m;++E)this.setCell(S+E,p)}else for(let g=S;g<this.length;++g)this.setCell(g,p);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,p)}deleteCells(S,m,p){if(S%=this.length,m<this.length-S){const g=new d.CellData;for(let E=0;E<this.length-S-m;++E)this.setCell(S+E,this.loadCell(S+m+E,g));for(let E=this.length-m;E<this.length;++E)this.setCell(E,p)}else for(let g=S;g<this.length;++g)this.setCell(g,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,m,p,g=!1){if(g)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,p),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodepoint(m,0,1,p);S<m&&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),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m,0,1,p);S<m&&S<this.length;)this.setCell(S++,p)}resize(S,m){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 g=new Uint32Array(p);g.set(this._data),this._data=g}for(let g=this.length;g<S;++g)this.setCell(g,m)}else{this._data=this._data.subarray(0,p);const g=Object.keys(this._combined);for(let R=0;R<g.length;R++){const A=parseInt(g[R],10);A>=S&&delete this._combined[A]}const E=Object.keys(this._extendedAttrs);for(let R=0;R<E.length;R++){const A=parseInt(E[R],10);A>=S&&delete this._extendedAttrs[A]}}return this.length=S,4*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,m=!1){if(m)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 m in S._combined)this._combined[m]=S._combined[m];this._extendedAttrs={};for(const m in S._extendedAttrs)this._extendedAttrs[m]=S._extendedAttrs[m];this.isWrapped=S.isWrapped}clone(){const S=new k(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const m in this._combined)S._combined[m]=this._combined[m];for(const m in this._extendedAttrs)S._extendedAttrs[m]=this._extendedAttrs[m];return S.isWrapped=this.isWrapped,S}getTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0])return S+(this._data[3*S+0]>>22);return 0}getNoBgTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0]||50331648&this._data[3*S+2])return S+(this._data[3*S+0]>>22);return 0}copyCellsFrom(S,m,p,g,E){const R=S._data;if(E)for(let L=g-1;L>=0;L--){for(let T=0;T<3;T++)this._data[3*(p+L)+T]=R[3*(m+L)+T];268435456&R[3*(m+L)+2]&&(this._extendedAttrs[p+L]=S._extendedAttrs[m+L])}else for(let L=0;L<g;L++){for(let T=0;T<3;T++)this._data[3*(p+L)+T]=R[3*(m+L)+T];268435456&R[3*(m+L)+2]&&(this._extendedAttrs[p+L]=S._extendedAttrs[m+L])}const A=Object.keys(S._combined);for(let L=0;L<A.length;L++){const T=parseInt(A[L],10);T>=m&&(this._combined[T-m+p]=S._combined[T])}}translateToString(S,m,p,g){m=m??0,p=p??this.length,S&&(p=Math.min(p,this.getTrimmedLength())),g&&(g.length=0);let E="";for(;m<p;){const R=this._data[3*m+0],A=2097151&R,L=2097152&R?this._combined[m]:A?(0,b.stringFromCodePoint)(A):c.WHITESPACE_CELL_CHAR;if(E+=L,g)for(let T=0;T<L.length;++T)g.push(m);m+=R>>22||1}return g&&g.push(m),E}}a.BufferLine=k},4841:(_,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 b=!h[d].hasContent(c-1)&&h[d].getWidth(c-1)===1,w=h[d+1].getWidth(0)===2;return b&&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,b,w){const k=[];for(let x=0;x<h.length-1;x++){let S=x,m=h.get(++S);if(!m.isWrapped)continue;const p=[h.get(x)];for(;S<h.length&&m.isWrapped;)p.push(m),m=h.get(++S);if(b>=x&&b<S){x+=p.length-1;continue}let g=0,E=u(p,g,d),R=1,A=0;for(;R<p.length;){const T=u(p,R,d),z=T-A,N=c-E,q=Math.min(z,N);p[g].copyCellsFrom(p[R],A,E,q,!1),E+=q,E===c&&(g++,E=0),A+=q,A===T&&(R++,A=0),E===0&&g!==0&&p[g-1].getWidth(c-1)===2&&(p[g].copyCellsFrom(p[g-1],c-1,E++,1,!1),p[g-1].setCell(c-1,w))}p[g].replaceCells(E,c,w);let L=0;for(let T=p.length-1;T>0&&(T>g||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 b=0,w=d[b],k=0;for(let x=0;x<h.length;x++)if(w===x){const S=d[++b];h.onDeleteEmitter.fire({index:x-k,amount:S}),x+=S-1,k+=S,w=d[++b]}else c.push(x);return{layout:c,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,d){const c=[];for(let b=0;b<d.length;b++)c.push(h.get(d[b]));for(let b=0;b<c.length;b++)h.set(b,c[b]);h.length=d.length},a.reflowSmallerGetNewLineLengths=function(h,d,c){const b=[],w=h.map(((m,p)=>u(h,p,d))).reduce(((m,p)=>m+p));let k=0,x=0,S=0;for(;S<w;){if(w-S<c){b.push(w-S);break}k+=c;const m=u(h,x,d);k>m&&(k-=m,x++);const p=h[x].getWidth(k-1)===2;p&&k--;const g=p?c-1:c;b.push(g),S+=g}return b},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 b extends d.Disposable{constructor(k,x){super(),this._optionsService=k,this._bufferService=x,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new 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=b},511:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),d=u(643),c=u(3734);class b 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 b;return x.setFromCharData(k),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const S=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const m=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(S-55296)+m-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=b},643:(_,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,b,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=b?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=b?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=b?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=b?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=b?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=b?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":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=S?h.C0.ESC+"[1;"+(S+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:c.shiftKey?x.type=2:c.ctrlKey?x.key=h.C0.ESC+"[5;"+(S+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:c.shiftKey?x.type=3:c.ctrlKey?x.key=h.C0.ESC+"[6;"+(S+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=S?h.C0.ESC+"[1;"+(S+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=S?h.C0.ESC+"[1;"+(S+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=S?h.C0.ESC+"[1;"+(S+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=S?h.C0.ESC+"[1;"+(S+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=S?h.C0.ESC+"[15;"+(S+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=S?h.C0.ESC+"[17;"+(S+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=S?h.C0.ESC+"[18;"+(S+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=S?h.C0.ESC+"[19;"+(S+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=S?h.C0.ESC+"[20;"+(S+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=S?h.C0.ESC+"[21;"+(S+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=S?h.C0.ESC+"[23;"+(S+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=S?h.C0.ESC+"[24;"+(S+1)+"~":h.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(w&&!k||!c.altKey||c.metaKey)!w||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?x.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(x.key=h.C0.US),c.key==="@"&&(x.key=h.C0.NUL)):c.keyCode===65&&(x.type=1);else{const m=d[c.keyCode],p=m==null?void 0:m[c.shiftKey?1:0];if(p)x.key=h.C0.ESC+p;else if(c.keyCode>=65&&c.keyCode<=90){const g=c.ctrlKey?c.keyCode-64:c.keyCode+32;let E=String.fromCharCode(g);c.shiftKey&&(E=E.toUpperCase()),x.key=h.C0.ESC+E}else if(c.keyCode===32)x.key=h.C0.ESC+(c.ctrlKey?h.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let g=c.code.slice(3,4);c.shiftKey||(g=g.toLowerCase()),x.key=h.C0.ESC+g,x.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?x.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?x.key=h.C0.NUL:c.keyCode>=51&&c.keyCode<=55?x.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?x.key=h.C0.DEL:c.keyCode===219?x.key=h.C0.ESC:c.keyCode===220?x.key=h.C0.FS:c.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(_,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 b=h;b<d;++b){let w=u[b];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,b=0;if(this._interim){const w=u.charCodeAt(b++);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=b;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,b,w,k,x=0,S=0,m=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let A,L=0;for(;(A=63&this.interim[++L])&&L<4;)R<<=6,R|=A;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,z=T-L;for(;m<z;){if(m>=d)return 0;if(A=u[m++],(192&A)!=128){m--,E=!0;break}this.interim[L++]=A,R<<=6,R|=63&A}E||(T===2?R<128?m--:h[x++]=R:T===3?R<2048||R>=55296&&R<=57343||R===65279||(h[x++]=R):R<65536||R>1114111||(h[x++]=R)),this.interim.fill(0)}const p=d-4;let g=m;for(;g<d;){for(;!(!(g<p)||128&(c=u[g])||128&(b=u[g+1])||128&(w=u[g+2])||128&(k=u[g+3]));)h[x++]=c,h[x++]=b,h[x++]=w,h[x++]=k,g+=4;if(c=u[g++],c<128)h[x++]=c;else if((224&c)==192){if(g>=d)return this.interim[0]=c,x;if(b=u[g++],(192&b)!=128){g--;continue}if(S=(31&c)<<6|63&b,S<128){g--;continue}h[x++]=S}else if((240&c)==224){if(g>=d)return this.interim[0]=c,x;if(b=u[g++],(192&b)!=128){g--;continue}if(g>=d)return this.interim[0]=c,this.interim[1]=b,x;if(w=u[g++],(192&w)!=128){g--;continue}if(S=(15&c)<<12|(63&b)<<6|63&w,S<2048||S>=55296&&S<=57343||S===65279)continue;h[x++]=S}else if((248&c)==240){if(g>=d)return this.interim[0]=c,x;if(b=u[g++],(192&b)!=128){g--;continue}if(g>=d)return this.interim[0]=c,this.interim[1]=b,x;if(w=u[g++],(192&w)!=128){g--;continue}if(g>=d)return this.interim[0]=c,this.interim[1]=b,this.interim[2]=w,x;if(k=u[g++],(192&k)!=128){g--;continue}if(S=(7&c)<<18|(63&b)<<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 b;a.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let w=0;w<d.length;++w)b.fill(0,d[w][0],d[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?b[w]:(function(k,x){let S,m=0,p=x.length-1;if(k<x[0][0]||k>x[p][1])return!1;for(;p>=m;)if(S=m+p>>1,k>x[S][1])m=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 m=h.UnicodeService.extractWidth(k);m===0?S=!1:m>x&&(x=m)}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],m=this._action(S,k);if(m){const g=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void m.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(g)}const 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,b){const w=c.toString(16),k=w.length<2?"0"+w:w;switch(b){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}a.parseColor=function(c){if(!c)return;let b=c.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const w=u.exec(b);if(w){const k=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/k*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/k*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/k*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const w=b.length/3,k=[0,0,0];for(let x=0;x<3;++x){const S=parseInt(b.slice(w*x,w*x+w),16);k[x]=w===1?S<<4:w===2?S:w===3?S>>4:S>>8}return k}},a.toRgbString=function(c,b=16){const[w,k,x]=c;return`rgb:${d(w,b)}/${d(k,b)}/${d(x,b)}`}},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),b=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const S=this._handlers[k];return S.push(x),{dispose:()=>{const m=S.indexOf(x);m!==-1&&S.splice(m,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||b,this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(k,x,S){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(k,x,S);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(k,x,S))}unhook(k,x=!0){if(this._active.length){let S=!1,m=this._active.length-1,p=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,S=x,p=this._stack.fallThrough,this._stack.paused=!1),!p&&S===!1){for(;m>=0&&(S=this._active[m].unhook(k),S!==!0);m--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,S;m--}for(;m>=0;m--)if(S=this._active[m].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",k);this._active=b,this._ident=0}};const w=new d.Params;w.addParam(0),a.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=w,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():w,this._data="",this._hitLimit=!1}put(k,x,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,S),this._data.length>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),b=u(6351);class w{constructor(m){this.table=new Uint8Array(m)}setDefault(m,p){this.table.fill(m<<4|p)}add(m,p,g,E){this.table[p<<8|m]=g<<4|E}addMany(m,p,g,E){for(let R=0;R<m.length;R++)this.table[p<<8|m[R]]=g<<4|E}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),m=Array.apply(null,Array(256)).map(((L,T)=>T)),p=(L,T)=>m.slice(L,T),g=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(g,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(g,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(g,7,0,7),S.addMany(E,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(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(g,13,13,13),S.add(127,13,0,13),S.addMany([27,156,24,26],13,14,0),S.add(k,0,2,0),S.add(k,8,5,8),S.add(k,6,0,6),S.add(k,11,0,11),S.add(k,13,13,13),S})();class x extends h.Disposable{constructor(m=a.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(p,g,E)=>{},this._executeHandlerFb=p=>{},this._csiHandlerFb=(p,g)=>{},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 b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(m,p=[64,126]){let g=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=m.prefix.charCodeAt(0),g&&60>g||g>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<m.intermediates.length;++R){const A=m.intermediates.charCodeAt(R);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=A}}if(m.final.length!==1)throw new Error("final must be a single byte");const E=m.final.charCodeAt(0);if(p[0]>E||E>p[1])throw new Error(`final must be in range ${p[0]} .. ${p[1]}`);return g<<=8,g|=E,g}identToString(m){const p=[];for(;m;)p.push(String.fromCharCode(255&m)),m>>=8;return p.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,p){const g=this._identifier(m,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const E=this._escHandlers[g];return E.push(p),{dispose:()=>{const R=E.indexOf(p);R!==-1&&E.splice(R,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,p){this._executeHandlers[m.charCodeAt(0)]=p}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,p){const g=this._identifier(m);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const E=this._csiHandlers[g];return E.push(p),{dispose:()=>{const R=E.indexOf(p);R!==-1&&E.splice(R,1)}}}clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,p){return this._dcsParser.registerHandler(this._identifier(m),p)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,p){return this._oscParser.registerHandler(m,p)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(m,p,g,E,R){this._parseStack.state=m,this._parseStack.handlers=p,this._parseStack.handlerPos=g,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(m,p,g){let E,R=0,A=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let z=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&z>-1){for(;z>=0&&(E=T[z](this._params),E!==!0);z--)if(E instanceof Promise)return this._parseStack.handlerPos=z,E}this._parseStack.handlers=[];break;case 4:if(g===!1&&z>-1){for(;z>=0&&(E=T[z](),E!==!0);z--)if(E instanceof Promise)return this._parseStack.handlerPos=z,E}this._parseStack.handlers=[];break;case 6:if(R=m[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=m[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,g),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=L;T<p;++T){switch(R=m[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=m[V])<32||R>126&&R<k){this._printHandler(m,T,V),T=V-1;break}if(++V>=p||(R=m[V])<32||R>126&&R<k){this._printHandler(m,T,V),T=V-1;break}if(++V>=p||(R=m[V])<32||R>126&&R<k){this._printHandler(m,T,V),T=V-1;break}if(++V>=p||(R=m[V])<32||R>126&&R<k){this._printHandler(m,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 z=this._csiHandlers[this._collect<<8|R];let N=z?z.length-1:-1;for(;N>=0&&(E=z[N](this._params),E!==!0);N--)if(E instanceof Promise)return this._preserveStack(3,z,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=m[T])>47&&R<60);T--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const q=this._escHandlers[this._collect<<8|R];let G=q?q.length-1:-1;for(;G>=0&&(E=q[G](),E!==!0);G--)if(E instanceof Promise)return this._preserveStack(4,q,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=m[V])===24||R===26||R===27||R>127&&R<k){this._dcsParser.put(m,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=m[V])<32||R>127&&R<k){this._oscParser.put(m,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(b,w){this._handlers[b]===void 0&&(this._handlers[b]=[]);const k=this._handlers[b];return k.push(w),{dispose:()=>{const x=k.indexOf(w);x!==-1&&k.splice(x,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,w,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,w,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(b,w,k))}start(){this.reset(),this._state=1}put(b,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){const x=b[w++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&k-w>0&&this._put(b,w,k)}}end(b,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,S=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=w,S=this._stack.fallThrough,this._stack.paused=!1),!S&&k===!1){for(;x>=0&&(k=this._active[x].end(b),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",b);this._active=c,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,w,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,w,k),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let w=!1;if(this._hitLimit)w=!1;else if(b&&(w=this._handler(this._data),w instanceof Promise))return w.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,w}}},8742:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class h{static fromArray(c){const b=new h;if(!c.length)return b;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)b.addSubParam(k[x]);else b.addParam(k)}return b}constructor(c=32,b=32){if(this.maxLength=c,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(b),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 b=0;b<this.length;++b){c.push(this.params[b]);const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];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 b=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-b>0?this._subParams.subarray(b,w):null}getSubParamsAll(){const c={};for(let b=0;b<this.length;++b){const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&(c[b]=this._subParams.slice(w,k))}return c}addDigit(c){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,k=w[b-1];w[b-1]=~k?Math.min(10*k+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,b){this._buffer=c,this.type=b}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 b=this._buffer.lines.get(c);if(b)return new h.BufferLineApiView(b)}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,b){return this._line.translateToString(d,c,b)}}},8285:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),d=u(8460),c=u(844);class b 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=b},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,m,p,g){var E,R=arguments.length,A=R<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,m,p,g);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(m,p,A):E(m,p))||A);return R>3&&A&&Object.defineProperty(m,p,A),A},d=this&&this.__param||function(S,m){return function(p,g){m(p,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=u(8460),b=u(844),w=u(5295),k=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(S){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(S.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(S.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(S,this))}resize(S,m){this.cols=S,this.rows=m,this.buffers.resize(S,m),this._onResize.fire({cols:S,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,m=!1){const p=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===S.fg&&g.getBg(0)===S.bg||(g=p.getBlankLine(S,m),this._cachedBlankLine=g),g.isWrapped=m;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(g):p.lines.push(g.clone()):p.lines.splice(R+1,0,g.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,g.clone())}this.isUserScrolling||(p.ydisp=p.ybase),this._onScroll.fire(p.ydisp)}scrollLines(S,m,p){const g=this.buffer;if(S<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else S+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const E=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+S,g.ybase),0),E!==g.ydisp&&(m||this._onScroll.fire(g.ydisp))}};a.BufferService=x=h([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(g,E,R,A){var L,T=arguments.length,z=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(g,E,R,A);else for(var N=g.length-1;N>=0;N--)(L=g[N])&&(z=(T<3?L(z):T>3?L(E,R,z):L(E,R))||z);return T>3&&z&&Object.defineProperty(E,R,z),z},d=this&&this.__param||function(g,E){return function(R,A){E(R,A,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const c=u(2585),b=u(8460),w=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function x(g,E){let R=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(R|=64,R|=g.action):(R|=3&g.button,4&g.button&&(R|=64),8&g.button&&(R|=128),g.action===32?R|=32:g.action!==0||E||(R|=3)),R}const S=String.fromCharCode,m={DEFAULT:g=>{const E=[x(g,!1)+32,g.col+32,g.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${S(E[0])}${S(E[1])}${S(E[2])}`},SGR:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.col};${g.row}${E}`},SGR_PIXELS:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.x};${g.y}${E}`}};let p=a.CoreMouseService=class extends w.Disposable{constructor(g,E){super(),this._bufferService=g,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(k))this.addProtocol(R,k[R]);for(const R of Object.keys(m))this.addEncoding(R,m[R]);this.reset()}addProtocol(g,E){this._protocols[g]=E}addEncoding(g,E){this._encodings[g]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const E=this._encodings[this._activeEncoding](g);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,E,R){if(R){if(g.x!==E.x||g.y!==E.y)return!1}else if(g.col!==E.col||g.row!==E.row)return!1;return g.button===E.button&&g.action===E.action&&g.ctrl===E.ctrl&&g.alt===E.alt&&g.shift===E.shift}};a.CoreMouseService=p=h([d(0,c.IBufferService),d(1,c.ICoreService)],p)},6975:function(_,a,u){var h=this&&this.__decorate||function(p,g,E,R){var A,L=arguments.length,T=L<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(p,g,E,R);else for(var z=p.length-1;z>=0;z--)(A=p[z])&&(T=(L<3?A(T):L>3?A(g,E,T):A(g,E))||T);return L>3&&T&&Object.defineProperty(g,E,T),T},d=this&&this.__param||function(p,g){return function(E,R){g(E,R,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const c=u(1439),b=u(8460),w=u(844),k=u(2585),x=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=a.CoreService=class extends w.Disposable{constructor(p,g,E){super(),this._bufferService=p,this._logService=g,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}reset(){this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}triggerDataEvent(p,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${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((g=>g.charCodeAt(0))))),this._onBinary.fire(p))}};a.CoreService=m=h([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],m)},9074:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),d=u(8460),c=u(844),b=u(6106);let w=0,k=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.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 g=new S(p);if(g){const E=g.marker.onDispose((()=>g.dispose()));g.onDispose((()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),E.dispose())})),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const p of this._decorations.values())p.dispose();this._decorations.clear()}*getDecorationsAtCell(p,g,E){let R=0,A=0;for(const L of this._decorations.getKeyIterator(g))R=L.options.x??0,A=R+(L.options.width??1),p>=R&&p<A&&(!E||(L.options.layer??"bottom")===E)&&(yield L)}forEachDecorationAtCell(p,g,E,R){this._decorations.forEachByKey(g,(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(b,w){this._services.set(b,w)}getService(b){return this._services.get(b)}createInstance(b,...w){const k=(0,d.getServiceDependencies)(b).sort(((m,p)=>m.index-p.index)),x=[];for(const m of k){const p=this._services.get(m.id);if(!p)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${m.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 ${b.name} at position ${S+1} conflicts with ${w.length} static arguments`);return new b(...w,...x)}}},7866:function(_,a,u){var h=this&&this.__decorate||function(S,m,p,g){var E,R=arguments.length,A=R<3?m:g===null?g=Object.getOwnPropertyDescriptor(m,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(S,m,p,g);else for(var L=S.length-1;L>=0;L--)(E=S[L])&&(A=(R<3?E(A):R>3?E(m,p,A):E(m,p))||A);return R>3&&A&&Object.defineProperty(m,p,A),A},d=this&&this.__param||function(S,m){return function(p,g){m(p,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=u(844),b=u(2585),w={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let k,x=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(S){super(),this._optionsService=S,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(S){for(let m=0;m<S.length;m++)typeof S[m]=="function"&&(S[m]=S[m]())}_log(S,m,p){this._evalLazyOptionalParams(p),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...p)}trace(S,...m){var p;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.trace.bind(this._optionsService.options.logger))??console.log,S,m)}debug(S,...m){var p;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.debug.bind(this._optionsService.options.logger))??console.log,S,m)}info(S,...m){var p;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.info.bind(this._optionsService.options.logger))??console.info,S,m)}warn(S,...m){var p;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.warn.bind(this._optionsService.options.logger))??console.warn,S,m)}error(S,...m){var p;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.error.bind(this._optionsService.options.logger))??console.error,S,m)}};a.LogService=x=h([d(0,b.IOptionsService)],x),a.setTraceLogger=function(S){k=S},a.traceCall=function(S,m,p){if(typeof p.value!="function")throw new Error("not supported");const g=p.value;p.value=function(...E){if(k.logLevel!==b.LogLevelEnum.TRACE)return g.apply(this,E);k.trace(`GlyphRenderer#${g.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const R=g.apply(this,E);return k.trace(`GlyphRenderer#${g.name} return`,R),R}}},7302:(_,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 b=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...a.DEFAULT_OPTIONS};for(const m in x)if(m in S)try{const p=x[m];S[m]=this._sanitizeAndValidateOption(m,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((m=>{m===x&&S(this.rawOptions[x])}))}onMultipleOptionChange(x,S){return this.onOptionChange((m=>{x.indexOf(m)!==-1&&S()}))}_setupOptions(){const x=m=>{if(!(m in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},S=(m,p)=>{if(!(m in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);p=this._sanitizeAndValidateOption(m,p),this.rawOptions[m]!==p&&(this.rawOptions[m]=p,this._onOptionChange.fire(m))};for(const m in this.rawOptions){const p={get:x.bind(this,m),set:S.bind(this,m)};Object.defineProperty(this.options,m,p)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=a.DEFAULT_OPTIONS[x]),!(function(m){return m==="block"||m==="underline"||m==="bar"})(S))throw new Error(`"${S}" is not a valid value for ${x}`);break;case"wordSeparator":S||(S=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof S=="number"&&1<=S&&S<=1e3)break;S=b.includes(S)?S:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":S=Math.floor(S);case"lineHeight":case"tabStopWidth":if(S<1)throw new Error(`${x} cannot be less than 1, value: ${S}`);break;case"minimumContrastRatio":S=Math.max(1,Math.min(21,Math.round(10*S)/10));break;case"scrollback":if((S=Math.min(S,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${S}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(S<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${S}`);break;case"rows":case"cols":if(!S&&S!==0)throw new Error(`${x} must be numeric, value: ${S}`);break;case"windowsPty":S=S??{}}return S}}a.OptionsService=w},2660:function(_,a,u){var h=this&&this.__decorate||function(w,k,x,S){var m,p=arguments.length,g=p<3?k:S===null?S=Object.getOwnPropertyDescriptor(k,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,k,x,S);else for(var E=w.length-1;E>=0;E--)(m=w[E])&&(g=(p<3?m(g):p>3?m(k,x,g):m(k,x))||g);return p>3&&g&&Object.defineProperty(k,x,g),g},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 b=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const k=this._bufferService.buffer;if(w.id===void 0){const E=k.addMarker(k.ybase+k.y),R={data:w,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(R,E))),this._dataByLinkId.set(R.id,R),R.id}const x=w,S=this._getEntryIdKey(x),m=this._entriesWithId.get(S);if(m)return this.addLineToLink(m.id,k.ybase+k.y),m.id;const p=k.addMarker(k.ybase+k.y),g={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[p]};return p.onDispose((()=>this._removeMarkerFromLink(g,p))),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.id}addLineToLink(w,k){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((S=>S.line!==k))){const S=this._bufferService.buffer.addMarker(k);x.lines.push(S),S.onDispose((()=>this._removeMarkerFromLink(x,S)))}}getLinkData(w){var k;return(k=this._dataByLinkId.get(w))==null?void 0:k.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,k){const x=w.lines.indexOf(k);x!==-1&&(w.lines.splice(x,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};a.OscLinkService=b=h([d(0,c.IBufferService)],b)},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(b,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,S,m){S[u]===S?S[h].push({id:x,index:m}):(S[h]=[{id:x,index:m}],S[u]=S)})(c,b,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 m=0;m<S;++m){let p=w.charCodeAt(m);if(55296<=p&&p<=56319){if(++m>=S)return k+this.wcwidth(p);const R=w.charCodeAt(m);56320<=R&&R<=57343?p=1024*(p-55296)+R-56320+65536:k+=this.wcwidth(R)}const g=this.charProperties(p,x);let E=c.extractWidth(g);c.extractShouldJoin(g)&&(E-=c.extractWidth(x)),k+=E,x=g}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=c}},o={};function v(_){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 C={};return(()=>{var _=C;Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;const a=v(9042),u=v(3236),h=v(844),d=v(5741),c=v(8285),b=v(7975),w=v(7090),k=["cols","rows"];class x extends h.Disposable{constructor(m){super(),this._core=this.register(new u.Terminal(m)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const p=E=>this._core.options[E],g=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:p.bind(this,E),set:g.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_checkReadonlyOptions(m){if(k.includes(m))throw new Error(`Option "${m}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new b.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const m=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:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:p,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(const p in m)this._publicOptions[p]=m[p]}blur(){this._core.blur()}focus(){this._core.focus()}input(m,p=!0){this._core.input(m,p)}resize(m,p){this._verifyIntegers(m,p),this._core.resize(m,p)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}attachCustomWheelEventHandler(m){this._core.attachCustomWheelEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){return this._checkProposedApi(),this._verifyPositiveIntegers(m.x??0,m.width??0,m.height??0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,p,g){this._verifyIntegers(m,p,g),this._core.select(m,p,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,p){this._verifyIntegers(m,p),this._core.selectLines(m,p)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,p){this._core.write(m,p)}writeln(m,p){this._core.write(m),this._core.write(`\r
|
|
57
|
-
`,p)}paste(m){this._core.paste(m)}refresh(m,p){this._verifyIntegers(m,p),this._core.refresh(m,p)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return a}_verifyIntegers(...m){for(const p of m)if(p===1/0||isNaN(p)||p%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const p of m)if(p&&(p===1/0||isNaN(p)||p%1!=0||p<0))throw new Error("This API only accepts positive integers")}}_.Terminal=x})(),C})()))})(Nu)),Nu.exports}var x0=w0();class E0{constructor(s,l){Dp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(s)}`),this.socket.addEventListener("message",v=>{var _,a;const C=JSON.parse(v.data);C.type==="output"?l.onOutput(C.data):C.type==="error"?(_=l.onError)==null||_.call(l,C.message):(a=l.onStatus)==null||a.call(l,C)}),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 H_({sessionId:n,active:s=!0,onEvent:l}){const o=me.useRef(null),v=me.useRef(null),C=me.useRef(null),_=me.useRef(null),a=me.useRef(s),u=me.useRef(l);function h(d={}){const c=o.current,b=v.current,w=C.current,k=_.current;if(!c||!b||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<k0||x.height<A0||(w.fit(),k.cols<T0||k.rows<D0)?!1:(b.resize(k.cols,k.rows),d.focus&&k.focus(),!0)}return me.useEffect(()=>{u.current=l},[l]),me.useEffect(()=>{a.current=s},[s]),me.useEffect(()=>{if(!o.current)return;const d=new x0.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:R0}),c=new y0.FitAddon;d.loadAddon(c),d.loadAddon(new C0.WebLinksAddon),d.open(o.current),_.current=d,C.current=c;const b=new E0(n,{onOutput(g){d.write(g)},onStatus(g){var E;(E=u.current)==null||E.call(u,g.type)},onError(g){var E;d.writeln(`\r
|
|
58
|
-
[VCM] ${g}`),(E=u.current)==null||E.call(u,g)}});v.current=b;const w=d.onData(g=>{b.sendInput(g)});let k=0,x=0,S=0;const m=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},p=new ResizeObserver(()=>{m()});return p.observe(o.current),x=window.requestAnimationFrame(m),S=window.setTimeout(m,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),p.disconnect(),w.dispose(),b.close(),d.dispose(),v.current=null,_.current=null,C.current=null}},[n]),me.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 b of d)window.cancelAnimationFrame(b);for(const b of c)window.clearTimeout(b)}},[s]),me.useEffect(()=>{const d=()=>{a.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),I.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var d;return(d=_.current)==null?void 0:d.focus()}})}const k0=160,A0=80,T0=20,D0=5,R0={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 I.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function L0({status:n,bootstrapStatus:s,applyResult:l,busy:o=!1,onRefresh:v,onApply:C,onStartBootstrap:_}){const[a,u]=me.useState(!1),h=s==null?void 0:s.session;return me.useEffect(()=>{h||u(!1)},[h]),n?I.jsxs("section",{className:"harness-panel",children:[I.jsxs("div",{className:"harness-stage",children:[I.jsxs("div",{className:"harness-panel-header",children:[I.jsxs("div",{children:[I.jsx("strong",{children:"Fixed install"}),I.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"})]}),I.jsxs("div",{className:"harness-actions",children:[I.jsx("button",{type:"button",disabled:o,onClick:()=>void v(),children:"Refresh"}),I.jsx("button",{type:"button",disabled:o||!n.needsApply,onClick:()=>void C(),children:"Install / Update"})]})]}),I.jsx("ol",{className:"harness-file-list",children:n.files.map(d=>I.jsxs("li",{children:[I.jsx("span",{children:d.path}),I.jsx(Tr,{status:d.action})]},d.path))})]}),I.jsxs("div",{className:"harness-stage",children:[I.jsxs("div",{className:"harness-panel-header",children:[I.jsxs("div",{children:[I.jsx("strong",{children:"Bootstrap"}),I.jsx("p",{className:"muted",children:s?M0(s.status):"not loaded"})]}),I.jsx("div",{className:"harness-actions",children:I.jsx("button",{type:"button",disabled:o||!(s!=null&&s.canStart),onClick:()=>{u(!0),_()},children:"Run Bootstrap"})})]}),s?I.jsxs(I.Fragment,{children:[I.jsx("ol",{className:"harness-file-list",children:s.checks.map(d=>I.jsxs("li",{title:d.detail??d.path??"",children:[I.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),I.jsx(Tr,{status:d.status})]},d.key))}),h?I.jsxs("div",{className:"harness-bootstrap-session",children:[I.jsxs("div",{children:[I.jsx("span",{children:h.command}),I.jsx(Tr,{status:h.status})]}),I.jsx("button",{type:"button",onClick:()=>u(!0),children:"Open Terminal"})]}):null]}):I.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),n.plannedChanges.length>0?I.jsxs("div",{className:"harness-changes",children:[I.jsx("h3",{children:"Planned Changes"}),I.jsx("ul",{children:n.plannedChanges.map(d=>I.jsxs("li",{children:[I.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))})]}):null,l?I.jsxs("div",{className:"harness-result",children:[I.jsx("p",{children:l.message}),l.changedFiles.length>0?I.jsx("ul",{children:l.changedFiles.map(d=>I.jsxs("li",{children:[I.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?I.jsx("ul",{className:"warnings",children:n.warnings.map(d=>I.jsx("li",{children:d},d))}):null,s!=null&&s.warnings.length?I.jsx("ul",{className:"warnings",children:s.warnings.map(d=>I.jsx("li",{children:d},d))}):null,a&&h?I.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:I.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[I.jsxs("header",{className:"harness-bootstrap-modal-header",children:[I.jsxs("div",{children:[I.jsx("strong",{children:"Harness Bootstrap Terminal"}),I.jsx("p",{className:"muted",children:h.command})]}),I.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[I.jsx(Tr,{status:h.status}),I.jsx("button",{type:"button",onClick:()=>u(!1),children:"Close"})]})]}),I.jsx("div",{className:"harness-bootstrap-terminal",children:I.jsx(H_,{sessionId:h.id,active:a})})]})}):null]}):null}function M0(n){return n.replaceAll("_"," ")}function dc(n){return{total:n.length,accepted:n.filter(s=>s.acceptedAt).length,delivered:n.filter(s=>s.deliveredAt).length}}function O0(n,s=6){const l=[...n].sort(H0).map((v,C)=>({message:v,sequence:C+1}));return[...s===null?l:l.slice(-s)].sort((v,C)=>C.sequence-v.sequence)}function B0({messages:n,orchestration:s,busy:l,maxMessages:o=6,showControls:v=!0,showHeader:C=!0,onModeChange:_,onMarkAllDone:a}){const[u,h]=me.useState(null),d=dc(n),c=(s==null?void 0:s.mode)??"manual",b=O0(n,o);async function w(k){await N0(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return I.jsxs("section",{className:"message-panel",children:[C?I.jsxs("div",{className:"message-panel-header",children:[I.jsxs("div",{children:[I.jsx("h2",{children:"Messages"}),I.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),v&&_?I.jsx("div",{className:"message-controls",children:I.jsxs("label",{className:"message-mode-toggle",children:[I.jsx("input",{type:"checkbox",checked:c==="auto",disabled:l,onChange:k=>_(k.target.checked?"auto":"manual")}),I.jsx("span",{children:"Auto orchestration"})]})}):null,v&&a?I.jsx("button",{type:"button",disabled:l,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?I.jsx("p",{className:"muted",children:"No role messages yet."}):I.jsx("ol",{className:"message-list",children:b.map(({message:k,sequence:x})=>I.jsxs("li",{className:"message-item",children:[I.jsxs("div",{className:"message-item-main",children:[I.jsxs("div",{className:"message-meta",children:[I.jsxs("span",{className:"message-sequence",children:["#",x]}),I.jsx("time",{dateTime:sa(k),children:z0(sa(k))}),I.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),I.jsx("span",{children:k.type})]}),I.jsx("p",{children:k.body}),k.failureReason?I.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?I.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),I.jsx("div",{className:"message-actions",children:I.jsx("button",{type:"button",disabled:l,onClick:()=>void w(k),children:u===k.id?"Copied":"Copy"})})]},k.id))})]})}function z0(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 sa(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function H0(n,s){const l=sa(n).localeCompare(sa(s));if(l!==0)return l;const o=n.createdAt.localeCompare(s.createdAt);return o!==0?o:n.id.localeCompare(s.id)}async function N0(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 j0({defaultPath:n="",recentPaths:s=[],busy:l=!1,onConnect:o}){const[v,C]=me.useState(n);me.useEffect(()=>{n&&C(n)},[n]);async function _(a){a.preventDefault(),await o(v)}return I.jsx("form",{className:"repo-connect",onSubmit:_,children:I.jsxs("div",{className:s.length>0?"inline-form has-recent-paths":"inline-form",children:[I.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:v,onChange:a=>C(a.target.value),placeholder:"/path/to/repo"}),s.length>0?I.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&C(a.target.value)},children:[I.jsx("option",{value:"",children:"Recent"}),s.map(a=>I.jsx("option",{value:a,children:a},a))]}):null,I.jsx("button",{type:"submit",disabled:l||!v.trim(),children:"Connect"})]})})}function U0({tasks:n,activeTaskSlug:s,onSelect:l}){return I.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>I.jsxs("button",{className:o.taskSlug===s?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>l(o.taskSlug),children:[I.jsx("span",{children:o.title||o.taskSlug}),I.jsx(Tr,{status:o.status==="created"?"unknown":"running"})]},o.taskSlug))})}function I0({project:n,recentRepositoryPaths:s,tasks:l,activeTaskSlug:o,messages:v,orchestration:C,events:_,harnessStatus:a,harnessBootstrapStatus:u,harnessApplyResult:h,busy:d,onConnect:c,onRefreshHarness:b,onApplyHarness:w,onStartHarnessBootstrap:k,onCreateTask:x,onSelectTask:S,themeMode:m,onThemeModeChange:p,roundCompletionAlerts:g,onRoundCompletionAlertsChange:E,onTryRoundAlert:R,onMarkAllMessagesDone:A,onDeleteMessageHistory:L}){const[T,z]=me.useState(""),[N,q]=me.useState(!0),[G,V]=me.useState(!1),[Q,Y]=me.useState(!1),F=dc(v),X=T.trim();async function ee(O){O.preventDefault(),await x({taskSlug:X,createWorktree:N}),z(""),q(!0)}return I.jsxs("div",{className:"project-dashboard",children:[I.jsx("header",{className:"brand-header",children:I.jsx("strong",{children:"VibeCodingMaster"})}),I.jsx(xr,{title:"Repository Path",defaultOpen:!o,children:I.jsx(j0,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:s,busy:d,onConnect:c})}),n?I.jsx(xr,{title:"Repository",children:I.jsxs("div",{className:"project-summary",children:[I.jsxs("dl",{children:[I.jsxs("div",{children:[I.jsx("dt",{children:"Path"}),I.jsx("dd",{children:n.repoRoot})]}),I.jsxs("div",{children:[I.jsx("dt",{children:"Branch"}),I.jsx("dd",{children:n.branch})]}),I.jsxs("div",{children:[I.jsx("dt",{children:"Working tree"}),I.jsx("dd",{children:n.isDirty?"uncommitted changes":"clean"})]})]}),n.warnings.length>0?I.jsx("ul",{className:"warnings",children:n.warnings.map(O=>I.jsx("li",{children:O},O))}):null]})}):null,I.jsx(xr,{title:"Settings",children:I.jsxs("div",{className:"sidebar-settings",children:[I.jsxs("button",{"aria-label":`Theme mode: ${qp(m)}`,className:"settings-toggle theme-mode-toggle",disabled:d,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>p(P0(m)),children:[I.jsx("span",{children:"Theme"}),I.jsx("span",{children:qp(m)})]}),I.jsxs("button",{"aria-pressed":g,className:g?"settings-toggle is-active":"settings-toggle",disabled:d,type:"button",onClick:()=>E(!g),children:[I.jsx("span",{children:"Round alert"}),I.jsx("span",{children:g?"on":"off"})]}),I.jsxs("button",{className:"settings-toggle",type:"button",onClick:R,children:[I.jsx("span",{children:"Try alert"}),I.jsx("span",{children:"test"})]}),o?I.jsxs(I.Fragment,{children:[I.jsxs("button",{type:"button",onClick:()=>V(!0),children:[I.jsx("span",{children:"Messages"}),I.jsxs("span",{className:"muted",children:[F.total," total"]})]}),I.jsxs("button",{type:"button",onClick:()=>Y(!0),children:[I.jsx("span",{children:"Events"}),I.jsxs("span",{className:"muted",children:[_.length," total"]})]})]}):null]})}),n?I.jsx(xr,{title:"VCM Harness",children:I.jsx(L0,{status:a,bootstrapStatus:u,applyResult:h,busy:d,onRefresh:b,onApply:w,onStartBootstrap:k})}):null,n?I.jsx(xr,{title:"New Task",children:I.jsx("div",{className:"task-create",children:I.jsxs("form",{onSubmit:ee,children:[I.jsx("input",{value:T,onChange:O=>z(O.target.value),placeholder:"task name"}),I.jsxs("label",{className:"task-create-option",children:[I.jsx("input",{type:"checkbox",checked:N,onChange:O=>q(O.target.checked)}),I.jsx("span",{children:"Create worktree and branch"})]}),N?I.jsxs("div",{className:"task-create-preview",children:[I.jsxs("small",{children:["branch: ",X?`feature/${X}`:"feature/<task>"]}),I.jsxs("small",{children:["worktree: ",X?`.claude/worktrees/${X}`:".claude/worktrees/<task>"]})]}):I.jsx("div",{className:"task-create-preview",children:I.jsx("small",{children:"uses current repository path and current branch"})}),I.jsx("button",{type:"submit",disabled:d||!X,children:"Create"})]})})}):null,l.length>0?I.jsx(xr,{title:"Tasks",children:I.jsx(U0,{tasks:l,activeTaskSlug:o,onSelect:S})}):null,G?I.jsx(q0,{busy:d,messages:v,orchestration:C,onClose:()=>V(!1),onMarkAllDone:()=>{o&&A(o)},onDeleteMessageHistory:()=>{o&&L(o)}}):null,Q?I.jsx(F0,{events:_,onClose:()=>Y(!1)}):null]})}function P0(n){return n==="system"?"light":n==="light"?"dark":"system"}function qp(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function F0({events:n,onClose:s}){return I.jsx("div",{className:"modal-backdrop",children:I.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[I.jsxs("header",{children:[I.jsxs("div",{children:[I.jsx("h2",{children:"Events"}),I.jsxs("p",{className:"muted",children:[n.length," total"]})]}),I.jsx("button",{type:"button",onClick:s,children:"Close"})]}),I.jsx(v0,{events:n,maxEvents:null,showHeader:!1})]})})}function q0({busy:n,messages:s,orchestration:l,onClose:o,onMarkAllDone:v,onDeleteMessageHistory:C}){const _=dc(s);function a(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
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
|
-
`))&&C()}return I.jsx("div",{className:"modal-backdrop",children:I.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[I.jsxs("header",{children:[I.jsxs("div",{children:[I.jsx("h2",{children:"Messages"}),I.jsxs("p",{className:"muted",children:[_.total," total / ",_.accepted," accepted",l?` · ${l.mode}`:""]})]}),I.jsxs("div",{className:"modal-actions",children:[I.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),I.jsx("button",{type:"button",disabled:n||_.total===0,onClick:u,children:"Delete All"}),I.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),I.jsx(B0,{busy:n,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1})]})})}function xr({children:n,defaultOpen:s=!1,title:l}){const[o,v]=me.useState(s);return me.useEffect(()=>{v(s)},[s]),I.jsxs("section",{className:"sidebar-section",children:[I.jsxs("button",{"aria-expanded":o,className:"sidebar-section-toggle",type:"button",onClick:()=>v(C=>!C),children:[I.jsx("span",{children:l}),I.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),o?I.jsx("div",{className:"sidebar-section-content",children:n}):null]})}const ca=[{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}];ca.map(n=>n.name);ca.filter(n=>n.dispatchable).map(n=>n.name);function N_(n,s){return n.find(l=>l.role===s)}function V0({activeRole:n,sessions:s,onSelect:l}){return I.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:ca.map(o=>{const v=N_(s,o.name),C=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return I.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:[I.jsx("span",{children:o.label}),I.jsx(Tr,{status:C})]},o.name)})})}function G0({role:n,session:s,permissionMode:l,busy:o=!1,onPermissionModeChange:v,onStart:C,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),b=!!(s&&s.permissionMode!==l);return I.jsxs("div",{className:"session-controls",children:[I.jsxs("label",{className:"permission-mode-field",children:[I.jsxs("span",{children:["Permission",I.jsx("small",{children:s?`current: ${Y0(s.permissionMode)}${b?" / next launch":""}`:"applies on start"})]}),I.jsxs("select",{value:l,onChange:w=>v(w.target.value),children:[I.jsx("option",{value:"default",children:"默认"}),I.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"}),I.jsx("option",{value:"dangerously-skip-permissions",children:"--dangerously-skip-permissions"})]})]}),I.jsxs("div",{className:"session-toolbar",children:[I.jsx("button",{type:"button",disabled:o||!c,onClick:C,children:"Start"}),I.jsx("button",{type:"button",disabled:o||!d,onClick:_,children:"Resume"}),I.jsx("button",{type:"button",disabled:o||!s,onClick:u,children:"Restart"}),I.jsx("button",{type:"button",disabled:o||!s,onClick:a,children:"Stop"})]})]})}function Y0(n){return n==="dangerously-skip-permissions"?"--dangerously-skip-permissions":n}function W0(n,s){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const K0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,X0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$0={};function Vp(n,s){return($0.jsx?X0:K0).test(n)}const Q0=/[ \t\n\f\r]/g;function Z0(n){return typeof n=="object"?n.type==="text"?Gp(n.value):!1:Gp(n)}function Gp(n){return n.replace(Q0,"")===""}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 j_(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 tc(n){return n.toLowerCase()}class qt{constructor(s,l){this.attribute=l,this.property=s}}qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0;let J0=0;const Oe=Ui(),_t=Ui(),nc=Ui(),ge=Ui(),nt=Ui(),Dr=Ui(),Qt=Ui();function Ui(){return 2**++J0}const ic=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:_t,commaOrSpaceSeparated:Qt,commaSeparated:Dr,number:ge,overloadedBoolean:nc,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),ju=Object.keys(ic);class pc extends qt{constructor(s,l,o,v){let C=-1;if(super(s,l),Yp(this,"space",v),typeof o=="number")for(;++C<ju.length;){const _=ju[C];Yp(this,ju[C],(o&ic[_])===ic[_])}}}pc.prototype.defined=!0;function Yp(n,s,l){l&&(n[s]=l)}function Lr(n){const s={},l={};for(const[o,v]of Object.entries(n.properties)){const C=new pc(o,n.transform(n.attributes||{},o),v,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(C.mustUseProperty=!0),s[o]=C,l[tc(o)]=o,l[tc(C.attribute)]=o}return new zs(s,l,n.space)}const U_=Lr({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:nt,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:ge,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:nt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:_t,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(n,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function I_(n,s){return s in n?n[s]:s}function P_(n,s){return I_(n,s.toLowerCase())}const eS=Lr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dr,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Oe,allowPaymentRequest:Oe,allowUserMedia:Oe,alt:null,as:null,async:Oe,autoCapitalize:null,autoComplete:nt,autoFocus:Oe,autoPlay:Oe,blocking:nt,capture:null,charSet:null,checked:Oe,cite:null,className:nt,cols:ge,colSpan:null,content:null,contentEditable:_t,controls:Oe,controlsList:nt,coords:ge|Dr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Oe,defer:Oe,dir:null,dirName:null,disabled:Oe,download:nc,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Oe,formTarget:null,headers:nt,height:ge,hidden:nc,high:ge,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Oe,inputMode:null,integrity:null,is:null,isMap:Oe,itemId:null,itemProp:nt,itemRef:nt,itemScope:Oe,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Oe,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Oe,muted:Oe,name:null,nonce:null,noModule:Oe,noValidate:Oe,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:Oe,optimum:ge,pattern:null,ping:nt,placeholder:null,playsInline:Oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Oe,referrerPolicy:null,rel:nt,required:Oe,reversed:Oe,rows:ge,rowSpan:ge,sandbox:nt,scope:null,scoped:Oe,seamless:Oe,selected:Oe,shadowRootClonable:Oe,shadowRootDelegatesFocus:Oe,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Oe,useMap:null,value:_t,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Oe,declare:Oe,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Oe,noHref:Oe,noShade:Oe,noWrap:Oe,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Oe,disableRemotePlayback:Oe,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:P_}),tS=Lr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Qt,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:nt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:I_}),F_=Lr({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_=Lr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:P_}),V_=Lr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,s){return"xml:"+s.slice(3).toLowerCase()}}),nS={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"},iS=/[A-Z]/g,Wp=/-[a-z]/g,rS=/^data[-\w.:]+$/i;function sS(n,s){const l=tc(s);let o=s,v=qt;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&rS.test(s)){if(s.charAt(4)==="-"){const C=s.slice(5).replace(Wp,aS);o="data"+C.charAt(0).toUpperCase()+C.slice(1)}else{const C=s.slice(4);if(!Wp.test(C)){let _=C.replace(iS,lS);_.charAt(0)!=="-"&&(_="-"+_),s="data"+_}}v=pc}return new v(o,s)}function lS(n){return"-"+n.toLowerCase()}function aS(n){return n.charAt(1).toUpperCase()}const oS=j_([U_,eS,F_,q_,V_],"html"),_c=j_([U_,tS,F_,q_,V_],"svg");function uS(n){return n.join(" ").trim()}var Er={},Uu,Kp;function cS(){if(Kp)return Uu;Kp=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,v=/^:\s*/,C=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
|
|
61
|
-
`,h="/",d="*",c="",b="comment",w="declaration";function k(S,m){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];m=m||{};var p=1,g=1;function E(Q){var Y=Q.match(s);Y&&(p+=Y.length);var F=Q.lastIndexOf(u);g=~F?Q.length-F:g+Q.length}function R(){var Q={line:p,column:g};return function(Y){return Y.position=new A(Q),z(),Y}}function A(Q){this.start=Q,this.end={line:p,column:g},this.source=m.source}A.prototype.content=S;function L(Q){var Y=new Error(m.source+":"+p+":"+g+": "+Q);if(Y.reason=Q,Y.filename=m.source,Y.line=p,Y.column=g,Y.source=S,!m.silent)throw Y}function T(Q){var Y=Q.exec(S);if(Y){var F=Y[0];return E(F),S=S.slice(F.length),Y}}function z(){T(l)}function N(Q){var Y;for(Q=Q||[];Y=q();)Y!==!1&&Q.push(Y);return Q}function q(){var Q=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 F=S.slice(2,Y-2);return g+=2,E(F),S=S.slice(Y),g+=2,Q({type:b,comment:F})}}function G(){var Q=R(),Y=T(o);if(Y){if(q(),!T(v))return L("property missing ':'");var F=T(C),X=Q({type:w,property:x(Y[0].replace(n,c)),value:F?x(F[0].replace(n,c)):c});return T(_),X}}function V(){var Q=[];N(Q);for(var Y;Y=G();)Y!==!1&&(Q.push(Y),N(Q));return Q}return z(),V()}function x(S){return S?S.replace(a,c):c}return Uu=k,Uu}var Xp;function hS(){if(Xp)return Er;Xp=1;var n=Er&&Er.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=l;const s=n(cS());function l(o,v){let C=null;if(!o||typeof o!="string")return C;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&&(C=C||{},C[h]=d)}),C}return Er}var ks={},$p;function fS(){if($p)return ks;$p=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)-/,C=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={}),C(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,Qp;function dS(){if(Qp)return As;Qp=1;var n=As&&As.__importDefault||function(v){return v&&v.__esModule?v:{default:v}},s=n(hS()),l=fS();function o(v,C){var _={};return!v||typeof v!="string"||(0,s.default)(v,function(a,u){a&&u&&(_[(0,l.camelCase)(a,C)]=u)}),_}return o.default=o,As=o,As}var pS=dS();const _S=B_(pS),G_=Y_("end"),mc=Y_("start");function Y_(n){return s;function s(l){const o=l&&l.position&&l.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function mS(n){const s=mc(n),l=G_(n);if(s&&l)return{start:s,end:l}}function Rs(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Zp(n.position):"start"in n||"end"in n?Zp(n):"line"in n||"column"in n?rc(n):""}function rc(n){return Jp(n&&n.line)+":"+Jp(n&&n.column)}function Zp(n){return rc(n&&n.start)+"-"+rc(n&&n.end)}function Jp(n){return n&&typeof n=="number"?n:1}class Rt extends Error{constructor(s,l,o){super(),typeof l=="string"&&(o=l,l=void 0);let v="",C={},_=!1;if(l&&("line"in l&&"column"in l?C={place:l}:"start"in l&&"end"in l?C={place:l}:"type"in l?C={ancestors:[l],place:l.position}:C={...l}),typeof s=="string"?v=s:!C.cause&&s&&(_=!0,v=s.message,C.cause=s),!C.ruleId&&!C.source&&typeof o=="string"){const u=o.indexOf(":");u===-1?C.ruleId=o:(C.source=o.slice(0,u),C.ruleId=o.slice(u+1))}if(!C.place&&C.ancestors&&C.ancestors){const u=C.ancestors[C.ancestors.length-1];u&&(C.place=u.position)}const a=C.place&&"start"in C.place?C.place.start:C.place;this.ancestors=C.ancestors||void 0,this.cause=C.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(C.place)||"1:1",this.place=C.place||void 0,this.reason=this.message,this.ruleId=C.ruleId||void 0,this.source=C.source||void 0,this.stack=_&&C.cause&&typeof C.cause.stack=="string"?C.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const gc={}.hasOwnProperty,gS=new Map,vS=/[A-Z]/g,SS=new Set(["table","tbody","thead","tfoot","tr"]),yS=new Set(["td","th"]),W_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bS(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=DS(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=TS(l,s.jsx,s.jsxs)}const v={Fragment:s.Fragment,ancestors:[],components:s.components||{},create:o,elementAttributeNameCase:s.elementAttributeNameCase||"react",evaluater:s.createEvaluater?s.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:s.ignoreInvalidStyle||!1,passKeys:s.passKeys!==!1,passNode:s.passNode||!1,schema:s.space==="svg"?_c:oS,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},C=K_(v,n,void 0);return C&&typeof C!="string"?C:v.create(n,v.Fragment,{children:C||void 0},void 0)}function K_(n,s,l){if(s.type==="element")return CS(n,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return wS(n,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return ES(n,s,l);if(s.type==="mdxjsEsm")return xS(n,s);if(s.type==="root")return kS(n,s,l);if(s.type==="text")return AS(n,s)}function CS(n,s,l){const o=n.schema;let v=o;s.tagName.toLowerCase()==="svg"&&o.space==="html"&&(v=_c,n.schema=v),n.ancestors.push(s);const C=$_(n,s.tagName,!1),_=RS(n,s);let a=Sc(n,s);return SS.has(s.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Z0(u):!0})),X_(n,_,C,s),vc(_,a),n.ancestors.pop(),n.schema=o,n.create(s,C,_,l)}function wS(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 xS(n,s){if(s.data&&s.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(s.data.estree);Os(n,s.position)}function ES(n,s,l){const o=n.schema;let v=o;s.name==="svg"&&o.space==="html"&&(v=_c,n.schema=v),n.ancestors.push(s);const C=s.name===null?n.Fragment:$_(n,s.name,!0),_=LS(n,s),a=Sc(n,s);return X_(n,_,C,s),vc(_,a),n.ancestors.pop(),n.schema=o,n.create(s,C,_,l)}function kS(n,s,l){const o={};return vc(o,Sc(n,s)),n.create(s,n.Fragment,o,l)}function AS(n,s){return s.value}function X_(n,s,l,o){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(s.node=o)}function vc(n,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(n.children=l)}}function TS(n,s,l){return o;function o(v,C,_,a){const h=Array.isArray(_.children)?l:s;return a?h(C,_,a):h(C,_)}}function DS(n,s){return l;function l(o,v,C,_){const a=Array.isArray(C.children),u=mc(o);return s(v,C,_,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function RS(n,s){const l={};let o,v;for(v in s.properties)if(v!=="children"&&gc.call(s.properties,v)){const C=MS(n,v,s.properties[v]);if(C){const[_,a]=C;n.tableCellAlignToStyle&&_==="align"&&typeof a=="string"&&yS.has(s.tagName)?o=a:l[_]=a}}if(o){const C=l.style||(l.style={});C[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return l}function LS(n,s){const l={};for(const o of s.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const C=o.data.estree.body[0];C.type;const _=C.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 C;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,C=n.evaluater.evaluateExpression(a.expression)}else Os(n,s.position);else C=o.value===null?!0:o.value;l[v]=C}return l}function Sc(n,s){const l=[];let o=-1;const v=n.passKeys?new Map:gS;for(;++o<s.children.length;){const C=s.children[o];let _;if(n.passKeys){const u=C.type==="element"?C.tagName:C.type==="mdxJsxFlowElement"||C.type==="mdxJsxTextElement"?C.name:void 0;if(u){const h=v.get(u)||0;_=u+"-"+h,v.set(u,h+1)}}const a=K_(n,C,_);a!==void 0&&l.push(a)}return l}function MS(n,s,l){const o=sS(n.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=o.commaSeparated?W0(l):uS(l)),o.property==="style"){let v=typeof l=="object"?l:OS(n,String(l));return n.stylePropertyNameCase==="css"&&(v=BS(v)),["style",v]}return[n.elementAttributeNameCase==="react"&&o.space?nS[o.property]||o.property:o.attribute,l]}}function OS(n,s){try{return _S(s,{reactCompat:!0})}catch(l){if(n.ignoreInvalidStyle)return{};const o=l,v=new Rt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw v.file=n.filePath||void 0,v.url=W_+"#cannot-parse-style-attribute",v}}function $_(n,s,l){let o;if(!l)o={type:"Literal",value:s};else if(s.includes(".")){const v=s.split(".");let C=-1,_;for(;++C<v.length;){const a=Vp(v[C])?{type:"Identifier",name:v[C]}:{type:"Literal",value:v[C]};_=_?{type:"MemberExpression",object:_,property:a,computed:!!(C&&a.type==="Literal"),optional:!1}:a}o=_}else o=Vp(s)&&!/^[a-z]/.test(s)?{type:"Identifier",name:s}:{type:"Literal",value:s};if(o.type==="Literal"){const v=o.value;return gc.call(n.components,v)?n.components[v]:v}if(n.evaluater)return n.evaluater.evaluateExpression(o);Os(n)}function Os(n,s){const l=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:s,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=n.filePath||void 0,l.url=W_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function BS(n){const s={};let l;for(l in n)gc.call(n,l)&&(s[zS(l)]=n[l]);return s}function zS(n){let s=n.replace(vS,HS);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function HS(n){return"-"+n.toLowerCase()}const Iu={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"]},NS={};function yc(n,s){const l=NS,o=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,v=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return Q_(n,o,v)}function Q_(n,s,l){if(jS(n)){if("value"in n)return n.type==="html"&&!l?"":n.value;if(s&&"alt"in n&&n.alt)return n.alt;if("children"in n)return e_(n.children,s,l)}return Array.isArray(n)?e_(n,s,l):""}function e_(n,s,l){const o=[];let v=-1;for(;++v<n.length;)o[v]=Q_(n[v],s,l);return o.join("")}function jS(n){return!!(n&&typeof n=="object")}const t_=document.createElement("i");function bc(n){const s="&"+n+";";t_.innerHTML=s;const l=t_.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===s?!1:l}function Zt(n,s,l,o){const v=n.length;let C=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);C<o.length;)_=o.slice(C,C+1e4),_.unshift(s,0),n.splice(..._),C+=1e4,s+=1e4}function cn(n,s){return n.length>0?(Zt(n,n.length,0,s),n):s}const n_={}.hasOwnProperty;function Z_(n){const s={};let l=-1;for(;++l<n.length;)US(s,n[l]);return s}function US(n,s){let l;for(l in s){const v=(n_.call(n,l)?n[l]:void 0)||(n[l]={}),C=s[l];let _;if(C)for(_ in C){n_.call(v,_)||(v[_]=[]);const a=C[_];IS(v[_],Array.isArray(a)?a:a?[a]:[])}}}function IS(n,s){let l=-1;const o=[];for(;++l<s.length;)(s[l].add==="after"?n:o).push(s[l]);Zt(n,0,0,o)}function J_(n,s){const l=Number.parseInt(n,s);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function _n(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=vi(/[A-Za-z]/),Dt=vi(/[\dA-Za-z]/),PS=vi(/[#-'*+\--9=?A-Z^-~]/);function la(n){return n!==null&&(n<32||n===127)}const sc=vi(/\d/),FS=vi(/[\dA-Fa-f]/),qS=vi(/[!-/:-@[-`{-~]/);function xe(n){return n!==null&&n<-2}function tt(n){return n!==null&&(n<0||n===32)}function Ne(n){return n===-2||n===-1||n===32}const ha=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 Mr(n){const s=[];let l=-1,o=0,v=0;for(;++l<n.length;){const C=n.charCodeAt(l);let _="";if(C===37&&Dt(n.charCodeAt(l+1))&&Dt(n.charCodeAt(l+2)))v=2;else if(C<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(C))||(_=String.fromCharCode(C));else if(C>55295&&C<57344){const a=n.charCodeAt(l+1);C<56320&&a>56319&&a<57344?(_=String.fromCharCode(C,a),v=1):_="�"}else _=String.fromCharCode(C);_&&(s.push(n.slice(o,l),encodeURIComponent(_)),o=l+v+1,_=""),v&&(l+=v,v=0)}return s.join("")+n.slice(o)}function qe(n,s,l,o){const v=o?o-1:Number.POSITIVE_INFINITY;let C=0;return _;function _(u){return Ne(u)?(n.enter(l),a(u)):s(u)}function a(u){return Ne(u)&&C++<v?(n.consume(u),a):(n.exit(l),s(u))}}const VS={tokenize:GS};function GS(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"),qe(n,s,"linePrefix")}function v(a){return n.enter("paragraph"),C(a)}function C(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 xe(a)?(n.consume(a),n.exit("chunkText"),C):(n.consume(a),_)}}const YS={tokenize:WS},i_={tokenize:KS};function WS(n){const s=this,l=[];let o=0,v,C,_;return a;function a(g){if(o<l.length){const E=l[o];return s.containerState=E[1],n.attempt(E[0].continuation,u,h)(g)}return h(g)}function u(g){if(o++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,v&&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}m(o);let L=E;for(;L<s.events.length;)s.events[L][1].end={...A},L++;return Zt(s.events,R+1,0,s.events.slice(E)),s.events.length=L,h(g)}return a(g)}function h(g){if(o===l.length){if(!v)return b(g);if(v.currentConstruct&&v.currentConstruct.concrete)return k(g);s.interrupt=!!(v.currentConstruct&&!v._gfmTableDynamicInterruptHack)}return s.containerState={},n.check(i_,d,c)(g)}function d(g){return v&&p(),m(o),b(g)}function c(g){return s.parser.lazy[s.now().line]=o!==l.length,_=s.now().offset,k(g)}function b(g){return s.containerState={},n.attempt(i_,w,k)(g)}function w(g){return o++,l.push([s.currentConstruct,s.containerState]),b(g)}function k(g){if(g===null){v&&p(),m(0),n.consume(g);return}return v=v||s.parser.flow(s.now()),n.enter("chunkFlow",{_tokenizer:v,contentType:"flow",previous:C}),x(g)}function x(g){if(g===null){S(n.exit("chunkFlow"),!0),m(0),n.consume(g);return}return xe(g)?(n.consume(g),S(n.exit("chunkFlow")),o=0,s.interrupt=void 0,a):(n.consume(g),x)}function S(g,E){const R=s.sliceStream(g);if(E&&R.push(null),g.previous=C,C&&(C.next=g),C=g,v.defineSkip(g.start),v.write(R),s.parser.lazy[g.start.line]){let A=v.events.length;for(;A--;)if(v.events[A][1].start.offset<_&&(!v.events[A][1].end||v.events[A][1].end.offset>_))return;const L=s.events.length;let T=L,z,N;for(;T--;)if(s.events[T][0]==="exit"&&s.events[T][1].type==="chunkFlow"){if(z){N=s.events[T][1].end;break}z=!0}for(m(o),A=L;A<s.events.length;)s.events[A][1].end={...N},A++;Zt(s.events,T+1,0,s.events.slice(L)),s.events.length=A}}function m(g){let E=l.length;for(;E-- >g;){const R=l[E];s.containerState=R[1],R[0].exit.call(s,n)}l.length=g}function p(){v.write([null]),C=void 0,v=void 0,s.containerState._closeFlow=void 0}}function KS(n,s,l){return qe(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||tt(n)||ji(n))return 1;if(ha(n))return 2}function fa(n,s,l){const o=[];let v=-1;for(;++v<n.length;){const C=n[v].resolveAll;C&&!o.includes(C)&&(s=C(s,l),o.push(C))}return s}const lc={name:"attention",resolveAll:XS,tokenize:$S};function XS(n,s){let l=-1,o,v,C,_,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},b={...n[l][1].start};r_(c,-u),r_(b,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:b},C={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=cn(h,[["enter",n[o][1],s],["exit",n[o][1],s]])),h=cn(h,[["enter",v,s],["enter",_,s],["exit",_,s],["enter",C,s]]),h=cn(h,fa(s.parser.constructs.insideSpan.null,n.slice(o+1,l),s)),h=cn(h,[["exit",C,s],["enter",a,s],["exit",a,s],["exit",v,s]]),n[l][1].end.offset-n[l][1].start.offset?(d=2,h=cn(h,[["enter",n[l][1],s],["exit",n[l][1],s]])):d=0,Zt(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 $S(n,s){const l=this.parser.constructs.attentionMarkers.null,o=this.previous,v=Rr(o);let C;return _;function _(u){return C=u,n.enter("attentionSequence"),a(u)}function a(u){if(u===C)return n.consume(u),a;const h=n.exit("attentionSequence"),d=Rr(u),c=!d||d===2&&v||l.includes(u),b=!v||v===2&&d||l.includes(o);return h._open=!!(C===42?c:c&&(v||!b)),h._close=!!(C===42?b:b&&(d||!c)),s(u)}}function r_(n,s){n.column+=s,n.offset+=s,n._bufferIndex+=s}const QS={name:"autolink",tokenize:ZS};function ZS(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"),C}function C(w){return Mt(w)?(n.consume(w),_):w===64?l(w):h(w)}function _(w){return w===43||w===45||w===46||Dt(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,u):(w===43||w===45||w===46||Dt(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function u(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):w===null||w===32||w===60||la(w)?l(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),d):PS(w)?(n.consume(w),h):l(w)}function d(w){return Dt(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):b(w)}function b(w){if((w===45||Dt(w))&&o++<63){const k=w===45?b:c;return n.consume(w),k}return l(w)}}const Hs={partial:!0,tokenize:JS};function JS(n,s,l){return o;function o(C){return Ne(C)?qe(n,v,"linePrefix")(C):v(C)}function v(C){return C===null||xe(C)?s(C):l(C)}}const em={continuation:{tokenize:ty},exit:ny,name:"blockQuote",tokenize:ey};function ey(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"),C}return l(_)}function C(_){return Ne(_)?(n.enter("blockQuotePrefixWhitespace"),n.consume(_),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),s):(n.exit("blockQuotePrefix"),s(_))}}function ty(n,s,l){const o=this;return v;function v(_){return Ne(_)?qe(n,C,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):C(_)}function C(_){return n.attempt(em,s,l)(_)}}function ny(n){n.exit("blockQuote")}const tm={name:"characterEscape",tokenize:iy};function iy(n,s,l){return o;function o(C){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(C),n.exit("escapeMarker"),v}function v(C){return qS(C)?(n.enter("characterEscapeValue"),n.consume(C),n.exit("characterEscapeValue"),n.exit("characterEscape"),s):l(C)}}const nm={name:"characterReference",tokenize:ry};function ry(n,s,l){const o=this;let v=0,C,_;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"),C=31,_=Dt,d(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),C=6,_=FS,d):(n.enter("characterReferenceValue"),C=7,_=sc,d(c))}function d(c){if(c===59&&v){const b=n.exit("characterReferenceValue");return _===Dt&&!bc(o.sliceSerialize(b))?l(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),s)}return _(c)&&v++<C?(n.consume(c),d):l(c)}}const s_={partial:!0,tokenize:ly},l_={concrete:!0,name:"codeFenced",tokenize:sy};function sy(n,s,l){const o=this,v={partial:!0,tokenize:R};let C=0,_=0,a;return u;function u(A){return h(A)}function h(A){const L=o.events[o.events.length-1];return C=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"),Ne(A)?qe(n,c,"whitespace")(A):c(A))}function c(A){return A===null||xe(A)?(n.exit("codeFencedFence"),o.interrupt?s(A):n.check(s_,x,E)(A)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||xe(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(A)):Ne(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),qe(n,w,"whitespace")(A)):A===96&&A===a?l(A):(n.consume(A),b)}function w(A){return A===null||xe(A)?c(A):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||xe(A)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),c(A)):A===96&&A===a?l(A):(n.consume(A),k)}function x(A){return n.attempt(v,E,S)(A)}function S(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),m}function m(A){return C>0&&Ne(A)?qe(n,p,"linePrefix",C+1)(A):p(A)}function p(A){return A===null||xe(A)?n.check(s_,x,E)(A):(n.enter("codeFlowValue"),g(A))}function g(A){return A===null||xe(A)?(n.exit("codeFlowValue"),p(A)):(n.consume(A),g)}function E(A){return n.exit("codeFenced"),s(A)}function R(A,L,T){let z=0;return N;function N(Y){return A.enter("lineEnding"),A.consume(Y),A.exit("lineEnding"),q}function q(Y){return A.enter("codeFencedFence"),Ne(Y)?qe(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?(z++,A.consume(Y),V):z>=_?(A.exit("codeFencedFenceSequence"),Ne(Y)?qe(A,Q,"whitespace")(Y):Q(Y)):T(Y)}function Q(Y){return Y===null||xe(Y)?(A.exit("codeFencedFence"),L(Y)):T(Y)}}}function ly(n,s,l){const o=this;return v;function v(_){return _===null?l(_):(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),C)}function C(_){return o.parser.lazy[o.now().line]?l(_):s(_)}}const Pu={name:"codeIndented",tokenize:oy},ay={partial:!0,tokenize:uy};function oy(n,s,l){const o=this;return v;function v(h){return n.enter("codeIndented"),qe(n,C,"linePrefix",5)(h)}function C(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):xe(h)?n.attempt(ay,_,u)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||xe(h)?(n.exit("codeFlowValue"),_(h)):(n.consume(h),a)}function u(h){return n.exit("codeIndented"),s(h)}}function uy(n,s,l){const o=this;return v;function v(_){return o.parser.lazy[o.now().line]?l(_):xe(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),v):qe(n,C,"linePrefix",5)(_)}function C(_){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?s(_):xe(_)?v(_):l(_)}}const cy={name:"codeText",previous:fy,resolve:hy,tokenize:dy};function hy(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 fy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function dy(n,s,l){let o=0,v,C;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?(C=n.enter("codeTextSequence"),v=0,d(c)):xe(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||xe(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)):(C.type="codeTextData",h(c))}}class py{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 C=this.right.splice(this.right.length-v,Number.POSITIVE_INFINITY);return o&&Ts(this.left,o),C.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 im(n){const s={};let l=-1,o,v,C,_,a,u,h;const d=new py(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,C=0,C<u.length&&u[C][1].type==="lineEndingBlank"&&(C+=2),C<u.length&&u[C][1].type==="content"))for(;++C<u.length&&u[C][1].type!=="content";)u[C][1].type==="chunkText"&&(u[C][1]._isInFirstContentOfListItem=!0,C++);if(o[0]==="enter")o[1].contentType&&(Object.assign(s,_y(d,l)),l=s[l],h=!0);else if(o[1]._container){for(C=l,v=void 0;C--;)if(_=d.get(C),_[1].type==="lineEnding"||_[1].type==="lineEndingBlank")_[0]==="enter"&&(v&&(d.get(v)[1].type="lineEndingBlank"),_[1].type="lineEnding",v=C);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 Zt(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function _y(n,s){const l=n.get(s)[1],o=n.get(s)[2];let v=s-1;const C=[];let _=l._tokenizer;_||(_=o.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(_._contentTypeTextTrailing=!0));const a=_.events,u=[],h={};let d,c,b=-1,w=l,k=0,x=0;const S=[x];for(;w;){for(;n.get(++v)[1]!==w;);C.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;++b<a.length;)a[b][0]==="exit"&&a[b-1][0]==="enter"&&a[b][1].type===a[b-1][1].type&&a[b][1].start.line!==a[b][1].end.line&&(x=b+1,S.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(_.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),b=S.length;b--;){const m=a.slice(S[b],S[b+1]),p=C.pop();u.push([p,p+m.length-1]),n.splice(p,2,m)}for(u.reverse(),b=-1;++b<u.length;)h[k+u[b][0]]=k+u[b][1],k+=u[b][1]-u[b][0]-1;return h}const my={resolve:vy,tokenize:Sy},gy={partial:!0,tokenize:yy};function vy(n){return im(n),n}function Sy(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?C(a):xe(a)?n.check(gy,_,C)(a):(n.consume(a),v)}function C(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 yy(n,s,l){const o=this;return v;function v(_){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),qe(n,C,"linePrefix")}function C(_){if(_===null||xe(_))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 rm(n,s,l,o,v,C,_,a,u){const h=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(m){return m===60?(n.enter(o),n.enter(v),n.enter(C),n.consume(m),n.exit(C),b):m===null||m===32||m===41||la(m)?l(m):(n.enter(o),n.enter(_),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(m))}function b(m){return m===62?(n.enter(C),n.consume(m),n.exit(C),n.exit(v),n.exit(o),s):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(m))}function w(m){return m===62?(n.exit("chunkString"),n.exit(a),b(m)):m===null||m===60||xe(m)?l(m):(n.consume(m),m===92?k:w)}function k(m){return m===60||m===62||m===92?(n.consume(m),w):w(m)}function x(m){return!d&&(m===null||m===41||tt(m))?(n.exit("chunkString"),n.exit(a),n.exit(_),n.exit(o),s(m)):d<h&&m===40?(n.consume(m),d++,x):m===41?(n.consume(m),d--,x):m===null||m===32||m===40||la(m)?l(m):(n.consume(m),m===92?S:x)}function S(m){return m===40||m===41||m===92?(n.consume(m),x):x(m)}}function sm(n,s,l,o,v,C){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(C),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(C),n.enter(v),n.consume(w),n.exit(v),n.exit(o),s):xe(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||xe(w)||a++>999?(n.exit("chunkString"),d(w)):(n.consume(w),u||(u=!Ne(w)),w===92?b:c)}function b(w){return w===91||w===92||w===93?(n.consume(w),a++,c):c(w)}}function lm(n,s,l,o,v,C){let _;return a;function a(b){return b===34||b===39||b===40?(n.enter(o),n.enter(v),n.consume(b),n.exit(v),_=b===40?41:b,u):l(b)}function u(b){return b===_?(n.enter(v),n.consume(b),n.exit(v),n.exit(o),s):(n.enter(C),h(b))}function h(b){return b===_?(n.exit(C),u(_)):b===null?l(b):xe(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),qe(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===_||b===null||xe(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?c:d)}function c(b){return b===_||b===92?(n.consume(b),d):d(b)}}function Ls(n,s){let l;return o;function o(v){return xe(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),l=!0,o):Ne(v)?qe(n,o,l?"linePrefix":"lineSuffix")(v):s(v)}}const by={name:"definition",tokenize:wy},Cy={partial:!0,tokenize:xy};function wy(n,s,l){const o=this;let v;return C;function C(w){return n.enter("definition"),_(w)}function _(w){return sm.call(o,n,a,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return v=_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),u):l(w)}function u(w){return tt(w)?Ls(n,h)(w):h(w)}function h(w){return rm(n,d,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(Cy,c,c)(w)}function c(w){return Ne(w)?qe(n,b,"whitespace")(w):b(w)}function b(w){return w===null||xe(w)?(n.exit("definition"),o.parser.defined.push(v),s(w)):l(w)}}function xy(n,s,l){return o;function o(a){return tt(a)?Ls(n,v)(a):l(a)}function v(a){return lm(n,C,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function C(a){return Ne(a)?qe(n,_,"whitespace")(a):_(a)}function _(a){return a===null||xe(a)?s(a):l(a)}}const Ey={name:"hardBreakEscape",tokenize:ky};function ky(n,s,l){return o;function o(C){return n.enter("hardBreakEscape"),n.consume(C),v}function v(C){return xe(C)?(n.exit("hardBreakEscape"),s(C)):l(C)}}const Ay={name:"headingAtx",resolve:Ty,tokenize:Dy};function Ty(n,s){let l=n.length-2,o=3,v,C;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},C={type:"chunkText",start:n[o][1].start,end:n[l][1].end,contentType:"text"},Zt(n,o,l-o+1,[["enter",v,s],["enter",C,s],["exit",C,s],["exit",v,s]])),n}function Dy(n,s,l){let o=0;return v;function v(d){return n.enter("atxHeading"),C(d)}function C(d){return n.enter("atxHeadingSequence"),_(d)}function _(d){return d===35&&o++<6?(n.consume(d),_):d===null||tt(d)?(n.exit("atxHeadingSequence"),a(d)):l(d)}function a(d){return d===35?(n.enter("atxHeadingSequence"),u(d)):d===null||xe(d)?(n.exit("atxHeading"),s(d)):Ne(d)?qe(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||tt(d)?(n.exit("atxHeadingText"),a(d)):(n.consume(d),h)}}const Ry=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],a_=["pre","script","style","textarea"],Ly={concrete:!0,name:"htmlFlow",resolveTo:By,tokenize:zy},My={partial:!0,tokenize:Ny},Oy={partial:!0,tokenize:Hy};function By(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 zy(n,s,l){const o=this;let v,C,_,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),b):H===47?(n.consume(H),C=!0,x):H===63?(n.consume(H),v=3,o.interrupt?s:M):Mt(H)?(n.consume(H),_=String.fromCharCode(H),S):l(H)}function b(H){return H===45?(n.consume(H),v=2,w):H===91?(n.consume(H),v=5,a=0,k):Mt(H)?(n.consume(H),v=4,o.interrupt?s:M):l(H)}function w(H){return H===45?(n.consume(H),o.interrupt?s:M):l(H)}function k(H){const ie="CDATA[";return H===ie.charCodeAt(a++)?(n.consume(H),a===ie.length?o.interrupt?s:G:k):l(H)}function x(H){return Mt(H)?(n.consume(H),_=String.fromCharCode(H),S):l(H)}function S(H){if(H===null||H===47||H===62||tt(H)){const ie=H===47,fe=_.toLowerCase();return!ie&&!C&&a_.includes(fe)?(v=1,o.interrupt?s(H):G(H)):Ry.includes(_.toLowerCase())?(v=6,ie?(n.consume(H),m):o.interrupt?s(H):G(H)):(v=7,o.interrupt&&!o.parser.lazy[o.now().line]?l(H):C?p(H):g(H))}return H===45||Dt(H)?(n.consume(H),_+=String.fromCharCode(H),S):l(H)}function m(H){return H===62?(n.consume(H),o.interrupt?s:G):l(H)}function p(H){return Ne(H)?(n.consume(H),p):N(H)}function g(H){return H===47?(n.consume(H),N):H===58||H===95||Mt(H)?(n.consume(H),E):Ne(H)?(n.consume(H),g):N(H)}function E(H){return H===45||H===46||H===58||H===95||Dt(H)?(n.consume(H),E):R(H)}function R(H){return H===61?(n.consume(H),A):Ne(H)?(n.consume(H),R):g(H)}function A(H){return H===null||H===60||H===61||H===62||H===96?l(H):H===34||H===39?(n.consume(H),u=H,L):Ne(H)?(n.consume(H),A):T(H)}function L(H){return H===u?(n.consume(H),u=null,z):H===null||xe(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||tt(H)?R(H):(n.consume(H),T)}function z(H){return H===47||H===62||Ne(H)?g(H):l(H)}function N(H){return H===62?(n.consume(H),q):l(H)}function q(H){return H===null||xe(H)?G(H):Ne(H)?(n.consume(H),q):l(H)}function G(H){return H===45&&v===2?(n.consume(H),F):H===60&&v===1?(n.consume(H),X):H===62&&v===4?(n.consume(H),B):H===63&&v===3?(n.consume(H),M):H===93&&v===5?(n.consume(H),O):xe(H)&&(v===6||v===7)?(n.exit("htmlFlowData"),n.check(My,P,V)(H)):H===null||xe(H)?(n.exit("htmlFlowData"),V(H)):(n.consume(H),G)}function V(H){return n.check(Oy,Q,P)(H)}function Q(H){return n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),Y}function Y(H){return H===null||xe(H)?V(H):(n.enter("htmlFlowData"),G(H))}function F(H){return H===45?(n.consume(H),M):G(H)}function X(H){return H===47?(n.consume(H),_="",ee):G(H)}function ee(H){if(H===62){const ie=_.toLowerCase();return a_.includes(ie)?(n.consume(H),B):G(H)}return Mt(H)&&_.length<8?(n.consume(H),_+=String.fromCharCode(H),ee):G(H)}function O(H){return H===93?(n.consume(H),M):G(H)}function M(H){return H===62?(n.consume(H),B):H===45&&v===2?(n.consume(H),M):G(H)}function B(H){return H===null||xe(H)?(n.exit("htmlFlowData"),P(H)):(n.consume(H),B)}function P(H){return n.exit("htmlFlow"),s(H)}}function Hy(n,s,l){const o=this;return v;function v(_){return xe(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),C):l(_)}function C(_){return o.parser.lazy[o.now().line]?l(_):s(_)}}function Ny(n,s,l){return o;function o(v){return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),n.attempt(Hs,s,l)}}const jy={name:"htmlText",tokenize:Uy};function Uy(n,s,l){const o=this;let v,C,_;return a;function a(M){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(M),u}function u(M){return M===33?(n.consume(M),h):M===47?(n.consume(M),R):M===63?(n.consume(M),g):Mt(M)?(n.consume(M),T):l(M)}function h(M){return M===45?(n.consume(M),d):M===91?(n.consume(M),C=0,k):Mt(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),b):xe(M)?(_=c,X(M)):(n.consume(M),c)}function b(M){return M===45?(n.consume(M),w):c(M)}function w(M){return M===62?F(M):M===45?b(M):c(M)}function k(M){const B="CDATA[";return M===B.charCodeAt(C++)?(n.consume(M),C===B.length?x:k):l(M)}function x(M){return M===null?l(M):M===93?(n.consume(M),S):xe(M)?(_=x,X(M)):(n.consume(M),x)}function S(M){return M===93?(n.consume(M),m):x(M)}function m(M){return M===62?F(M):M===93?(n.consume(M),m):x(M)}function p(M){return M===null||M===62?F(M):xe(M)?(_=p,X(M)):(n.consume(M),p)}function g(M){return M===null?l(M):M===63?(n.consume(M),E):xe(M)?(_=g,X(M)):(n.consume(M),g)}function E(M){return M===62?F(M):g(M)}function R(M){return Mt(M)?(n.consume(M),A):l(M)}function A(M){return M===45||Dt(M)?(n.consume(M),A):L(M)}function L(M){return xe(M)?(_=L,X(M)):Ne(M)?(n.consume(M),L):F(M)}function T(M){return M===45||Dt(M)?(n.consume(M),T):M===47||M===62||tt(M)?z(M):l(M)}function z(M){return M===47?(n.consume(M),F):M===58||M===95||Mt(M)?(n.consume(M),N):xe(M)?(_=z,X(M)):Ne(M)?(n.consume(M),z):F(M)}function N(M){return M===45||M===46||M===58||M===95||Dt(M)?(n.consume(M),N):q(M)}function q(M){return M===61?(n.consume(M),G):xe(M)?(_=q,X(M)):Ne(M)?(n.consume(M),q):z(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):xe(M)?(_=G,X(M)):Ne(M)?(n.consume(M),G):(n.consume(M),Q)}function V(M){return M===v?(n.consume(M),v=void 0,Y):M===null?l(M):xe(M)?(_=V,X(M)):(n.consume(M),V)}function Q(M){return M===null||M===34||M===39||M===60||M===61||M===96?l(M):M===47||M===62||tt(M)?z(M):(n.consume(M),Q)}function Y(M){return M===47||M===62||tt(M)?z(M):l(M)}function F(M){return M===62?(n.consume(M),n.exit("htmlTextData"),n.exit("htmlText"),s):l(M)}function X(M){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),ee}function ee(M){return Ne(M)?qe(n,O,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):O(M)}function O(M){return n.enter("htmlTextData"),_(M)}}const Cc={name:"labelEnd",resolveAll:qy,resolveTo:Vy,tokenize:Gy},Iy={tokenize:Yy},Py={tokenize:Wy},Fy={tokenize:Ky};function qy(n){let s=-1;const l=[];for(;++s<n.length;){const o=n[s][1];if(l.push(n[s]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const v=o.type==="labelImage"?4:2;o.type="data",s+=v}}return n.length!==l.length&&Zt(n,0,n.length,l),n}function Vy(n,s){let l=n.length,o=0,v,C,_,a;for(;l--;)if(v=n[l][1],C){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&&(C=l,v.type!=="labelLink")){o=2;break}}else v.type==="labelEnd"&&(_=l);const u={type:n[C][1].type==="labelLink"?"link":"image",start:{...n[C][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[C][1].start},end:{...n[_][1].end}},d={type:"labelText",start:{...n[C+o+2][1].end},end:{...n[_-2][1].start}};return a=[["enter",u,s],["enter",h,s]],a=cn(a,n.slice(C+1,C+o+3)),a=cn(a,[["enter",d,s]]),a=cn(a,fa(s.parser.constructs.insideSpan.null,n.slice(C+o+4,_-3),s)),a=cn(a,[["exit",d,s],n[_-2],n[_-1],["exit",h,s]]),a=cn(a,n.slice(_+1)),a=cn(a,[["exit",u,s]]),Zt(n,C,n.length,a),n}function Gy(n,s,l){const o=this;let v=o.events.length,C,_;for(;v--;)if((o.events[v][1].type==="labelImage"||o.events[v][1].type==="labelLink")&&!o.events[v][1]._balanced){C=o.events[v][1];break}return a;function a(b){return C?C._inactive?c(b):(_=o.parser.defined.includes(_n(o.sliceSerialize({start:C.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),u):l(b)}function u(b){return b===40?n.attempt(Iy,d,_?d:c)(b):b===91?n.attempt(Py,d,_?h:c)(b):_?d(b):c(b)}function h(b){return n.attempt(Fy,d,c)(b)}function d(b){return s(b)}function c(b){return C._balanced=!0,l(b)}}function Yy(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 tt(c)?Ls(n,C)(c):C(c)}function C(c){return c===41?d(c):rm(n,_,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function _(c){return tt(c)?Ls(n,u)(c):d(c)}function a(c){return l(c)}function u(c){return c===34||c===39||c===40?lm(n,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function h(c){return tt(c)?Ls(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 Wy(n,s,l){const o=this;return v;function v(a){return sm.call(o,n,C,_,"reference","referenceMarker","referenceString")(a)}function C(a){return o.parser.defined.includes(_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?s(a):l(a)}function _(a){return l(a)}}function Ky(n,s,l){return o;function o(C){return n.enter("reference"),n.enter("referenceMarker"),n.consume(C),n.exit("referenceMarker"),v}function v(C){return C===93?(n.enter("referenceMarker"),n.consume(C),n.exit("referenceMarker"),n.exit("reference"),s):l(C)}}const Xy={name:"labelStartImage",resolveAll:Cc.resolveAll,tokenize:$y};function $y(n,s,l){const o=this;return v;function v(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),C}function C(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 Qy={name:"labelStartLink",resolveAll:Cc.resolveAll,tokenize:Zy};function Zy(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"),C}function C(_){return _===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(_):s(_)}}const Fu={name:"lineEnding",tokenize:Jy};function Jy(n,s){return l;function l(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),qe(n,s,"linePrefix")}}const ra={name:"thematicBreak",tokenize:e1};function e1(n,s,l){let o=0,v;return C;function C(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||xe(h))?(n.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===v?(n.consume(h),o++,u):(n.exit("thematicBreakSequence"),Ne(h)?qe(n,a,"whitespace")(h):a(h))}}const Ft={continuation:{tokenize:r1},exit:l1,name:"list",tokenize:i1},t1={partial:!0,tokenize:a1},n1={partial:!0,tokenize:s1};function i1(n,s,l){const o=this,v=o.events[o.events.length-1];let C=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:sc(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(ra,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 sc(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(t1,b,c))}function d(w){return o.containerState.initialBlankLine=!0,C++,b(w)}function c(w){return Ne(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),b):l(w)}function b(w){return o.containerState.size=C+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,s(w)}}function r1(n,s,l){const o=this;return o.containerState._closeFlow=void 0,n.check(Hs,v,C);function v(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,qe(n,s,"listItemIndent",o.containerState.size+1)(a)}function C(a){return o.containerState.furtherBlankLines||!Ne(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,_(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(n1,s,_)(a))}function _(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,qe(n,n.attempt(Ft,s,l),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function s1(n,s,l){const o=this;return qe(n,v,"listItemIndent",o.containerState.size+1);function v(C){const _=o.events[o.events.length-1];return _&&_[1].type==="listItemIndent"&&_[2].sliceSerialize(_[1],!0).length===o.containerState.size?s(C):l(C)}}function l1(n){n.exit(this.containerState.type)}function a1(n,s,l){const o=this;return qe(n,v,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function v(C){const _=o.events[o.events.length-1];return!Ne(C)&&_&&_[1].type==="listItemPrefixWhitespace"?s(C):l(C)}}const o_={name:"setextUnderline",resolveTo:o1,tokenize:u1};function o1(n,s){let l=n.length,o,v,C;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),!C&&n[l][1].type==="definition"&&(C=l);const _={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[v][1].type="setextHeadingText",C?(n.splice(v,0,["enter",_,s]),n.splice(C+1,0,["exit",n[o][1],s]),n[o][1].end={...n[C][1].end}):n[o][1]=_,n.push(["exit",_,s]),n}function u1(n,s,l){const o=this;let v;return C;function C(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"),Ne(h)?qe(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||xe(h)?(n.exit("setextHeadingLine"),s(h)):l(h)}}const c1={tokenize:h1};function h1(n){const s=this,l=n.attempt(Hs,o,n.attempt(this.parser.constructs.flowInitial,v,qe(n,n.attempt(this.parser.constructs.flow,v,n.attempt(my,v)),"linePrefix")));return l;function o(C){if(C===null){n.consume(C);return}return n.enter("lineEndingBlank"),n.consume(C),n.exit("lineEndingBlank"),s.currentConstruct=void 0,l}function v(C){if(C===null){n.consume(C);return}return n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),s.currentConstruct=void 0,l}}const f1={resolveAll:om()},d1=am("string"),p1=am("text");function am(n){return{resolveAll:om(n==="text"?_1:void 0),tokenize:s};function s(l){const o=this,v=this.parser.constructs[n],C=l.attempt(v,_,a);return _;function _(d){return h(d)?C(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"),C(d)):(l.consume(d),u)}function h(d){if(d===null)return!0;const c=v[d];let b=-1;if(c)for(;++b<c.length;){const w=c[b];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function om(n){return s;function s(l,o){let v=-1,C;for(;++v<=l.length;)C===void 0?l[v]&&l[v][1].type==="data"&&(C=v,v++):(!l[v]||l[v][1].type!=="data")&&(v!==C+2&&(l[C][1].end=l[v-1][1].end,l.splice(C+2,v-C-2),v=C+2),C=void 0);return n?n(l,o):l}}function _1(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 C=v.length,_=-1,a=0,u;for(;C--;){const h=v[C];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){C++;break}}if(s._contentTypeTextTrailing&&l===n.length&&(a=0),a){const h={type:l===n.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:C?_:o.start._bufferIndex+_,_index:o.start._index+C,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 m1={42:Ft,43:Ft,45:Ft,48:Ft,49:Ft,50:Ft,51:Ft,52:Ft,53:Ft,54:Ft,55:Ft,56:Ft,57:Ft,62:em},g1={91:by},v1={[-2]:Pu,[-1]:Pu,32:Pu},S1={35:Ay,42:ra,45:[o_,ra],60:Ly,61:o_,95:ra,96:l_,126:l_},y1={38:nm,92:tm},b1={[-5]:Fu,[-4]:Fu,[-3]:Fu,33:Xy,38:nm,42:lc,60:[QS,jy],91:Qy,92:[Ey,tm],93:Cc,95:lc,96:cy},C1={null:[lc,f1]},w1={null:[42,95]},x1={null:[]},E1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:w1,contentInitial:g1,disable:x1,document:m1,flow:S1,flowInitial:v1,insideSpan:C1,string:y1,text:b1},Symbol.toStringTag,{value:"Module"}));function k1(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={},C=[];let _=[],a=[];const u={attempt:L(R),check:L(A),consume:p,enter:g,exit:E,interrupt:L(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:b,sliceStream:w,write:c};let d=s.tokenize.call(h,u);return s.resolveAll&&C.push(s),h;function c(q){return _=cn(_,q),S(),_[_.length-1]!==null?[]:(T(s,0),h.events=fa(C,h.events,h),h.events)}function b(q,G){return T1(w(q),G)}function w(q){return A1(_,q)}function k(){const{_bufferIndex:q,_index:G,line:V,column:Q,offset:Y}=o;return{_bufferIndex:q,_index:G,line:V,column:Q,offset:Y}}function x(q){v[q.line]=q.column,N()}function S(){let q;for(;o._index<_.length;){const G=_[o._index];if(typeof G=="string")for(q=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===q&&o._bufferIndex<G.length;)m(G.charCodeAt(o._bufferIndex));else m(G)}}function m(q){d=d(q)}function p(q){xe(q)?(o.line++,o.column=1,o.offset+=q===-3?2:1,N()):q!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===_[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=q}function g(q,G){const V=G||{};return V.type=q,V.start=k(),h.events.push(["enter",V,h]),a.push(V),V}function E(q){const G=a.pop();return G.end=k(),h.events.push(["exit",G,h]),G}function R(q,G){T(q,G.from)}function A(q,G){G.restore()}function L(q,G){return V;function V(Q,Y,F){let X,ee,O,M;return Array.isArray(Q)?P(Q):"tokenize"in Q?P([Q]):B(Q);function B(de){return K;function K(U){const le=U!==null&&de[U],Z=U!==null&&de.null,pe=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return P(pe)(U)}}function P(de){return X=de,ee=0,de.length===0?F:H(de[ee])}function H(de){return K;function K(U){return M=z(),O=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?fe():de.tokenize.call(G?Object.assign(Object.create(h),G):h,u,ie,fe)(U)}}function ie(de){return q(O,M),Y}function fe(de){return M.restore(),++ee<X.length?H(X[ee]):F}}}function T(q,G){q.resolveAll&&!C.includes(q)&&C.push(q),q.resolve&&Zt(h.events,G,h.events.length-G,q.resolve(h.events.slice(G),h)),q.resolveTo&&(h.events=q.resolveTo(h.events,h))}function z(){const q=k(),G=h.previous,V=h.currentConstruct,Q=h.events.length,Y=Array.from(a);return{from:Q,restore:F};function F(){o=q,h.previous=G,h.currentConstruct=V,h.events.length=Q,a=Y,N()}}function N(){o.line in v&&o.column<2&&(o.column=v[o.line],o.offset+=v[o.line]-1)}}function A1(n,s){const l=s.start._index,o=s.start._bufferIndex,v=s.end._index,C=s.end._bufferIndex;let _;if(l===v)_=[n[l].slice(o,C)];else{if(_=n.slice(l,v),o>-1){const a=_[0];typeof a=="string"?_[0]=a.slice(o):_.shift()}C>0&&_.push(n[v].slice(0,C))}return _}function T1(n,s){let l=-1;const o=[];let v;for(;++l<n.length;){const C=n[l];let _;if(typeof C=="string")_=C;else switch(C){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(C)}v=C===-2,o.push(_)}return o.join("")}function D1(n){const o={constructs:Z_([E1,...(n||{}).extensions||[]]),content:v(VS),defined:[],document:v(YS),flow:v(c1),lazy:{},string:v(d1),text:v(p1)};return o;function v(C){return _;function _(a){return k1(o,C,a)}}}function R1(n){for(;!im(n););return n}const u_=/[\0\t\n\r]/g;function L1(){let n=1,s="",l=!0,o;return v;function v(C,_,a){const u=[];let h,d,c,b,w;for(C=s+(typeof C=="string"?C.toString():new TextDecoder(_||void 0).decode(C)),c=0,s="",l&&(C.charCodeAt(0)===65279&&c++,l=void 0);c<C.length;){if(u_.lastIndex=c,h=u_.exec(C),b=h&&h.index!==void 0?h.index:C.length,w=C.charCodeAt(b),!h){s=C.slice(c);break}if(w===10&&c===b&&o)u.push(-3),o=void 0;else switch(o&&(u.push(-5),o=void 0),c<b&&(u.push(C.slice(c,b)),n+=b-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=b+1}return a&&(o&&u.push(-5),s&&u.push(s),u.push(null)),u}}const M1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function O1(n){return n.replace(M1,B1)}function B1(n,s,l){if(s)return s;if(l.charCodeAt(0)===35){const v=l.charCodeAt(1),C=v===120||v===88;return J_(l.slice(C?2:1),C?16:10)}return bc(l)||n}const um={}.hasOwnProperty;function z1(n,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),H1(l)(R1(D1(l).document().write(L1()(n,s,!0))))}function H1(n){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:C(gn),autolinkProtocol:z,autolinkEmail:z,atxHeading:C(ye),blockQuote:C(Z),characterEscape:z,characterReference:z,codeFenced:C(pe),codeFencedFenceInfo:_,codeFencedFenceMeta:_,codeIndented:C(pe,_),codeText:C(_e,_),codeTextData:z,data:z,codeFlowValue:z,definition:C(Ae),definitionDestinationString:_,definitionLabelString:_,definitionTitleString:_,emphasis:C(ue),hardBreakEscape:C(je),hardBreakTrailing:C(je),htmlFlow:C(Ee,_),htmlFlowData:z,htmlText:C(Ee,_),htmlTextData:z,image:C(mn),label:_,link:C(gn),listItem:C(En),listItemValue:b,listOrdered:C(vn,c),listUnordered:C(vn),paragraph:C(Gn),reference:H,referenceString:_,resourceDestinationString:_,resourceTitleString:_,setextHeading:C(ye),strong:C(At),thematicBreak:C(Ot)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:le,autolinkProtocol:U,blockQuote:u(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:de,characterReference:K,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:N,codeIndented:u(m),codeText:u(Y),codeTextData:N,data:N,definition:u(),definitionDestinationString:E,definitionLabelString:p,definitionTitleString:g,emphasis:u(),hardBreakEscape:u(G),hardBreakTrailing:u(G),htmlFlow:u(V),htmlFlowData:N,htmlText:u(Q),htmlTextData:N,image:u(X),label:O,labelText:ee,lineEnding:q,link:u(F),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:M,resourceTitleString:B,resource:P,setextHeading:u(T),setextHeadingLineSequence:L,setextHeadingText:A,strong:u(),thematicBreak:u()}};cm(s,(n||{}).mdastExtensions||[]);const l={};return o;function o(ae){let ve={type:"root",children:[]};const Ce={stack:[ve],tokenStack:[],config:s,enter:a,exit:h,buffer:_,resume:d,data:l},Re=[];let Be=-1;for(;++Be<ae.length;)if(ae[Be][1].type==="listOrdered"||ae[Be][1].type==="listUnordered")if(ae[Be][0]==="enter")Re.push(Be);else{const mt=Re.pop();Be=v(ae,mt,Be)}for(Be=-1;++Be<ae.length;){const mt=s[ae[Be][0]];um.call(mt,ae[Be][1].type)&&mt[ae[Be][1].type].call(Object.assign({sliceSerialize:ae[Be][2].sliceSerialize},Ce),ae[Be][1])}if(Ce.tokenStack.length>0){const mt=Ce.tokenStack[Ce.tokenStack.length-1];(mt[1]||c_).call(Ce,void 0,mt[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})},Be=-1;++Be<s.transforms.length;)ve=s.transforms[Be](ve)||ve;return ve}function v(ae,ve,Ce){let Re=ve-1,Be=-1,mt=!1,Ve,bt,gt,Bt;for(;++Re<=Ce;){const Je=ae[Re];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?Be++:Be--,Bt=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(Ve&&!Bt&&!Be&&!gt&&(gt=Re),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Be&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||Be===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(Ve){let Yn=Re;for(bt=void 0;Yn--;){const hn=ae[Yn];if(hn[1].type==="lineEnding"||hn[1].type==="lineEndingBlank"){if(hn[0]==="exit")continue;bt&&(ae[bt][1].type="lineEndingBlank",mt=!0),hn[1].type="lineEnding",bt=Yn}else if(!(hn[1].type==="linePrefix"||hn[1].type==="blockQuotePrefix"||hn[1].type==="blockQuotePrefixWhitespace"||hn[1].type==="blockQuoteMarker"||hn[1].type==="listItemIndent"))break}gt&&(!bt||gt<bt)&&(Ve._spread=!0),Ve.end=Object.assign({},bt?ae[bt][1].start:Je[1].end),ae.splice(bt||Re,0,["exit",Ve,Je[2]]),Re++,Ce++}if(Je[1].type==="listItemPrefix"){const Yn={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};Ve=Yn,ae.splice(Re,0,["enter",Yn,Je[2]]),Re++,Ce++,gt=void 0,Bt=!0}}}return ae[ve][1]._spread=mt,Ce}function C(ae,ve){return Ce;function Ce(Re){a.call(this,ae(Re),Re),ve&&ve.call(this,Re)}}function _(){this.stack.push({type:"fragment",children:[]})}function a(ae,ve,Ce){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([ve,Ce||void 0]),ae.position={start:gi(ve.start),end:void 0}}function u(ae){return ve;function ve(Ce){ae&&ae.call(this,Ce),h.call(this,Ce)}}function h(ae,ve){const Ce=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==ae.type&&(ve?ve.call(this,ae,Re[0]):(Re[1]||c_).call(this,ae,Re[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Rs({start:ae.start,end:ae.end})+"): it’s not open");Ce.position.end=gi(ae.end)}function d(){return yc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function b(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 m(){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(),Ce=this.stack[this.stack.length-1];Ce.label=ve,Ce.identifier=_n(this.sliceSerialize(ae)).toLowerCase()}function g(){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 Ce=this.sliceSerialize(ae).length;ve.depth=Ce}}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 z(ae){const Ce=this.stack[this.stack.length-1].children;let Re=Ce[Ce.length-1];(!Re||Re.type!=="text")&&(Re=ot(),Re.position={start:gi(ae.start),end:void 0},Ce.push(Re)),this.stack.push(Re)}function N(ae){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ae),ve.position.end=gi(ae.end)}function q(ae){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ve.children[ve.children.length-1];Ce.position.end=gi(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(ve.type)&&(z.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 Q(){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 F(){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 X(){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 ee(ae){const ve=this.sliceSerialize(ae),Ce=this.stack[this.stack.length-2];Ce.label=O1(ve),Ce.identifier=_n(ve).toLowerCase()}function O(){const ae=this.stack[this.stack.length-1],ve=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Re=ae.children;Ce.children=Re}else Ce.alt=ve}function M(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function B(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function P(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ie(ae){const ve=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ve,Ce.identifier=_n(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function fe(ae){this.data.characterReferenceType=ae.type}function de(ae){const ve=this.sliceSerialize(ae),Ce=this.data.characterReferenceType;let Re;Ce?(Re=J_(ve,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=bc(ve);const Be=this.stack[this.stack.length-1];Be.value+=Re}function K(ae){const ve=this.stack.pop();ve.position.end=gi(ae.end)}function U(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 Z(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function Ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ue(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function je(){return{type:"break"}}function Ee(){return{type:"html",value:""}}function mn(){return{type:"image",title:null,url:"",alt:null}}function gn(){return{type:"link",title:null,url:"",children:[]}}function vn(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function En(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Gn(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function Ot(){return{type:"thematicBreak"}}}function gi(n){return{line:n.line,column:n.column,offset:n.offset}}function cm(n,s){let l=-1;for(;++l<s.length;){const o=s[l];Array.isArray(o)?cm(n,o):N1(n,o)}}function N1(n,s){let l;for(l in s)if(um.call(s,l))switch(l){case"canContainEols":{const o=s[l];o&&n[l].push(...o);break}case"transforms":{const o=s[l];o&&n[l].push(...o);break}case"enter":case"exit":{const o=s[l];o&&Object.assign(n[l],o);break}}}function c_(n,s){throw n?new Error("Cannot close `"+n.type+"` ("+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 j1(n){const s=this;s.parser=l;function l(o){return z1(o,{...s.data("settings"),...n,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function U1(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 I1(n,s){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(s,l),[n.applyData(s,l),{type:"text",value:`
|
|
64
|
-
`}]}function P1(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 C={type:"element",tagName:"code",properties:o,children:[{type:"text",value:l}]};return s.meta&&(C.data={meta:s.meta}),n.patch(s,C),C=n.applyData(s,C),C={type:"element",tagName:"pre",properties:{},children:[C]},n.patch(s,C),C}function F1(n,s){const l={type:"element",tagName:"del",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function q1(n,s){const l={type:"element",tagName:"em",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function V1(n,s){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(s.identifier).toUpperCase(),v=Mr(o.toLowerCase()),C=n.footnoteOrder.indexOf(o);let _,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),_=n.footnoteOrder.length):_=C+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 G1(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 Y1(n,s){if(n.options.allowDangerousHtml){const l={type:"raw",value:s.value};return n.patch(s,l),n.applyData(s,l)}}function hm(n,s){const l=s.referenceType;let o="]";if(l==="collapsed"?o+="[]":l==="full"&&(o+="["+(s.label||s.identifier)+"]"),s.type==="imageReference")return[{type:"text",value:"!["+s.alt+o}];const v=n.all(s),C=v[0];C&&C.type==="text"?C.value="["+C.value:v.unshift({type:"text",value:"["});const _=v[v.length-1];return _&&_.type==="text"?_.value+=o:v.push({type:"text",value:o}),v}function W1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return hm(n,s);const v={src:Mr(o.url||""),alt:s.alt};o.title!==null&&o.title!==void 0&&(v.title=o.title);const C={type:"element",tagName:"img",properties:v,children:[]};return n.patch(s,C),n.applyData(s,C)}function K1(n,s){const l={src:Mr(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 X1(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 $1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return hm(n,s);const v={href:Mr(o.url||"")};o.title!==null&&o.title!==void 0&&(v.title=o.title);const C={type:"element",tagName:"a",properties:v,children:n.all(s)};return n.patch(s,C),n.applyData(s,C)}function Q1(n,s){const l={href:Mr(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 Z1(n,s,l){const o=n.all(s),v=l?J1(l):fm(s),C={},_=[];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:[]}),C.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:C,children:_};return n.patch(s,h),n.applyData(s,h)}function J1(n){let s=!1;if(n.type==="list"){s=n.spread||!1;const l=n.children;let o=-1;for(;!s&&++o<l.length;)s=fm(l[o])}return s}function fm(n){const s=n.spread;return s??n.children.length>1}function eb(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 C={type:"element",tagName:s.ordered?"ol":"ul",properties:l,children:n.wrap(o,!0)};return n.patch(s,C),n.applyData(s,C)}function tb(n,s){const l={type:"element",tagName:"p",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function nb(n,s){const l={type:"root",children:n.wrap(n.all(s))};return n.patch(s,l),n.applyData(s,l)}function ib(n,s){const l={type:"element",tagName:"strong",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function rb(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=mc(s.children[1]),u=G_(s.children[s.children.length-1]);a&&u&&(_.position={start:a,end:u}),v.push(_)}const C={type:"element",tagName:"table",properties:{},children:n.wrap(v,!0)};return n.patch(s,C),n.applyData(s,C)}function sb(n,s,l){const o=l?l.children:void 0,C=(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],b={},w=_?_[u]:void 0;w&&(b.align=w);let k={type:"element",tagName:C,properties:b,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 lb(n,s){const l={type:"element",tagName:"td",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}const h_=9,f_=32;function ab(n){const s=String(n),l=/\r?\n|\r/g;let o=l.exec(s),v=0;const C=[];for(;o;)C.push(d_(s.slice(v,o.index),v>0,!0),o[0]),v=o.index+o[0].length,o=l.exec(s);return C.push(d_(s.slice(v),v>0,!1)),C.join("")}function d_(n,s,l){let o=0,v=n.length;if(s){let C=n.codePointAt(o);for(;C===h_||C===f_;)o++,C=n.codePointAt(o)}if(l){let C=n.codePointAt(v-1);for(;C===h_||C===f_;)v--,C=n.codePointAt(v-1)}return v>o?n.slice(o,v):""}function ob(n,s){const l={type:"text",value:ab(String(s.value))};return n.patch(s,l),n.applyData(s,l)}function ub(n,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(s,l),n.applyData(s,l)}const cb={blockquote:U1,break:I1,code:P1,delete:F1,emphasis:q1,footnoteReference:V1,heading:G1,html:Y1,imageReference:W1,image:K1,inlineCode:X1,linkReference:$1,link:Q1,listItem:Z1,list:eb,paragraph:tb,root:nb,strong:ib,table:rb,tableCell:lb,tableRow:sb,text:ob,thematicBreak:ub,toml:ea,yaml:ea,definition:ea,footnoteDefinition:ea};function ea(){}const dm=-1,da=0,Ms=1,aa=2,wc=3,xc=4,Ec=5,kc=6,pm=7,_m=8,hb=typeof self=="object"?self:globalThis,p_=(n,s)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new hb[n](s)},fb=(n,s)=>{const l=(v,C)=>(n.set(C,v),v),o=v=>{if(n.has(v))return n.get(v);const[C,_]=s[v];switch(C){case da:case dm:return l(_,v);case Ms:{const a=l([],v);for(const u of _)a.push(o(u));return a}case aa:{const a=l({},v);for(const[u,h]of _)a[o(u)]=o(h);return a}case wc:return l(new Date(_),v);case xc:{const{source:a,flags:u}=_;return l(new RegExp(a,u),v)}case Ec:{const a=l(new Map,v);for(const[u,h]of _)a.set(o(u),o(h));return a}case kc:{const a=l(new Set,v);for(const u of _)a.add(o(u));return a}case pm:{const{name:a,message:u}=_;return l(p_(a,u),v)}case _m: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(p_(C,_),v)};return o},__=n=>fb(new Map,n)(0),kr="",{toString:db}={},{keys:pb}=Object,Ds=n=>{const s=typeof n;if(s!=="object"||!n)return[da,s];const l=db.call(n).slice(8,-1);switch(l){case"Array":return[Ms,kr];case"Object":return[aa,kr];case"Date":return[wc,kr];case"RegExp":return[xc,kr];case"Map":return[Ec,kr];case"Set":return[kc,kr];case"DataView":return[Ms,l]}return l.includes("Array")?[Ms,l]:l.includes("Error")?[pm,l]:[aa,l]},ta=([n,s])=>n===da&&(s==="function"||s==="symbol"),_b=(n,s,l,o)=>{const v=(_,a)=>{const u=o.push(_)-1;return l.set(a,u),u},C=_=>{if(l.has(_))return l.get(_);let[a,u]=Ds(_);switch(a){case da:{let d=_;switch(u){case"bigint":a=_m,d=_.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return v([dm],_)}return v([a,d],_)}case Ms:{if(u){let b=_;return u==="DataView"?b=new Uint8Array(_.buffer):u==="ArrayBuffer"&&(b=new Uint8Array(_)),v([u,[...b]],_)}const d=[],c=v([a,d],_);for(const b of _)d.push(C(b));return c}case aa:{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 C(_.toJSON());const d=[],c=v([a,d],_);for(const b of pb(_))(n||!ta(Ds(_[b])))&&d.push([C(b),C(_[b])]);return c}case wc:return v([a,_.toISOString()],_);case xc:{const{source:d,flags:c}=_;return v([a,{source:d,flags:c}],_)}case Ec:{const d=[],c=v([a,d],_);for(const[b,w]of _)(n||!(ta(Ds(b))||ta(Ds(w))))&&d.push([C(b),C(w)]);return c}case kc:{const d=[],c=v([a,d],_);for(const b of _)(n||!ta(Ds(b)))&&d.push(C(b));return c}}const{message:h}=_;return v([a,{name:u,message:h}],_)};return C},m_=(n,{json:s,lossy:l}={})=>{const o=[];return _b(!(s||l),!!s,new Map,o)(n),o},oa=typeof structuredClone=="function"?(n,s)=>s&&("json"in s||"lossy"in s)?__(m_(n,s)):structuredClone(n):(n,s)=>__(m_(n,s));function mb(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 gb(n,s){return"Back to reference "+(n+1)+(s>1?"-"+s:"")}function vb(n){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||mb,o=n.options.footnoteBackLabel||gb,v=n.options.footnoteLabel||"Footnotes",C=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(),b=Mr(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-"+b+(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 m={type:"element",tagName:"li",properties:{id:s+"fn-"+b},children:n.wrap(d,!0)};n.patch(h,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:C,properties:{...oa(_),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 pa=(function(n){if(n==null)return Cb;if(typeof n=="function")return _a(n);if(typeof n=="object")return Array.isArray(n)?Sb(n):yb(n);if(typeof n=="string")return bb(n);throw new Error("Expected function, string, or object as test")});function Sb(n){const s=[];let l=-1;for(;++l<n.length;)s[l]=pa(n[l]);return _a(o);function o(...v){let C=-1;for(;++C<s.length;)if(s[C].apply(this,v))return!0;return!1}}function yb(n){const s=n;return _a(l);function l(o){const v=o;let C;for(C in n)if(v[C]!==s[C])return!1;return!0}}function bb(n){return _a(s);function s(l){return l&&l.type===n}}function _a(n){return s;function s(l,o,v){return!!(wb(l)&&n.call(this,l,typeof o=="number"?o:void 0,v||void 0))}}function Cb(){return!0}function wb(n){return n!==null&&typeof n=="object"&&"type"in n}const mm=[],xb=!0,ac=!1,Eb="skip";function gm(n,s,l,o){let v;typeof s=="function"&&typeof l!="function"?(o=l,l=s):v=s;const C=pa(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(b,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=mm,k,x,S;if((!s||C(u,h,d[d.length-1]||void 0))&&(w=kb(l(u,d)),w[0]===ac))return w;if("children"in u&&u.children){const m=u;if(m.children&&w[0]!==Eb)for(x=(o?m.children.length:-1)+_,S=d.concat(m);x>-1&&x<m.children.length;){const p=m.children[x];if(k=a(p,x,S)(),k[0]===ac)return k;x=typeof k[1]=="number"?k[1]:x+_}}return w}}}function kb(n){return Array.isArray(n)?n:typeof n=="number"?[xb,n]:n==null?mm:[n]}function Ac(n,s,l,o){let v,C,_;typeof s=="function"&&typeof l!="function"?(C=void 0,_=s,v=l):(C=s,_=l,v=o),gm(n,C,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 oc={}.hasOwnProperty,Ab={};function Tb(n,s){const l=s||Ab,o=new Map,v=new Map,C=new Map,_={...cb,...l.handlers},a={all:h,applyData:Rb,definitionById:o,footnoteById:v,footnoteCounts:C,footnoteOrder:[],handlers:_,one:u,options:l,patch:Db,wrap:Mb};return Ac(n,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?o:v,b=String(d.identifier).toUpperCase();c.has(b)||c.set(b,d)}}),a;function u(d,c){const b=d.type,w=a.handlers[b];if(oc.call(a.handlers,b)&&w)return w(a,d,c);if(a.options.passThrough&&a.options.passThrough.includes(b)){if("children"in d){const{children:x,...S}=d,m=oa(S);return m.children=a.all(d),m}return oa(d)}return(a.options.unknownHandler||Lb)(a,d,c)}function h(d){const c=[];if("children"in d){const b=d.children;let w=-1;for(;++w<b.length;){const k=a.one(b[w],d);if(k){if(w&&b[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=g_(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=g_(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function Db(n,s){n.position&&(s.position=mS(n))}function Rb(n,s){let l=s;if(n&&n.data){const o=n.data.hName,v=n.data.hChildren,C=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"&&C&&Object.assign(l.properties,oa(C)),"children"in l&&l.children&&v!==null&&v!==void 0&&(l.children=v)}return l}function Lb(n,s){const l=s.data||{},o="value"in s&&!(oc.call(l,"hProperties")||oc.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 Mb(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 g_(n){let s=0,l=n.charCodeAt(s);for(;l===9||l===32;)s++,l=n.charCodeAt(s);return n.slice(s)}function v_(n,s){const l=Tb(n,s),o=l.one(n,void 0),v=vb(l),C=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return v&&C.children.push({type:"text",value:`
|
|
73
|
-
`},v),C}function Ob(n,s){return n&&"run"in n?async function(l,o){const v=v_(l,{file:o,...s});await n.run(v,o)}:function(l,o){return v_(l,{file:o,...n||s})}}function S_(n){if(n)throw n}var qu,y_;function Bb(){if(y_)return qu;y_=1;var n=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,v=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},C=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 b;for(b in h);return typeof b>"u"||n.call(h,b)},_=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 qu=function u(){var h,d,c,b,w,k,x=arguments[0],S=1,m=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<m;++S)if(h=arguments[S],h!=null)for(d in h)c=a(x,d),b=a(h,d),x!==b&&(p&&b&&(C(b)||(w=v(b)))?(w?(w=!1,k=c&&v(c)?c:[]):k=c&&C(c)?c:{},_(x,{name:d,newValue:u(p,k,b)})):typeof b<"u"&&_(x,{name:d,newValue:b}));return x},qu}var zb=Bb();const Vu=B_(zb);function uc(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 Hb(){const n=[],s={run:l,use:o};return s;function l(...v){let C=-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[++C];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?Nb(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 Nb(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(C,v):u instanceof Error?v(u):C(u))}function v(_,...a){l||(l=!0,s(_,...a))}function C(_){v(null,_)}}const wn={basename:jb,dirname:Ub,extname:Ib,join:Pb,sep:"/"};function jb(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,C;if(s===void 0||s.length===0||s.length>n.length){for(;v--;)if(n.codePointAt(v)===47){if(C){l=v+1;break}}else o<0&&(C=!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(C){l=v+1;break}}else _<0&&(C=!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 Ub(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 Ib(n){Ns(n);let s=n.length,l=-1,o=0,v=-1,C=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:C!==1&&(C=1):v>-1&&(C=-1)}return v<0||l<0||C===0||C===1&&v===l-1&&v===o+1?"":n.slice(v,l)}function Pb(...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?".":Fb(l)}function Fb(n){Ns(n);const s=n.codePointAt(0)===47;let l=qb(n,!s);return l.length===0&&!s&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),s?"/"+l:l}function qb(n,s){let l="",o=0,v=-1,C=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||C===1))if(v!==_-1&&C===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=_,C=0;continue}}else if(l.length>0){l="",o=0,v=_,C=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=_,C=0}else a===46&&C>-1?C++:C=-1}return l}function Ns(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const Vb={cwd:Gb};function Gb(){return"/"}function cc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Yb(n){if(typeof n=="string")n=new URL(n);else if(!cc(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 Wb(n)}function Wb(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 Gu=["history","path","basename","stem","extname","dirname"];class vm{constructor(s){let l;s?cc(s)?l={path:s}:typeof s=="string"||Kb(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":Vb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Gu.length;){const C=Gu[o];C in l&&l[C]!==void 0&&l[C]!==null&&(this[C]=C==="history"?[...l[C]]:l[C])}let v;for(v in l)Gu.includes(v)||(this[v]=l[v])}get basename(){return typeof this.path=="string"?wn.basename(this.path):void 0}set basename(s){Wu(s,"basename"),Yu(s,"basename"),this.path=wn.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?wn.dirname(this.path):void 0}set dirname(s){b_(this.basename,"dirname"),this.path=wn.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?wn.extname(this.path):void 0}set extname(s){if(Yu(s,"extname"),b_(this.dirname,"extname"),s){if(s.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(s.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wn.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){cc(s)&&(s=Yb(s)),Wu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?wn.basename(this.path,this.extname):void 0}set stem(s){Wu(s,"stem"),Yu(s,"stem"),this.path=wn.join(this.dirname||"",s+(this.extname||""))}fail(s,l,o){const v=this.message(s,l,o);throw v.fatal=!0,v}info(s,l,o){const v=this.message(s,l,o);return v.fatal=void 0,v}message(s,l,o){const v=new Rt(s,l,o);return this.path&&(v.name=this.path+":"+v.name,v.file=this.path),v.fatal=!1,this.messages.push(v),v}toString(s){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(s||void 0).decode(this.value)}}function Yu(n,s){if(n&&n.includes(wn.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+wn.sep+"`")}function Wu(n,s){if(!n)throw new Error("`"+s+"` cannot be empty")}function b_(n,s){if(!n)throw new Error("Setting `"+s+"` requires `path` to be set too")}function Kb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Xb=(function(n){const o=this.constructor.prototype,v=o[n],C=function(){return v.apply(C,arguments)};return Object.setPrototypeOf(C,o),C}),$b={}.hasOwnProperty;class Tc extends Xb{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=Hb()}copy(){const s=new Tc;let l=-1;for(;++l<this.attachers.length;){const o=this.attachers[l];s.use(...o)}return s.data(Vu(!0,{},this.namespace)),s}data(s,l){return typeof s=="string"?arguments.length===2?($u("data",this.frozen),this.namespace[s]=l,this):$b.call(this.namespace,s)&&this.namespace[s]||void 0:s?($u("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 Ku("parse",o),o(String(l),l)}process(s,l){const o=this;return this.freeze(),Ku("process",this.parser||this.Parser),Xu("process",this.compiler||this.Compiler),l?v(void 0,l):new Promise(v);function v(C,_){const a=na(s),u=o.parse(a);o.run(u,a,function(d,c,b){if(d||!c||!b)return h(d);const w=c,k=o.stringify(w,b);Jb(k)?b.value=k:b.result=k,h(d,b)});function h(d,c){d||!c?_(d):C?C(c):l(void 0,c)}}}processSync(s){let l=!1,o;return this.freeze(),Ku("processSync",this.parser||this.Parser),Xu("processSync",this.compiler||this.Compiler),this.process(s,v),w_("processSync","process",l),o;function v(C,_){l=!0,S_(C),o=_}}run(s,l,o){C_(s),this.freeze();const v=this.transformers;return!o&&typeof l=="function"&&(o=l,l=void 0),o?C(void 0,o):new Promise(C);function C(_,a){const u=na(l);v.run(s,u,h);function h(d,c,b){const w=c||s;d?a(d):_?_(w):o(void 0,w,b)}}}runSync(s,l){let o=!1,v;return this.run(s,l,C),w_("runSync","run",o),v;function C(_,a){S_(_),v=a,o=!0}}stringify(s,l){this.freeze();const o=na(l),v=this.compiler||this.Compiler;return Xu("stringify",v),C_(s),v(s,o)}use(s,...l){const o=this.attachers,v=this.namespace;if($u("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 C(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=Vu(!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];C(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,d){let c=-1,b=-1;for(;++c<o.length;)if(o[c][0]===h){b=c;break}if(b===-1)o.push([h,...d]);else if(d.length>0){let[w,...k]=d;const x=o[b][1];uc(x)&&uc(w)&&(w=Vu(!0,x,w)),o[b]=[h,w,...k]}}}}const Qb=new Tc().freeze();function Ku(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Xu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function $u(n,s){if(s)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function C_(n){if(!uc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function w_(n,s,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+s+"` instead")}function na(n){return Zb(n)?n:new vm(n)}function Zb(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Jb(n){return typeof n=="string"||eC(n)}function eC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const tC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",x_=[],E_={allowDangerousHtml:!0},nC=/^(https?|ircs?|mailto|xmpp)$/i,iC=[{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 rC(n){const s=sC(n),l=lC(n);return aC(s.runSync(s.parse(l),l),n)}function sC(n){const s=n.rehypePlugins||x_,l=n.remarkPlugins||x_,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...E_}:E_;return Qb().use(j1).use(l).use(Ob,o).use(s)}function lC(n){const s=n.children||"",l=new vm;return typeof s=="string"&&(l.value=s),l}function aC(n,s){const l=s.allowedElements,o=s.allowElement,v=s.components,C=s.disallowedElements,_=s.skipHtml,a=s.unwrapDisallowed,u=s.urlTransform||oC;for(const d of iC)Object.hasOwn(s,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+tC+d.id,void 0);return Ac(n,h),bS(n,{Fragment:I.Fragment,components:v,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function h(d,c,b){if(d.type==="raw"&&b&&typeof c=="number")return _?b.children.splice(c,1):b.children[c]={type:"text",value:d.value},c;if(d.type==="element"){let w;for(w in Iu)if(Object.hasOwn(Iu,w)&&Object.hasOwn(d.properties,w)){const k=d.properties[w],x=Iu[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):C?C.includes(d.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(d,c,b)),w&&b&&typeof c=="number")return a&&d.children?b.children.splice(c,1,...d.children):b.children.splice(c,1),c}}}function oC(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||nC.test(n.slice(0,s))?n:""}function k_(n,s){const l=String(n);if(typeof s!="string")throw new TypeError("Expected character");let o=0,v=l.indexOf(s);for(;v!==-1;)o++,v=l.indexOf(s,v+s.length);return o}function uC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cC(n,s,l){const v=pa((l||{}).ignore||[]),C=hC(s);let _=-1;for(;++_<C.length;)gm(n,"text",a);function a(h,d){let c=-1,b;for(;++c<d.length;){const w=d[c],k=b?b.children:void 0;if(v(w,k?k.indexOf(w):void 0,b))return;b=w}if(b)return u(h,d)}function u(h,d){const c=d[d.length-1],b=C[_][0],w=C[_][1];let k=0;const S=c.children.indexOf(h);let m=!1,p=[];b.lastIndex=0;let g=b.exec(h.value);for(;g;){const E=g.index,R={index:g.index,input:g.input,stack:[...d,h]};let A=w(...g,R);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.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+g[0].length,m=!0),!b.global)break;g=b.exec(h.value)}return m?(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 hC(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([fC(v[0]),dC(v[1])])}return s}function fC(n){return typeof n=="string"?new RegExp(uC(n),"g"):n}function dC(n){return typeof n=="function"?n:function(){return n}}const Qu="phrasing",Zu=["autolink","link","image","label"];function pC(){return{transforms:[bC],enter:{literalAutolink:mC,literalAutolinkEmail:Ju,literalAutolinkHttp:Ju,literalAutolinkWww:Ju},exit:{literalAutolink:yC,literalAutolinkEmail:SC,literalAutolinkHttp:gC,literalAutolinkWww:vC}}}function _C(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qu,notInConstruct:Zu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qu,notInConstruct:Zu},{character:":",before:"[ps]",after:"\\/",inConstruct:Qu,notInConstruct:Zu}]}}function mC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function Ju(n){this.config.enter.autolinkProtocol.call(this,n)}function gC(n){this.config.exit.autolinkProtocol.call(this,n)}function vC(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 SC(n){this.config.exit.autolinkEmail.call(this,n)}function yC(n){this.exit(n)}function bC(n){cC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),wC]],{ignore:["link","linkReference"]})}function CC(n,s,l,o,v){let C="";if(!Sm(v)||(/^w/i.test(s)&&(l=s+l,s="",C="http://"),!xC(l)))return!1;const _=EC(l+o);if(!_[0])return!1;const a={type:"link",title:null,url:C+s+_[0],children:[{type:"text",value:s+_[0]}]};return _[1]?[a,{type:"text",value:_[1]}]:a}function wC(n,s,l,o){return!Sm(o,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+s+"@"+l,children:[{type:"text",value:s+"@"+l}]}}function xC(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 EC(n){const s=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!s)return[n,void 0];n=n.slice(0,s.index);let l=s[0],o=l.indexOf(")");const v=k_(n,"(");let C=k_(n,")");for(;o!==-1&&v>C;)n+=l.slice(0,o+1),l=l.slice(o+1),o=l.indexOf(")"),C++;return[n,l]}function Sm(n,s){const l=n.input.charCodeAt(n.index-1);return(n.index===0||ji(l)||ha(l))&&(!s||l!==47)}ym.peek=BC;function kC(){this.buffer()}function AC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function TC(){this.buffer()}function DC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function RC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function LC(n){this.exit(n)}function MC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function OC(n){this.exit(n)}function BC(){return"["}function ym(n,s,l,o){const v=l.createTracker(o);let C=v.move("[^");const _=l.enter("footnoteReference"),a=l.enter("reference");return C+=v.move(l.safe(l.associationId(n),{after:"]",before:C})),a(),_(),C+=v.move("]"),C}function zC(){return{enter:{gfmFootnoteCallString:kC,gfmFootnoteCall:AC,gfmFootnoteDefinitionLabelString:TC,gfmFootnoteDefinition:DC},exit:{gfmFootnoteCallString:RC,gfmFootnoteCall:LC,gfmFootnoteDefinitionLabelString:MC,gfmFootnoteDefinition:OC}}}function HC(n){let s=!1;return n&&n.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:ym},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(o,v,C,_){const a=C.createTracker(_);let u=a.move("[^");const h=C.enter("footnoteDefinition"),d=C.enter("label");return u+=a.move(C.safe(C.associationId(o),{before:u,after:"]"})),d(),u+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),u+=a.move((s?`
|
|
74
|
-
`:" ")+C.indentLines(C.containerFlow(o,a.current()),s?bm:NC))),h(),u}}function NC(n,s,l){return s===0?n:bm(n,s,l)}function bm(n,s,l){return(l?"":" ")+n}const jC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Cm.peek=qC;function UC(){return{canContainEols:["delete"],enter:{strikethrough:PC},exit:{strikethrough:FC}}}function IC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jC}],handlers:{delete:Cm}}}function PC(n){this.enter({type:"delete",children:[]},n)}function FC(n){this.exit(n)}function Cm(n,s,l,o){const v=l.createTracker(o),C=l.enter("strikethrough");let _=v.move("~~");return _+=l.containerPhrasing(n,{...v.current(),before:_,after:"~"}),_+=v.move("~~"),C(),_}function qC(){return"~"}function VC(n){return n.length}function GC(n,s){const l=s||{},o=(l.align||[]).concat(),v=l.stringLength||VC,C=[],_=[],a=[],u=[];let h=0,d=-1;for(;++d<n.length;){const x=[],S=[];let m=-1;for(n[d].length>h&&(h=n[d].length);++m<n[d].length;){const p=YC(n[d][m]);if(l.alignDelimiters!==!1){const g=v(p);S[m]=g,(u[m]===void 0||g>u[m])&&(u[m]=g)}x.push(p)}_[d]=x,a[d]=S}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)C[c]=A_(o[c]);else{const x=A_(o);for(;++c<h;)C[c]=x}c=-1;const b=[],w=[];for(;++c<h;){const x=C[c];let S="",m="";x===99?(S=":",m=":"):x===108?S=":":x===114&&(m=":");let p=l.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-m.length);const g=S+"-".repeat(p)+m;l.alignDelimiters!==!1&&(p=S.length+p+m.length,p>u[c]&&(u[c]=p),w[c]=p),b[c]=g}_.splice(1,0,b),a.splice(1,0,w),d=-1;const k=[];for(;++d<_.length;){const x=_[d],S=a[d];c=-1;const m=[];for(;++c<h;){const p=x[c]||"";let g="",E="";if(l.alignDelimiters!==!1){const R=u[c]-(S[c]||0),A=C[c];A===114?g=" ".repeat(R):A===99?R%2?(g=" ".repeat(R/2+.5),E=" ".repeat(R/2-.5)):(g=" ".repeat(R/2),E=g):E=" ".repeat(R)}l.delimiterStart!==!1&&!c&&m.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&p==="")&&(l.delimiterStart!==!1||c)&&m.push(" "),l.alignDelimiters!==!1&&m.push(g),m.push(p),l.alignDelimiters!==!1&&m.push(E),l.padding!==!1&&m.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&m.push("|")}k.push(l.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return k.join(`
|
|
75
|
-
`)}function YC(n){return n==null?"":String(n)}function A_(n){const s=typeof n=="string"?n.codePointAt(0):0;return s===67||s===99?99:s===76||s===108?108:s===82||s===114?114:0}function WC(n,s,l,o){const v=l.enter("blockquote"),C=l.createTracker(o);C.move("> "),C.shift(2);const _=l.indentLines(l.containerFlow(n,C.current()),KC);return v(),_}function KC(n,s,l){return">"+(l?"":" ")+n}function XC(n,s){return T_(n,s.inConstruct,!0)&&!T_(n,s.notInConstruct,!1)}function T_(n,s,l){if(typeof s=="string"&&(s=[s]),!s||s.length===0)return l;let o=-1;for(;++o<s.length;)if(n.includes(s[o]))return!0;return!1}function D_(n,s,l,o){let v=-1;for(;++v<l.unsafe.length;)if(l.unsafe[v].character===`
|
|
76
|
-
`&&XC(l.stack,l.unsafe[v]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
77
|
-
`}function $C(n,s){const l=String(n);let o=l.indexOf(s),v=o,C=0,_=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===v?++C>_&&(_=C):C=1,v=o+s.length,o=l.indexOf(s,v);return _}function QC(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 ZC(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 JC(n,s,l,o){const v=ZC(l),C=n.value||"",_=v==="`"?"GraveAccent":"Tilde";if(QC(n,l)){const c=l.enter("codeIndented"),b=l.indentLines(C,ew);return c(),b}const a=l.createTracker(o),u=v.repeat(Math.max($C(C,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
|
-
`),C&&(d+=a.move(C+`
|
|
80
|
-
`)),d+=a.move(u),h(),d}function ew(n,s,l){return(l?"":" ")+n}function Dc(n){const s=n.options.quote||'"';if(s!=='"'&&s!=="'")throw new Error("Cannot serialize title with `"+s+"` for `options.quote`, expected `\"`, or `'`");return s}function tw(n,s,l,o){const v=Dc(l),C=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${C}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),a()),_(),h}function nw(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 ua(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}}wm.peek=iw;function wm(n,s,l,o){const v=nw(l),C=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=ua(o.before.charCodeAt(o.before.length-1),h,v);d.inside&&(u=Bs(h)+u.slice(1));const c=u.charCodeAt(u.length-1),b=ua(o.after.charCodeAt(0),c,v);b.inside&&(u=u.slice(0,-1)+Bs(c));const w=_.move(v);return C(),l.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},a+u+w}function iw(n,s,l){return l.options.emphasis||"*"}function rw(n,s){let l=!1;return Ac(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return l=!0,ac}),!!((!n.depth||n.depth<3)&&yc(n)&&(s.options.setext||l))}function sw(n,s,l,o){const v=Math.max(Math.min(6,n.depth||1),1),C=l.createTracker(o);if(rw(n,l)){const d=l.enter("headingSetext"),c=l.enter("phrasing"),b=l.containerPhrasing(n,{...C.current(),before:`
|
|
82
|
-
`,after:`
|
|
83
|
-
`});return c(),d(),b+`
|
|
84
|
-
`+(v===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
85
|
-
`))+1))}const _="#".repeat(v),a=l.enter("headingAtx"),u=l.enter("phrasing");C.move(_+" ");let h=l.containerPhrasing(n,{before:"# ",after:`
|
|
86
|
-
`,...C.current()});return/^[\t ]/.test(h)&&(h=Bs(h.charCodeAt(0))+h.slice(1)),h=h?_+" "+h:_,l.options.closeAtx&&(h+=" "+_),u(),a(),h}xm.peek=lw;function xm(n){return n.value||""}function lw(){return"<"}Em.peek=aw;function Em(n,s,l,o){const v=Dc(l),C=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${C}`),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 aw(){return"!"}km.peek=ow;function km(n,s,l,o){const v=n.referenceType,C=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,C(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function ow(){return"!"}Am.peek=uw;function Am(n,s,l){let o=n.value||"",v="`",C=-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+" ");++C<l.unsafe.length;){const _=l.unsafe[C],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 uw(){return"`"}function Tm(n,s){const l=yc(n);return!!(!s.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(l===n.url||"mailto:"+l===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}Dm.peek=cw;function Dm(n,s,l,o){const v=Dc(l),C=v==='"'?"Quote":"Apostrophe",_=l.createTracker(o);let a,u;if(Tm(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${C}`),h+=_.move(" "+v),h+=_.move(l.safe(n.title,{before:h,after:v,..._.current()})),h+=_.move(v),u()),h+=_.move(")"),a(),h}function cw(n,s,l){return Tm(n,l)?"<":"["}Rm.peek=hw;function Rm(n,s,l,o){const v=n.referenceType,C=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,C(),v==="full"||!h||h!==c?u+=a.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function hw(){return"["}function Rc(n){const s=n.options.bullet||"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bullet`, expected `*`, `+`, or `-`");return s}function fw(n){const s=Rc(n),l=n.options.bulletOther;if(!l)return s==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===s)throw new Error("Expected `bullet` (`"+s+"`) and `bulletOther` (`"+l+"`) to be different");return l}function dw(n){const s=n.options.bulletOrdered||".";if(s!=="."&&s!==")")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOrdered`, expected `.` or `)`");return s}function Lm(n){const s=n.options.rule||"*";if(s!=="*"&&s!=="-"&&s!=="_")throw new Error("Cannot serialize rules with `"+s+"` for `options.rule`, expected `*`, `-`, or `_`");return s}function pw(n,s,l,o){const v=l.enter("list"),C=l.bulletCurrent;let _=n.ordered?dw(l):Rc(l);const a=n.ordered?_==="."?")":".":fw(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),Lm(l)===_&&d){let c=-1;for(;++c<n.children.length;){const b=n.children[c];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(_=a),l.bulletCurrent=_;const h=l.containerFlow(n,o);return l.bulletLastUsed=_,l.bulletCurrent=C,v(),h}function _w(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 mw(n,s,l,o){const v=_w(l);let C=l.bulletCurrent||Rc(l);s&&s.type==="list"&&s.ordered&&(C=(typeof s.start=="number"&&s.start>-1?s.start:1)+(l.options.incrementListMarker===!1?0:s.children.indexOf(n))+C);let _=C.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(C+" ".repeat(_-C.length)),a.shift(_);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(n,a.current()),d);return u(),h;function d(c,b,w){return b?(w?"":" ".repeat(_))+c:(w?C:C+" ".repeat(_-C.length))+c}}function gw(n,s,l,o){const v=l.enter("paragraph"),C=l.enter("phrasing"),_=l.containerPhrasing(n,o);return C(),v(),_}const vw=pa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sw(n,s,l,o){return(n.children.some(function(_){return vw(_)})?l.containerPhrasing:l.containerFlow).call(l,n,o)}function yw(n){const s=n.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}Mm.peek=bw;function Mm(n,s,l,o){const v=yw(l),C=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=ua(o.before.charCodeAt(o.before.length-1),h,v);d.inside&&(u=Bs(h)+u.slice(1));const c=u.charCodeAt(u.length-1),b=ua(o.after.charCodeAt(0),c,v);b.inside&&(u=u.slice(0,-1)+Bs(c));const w=_.move(v+v);return C(),l.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},a+u+w}function bw(n,s,l){return l.options.strong||"*"}function Cw(n,s,l,o){return l.safe(n.value,o)}function ww(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 xw(n,s,l){const o=(Lm(l)+(l.options.ruleSpaces?" ":"")).repeat(ww(l));return l.options.ruleSpaces?o.slice(0,-1):o}const Om={blockquote:WC,break:D_,code:JC,definition:tw,emphasis:wm,hardBreak:D_,heading:sw,html:xm,image:Em,imageReference:km,inlineCode:Am,link:Dm,linkReference:Rm,list:pw,listItem:mw,paragraph:gw,root:Sw,strong:Mm,text:Cw,thematicBreak:xw};function Ew(){return{enter:{table:kw,tableData:R_,tableHeader:R_,tableRow:Tw},exit:{codeText:Dw,table:Aw,tableData:ec,tableHeader:ec,tableRow:ec}}}function kw(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 Aw(n){this.exit(n),this.data.inTable=void 0}function Tw(n){this.enter({type:"tableRow",children:[]},n)}function ec(n){this.exit(n)}function R_(n){this.enter({type:"tableCell",children:[]},n)}function Dw(n){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,Rw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(n)}function Rw(n,s){return s==="|"?s:n}function Lw(n){const s=n||{},l=s.tableCellPadding,o=s.tablePipeAlign,v=s.stringLength,C=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:b,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 m=c(w,x,S),p=h([m]);return p.slice(0,p.indexOf(`
|
|
88
|
-
`))}function u(w,k,x,S){const m=x.enter("tableCell"),p=x.enter("phrasing"),g=x.containerPhrasing(w,{...S,before:C,after:C});return p(),m(),g}function h(w,k){return GC(w,{align:k,alignDelimiters:o,padding:l,stringLength:v})}function d(w,k,x){const S=w.children;let m=-1;const p=[],g=k.enter("table");for(;++m<S.length;)p[m]=c(S[m],k,x);return g(),p}function c(w,k,x){const S=w.children;let m=-1;const p=[],g=k.enter("tableRow");for(;++m<S.length;)p[m]=u(S[m],w,k,x);return g(),p}function b(w,k,x){let S=Om.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Mw(){return{exit:{taskListCheckValueChecked:L_,taskListCheckValueUnchecked:L_,paragraph:Bw}}}function Ow(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zw}}}function L_(n){const s=this.stack[this.stack.length-2];s.type,s.checked=n.type==="taskListCheckValueChecked"}function Bw(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 C=-1,_;for(;++C<v.length;){const a=v[C];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 zw(n,s,l,o){const v=n.children[0],C=typeof n.checked=="boolean"&&v&&v.type==="paragraph",_="["+(n.checked?"x":" ")+"] ",a=l.createTracker(o);C&&a.move(_);let u=Om.listItem(n,s,l,{...o,...a.current()});return C&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(d){return d+_}}function Hw(){return[pC(),zC(),UC(),Ew(),Mw()]}function Nw(n){return{extensions:[_C(),HC(n),IC(),Lw(n),Ow()]}}const jw={tokenize:Vw,partial:!0},Bm={tokenize:Gw,partial:!0},zm={tokenize:Yw,partial:!0},Hm={tokenize:Ww,partial:!0},Uw={tokenize:Kw,partial:!0},Nm={name:"wwwAutolink",tokenize:Fw,previous:Um},jm={name:"protocolAutolink",tokenize:qw,previous:Im},Vn={name:"emailAutolink",tokenize:Pw,previous:Pm},xn={};function Iw(){return{text:xn}}let Ni=48;for(;Ni<123;)xn[Ni]=Vn,Ni++,Ni===58?Ni=65:Ni===91&&(Ni=97);xn[43]=Vn;xn[45]=Vn;xn[46]=Vn;xn[95]=Vn;xn[72]=[Vn,jm];xn[104]=[Vn,jm];xn[87]=[Vn,Nm];xn[119]=[Vn,Nm];function Pw(n,s,l){const o=this;let v,C;return _;function _(c){return!hc(c)||!Pm.call(o,o.previous)||Lc(o.events)?l(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(c))}function a(c){return hc(c)?(n.consume(c),a):c===64?(n.consume(c),u):l(c)}function u(c){return c===46?n.check(Uw,d,h)(c):c===45||c===95||Dt(c)?(C=!0,n.consume(c),u):d(c)}function h(c){return n.consume(c),v=!0,u}function d(c){return C&&v&&Mt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),s(c)):l(c)}}function Fw(n,s,l){const o=this;return v;function v(_){return _!==87&&_!==119||!Um.call(o,o.previous)||Lc(o.events)?l(_):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(jw,n.attempt(Bm,n.attempt(zm,C),l),l)(_))}function C(_){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),s(_)}}function qw(n,s,l){const o=this;let v="",C=!1;return _;function _(c){return(c===72||c===104)&&Im.call(o,o.previous)&&!Lc(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),v+=String.fromCodePoint(c),n.consume(c),a):l(c)}function a(c){if(Mt(c)&&v.length<5)return v+=String.fromCodePoint(c),n.consume(c),a;if(c===58){const b=v.toLowerCase();if(b==="http"||b==="https")return n.consume(c),u}return l(c)}function u(c){return c===47?(n.consume(c),C?h:(C=!0,u)):l(c)}function h(c){return c===null||la(c)||tt(c)||ji(c)||ha(c)?l(c):n.attempt(Bm,n.attempt(zm,d),l)(c)}function d(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),s(c)}}function Vw(n,s,l){let o=0;return v;function v(_){return(_===87||_===119)&&o<3?(o++,n.consume(_),v):_===46&&o===3?(n.consume(_),C):l(_)}function C(_){return _===null?l(_):s(_)}}function Gw(n,s,l){let o,v,C;return _;function _(h){return h===46||h===95?n.check(Hm,u,a)(h):h===null||tt(h)||ji(h)||h!==45&&ha(h)?u(h):(C=!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||!C?l(h):s(h)}}function Yw(n,s){let l=0,o=0;return v;function v(_){return _===40?(l++,n.consume(_),v):_===41&&o<l?C(_):_===33||_===34||_===38||_===39||_===41||_===42||_===44||_===46||_===58||_===59||_===60||_===63||_===93||_===95||_===126?n.check(Hm,s,C)(_):_===null||tt(_)||ji(_)?s(_):(n.consume(_),v)}function C(_){return _===41&&o++,n.consume(_),v}}function Ww(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),C):a===93?(n.consume(a),v):a===60||a===null||tt(a)||ji(a)?s(a):l(a)}function v(a){return a===null||a===40||a===91||tt(a)||ji(a)?s(a):o(a)}function C(a){return Mt(a)?_(a):l(a)}function _(a){return a===59?(n.consume(a),o):Mt(a)?(n.consume(a),_):l(a)}}function Kw(n,s,l){return o;function o(C){return n.consume(C),v}function v(C){return Dt(C)?l(C):s(C)}}function Um(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||tt(n)}function Im(n){return!Mt(n)}function Pm(n){return!(n===47||hc(n))}function hc(n){return n===43||n===45||n===46||n===95||Dt(n)}function Lc(n){let s=n.length,l=!1;for(;s--;){const o=n[s][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){l=!0;break}if(o._gfmAutolinkLiteralWalkedInto){l=!1;break}}return n.length>0&&!l&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const Xw={tokenize:ix,partial:!0};function $w(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ex,continuation:{tokenize:tx},exit:nx}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Qw,resolveTo:Zw}}}}function Qw(n,s,l){const o=this;let v=o.events.length;const C=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=_n(o.sliceSerialize({start:_.end,end:o.now()}));return h.codePointAt(0)!==94||!C.includes(h.slice(1))?l(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),s(u))}}function Zw(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 C={type:"gfmFootnoteCallString",start:Object.assign({},v.end),end:Object.assign({},n[n.length-1][1].start)},_={type:"chunkString",contentType:"string",start:Object.assign({},C.start),end:Object.assign({},C.end)},a=[n[l+1],n[l+2],["enter",o,s],n[l+3],n[l+4],["enter",v,s],["exit",v,s],["enter",C,s],["enter",_,s],["exit",_,s],["exit",C,s],n[n.length-2],n[n.length-1],["exit",o,s]];return n.splice(l,n.length-l+1,...a),n}function Jw(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let C=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(C>999||c===93&&!_||c===null||c===91||tt(c))return l(c);if(c===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return v.includes(_n(o.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),s):l(c)}return tt(c)||(_=!0),C++,n.consume(c),c===92?d:h}function d(c){return c===91||c===92||c===93?(n.consume(c),C++,h):h(c)}}function ex(n,s,l){const o=this,v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let C,_=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||tt(k))return l(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return C=_n(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return tt(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 b(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),v.includes(C)||v.push(C),qe(n,w,"gfmFootnoteDefinitionWhitespace")):l(k)}function w(k){return s(k)}}function tx(n,s,l){return n.check(Hs,s,n.attempt(Xw,s,l))}function nx(n){n.exit("gfmFootnoteDefinition")}function ix(n,s,l){const o=this;return qe(n,v,"gfmFootnoteDefinitionIndent",5);function v(C){const _=o.events[o.events.length-1];return _&&_[1].type==="gfmFootnoteDefinitionIndent"&&_[2].sliceSerialize(_[1],!0).length===4?s(C):l(C)}}function rx(n){let l=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:C,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)},b=[["enter",d,a],["enter",_[h][1],a],["exit",_[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&Zt(b,b.length,0,fa(w,_.slice(h+1,u),a)),Zt(b,b.length,0,[["exit",c,a],["enter",_[u][1],a],["exit",_[u][1],a],["exit",d,a]]),Zt(_,h-1,u-h+3,b),u=h+b.length-2;break}}for(u=-1;++u<_.length;)_[u][1].type==="strikethroughSequenceTemporary"&&(_[u][1].type="data");return _}function C(_,a,u){const h=this.previous,d=this.events;let c=0;return b;function b(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"),m=Rr(k);return S._open=!m||m===2&&!!x,S._close=!x||x===2&&!!m,a(k)}}}class sx{constructor(){this.map=[]}add(s,l,o){lx(this,s,l,o)}consume(s){if(this.map.sort(function(C,_){return C[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 C of v)s.push(C);v=o.pop()}this.map.length=0}}function lx(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 ax(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 C=o.length-1;o[C]=o[C]==="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 ox(){return{flow:{null:{name:"table",tokenize:ux,resolveAll:cx}}}}function ux(n,s,l){const o=this;let v=0,C=0,_;return a;function a(N){let q=o.events.length-1;for(;q>-1;){const Q=o.events[q][1].type;if(Q==="lineEnding"||Q==="linePrefix")q--;else break}const G=q>-1?o.events[q][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,C+=1),d(N)}function d(N){return N===null?l(N):xe(N)?C>1?(C=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):l(N):Ne(N)?qe(n,d,"whitespace")(N):(C+=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||tt(N)?(n.exit("data"),d(N)):(n.consume(N),N===92?b:c)}function b(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,Ne(N)?qe(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 Ne(N)?qe(n,S,"whitespace")(N):S(N)}function S(N){return N===58?(C+=1,_=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),m):N===45?(C+=1,m(N)):N===null||xe(N)?E(N):R(N)}function m(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"),g):(n.exit("tableDelimiterFiller"),g(N))}function g(N){return Ne(N)?qe(n,E,"whitespace")(N):E(N)}function E(N){return N===124?k(N):N===null||xe(N)?!_||v!==C?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||xe(N)?(n.exit("tableRow"),s(N)):Ne(N)?qe(n,L,"whitespace")(N):(n.enter("data"),T(N))}function T(N){return N===null||N===124||tt(N)?(n.exit("data"),L(N)):(n.consume(N),N===92?z:T)}function z(N){return N===92||N===124?(n.consume(N),T):T(N)}}function cx(n,s){let l=-1,o=!0,v=0,C=[0,0,0,0],_=[0,0,0,0],a=!1,u=0,h,d,c;const b=new sx;for(;++l<n.length;){const w=n[l],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,u!==0&&(M_(b,s,u,h,d),d=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",h,s]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,c=void 0,C=[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)},b.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&&(C[1]!==0&&(_[0]=_[1],c=ia(b,s,C,v,void 0,c),C=[0,0,0,0]),_[2]=l)):k.type==="tableCellDivider"&&(o?o=!1:(C[1]!==0&&(_[0]=_[1],c=ia(b,s,C,v,void 0,c)),C=_,_=[C[1],l,0,0])):k.type==="tableHead"?(a=!0,u=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=l,C[1]!==0?(_[0]=_[1],c=ia(b,s,C,v,l,c)):_[1]!==0&&(c=ia(b,s,_,v,l,c)),v=0):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(_[3]=l)}for(u!==0&&M_(b,s,u,h,d),b.consume(s.events),l=-1;++l<s.events.length;){const w=s.events[l];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=ax(s.events,l))}return n}function ia(n,s,l,o,v,C){const _=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";l[0]!==0&&(C.end=Object.assign({},Ar(s.events,l[0])),n.add(l[0],0,[["exit",C,s]]));const u=Ar(s.events,l[1]);if(C={type:_,start:Object.assign({},u),end:Object.assign({},u)},n.add(l[1],0,[["enter",C,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 b=s.events[l[2]],w=s.events[l[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[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&&(C.end=Object.assign({},Ar(s.events,v)),n.add(v,0,[["exit",C,s]]),C=void 0),C}function M_(n,s,l,o,v){const C=[],_=Ar(s.events,l);v&&(v.end=Object.assign({},_),C.push(["exit",v,s])),o.end=Object.assign({},_),C.push(["exit",o,s]),n.add(l+1,0,C)}function Ar(n,s){const l=n[s],o=l[0]==="enter"?"start":"end";return l[1][o]}const hx={name:"tasklistCheck",tokenize:dx};function fx(){return{text:{91:hx}}}function dx(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"),C)}function C(u){return tt(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 xe(u)?s(u):Ne(u)?n.check({tokenize:px},s,l)(u):l(u)}}function px(n,s,l){return qe(n,o,"whitespace");function o(v){return v===null?l(v):s(v)}}function _x(n){return Z_([Iw(),$w(),rx(n),ox(),fx()])}const mx={};function gx(n){const s=this,l=n||mx,o=s.data(),v=o.micromarkExtensions||(o.micromarkExtensions=[]),C=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),_=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);v.push(_x(l)),C.push(Hw()),_.push(Nw(l))}function vx({settings:n,busy:s=!1,promptPreviews:l,testResult:o,onSave:v,onTest:C,onClose:_}){const[a,u]=me.useState(n),[h,d]=me.useState(n.apiKey??"");return me.useEffect(()=>{u(n),d(n.apiKey??"")},[n]),I.jsx("div",{className:"modal-backdrop",children:I.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[I.jsxs("header",{children:[I.jsxs("div",{children:[I.jsx("h2",{children:"Translation Settings"}),I.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),I.jsx("button",{type:"button",onClick:_,children:"Close"})]}),I.jsxs("div",{className:"translation-settings-grid",children:[I.jsxs("label",{children:[I.jsx("span",{children:"Base URL"}),I.jsx("input",{value:a.baseUrl,onChange:c=>u({...a,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),I.jsxs("label",{children:[I.jsx("span",{children:"API key"}),I.jsx("input",{value:h,onChange:c=>d(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),I.jsxs("label",{children:[I.jsx("span",{children:"Model"}),I.jsx("input",{value:a.model,onChange:c=>u({...a,model:c.target.value})})]}),I.jsxs("label",{children:[I.jsx("span",{children:"Target language"}),I.jsx("input",{value:a.targetLanguage,onChange:c=>u({...a,targetLanguage:c.target.value})})]}),I.jsxs("label",{children:[I.jsx("span",{children:"Use context"}),I.jsx("input",{checked:a.contextEnabled,type:"checkbox",onChange:c=>u({...a,contextEnabled:c.target.checked})})]}),I.jsxs("label",{children:[I.jsx("span",{children:"Timeout ms"}),I.jsx("input",{min:3e3,type:"number",value:a.requestTimeoutMs,onChange:c=>u({...a,requestTimeoutMs:Number(c.target.value)})})]}),I.jsxs("label",{children:[I.jsx("span",{children:"Temperature"}),I.jsx("input",{min:0,max:1,step:.1,type:"number",value:a.temperature,onChange:c=>u({...a,temperature:Number(c.target.value)})})]})]}),I.jsxs("section",{className:"translation-prompt-settings",children:[I.jsxs("header",{children:[I.jsxs("div",{children:[I.jsx("h3",{children:"Translation Prompts"}),I.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),I.jsx("button",{type:"button",disabled:s,onClick:()=>u({...a,prompts:void 0}),children:"Reset prompts"})]}),I.jsx("div",{className:"translation-prompt-stack",children:l.map(c=>I.jsxs("label",{children:[I.jsx("span",{children:c.label}),I.jsx("textarea",{value:yx(a,c),onChange:b=>u({...a,prompts:Sx(a.prompts,c.key,b.target.value,c.defaultPrompt)})})]},c.key))})]}),o?I.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,I.jsxs("footer",{children:[I.jsx("button",{type:"button",disabled:s,onClick:C,children:"Test Connection"}),I.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 Sx(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 yx(n,s){var l;return((l=n.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function bx({active:n=!0,taskSlug:s,role:l,sessionId:o}){const[v,C]=me.useState(null),[_,a]=me.useState([]),[u,h]=me.useState(""),[d,c]=me.useState(!1),[b,w]=me.useState(!1),[k,x]=me.useState(!1),[S,m]=me.useState("ready"),[p,g]=me.useState(""),[E,R]=me.useState(Date.now()),[A,L]=me.useState(!1),[T,z]=me.useState(""),[N,q]=me.useState(!1),[G,V]=me.useState([]),[Q,Y]=me.useState(),[F,X]=me.useState(0),ee=me.useRef(n),O=me.useRef(1),M=me.useRef(null);me.useEffect(()=>{ee.current=n},[n]),me.useEffect(()=>{Promise.all([De.getTranslationSettings(),De.getTranslationPrompts()]).then(([Z,pe])=>{C(Z),V(pe)}).catch(Z=>z(Z.message))},[]),me.useEffect(()=>{a([]),z(""),m("ready"),g(""),O.current=1;let Z=!1,pe;const _e=()=>{Z||(pe=window.setTimeout(Ae,ee.current?200:1e3))},Ae=async()=>{if(!Z)try{const ue=await De.pollTranslationSession(o,O.current);if(Z)return;H(ue.events),O.current=ue.nextCursor,m(ue.status),ee.current&&g(Dx(new Date().toISOString()))}catch(ue){Z||z(ue instanceof Error?ue.message:"Translation poll failed.")}finally{_e()}};return De.startTranslationSession(s,l).then(ue=>{Z||(m(ue.status),O.current=ue.nextCursor,Ae())}).catch(ue=>{Z||z(ue instanceof Error?ue.message:"Translation start failed.")}),()=>{Z=!0,pe!==void 0&&window.clearTimeout(pe)}},[o,s,l,F]),me.useEffect(()=>{var Z;n&&((Z=M.current)==null||Z.scrollIntoView({block:"nearest"}))},[n,_.length]);const B=wx(_);me.useEffect(()=>{if(!B)return;R(Date.now());const Z=window.setInterval(()=>R(Date.now()),250);return()=>window.clearInterval(Z)},[B]);async function P(Z=!1){if(v){L(!0),z(""),c(!1);try{const pe=await De.translateUserInput(s,l,{text:u,mode:Z?"auto-send":"review-before-send",useContext:v.contextEnabled,send:Z});x(pe.contextUsed),pe.sent?(h(""),c(!1)):(h(pe.englishPreview),c(!0))}catch(pe){z(pe instanceof Error?pe.message:"Translation failed.")}finally{L(!1)}}}function H(Z){if(Z.length===0)return;for(const _e of Z)_e.type==="status"?m(_e.status):_e.type==="error"&&z(_e.message);const pe=Z.filter(_e=>_e.type==="entry");pe.length>0&&a(_e=>pe.reduce((Ae,ue)=>Ax(Ae,ue.entry),_e))}async function ie(){if(u.trim()){L(!0),z("");try{await De.sendTranslatedInput(s,l,{englishText:u}),h(""),c(!1),x(!1)}catch(Z){z(Z instanceof Error?Z.message:"Failed to send English input.")}finally{L(!1)}}}function fe(Z){Z.key!=="Enter"||Z.shiftKey||Z.nativeEvent.isComposing||(Z.preventDefault(),!A&&u.trim()&&(d?ie():P(b)))}async function de(Z,pe){L(!0),z("");try{const _e=await De.updateTranslationSettings({...Z,...pe!==void 0?{apiKey:pe}:{}}),Ae=await De.getTranslationPrompts();C(_e),V(Ae),q(!1),X(ue=>ue+1)}catch(_e){z(_e instanceof Error?_e.message:"Failed to save translation settings.")}finally{L(!1)}}async function K(){L(!0),z("");try{Y(await De.testTranslationProvider())}catch(Z){z(Z instanceof Error?Z.message:"Provider test failed.")}finally{L(!1)}}async function U(){a([]),O.current=1,await De.clearTranslationSession(o).catch(Z=>z(Z.message))}if(!v)return I.jsx("aside",{className:"translation-panel",children:I.jsx("p",{className:"muted",children:"Loading translation settings..."})});const le=xx(_,S,E);return I.jsxs("aside",{className:"translation-panel",children:[I.jsxs("header",{className:"translation-panel-header",children:[I.jsxs("div",{className:"translation-panel-titlebar",children:[I.jsx("h2",{children:"Translation"}),I.jsxs("div",{className:"translation-panel-actions",children:[I.jsx("button",{"aria-pressed":b,className:`auto-send-toggle${b?" is-active":""}`,type:"button",onClick:()=>w(Z=>!Z),children:b?"✅ Auto-send":"× Auto-send"}),I.jsx("button",{type:"button",onClick:()=>q(!0),children:"Settings"}),I.jsx("button",{type:"button",onClick:()=>void U(),children:"Clear"})]})]}),I.jsxs("div",{className:"translation-status-row",children:[I.jsxs("p",{children:[v.model," · ",le,k?" · context used":""]}),I.jsx("p",{children:p?`poll ${p}`:"poll -"})]})]}),T?I.jsx("div",{className:"error-banner",children:T}):null,I.jsxs("div",{className:"translation-entry-list",children:[_.length===0?I.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,_.map(Z=>I.jsx(Cx,{entry:Z},Z.id)),I.jsx("div",{ref:M})]}),I.jsx("div",{className:"translation-composer",children:I.jsxs("div",{className:"translation-composer-row",children:[I.jsx("textarea",{value:u,onChange:Z=>{h(Z.target.value),Z.target.value.trim()||c(!1)},onKeyDown:fe,placeholder:"输入中文,先翻译成英文工程指令..."}),I.jsx("div",{className:"translation-composer-actions",children:I.jsx("button",{type:"button",disabled:A||!d||!u.trim(),onClick:()=>void ie(),children:"Send English"})})]})}),N?I.jsx(vx,{settings:v,busy:A,promptPreviews:G,testResult:Q,onSave:de,onTest:K,onClose:()=>q(!1)}):null]})}function Cx({entry:n}){const s=kx(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 I.jsxs("article",{className:v,children:[l?I.jsx("pre",{children:s}):I.jsx("div",{className:"translation-markdown",children:I.jsx(rC,{remarkPlugins:[gx],children:s})}),n.warning?I.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?I.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function wx(n){const s=n.find(Fm);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function xx(n,s,l){const o=n.find(Fm);if(o)return`translating ${Tx(Math.max(0,l-Ex(o)))}`;const v=n.at(-1);return(v==null?void 0:v.status)==="failed"||s==="failed"?"error":s}function Fm(n){return n.status==="queued"||n.status==="translating"}function Ex(n){const s=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(s)?s:Date.now()}function kx(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function Ax(n,s){return n.findIndex(o=>o.id===s.id)===-1?[...n,s]:n.map(o=>o.id===s.id?s:o)}function Tx(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 Dx(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function Rx({role:n,session:s,permissionMode:l,active:o=!0,busy:v,orchestrationMode:C,translationEnabled:_,onPermissionModeChange:a,onOrchestrationModeChange:u,onStart:h,onResume:d,onStop:c,onRestart:b,onTerminalEvent:w}){const k=C==="auto";return I.jsxs("section",{className:"session-console",children:[I.jsxs("div",{className:"session-console-top",children:[I.jsx(G0,{role:n,session:s,permissionMode:l,busy:v,onPermissionModeChange:a,onStart:h,onResume:d,onStop:c,onRestart:b}),I.jsx("div",{className:"session-console-actions",children:I.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"?I.jsx(Lx,{active:o,onTerminalEvent:w,role:n,session:s,taskSlug:s.taskSlug,translationEnabled:_}):I.jsxs("div",{className:"terminal-empty",children:[I.jsx("strong",{children:n}),I.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 Lx({active:n,onTerminalEvent:s,role:l,session:o,taskSlug:v,translationEnabled:C}){return I.jsxs("div",{className:C?"session-console-body has-translation":"session-console-body",children:[I.jsx("div",{className:"terminal-pane",children:I.jsx(H_,{sessionId:o.id,active:n,onEvent:s},o.id)}),C?I.jsx("div",{className:"translation-pane",children:I.jsx(bx,{active:n,taskSlug:v,role:l,sessionId:o.id},o.id)}):null]})}function Mx(n,s,l){var C;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:((C=v.sort(Ox)[v.length-1])==null?void 0:C.toRole)??null}function Ox(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 Bx({task:n,activeRole:s,onTaskChanged:l,onActiveRoleChange:o,onMessagesChanged:v,onOrchestrationChanged:C,onRoundStateChanged:_,onEventsChanged:a}){const[u,h]=me.useState(null),[d,c]=me.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[b,w]=me.useState(!1),[k,x]=me.useState(""),[S,m]=me.useState([]),[p,g]=me.useState(null),[E,R]=me.useState(!1),A=me.useRef(null),L=me.useCallback((Y,F)=>{var O;const X=((O=A.current)==null?void 0:O.taskSlug)===n.taskSlug?A.current.messages:null,ee=Mx(X,Y,F);A.current={taskSlug:n.taskSlug,messages:Y},g(F),v==null||v(Y),C==null||C(F),ee&&(o(ee),G(`auto switched to ${ee} before VCM dispatch`))},[o,v,C,n.taskSlug]),T=me.useCallback((Y,F,X,ee)=>{h(Y),L(F,X),_==null||_(ee)},[L,_]),z=me.useCallback(async()=>{const[Y,F,X,ee]=await Promise.all([De.getTaskStatus(n.taskSlug),De.listMessages(n.taskSlug),De.getOrchestrationState(n.taskSlug),De.getTaskRoundState(n.taskSlug)]);T(Y,F,X,ee)},[T,n.taskSlug]);me.useEffect(()=>{z().catch(Y=>x(Y.message))},[z]),me.useEffect(()=>{m([]),a==null||a([])},[a,n.taskSlug]),me.useEffect(()=>{c(Y=>{let F=!1;const X={...Y};for(const ee of(u==null?void 0:u.sessions)??[])X[ee.role]!==ee.permissionMode&&(X[ee.role]=ee.permissionMode,F=!0);return F?X:Y})},[u==null?void 0:u.sessions]),me.useEffect(()=>{const Y=window.setInterval(()=>{Promise.all([De.getTaskStatus(n.taskSlug),De.listMessages(n.taskSlug),De.getOrchestrationState(n.taskSlug),De.getTaskRoundState(n.taskSlug)]).then(([F,X,ee,O])=>{T(F,X,ee,O)}).catch(F=>x(F.message))},3e3);return()=>window.clearInterval(Y)},[T,n.taskSlug]),me.useEffect(()=>{let Y=!1,F=!1;const X=window.setInterval(()=>{F||(F=!0,Promise.all([De.listMessages(n.taskSlug),De.getOrchestrationState(n.taskSlug)]).then(([ee,O])=>{Y||L(ee,O)}).catch(ee=>{Y||x(ee.message)}).finally(()=>{F=!1}))},200);return()=>{Y=!0,window.clearInterval(X)}},[L,n.taskSlug]);async function N(Y){w(!0),x("");try{await Y(),await z(),await l()}catch(F){x(F instanceof Error?F.message:"Action failed.")}finally{w(!1)}}async function q(){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(X){x(X instanceof Error?X.message:"Close task failed.")}finally{w(!1)}}}function G(Y){m(F=>{const X=[...F,`${new Date().toLocaleTimeString()} ${Y}`];return a==null||a(X),X})}function V(Y,F){c(X=>({...X,[Y]:F}))}async function Q(Y){w(!0),x("");try{const F=await De.updateOrchestrationState(n.taskSlug,{mode:Y});g(F),C==null||C(F),G(`auto orchestration ${Y==="auto"?"enabled":"disabled"}`)}catch(F){x(F instanceof Error?F.message:"Failed to update orchestration mode.")}finally{w(!1)}}return I.jsxs("div",{className:"task-workspace",children:[I.jsxs("header",{className:"workspace-header",children:[I.jsx("div",{className:"workspace-title-line",children:I.jsx("h1",{children:n.title||n.taskSlug})}),I.jsx(V0,{activeRole:s,sessions:(u==null?void 0:u.sessions)??[],onSelect:o}),I.jsxs("div",{className:"workspace-header-actions",children:[I.jsx("button",{"aria-pressed":E,className:`translation-toggle${E?" is-active":""}`,type:"button",onClick:()=>R(Y=>!Y),children:E?"✅ Translate":"× Translate"}),I.jsx("button",{className:"danger-button",type:"button",disabled:b,onClick:()=>void q(),children:"Close Task"})]})]}),k?I.jsx("div",{className:"error-banner",children:k}):null,I.jsx("div",{className:"workspace-grid",children:I.jsx("div",{className:"workspace-main",children:I.jsx("div",{className:"role-console-stack",children:ca.map(Y=>{const F=Y.name,X=F===s,ee=N_((u==null?void 0:u.sessions)??[],F);return I.jsx("div",{className:X?"role-console-panel is-active":"role-console-panel","aria-hidden":!X,children:I.jsx(Rx,{role:F,session:ee,permissionMode:d[F],active:X,busy:b,orchestrationMode:(p==null?void 0:p.mode)??"manual",translationEnabled:E,onPermissionModeChange:O=>V(F,O),onOrchestrationModeChange:O=>void Q(O),onStart:()=>void N(async()=>{await De.startRoleSession(n.taskSlug,F,{cols:100,rows:28,permissionMode:d[F]}),G(`started ${F} with ${d[F]}`)}),onResume:()=>void N(async()=>{await De.resumeRoleSession(n.taskSlug,F,{cols:100,rows:28,permissionMode:d[F]}),G(`resumed ${F} with ${d[F]}`)}),onStop:()=>void N(async()=>{await De.stopRoleSession(n.taskSlug,F),G(`stopped ${F}`)}),onRestart:()=>void N(async()=>{await De.restartRoleSession(n.taskSlug,F,{cols:100,rows:28,permissionMode:d[F]}),G(`restarted ${F} with ${d[F]}`)}),onTerminalEvent:O=>G(`${Y.label}: ${O}`)})},F)})})})})]})}function zx(){const[n,s]=me.useState(null),[l,o]=me.useState([]),[v,C]=me.useState(null),[_,a]=me.useState(null),[u,h]=me.useState(null),[d,c]=me.useState([]),[b,w]=me.useState(null),[k,x]=me.useState(null),[S,m]=me.useState(null),[p,g]=me.useState(null),[E,R]=me.useState("project-manager"),[A,L]=me.useState("system"),[T,z]=me.useState(!0),[N,q]=me.useState(null),[G,V]=me.useState(!1),[Q,Y]=me.useState(!1),[F,X]=me.useState(""),ee=me.useRef({}),O=me.useMemo(()=>g0(d,b),[d,b]),M=me.useCallback((ue,ye=`manual-${Date.now()}`)=>{q({id:ye,text:ue}),Hx(),window.setTimeout(()=>{q(je=>(je==null?void 0:je.id)===ye?null:je)},5e3)},[]),B=me.useCallback(ue=>{O!=null&&O.taskSlug&&x({taskSlug:O.taskSlug,messages:ue})},[O==null?void 0:O.taskSlug]),P=me.useCallback(ue=>{O!=null&&O.taskSlug&&m({taskSlug:O.taskSlug,orchestration:ue})},[O==null?void 0:O.taskSlug]),H=me.useCallback(ue=>{O!=null&&O.taskSlug&&g({taskSlug:O.taskSlug,events:ue})},[O==null?void 0:O.taskSlug]),ie=me.useCallback(ue=>{if(!(O!=null&&O.taskSlug)||ue.taskSlug!==O.taskSlug||ue.status!=="completed"||!ue.completionId||ee.current[ue.taskSlug]===ue.completionId||(ee.current[ue.taskSlug]=ue.completionId,!T))return;const je=ue.activeRole??"role";M(`Round complete: ${je} finished.`,ue.completionId)},[O==null?void 0:O.taskSlug,T,M]);async function fe(){const ue=await De.listTasks();return c(ue),w(ye=>{var je;return ye&&ue.some(Ee=>Ee.taskSlug===ye)?ye:((je=ue[0])==null?void 0:je.taskSlug)??null}),ue}async function de(){const ue=await De.getHarnessStatus();return C(ue),ue}async function K(){const ue=await De.getHarnessBootstrapStatus();return a(ue),ue}async function U(){const ue=await De.getRecentRepositoryPaths();return o(ue),ue}async function le(ue){const[ye,je]=await Promise.all([De.listMessages(ue),De.getOrchestrationState(ue)]);x({taskSlug:ue,messages:ye}),m({taskSlug:ue,orchestration:je})}me.useEffect(()=>{Promise.all([De.getCurrentProject(),De.getRecentRepositoryPaths(),De.getAppPreferences()]).then(async([ue,ye,je])=>{s(ue),o(ye),L(je.themeMode),z(je.roundCompletionAlerts),ue&&await Promise.all([fe(),de(),K()])}).catch(ue=>X(ue.message))},[]),me.useEffect(()=>{const ue=window.matchMedia("(prefers-color-scheme: dark)"),ye=()=>V(ue.matches);return ye(),ue.addEventListener("change",ye),()=>ue.removeEventListener("change",ye)},[]),me.useEffect(()=>{const ue=A==="system"?G?"dark":"light":A;document.documentElement.dataset.theme=ue,document.documentElement.dataset.themeMode=A},[G,A]);async function Z(ue){Y(!0),X("");try{await ue()}catch(ye){X(ye instanceof Error?ye.message:"Action failed.")}finally{Y(!1)}}const pe=k&&k.taskSlug===(O==null?void 0:O.taskSlug)?k.messages:[],_e=S&&S.taskSlug===(O==null?void 0:O.taskSlug)?S.orchestration:null,Ae=p&&p.taskSlug===(O==null?void 0:O.taskSlug)?p.events:[];return I.jsxs(m0,{sidebar:I.jsx(I0,{project:n,recentRepositoryPaths:l,tasks:d,activeTaskSlug:(O==null?void 0:O.taskSlug)??null,messages:pe,orchestration:_e,events:Ae,harnessStatus:v,harnessBootstrapStatus:_,harnessApplyResult:u,busy:Q,onConnect:ue=>Z(async()=>{const ye=await De.connectProject({repoPath:ue});s(ye),h(null),await Promise.all([fe(),de(),K(),U()])}),onRefreshHarness:()=>Z(async()=>{h(null),await Promise.all([de(),K()])}),onApplyHarness:()=>Z(async()=>{const ue=await De.applyHarness();h(ue),await Promise.all([de(),K()])}),onStartHarnessBootstrap:()=>Z(async()=>{const ue=await De.startHarnessBootstrap();a(ue.status)}),onCreateTask:ue=>Z(async()=>{const ye=await De.createTask(ue);await fe(),w(ye.taskSlug)}),onSelectTask:w,themeMode:A,onThemeModeChange:ue=>{L(ue),Z(async()=>{const ye=await De.updateAppPreferences({themeMode:ue});L(ye.themeMode),z(ye.roundCompletionAlerts)})},roundCompletionAlerts:T,onRoundCompletionAlertsChange:ue=>{z(ue),Z(async()=>{const ye=await De.updateAppPreferences({roundCompletionAlerts:ue});L(ye.themeMode),z(ye.roundCompletionAlerts)})},onTryRoundAlert:()=>{M("This is a test round completion alert.")},onMarkAllMessagesDone:ue=>{Z(async()=>{const ye=await De.markAllMessagesDone(ue);x({taskSlug:ue,messages:ye.messages}),await le(ue)})},onDeleteMessageHistory:ue=>{Z(async()=>{const ye=await De.deleteMessageHistory(ue);x({taskSlug:ue,messages:ye.messages}),await le(ue)})}}),children:[F?I.jsx("div",{className:"error-banner",children:F}):null,N?I.jsxs("div",{className:"round-notice",role:"status",children:[I.jsx("strong",{children:"Round complete"}),I.jsx("span",{children:N.text})]}):null,n&&O?I.jsx(Bx,{task:O,activeRole:E,onTaskChanged:async()=>{await fe()},onActiveRoleChange:R,onMessagesChanged:B,onOrchestrationChanged:P,onRoundStateChanged:ie,onEventsChanged:H}):I.jsxs("section",{className:"empty-workspace",children:[I.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),I.jsx("p",{children:n?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]})]})}function Hx(){var s;const n=window.AudioContext??window.webkitAudioContext;if(n)try{const l=new n,o=l.createGain(),v=l.currentTime+.025;o.gain.setValueAtTime(.85,l.currentTime),o.connect(l.destination),O_(l,o,{frequency:587.33,startAt:v,duration:.18,peakGain:.045}),O_(l,o,{frequency:783.99,startAt:v+.11,duration:.28,peakGain:.055}),(s=l.resume)==null||s.call(l).catch(()=>{}),window.setTimeout(()=>{l.close().catch(()=>{})},800)}catch{}}function O_(n,s,l){const o=n.createGain(),v=n.createOscillator(),C=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),C.type="triangle",C.frequency.setValueAtTime(l.frequency*2.01,l.startAt),v.connect(o),C.connect(o),o.connect(s),v.start(l.startAt),C.start(l.startAt),v.stop(_+.02),C.stop(_+.02)}const qm=document.getElementById("root");if(!qm)throw new Error("Missing #root element.");_0.createRoot(qm).render(I.jsx(me.StrictMode,{children:I.jsx(zx,{})}));
|