@chfischerx/puttry 0.1.0 → 0.1.6
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.
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
(function(){const B=document.createElement("link").relList;if(B&&B.supports&&B.supports("modulepreload"))return;for(const U of document.querySelectorAll('link[rel="modulepreload"]'))k(U);new MutationObserver(U=>{for(const K of U)if(K.type==="childList")for(const H of K.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&k(H)}).observe(document,{childList:!0,subtree:!0});function z(U){const K={};return U.integrity&&(K.integrity=U.integrity),U.referrerPolicy&&(K.referrerPolicy=U.referrerPolicy),U.crossOrigin==="use-credentials"?K.credentials="include":U.crossOrigin==="anonymous"?K.credentials="omit":K.credentials="same-origin",K}function k(U){if(U.ep)return;U.ep=!0;const K=z(U);fetch(U.href,K)}})();var rc={exports:{}},fn={};var pd;function qv(){if(pd)return fn;pd=1;var b=Symbol.for("react.transitional.element"),B=Symbol.for("react.fragment");function z(k,U,K){var H=null;if(K!==void 0&&(H=""+K),U.key!==void 0&&(H=""+U.key),"key"in U){K={};for(var u in U)u!=="key"&&(K[u]=U[u])}else K=U;return U=K.ref,{$$typeof:b,type:k,key:H,ref:U!==void 0?U:null,props:K}}return fn.Fragment=B,fn.jsx=z,fn.jsxs=z,fn}var Sd;function Iv(){return Sd||(Sd=1,rc.exports=qv()),rc.exports}var M=Iv(),nc={exports:{}},Ae={};var bd;function Pv(){if(bd)return Ae;bd=1;var b=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),H=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),g=Symbol.iterator;function y(x){return x===null||typeof x!="object"?null:(x=g&&x[g]||x["@@iterator"],typeof x=="function"?x:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,o={};function c(x,L,W){this.props=x,this.context=L,this.refs=o,this.updater=W||D}c.prototype.isReactComponent={},c.prototype.setState=function(x,L){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,L,"setState")},c.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function a(){}a.prototype=c.prototype;function l(x,L,W){this.props=x,this.context=L,this.refs=o,this.updater=W||D}var _=l.prototype=new a;_.constructor=l,v(_,c.prototype),_.isPureReactComponent=!0;var C=Array.isArray;function w(){}var A={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function R(x,L,W){var Z=W.ref;return{$$typeof:b,type:x,key:L,ref:Z!==void 0?Z:null,props:W}}function G(x,L){return R(x.type,L,x.props)}function q(x){return typeof x=="object"&&x!==null&&x.$$typeof===b}function Y(x){var L={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(W){return L[W]})}var j=/\/+/g;function Q(x,L){return typeof x=="object"&&x!==null&&x.key!=null?Y(""+x.key):L.toString(36)}function ae(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(w,w):(x.status="pending",x.then(function(L){x.status==="pending"&&(x.status="fulfilled",x.value=L)},function(L){x.status==="pending"&&(x.status="rejected",x.reason=L)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function P(x,L,W,Z,oe){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var F=!1;if(x===null)F=!0;else switch(he){case"bigint":case"string":case"number":F=!0;break;case"object":switch(x.$$typeof){case b:case B:F=!0;break;case p:return F=x._init,P(F(x._payload),L,W,Z,oe)}}if(F)return oe=oe(x),F=Z===""?"."+Q(x,0):Z,C(oe)?(W="",F!=null&&(W=F.replace(j,"$&/")+"/"),P(oe,L,W,"",function(fe){return fe})):oe!=null&&(q(oe)&&(oe=G(oe,W+(oe.key==null||x&&x.key===oe.key?"":(""+oe.key).replace(j,"$&/")+"/")+F)),L.push(oe)),1;F=0;var N=Z===""?".":Z+":";if(C(x))for(var se=0;se<x.length;se++)Z=x[se],he=N+Q(Z,se),F+=P(Z,L,W,he,oe);else if(se=y(x),typeof se=="function")for(x=se.call(x),se=0;!(Z=x.next()).done;)Z=Z.value,he=N+Q(Z,se++),F+=P(Z,L,W,he,oe);else if(he==="object"){if(typeof x.then=="function")return P(ae(x),L,W,Z,oe);throw L=String(x),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return F}function J(x,L,W){if(x==null)return x;var Z=[],oe=0;return P(x,Z,"","",function(he){return L.call(W,he,oe++)}),Z}function ie(x){if(x._status===-1){var L=x._result;L=L(),L.then(function(W){(x._status===0||x._status===-1)&&(x._status=1,x._result=W)},function(W){(x._status===0||x._status===-1)&&(x._status=2,x._result=W)}),x._status===-1&&(x._status=0,x._result=L)}if(x._status===1)return x._result.default;throw x._result}var E=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},T={map:J,forEach:function(x,L,W){J(x,function(){L.apply(this,arguments)},W)},count:function(x){var L=0;return J(x,function(){L++}),L},toArray:function(x){return J(x,function(L){return L})||[]},only:function(x){if(!q(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Ae.Activity=f,Ae.Children=T,Ae.Component=c,Ae.Fragment=z,Ae.Profiler=U,Ae.PureComponent=l,Ae.StrictMode=k,Ae.Suspense=h,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(x){return A.H.useMemoCache(x)}},Ae.cache=function(x){return function(){return x.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(x,L,W){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var Z=v({},x.props),oe=x.key;if(L!=null)for(he in L.key!==void 0&&(oe=""+L.key),L)!m.call(L,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&L.ref===void 0||(Z[he]=L[he]);var he=arguments.length-2;if(he===1)Z.children=W;else if(1<he){for(var F=Array(he),N=0;N<he;N++)F[N]=arguments[N+2];Z.children=F}return R(x.type,oe,Z)},Ae.createContext=function(x){return x={$$typeof:H,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:K,_context:x},x},Ae.createElement=function(x,L,W){var Z,oe={},he=null;if(L!=null)for(Z in L.key!==void 0&&(he=""+L.key),L)m.call(L,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(oe[Z]=L[Z]);var F=arguments.length-2;if(F===1)oe.children=W;else if(1<F){for(var N=Array(F),se=0;se<F;se++)N[se]=arguments[se+2];oe.children=N}if(x&&x.defaultProps)for(Z in F=x.defaultProps,F)oe[Z]===void 0&&(oe[Z]=F[Z]);return R(x,he,oe)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(x){return{$$typeof:u,render:x}},Ae.isValidElement=q,Ae.lazy=function(x){return{$$typeof:p,_payload:{_status:-1,_result:x},_init:ie}},Ae.memo=function(x,L){return{$$typeof:d,type:x,compare:L===void 0?null:L}},Ae.startTransition=function(x){var L=A.T,W={};A.T=W;try{var Z=x(),oe=A.S;oe!==null&&oe(W,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(w,E)}catch(he){E(he)}finally{L!==null&&W.types!==null&&(L.types=W.types),A.T=L}},Ae.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Ae.use=function(x){return A.H.use(x)},Ae.useActionState=function(x,L,W){return A.H.useActionState(x,L,W)},Ae.useCallback=function(x,L){return A.H.useCallback(x,L)},Ae.useContext=function(x){return A.H.useContext(x)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(x,L){return A.H.useDeferredValue(x,L)},Ae.useEffect=function(x,L){return A.H.useEffect(x,L)},Ae.useEffectEvent=function(x){return A.H.useEffectEvent(x)},Ae.useId=function(){return A.H.useId()},Ae.useImperativeHandle=function(x,L,W){return A.H.useImperativeHandle(x,L,W)},Ae.useInsertionEffect=function(x,L){return A.H.useInsertionEffect(x,L)},Ae.useLayoutEffect=function(x,L){return A.H.useLayoutEffect(x,L)},Ae.useMemo=function(x,L){return A.H.useMemo(x,L)},Ae.useOptimistic=function(x,L){return A.H.useOptimistic(x,L)},Ae.useReducer=function(x,L,W){return A.H.useReducer(x,L,W)},Ae.useRef=function(x){return A.H.useRef(x)},Ae.useState=function(x){return A.H.useState(x)},Ae.useSyncExternalStore=function(x,L,W){return A.H.useSyncExternalStore(x,L,W)},Ae.useTransition=function(){return A.H.useTransition()},Ae.version="19.2.4",Ae}var yd;function pc(){return yd||(yd=1,nc.exports=Pv()),nc.exports}var ne=pc(),ac={exports:{}},dn={},lc={exports:{}},oc={};var Cd;function Gv(){return Cd||(Cd=1,(function(b){function B(P,J){var ie=P.length;P.push(J);e:for(;0<ie;){var E=ie-1>>>1,T=P[E];if(0<U(T,J))P[E]=J,P[ie]=T,ie=E;else break e}}function z(P){return P.length===0?null:P[0]}function k(P){if(P.length===0)return null;var J=P[0],ie=P.pop();if(ie!==J){P[0]=ie;e:for(var E=0,T=P.length,x=T>>>1;E<x;){var L=2*(E+1)-1,W=P[L],Z=L+1,oe=P[Z];if(0>U(W,ie))Z<T&&0>U(oe,W)?(P[E]=oe,P[Z]=ie,E=Z):(P[E]=W,P[L]=ie,E=L);else if(Z<T&&0>U(oe,ie))P[E]=oe,P[Z]=ie,E=Z;else break e}}return J}function U(P,J){var ie=P.sortIndex-J.sortIndex;return ie!==0?ie:P.id-J.id}if(b.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var K=performance;b.unstable_now=function(){return K.now()}}else{var H=Date,u=H.now();b.unstable_now=function(){return H.now()-u}}var h=[],d=[],p=1,f=null,g=3,y=!1,D=!1,v=!1,o=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(P){for(var J=z(d);J!==null;){if(J.callback===null)k(d);else if(J.startTime<=P)k(d),J.sortIndex=J.expirationTime,B(h,J);else break;J=z(d)}}function C(P){if(v=!1,_(P),!D)if(z(h)!==null)D=!0,w||(w=!0,Y());else{var J=z(d);J!==null&&ae(C,J.startTime-P)}}var w=!1,A=-1,m=5,R=-1;function G(){return o?!0:!(b.unstable_now()-R<m)}function q(){if(o=!1,w){var P=b.unstable_now();R=P;var J=!0;try{e:{D=!1,v&&(v=!1,a(A),A=-1),y=!0;var ie=g;try{t:{for(_(P),f=z(h);f!==null&&!(f.expirationTime>P&&G());){var E=f.callback;if(typeof E=="function"){f.callback=null,g=f.priorityLevel;var T=E(f.expirationTime<=P);if(P=b.unstable_now(),typeof T=="function"){f.callback=T,_(P),J=!0;break t}f===z(h)&&k(h),_(P)}else k(h);f=z(h)}if(f!==null)J=!0;else{var x=z(d);x!==null&&ae(C,x.startTime-P),J=!1}}break e}finally{f=null,g=ie,y=!1}J=void 0}}finally{J?Y():w=!1}}}var Y;if(typeof l=="function")Y=function(){l(q)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,Q=j.port2;j.port1.onmessage=q,Y=function(){Q.postMessage(null)}}else Y=function(){c(q,0)};function ae(P,J){A=c(function(){P(b.unstable_now())},J)}b.unstable_IdlePriority=5,b.unstable_ImmediatePriority=1,b.unstable_LowPriority=4,b.unstable_NormalPriority=3,b.unstable_Profiling=null,b.unstable_UserBlockingPriority=2,b.unstable_cancelCallback=function(P){P.callback=null},b.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):m=0<P?Math.floor(1e3/P):5},b.unstable_getCurrentPriorityLevel=function(){return g},b.unstable_next=function(P){switch(g){case 1:case 2:case 3:var J=3;break;default:J=g}var ie=g;g=J;try{return P()}finally{g=ie}},b.unstable_requestPaint=function(){o=!0},b.unstable_runWithPriority=function(P,J){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ie=g;g=P;try{return J()}finally{g=ie}},b.unstable_scheduleCallback=function(P,J,ie){var E=b.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?E+ie:E):ie=E,P){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=ie+T,P={id:p++,callback:J,priorityLevel:P,startTime:ie,expirationTime:T,sortIndex:-1},ie>E?(P.sortIndex=ie,B(d,P),z(h)===null&&P===z(d)&&(v?(a(A),A=-1):v=!0,ae(C,ie-E))):(P.sortIndex=T,B(h,P),D||y||(D=!0,w||(w=!0,Y()))),P},b.unstable_shouldYield=G,b.unstable_wrapCallback=function(P){var J=g;return function(){var ie=g;g=J;try{return P.apply(this,arguments)}finally{g=ie}}}})(oc)),oc}var wd;function Vv(){return wd||(wd=1,lc.exports=Gv()),lc.exports}var cc={exports:{}},xt={};var xd;function Fv(){if(xd)return xt;xd=1;var b=pc();function B(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function z(){}var k={d:{f:z,r:function(){throw Error(B(522))},D:z,C:z,L:z,m:z,X:z,S:z,M:z},p:0,findDOMNode:null},U=Symbol.for("react.portal");function K(h,d,p){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U,key:f==null?null:""+f,children:h,containerInfo:d,implementation:p}}var H=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,xt.createPortal=function(h,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(B(299));return K(h,d,null,p)},xt.flushSync=function(h){var d=H.T,p=k.p;try{if(H.T=null,k.p=2,h)return h()}finally{H.T=d,k.p=p,k.d.f()}},xt.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,k.d.C(h,d))},xt.prefetchDNS=function(h){typeof h=="string"&&k.d.D(h)},xt.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var p=d.as,f=u(p,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?k.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:f,integrity:g,fetchPriority:y}):p==="script"&&k.d.X(h,{crossOrigin:f,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},xt.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=u(d.as,d.crossOrigin);k.d.M(h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&k.d.M(h)},xt.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,f=u(p,d.crossOrigin);k.d.L(h,p,{crossOrigin:f,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},xt.preloadModule=function(h,d){if(typeof h=="string")if(d){var p=u(d.as,d.crossOrigin);k.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else k.d.m(h)},xt.requestFormReset=function(h){k.d.r(h)},xt.unstable_batchedUpdates=function(h,d){return h(d)},xt.useFormState=function(h,d,p){return H.H.useFormState(h,d,p)},xt.useFormStatus=function(){return H.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var Ed;function Yv(){if(Ed)return cc.exports;Ed=1;function b(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b)}catch(B){console.error(B)}}return b(),cc.exports=Fv(),cc.exports}var Ad;function Kv(){if(Ad)return dn;Ad=1;var b=Vv(),B=pc(),z=Yv();function k(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 U(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function K(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 H(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 u(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 h(e){if(K(e)!==e)throw Error(k(188))}function d(e){var t=e.alternate;if(!t){if(t=K(e),t===null)throw Error(k(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return h(r),e;if(n===s)return h(r),t;n=n.sibling}throw Error(k(188))}if(i.return!==s.return)i=r,s=n;else{for(var S=!1,O=r.child;O;){if(O===i){S=!0,i=r,s=n;break}if(O===s){S=!0,s=r,i=n;break}O=O.sibling}if(!S){for(O=n.child;O;){if(O===i){S=!0,i=n,s=r;break}if(O===s){S=!0,s=n,i=r;break}O=O.sibling}if(!S)throw Error(k(189))}}if(i.alternate!==s)throw Error(k(190))}if(i.tag!==3)throw Error(k(188));return i.stateNode.current===i?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var j=Symbol.for("react.client.reference");function Q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case v:return"Fragment";case c:return"Profiler";case o:return"StrictMode";case C:return"Suspense";case w:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case l:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var ae=Array.isArray,P=B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},E=[],T=-1;function x(e){return{current:e}}function L(e){0>T||(e.current=E[T],E[T]=null,T--)}function W(e,t){T++,E[T]=e.current,e.current=t}var Z=x(null),oe=x(null),he=x(null),F=x(null);function N(e,t){switch(W(he,t),W(oe,e),W(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?If(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=If(t),e=Pf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(Z),W(Z,e)}function se(){L(Z),L(oe),L(he)}function fe(e){e.memoizedState!==null&&W(F,e);var t=Z.current,i=Pf(t,e.type);t!==i&&(W(oe,e),W(Z,i))}function _e(e){oe.current===e&&(L(Z),L(oe)),F.current===e&&(L(F),on._currentValue=ie)}var me,De;function Oe(e){if(me===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||"",De=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+me+e+De}var Pe=!1;function nt(e,t){if(!e||Pe)return"";Pe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(re){var te=re}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(re){te=re}e.call(ue.prototype)}}else{try{throw Error()}catch(re){te=re}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(re){if(re&&te&&typeof re.stack=="string")return[re.stack,te.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=s.DetermineComponentFrameRoot(),S=n[0],O=n[1];if(S&&O){var I=S.split(`
|
|
4
|
+
`),ee=O.split(`
|
|
5
|
+
`);for(r=s=0;s<I.length&&!I[s].includes("DetermineComponentFrameRoot");)s++;for(;r<ee.length&&!ee[r].includes("DetermineComponentFrameRoot");)r++;if(s===I.length||r===ee.length)for(s=I.length-1,r=ee.length-1;1<=s&&0<=r&&I[s]!==ee[r];)r--;for(;1<=s&&0<=r;s--,r--)if(I[s]!==ee[r]){if(s!==1||r!==1)do if(s--,r--,0>r||I[s]!==ee[r]){var le=`
|
|
6
|
+
`+I[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=r);break}}}finally{Pe=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Oe(i):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe("Lazy");case 13:return e.child!==t&&t!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return nt(e.type,!1);case 11:return nt(e.type.render,!1);case 1:return nt(e.type,!0);case 31:return Oe("Activity");default:return""}}function Et(e){try{var t="",i=null;do t+=Ee(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var _i=Object.prototype.hasOwnProperty,mi=b.unstable_scheduleCallback,ni=b.unstable_cancelCallback,Ui=b.unstable_shouldYield,mt=b.unstable_requestPaint,Ge=b.unstable_now,Ct=b.unstable_getCurrentPriorityLevel,ti=b.unstable_ImmediatePriority,ai=b.unstable_UserBlockingPriority,At=b.unstable_NormalPriority,qi=b.unstable_LowPriority,Rt=b.unstable_IdlePriority,vi=b.log,Ye=b.unstable_setDisableYieldValue,li=null,Dt=null;function oi(e){if(typeof vi=="function"&&Ye(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(li,e)}catch{}}var wt=Math.clz32?Math.clz32:Va,Pa=Math.log,Ga=Math.LN2;function Va(e){return e>>>=0,e===0?32:31-(Pa(e)/Ga|0)|0}var Ns=256,zs=262144,de=4194304;function ve(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 ye(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var O=s&134217727;return O!==0?(s=O&~n,s!==0?r=ve(s):(S&=O,S!==0?r=ve(S):i||(i=O&~e,i!==0&&(r=ve(i))))):(O=s&~n,O!==0?r=ve(O):S!==0?r=ve(S):i||(i=s&~e,i!==0&&(r=ve(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function we(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(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 Ke(){var e=de;return de<<=1,(de&62914560)===0&&(de=4194304),e}function Fa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function yr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T_(e,t,i,s,r,n){var S=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 O=e.entanglements,I=e.expirationTimes,ee=e.hiddenUpdates;for(i=S&~i;0<i;){var le=31-wt(i),ue=1<<le;O[le]=0,I[le]=-1;var te=ee[le];if(te!==null)for(ee[le]=null,le=0;le<te.length;le++){var re=te[le];re!==null&&(re.lane&=-536870913)}i&=~ue}s!==0&&Cc(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(S&~t))}function Cc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-wt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function wc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-wt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function xc(e,t){var i=t&-t;return i=(i&42)!==0?1:Ya(i),(i&(e.suspendedLanes|t))!==0?0:i}function Ya(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 Ka(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ec(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:hd(e.type))}function Ac(e,t){var i=J.p;try{return J.p=e,t()}finally{J.p=i}}var Ii=Math.random().toString(36).slice(2),vt="__reactFiber$"+Ii,kt="__reactProps$"+Ii,Hs="__reactContainer$"+Ii,Wa="__reactEvents$"+Ii,R_="__reactListeners$"+Ii,k_="__reactHandles$"+Ii,Dc="__reactResources$"+Ii,Cr="__reactMarker$"+Ii;function Xa(e){delete e[vt],delete e[kt],delete e[Wa],delete e[R_],delete e[k_]}function js(e){var t=e[vt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Hs]||i[vt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Xf(e);e!==null;){if(i=e[vt])return i;e=Xf(e)}return t}e=i,i=e.parentNode}return null}function Us(e){if(e=e[vt]||e[Hs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(k(33))}function qs(e){var t=e[Dc];return t||(t=e[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function dt(e){e[Cr]=!0}var Tc=new Set,Rc={};function vs(e,t){Is(e,t),Is(e+"Capture",t)}function Is(e,t){for(Rc[e]=t,e=0;e<t.length;e++)Tc.add(t[e])}var O_=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]*$"),kc={},Oc={};function L_(e){return _i.call(Oc,e)?!0:_i.call(kc,e)?!1:O_.test(e)?Oc[e]=!0:(kc[e]=!0,!1)}function bn(e,t,i){if(L_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function yn(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 gi(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M_(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(S){i=""+S,n.call(this,S)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qa(e){if(!e._valueTracker){var t=Lc(e)?"checked":"value";e._valueTracker=M_(e,t,""+e[t])}}function Mc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Lc(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Cn(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 B_=/[\n"\\]/g;function Ft(e){return e.replace(B_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Za(e,t,i,s,r,n,S,O){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vt(t)):e.value!==""+Vt(t)&&(e.value=""+Vt(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?Ja(e,S,Vt(t)):i!=null?Ja(e,S,Vt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.name=""+Vt(O):e.removeAttribute("name")}function Bc(e,t,i,s,r,n,S,O){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){Qa(e);return}i=i!=null?""+Vt(i):"",t=t!=null?""+Vt(t):i,O||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=O?e.checked:!!s,e.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),Qa(e)}function Ja(e,t,i){t==="number"&&Cn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ps(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Vt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Nc(e,t,i){if(t!=null&&(t=""+Vt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Vt(i):""}function zc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(k(92));if(ae(s)){if(1<s.length)throw Error(k(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Vt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Qa(e)}function Gs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var N_=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 Hc(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||N_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function jc(e,t,i){if(t!=null&&typeof t!="object")throw Error(k(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&Hc(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Hc(e,n,t[n])}function $a(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 z_=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"]]),H_=/^[\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 wn(e){return H_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pi(){}var el=null;function tl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vs=null,Fs=null;function Uc(e){var t=Us(e);if(t&&(e=t.stateNode)){var i=e[kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Za(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="'+Ft(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[kt]||null;if(!r)throw Error(k(90));Za(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Mc(s)}break e;case"textarea":Nc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ps(e,!!i.multiple,t,!1)}}}var il=!1;function qc(e,t,i){if(il)return e(t,i);il=!0;try{var s=e(t);return s}finally{if(il=!1,(Vs!==null||Fs!==null)&&(ua(),Vs&&(t=Vs,e=Fs,Fs=Vs=null,Uc(t),e)))for(t=0;t<e.length;t++)Uc(e[t])}}function xr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[kt]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(k(231,t,typeof i));return i}var Si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sl=!1;if(Si)try{var Er={};Object.defineProperty(Er,"passive",{get:function(){sl=!0}}),window.addEventListener("test",Er,Er),window.removeEventListener("test",Er,Er)}catch{sl=!1}var Pi=null,rl=null,xn=null;function Ic(){if(xn)return xn;var e,t=rl,i=t.length,s,r="value"in Pi?Pi.value:Pi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var S=i-e;for(s=1;s<=S&&t[i-s]===r[n-s];s++);return xn=r.slice(e,1<s?1-s:void 0)}function En(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 An(){return!0}function Pc(){return!1}function Ot(e){function t(i,s,r,n,S){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=S,this.currentTarget=null;for(var O in e)e.hasOwnProperty(O)&&(i=e[O],this[O]=i?i(n):n[O]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?An:Pc,this.isPropagationStopped=Pc,this}return f(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=An)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dn=Ot(gs),Ar=f({},gs,{view:0,detail:0}),j_=Ot(Ar),nl,al,Dr,Tn=f({},Ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ol,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!==Dr&&(Dr&&e.type==="mousemove"?(nl=e.screenX-Dr.screenX,al=e.screenY-Dr.screenY):al=nl=0,Dr=e),nl)},movementY:function(e){return"movementY"in e?e.movementY:al}}),Gc=Ot(Tn),U_=f({},Tn,{dataTransfer:0}),q_=Ot(U_),I_=f({},Ar,{relatedTarget:0}),ll=Ot(I_),P_=f({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),G_=Ot(P_),V_=f({},gs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),F_=Ot(V_),Y_=f({},gs,{data:0}),Vc=Ot(Y_),K_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W_={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"},X_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Q_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=X_[e])?!!t[e]:!1}function ol(){return Q_}var Z_=f({},Ar,{key:function(e){if(e.key){var t=K_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=En(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?W_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ol,charCode:function(e){return e.type==="keypress"?En(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?En(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),J_=Ot(Z_),$_=f({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fc=Ot($_),em=f({},Ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ol}),tm=Ot(em),im=f({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),sm=Ot(im),rm=f({},Tn,{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}),nm=Ot(rm),am=f({},gs,{newState:0,oldState:0}),lm=Ot(am),om=[9,13,27,32],cl=Si&&"CompositionEvent"in window,Tr=null;Si&&"documentMode"in document&&(Tr=document.documentMode);var cm=Si&&"TextEvent"in window&&!Tr,Yc=Si&&(!cl||Tr&&8<Tr&&11>=Tr),Kc=" ",Wc=!1;function Xc(e,t){switch(e){case"keyup":return om.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ys=!1;function um(e,t){switch(e){case"compositionend":return Qc(t);case"keypress":return t.which!==32?null:(Wc=!0,Kc);case"textInput":return e=t.data,e===Kc&&Wc?null:e;default:return null}}function hm(e,t){if(Ys)return e==="compositionend"||!cl&&Xc(e,t)?(e=Ic(),xn=rl=Pi=null,Ys=!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 Yc&&t.locale!=="ko"?null:t.data;default:return null}}var fm={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 Zc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fm[e.type]:t==="textarea"}function Jc(e,t,i,s){Vs?Fs?Fs.push(s):Fs=[s]:Vs=s,t=ga(t,"onChange"),0<t.length&&(i=new Dn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Rr=null,kr=null;function dm(e){Nf(e,0)}function Rn(e){var t=wr(e);if(Mc(t))return e}function $c(e,t){if(e==="change")return t}var eu=!1;if(Si){var ul;if(Si){var hl="oninput"in document;if(!hl){var tu=document.createElement("div");tu.setAttribute("oninput","return;"),hl=typeof tu.oninput=="function"}ul=hl}else ul=!1;eu=ul&&(!document.documentMode||9<document.documentMode)}function iu(){Rr&&(Rr.detachEvent("onpropertychange",su),kr=Rr=null)}function su(e){if(e.propertyName==="value"&&Rn(kr)){var t=[];Jc(t,kr,e,tl(e)),qc(dm,t)}}function _m(e,t,i){e==="focusin"?(iu(),Rr=t,kr=i,Rr.attachEvent("onpropertychange",su)):e==="focusout"&&iu()}function mm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rn(kr)}function vm(e,t){if(e==="click")return Rn(t)}function gm(e,t){if(e==="input"||e==="change")return Rn(t)}function pm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:pm;function Or(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!_i.call(t,r)||!Ht(e[r],t[r]))return!1}return!0}function ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nu(e,t){var i=ru(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ru(i)}}function au(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?au(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cn(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=Cn(e.document)}return t}function fl(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 Sm=Si&&"documentMode"in document&&11>=document.documentMode,Ks=null,dl=null,Lr=null,_l=!1;function ou(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;_l||Ks==null||Ks!==Cn(s)||(s=Ks,"selectionStart"in s&&fl(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Lr&&Or(Lr,s)||(Lr=s,s=ga(dl,"onSelect"),0<s.length&&(t=new Dn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ks)))}function ps(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ws={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionrun:ps("Transition","TransitionRun"),transitionstart:ps("Transition","TransitionStart"),transitioncancel:ps("Transition","TransitionCancel"),transitionend:ps("Transition","TransitionEnd")},ml={},cu={};Si&&(cu=document.createElement("div").style,"AnimationEvent"in window||(delete Ws.animationend.animation,delete Ws.animationiteration.animation,delete Ws.animationstart.animation),"TransitionEvent"in window||delete Ws.transitionend.transition);function Ss(e){if(ml[e])return ml[e];if(!Ws[e])return e;var t=Ws[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in cu)return ml[e]=t[i];return e}var uu=Ss("animationend"),hu=Ss("animationiteration"),fu=Ss("animationstart"),bm=Ss("transitionrun"),ym=Ss("transitionstart"),Cm=Ss("transitioncancel"),du=Ss("transitionend"),_u=new Map,vl="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(" ");vl.push("scrollEnd");function ii(e,t){_u.set(e,t),vs(t,[e])}var kn=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)},Yt=[],Xs=0,gl=0;function On(){for(var e=Xs,t=gl=Xs=0;t<e;){var i=Yt[t];Yt[t++]=null;var s=Yt[t];Yt[t++]=null;var r=Yt[t];Yt[t++]=null;var n=Yt[t];if(Yt[t++]=null,s!==null&&r!==null){var S=s.pending;S===null?r.next=r:(r.next=S.next,S.next=r),s.pending=r}n!==0&&mu(i,r,n)}}function Ln(e,t,i,s){Yt[Xs++]=e,Yt[Xs++]=t,Yt[Xs++]=i,Yt[Xs++]=s,gl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function pl(e,t,i,s){return Ln(e,t,i,s),Mn(e)}function bs(e,t){return Ln(e,null,null,t),Mn(e)}function mu(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-wt(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function Mn(e){if(50<en)throw en=0,To=null,Error(k(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qs={};function wm(e,t,i,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,i,s){return new wm(e,t,i,s)}function Sl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bi(e,t){var i=e.alternate;return i===null?(i=jt(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 vu(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 Bn(e,t,i,s,r,n){var S=0;if(s=e,typeof e=="function")Sl(e)&&(S=1);else if(typeof e=="string")S=Tv(e,i,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=jt(31,i,t,r),e.elementType=R,e.lanes=n,e;case v:return ys(i.children,r,n,t);case o:S=8,r|=24;break;case c:return e=jt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case C:return e=jt(13,i,t,r),e.elementType=C,e.lanes=n,e;case w:return e=jt(19,i,t,r),e.elementType=w,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:S=10;break e;case a:S=9;break e;case _:S=11;break e;case A:S=14;break e;case m:S=16,s=null;break e}S=29,i=Error(k(130,e===null?"null":typeof e,"")),s=null}return t=jt(S,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function ys(e,t,i,s){return e=jt(7,e,s,t),e.lanes=i,e}function bl(e,t,i){return e=jt(6,e,null,t),e.lanes=i,e}function gu(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function yl(e,t,i){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pu=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var i=pu.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Et(t)},pu.set(e,t),t)}return{value:e,source:t,stack:Et(t)}}var Zs=[],Js=0,Nn=null,Mr=0,Wt=[],Xt=0,Gi=null,ci=1,ui="";function yi(e,t){Zs[Js++]=Mr,Zs[Js++]=Nn,Nn=e,Mr=t}function Su(e,t,i){Wt[Xt++]=ci,Wt[Xt++]=ui,Wt[Xt++]=Gi,Gi=e;var s=ci;e=ui;var r=32-wt(s)-1;s&=~(1<<r),i+=1;var n=32-wt(t)+r;if(30<n){var S=r-r%5;n=(s&(1<<S)-1).toString(32),s>>=S,r-=S,ci=1<<32-wt(t)+r|i<<r|s,ui=n+e}else ci=1<<n|i<<r|s,ui=e}function Cl(e){e.return!==null&&(yi(e,1),Su(e,1,0))}function wl(e){for(;e===Nn;)Nn=Zs[--Js],Zs[Js]=null,Mr=Zs[--Js],Zs[Js]=null;for(;e===Gi;)Gi=Wt[--Xt],Wt[Xt]=null,ui=Wt[--Xt],Wt[Xt]=null,ci=Wt[--Xt],Wt[Xt]=null}function bu(e,t){Wt[Xt++]=ci,Wt[Xt++]=ui,Wt[Xt++]=Gi,ci=t.id,ui=t.overflow,Gi=e}var gt=null,Je=null,ze=!1,Vi=null,Qt=!1,xl=Error(k(519));function Fi(e){var t=Error(k(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Br(Kt(t,e)),xl}function yu(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[vt]=e,t[kt]=s,i){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(i=0;i<sn.length;i++)Me(sn[i],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),Bc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),zc(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||Uf(t.textContent,i)?(s.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),s.onScroll!=null&&Me("scroll",t),s.onScrollEnd!=null&&Me("scrollend",t),s.onClick!=null&&(t.onclick=pi),t=!0):t=!1,t||Fi(e,!0)}function Cu(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:Qt=!1;return;case 27:case 3:Qt=!0;return;default:gt=gt.return}}function $s(e){if(e!==gt)return!1;if(!ze)return Cu(e),ze=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Go(e.type,e.memoizedProps)),i=!i),i&&Je&&Fi(e),Cu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(317));Je=Wf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(317));Je=Wf(e)}else t===27?(t=Je,ns(e.type)?(e=Wo,Wo=null,Je=e):Je=t):Je=gt?Jt(e.stateNode.nextSibling):null;return!0}function Cs(){Je=gt=null,ze=!1}function El(){var e=Vi;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Vi=null),e}function Br(e){Vi===null?Vi=[e]:Vi.push(e)}var Al=x(null),ws=null,Ci=null;function Yi(e,t,i){W(Al,t._currentValue),t._currentValue=i}function wi(e){e._currentValue=Al.current,L(Al)}function Dl(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Tl(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var S=r.child;n=n.firstContext;e:for(;n!==null;){var O=n;n=r;for(var I=0;I<t.length;I++)if(O.context===t[I]){n.lanes|=i,O=n.alternate,O!==null&&(O.lanes|=i),Dl(n.return,i,e),s||(S=null);break e}n=O.next}}else if(r.tag===18){if(S=r.return,S===null)throw Error(k(341));S.lanes|=i,n=S.alternate,n!==null&&(n.lanes|=i),Dl(S,i,e),S=null}else S=r.child;if(S!==null)S.return=r;else for(S=r;S!==null;){if(S===e){S=null;break}if(r=S.sibling,r!==null){r.return=S.return,S=r;break}S=S.return}r=S}}function er(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var S=r.alternate;if(S===null)throw Error(k(387));if(S=S.memoizedProps,S!==null){var O=r.type;Ht(r.pendingProps.value,S.value)||(e!==null?e.push(O):e=[O])}}else if(r===F.current){if(S=r.alternate,S===null)throw Error(k(387));S.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(on):e=[on])}r=r.return}e!==null&&Tl(t,e,i,s),t.flags|=262144}function zn(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xs(e){ws=e,Ci=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pt(e){return wu(ws,e)}function Hn(e,t){return ws===null&&xs(e),wu(e,t)}function wu(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ci===null){if(e===null)throw Error(k(308));Ci=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ci=Ci.next=t;return i}var xm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Em=b.unstable_scheduleCallback,Am=b.unstable_NormalPriority,at={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rl(){return{controller:new xm,data:new Map,refCount:0}}function Nr(e){e.refCount--,e.refCount===0&&Em(Am,function(){e.controller.abort()})}var zr=null,kl=0,tr=0,ir=null;function Dm(e,t){if(zr===null){var i=zr=[];kl=0,tr=Bo(),ir={status:"pending",value:void 0,then:function(s){i.push(s)}}}return kl++,t.then(xu,xu),t}function xu(){if(--kl===0&&zr!==null){ir!==null&&(ir.status="fulfilled");var e=zr;zr=null,tr=0,ir=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tm(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var Eu=P.S;P.S=function(e,t){cf=Ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Dm(e,t),Eu!==null&&Eu(e,t)};var Es=x(null);function Ol(){var e=Es.current;return e!==null?e:Ze.pooledCache}function jn(e,t){t===null?W(Es,Es.current):W(Es,t.pool)}function Au(){var e=Ol();return e===null?null:{parent:at._currentValue,pool:e}}var sr=Error(k(460)),Ll=Error(k(474)),Un=Error(k(542)),qn={then:function(){}};function Du(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Tu(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(pi,pi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ku(e),e;default:if(typeof t.status=="string")t.then(pi,pi);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(k(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ku(e),e}throw Ds=t,sr}}function As(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ds=i,sr):i}}var Ds=null;function Ru(){if(Ds===null)throw Error(k(459));var e=Ds;return Ds=null,e}function ku(e){if(e===sr||e===Un)throw Error(k(483))}var rr=null,Hr=0;function In(e){var t=Hr;return Hr+=1,rr===null&&(rr=[]),Tu(rr,e,t)}function jr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pn(e,t){throw t.$$typeof===g?Error(k(525)):(e=Object.prototype.toString.call(t),Error(k(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ou(e){function t(X,V){if(e){var $=X.deletions;$===null?(X.deletions=[V],X.flags|=16):$.push(V)}}function i(X,V){if(!e)return null;for(;V!==null;)t(X,V),V=V.sibling;return null}function s(X){for(var V=new Map;X!==null;)X.key!==null?V.set(X.key,X):V.set(X.index,X),X=X.sibling;return V}function r(X,V){return X=bi(X,V),X.index=0,X.sibling=null,X}function n(X,V,$){return X.index=$,e?($=X.alternate,$!==null?($=$.index,$<V?(X.flags|=67108866,V):$):(X.flags|=67108866,V)):(X.flags|=1048576,V)}function S(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function O(X,V,$,ce){return V===null||V.tag!==6?(V=bl($,X.mode,ce),V.return=X,V):(V=r(V,$),V.return=X,V)}function I(X,V,$,ce){var Ce=$.type;return Ce===v?le(X,V,$.props.children,ce,$.key):V!==null&&(V.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===m&&As(Ce)===V.type)?(V=r(V,$.props),jr(V,$),V.return=X,V):(V=Bn($.type,$.key,$.props,null,X.mode,ce),jr(V,$),V.return=X,V)}function ee(X,V,$,ce){return V===null||V.tag!==4||V.stateNode.containerInfo!==$.containerInfo||V.stateNode.implementation!==$.implementation?(V=yl($,X.mode,ce),V.return=X,V):(V=r(V,$.children||[]),V.return=X,V)}function le(X,V,$,ce,Ce){return V===null||V.tag!==7?(V=ys($,X.mode,ce,Ce),V.return=X,V):(V=r(V,$),V.return=X,V)}function ue(X,V,$){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=bl(""+V,X.mode,$),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case y:return $=Bn(V.type,V.key,V.props,null,X.mode,$),jr($,V),$.return=X,$;case D:return V=yl(V,X.mode,$),V.return=X,V;case m:return V=As(V),ue(X,V,$)}if(ae(V)||Y(V))return V=ys(V,X.mode,$,null),V.return=X,V;if(typeof V.then=="function")return ue(X,In(V),$);if(V.$$typeof===l)return ue(X,Hn(X,V),$);Pn(X,V)}return null}function te(X,V,$,ce){var Ce=V!==null?V.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return Ce!==null?null:O(X,V,""+$,ce);if(typeof $=="object"&&$!==null){switch($.$$typeof){case y:return $.key===Ce?I(X,V,$,ce):null;case D:return $.key===Ce?ee(X,V,$,ce):null;case m:return $=As($),te(X,V,$,ce)}if(ae($)||Y($))return Ce!==null?null:le(X,V,$,ce,null);if(typeof $.then=="function")return te(X,V,In($),ce);if($.$$typeof===l)return te(X,V,Hn(X,$),ce);Pn(X,$)}return null}function re(X,V,$,ce,Ce){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return X=X.get($)||null,O(V,X,""+ce,Ce);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return X=X.get(ce.key===null?$:ce.key)||null,I(V,X,ce,Ce);case D:return X=X.get(ce.key===null?$:ce.key)||null,ee(V,X,ce,Ce);case m:return ce=As(ce),re(X,V,$,ce,Ce)}if(ae(ce)||Y(ce))return X=X.get($)||null,le(V,X,ce,Ce,null);if(typeof ce.then=="function")return re(X,V,$,In(ce),Ce);if(ce.$$typeof===l)return re(X,V,$,Hn(V,ce),Ce);Pn(V,ce)}return null}function ge(X,V,$,ce){for(var Ce=null,je=null,be=V,Re=V=0,Ne=null;be!==null&&Re<$.length;Re++){be.index>Re?(Ne=be,be=null):Ne=be.sibling;var Ue=te(X,be,$[Re],ce);if(Ue===null){be===null&&(be=Ne);break}e&&be&&Ue.alternate===null&&t(X,be),V=n(Ue,V,Re),je===null?Ce=Ue:je.sibling=Ue,je=Ue,be=Ne}if(Re===$.length)return i(X,be),ze&&yi(X,Re),Ce;if(be===null){for(;Re<$.length;Re++)be=ue(X,$[Re],ce),be!==null&&(V=n(be,V,Re),je===null?Ce=be:je.sibling=be,je=be);return ze&&yi(X,Re),Ce}for(be=s(be);Re<$.length;Re++)Ne=re(be,X,Re,$[Re],ce),Ne!==null&&(e&&Ne.alternate!==null&&be.delete(Ne.key===null?Re:Ne.key),V=n(Ne,V,Re),je===null?Ce=Ne:je.sibling=Ne,je=Ne);return e&&be.forEach(function(us){return t(X,us)}),ze&&yi(X,Re),Ce}function xe(X,V,$,ce){if($==null)throw Error(k(151));for(var Ce=null,je=null,be=V,Re=V=0,Ne=null,Ue=$.next();be!==null&&!Ue.done;Re++,Ue=$.next()){be.index>Re?(Ne=be,be=null):Ne=be.sibling;var us=te(X,be,Ue.value,ce);if(us===null){be===null&&(be=Ne);break}e&&be&&us.alternate===null&&t(X,be),V=n(us,V,Re),je===null?Ce=us:je.sibling=us,je=us,be=Ne}if(Ue.done)return i(X,be),ze&&yi(X,Re),Ce;if(be===null){for(;!Ue.done;Re++,Ue=$.next())Ue=ue(X,Ue.value,ce),Ue!==null&&(V=n(Ue,V,Re),je===null?Ce=Ue:je.sibling=Ue,je=Ue);return ze&&yi(X,Re),Ce}for(be=s(be);!Ue.done;Re++,Ue=$.next())Ue=re(be,X,Re,Ue.value,ce),Ue!==null&&(e&&Ue.alternate!==null&&be.delete(Ue.key===null?Re:Ue.key),V=n(Ue,V,Re),je===null?Ce=Ue:je.sibling=Ue,je=Ue);return e&&be.forEach(function(Uv){return t(X,Uv)}),ze&&yi(X,Re),Ce}function Qe(X,V,$,ce){if(typeof $=="object"&&$!==null&&$.type===v&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case y:e:{for(var Ce=$.key;V!==null;){if(V.key===Ce){if(Ce=$.type,Ce===v){if(V.tag===7){i(X,V.sibling),ce=r(V,$.props.children),ce.return=X,X=ce;break e}}else if(V.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===m&&As(Ce)===V.type){i(X,V.sibling),ce=r(V,$.props),jr(ce,$),ce.return=X,X=ce;break e}i(X,V);break}else t(X,V);V=V.sibling}$.type===v?(ce=ys($.props.children,X.mode,ce,$.key),ce.return=X,X=ce):(ce=Bn($.type,$.key,$.props,null,X.mode,ce),jr(ce,$),ce.return=X,X=ce)}return S(X);case D:e:{for(Ce=$.key;V!==null;){if(V.key===Ce)if(V.tag===4&&V.stateNode.containerInfo===$.containerInfo&&V.stateNode.implementation===$.implementation){i(X,V.sibling),ce=r(V,$.children||[]),ce.return=X,X=ce;break e}else{i(X,V);break}else t(X,V);V=V.sibling}ce=yl($,X.mode,ce),ce.return=X,X=ce}return S(X);case m:return $=As($),Qe(X,V,$,ce)}if(ae($))return ge(X,V,$,ce);if(Y($)){if(Ce=Y($),typeof Ce!="function")throw Error(k(150));return $=Ce.call($),xe(X,V,$,ce)}if(typeof $.then=="function")return Qe(X,V,In($),ce);if($.$$typeof===l)return Qe(X,V,Hn(X,$),ce);Pn(X,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,V!==null&&V.tag===6?(i(X,V.sibling),ce=r(V,$),ce.return=X,X=ce):(i(X,V),ce=bl($,X.mode,ce),ce.return=X,X=ce),S(X)):i(X,V)}return function(X,V,$,ce){try{Hr=0;var Ce=Qe(X,V,$,ce);return rr=null,Ce}catch(be){if(be===sr||be===Un)throw be;var je=jt(29,be,null,X.mode);return je.lanes=ce,je.return=X,je}}}var Ts=Ou(!0),Lu=Ou(!1),Ki=!1;function Ml(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bl(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 Wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(qe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Mn(e),mu(e,null,i),t}return Ln(e,s,t,i),Mn(e)}function Ur(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,wc(e,i)}}function Nl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=S:n=n.next=S,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var zl=!1;function qr(){if(zl){var e=ir;if(e!==null)throw e}}function Ir(e,t,i,s){zl=!1;var r=e.updateQueue;Ki=!1;var n=r.firstBaseUpdate,S=r.lastBaseUpdate,O=r.shared.pending;if(O!==null){r.shared.pending=null;var I=O,ee=I.next;I.next=null,S===null?n=ee:S.next=ee,S=I;var le=e.alternate;le!==null&&(le=le.updateQueue,O=le.lastBaseUpdate,O!==S&&(O===null?le.firstBaseUpdate=ee:O.next=ee,le.lastBaseUpdate=I))}if(n!==null){var ue=r.baseState;S=0,le=ee=I=null,O=n;do{var te=O.lane&-536870913,re=te!==O.lane;if(re?(Be&te)===te:(s&te)===te){te!==0&&te===tr&&(zl=!0),le!==null&&(le=le.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var ge=e,xe=O;te=t;var Qe=i;switch(xe.tag){case 1:if(ge=xe.payload,typeof ge=="function"){ue=ge.call(Qe,ue,te);break e}ue=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=xe.payload,te=typeof ge=="function"?ge.call(Qe,ue,te):ge,te==null)break e;ue=f({},ue,te);break e;case 2:Ki=!0}}te=O.callback,te!==null&&(e.flags|=64,re&&(e.flags|=8192),re=r.callbacks,re===null?r.callbacks=[te]:re.push(te))}else re={lane:te,tag:O.tag,payload:O.payload,callback:O.callback,next:null},le===null?(ee=le=re,I=ue):le=le.next=re,S|=te;if(O=O.next,O===null){if(O=r.shared.pending,O===null)break;re=O,O=re.next,re.next=null,r.lastBaseUpdate=re,r.shared.pending=null}}while(!0);le===null&&(I=ue),r.baseState=I,r.firstBaseUpdate=ee,r.lastBaseUpdate=le,n===null&&(r.shared.lanes=0),es|=S,e.lanes=S,e.memoizedState=ue}}function Mu(e,t){if(typeof e!="function")throw Error(k(191,e));e.call(t)}function Bu(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Mu(i[e],t)}var nr=x(null),Gn=x(0);function Nu(e,t){e=Li,W(Gn,e),W(nr,t),Li=e|t.baseLanes}function Hl(){W(Gn,Li),W(nr,nr.current)}function jl(){Li=Gn.current,L(nr),L(Gn)}var Ut=x(null),Zt=null;function Qi(e){var t=e.alternate;W(st,st.current&1),W(Ut,e),Zt===null&&(t===null||nr.current!==null||t.memoizedState!==null)&&(Zt=e)}function Ul(e){W(st,st.current),W(Ut,e),Zt===null&&(Zt=e)}function zu(e){e.tag===22?(W(st,st.current),W(Ut,e),Zt===null&&(Zt=e)):Zi()}function Zi(){W(st,st.current),W(Ut,Ut.current)}function qt(e){L(Ut),Zt===e&&(Zt=null),L(st)}var st=x(0);function Vn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Yo(i)||Ko(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 xi=0,Te=null,We=null,lt=null,Fn=!1,ar=!1,Rs=!1,Yn=0,Pr=0,lr=null,Rm=0;function tt(){throw Error(k(321))}function ql(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ht(e[i],t[i]))return!1;return!0}function Il(e,t,i,s,r,n){return xi=n,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Sh:io,Rs=!1,n=i(s,r),Rs=!1,ar&&(n=ju(t,i,s,r)),Hu(e),n}function Hu(e){P.H=Fr;var t=We!==null&&We.next!==null;if(xi=0,lt=We=Te=null,Fn=!1,Pr=0,lr=null,t)throw Error(k(300));e===null||ot||(e=e.dependencies,e!==null&&zn(e)&&(ot=!0))}function ju(e,t,i,s){Te=e;var r=0;do{if(ar&&(lr=null),Pr=0,ar=!1,25<=r)throw Error(k(301));if(r+=1,lt=We=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}P.H=bh,n=t(i,s)}while(ar);return n}function km(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?Gr(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Te.flags|=1024),t}function Pl(){var e=Yn!==0;return Yn=0,e}function Gl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Vl(e){if(Fn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fn=!1}xi=0,lt=We=Te=null,ar=!1,Pr=Yn=0,lr=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Te.memoizedState=lt=e:lt=lt.next=e,lt}function rt(){if(We===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=lt===null?Te.memoizedState:lt.next;if(t!==null)lt=t,We=e;else{if(e===null)throw Te.alternate===null?Error(k(467)):Error(k(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},lt===null?Te.memoizedState=lt=e:lt=lt.next=e}return lt}function Kn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gr(e){var t=Pr;return Pr+=1,lr===null&&(lr=[]),e=Tu(lr,e,t),t=Te,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Sh:io),e}function Wn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gr(e);if(e.$$typeof===l)return pt(e)}throw Error(k(438,String(e)))}function Fl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Kn(),Te.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=G;return t.index++,i}function Ei(e,t){return typeof t=="function"?t(e):t}function Xn(e){var t=rt();return Yl(t,We,e)}function Yl(e,t,i){var s=e.queue;if(s===null)throw Error(k(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var S=r.next;r.next=n.next,n.next=S}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var O=S=null,I=null,ee=t,le=!1;do{var ue=ee.lane&-536870913;if(ue!==ee.lane?(Be&ue)===ue:(xi&ue)===ue){var te=ee.revertLane;if(te===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ue===tr&&(le=!0);else if((xi&te)===te){ee=ee.next,te===tr&&(le=!0);continue}else ue={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},I===null?(O=I=ue,S=n):I=I.next=ue,Te.lanes|=te,es|=te;ue=ee.action,Rs&&i(n,ue),n=ee.hasEagerState?ee.eagerState:i(n,ue)}else te={lane:ue,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},I===null?(O=I=te,S=n):I=I.next=te,Te.lanes|=ue,es|=ue;ee=ee.next}while(ee!==null&&ee!==t);if(I===null?S=n:I.next=O,!Ht(n,e.memoizedState)&&(ot=!0,le&&(i=ir,i!==null)))throw i;e.memoizedState=n,e.baseState=S,e.baseQueue=I,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Kl(e){var t=rt(),i=t.queue;if(i===null)throw Error(k(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var S=r=r.next;do n=e(n,S.action),S=S.next;while(S!==r);Ht(n,t.memoizedState)||(ot=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function Uu(e,t,i){var s=Te,r=rt(),n=ze;if(n){if(i===void 0)throw Error(k(407));i=i()}else i=t();var S=!Ht((We||r).memoizedState,i);if(S&&(r.memoizedState=i,ot=!0),r=r.queue,Ql(Pu.bind(null,s,r,e),[e]),r.getSnapshot!==t||S||lt!==null&<.memoizedState.tag&1){if(s.flags|=2048,or(9,{destroy:void 0},Iu.bind(null,s,r,i,t),null),Ze===null)throw Error(k(349));n||(xi&127)!==0||qu(s,t,i)}return i}function qu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=Kn(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Iu(e,t,i,s){t.value=i,t.getSnapshot=s,Gu(t)&&Vu(e)}function Pu(e,t,i){return i(function(){Gu(t)&&Vu(e)})}function Gu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ht(e,i)}catch{return!0}}function Vu(e){var t=bs(e,2);t!==null&&zt(t,e,2)}function Wl(e){var t=Tt();if(typeof e=="function"){var i=e;if(e=i(),Rs){oi(!0);try{i()}finally{oi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:e},t}function Fu(e,t,i,s){return e.baseState=i,Yl(e,We,typeof s=="function"?s:Ei)}function Om(e,t,i,s,r){if(Jn(e))throw Error(k(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){n.listeners.push(S)}};P.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,Yu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function Yu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=P.T,S={};P.T=S;try{var O=i(r,s),I=P.S;I!==null&&I(S,O),Ku(e,t,O)}catch(ee){Xl(e,t,ee)}finally{n!==null&&S.types!==null&&(n.types=S.types),P.T=n}}else try{n=i(r,s),Ku(e,t,n)}catch(ee){Xl(e,t,ee)}}function Ku(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Wu(e,t,s)},function(s){return Xl(e,t,s)}):Wu(e,t,i)}function Wu(e,t,i){t.status="fulfilled",t.value=i,Xu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Yu(e,i)))}function Xl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Xu(t),t=t.next;while(t!==s)}e.action=null}function Xu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qu(e,t){return t}function Zu(e,t){if(ze){var i=Ze.formState;if(i!==null){e:{var s=Te;if(ze){if(Je){t:{for(var r=Je,n=Qt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Jt(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Je=Jt(r.nextSibling),s=r.data==="F!";break e}}Fi(s)}s=!1}s&&(t=i[0])}}return i=Tt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qu,lastRenderedState:t},i.queue=s,i=vh.bind(null,Te,s),s.dispatch=i,s=Wl(!1),n=to.bind(null,Te,!1,s.queue),s=Tt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Om.bind(null,Te,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Ju(e){var t=rt();return $u(t,We,e)}function $u(e,t,i){if(t=Yl(e,t,Qu)[0],e=Xn(Ei)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Gr(t)}catch(S){throw S===sr?Un:S}else s=t;t=rt();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,or(9,{destroy:void 0},Lm.bind(null,r,i),null)),[s,n,e]}function Lm(e,t){e.action=t}function eh(e){var t=rt(),i=We;if(i!==null)return $u(t,i,e);rt(),t=t.memoizedState,i=rt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function or(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Kn(),Te.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function th(){return rt().memoizedState}function Qn(e,t,i,s){var r=Tt();Te.flags|=e,r.memoizedState=or(1|t,{destroy:void 0},i,s===void 0?null:s)}function Zn(e,t,i,s){var r=rt();s=s===void 0?null:s;var n=r.memoizedState.inst;We!==null&&s!==null&&ql(s,We.memoizedState.deps)?r.memoizedState=or(t,n,i,s):(Te.flags|=e,r.memoizedState=or(1|t,n,i,s))}function ih(e,t){Qn(8390656,8,e,t)}function Ql(e,t){Zn(2048,8,e,t)}function Mm(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Kn(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function sh(e){var t=rt().memoizedState;return Mm({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(k(440));return t.impl.apply(void 0,arguments)}}function rh(e,t){return Zn(4,2,e,t)}function nh(e,t){return Zn(4,4,e,t)}function ah(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 lh(e,t,i){i=i!=null?i.concat([e]):null,Zn(4,4,ah.bind(null,t,e),i)}function Zl(){}function oh(e,t){var i=rt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ql(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function ch(e,t){var i=rt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ql(t,s[1]))return s[0];if(s=e(),Rs){oi(!0);try{e()}finally{oi(!1)}}return i.memoizedState=[s,t],s}function Jl(e,t,i){return i===void 0||(xi&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=hf(),Te.lanes|=e,es|=e,i)}function uh(e,t,i,s){return Ht(i,t)?i:nr.current!==null?(e=Jl(e,i,s),Ht(e,t)||(ot=!0),e):(xi&42)===0||(xi&1073741824)!==0&&(Be&261930)===0?(ot=!0,e.memoizedState=i):(e=hf(),Te.lanes|=e,es|=e,t)}function hh(e,t,i,s,r){var n=J.p;J.p=n!==0&&8>n?n:8;var S=P.T,O={};P.T=O,to(e,!1,t,i);try{var I=r(),ee=P.S;if(ee!==null&&ee(O,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var le=Tm(I,s);Vr(e,t,le,Gt(e))}else Vr(e,t,s,Gt(e))}catch(ue){Vr(e,t,{then:function(){},status:"rejected",reason:ue},Gt())}finally{J.p=n,S!==null&&O.types!==null&&(S.types=O.types),P.T=S}}function Bm(){}function $l(e,t,i,s){if(e.tag!==5)throw Error(k(476));var r=fh(e).queue;hh(e,r,t,ie,i===null?Bm:function(){return dh(e),i(s)})}function fh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:ie},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function dh(e){var t=fh(e);t.next===null&&(t=e.alternate.memoizedState),Vr(e,t.next.queue,{},Gt())}function eo(){return pt(on)}function _h(){return rt().memoizedState}function mh(){return rt().memoizedState}function Nm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Gt();e=Wi(i);var s=Xi(t,e,i);s!==null&&(zt(s,t,i),Ur(s,t,i)),t={cache:Rl()},e.payload=t;return}t=t.return}}function zm(e,t,i){var s=Gt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Jn(e)?gh(t,i):(i=pl(e,t,i,s),i!==null&&(zt(i,e,s),ph(i,t,s)))}function vh(e,t,i){var s=Gt();Vr(e,t,i,s)}function Vr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Jn(e))gh(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var S=t.lastRenderedState,O=n(S,i);if(r.hasEagerState=!0,r.eagerState=O,Ht(O,S))return Ln(e,t,r,0),Ze===null&&On(),!1}catch{}if(i=pl(e,t,r,s),i!==null)return zt(i,e,s),ph(i,t,s),!0}return!1}function to(e,t,i,s){if(s={lane:2,revertLane:Bo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Jn(e)){if(t)throw Error(k(479))}else t=pl(e,i,s,2),t!==null&&zt(t,e,2)}function Jn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function gh(e,t){ar=Fn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ph(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,wc(e,i)}}var Fr={readContext:pt,use:Wn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Fr.useEffectEvent=tt;var Sh={readContext:pt,use:Wn,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:ih,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Qn(4194308,4,ah.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Qn(4194308,4,e,t)},useInsertionEffect:function(e,t){Qn(4,2,e,t)},useMemo:function(e,t){var i=Tt();t=t===void 0?null:t;var s=e();if(Rs){oi(!0);try{e()}finally{oi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Tt();if(i!==void 0){var r=i(t);if(Rs){oi(!0);try{i(t)}finally{oi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=zm.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wl(e);var t=e.queue,i=vh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Zl,useDeferredValue:function(e,t){var i=Tt();return Jl(i,e,t)},useTransition:function(){var e=Wl(!1);return e=hh.bind(null,Te,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,r=Tt();if(ze){if(i===void 0)throw Error(k(407));i=i()}else{if(i=t(),Ze===null)throw Error(k(349));(Be&127)!==0||qu(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,ih(Pu.bind(null,s,n,e),[e]),s.flags|=2048,or(9,{destroy:void 0},Iu.bind(null,s,n,i,t),null),i},useId:function(){var e=Tt(),t=Ze.identifierPrefix;if(ze){var i=ui,s=ci;i=(s&~(1<<32-wt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Yn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Rm++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:eo,useFormState:Zu,useActionState:Zu,useOptimistic:function(e){var t=Tt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=to.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:Fl,useCacheRefresh:function(){return Tt().memoizedState=Nm.bind(null,Te)},useEffectEvent:function(e){var t=Tt(),i={impl:e};return t.memoizedState=i,function(){if((qe&2)!==0)throw Error(k(440));return i.impl.apply(void 0,arguments)}}},io={readContext:pt,use:Wn,useCallback:oh,useContext:pt,useEffect:Ql,useImperativeHandle:lh,useInsertionEffect:rh,useLayoutEffect:nh,useMemo:ch,useReducer:Xn,useRef:th,useState:function(){return Xn(Ei)},useDebugValue:Zl,useDeferredValue:function(e,t){var i=rt();return uh(i,We.memoizedState,e,t)},useTransition:function(){var e=Xn(Ei)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gr(e),t]},useSyncExternalStore:Uu,useId:_h,useHostTransitionStatus:eo,useFormState:Ju,useActionState:Ju,useOptimistic:function(e,t){var i=rt();return Fu(i,We,e,t)},useMemoCache:Fl,useCacheRefresh:mh};io.useEffectEvent=sh;var bh={readContext:pt,use:Wn,useCallback:oh,useContext:pt,useEffect:Ql,useImperativeHandle:lh,useInsertionEffect:rh,useLayoutEffect:nh,useMemo:ch,useReducer:Kl,useRef:th,useState:function(){return Kl(Ei)},useDebugValue:Zl,useDeferredValue:function(e,t){var i=rt();return We===null?Jl(i,e,t):uh(i,We.memoizedState,e,t)},useTransition:function(){var e=Kl(Ei)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gr(e),t]},useSyncExternalStore:Uu,useId:_h,useHostTransitionStatus:eo,useFormState:eh,useActionState:eh,useOptimistic:function(e,t){var i=rt();return We!==null?Fu(i,We,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Fl,useCacheRefresh:mh};bh.useEffectEvent=sh;function so(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:f({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var ro={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Gt(),r=Wi(s);r.payload=t,i!=null&&(r.callback=i),t=Xi(e,r,s),t!==null&&(zt(t,e,s),Ur(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Gt(),r=Wi(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Xi(e,r,s),t!==null&&(zt(t,e,s),Ur(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Gt(),s=Wi(i);s.tag=2,t!=null&&(s.callback=t),t=Xi(e,s,i),t!==null&&(zt(t,e,i),Ur(t,e,i))}};function yh(e,t,i,s,r,n,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,S):t.prototype&&t.prototype.isPureReactComponent?!Or(i,s)||!Or(r,n):!0}function Ch(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function ks(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=f({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function wh(e){kn(e)}function xh(e){console.error(e)}function Eh(e){kn(e)}function $n(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Ah(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function no(e,t,i){return i=Wi(i),i.tag=3,i.payload={element:null},i.callback=function(){$n(e,t)},i}function Dh(e){return e=Wi(e),e.tag=3,e}function Th(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Ah(t,i,s)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){Ah(t,i,s),typeof r!="function"&&(ts===null?ts=new Set([this]):ts.add(this));var O=s.stack;this.componentDidCatch(s.value,{componentStack:O!==null?O:""})})}function Hm(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&er(t,i,r,!0),i=Ut.current,i!==null){switch(i.tag){case 31:case 13:return Zt===null?ha():i.alternate===null&&it===0&&(it=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===qn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Oo(e,s,r)),!1;case 22:return i.flags|=65536,s===qn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Oo(e,s,r)),!1}throw Error(k(435,i.tag))}return Oo(e,s,r),ha(),!1}if(ze)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==xl&&(e=Error(k(422),{cause:s}),Br(Kt(e,i)))):(s!==xl&&(t=Error(k(423),{cause:s}),Br(Kt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Kt(s,i),r=no(e.stateNode,s,r),Nl(e,r),it!==4&&(it=2)),!1;var n=Error(k(520),{cause:s});if(n=Kt(n,i),$r===null?$r=[n]:$r.push(n),it!==4&&(it=2),t===null)return!0;s=Kt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=no(i.stateNode,s,e),Nl(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(ts===null||!ts.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Dh(r),Th(r,e,i,s),Nl(i,r),!1}i=i.return}while(i!==null);return!1}var ao=Error(k(461)),ot=!1;function St(e,t,i,s){t.child=e===null?Lu(t,null,i,s):Ts(t,e.child,i,s)}function Rh(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var S={};for(var O in s)O!=="ref"&&(S[O]=s[O])}else S=s;return xs(t),s=Il(e,t,i,S,n,r),O=Pl(),e!==null&&!ot?(Gl(e,t,r),Ai(e,t,r)):(ze&&O&&Cl(t),t.flags|=1,St(e,t,s,r),t.child)}function kh(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!Sl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Oh(e,t,n,s,r)):(e=Bn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!mo(e,r)){var S=n.memoizedProps;if(i=i.compare,i=i!==null?i:Or,i(S,s)&&e.ref===t.ref)return Ai(e,t,r)}return t.flags|=1,e=bi(n,s),e.ref=t.ref,e.return=t,t.child=e}function Oh(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Or(n,s)&&e.ref===t.ref)if(ot=!1,t.pendingProps=s=n,mo(e,r))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,Ai(e,t,r)}return lo(e,t,i,s,r)}function Lh(e,t,i,s){var r=s.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return Mh(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&jn(t,n!==null?n.cachePool:null),n!==null?Nu(t,n):Hl(),zu(t);else return s=t.lanes=536870912,Mh(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(jn(t,n.cachePool),Nu(t,n),Zi(),t.memoizedState=null):(e!==null&&jn(t,null),Hl(),Zi());return St(e,t,r,i),t.child}function Yr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mh(e,t,i,s,r){var n=Ol();return n=n===null?null:{parent:at._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&jn(t,null),Hl(),zu(t),e!==null&&er(e,t,s,!0),t.childLanes=r,null}function ea(e,t){return t=ia({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bh(e,t,i){return Ts(t,e.child,null,i),e=ea(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function jm(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(s.mode==="hidden")return e=ea(t,s),t.lanes=536870912,Yr(null,e);if(Ul(t),(e=Je)?(e=Kf(e,Qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gi!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},i=gu(e),i.return=t,t.child=i,gt=t,Je=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return ea(t,s)}var n=e.memoizedState;if(n!==null){var S=n.dehydrated;if(Ul(t),r)if(t.flags&256)t.flags&=-257,t=Bh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(k(558));else if(ot||er(e,t,i,!1),r=(i&e.childLanes)!==0,ot||r){if(s=Ze,s!==null&&(S=xc(s,i),S!==0&&S!==n.retryLane))throw n.retryLane=S,bs(e,S),zt(s,e,S),ao;ha(),t=Bh(e,t,i)}else e=n.treeContext,Je=Jt(S.nextSibling),gt=t,ze=!0,Vi=null,Qt=!1,e!==null&&bu(t,e),t=ea(t,s),t.flags|=4096;return t}return e=bi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ta(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(k(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function lo(e,t,i,s,r){return xs(t),i=Il(e,t,i,s,void 0,r),s=Pl(),e!==null&&!ot?(Gl(e,t,r),Ai(e,t,r)):(ze&&s&&Cl(t),t.flags|=1,St(e,t,i,r),t.child)}function Nh(e,t,i,s,r,n){return xs(t),t.updateQueue=null,i=ju(t,s,i,r),Hu(e),s=Pl(),e!==null&&!ot?(Gl(e,t,n),Ai(e,t,n)):(ze&&s&&Cl(t),t.flags|=1,St(e,t,i,n),t.child)}function zh(e,t,i,s,r){if(xs(t),t.stateNode===null){var n=Qs,S=i.contextType;typeof S=="object"&&S!==null&&(n=pt(S)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=ro,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},Ml(t),S=i.contextType,n.context=typeof S=="object"&&S!==null?pt(S):Qs,n.state=t.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(so(t,i,S,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(S=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),S!==n.state&&ro.enqueueReplaceState(n,n.state,null),Ir(t,s,n,r),qr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var O=t.memoizedProps,I=ks(i,O);n.props=I;var ee=n.context,le=i.contextType;S=Qs,typeof le=="object"&&le!==null&&(S=pt(le));var ue=i.getDerivedStateFromProps;le=typeof ue=="function"||typeof n.getSnapshotBeforeUpdate=="function",O=t.pendingProps!==O,le||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(O||ee!==S)&&Ch(t,n,s,S),Ki=!1;var te=t.memoizedState;n.state=te,Ir(t,s,n,r),qr(),ee=t.memoizedState,O||te!==ee||Ki?(typeof ue=="function"&&(so(t,i,ue,s),ee=t.memoizedState),(I=Ki||yh(t,i,I,s,te,ee,S))?(le||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ee),n.props=s,n.state=ee,n.context=S,s=I):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,Bl(e,t),S=t.memoizedProps,le=ks(i,S),n.props=le,ue=t.pendingProps,te=n.context,ee=i.contextType,I=Qs,typeof ee=="object"&&ee!==null&&(I=pt(ee)),O=i.getDerivedStateFromProps,(ee=typeof O=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(S!==ue||te!==I)&&Ch(t,n,s,I),Ki=!1,te=t.memoizedState,n.state=te,Ir(t,s,n,r),qr();var re=t.memoizedState;S!==ue||te!==re||Ki||e!==null&&e.dependencies!==null&&zn(e.dependencies)?(typeof O=="function"&&(so(t,i,O,s),re=t.memoizedState),(le=Ki||yh(t,i,le,s,te,re,I)||e!==null&&e.dependencies!==null&&zn(e.dependencies))?(ee||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,re,I),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,re,I)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=re),n.props=s,n.state=re,n.context=I,s=le):(typeof n.componentDidUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,ta(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=Ts(t,e.child,null,r),t.child=Ts(t,null,i,r)):St(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ai(e,t,r),e}function Hh(e,t,i,s){return Cs(),t.flags|=256,St(e,t,i,s),t.child}var oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function co(e){return{baseLanes:e,cachePool:Au()}}function uo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Pt),e}function jh(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,S;if((S=n)||(S=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),S&&(r=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(r?Qi(t):Zi(),(e=Je)?(e=Kf(e,Qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gi!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},i=gu(e),i.return=t,t.child=i,gt=t,Je=null)):e=null,e===null)throw Fi(t);return Ko(e)?t.lanes=32:t.lanes=536870912,null}var O=s.children;return s=s.fallback,r?(Zi(),r=t.mode,O=ia({mode:"hidden",children:O},r),s=ys(s,r,i,null),O.return=t,s.return=t,O.sibling=s,t.child=O,s=t.child,s.memoizedState=co(i),s.childLanes=uo(e,S,i),t.memoizedState=oo,Yr(null,s)):(Qi(t),ho(t,O))}var I=e.memoizedState;if(I!==null&&(O=I.dehydrated,O!==null)){if(n)t.flags&256?(Qi(t),t.flags&=-257,t=fo(e,t,i)):t.memoizedState!==null?(Zi(),t.child=e.child,t.flags|=128,t=null):(Zi(),O=s.fallback,r=t.mode,s=ia({mode:"visible",children:s.children},r),O=ys(O,r,i,null),O.flags|=2,s.return=t,O.return=t,s.sibling=O,t.child=s,Ts(t,e.child,null,i),s=t.child,s.memoizedState=co(i),s.childLanes=uo(e,S,i),t.memoizedState=oo,t=Yr(null,s));else if(Qi(t),Ko(O)){if(S=O.nextSibling&&O.nextSibling.dataset,S)var ee=S.dgst;S=ee,s=Error(k(419)),s.stack="",s.digest=S,Br({value:s,source:null,stack:null}),t=fo(e,t,i)}else if(ot||er(e,t,i,!1),S=(i&e.childLanes)!==0,ot||S){if(S=Ze,S!==null&&(s=xc(S,i),s!==0&&s!==I.retryLane))throw I.retryLane=s,bs(e,s),zt(S,e,s),ao;Yo(O)||ha(),t=fo(e,t,i)}else Yo(O)?(t.flags|=192,t.child=e.child,t=null):(e=I.treeContext,Je=Jt(O.nextSibling),gt=t,ze=!0,Vi=null,Qt=!1,e!==null&&bu(t,e),t=ho(t,s.children),t.flags|=4096);return t}return r?(Zi(),O=s.fallback,r=t.mode,I=e.child,ee=I.sibling,s=bi(I,{mode:"hidden",children:s.children}),s.subtreeFlags=I.subtreeFlags&65011712,ee!==null?O=bi(ee,O):(O=ys(O,r,i,null),O.flags|=2),O.return=t,s.return=t,s.sibling=O,t.child=s,Yr(null,s),s=t.child,O=e.child.memoizedState,O===null?O=co(i):(r=O.cachePool,r!==null?(I=at._currentValue,r=r.parent!==I?{parent:I,pool:I}:r):r=Au(),O={baseLanes:O.baseLanes|i,cachePool:r}),s.memoizedState=O,s.childLanes=uo(e,S,i),t.memoizedState=oo,Yr(e.child,s)):(Qi(t),i=e.child,e=i.sibling,i=bi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=i,t.memoizedState=null,i)}function ho(e,t){return t=ia({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ia(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function fo(e,t,i){return Ts(t,e.child,null,i),e=ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Uh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Dl(e.return,t,i)}function _o(e,t,i,s,r,n){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=s,S.tail=i,S.tailMode=r,S.treeForkCount=n)}function qh(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var S=st.current,O=(S&2)!==0;if(O?(S=S&1|2,t.flags|=128):S&=1,W(st,S),St(e,t,s,i),s=ze?Mr:0,!O&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uh(e,i,t);else if(e.tag===19)Uh(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(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&Vn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),_o(t,!1,r,i,n,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Vn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}_o(t,!0,i,null,n,s);break;case"together":_o(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ai(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(er(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(k(153));if(t.child!==null){for(e=t.child,i=bi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function mo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zn(e)))}function Um(e,t,i){switch(t.tag){case 3:N(t,t.stateNode.containerInfo),Yi(t,at,e.memoizedState.cache),Cs();break;case 27:case 5:fe(t);break;case 4:N(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ul(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Qi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?jh(e,t,i):(Qi(t),e=Ai(e,t,i),e!==null?e.sibling:null);Qi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(er(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return qh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),W(st,st.current),s)break;return null;case 22:return t.lanes=0,Lh(e,t,i,t.pendingProps);case 24:Yi(t,at,e.memoizedState.cache)}return Ai(e,t,i)}function Ih(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!mo(e,i)&&(t.flags&128)===0)return ot=!1,Um(e,t,i);ot=(e.flags&131072)!==0}else ot=!1,ze&&(t.flags&1048576)!==0&&Su(t,Mr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=As(t.elementType),t.type=e,typeof e=="function")Sl(e)?(s=ks(e,s),t.tag=1,t=zh(null,t,e,s,i)):(t.tag=0,t=lo(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Rh(null,t,e,s,i);break e}else if(r===A){t.tag=14,t=kh(null,t,e,s,i);break e}}throw t=Q(e)||e,Error(k(306,t,""))}}return t;case 0:return lo(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=ks(s,t.pendingProps),zh(e,t,s,r,i);case 3:e:{if(N(t,t.stateNode.containerInfo),e===null)throw Error(k(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,Bl(e,t),Ir(t,s,null,i);var S=t.memoizedState;if(s=S.cache,Yi(t,at,s),s!==n.cache&&Tl(t,[at],i,!0),qr(),s=S.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Hh(e,t,s,i);break e}else if(s!==r){r=Kt(Error(k(424)),t),Br(r),t=Hh(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Je=Jt(e.firstChild),gt=t,ze=!0,Vi=null,Qt=!0,i=Lu(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Cs(),s===r){t=Ai(e,t,i);break e}St(e,t,s,i)}t=t.child}return t;case 26:return ta(e,t),e===null?(i=$f(t.type,null,t.pendingProps,null))?t.memoizedState=i:ze||(i=t.type,e=t.pendingProps,s=pa(he.current).createElement(i),s[vt]=t,s[kt]=e,bt(s,i,e),dt(s),t.stateNode=s):t.memoizedState=$f(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&ze&&(s=t.stateNode=Qf(t.type,t.pendingProps,he.current),gt=t,Qt=!0,r=Je,ns(t.type)?(Wo=r,Je=Jt(s.firstChild)):Je=r),St(e,t,t.pendingProps.children,i),ta(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((r=s=Je)&&(s=mv(s,t.type,t.pendingProps,Qt),s!==null?(t.stateNode=s,gt=t,Je=Jt(s.firstChild),Qt=!1,r=!0):r=!1),r||Fi(t)),fe(t),r=t.type,n=t.pendingProps,S=e!==null?e.memoizedProps:null,s=n.children,Go(r,n)?s=null:S!==null&&Go(r,S)&&(t.flags|=32),t.memoizedState!==null&&(r=Il(e,t,km,null,null,i),on._currentValue=r),ta(e,t),St(e,t,s,i),t.child;case 6:return e===null&&ze&&((e=i=Je)&&(i=vv(i,t.pendingProps,Qt),i!==null?(t.stateNode=i,gt=t,Je=null,e=!0):e=!1),e||Fi(t)),null;case 13:return jh(e,t,i);case 4:return N(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ts(t,null,s,i):St(e,t,s,i),t.child;case 11:return Rh(e,t,t.type,t.pendingProps,i);case 7:return St(e,t,t.pendingProps,i),t.child;case 8:return St(e,t,t.pendingProps.children,i),t.child;case 12:return St(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Yi(t,t.type,s.value),St(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,xs(t),r=pt(r),s=s(r),t.flags|=1,St(e,t,s,i),t.child;case 14:return kh(e,t,t.type,t.pendingProps,i);case 15:return Oh(e,t,t.type,t.pendingProps,i);case 19:return qh(e,t,i);case 31:return jm(e,t,i);case 22:return Lh(e,t,i,t.pendingProps);case 24:return xs(t),s=pt(at),e===null?(r=Ol(),r===null&&(r=Ze,n=Rl(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},Ml(t),Yi(t,at,r)):((e.lanes&i)!==0&&(Bl(e,t),Ir(t,null,null,i),qr()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Yi(t,at,s)):(s=n.cache,Yi(t,at,s),s!==r.cache&&Tl(t,[at],i,!0))),St(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(k(156,t.tag))}function Di(e){e.flags|=4}function vo(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(mf())e.flags|=8192;else throw Ds=qn,Ll}else e.flags&=-16777217}function Ph(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rd(t))if(mf())e.flags|=8192;else throw Ds=qn,Ll}function sa(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ke():536870912,e.lanes|=t,fr|=t)}function Kr(e,t){if(!ze)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 s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function qm(e,t,i){var s=t.pendingProps;switch(wl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),wi(at),se(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&($s(t)?Di(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,El())),$e(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(Di(t),n!==null?($e(t),Ph(t,n)):($e(t),vo(t,r,null,s,i))):n?n!==e.memoizedState?(Di(t),$e(t),Ph(t,n)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Di(t),$e(t),vo(t,r,e,s,i)),null;case 27:if(_e(t),i=he.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(k(166));return $e(t),null}e=Z.current,$s(t)?yu(t):(e=Qf(r,s,i),t.stateNode=e,Di(t))}return $e(t),null;case 5:if(_e(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(k(166));return $e(t),null}if(n=Z.current,$s(t))yu(t);else{var S=pa(he.current);switch(n){case 1:n=S.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=S.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=S.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?S.createElement(r,{is:s.is}):S.createElement(r)}}n[vt]=t,n[kt]=s;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)n.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=n;e:switch(bt(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Di(t)}}return $e(t),vo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(k(166));if(e=he.current,$s(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=gt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[vt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Uf(e.nodeValue,i)),e||Fi(t,!0)}else e=pa(e).createTextNode(s),e[vt]=t,t.stateNode=e}return $e(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=$s(t),i!==null){if(e===null){if(!s)throw Error(k(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(557));e[vt]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else i=El(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(k(558))}return $e(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=$s(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(k(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(k(317));r[vt]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),r=!1}else r=El(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),sa(t,t.updateQueue),$e(t),null);case 4:return se(),e===null&&jo(t.stateNode.containerInfo),$e(t),null;case 10:return wi(t.type),$e(t),null;case 19:if(L(st),s=t.memoizedState,s===null)return $e(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Kr(s,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Vn(e),n!==null){for(t.flags|=128,Kr(s,!1),e=n.updateQueue,t.updateQueue=e,sa(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)vu(i,e),i=i.sibling;return W(st,st.current&1|2),ze&&yi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ge()>oa&&(t.flags|=128,r=!0,Kr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Vn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,sa(t,e),Kr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!ze)return $e(t),null}else 2*Ge()-s.renderingStartTime>oa&&i!==536870912&&(t.flags|=128,r=!0,Kr(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ge(),e.sibling=null,i=st.current,W(st,r?i&1|2:i&1),ze&&yi(t,s.treeForkCount),e):($e(t),null);case 22:case 23:return qt(t),jl(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),i=t.updateQueue,i!==null&&sa(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&L(Es),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),wi(at),$e(t),null;case 25:return null;case 30:return null}throw Error(k(156,t.tag))}function Im(e,t){switch(wl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wi(at),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(k(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(st),null;case 4:return se(),null;case 10:return wi(t.type),null;case 22:case 23:return qt(t),jl(),e!==null&&L(Es),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wi(at),null;case 25:return null;default:return null}}function Gh(e,t){switch(wl(t),t.tag){case 3:wi(at),se();break;case 26:case 27:case 5:_e(t);break;case 4:se();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:L(st);break;case 10:wi(t.type);break;case 22:case 23:qt(t),jl(),e!==null&&L(Es);break;case 24:wi(at)}}function Wr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,S=i.inst;s=n(),S.destroy=s}i=i.next}while(i!==r)}}catch(O){Fe(t,t.return,O)}}function Ji(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var S=s.inst,O=S.destroy;if(O!==void 0){S.destroy=void 0,r=t;var I=i,ee=O;try{ee()}catch(le){Fe(r,I,le)}}}s=s.next}while(s!==n)}}catch(le){Fe(t,t.return,le)}}function Vh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Bu(t,i)}catch(s){Fe(e,e.return,s)}}}function Fh(e,t,i){i.props=ks(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Fe(e,t,s)}}function Xr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Fe(e,t,r)}}function hi(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Fe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Fe(e,t,r)}else i.current=null}function Yh(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){Fe(e,e.return,r)}}function go(e,t,i){try{var s=e.stateNode;cv(s,e.type,i,t),s[kt]=t}catch(r){Fe(e,e.return,r)}}function Kh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ns(e.type)||e.tag===4}function po(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kh(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&&ns(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 So(e,t,i){var s=e.tag;if(s===5||s===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=pi));else if(s!==4&&(s===27&&ns(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(So(e,t,i),e=e.sibling;e!==null;)So(e,t,i),e=e.sibling}function ra(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ns(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ra(e,t,i),e=e.sibling;e!==null;)ra(e,t,i),e=e.sibling}function Wh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);bt(t,s,i),t[vt]=e,t[kt]=i}catch(n){Fe(e,e.return,n)}}var Ti=!1,ct=!1,bo=!1,Xh=typeof WeakSet=="function"?WeakSet:Set,_t=null;function Pm(e,t){if(e=e.containerInfo,Io=Ea,e=lu(e),fl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,n=s.focusNode;s=s.focusOffset;try{i.nodeType,n.nodeType}catch{i=null;break e}var S=0,O=-1,I=-1,ee=0,le=0,ue=e,te=null;t:for(;;){for(var re;ue!==i||r!==0&&ue.nodeType!==3||(O=S+r),ue!==n||s!==0&&ue.nodeType!==3||(I=S+s),ue.nodeType===3&&(S+=ue.nodeValue.length),(re=ue.firstChild)!==null;)te=ue,ue=re;for(;;){if(ue===e)break t;if(te===i&&++ee===r&&(O=S),te===n&&++le===s&&(I=S),(re=ue.nextSibling)!==null)break;ue=te,te=ue.parentNode}ue=re}i=O===-1||I===-1?null:{start:O,end:I}}else i=null}i=i||{start:0,end:0}}else i=null;for(Po={focusedElem:e,selectionRange:i},Ea=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,n=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++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&n!==null){e=void 0,i=t,r=n.memoizedProps,n=n.memoizedState,s=i.stateNode;try{var ge=ks(i.type,r);e=s.getSnapshotBeforeUpdate(ge,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(xe){Fe(i,i.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Fo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fo(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(k(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function Qh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ki(e,i),s&4&&Wr(5,i);break;case 1:if(ki(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(S){Fe(i,i.return,S)}else{var r=ks(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){Fe(i,i.return,S)}}s&64&&Vh(i),s&512&&Xr(i,i.return);break;case 3:if(ki(e,i),s&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{Bu(e,t)}catch(S){Fe(i,i.return,S)}}break;case 27:t===null&&s&4&&Wh(i);case 26:case 5:ki(e,i),t===null&&s&4&&Yh(i),s&512&&Xr(i,i.return);break;case 12:ki(e,i);break;case 31:ki(e,i),s&4&&$h(e,i);break;case 13:ki(e,i),s&4&&ef(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Zm.bind(null,i),gv(e,i))));break;case 22:if(s=i.memoizedState!==null||Ti,!s){t=t!==null&&t.memoizedState!==null||ct,r=Ti;var n=ct;Ti=s,(ct=t)&&!n?Oi(e,i,(i.subtreeFlags&8772)!==0):ki(e,i),Ti=r,ct=n}break;case 30:break;default:ki(e,i)}}function Zh(e){var t=e.alternate;t!==null&&(e.alternate=null,Zh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xa(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 et=null,Lt=!1;function Ri(e,t,i){for(i=i.child;i!==null;)Jh(e,t,i),i=i.sibling}function Jh(e,t,i){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(li,i)}catch{}switch(i.tag){case 26:ct||hi(i,t),Ri(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ct||hi(i,t);var s=et,r=Lt;ns(i.type)&&(et=i.stateNode,Lt=!1),Ri(e,t,i),nn(i.stateNode),et=s,Lt=r;break;case 5:ct||hi(i,t);case 6:if(s=et,r=Lt,et=null,Ri(e,t,i),et=s,Lt=r,et!==null)if(Lt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(n){Fe(i,t,n)}else try{et.removeChild(i.stateNode)}catch(n){Fe(i,t,n)}break;case 18:et!==null&&(Lt?(e=et,Ff(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),br(e)):Ff(et,i.stateNode));break;case 4:s=et,r=Lt,et=i.stateNode.containerInfo,Lt=!0,Ri(e,t,i),et=s,Lt=r;break;case 0:case 11:case 14:case 15:Ji(2,i,t),ct||Ji(4,i,t),Ri(e,t,i);break;case 1:ct||(hi(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Fh(i,t,s)),Ri(e,t,i);break;case 21:Ri(e,t,i);break;case 22:ct=(s=ct)||i.memoizedState!==null,Ri(e,t,i),ct=s;break;default:Ri(e,t,i)}}function $h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{br(e)}catch(i){Fe(t,t.return,i)}}}function ef(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{br(e)}catch(i){Fe(t,t.return,i)}}function Gm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xh),t;default:throw Error(k(435,e.tag))}}function na(e,t){var i=Gm(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=Jm.bind(null,e,s);s.then(r,r)}})}function Mt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,S=t,O=S;e:for(;O!==null;){switch(O.tag){case 27:if(ns(O.type)){et=O.stateNode,Lt=!1;break e}break;case 5:et=O.stateNode,Lt=!1;break e;case 3:case 4:et=O.stateNode.containerInfo,Lt=!0;break e}O=O.return}if(et===null)throw Error(k(160));Jh(n,S,r),et=null,Lt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)tf(t,e),t=t.sibling}var si=null;function tf(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(t,e),Bt(e),s&4&&(Ji(3,e,e.return),Wr(3,e),Ji(5,e,e.return));break;case 1:Mt(t,e),Bt(e),s&512&&(ct||i===null||hi(i,i.return)),s&64&&Ti&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=si;if(Mt(t,e),Bt(e),s&512&&(ct||i===null||hi(i,i.return)),s&4){var n=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":n=r.getElementsByTagName("title")[0],(!n||n[Cr]||n[vt]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),bt(n,s,i),n[vt]=e,dt(n),s=n;break e;case"link":var S=id("link","href",r).get(s+(i.href||""));if(S){for(var O=0;O<S.length;O++)if(n=S[O],n.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&n.getAttribute("rel")===(i.rel==null?null:i.rel)&&n.getAttribute("title")===(i.title==null?null:i.title)&&n.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){S.splice(O,1);break t}}n=r.createElement(s),bt(n,s,i),r.head.appendChild(n);break;case"meta":if(S=id("meta","content",r).get(s+(i.content||""))){for(O=0;O<S.length;O++)if(n=S[O],n.getAttribute("content")===(i.content==null?null:""+i.content)&&n.getAttribute("name")===(i.name==null?null:i.name)&&n.getAttribute("property")===(i.property==null?null:i.property)&&n.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&n.getAttribute("charset")===(i.charSet==null?null:i.charSet)){S.splice(O,1);break t}}n=r.createElement(s),bt(n,s,i),r.head.appendChild(n);break;default:throw Error(k(468,s))}n[vt]=e,dt(n),s=n}e.stateNode=s}else sd(r,e.type,e.stateNode);else e.stateNode=td(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?sd(r,e.type,e.stateNode):td(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&go(e,e.memoizedProps,i.memoizedProps)}break;case 27:Mt(t,e),Bt(e),s&512&&(ct||i===null||hi(i,i.return)),i!==null&&s&4&&go(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Mt(t,e),Bt(e),s&512&&(ct||i===null||hi(i,i.return)),e.flags&32){r=e.stateNode;try{Gs(r,"")}catch(ge){Fe(e,e.return,ge)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,go(e,r,i!==null?i.memoizedProps:r)),s&1024&&(bo=!0);break;case 6:if(Mt(t,e),Bt(e),s&4){if(e.stateNode===null)throw Error(k(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ge){Fe(e,e.return,ge)}}break;case 3:if(ya=null,r=si,si=Sa(t.containerInfo),Mt(t,e),si=r,Bt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{br(t.containerInfo)}catch(ge){Fe(e,e.return,ge)}bo&&(bo=!1,sf(e));break;case 4:s=si,si=Sa(e.stateNode.containerInfo),Mt(t,e),Bt(e),si=s;break;case 12:Mt(t,e),Bt(e);break;case 31:Mt(t,e),Bt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,na(e,s)));break;case 13:Mt(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(la=Ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,na(e,s)));break;case 22:r=e.memoizedState!==null;var I=i!==null&&i.memoizedState!==null,ee=Ti,le=ct;if(Ti=ee||r,ct=le||I,Mt(t,e),ct=le,Ti=ee,Bt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||I||Ti||ct||Os(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){I=i=t;try{if(n=I.stateNode,r)S=n.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{O=I.stateNode;var ue=I.memoizedProps.style,te=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;O.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ge){Fe(I,I.return,ge)}}}else if(t.tag===6){if(i===null){I=t;try{I.stateNode.nodeValue=r?"":I.memoizedProps}catch(ge){Fe(I,I.return,ge)}}}else if(t.tag===18){if(i===null){I=t;try{var re=I.stateNode;r?Yf(re,!0):Yf(I.stateNode,!1)}catch(ge){Fe(I,I.return,ge)}}}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}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,na(e,i))));break;case 19:Mt(t,e),Bt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,na(e,s)));break;case 30:break;case 21:break;default:Mt(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Kh(s)){i=s;break}s=s.return}if(i==null)throw Error(k(160));switch(i.tag){case 27:var r=i.stateNode,n=po(e);ra(e,n,r);break;case 5:var S=i.stateNode;i.flags&32&&(Gs(S,""),i.flags&=-33);var O=po(e);ra(e,O,S);break;case 3:case 4:var I=i.stateNode.containerInfo,ee=po(e);So(e,ee,I);break;default:throw Error(k(161))}}catch(le){Fe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ki(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qh(e,t.alternate,t),t=t.sibling}function Os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ji(4,t,t.return),Os(t);break;case 1:hi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Fh(t,t.return,i),Os(t);break;case 27:nn(t.stateNode);case 26:case 5:hi(t,t.return),Os(t);break;case 22:t.memoizedState===null&&Os(t);break;case 30:Os(t);break;default:Os(t)}e=e.sibling}}function Oi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,S=n.flags;switch(n.tag){case 0:case 11:case 15:Oi(r,n,i),Wr(4,n);break;case 1:if(Oi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(ee){Fe(s,s.return,ee)}if(s=n,r=s.updateQueue,r!==null){var O=s.stateNode;try{var I=r.shared.hiddenCallbacks;if(I!==null)for(r.shared.hiddenCallbacks=null,r=0;r<I.length;r++)Mu(I[r],O)}catch(ee){Fe(s,s.return,ee)}}i&&S&64&&Vh(n),Xr(n,n.return);break;case 27:Wh(n);case 26:case 5:Oi(r,n,i),i&&s===null&&S&4&&Yh(n),Xr(n,n.return);break;case 12:Oi(r,n,i);break;case 31:Oi(r,n,i),i&&S&4&&$h(r,n);break;case 13:Oi(r,n,i),i&&S&4&&ef(r,n);break;case 22:n.memoizedState===null&&Oi(r,n,i),Xr(n,n.return);break;case 30:break;default:Oi(r,n,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&&Nr(i))}function Co(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nr(e))}function ri(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)rf(e,t,i,s),t=t.sibling}function rf(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ri(e,t,i,s),r&2048&&Wr(9,t);break;case 1:ri(e,t,i,s);break;case 3:ri(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nr(e)));break;case 12:if(r&2048){ri(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,S=n.id,O=n.onPostCommit;typeof O=="function"&&O(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(I){Fe(t,t.return,I)}}else ri(e,t,i,s);break;case 31:ri(e,t,i,s);break;case 13:ri(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,S=t.alternate,t.memoizedState!==null?n._visibility&2?ri(e,t,i,s):Qr(e,t):n._visibility&2?ri(e,t,i,s):(n._visibility|=2,cr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&yo(S,t);break;case 24:ri(e,t,i,s),r&2048&&Co(t.alternate,t);break;default:ri(e,t,i,s)}}function cr(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,S=t,O=i,I=s,ee=S.flags;switch(S.tag){case 0:case 11:case 15:cr(n,S,O,I,r),Wr(8,S);break;case 23:break;case 22:var le=S.stateNode;S.memoizedState!==null?le._visibility&2?cr(n,S,O,I,r):Qr(n,S):(le._visibility|=2,cr(n,S,O,I,r)),r&&ee&2048&&yo(S.alternate,S);break;case 24:cr(n,S,O,I,r),r&&ee&2048&&Co(S.alternate,S);break;default:cr(n,S,O,I,r)}t=t.sibling}}function Qr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Qr(i,s),r&2048&&yo(s.alternate,s);break;case 24:Qr(i,s),r&2048&&Co(s.alternate,s);break;default:Qr(i,s)}t=t.sibling}}var Zr=8192;function ur(e,t,i){if(e.subtreeFlags&Zr)for(e=e.child;e!==null;)nf(e,t,i),e=e.sibling}function nf(e,t,i){switch(e.tag){case 26:ur(e,t,i),e.flags&Zr&&e.memoizedState!==null&&Rv(i,si,e.memoizedState,e.memoizedProps);break;case 5:ur(e,t,i);break;case 3:case 4:var s=si;si=Sa(e.stateNode.containerInfo),ur(e,t,i),si=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Zr,Zr=16777216,ur(e,t,i),Zr=s):ur(e,t,i));break;default:ur(e,t,i)}}function af(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 Jr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];_t=s,of(s,e)}af(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lf(e),e=e.sibling}function lf(e){switch(e.tag){case 0:case 11:case 15:Jr(e),e.flags&2048&&Ji(9,e,e.return);break;case 3:Jr(e);break;case 12:Jr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,aa(e)):Jr(e);break;default:Jr(e)}}function aa(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];_t=s,of(s,e)}af(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ji(8,t,t.return),aa(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,aa(t));break;default:aa(t)}e=e.sibling}}function of(e,t){for(;_t!==null;){var i=_t;switch(i.tag){case 0:case 11:case 15:Ji(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Nr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,_t=s;else e:for(i=e;_t!==null;){s=_t;var r=s.sibling,n=s.return;if(Zh(s),s===i){_t=null;break e}if(r!==null){r.return=n,_t=r;break e}_t=n}}}var Vm={getCacheForType:function(e){var t=pt(at),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return pt(at).controller.signal}},Fm=typeof WeakMap=="function"?WeakMap:Map,qe=0,Ze=null,Le=null,Be=0,Ve=0,It=null,$i=!1,hr=!1,wo=!1,Li=0,it=0,es=0,Ls=0,xo=0,Pt=0,fr=0,$r=null,Nt=null,Eo=!1,la=0,cf=0,oa=1/0,ca=null,ts=null,ut=0,is=null,dr=null,Mi=0,Ao=0,Do=null,uf=null,en=0,To=null;function Gt(){return(qe&2)!==0&&Be!==0?Be&-Be:P.T!==null?Bo():Ec()}function hf(){if(Pt===0)if((Be&536870912)===0||ze){var e=zs;zs<<=1,(zs&3932160)===0&&(zs=262144),Pt=e}else Pt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Pt}function zt(e,t,i){(e===Ze&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(_r(e,0),ss(e,Be,Pt,!1)),yr(e,i),((qe&2)===0||e!==Ze)&&(e===Ze&&((qe&2)===0&&(Ls|=i),it===4&&ss(e,Be,Pt,!1)),fi(e))}function ff(e,t,i){if((qe&6)!==0)throw Error(k(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||we(e,t),r=s?Wm(e,t):ko(e,t,!0),n=s;do{if(r===0){hr&&!s&&ss(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!Ym(i)){r=ko(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var O=e;r=$r;var I=O.current.memoizedState.isDehydrated;if(I&&(_r(O,S).flags|=256),S=ko(O,S,!1),S!==2){if(wo&&!I){O.errorRecoveryDisabledLanes|=n,Ls|=n,r=4;break e}n=Nt,Nt=r,n!==null&&(Nt===null?Nt=n:Nt.push.apply(Nt,n))}r=S}if(n=!1,r!==2)continue}}if(r===1){_r(e,0),ss(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(k(345));case 4:if((t&4194048)!==t)break;case 6:ss(s,t,Pt,!$i);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(k(329))}if((t&62914560)===t&&(r=la+300-Ge(),10<r)){if(ss(s,t,Pt,!$i),ye(s,0,!0)!==0)break e;Mi=t,s.timeoutHandle=Gf(df.bind(null,s,i,Nt,ca,Eo,t,Pt,Ls,fr,$i,n,"Throttled",-0,0),r);break e}df(s,i,Nt,ca,Eo,t,Pt,Ls,fr,$i,n,null,-0,0)}}break}while(!0);fi(e)}function df(e,t,i,s,r,n,S,O,I,ee,le,ue,te,re){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pi},nf(t,n,ue);var ge=(n&62914560)===n?la-Ge():(n&4194048)===n?cf-Ge():0;if(ge=kv(ue,ge),ge!==null){Mi=n,e.cancelPendingCommit=ge(yf.bind(null,e,t,n,i,s,r,S,O,I,le,ue,null,te,re)),ss(e,n,S,!ee);return}}yf(e,t,n,i,s,r,S,O,I)}function Ym(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 s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!Ht(n(),r))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 ss(e,t,i,s){t&=~xo,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-wt(r),S=1<<n;s[n]=-1,r&=~S}i!==0&&Cc(e,i,t)}function ua(){return(qe&6)===0?(tn(0),!1):!0}function Ro(){if(Le!==null){if(Ve===0)var e=Le.return;else e=Le,Ci=ws=null,Vl(e),rr=null,Hr=0,e=Le;for(;e!==null;)Gh(e.alternate,e),e=e.return;Le=null}}function _r(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,fv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Mi=0,Ro(),Ze=e,Le=i=bi(e.current,null),Be=t,Ve=0,It=null,$i=!1,hr=we(e,t),wo=!1,fr=Pt=xo=Ls=es=it=0,Nt=$r=null,Eo=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-wt(s),n=1<<r;t|=e[r],s&=~n}return Li=t,On(),i}function _f(e,t){Te=null,P.H=Fr,t===sr||t===Un?(t=Ru(),Ve=3):t===Ll?(t=Ru(),Ve=4):Ve=t===ao?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,Le===null&&(it=1,$n(e,Kt(t,e.current)))}function mf(){var e=Ut.current;return e===null?!0:(Be&4194048)===Be?Zt===null:(Be&62914560)===Be||(Be&536870912)!==0?e===Zt:!1}function vf(){var e=P.H;return P.H=Fr,e===null?Fr:e}function gf(){var e=P.A;return P.A=Vm,e}function ha(){it=4,$i||(Be&4194048)!==Be&&Ut.current!==null||(hr=!0),(es&134217727)===0&&(Ls&134217727)===0||Ze===null||ss(Ze,Be,Pt,!1)}function ko(e,t,i){var s=qe;qe|=2;var r=vf(),n=gf();(Ze!==e||Be!==t)&&(ca=null,_r(e,t)),t=!1;var S=it;e:do try{if(Ve!==0&&Le!==null){var O=Le,I=It;switch(Ve){case 8:Ro(),S=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var ee=Ve;if(Ve=0,It=null,mr(e,O,I,ee),i&&hr){S=0;break e}break;default:ee=Ve,Ve=0,It=null,mr(e,O,I,ee)}}Km(),S=it;break}catch(le){_f(e,le)}while(!0);return t&&e.shellSuspendCounter++,Ci=ws=null,qe=s,P.H=r,P.A=n,Le===null&&(Ze=null,Be=0,On()),S}function Km(){for(;Le!==null;)pf(Le)}function Wm(e,t){var i=qe;qe|=2;var s=vf(),r=gf();Ze!==e||Be!==t?(ca=null,oa=Ge()+500,_r(e,t)):hr=we(e,t);e:do try{if(Ve!==0&&Le!==null){t=Le;var n=It;t:switch(Ve){case 1:Ve=0,It=null,mr(e,t,n,1);break;case 2:case 9:if(Du(n)){Ve=0,It=null,Sf(t);break}t=function(){Ve!==2&&Ve!==9||Ze!==e||(Ve=7),fi(e)},n.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:Du(n)?(Ve=0,It=null,Sf(t)):(Ve=0,It=null,mr(e,t,n,7));break;case 5:var S=null;switch(Le.tag){case 26:S=Le.memoizedState;case 5:case 27:var O=Le;if(S?rd(S):O.stateNode.complete){Ve=0,It=null;var I=O.sibling;if(I!==null)Le=I;else{var ee=O.return;ee!==null?(Le=ee,fa(ee)):Le=null}break t}}Ve=0,It=null,mr(e,t,n,5);break;case 6:Ve=0,It=null,mr(e,t,n,6);break;case 8:Ro(),it=6;break e;default:throw Error(k(462))}}Xm();break}catch(le){_f(e,le)}while(!0);return Ci=ws=null,P.H=s,P.A=r,qe=i,Le!==null?0:(Ze=null,Be=0,On(),it)}function Xm(){for(;Le!==null&&!Ui();)pf(Le)}function pf(e){var t=Ih(e.alternate,e,Li);e.memoizedProps=e.pendingProps,t===null?fa(e):Le=t}function Sf(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Nh(i,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=Nh(i,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:Vl(t);default:Gh(i,t),t=Le=vu(t,Li),t=Ih(i,t,Li)}e.memoizedProps=e.pendingProps,t===null?fa(e):Le=t}function mr(e,t,i,s){Ci=ws=null,Vl(t),rr=null,Hr=0;var r=t.return;try{if(Hm(e,r,t,i,Be)){it=1,$n(e,Kt(i,e.current)),Le=null;return}}catch(n){if(r!==null)throw Le=r,n;it=1,$n(e,Kt(i,e.current)),Le=null;return}t.flags&32768?(ze||s===1?e=!0:hr||(Be&536870912)!==0?e=!1:($i=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),bf(t,e)):fa(t)}function fa(e){var t=e;do{if((t.flags&32768)!==0){bf(t,$i);return}e=t.return;var i=qm(t.alternate,t,Li);if(i!==null){Le=i;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);it===0&&(it=5)}function bf(e,t){do{var i=Im(e.alternate,e);if(i!==null){i.flags&=32767,Le=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=i}while(e!==null);it=6,Le=null}function yf(e,t,i,s,r,n,S,O,I){e.cancelPendingCommit=null;do da();while(ut!==0);if((qe&6)!==0)throw Error(k(327));if(t!==null){if(t===e.current)throw Error(k(177));if(n=t.lanes|t.childLanes,n|=gl,T_(e,i,n,S,O,I),e===Ze&&(Le=Ze=null,Be=0),dr=t,is=e,Mi=i,Ao=n,Do=r,uf=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$m(At,function(){return Af(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=P.T,P.T=null,r=J.p,J.p=2,S=qe,qe|=4;try{Pm(e,t,i)}finally{qe=S,J.p=r,P.T=s}}ut=1,Cf(),wf(),xf()}}function Cf(){if(ut===1){ut=0;var e=is,t=dr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=P.T,P.T=null;var s=J.p;J.p=2;var r=qe;qe|=4;try{tf(t,e);var n=Po,S=lu(e.containerInfo),O=n.focusedElem,I=n.selectionRange;if(S!==O&&O&&O.ownerDocument&&au(O.ownerDocument.documentElement,O)){if(I!==null&&fl(O)){var ee=I.start,le=I.end;if(le===void 0&&(le=ee),"selectionStart"in O)O.selectionStart=ee,O.selectionEnd=Math.min(le,O.value.length);else{var ue=O.ownerDocument||document,te=ue&&ue.defaultView||window;if(te.getSelection){var re=te.getSelection(),ge=O.textContent.length,xe=Math.min(I.start,ge),Qe=I.end===void 0?xe:Math.min(I.end,ge);!re.extend&&xe>Qe&&(S=Qe,Qe=xe,xe=S);var X=nu(O,xe),V=nu(O,Qe);if(X&&V&&(re.rangeCount!==1||re.anchorNode!==X.node||re.anchorOffset!==X.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var $=ue.createRange();$.setStart(X.node,X.offset),re.removeAllRanges(),xe>Qe?(re.addRange($),re.extend(V.node,V.offset)):($.setEnd(V.node,V.offset),re.addRange($))}}}}for(ue=[],re=O;re=re.parentNode;)re.nodeType===1&&ue.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ue.length;O++){var ce=ue[O];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Ea=!!Io,Po=Io=null}finally{qe=r,J.p=s,P.T=i}}e.current=t,ut=2}}function wf(){if(ut===2){ut=0;var e=is,t=dr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=P.T,P.T=null;var s=J.p;J.p=2;var r=qe;qe|=4;try{Qh(e,t.alternate,t)}finally{qe=r,J.p=s,P.T=i}}ut=3}}function xf(){if(ut===4||ut===3){ut=0,mt();var e=is,t=dr,i=Mi,s=uf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,dr=is=null,Ef(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ts=null),Ka(i),t=t.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(li,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=P.T,r=J.p,J.p=2,P.T=null;try{for(var n=e.onRecoverableError,S=0;S<s.length;S++){var O=s[S];n(O.value,{componentStack:O.stack})}}finally{P.T=t,J.p=r}}(Mi&3)!==0&&da(),fi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===To?en++:(en=0,To=e):en=0,tn(0)}}function Ef(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Nr(t)))}function da(){return Cf(),wf(),xf(),Af()}function Af(){if(ut!==5)return!1;var e=is,t=Ao;Ao=0;var i=Ka(Mi),s=P.T,r=J.p;try{J.p=32>i?32:i,P.T=null,i=Do,Do=null;var n=is,S=Mi;if(ut=0,dr=is=null,Mi=0,(qe&6)!==0)throw Error(k(331));var O=qe;if(qe|=4,lf(n.current),rf(n,n.current,S,i),qe=O,tn(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(li,n)}catch{}return!0}finally{J.p=r,P.T=s,Ef(e,t)}}function Df(e,t,i){t=Kt(i,t),t=no(e.stateNode,t,2),e=Xi(e,t,2),e!==null&&(yr(e,2),fi(e))}function Fe(e,t,i){if(e.tag===3)Df(e,e,i);else for(;t!==null;){if(t.tag===3){Df(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ts===null||!ts.has(s))){e=Kt(i,e),i=Dh(2),s=Xi(t,i,2),s!==null&&(Th(i,s,t,e),yr(s,2),fi(s));break}}t=t.return}}function Oo(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Fm;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(wo=!0,r.add(i),e=Qm.bind(null,e,t,i),t.then(e,e))}function Qm(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ze===e&&(Be&i)===i&&(it===4||it===3&&(Be&62914560)===Be&&300>Ge()-la?(qe&2)===0&&_r(e,0):xo|=i,fr===Be&&(fr=0)),fi(e)}function Tf(e,t){t===0&&(t=Ke()),e=bs(e,t),e!==null&&(yr(e,t),fi(e))}function Zm(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Tf(e,i)}function Jm(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(k(314))}s!==null&&s.delete(t),Tf(e,i)}function $m(e,t){return mi(e,t)}var _a=null,vr=null,Lo=!1,ma=!1,Mo=!1,rs=0;function fi(e){e!==vr&&e.next===null&&(vr===null?_a=vr=e:vr=vr.next=e),ma=!0,Lo||(Lo=!0,tv())}function tn(e,t){if(!Mo&&ma){Mo=!0;do for(var i=!1,s=_a;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var S=s.suspendedLanes,O=s.pingedLanes;n=(1<<31-wt(42|e)+1)-1,n&=r&~(S&~O),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Lf(s,n))}else n=Be,n=ye(s,s===Ze?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||we(s,n)||(i=!0,Lf(s,n));s=s.next}while(i);Mo=!1}}function ev(){Rf()}function Rf(){ma=Lo=!1;var e=0;rs!==0&&hv()&&(e=rs);for(var t=Ge(),i=null,s=_a;s!==null;){var r=s.next,n=kf(s,t);n===0?(s.next=null,i===null?_a=r:i.next=r,r===null&&(vr=i)):(i=s,(e!==0||(n&3)!==0)&&(ma=!0)),s=r}ut!==0&&ut!==5||tn(e),rs!==0&&(rs=0)}function kf(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var S=31-wt(n),O=1<<S,I=r[S];I===-1?((O&i)===0||(O&s)!==0)&&(r[S]=He(O,t)):I<=t&&(e.expiredLanes|=O),n&=~O}if(t=Ze,i=Be,i=ye(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ni(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||we(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&ni(s),Ka(i)){case 2:case 8:i=ai;break;case 32:i=At;break;case 268435456:i=Rt;break;default:i=At}return s=Of.bind(null,e),i=mi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&ni(s),e.callbackPriority=2,e.callbackNode=null,2}function Of(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(da()&&e.callbackNode!==i)return null;var s=Be;return s=ye(e,e===Ze?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(ff(e,s,t),kf(e,Ge()),e.callbackNode!=null&&e.callbackNode===i?Of.bind(null,e):null)}function Lf(e,t){if(da())return null;ff(e,t,!0)}function tv(){dv(function(){(qe&6)!==0?mi(ti,ev):Rf()})}function Bo(){if(rs===0){var e=tr;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),rs=e}return rs}function Mf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wn(""+e)}function Bf(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 iv(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Mf((r[kt]||null).action),S=s.submitter;S&&(t=(t=S[kt]||null)?Mf(t.formAction):S.getAttribute("formAction"),t!==null&&(n=t,S=null));var O=new Dn("action","action",null,s,r);e.push({event:O,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(rs!==0){var I=S?Bf(r,S):new FormData(r);$l(i,{pending:!0,data:I,method:r.method,action:n},null,I)}}else typeof n=="function"&&(O.preventDefault(),I=S?Bf(r,S):new FormData(r),$l(i,{pending:!0,data:I,method:r.method,action:n},n,I))},currentTarget:r}]})}}for(var No=0;No<vl.length;No++){var zo=vl[No],sv=zo.toLowerCase(),rv=zo[0].toUpperCase()+zo.slice(1);ii(sv,"on"+rv)}ii(uu,"onAnimationEnd"),ii(hu,"onAnimationIteration"),ii(fu,"onAnimationStart"),ii("dblclick","onDoubleClick"),ii("focusin","onFocus"),ii("focusout","onBlur"),ii(bm,"onTransitionRun"),ii(ym,"onTransitionStart"),ii(Cm,"onTransitionCancel"),ii(du,"onTransitionEnd"),Is("onMouseEnter",["mouseout","mouseover"]),Is("onMouseLeave",["mouseout","mouseover"]),Is("onPointerEnter",["pointerout","pointerover"]),Is("onPointerLeave",["pointerout","pointerover"]),vs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vs("onBeforeInput",["compositionend","keypress","textInput","paste"]),vs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sn="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(" "),nv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sn));function Nf(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var S=s.length-1;0<=S;S--){var O=s[S],I=O.instance,ee=O.currentTarget;if(O=O.listener,I!==n&&r.isPropagationStopped())break e;n=O,r.currentTarget=ee;try{n(r)}catch(le){kn(le)}r.currentTarget=null,n=I}else for(S=0;S<s.length;S++){if(O=s[S],I=O.instance,ee=O.currentTarget,O=O.listener,I!==n&&r.isPropagationStopped())break e;n=O,r.currentTarget=ee;try{n(r)}catch(le){kn(le)}r.currentTarget=null,n=I}}}}function Me(e,t){var i=t[Wa];i===void 0&&(i=t[Wa]=new Set);var s=e+"__bubble";i.has(s)||(zf(t,e,2,!1),i.add(s))}function Ho(e,t,i){var s=0;t&&(s|=4),zf(i,e,s,t)}var va="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[va]){e[va]=!0,Tc.forEach(function(i){i!=="selectionchange"&&(nv.has(i)||Ho(i,!1,e),Ho(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[va]||(t[va]=!0,Ho("selectionchange",!1,t))}}function zf(e,t,i,s){switch(hd(t)){case 2:var r=Mv;break;case 8:r=Bv;break;default:r=$o}i=r.bind(null,t,i,e),r=void 0,!sl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Uo(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var S=s.tag;if(S===3||S===4){var O=s.stateNode.containerInfo;if(O===r)break;if(S===4)for(S=s.return;S!==null;){var I=S.tag;if((I===3||I===4)&&S.stateNode.containerInfo===r)return;S=S.return}for(;O!==null;){if(S=js(O),S===null)return;if(I=S.tag,I===5||I===6||I===26||I===27){s=n=S;continue e}O=O.parentNode}}s=s.return}qc(function(){var ee=n,le=tl(i),ue=[];e:{var te=_u.get(e);if(te!==void 0){var re=Dn,ge=e;switch(e){case"keypress":if(En(i)===0)break e;case"keydown":case"keyup":re=J_;break;case"focusin":ge="focus",re=ll;break;case"focusout":ge="blur",re=ll;break;case"beforeblur":case"afterblur":re=ll;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":re=Gc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=q_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=tm;break;case uu:case hu:case fu:re=G_;break;case du:re=sm;break;case"scroll":case"scrollend":re=j_;break;case"wheel":re=nm;break;case"copy":case"cut":case"paste":re=F_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Fc;break;case"toggle":case"beforetoggle":re=lm}var xe=(t&4)!==0,Qe=!xe&&(e==="scroll"||e==="scrollend"),X=xe?te!==null?te+"Capture":null:te;xe=[];for(var V=ee,$;V!==null;){var ce=V;if($=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||$===null||X===null||(ce=xr(V,X),ce!=null&&xe.push(rn(V,ce,$))),Qe)break;V=V.return}0<xe.length&&(te=new re(te,ge,null,i,le),ue.push({event:te,listeners:xe}))}}if((t&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",re=e==="mouseout"||e==="pointerout",te&&i!==el&&(ge=i.relatedTarget||i.fromElement)&&(js(ge)||ge[Hs]))break e;if((re||te)&&(te=le.window===le?le:(te=le.ownerDocument)?te.defaultView||te.parentWindow:window,re?(ge=i.relatedTarget||i.toElement,re=ee,ge=ge?js(ge):null,ge!==null&&(Qe=K(ge),xe=ge.tag,ge!==Qe||xe!==5&&xe!==27&&xe!==6)&&(ge=null)):(re=null,ge=ee),re!==ge)){if(xe=Gc,ce="onMouseLeave",X="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(xe=Fc,ce="onPointerLeave",X="onPointerEnter",V="pointer"),Qe=re==null?te:wr(re),$=ge==null?te:wr(ge),te=new xe(ce,V+"leave",re,i,le),te.target=Qe,te.relatedTarget=$,ce=null,js(le)===ee&&(xe=new xe(X,V+"enter",ge,i,le),xe.target=$,xe.relatedTarget=Qe,ce=xe),Qe=ce,re&&ge)t:{for(xe=av,X=re,V=ge,$=0,ce=X;ce;ce=xe(ce))$++;ce=0;for(var Ce=V;Ce;Ce=xe(Ce))ce++;for(;0<$-ce;)X=xe(X),$--;for(;0<ce-$;)V=xe(V),ce--;for(;$--;){if(X===V||V!==null&&X===V.alternate){xe=X;break t}X=xe(X),V=xe(V)}xe=null}else xe=null;re!==null&&Hf(ue,te,re,xe,!1),ge!==null&&Qe!==null&&Hf(ue,Qe,ge,xe,!0)}}e:{if(te=ee?wr(ee):window,re=te.nodeName&&te.nodeName.toLowerCase(),re==="select"||re==="input"&&te.type==="file")var je=$c;else if(Zc(te))if(eu)je=gm;else{je=mm;var be=_m}else re=te.nodeName,!re||re.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&$a(ee.elementType)&&(je=$c):je=vm;if(je&&(je=je(e,ee))){Jc(ue,je,i,le);break e}be&&be(e,te,ee),e==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&Ja(te,"number",te.value)}switch(be=ee?wr(ee):window,e){case"focusin":(Zc(be)||be.contentEditable==="true")&&(Ks=be,dl=ee,Lr=null);break;case"focusout":Lr=dl=Ks=null;break;case"mousedown":_l=!0;break;case"contextmenu":case"mouseup":case"dragend":_l=!1,ou(ue,i,le);break;case"selectionchange":if(Sm)break;case"keydown":case"keyup":ou(ue,i,le)}var Re;if(cl)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Ys?Xc(e,i)&&(Ne="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ne="onCompositionStart");Ne&&(Yc&&i.locale!=="ko"&&(Ys||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Ys&&(Re=Ic()):(Pi=le,rl="value"in Pi?Pi.value:Pi.textContent,Ys=!0)),be=ga(ee,Ne),0<be.length&&(Ne=new Vc(Ne,e,null,i,le),ue.push({event:Ne,listeners:be}),Re?Ne.data=Re:(Re=Qc(i),Re!==null&&(Ne.data=Re)))),(Re=cm?um(e,i):hm(e,i))&&(Ne=ga(ee,"onBeforeInput"),0<Ne.length&&(be=new Vc("onBeforeInput","beforeinput",null,i,le),ue.push({event:be,listeners:Ne}),be.data=Re)),iv(ue,e,ee,i,le)}Nf(ue,t)})}function rn(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ga(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=xr(e,i),r!=null&&s.unshift(rn(e,r,n)),r=xr(e,t),r!=null&&s.push(rn(e,r,n))),e.tag===3)return s;e=e.return}return[]}function av(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hf(e,t,i,s,r){for(var n=t._reactName,S=[];i!==null&&i!==s;){var O=i,I=O.alternate,ee=O.stateNode;if(O=O.tag,I!==null&&I===s)break;O!==5&&O!==26&&O!==27||ee===null||(I=ee,r?(ee=xr(i,n),ee!=null&&S.unshift(rn(i,ee,I))):r||(ee=xr(i,n),ee!=null&&S.push(rn(i,ee,I)))),i=i.return}S.length!==0&&e.push({event:t,listeners:S})}var lv=/\r\n?/g,ov=/\u0000|\uFFFD/g;function jf(e){return(typeof e=="string"?e:""+e).replace(lv,`
|
|
9
|
+
`).replace(ov,"")}function Uf(e,t){return t=jf(t),jf(e)===t}function Xe(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Gs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Gs(e,""+s);break;case"className":yn(e,"class",s);break;case"tabIndex":yn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":yn(e,i,s);break;case"style":jc(e,s,n);break;case"data":if(t!=="object"){yn(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=wn(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="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 n=="function"&&(i==="formAction"?(t!=="input"&&Xe(e,t,"name",r.name,r,null),Xe(e,t,"formEncType",r.formEncType,r,null),Xe(e,t,"formMethod",r.formMethod,r,null),Xe(e,t,"formTarget",r.formTarget,r,null)):(Xe(e,t,"encType",r.encType,r,null),Xe(e,t,"method",r.method,r,null),Xe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=wn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=pi);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(k(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(k(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=wn(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Me("beforetoggle",e),Me("toggle",e),bn(e,"popover",s);break;case"xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":bn(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=z_.get(i)||i,bn(e,i,s))}}function qo(e,t,i,s,r,n){switch(i){case"style":jc(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(k(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(k(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Gs(e,s):(typeof s=="number"||typeof s=="bigint")&&Gs(e,""+s);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"onClick":s!=null&&(e.onclick=pi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rc.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),n=e[kt]||null,n=n!=null?n[i]:null,typeof n=="function"&&e.removeEventListener(t,n,r),typeof s=="function")){typeof n!="function"&&n!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):bn(e,i,s)}}}function bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var S=i[n];if(S!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(k(137,t));default:Xe(e,t,n,S,i,null)}}r&&Xe(e,t,"srcSet",i.srcSet,i,null),s&&Xe(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var O=n=S=r=null,I=null,ee=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":r=le;break;case"type":S=le;break;case"checked":I=le;break;case"defaultChecked":ee=le;break;case"value":n=le;break;case"defaultValue":O=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(k(137,t));break;default:Xe(e,t,s,le,i,null)}}Bc(e,n,O,I,ee,S,r,!1);return;case"select":Me("invalid",e),s=S=n=null;for(r in i)if(i.hasOwnProperty(r)&&(O=i[r],O!=null))switch(r){case"value":n=O;break;case"defaultValue":S=O;break;case"multiple":s=O;default:Xe(e,t,r,O,i,null)}t=n,i=S,e.multiple=!!s,t!=null?Ps(e,!!s,t,!1):i!=null&&Ps(e,!!s,i,!0);return;case"textarea":Me("invalid",e),n=r=s=null;for(S in i)if(i.hasOwnProperty(S)&&(O=i[S],O!=null))switch(S){case"value":s=O;break;case"defaultValue":r=O;break;case"children":n=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(k(91));break;default:Xe(e,t,S,O,i,null)}zc(e,s,r,n);return;case"option":for(I in i)i.hasOwnProperty(I)&&(s=i[I],s!=null)&&(I==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Xe(e,t,I,s,i,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(s=0;s<sn.length;s++)Me(sn[s],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(ee in i)if(i.hasOwnProperty(ee)&&(s=i[ee],s!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(k(137,t));default:Xe(e,t,ee,s,i,null)}return;default:if($a(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&qo(e,t,le,s,i,void 0));return}}for(O in i)i.hasOwnProperty(O)&&(s=i[O],s!=null&&Xe(e,t,O,s,i,null))}function cv(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,n=null,S=null,O=null,I=null,ee=null,le=null;for(re in i){var ue=i[re];if(i.hasOwnProperty(re)&&ue!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":I=ue;default:s.hasOwnProperty(re)||Xe(e,t,re,null,s,ue)}}for(var te in s){var re=s[te];if(ue=i[te],s.hasOwnProperty(te)&&(re!=null||ue!=null))switch(te){case"type":n=re;break;case"name":r=re;break;case"checked":ee=re;break;case"defaultChecked":le=re;break;case"value":S=re;break;case"defaultValue":O=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(k(137,t));break;default:re!==ue&&Xe(e,t,te,re,s,ue)}}Za(e,S,O,I,ee,le,n,r);return;case"select":re=S=O=te=null;for(n in i)if(I=i[n],i.hasOwnProperty(n)&&I!=null)switch(n){case"value":break;case"multiple":re=I;default:s.hasOwnProperty(n)||Xe(e,t,n,null,s,I)}for(r in s)if(n=s[r],I=i[r],s.hasOwnProperty(r)&&(n!=null||I!=null))switch(r){case"value":te=n;break;case"defaultValue":O=n;break;case"multiple":S=n;default:n!==I&&Xe(e,t,r,n,s,I)}t=O,i=S,s=re,te!=null?Ps(e,!!i,te,!1):!!s!=!!i&&(t!=null?Ps(e,!!i,t,!0):Ps(e,!!i,i?[]:"",!1));return;case"textarea":re=te=null;for(O in i)if(r=i[O],i.hasOwnProperty(O)&&r!=null&&!s.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Xe(e,t,O,null,s,r)}for(S in s)if(r=s[S],n=i[S],s.hasOwnProperty(S)&&(r!=null||n!=null))switch(S){case"value":te=r;break;case"defaultValue":re=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(k(91));break;default:r!==n&&Xe(e,t,S,r,s,n)}Nc(e,te,re);return;case"option":for(var ge in i)te=i[ge],i.hasOwnProperty(ge)&&te!=null&&!s.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:Xe(e,t,ge,null,s,te));for(I in s)te=s[I],re=i[I],s.hasOwnProperty(I)&&te!==re&&(te!=null||re!=null)&&(I==="selected"?e.selected=te&&typeof te!="function"&&typeof te!="symbol":Xe(e,t,I,te,s,re));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 xe in i)te=i[xe],i.hasOwnProperty(xe)&&te!=null&&!s.hasOwnProperty(xe)&&Xe(e,t,xe,null,s,te);for(ee in s)if(te=s[ee],re=i[ee],s.hasOwnProperty(ee)&&te!==re&&(te!=null||re!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(k(137,t));break;default:Xe(e,t,ee,te,s,re)}return;default:if($a(t)){for(var Qe in i)te=i[Qe],i.hasOwnProperty(Qe)&&te!==void 0&&!s.hasOwnProperty(Qe)&&qo(e,t,Qe,void 0,s,te);for(le in s)te=s[le],re=i[le],!s.hasOwnProperty(le)||te===re||te===void 0&&re===void 0||qo(e,t,le,te,s,re);return}}for(var X in i)te=i[X],i.hasOwnProperty(X)&&te!=null&&!s.hasOwnProperty(X)&&Xe(e,t,X,null,s,te);for(ue in s)te=s[ue],re=i[ue],!s.hasOwnProperty(ue)||te===re||te==null&&re==null||Xe(e,t,ue,te,s,re)}function qf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,S=r.initiatorType,O=r.duration;if(n&&O&&qf(S)){for(S=0,O=r.responseEnd,s+=1;s<i.length;s++){var I=i[s],ee=I.startTime;if(ee>O)break;var le=I.transferSize,ue=I.initiatorType;le&&qf(ue)&&(I=I.responseEnd,S+=le*(I<O?1:(O-ee)/(I-ee)))}if(--s,t+=8*(n+S)/(r.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 Io=null,Po=null;function pa(e){return e.nodeType===9?e:e.ownerDocument}function If(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 Pf(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 Go(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 Vo=null;function hv(){var e=window.event;return e&&e.type==="popstate"?e===Vo?!1:(Vo=e,!0):(Vo=null,!1)}var Gf=typeof setTimeout=="function"?setTimeout:void 0,fv=typeof clearTimeout=="function"?clearTimeout:void 0,Vf=typeof Promise=="function"?Promise:void 0,dv=typeof queueMicrotask=="function"?queueMicrotask:typeof Vf<"u"?function(e){return Vf.resolve(null).then(e).catch(_v)}:Gf;function _v(e){setTimeout(function(){throw e})}function ns(e){return e==="head"}function Ff(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),br(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")nn(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,nn(i);for(var n=i.firstChild;n;){var S=n.nextSibling,O=n.nodeName;n[Cr]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=S}}else i==="body"&&nn(e.ownerDocument.body);i=r}while(i);br(t)}function Yf(e,t){var i=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Fo(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":Fo(i),Xa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function mv(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Cr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function vv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Jt(e.nextSibling),e===null))return null;return e}function Kf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function Yo(e){return e.data==="$?"||e.data==="$~"}function Ko(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Jt(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 Wo=null;function Wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Jt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Xf(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 Qf(e,t,i){switch(t=pa(i),e){case"html":if(e=t.documentElement,!e)throw Error(k(452));return e;case"head":if(e=t.head,!e)throw Error(k(453));return e;case"body":if(e=t.body,!e)throw Error(k(454));return e;default:throw Error(k(451))}}function nn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xa(e)}var $t=new Map,Zf=new Set;function Sa(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bi=J.d;J.d={f:pv,r:Sv,D:bv,C:yv,L:Cv,m:wv,X:Ev,S:xv,M:Av};function pv(){var e=Bi.f(),t=ua();return e||t}function Sv(e){var t=Us(e);t!==null&&t.tag===5&&t.type==="form"?dh(t):Bi.r(e)}var gr=typeof document>"u"?null:document;function Jf(e,t,i){var s=gr;if(s&&typeof t=="string"&&t){var r=Ft(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Zf.has(r)||(Zf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),bt(t,"link",e),dt(t),s.head.appendChild(t)))}}function bv(e){Bi.D(e),Jf("dns-prefetch",e,null)}function yv(e,t){Bi.C(e,t),Jf("preconnect",e,t)}function Cv(e,t,i){Bi.L(e,t,i);var s=gr;if(s&&e&&t){var r='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ft(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ft(i.imageSizes)+'"]')):r+='[href="'+Ft(e)+'"]';var n=r;switch(t){case"style":n=pr(e);break;case"script":n=Sr(e)}$t.has(n)||(e=f({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),$t.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(an(n))||t==="script"&&s.querySelector(ln(n))||(t=s.createElement("link"),bt(t,"link",e),dt(t),s.head.appendChild(t)))}}function wv(e,t){Bi.m(e,t);var i=gr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ft(s)+'"][href="'+Ft(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Sr(e)}if(!$t.has(n)&&(e=f({rel:"modulepreload",href:e},t),$t.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ln(n)))return}s=i.createElement("link"),bt(s,"link",e),dt(s),i.head.appendChild(s)}}}function xv(e,t,i){Bi.S(e,t,i);var s=gr;if(s&&e){var r=qs(s).hoistableStyles,n=pr(e);t=t||"default";var S=r.get(n);if(!S){var O={loading:0,preload:null};if(S=s.querySelector(an(n)))O.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},i),(i=$t.get(n))&&Xo(e,i);var I=S=s.createElement("link");dt(I),bt(I,"link",e),I._p=new Promise(function(ee,le){I.onload=ee,I.onerror=le}),I.addEventListener("load",function(){O.loading|=1}),I.addEventListener("error",function(){O.loading|=2}),O.loading|=4,ba(S,t,s)}S={type:"stylesheet",instance:S,count:1,state:O},r.set(n,S)}}}function Ev(e,t){Bi.X(e,t);var i=gr;if(i&&e){var s=qs(i).hoistableScripts,r=Sr(e),n=s.get(r);n||(n=i.querySelector(ln(r)),n||(e=f({src:e,async:!0},t),(t=$t.get(r))&&Qo(e,t),n=i.createElement("script"),dt(n),bt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Av(e,t){Bi.M(e,t);var i=gr;if(i&&e){var s=qs(i).hoistableScripts,r=Sr(e),n=s.get(r);n||(n=i.querySelector(ln(r)),n||(e=f({src:e,async:!0,type:"module"},t),(t=$t.get(r))&&Qo(e,t),n=i.createElement("script"),dt(n),bt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function $f(e,t,i,s){var r=(r=he.current)?Sa(r):null;if(!r)throw Error(k(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=pr(i.href),i=qs(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=pr(i.href);var n=qs(r).hoistableStyles,S=n.get(e);if(S||(r=r.ownerDocument||r,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,S),(n=r.querySelector(an(e)))&&!n._p&&(S.instance=n,S.state.loading=5),$t.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},$t.set(e,i),n||Dv(r,e,i,S.state))),t&&s===null)throw Error(k(528,""));return S}if(t&&s!==null)throw Error(k(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Sr(i),i=qs(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(k(444,e))}}function pr(e){return'href="'+Ft(e)+'"'}function an(e){return'link[rel="stylesheet"]['+e+"]"}function ed(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Dv(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),bt(t,"link",i),dt(t),e.head.appendChild(t))}function Sr(e){return'[src="'+Ft(e)+'"]'}function ln(e){return"script[async]"+e}function td(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ft(i.href)+'"]');if(s)return t.instance=s,dt(s),s;var r=f({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),dt(s),bt(s,"style",r),ba(s,i.precedence,e),t.instance=s;case"stylesheet":r=pr(i.href);var n=e.querySelector(an(r));if(n)return t.state.loading|=4,t.instance=n,dt(n),n;s=ed(i),(r=$t.get(r))&&Xo(s,r),n=(e.ownerDocument||e).createElement("link"),dt(n);var S=n;return S._p=new Promise(function(O,I){S.onload=O,S.onerror=I}),bt(n,"link",s),t.state.loading|=4,ba(n,i.precedence,e),t.instance=n;case"script":return n=Sr(i.src),(r=e.querySelector(ln(n)))?(t.instance=r,dt(r),r):(s=i,(r=$t.get(n))&&(s=f({},i),Qo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),dt(r),bt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(k(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ba(s,i.precedence,e));return t.instance}function ba(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,S=0;S<s.length;S++){var O=s[S];if(O.dataset.precedence===t)n=O;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Xo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Qo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ya=null;function id(e,t,i){if(ya===null){var s=new Map,r=ya=new Map;r.set(i,s)}else r=ya,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[Cr]||n[vt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var S=n.getAttribute(t)||"";S=e+S;var O=s.get(S);O?O.push(n):s.set(S,[n])}}return s}function sd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Tv(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 rd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Rv(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=pr(s.href),n=t.querySelector(an(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ca.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,dt(n);return}n=t.ownerDocument||t,s=ed(s),(r=$t.get(r))&&Xo(s,r),n=n.createElement("link"),dt(n);var S=n;S._p=new Promise(function(O,I){S.onload=O,S.onerror=I}),bt(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ca.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Zo=0;function kv(e,t){return e.stylesheets&&e.count===0&&xa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&xa(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&Zo===0&&(Zo=62500*uv());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xa(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>Zo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Ca(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var wa=null;function xa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wa=new Map,t.forEach(Ov,e),wa=null,Ca.call(e))}function Ov(e,t){if(!(t.state.loading&4)){var i=wa.get(e);if(i)var s=i.get(null);else{i=new Map,wa.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var S=r[n];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),s=S)}s&&i.set(null,s)}r=t.instance,S=r.getAttribute("data-precedence"),n=i.get(S)||s,n===s&&i.set(null,r),i.set(S,r),this.count++,s=Ca.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var on={$$typeof:l,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Lv(e,t,i,s,r,n,S,O,I){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=Fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.hiddenUpdates=Fa(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function nd(e,t,i,s,r,n,S,O,I,ee,le,ue){return e=new Lv(e,t,i,S,I,ee,le,ue,O),t=1,n===!0&&(t|=24),n=jt(3,null,null,t),e.current=n,n.stateNode=e,t=Rl(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},Ml(n),e}function ad(e){return e?(e=Qs,e):Qs}function ld(e,t,i,s,r,n){r=ad(r),s.context===null?s.context=r:s.pendingContext=r,s=Wi(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Xi(e,s,t),i!==null&&(zt(i,e,t),Ur(i,e,t))}function od(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Jo(e,t){od(e,t),(e=e.alternate)&&od(e,t)}function cd(e){if(e.tag===13||e.tag===31){var t=bs(e,67108864);t!==null&&zt(t,e,67108864),Jo(e,67108864)}}function ud(e){if(e.tag===13||e.tag===31){var t=Gt();t=Ya(t);var i=bs(e,t);i!==null&&zt(i,e,t),Jo(e,t)}}var Ea=!0;function Mv(e,t,i,s){var r=P.T;P.T=null;var n=J.p;try{J.p=2,$o(e,t,i,s)}finally{J.p=n,P.T=r}}function Bv(e,t,i,s){var r=P.T;P.T=null;var n=J.p;try{J.p=8,$o(e,t,i,s)}finally{J.p=n,P.T=r}}function $o(e,t,i,s){if(Ea){var r=ec(s);if(r===null)Uo(e,t,s,Aa,i),fd(e,s);else if(zv(r,e,t,i,s))s.stopPropagation();else if(fd(e,s),t&4&&-1<Nv.indexOf(e)){for(;r!==null;){var n=Us(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var S=ve(n.pendingLanes);if(S!==0){var O=n;for(O.pendingLanes|=2,O.entangledLanes|=2;S;){var I=1<<31-wt(S);O.entanglements[1]|=I,S&=~I}fi(n),(qe&6)===0&&(oa=Ge()+500,tn(0))}}break;case 31:case 13:O=bs(n,2),O!==null&&zt(O,n,2),ua(),Jo(n,2)}if(n=ec(s),n===null&&Uo(e,t,s,Aa,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Uo(e,t,s,null,i)}}function ec(e){return e=tl(e),tc(e)}var Aa=null;function tc(e){if(Aa=null,e=js(e),e!==null){var t=K(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=H(t),e!==null)return e;e=null}else if(i===31){if(e=u(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 Aa=e,null}function hd(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(Ct()){case ti:return 2;case ai:return 8;case At:case qi:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var ic=!1,as=null,ls=null,os=null,cn=new Map,un=new Map,cs=[],Nv="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 fd(e,t){switch(e){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":os=null;break;case"pointerover":case"pointerout":cn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":un.delete(t.pointerId)}}function hn(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=Us(t),t!==null&&cd(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function zv(e,t,i,s,r){switch(t){case"focusin":return as=hn(as,e,t,i,s,r),!0;case"dragenter":return ls=hn(ls,e,t,i,s,r),!0;case"mouseover":return os=hn(os,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return cn.set(n,hn(cn.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,un.set(n,hn(un.get(n)||null,e,t,i,s,r)),!0}return!1}function dd(e){var t=js(e.target);if(t!==null){var i=K(t);if(i!==null){if(t=i.tag,t===13){if(t=H(i),t!==null){e.blockedOn=t,Ac(e.priority,function(){ud(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Ac(e.priority,function(){ud(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 Da(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ec(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);el=s,i.target.dispatchEvent(s),el=null}else return t=Us(i),t!==null&&cd(t),e.blockedOn=i,!1;t.shift()}return!0}function _d(e,t,i){Da(e)&&i.delete(t)}function Hv(){ic=!1,as!==null&&Da(as)&&(as=null),ls!==null&&Da(ls)&&(ls=null),os!==null&&Da(os)&&(os=null),cn.forEach(_d),un.forEach(_d)}function Ta(e,t){e.blockedOn===t&&(e.blockedOn=null,ic||(ic=!0,b.unstable_scheduleCallback(b.unstable_NormalPriority,Hv)))}var Ra=null;function md(e){Ra!==e&&(Ra=e,b.unstable_scheduleCallback(b.unstable_NormalPriority,function(){Ra===e&&(Ra=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(tc(s||i)===null)continue;break}var n=Us(i);n!==null&&(e.splice(t,3),t-=3,$l(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function br(e){function t(I){return Ta(I,e)}as!==null&&Ta(as,e),ls!==null&&Ta(ls,e),os!==null&&Ta(os,e),cn.forEach(t),un.forEach(t);for(var i=0;i<cs.length;i++){var s=cs[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<cs.length&&(i=cs[0],i.blockedOn===null);)dd(i),i.blockedOn===null&&cs.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],S=r[kt]||null;if(typeof n=="function")S||md(i);else if(S){var O=null;if(n&&n.hasAttribute("formAction")){if(r=n,S=n[kt]||null)O=S.formAction;else if(tc(r)!==null)continue}else O=S.action;typeof O=="function"?i[s+1]=O:(i.splice(s,3),s-=3),md(i)}}}function vd(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(S){return r=S})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function sc(e){this._internalRoot=e}ka.prototype.render=sc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(k(409));var i=t.current,s=Gt();ld(i,s,e,t,null,null)},ka.prototype.unmount=sc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ld(e.current,2,null,e,null,null),ua(),t[Hs]=null}};function ka(e){this._internalRoot=e}ka.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ec();e={blockedOn:null,target:e,priority:t};for(var i=0;i<cs.length&&t!==0&&t<cs[i].priority;i++);cs.splice(i,0,e),i===0&&dd(e)}};var gd=B.version;if(gd!=="19.2.4")throw Error(k(527,gd,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(k(188)):(e=Object.keys(e).join(","),Error(k(268,e)));return e=d(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var jv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oa.isDisabled&&Oa.supportsFiber)try{li=Oa.inject(jv),Dt=Oa}catch{}}return dn.createRoot=function(e,t){if(!U(e))throw Error(k(299));var i=!1,s="",r=wh,n=xh,S=Eh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(S=t.onRecoverableError)),t=nd(e,1,!1,null,null,i,s,null,r,n,S,vd),e[Hs]=t.current,jo(e),new sc(t)},dn.hydrateRoot=function(e,t,i){if(!U(e))throw Error(k(299));var s=!1,r="",n=wh,S=xh,O=Eh,I=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(O=i.onRecoverableError),i.formState!==void 0&&(I=i.formState)),t=nd(e,1,!0,t,i??null,s,r,I,n,S,O,vd),t.context=ad(null),i=t.current,s=Gt(),s=Ya(s),r=Wi(s),r.callback=null,Xi(i,r,s),i=s,t.current.lanes=i,yr(t,i),fi(t),e[Hs]=t.current,jo(e),new ka(t)},dn.version="19.2.4",dn}var Dd;function Wv(){if(Dd)return ac.exports;Dd=1;function b(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b)}catch(B){console.error(B)}}return b(),ac.exports=Kv(),ac.exports}var Xv=Wv();const Qv="modulepreload",Zv=function(b){return"/"+b},Td={},e_=function(B,z,k){let U=Promise.resolve();if(z&&z.length>0){let d=function(p){return Promise.all(p.map(f=>Promise.resolve(f).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};var H=d;document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");U=d(z.map(p=>{if(p=Zv(p),p in Td)return;Td[p]=!0;const f=p.endsWith(".css"),g=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const y=document.createElement("link");if(y.rel=f?"stylesheet":Qv,f||(y.as="script"),y.crossOrigin="",y.href=p,h&&y.setAttribute("nonce",h),document.head.appendChild(y),f)return new Promise((D,v)=>{y.addEventListener("load",D),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${p}`)))})}))}function K(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return U.then(u=>{for(const h of u||[])h.status==="rejected"&&K(h.reason);return B().catch(K)})};const t_=(...b)=>b.filter((B,z,k)=>!!B&&B.trim()!==""&&k.indexOf(B)===z).join(" ").trim();const Jv=b=>b.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const $v=b=>b.replace(/^([A-Z])|[\s-_]+(\w)/g,(B,z,k)=>k?k.toUpperCase():z.toLowerCase());const Rd=b=>{const B=$v(b);return B.charAt(0).toUpperCase()+B.slice(1)};var eg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const tg=b=>{for(const B in b)if(B.startsWith("aria-")||B==="role"||B==="title")return!0;return!1};const ig=ne.forwardRef(({color:b="currentColor",size:B=24,strokeWidth:z=2,absoluteStrokeWidth:k,className:U="",children:K,iconNode:H,...u},h)=>ne.createElement("svg",{ref:h,...eg,width:B,height:B,stroke:b,strokeWidth:k?Number(z)*24/Number(B):z,className:t_("lucide",U),...!K&&!tg(u)&&{"aria-hidden":"true"},...u},[...H.map(([d,p])=>ne.createElement(d,p)),...Array.isArray(K)?K:[K]]));const yt=(b,B)=>{const z=ne.forwardRef(({className:k,...U},K)=>ne.createElement(ig,{ref:K,iconNode:B,className:t_(`lucide-${Jv(Rd(b))}`,`lucide-${b}`,k),...U}));return z.displayName=Rd(b),z};const sg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],kd=yt("ban",sg);const rg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Od=yt("check",rg);const ng=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ld=yt("copy",ng);const ag=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],dc=yt("eye-off",ag);const lg=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_c=yt("eye",lg);const og=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cg=yt("info",og);const ug=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ei=yt("loader-circle",ug);const hg=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],fg=yt("log-out",hg);const dg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Md=yt("panel-left-close",dg);const _g=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],mg=yt("panel-left-open",_g);const vg=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Bd=yt("pencil",vg);const gg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],za=yt("plus",gg);const pg=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Sg=yt("rotate-cw",pg);const bg=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yg=yt("settings",bg);const Cg=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Nd=yt("smartphone",Cg);const wg=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],xg=yt("trash-2",wg);const Eg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vn=yt("x",Eg);function i_(b){var B,z,k="";if(typeof b=="string"||typeof b=="number")k+=b;else if(typeof b=="object")if(Array.isArray(b)){var U=b.length;for(B=0;B<U;B++)b[B]&&(z=i_(b[B]))&&(k&&(k+=" "),k+=z)}else for(z in b)b[z]&&(k&&(k+=" "),k+=z);return k}function s_(){for(var b,B,z=0,k="",U=arguments.length;z<U;z++)(b=arguments[z])&&(B=i_(b))&&(k&&(k+=" "),k+=B);return k}const zd=b=>typeof b=="boolean"?`${b}`:b===0?"0":b,Hd=s_,Ag=(b,B)=>z=>{var k;if(B?.variants==null)return Hd(b,z?.class,z?.className);const{variants:U,defaultVariants:K}=B,H=Object.keys(U).map(d=>{const p=z?.[d],f=K?.[d];if(p===null)return null;const g=zd(p)||zd(f);return U[d][g]}),u=z&&Object.entries(z).reduce((d,p)=>{let[f,g]=p;return g===void 0||(d[f]=g),d},{}),h=B==null||(k=B.compoundVariants)===null||k===void 0?void 0:k.reduce((d,p)=>{let{class:f,className:g,...y}=p;return Object.entries(y).every(D=>{let[v,o]=D;return Array.isArray(o)?o.includes({...K,...u}[v]):{...K,...u}[v]===o})?[...d,f,g]:d},[]);return Hd(b,H,h,z?.class,z?.className)};function jd(b,B){if(typeof b=="function")return b(B);b!=null&&(b.current=B)}function Dg(...b){return B=>{let z=!1;const k=b.map(U=>{const K=jd(U,B);return!z&&typeof K=="function"&&(z=!0),K});if(z)return()=>{for(let U=0;U<k.length;U++){const K=k[U];typeof K=="function"?K():jd(b[U],null)}}}}function Tg(b){const B=kg(b),z=ne.forwardRef((k,U)=>{const{children:K,...H}=k,u=ne.Children.toArray(K),h=u.find(Lg);if(h){const d=h.props.children,p=u.map(f=>f===h?ne.Children.count(d)>1?ne.Children.only(null):ne.isValidElement(d)?d.props.children:null:f);return M.jsx(B,{...H,ref:U,children:ne.isValidElement(d)?ne.cloneElement(d,void 0,p):null})}return M.jsx(B,{...H,ref:U,children:K})});return z.displayName=`${b}.Slot`,z}var Rg=Tg("Slot");function kg(b){const B=ne.forwardRef((z,k)=>{const{children:U,...K}=z;if(ne.isValidElement(U)){const H=Bg(U),u=Mg(K,U.props);return U.type!==ne.Fragment&&(u.ref=k?Dg(k,H):H),ne.cloneElement(U,u)}return ne.Children.count(U)>1?ne.Children.only(null):null});return B.displayName=`${b}.SlotClone`,B}var Og=Symbol("radix.slottable");function Lg(b){return ne.isValidElement(b)&&typeof b.type=="function"&&"__radixId"in b.type&&b.type.__radixId===Og}function Mg(b,B){const z={...B};for(const k in B){const U=b[k],K=B[k];/^on[A-Z]/.test(k)?U&&K?z[k]=(...u)=>{const h=K(...u);return U(...u),h}:U&&(z[k]=U):k==="style"?z[k]={...U,...K}:k==="className"&&(z[k]=[U,K].filter(Boolean).join(" "))}return{...b,...z}}function Bg(b){let B=Object.getOwnPropertyDescriptor(b.props,"ref")?.get,z=B&&"isReactWarning"in B&&B.isReactWarning;return z?b.ref:(B=Object.getOwnPropertyDescriptor(b,"ref")?.get,z=B&&"isReactWarning"in B&&B.isReactWarning,z?b.props.ref:b.props.ref||b.ref)}const Ng=(b,B)=>{const z=new Array(b.length+B.length);for(let k=0;k<b.length;k++)z[k]=b[k];for(let k=0;k<B.length;k++)z[b.length+k]=B[k];return z},zg=(b,B)=>({classGroupId:b,validator:B}),r_=(b=new Map,B=null,z)=>({nextPart:b,validators:B,classGroupId:z}),ja="-",Ud=[],Hg="arbitrary..",jg=b=>{const B=qg(b),{conflictingClassGroups:z,conflictingClassGroupModifiers:k}=b;return{getClassGroupId:H=>{if(H.startsWith("[")&&H.endsWith("]"))return Ug(H);const u=H.split(ja),h=u[0]===""&&u.length>1?1:0;return n_(u,h,B)},getConflictingClassGroupIds:(H,u)=>{if(u){const h=k[H],d=z[H];return h?d?Ng(d,h):h:d||Ud}return z[H]||Ud}}},n_=(b,B,z)=>{if(b.length-B===0)return z.classGroupId;const U=b[B],K=z.nextPart.get(U);if(K){const d=n_(b,B+1,K);if(d)return d}const H=z.validators;if(H===null)return;const u=B===0?b.join(ja):b.slice(B).join(ja),h=H.length;for(let d=0;d<h;d++){const p=H[d];if(p.validator(u))return p.classGroupId}},Ug=b=>b.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const B=b.slice(1,-1),z=B.indexOf(":"),k=B.slice(0,z);return k?Hg+k:void 0})(),qg=b=>{const{theme:B,classGroups:z}=b;return Ig(z,B)},Ig=(b,B)=>{const z=r_();for(const k in b){const U=b[k];Sc(U,z,k,B)}return z},Sc=(b,B,z,k)=>{const U=b.length;for(let K=0;K<U;K++){const H=b[K];Pg(H,B,z,k)}},Pg=(b,B,z,k)=>{if(typeof b=="string"){Gg(b,B,z);return}if(typeof b=="function"){Vg(b,B,z,k);return}Fg(b,B,z,k)},Gg=(b,B,z)=>{const k=b===""?B:a_(B,b);k.classGroupId=z},Vg=(b,B,z,k)=>{if(Yg(b)){Sc(b(k),B,z,k);return}B.validators===null&&(B.validators=[]),B.validators.push(zg(z,b))},Fg=(b,B,z,k)=>{const U=Object.entries(b),K=U.length;for(let H=0;H<K;H++){const[u,h]=U[H];Sc(h,a_(B,u),z,k)}},a_=(b,B)=>{let z=b;const k=B.split(ja),U=k.length;for(let K=0;K<U;K++){const H=k[K];let u=z.nextPart.get(H);u||(u=r_(),z.nextPart.set(H,u)),z=u}return z},Yg=b=>"isThemeGetter"in b&&b.isThemeGetter===!0,Kg=b=>{if(b<1)return{get:()=>{},set:()=>{}};let B=0,z=Object.create(null),k=Object.create(null);const U=(K,H)=>{z[K]=H,B++,B>b&&(B=0,k=z,z=Object.create(null))};return{get(K){let H=z[K];if(H!==void 0)return H;if((H=k[K])!==void 0)return U(K,H),H},set(K,H){K in z?z[K]=H:U(K,H)}}},mc="!",qd=":",Wg=[],Id=(b,B,z,k,U)=>({modifiers:b,hasImportantModifier:B,baseClassName:z,maybePostfixModifierPosition:k,isExternal:U}),Xg=b=>{const{prefix:B,experimentalParseClassName:z}=b;let k=U=>{const K=[];let H=0,u=0,h=0,d;const p=U.length;for(let v=0;v<p;v++){const o=U[v];if(H===0&&u===0){if(o===qd){K.push(U.slice(h,v)),h=v+1;continue}if(o==="/"){d=v;continue}}o==="["?H++:o==="]"?H--:o==="("?u++:o===")"&&u--}const f=K.length===0?U:U.slice(h);let g=f,y=!1;f.endsWith(mc)?(g=f.slice(0,-1),y=!0):f.startsWith(mc)&&(g=f.slice(1),y=!0);const D=d&&d>h?d-h:void 0;return Id(K,y,g,D)};if(B){const U=B+qd,K=k;k=H=>H.startsWith(U)?K(H.slice(U.length)):Id(Wg,!1,H,void 0,!0)}if(z){const U=k;k=K=>z({className:K,parseClassName:U})}return k},Qg=b=>{const B=new Map;return b.orderSensitiveModifiers.forEach((z,k)=>{B.set(z,1e6+k)}),z=>{const k=[];let U=[];for(let K=0;K<z.length;K++){const H=z[K],u=H[0]==="[",h=B.has(H);u||h?(U.length>0&&(U.sort(),k.push(...U),U=[]),k.push(H)):U.push(H)}return U.length>0&&(U.sort(),k.push(...U)),k}},Zg=b=>({cache:Kg(b.cacheSize),parseClassName:Xg(b),sortModifiers:Qg(b),...jg(b)}),Jg=/\s+/,$g=(b,B)=>{const{parseClassName:z,getClassGroupId:k,getConflictingClassGroupIds:U,sortModifiers:K}=B,H=[],u=b.trim().split(Jg);let h="";for(let d=u.length-1;d>=0;d-=1){const p=u[d],{isExternal:f,modifiers:g,hasImportantModifier:y,baseClassName:D,maybePostfixModifierPosition:v}=z(p);if(f){h=p+(h.length>0?" "+h:h);continue}let o=!!v,c=k(o?D.substring(0,v):D);if(!c){if(!o){h=p+(h.length>0?" "+h:h);continue}if(c=k(D),!c){h=p+(h.length>0?" "+h:h);continue}o=!1}const a=g.length===0?"":g.length===1?g[0]:K(g).join(":"),l=y?a+mc:a,_=l+c;if(H.indexOf(_)>-1)continue;H.push(_);const C=U(c,o);for(let w=0;w<C.length;++w){const A=C[w];H.push(l+A)}h=p+(h.length>0?" "+h:h)}return h},ep=(...b)=>{let B=0,z,k,U="";for(;B<b.length;)(z=b[B++])&&(k=l_(z))&&(U&&(U+=" "),U+=k);return U},l_=b=>{if(typeof b=="string")return b;let B,z="";for(let k=0;k<b.length;k++)b[k]&&(B=l_(b[k]))&&(z&&(z+=" "),z+=B);return z},tp=(b,...B)=>{let z,k,U,K;const H=h=>{const d=B.reduce((p,f)=>f(p),b());return z=Zg(d),k=z.cache.get,U=z.cache.set,K=u,u(h)},u=h=>{const d=k(h);if(d)return d;const p=$g(h,z);return U(h,p),p};return K=H,(...h)=>K(ep(...h))},ip=[],ht=b=>{const B=z=>z[b]||ip;return B.isThemeGetter=!0,B},o_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,c_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,np=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ap=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,op=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hs=b=>sp.test(b),ke=b=>!!b&&!Number.isNaN(Number(b)),fs=b=>!!b&&Number.isInteger(Number(b)),uc=b=>b.endsWith("%")&&ke(b.slice(0,-1)),Ni=b=>rp.test(b),u_=()=>!0,cp=b=>np.test(b)&&!ap.test(b),bc=()=>!1,up=b=>lp.test(b),hp=b=>op.test(b),fp=b=>!pe(b)&&!Se(b),dp=b=>_s(b,d_,bc),pe=b=>o_.test(b),Ms=b=>_s(b,__,cp),Pd=b=>_s(b,yp,ke),_p=b=>_s(b,v_,u_),mp=b=>_s(b,m_,bc),Gd=b=>_s(b,h_,bc),vp=b=>_s(b,f_,hp),La=b=>_s(b,g_,up),Se=b=>c_.test(b),_n=b=>Bs(b,__),gp=b=>Bs(b,m_),Vd=b=>Bs(b,h_),pp=b=>Bs(b,d_),Sp=b=>Bs(b,f_),Ma=b=>Bs(b,g_,!0),bp=b=>Bs(b,v_,!0),_s=(b,B,z)=>{const k=o_.exec(b);return k?k[1]?B(k[1]):z(k[2]):!1},Bs=(b,B,z=!1)=>{const k=c_.exec(b);return k?k[1]?B(k[1]):z:!1},h_=b=>b==="position"||b==="percentage",f_=b=>b==="image"||b==="url",d_=b=>b==="length"||b==="size"||b==="bg-size",__=b=>b==="length",yp=b=>b==="number",m_=b=>b==="family-name",v_=b=>b==="number"||b==="weight",g_=b=>b==="shadow",Cp=()=>{const b=ht("color"),B=ht("font"),z=ht("text"),k=ht("font-weight"),U=ht("tracking"),K=ht("leading"),H=ht("breakpoint"),u=ht("container"),h=ht("spacing"),d=ht("radius"),p=ht("shadow"),f=ht("inset-shadow"),g=ht("text-shadow"),y=ht("drop-shadow"),D=ht("blur"),v=ht("perspective"),o=ht("aspect"),c=ht("ease"),a=ht("animate"),l=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),Se,pe],w=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],m=()=>[Se,pe,h],R=()=>[hs,"full","auto",...m()],G=()=>[fs,"none","subgrid",Se,pe],q=()=>["auto",{span:["full",fs,Se,pe]},fs,Se,pe],Y=()=>[fs,"auto",Se,pe],j=()=>["auto","min","max","fr",Se,pe],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...m()],J=()=>[hs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],ie=()=>[hs,"screen","full","dvw","lvw","svw","min","max","fit",...m()],E=()=>[hs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...m()],T=()=>[b,Se,pe],x=()=>[..._(),Vd,Gd,{position:[Se,pe]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",pp,dp,{size:[Se,pe]}],Z=()=>[uc,_n,Ms],oe=()=>["","none","full",d,Se,pe],he=()=>["",ke,_n,Ms],F=()=>["solid","dashed","dotted","double"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[ke,uc,Vd,Gd],fe=()=>["","none",D,Se,pe],_e=()=>["none",ke,Se,pe],me=()=>["none",ke,Se,pe],De=()=>[ke,Se,pe],Oe=()=>[hs,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ni],breakpoint:[Ni],color:[u_],container:[Ni],"drop-shadow":[Ni],ease:["in","out","in-out"],font:[fp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ni],shadow:[Ni],spacing:["px",ke],text:[Ni],"text-shadow":[Ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hs,pe,Se,o]}],container:["container"],columns:[{columns:[ke,pe,Se,u]}],"break-after":[{"break-after":l()}],"break-before":[{"break-before":l()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[fs,"auto",Se,pe]}],basis:[{basis:[hs,"full","auto",u,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,hs,"auto","initial","none",pe]}],grow:[{grow:["",ke,Se,pe]}],shrink:[{shrink:["",ke,Se,pe]}],order:[{order:[fs,"first","last","none",Se,pe]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pbs:[{pbs:m()}],pbe:[{pbe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...E()]}],"min-block-size":[{"min-block":["auto",...E()]}],"max-block-size":[{"max-block":["none",...E()]}],w:[{w:[u,"screen",...J()]}],"min-w":[{"min-w":[u,"screen","none",...J()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[H]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",z,_n,Ms]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[k,bp,_p]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uc,pe]}],"font-family":[{font:[gp,mp,B]}],"font-features":[{"font-features":[pe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[U,Se,pe]}],"line-clamp":[{"line-clamp":[ke,"none",Se,Pd]}],leading:[{leading:[K,...m()]}],"list-image":[{"list-image":["none",Se,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",Se,Ms]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[ke,"auto",Se,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:x()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fs,Se,pe],radial:["",Se,pe],conic:[fs,Se,pe]},Sp,vp]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,Se,pe]}],"outline-w":[{outline:["",ke,_n,Ms]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",p,Ma,La]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",f,Ma,La]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[ke,Ms]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",g,Ma,La]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[ke,Se,pe]}],"mix-blend":[{"mix-blend":[...N(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":N()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Se,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:x()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,pe]}],filter:[{filter:["","none",Se,pe]}],blur:[{blur:fe()}],brightness:[{brightness:[ke,Se,pe]}],contrast:[{contrast:[ke,Se,pe]}],"drop-shadow":[{"drop-shadow":["","none",y,Ma,La]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",ke,Se,pe]}],"hue-rotate":[{"hue-rotate":[ke,Se,pe]}],invert:[{invert:["",ke,Se,pe]}],saturate:[{saturate:[ke,Se,pe]}],sepia:[{sepia:["",ke,Se,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,pe]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[ke,Se,pe]}],"backdrop-contrast":[{"backdrop-contrast":[ke,Se,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,Se,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,Se,pe]}],"backdrop-invert":[{"backdrop-invert":["",ke,Se,pe]}],"backdrop-opacity":[{"backdrop-opacity":[ke,Se,pe]}],"backdrop-saturate":[{"backdrop-saturate":[ke,Se,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,Se,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",Se,pe]}],ease:[{ease:["linear","initial",c,Se,pe]}],delay:[{delay:[ke,Se,pe]}],animate:[{animate:["none",a,Se,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Se,pe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:De()}],"skew-x":[{"skew-x":De()}],"skew-y":[{"skew-y":De()}],transform:[{transform:[Se,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mbs":[{"scroll-mbs":m()}],"scroll-mbe":[{"scroll-mbe":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pbs":[{"scroll-pbs":m()}],"scroll-pbe":[{"scroll-pbe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,pe]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[ke,_n,Ms,Pd]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},wp=tp(Cp);function Hi(...b){return wp(s_(b))}const xp=Ag("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ie({className:b,variant:B="default",size:z="default",asChild:k=!1,...U}){const K=k?Rg:"button";return M.jsx(K,{"data-slot":"button","data-variant":B,"data-size":z,className:Hi(xp({variant:B,size:z,className:b})),...U})}function Ep({sessions:b,activeSessionId:B,onSelectSession:z,onNewSession:k,onCloseSession:U,onRenameSession:K,onCloseAllSessions:H,loading:u,collapsed:h,onToggleCollapse:d,mobileOpen:p,onMobileClose:f,width:g=192,onWidthChange:y,inputLocks:D={},clientId:v="",onTakeControl:o,dataReceivedSessions:c=new Set}){const[a,l]=ne.useState(null),[_,C]=ne.useState(""),[w,A]=ne.useState(null),[m,R]=ne.useState(null),[G,q]=ne.useState(!1),Y=ne.useRef(null),j=ne.useRef(!1);ne.useEffect(()=>{const E=L=>{if(!j.current)return;const W=Math.max(180,Math.min(500,L.clientX));y?.(W),L.clientX<100&&d()},T=()=>{j.current=!1},x=()=>{j.current&&(j.current=!1)};return document.addEventListener("mousemove",E),document.addEventListener("mouseup",T),window.addEventListener("blur",x),()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T),window.removeEventListener("blur",x)}},[y]);const Q=()=>{j.current=!0},ae=p!==void 0,P=E=>{const T=D?.[E];return!T||T===v};function J(E){P(E.id)&&(l(E.id),C(E.label),requestAnimationFrame(()=>Y.current?.focus()))}function ie(){a&&_.trim()&&K(a,_.trim()),l(null)}return ae?p?M.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 shadow-xl flex flex-col bg-sidebar border-r border-border",children:[M.jsxs("div",{className:"flex items-center gap-1 px-2 pt-2 pb-2 border-b border-border",children:[M.jsx(Ie,{variant:"outline",size:"sm",onClick:k,disabled:u,title:"New session",className:"px-2",children:u?M.jsx(ei,{className:"h-3.5 w-3.5 animate-spin flex-shrink-0"}):M.jsx(za,{className:"h-3.5 w-3.5 flex-shrink-0"})}),M.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>q(!0),disabled:b.length===0,title:"Close all sessions",className:"px-2",children:M.jsx(vn,{className:"h-3.5 w-3.5 flex-shrink-0"})}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"Close sidebar",onClick:f,className:"[&_svg]:size-4 flex-shrink-0 ml-auto",children:M.jsx(Md,{})})]}),M.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:b.length===0?M.jsx("p",{className:"text-xs text-muted-foreground px-3 py-4 text-center",children:"No sessions yet"}):b.map(E=>{const T=E.id===B,x=a===E.id;return M.jsxs("div",{className:`group flex items-center gap-2 px-2 py-1.5 mx-1 rounded-md cursor-pointer transition-colors ${T?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,onClick:()=>{x||(z(E.id),f?.())},onDoubleClick:L=>{L.stopPropagation(),J(E)},children:[M.jsx("span",{className:`inline-flex h-2 w-2 rounded-full flex-shrink-0 bg-green-500 ${c.has(E.id)?"data-received":""}`}),x?M.jsx("input",{ref:Y,value:_,onChange:L=>C(L.target.value),onKeyDown:L=>{L.key==="Enter"&&ie(),L.key==="Escape"&&l(null)},onBlur:ie,onClick:L=>L.stopPropagation(),className:"flex-1 bg-transparent text-xs outline-none border-b border-foreground/30 py-0",autoFocus:!0}):M.jsx("span",{className:"flex-1 truncate text-xs",children:E.label}),!x&&M.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[D[E.id]&&D[E.id]!==v&&M.jsx("button",{onClick:L=>{L.stopPropagation(),A(E.id)},className:"p-0.5 rounded hover:bg-red-500/20",title:"Read-only: another client has control",children:M.jsx(kd,{className:"h-3 w-3 text-red-500 flex-shrink-0"})}),M.jsxs("div",{className:"flex items-center gap-0.5",children:[M.jsx("button",{disabled:!P(E.id),className:"p-0.5 rounded hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",onClick:L=>{L.stopPropagation(),J(E)},title:P(E.id)?"Rename session":"Only owner can rename",children:M.jsx(Bd,{className:"h-3 w-3"})}),M.jsx("button",{disabled:!P(E.id),className:"p-0.5 rounded hover:bg-destructive/20 hover:text-destructive disabled:opacity-50 disabled:cursor-not-allowed",onClick:L=>{L.stopPropagation(),R(E.id)},title:P(E.id)?"Close session":"Only owner can close",children:M.jsx(vn,{className:"h-3 w-3"})})]})]})]},E.id)})}),M.jsx("div",{className:"border-t border-border px-3 py-2 text-muted-foreground",children:M.jsxs("div",{className:"text-xs space-y-1",children:[M.jsx("div",{className:"text-muted-foreground/70",children:"Session ID:"}),M.jsx("div",{className:"font-mono text-xs text-foreground/80",title:v,children:v.split("-").pop()})]})})]}):null:h?M.jsxs("div",{className:"flex flex-col items-center h-full w-11 min-w-[2.75rem] border-r border-border bg-sidebar py-2 gap-1",children:[M.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"Expand sidebar",onClick:d,className:"[&_svg]:size-4 mb-1",children:M.jsx(mg,{})}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"New session",onClick:k,disabled:u,className:"[&_svg]:size-4",children:u?M.jsx(ei,{className:"animate-spin"}):M.jsx(za,{})}),M.jsx("div",{className:"w-6 border-t border-border my-1"}),M.jsx("div",{className:"flex-1 overflow-y-auto flex flex-col items-center gap-1",children:b.map(E=>{const T=E.id===B,x=E.label.slice(0,2).toUpperCase();return M.jsxs("button",{title:E.label,onClick:()=>z(E.id),className:`relative flex items-center justify-center w-8 h-8 rounded-md text-xs font-mono font-medium transition-colors ${T?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,children:[M.jsx("span",{children:x}),M.jsx("span",{className:`absolute bottom-0.5 right-0.5 h-1.5 w-1.5 rounded-full bg-green-500 ${c.has(E.id)?"data-received":""}`})]},E.id)})})]}):M.jsxs("div",{className:"flex h-full bg-sidebar relative",style:{width:`${g}px`},children:[M.jsxs("div",{className:"flex flex-col flex-1",children:[M.jsxs("div",{className:"flex items-center gap-1 px-2 pt-2 pb-2 border-b border-border relative",children:[M.jsx(Ie,{variant:"outline",size:"sm",onClick:k,disabled:u,title:"New session",className:"px-2",children:u?M.jsx(ei,{className:"h-3.5 w-3.5 animate-spin flex-shrink-0"}):M.jsx(za,{className:"h-3.5 w-3.5 flex-shrink-0"})}),M.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>q(!0),disabled:b.length===0,title:"Close all sessions",className:"px-2",children:M.jsx(vn,{className:"h-3.5 w-3.5 flex-shrink-0"})}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"Collapse sidebar",onClick:d,className:"[&_svg]:size-4 flex-shrink-0 ml-auto",children:M.jsx(Md,{})})]}),M.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:b.length===0?M.jsx("p",{className:"text-xs text-muted-foreground px-3 py-4 text-center",children:"No sessions yet"}):b.map(E=>{const T=E.id===B,x=a===E.id;return M.jsxs("div",{className:`group flex items-center gap-2 px-2 py-1.5 mx-1 rounded-md cursor-pointer transition-colors ${T?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,onClick:()=>{x||z(E.id)},onDoubleClick:L=>{L.stopPropagation(),J(E)},children:[M.jsx("span",{className:`inline-flex h-2 w-2 rounded-full flex-shrink-0 bg-green-500 ${c.has(E.id)?"data-received":""}`}),x?M.jsx("input",{ref:Y,value:_,onChange:L=>C(L.target.value),onKeyDown:L=>{L.key==="Enter"&&ie(),L.key==="Escape"&&l(null)},onBlur:ie,onClick:L=>L.stopPropagation(),className:"flex-1 bg-transparent text-xs outline-none border-b border-foreground/30 py-0",autoFocus:!0}):M.jsx("span",{className:"flex-1 truncate text-xs",children:E.label}),!x&&M.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[D[E.id]&&D[E.id]!==v&&M.jsx("button",{onClick:L=>{L.stopPropagation(),A(E.id)},className:"p-0.5 rounded hover:bg-red-500/20",title:"Read-only: another client has control",children:M.jsx(kd,{className:"h-3 w-3 text-red-500 flex-shrink-0"})}),M.jsxs("div",{className:"flex items-center gap-0.5",children:[M.jsx("button",{disabled:!P(E.id),className:"p-0.5 rounded hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",onClick:L=>{L.stopPropagation(),J(E)},title:P(E.id)?"Rename session":"Only owner can rename",children:M.jsx(Bd,{className:"h-3 w-3"})}),M.jsx("button",{disabled:!P(E.id),className:"p-0.5 rounded hover:bg-destructive/20 hover:text-destructive disabled:opacity-50 disabled:cursor-not-allowed",onClick:L=>{L.stopPropagation(),R(E.id)},title:P(E.id)?"Close session":"Only owner can close",children:M.jsx(vn,{className:"h-3 w-3"})})]})]})]},E.id)})}),M.jsx("div",{className:"border-t border-border px-3 py-2 text-muted-foreground",children:M.jsxs("div",{className:"text-xs space-y-1",children:[M.jsx("div",{className:"text-muted-foreground/70",children:"Session ID:"}),M.jsx("div",{className:"font-mono text-xs text-foreground/80",title:v,children:v.split("-").pop()})]})})]}),M.jsx("div",{onMouseDown:Q,className:"absolute right-0 top-1/2 -translate-y-1/2 w-1 cursor-col-resize bg-border hover:bg-primary/50 transition-colors",style:{height:"40px"},title:"Drag to resize sidebar"}),m&&M.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[M.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>R(null)}),M.jsxs("div",{className:"relative bg-card border border-border rounded-lg p-6 shadow-lg max-w-sm mx-4",children:[M.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Close Session?"}),M.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Are you sure you want to close this session? This action cannot be undone."}),M.jsxs("div",{className:"flex gap-2 justify-end",children:[M.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>R(null),children:"Cancel"}),M.jsx(Ie,{variant:"destructive",size:"sm",onClick:()=>{m&&U(m),R(null)},children:"Close Session"})]})]})]}),w&&M.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[M.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>A(null)}),M.jsxs("div",{className:"relative bg-card border border-border rounded-lg p-6 shadow-lg max-w-sm mx-4",children:[M.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Session In Use"}),M.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"This session is currently being used by another client. Would you like to take control?"}),M.jsxs("div",{className:"flex gap-2 justify-end",children:[M.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>A(null),children:"Cancel"}),M.jsx(Ie,{variant:"default",size:"sm",onClick:()=>{o&&w&&o(w),A(null)},children:"Take Control"})]})]})]}),G&&M.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[M.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>q(!1)}),M.jsxs("div",{className:"relative bg-card border border-border rounded-lg p-6 shadow-lg max-w-sm mx-4",children:[M.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Close All Sessions?"}),M.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:["Are you sure you want to close all ",b.length," session",b.length!==1?"s":"","? This action cannot be undone."]}),M.jsxs("div",{className:"flex gap-2 justify-end",children:[M.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>q(!1),children:"Cancel"}),M.jsx(Ie,{variant:"destructive",size:"sm",onClick:()=>{H(),q(!1)},children:"Close All"})]})]})]})]})}const gn=ne.forwardRef(({className:b,checked:B,onCheckedChange:z,...k},U)=>M.jsxs("label",{className:"inline-flex items-center cursor-pointer",children:[M.jsx("input",{type:"checkbox",ref:U,checked:B,onChange:K=>z?.(K.target.checked),className:"sr-only",...k}),M.jsx("div",{className:Hi("relative w-9 h-5 rounded-full transition-colors",B?"bg-primary":"bg-gray-300 dark:bg-gray-600"),children:M.jsx("div",{className:Hi("absolute top-0.5 left-0.5 w-4 h-4 bg-white rounded-full shadow transition-transform",B&&"translate-x-4")})})]}));gn.displayName="Switch";const p_=ne.createContext(void 0);function S_(){const b=ne.useContext(p_);if(!b)throw new Error("Dialog components must be used within Dialog");return b}function Fd({open:b,onOpenChange:B,children:z}){return M.jsx(p_.Provider,{value:{open:b,setOpen:B},children:z})}function Yd({children:b,className:B}){const{open:z,setOpen:k}=S_(),U=ne.useRef(null);return ne.useEffect(()=>{if(!z)return;function K(H){U.current&&!U.current.contains(H.target)&&k(!1)}return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[z,k]),ne.useEffect(()=>(z?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[z]),z?M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>k(!1)}),M.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:M.jsx("div",{ref:U,className:Hi("relative w-full max-w-2xl max-h-[85vh] bg-card border border-border rounded-lg shadow-lg overflow-hidden flex flex-col",B),onClick:K=>K.stopPropagation(),children:b})})]}):null}function Kd({children:b,className:B}){return M.jsx("div",{className:Hi("flex items-center justify-between px-6 py-4 border-b border-border",B),children:b})}function Wd({children:b,className:B}){return M.jsx("h2",{className:Hi("text-lg font-semibold",B),children:b})}function Xd({onClick:b,className:B}){const{setOpen:z}=S_();return M.jsx("button",{onClick:()=>{b?.(),z(!1)},className:Hi("inline-flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground transition-colors",B),title:"Close",children:M.jsx(vn,{className:"h-4 w-4"})})}function Qd({children:b,className:B}){return M.jsx("div",{className:Hi("flex-1 overflow-y-auto px-6 py-6",B),children:b})}function Ap({children:b,className:B}){return M.jsx("div",{className:Hi("flex items-center justify-end gap-2 px-6 py-4 border-t border-border",B),children:b})}let Dp={data:""},Tp=b=>{if(typeof window=="object"){let B=(b?b.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return B.nonce=window.__nonce__,B.parentNode||(b||document.head).appendChild(B),B.firstChild}return b||Dp},Rp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kp=/\/\*[^]*?\*\/| +/g,Zd=/\n+/g,ds=(b,B)=>{let z="",k="",U="";for(let K in b){let H=b[K];K[0]=="@"?K[1]=="i"?z=K+" "+H+";":k+=K[1]=="f"?ds(H,K):K+"{"+ds(H,K[1]=="k"?"":B)+"}":typeof H=="object"?k+=ds(H,B?B.replace(/([^,])+/g,u=>K.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,h=>/&/.test(h)?h.replace(/&/g,u):u?u+" "+h:h)):K):H!=null&&(K=/^--/.test(K)?K:K.replace(/[A-Z]/g,"-$&").toLowerCase(),U+=ds.p?ds.p(K,H):K+":"+H+";")}return z+(B&&U?B+"{"+U+"}":U)+k},zi={},b_=b=>{if(typeof b=="object"){let B="";for(let z in b)B+=z+b_(b[z]);return B}return b},Op=(b,B,z,k,U)=>{let K=b_(b),H=zi[K]||(zi[K]=(h=>{let d=0,p=11;for(;d<h.length;)p=101*p+h.charCodeAt(d++)>>>0;return"go"+p})(K));if(!zi[H]){let h=K!==b?b:(d=>{let p,f,g=[{}];for(;p=Rp.exec(d.replace(kp,""));)p[4]?g.shift():p[3]?(f=p[3].replace(Zd," ").trim(),g.unshift(g[0][f]=g[0][f]||{})):g[0][p[1]]=p[2].replace(Zd," ").trim();return g[0]})(b);zi[H]=ds(U?{["@keyframes "+H]:h}:h,z?"":"."+H)}let u=z&&zi.g?zi.g:null;return z&&(zi.g=zi[H]),((h,d,p,f)=>{f?d.data=d.data.replace(f,h):d.data.indexOf(h)===-1&&(d.data=p?h+d.data:d.data+h)})(zi[H],B,k,u),H},Lp=(b,B,z)=>b.reduce((k,U,K)=>{let H=B[K];if(H&&H.call){let u=H(z),h=u&&u.props&&u.props.className||/^go/.test(u)&&u;H=h?"."+h:u&&typeof u=="object"?u.props?"":ds(u,""):u===!1?"":u}return k+U+(H??"")},"");function qa(b){let B=this||{},z=b.call?b(B.p):b;return Op(z.unshift?z.raw?Lp(z,[].slice.call(arguments,1),B.p):z.reduce((k,U)=>Object.assign(k,U&&U.call?U(B.p):U),{}):z,Tp(B.target),B.g,B.o,B.k)}let y_,vc,gc;qa.bind({g:1});let ji=qa.bind({k:1});function Mp(b,B,z,k){ds.p=B,y_=b,vc=z,gc=k}function ms(b,B){let z=this||{};return function(){let k=arguments;function U(K,H){let u=Object.assign({},K),h=u.className||U.className;z.p=Object.assign({theme:vc&&vc()},u),z.o=/ *go\d+/.test(h),u.className=qa.apply(z,k)+(h?" "+h:"");let d=b;return b[0]&&(d=u.as||b,delete u.as),gc&&d[0]&&gc(u),y_(d,u)}return U}}var Bp=b=>typeof b=="function",Ua=(b,B)=>Bp(b)?b(B):b,Np=(()=>{let b=0;return()=>(++b).toString()})(),C_=(()=>{let b;return()=>{if(b===void 0&&typeof window<"u"){let B=matchMedia("(prefers-reduced-motion: reduce)");b=!B||B.matches}return b}})(),zp=20,yc="default",w_=(b,B)=>{let{toastLimit:z}=b.settings;switch(B.type){case 0:return{...b,toasts:[B.toast,...b.toasts].slice(0,z)};case 1:return{...b,toasts:b.toasts.map(H=>H.id===B.toast.id?{...H,...B.toast}:H)};case 2:let{toast:k}=B;return w_(b,{type:b.toasts.find(H=>H.id===k.id)?1:0,toast:k});case 3:let{toastId:U}=B;return{...b,toasts:b.toasts.map(H=>H.id===U||U===void 0?{...H,dismissed:!0,visible:!1}:H)};case 4:return B.toastId===void 0?{...b,toasts:[]}:{...b,toasts:b.toasts.filter(H=>H.id!==B.toastId)};case 5:return{...b,pausedAt:B.time};case 6:let K=B.time-(b.pausedAt||0);return{...b,pausedAt:void 0,toasts:b.toasts.map(H=>({...H,pauseDuration:H.pauseDuration+K}))}}},Ha=[],x_={toasts:[],pausedAt:void 0,settings:{toastLimit:zp}},di={},E_=(b,B=yc)=>{di[B]=w_(di[B]||x_,b),Ha.forEach(([z,k])=>{z===B&&k(di[B])})},A_=b=>Object.keys(di).forEach(B=>E_(b,B)),Hp=b=>Object.keys(di).find(B=>di[B].toasts.some(z=>z.id===b)),Ia=(b=yc)=>B=>{E_(B,b)},jp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Up=(b={},B=yc)=>{let[z,k]=ne.useState(di[B]||x_),U=ne.useRef(di[B]);ne.useEffect(()=>(U.current!==di[B]&&k(di[B]),Ha.push([B,k]),()=>{let H=Ha.findIndex(([u])=>u===B);H>-1&&Ha.splice(H,1)}),[B]);let K=z.toasts.map(H=>{var u,h,d;return{...b,...b[H.type],...H,removeDelay:H.removeDelay||((u=b[H.type])==null?void 0:u.removeDelay)||b?.removeDelay,duration:H.duration||((h=b[H.type])==null?void 0:h.duration)||b?.duration||jp[H.type],style:{...b.style,...(d=b[H.type])==null?void 0:d.style,...H.style}}});return{...z,toasts:K}},qp=(b,B="blank",z)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:B,ariaProps:{role:"status","aria-live":"polite"},message:b,pauseDuration:0,...z,id:z?.id||Np()}),Sn=b=>(B,z)=>{let k=qp(B,b,z);return Ia(k.toasterId||Hp(k.id))({type:2,toast:k}),k.id},ft=(b,B)=>Sn("blank")(b,B);ft.error=Sn("error");ft.success=Sn("success");ft.loading=Sn("loading");ft.custom=Sn("custom");ft.dismiss=(b,B)=>{let z={type:3,toastId:b};B?Ia(B)(z):A_(z)};ft.dismissAll=b=>ft.dismiss(void 0,b);ft.remove=(b,B)=>{let z={type:4,toastId:b};B?Ia(B)(z):A_(z)};ft.removeAll=b=>ft.remove(void 0,b);ft.promise=(b,B,z)=>{let k=ft.loading(B.loading,{...z,...z?.loading});return typeof b=="function"&&(b=b()),b.then(U=>{let K=B.success?Ua(B.success,U):void 0;return K?ft.success(K,{id:k,...z,...z?.success}):ft.dismiss(k),U}).catch(U=>{let K=B.error?Ua(B.error,U):void 0;K?ft.error(K,{id:k,...z,...z?.error}):ft.dismiss(k)}),b};var Ip=1e3,Pp=(b,B="default")=>{let{toasts:z,pausedAt:k}=Up(b,B),U=ne.useRef(new Map).current,K=ne.useCallback((f,g=Ip)=>{if(U.has(f))return;let y=setTimeout(()=>{U.delete(f),H({type:4,toastId:f})},g);U.set(f,y)},[]);ne.useEffect(()=>{if(k)return;let f=Date.now(),g=z.map(y=>{if(y.duration===1/0)return;let D=(y.duration||0)+y.pauseDuration-(f-y.createdAt);if(D<0){y.visible&&ft.dismiss(y.id);return}return setTimeout(()=>ft.dismiss(y.id,B),D)});return()=>{g.forEach(y=>y&&clearTimeout(y))}},[z,k,B]);let H=ne.useCallback(Ia(B),[B]),u=ne.useCallback(()=>{H({type:5,time:Date.now()})},[H]),h=ne.useCallback((f,g)=>{H({type:1,toast:{id:f,height:g}})},[H]),d=ne.useCallback(()=>{k&&H({type:6,time:Date.now()})},[k,H]),p=ne.useCallback((f,g)=>{let{reverseOrder:y=!1,gutter:D=8,defaultPosition:v}=g||{},o=z.filter(l=>(l.position||v)===(f.position||v)&&l.height),c=o.findIndex(l=>l.id===f.id),a=o.filter((l,_)=>_<c&&l.visible).length;return o.filter(l=>l.visible).slice(...y?[a+1]:[0,a]).reduce((l,_)=>l+(_.height||0)+D,0)},[z]);return ne.useEffect(()=>{z.forEach(f=>{if(f.dismissed)K(f.id,f.removeDelay);else{let g=U.get(f.id);g&&(clearTimeout(g),U.delete(f.id))}})},[z,K]),{toasts:z,handlers:{updateHeight:h,startPause:u,endPause:d,calculateOffset:p}}},Gp=ji`
|
|
10
|
+
from {
|
|
11
|
+
transform: scale(0) rotate(45deg);
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
to {
|
|
15
|
+
transform: scale(1) rotate(45deg);
|
|
16
|
+
opacity: 1;
|
|
17
|
+
}`,Vp=ji`
|
|
18
|
+
from {
|
|
19
|
+
transform: scale(0);
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
to {
|
|
23
|
+
transform: scale(1);
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}`,Fp=ji`
|
|
26
|
+
from {
|
|
27
|
+
transform: scale(0) rotate(90deg);
|
|
28
|
+
opacity: 0;
|
|
29
|
+
}
|
|
30
|
+
to {
|
|
31
|
+
transform: scale(1) rotate(90deg);
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}`,Yp=ms("div")`
|
|
34
|
+
width: 20px;
|
|
35
|
+
opacity: 0;
|
|
36
|
+
height: 20px;
|
|
37
|
+
border-radius: 10px;
|
|
38
|
+
background: ${b=>b.primary||"#ff4b4b"};
|
|
39
|
+
position: relative;
|
|
40
|
+
transform: rotate(45deg);
|
|
41
|
+
|
|
42
|
+
animation: ${Gp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
43
|
+
forwards;
|
|
44
|
+
animation-delay: 100ms;
|
|
45
|
+
|
|
46
|
+
&:after,
|
|
47
|
+
&:before {
|
|
48
|
+
content: '';
|
|
49
|
+
animation: ${Vp} 0.15s ease-out forwards;
|
|
50
|
+
animation-delay: 150ms;
|
|
51
|
+
position: absolute;
|
|
52
|
+
border-radius: 3px;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
background: ${b=>b.secondary||"#fff"};
|
|
55
|
+
bottom: 9px;
|
|
56
|
+
left: 4px;
|
|
57
|
+
height: 2px;
|
|
58
|
+
width: 12px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:before {
|
|
62
|
+
animation: ${Fp} 0.15s ease-out forwards;
|
|
63
|
+
animation-delay: 180ms;
|
|
64
|
+
transform: rotate(90deg);
|
|
65
|
+
}
|
|
66
|
+
`,Kp=ji`
|
|
67
|
+
from {
|
|
68
|
+
transform: rotate(0deg);
|
|
69
|
+
}
|
|
70
|
+
to {
|
|
71
|
+
transform: rotate(360deg);
|
|
72
|
+
}
|
|
73
|
+
`,Wp=ms("div")`
|
|
74
|
+
width: 12px;
|
|
75
|
+
height: 12px;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
border: 2px solid;
|
|
78
|
+
border-radius: 100%;
|
|
79
|
+
border-color: ${b=>b.secondary||"#e0e0e0"};
|
|
80
|
+
border-right-color: ${b=>b.primary||"#616161"};
|
|
81
|
+
animation: ${Kp} 1s linear infinite;
|
|
82
|
+
`,Xp=ji`
|
|
83
|
+
from {
|
|
84
|
+
transform: scale(0) rotate(45deg);
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
to {
|
|
88
|
+
transform: scale(1) rotate(45deg);
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}`,Qp=ji`
|
|
91
|
+
0% {
|
|
92
|
+
height: 0;
|
|
93
|
+
width: 0;
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
96
|
+
40% {
|
|
97
|
+
height: 0;
|
|
98
|
+
width: 6px;
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
100% {
|
|
102
|
+
opacity: 1;
|
|
103
|
+
height: 10px;
|
|
104
|
+
}`,Zp=ms("div")`
|
|
105
|
+
width: 20px;
|
|
106
|
+
opacity: 0;
|
|
107
|
+
height: 20px;
|
|
108
|
+
border-radius: 10px;
|
|
109
|
+
background: ${b=>b.primary||"#61d345"};
|
|
110
|
+
position: relative;
|
|
111
|
+
transform: rotate(45deg);
|
|
112
|
+
|
|
113
|
+
animation: ${Xp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
114
|
+
forwards;
|
|
115
|
+
animation-delay: 100ms;
|
|
116
|
+
&:after {
|
|
117
|
+
content: '';
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
animation: ${Qp} 0.2s ease-out forwards;
|
|
120
|
+
opacity: 0;
|
|
121
|
+
animation-delay: 200ms;
|
|
122
|
+
position: absolute;
|
|
123
|
+
border-right: 2px solid;
|
|
124
|
+
border-bottom: 2px solid;
|
|
125
|
+
border-color: ${b=>b.secondary||"#fff"};
|
|
126
|
+
bottom: 6px;
|
|
127
|
+
left: 6px;
|
|
128
|
+
height: 10px;
|
|
129
|
+
width: 6px;
|
|
130
|
+
}
|
|
131
|
+
`,Jp=ms("div")`
|
|
132
|
+
position: absolute;
|
|
133
|
+
`,$p=ms("div")`
|
|
134
|
+
position: relative;
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
align-items: center;
|
|
138
|
+
min-width: 20px;
|
|
139
|
+
min-height: 20px;
|
|
140
|
+
`,e0=ji`
|
|
141
|
+
from {
|
|
142
|
+
transform: scale(0.6);
|
|
143
|
+
opacity: 0.4;
|
|
144
|
+
}
|
|
145
|
+
to {
|
|
146
|
+
transform: scale(1);
|
|
147
|
+
opacity: 1;
|
|
148
|
+
}`,t0=ms("div")`
|
|
149
|
+
position: relative;
|
|
150
|
+
transform: scale(0.6);
|
|
151
|
+
opacity: 0.4;
|
|
152
|
+
min-width: 20px;
|
|
153
|
+
animation: ${e0} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
154
|
+
forwards;
|
|
155
|
+
`,i0=({toast:b})=>{let{icon:B,type:z,iconTheme:k}=b;return B!==void 0?typeof B=="string"?ne.createElement(t0,null,B):B:z==="blank"?null:ne.createElement($p,null,ne.createElement(Wp,{...k}),z!=="loading"&&ne.createElement(Jp,null,z==="error"?ne.createElement(Yp,{...k}):ne.createElement(Zp,{...k})))},s0=b=>`
|
|
156
|
+
0% {transform: translate3d(0,${b*-200}%,0) scale(.6); opacity:.5;}
|
|
157
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
158
|
+
`,r0=b=>`
|
|
159
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
160
|
+
100% {transform: translate3d(0,${b*-150}%,-1px) scale(.6); opacity:0;}
|
|
161
|
+
`,n0="0%{opacity:0;} 100%{opacity:1;}",a0="0%{opacity:1;} 100%{opacity:0;}",l0=ms("div")`
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
background: #fff;
|
|
165
|
+
color: #363636;
|
|
166
|
+
line-height: 1.3;
|
|
167
|
+
will-change: transform;
|
|
168
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
169
|
+
max-width: 350px;
|
|
170
|
+
pointer-events: auto;
|
|
171
|
+
padding: 8px 10px;
|
|
172
|
+
border-radius: 8px;
|
|
173
|
+
`,o0=ms("div")`
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
margin: 4px 10px;
|
|
177
|
+
color: inherit;
|
|
178
|
+
flex: 1 1 auto;
|
|
179
|
+
white-space: pre-line;
|
|
180
|
+
`,c0=(b,B)=>{let z=b.includes("top")?1:-1,[k,U]=C_()?[n0,a0]:[s0(z),r0(z)];return{animation:B?`${ji(k)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ji(U)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},u0=ne.memo(({toast:b,position:B,style:z,children:k})=>{let U=b.height?c0(b.position||B||"top-center",b.visible):{opacity:0},K=ne.createElement(i0,{toast:b}),H=ne.createElement(o0,{...b.ariaProps},Ua(b.message,b));return ne.createElement(l0,{className:b.className,style:{...U,...z,...b.style}},typeof k=="function"?k({icon:K,message:H}):ne.createElement(ne.Fragment,null,K,H))});Mp(ne.createElement);var h0=({id:b,className:B,style:z,onHeightUpdate:k,children:U})=>{let K=ne.useCallback(H=>{if(H){let u=()=>{let h=H.getBoundingClientRect().height;k(b,h)};u(),new MutationObserver(u).observe(H,{subtree:!0,childList:!0,characterData:!0})}},[b,k]);return ne.createElement("div",{ref:K,className:B,style:z},U)},f0=(b,B)=>{let z=b.includes("top"),k=z?{top:0}:{bottom:0},U=b.includes("center")?{justifyContent:"center"}:b.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:C_()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${B*(z?1:-1)}px)`,...k,...U}},d0=qa`
|
|
181
|
+
z-index: 9999;
|
|
182
|
+
> * {
|
|
183
|
+
pointer-events: auto;
|
|
184
|
+
}
|
|
185
|
+
`,Ba=16,_0=({reverseOrder:b,position:B="top-center",toastOptions:z,gutter:k,children:U,toasterId:K,containerStyle:H,containerClassName:u})=>{let{toasts:h,handlers:d}=Pp(z,K);return ne.createElement("div",{"data-rht-toaster":K||"",style:{position:"fixed",zIndex:9999,top:Ba,left:Ba,right:Ba,bottom:Ba,pointerEvents:"none",...H},className:u,onMouseEnter:d.startPause,onMouseLeave:d.endPause},h.map(p=>{let f=p.position||B,g=d.calculateOffset(p,{reverseOrder:b,gutter:k,defaultPosition:B}),y=f0(f,g);return ne.createElement(h0,{id:p.id,key:p.id,onHeightUpdate:d.updateHeight,className:p.visible?d0:"",style:y},p.type==="custom"?Ua(p.message,p):U?U(p):ne.createElement(u0,{toast:p,position:f}))}))},pn=ft;function m0({open:b,onOpenChange:B}){const[z,k]=ne.useState(null),[U,K]=ne.useState(null),[H,u]=ne.useState(!1),[h,d]=ne.useState(null),[p,f]=ne.useState(!1),[g,y]=ne.useState(!1),[D,v]=ne.useState(null),[o,c]=ne.useState(!1),[a,l]=ne.useState([]),[_,C]=ne.useState(!1),[w,A]=ne.useState(""),[m,R]=ne.useState(null);ne.useEffect(()=>{if(!b)return;async function T(){try{const[x,L,W]=await Promise.all([fetch("/api/settings",{credentials:"include"}),fetch("/api/auth/session-password",{credentials:"include"}),fetch("/api/auth/passkeys",{credentials:"include"})]);if(x.ok){const Z=await x.json();k(Z),K(Z)}if(L.ok){const Z=await L.json();d(Z.password)}if(W.ok){const Z=await W.json();l(Z)}}catch(x){console.error("Failed to fetch settings:",x)}}T()},[b]),ne.useEffect(()=>{b||(k(null),K(null))},[b]);const G=ne.useCallback(async(T,x)=>{const L=await fetch("/api/settings",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:T,value:String(x)})});L.ok&&(await L.json()).success&&k(Z=>Z?{...Z,[T]:x}:null)},[]),q=U!==null&&z!==null&&Object.keys(U).some(T=>String(U[T])!==String(z[T]));async function Y(){if(!(!U||!z)){u(!0);try{for(const T of Object.keys(U))String(U[T])!==String(z[T])&&await G(T,U[T]);pn.success("Settings saved")}catch(T){console.error("Failed to save settings:",T),pn.error("Failed to save settings")}finally{u(!1)}}}function j(){K(z)}function Q(T,x){K(L=>L?{...L,[T]:x}:null)}async function ae(){c(!0);try{const T=await fetch("/api/auth/session-password/rotate",{method:"POST"});if(T.ok){const x=await T.json();v(x.password),d(x.password),pn.success("Password rotated")}}catch(T){console.error("Failed to rotate password:",T),pn.error("Failed to rotate password")}finally{c(!1)}}async function P(){C(!0),A("");try{const{startRegistration:T}=await e_(async()=>{const{startRegistration:F}=await import("./index-BDkarAkX.js");return{startRegistration:F}},[]),x=await fetch("/api/auth/passkey/register/options",{credentials:"include"});if(!x.ok){A("Failed to start registration");return}const L=await x.json(),W=await T({optionsJSON:L}),Z=window.prompt('Name this passkey (e.g. "iPhone Touch ID"):',"");if(!Z){C(!1);return}const oe=await fetch("/api/auth/passkey/register/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:W,name:Z})});if(!oe.ok){const F=await oe.json();A(F.error||"Registration failed");return}const he=await fetch("/api/auth/passkeys",{credentials:"include"});if(he.ok){const F=await he.json();l(F)}}catch(T){T.name==="NotAllowedError"?A("Registration cancelled"):(A("Registration failed"),console.error("[Passkey] Registration error:",T))}finally{C(!1)}}async function J(T){try{(await fetch(`/api/auth/passkey/${T}`,{method:"DELETE",credentials:"include"})).ok&&l(L=>L.filter(W=>W.id!==T))}catch(x){console.error("Failed to delete passkey:",x)}}if(!z||!U)return M.jsx(Fd,{open:b,onOpenChange:B,children:M.jsxs(Yd,{children:[M.jsxs(Kd,{children:[M.jsx(Wd,{children:"Settings"}),M.jsx(Xd,{})]}),M.jsx(Qd,{className:"flex items-center justify-center py-8",children:M.jsx(ei,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})});const ie=({label:T,description:x,children:L,note:W})=>M.jsxs("div",{className:"flex items-start justify-between gap-4 py-4 px-4 border-b border-border/50 last:border-b-0",children:[M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsx("label",{className:"text-sm font-medium block text-foreground",children:T}),x&&M.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:x})]}),M.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[L,W&&M.jsxs("div",{className:"text-xs text-muted-foreground italic ml-2",children:["ℹ️ ",W]})]})]}),E=({title:T,children:x})=>M.jsxs("div",{className:"mb-8",children:[M.jsx("h3",{className:"text-base font-bold mb-3 text-foreground uppercase tracking-tight",children:T}),M.jsx("div",{className:"rounded-lg border border-border bg-card divide-y divide-border",children:x})]});return M.jsx(Fd,{open:b,onOpenChange:B,children:M.jsxs(Yd,{className:"max-w-2xl",children:[M.jsxs(Kd,{children:[M.jsx(Wd,{children:"Settings"}),M.jsx(Xd,{})]}),M.jsxs(Qd,{children:[M.jsxs(E,{title:"Session Password",children:[D?M.jsx(ie,{label:"New Session Password",note:"",children:M.jsxs("div",{className:"w-80 flex items-center gap-1",children:[M.jsx("div",{className:"flex-1 px-2 py-1 rounded border border-green-500/30 bg-green-500/5 font-mono text-sm break-all",children:g?D:"••••••••"}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>y(T=>!T),title:g?"Hide":"Show",children:g?M.jsx(dc,{className:"h-4 w-4"}):M.jsx(_c,{className:"h-4 w-4"})}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>{D&&(navigator.clipboard.writeText(D),R("new"),setTimeout(()=>R(null),2e3))},className:m==="new"?"text-green-600 dark:text-green-400":"",title:"Copy to clipboard",children:m==="new"?M.jsx(Od,{className:"h-4 w-4"}):M.jsx(Ld,{className:"h-4 w-4"})})]})}):M.jsxs(M.Fragment,{children:[M.jsx(ie,{label:"Current Password",children:M.jsxs("div",{className:"w-80 flex items-center gap-1",children:[M.jsx("div",{className:"flex-1 px-2 py-1 rounded border border-border bg-muted/50 font-mono text-sm break-all",children:p?h||"—":"••••••••"}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>f(T=>!T),title:p?"Hide":"Show",children:p?M.jsx(dc,{className:"h-4 w-4"}):M.jsx(_c,{className:"h-4 w-4"})}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>{h&&(navigator.clipboard.writeText(h),R("current"),setTimeout(()=>R(null),2e3))},className:m==="current"?"text-green-600 dark:text-green-400":"",title:"Copy to clipboard",children:m==="current"?M.jsx(Od,{className:"h-4 w-4"}):M.jsx(Ld,{className:"h-4 w-4"})})]})}),M.jsxs("div",{className:"px-4 py-4 border-b border-border/50 last:border-b-0 flex items-center justify-between",children:[M.jsx("label",{className:"text-sm font-medium",children:"Rotate Password"}),M.jsx(Ie,{variant:"outline",size:"icon-sm",onClick:ae,disabled:o,title:o?"Rotating...":"Rotate password",children:o?M.jsx(ei,{className:"h-4 w-4 animate-spin"}):M.jsx(Sg,{className:"h-4 w-4"})})]})]}),M.jsx(ie,{label:"Password Type",description:"xkcd: memorable words, random: cryptographic string",children:M.jsxs("select",{value:U.SESSION_PASSWORD_TYPE,onChange:T=>Q("SESSION_PASSWORD_TYPE",T.target.value),className:"px-2 py-1 rounded border border-input bg-background text-sm",children:[M.jsx("option",{value:"xkcd",children:"xkcd"}),M.jsx("option",{value:"random",children:"random"})]})}),M.jsx(ie,{label:"Password Length",children:M.jsx("input",{type:"number",value:U.SESSION_PASSWORD_LENGTH,onChange:T=>Q("SESSION_PASSWORD_LENGTH",parseInt(T.target.value)),min:U.SESSION_PASSWORD_TYPE==="xkcd"?2:8,max:U.SESSION_PASSWORD_TYPE==="xkcd"?10:64,className:"w-20 px-2 py-1 rounded border border-input bg-background text-sm text-center"})}),M.jsx(ie,{label:"Log to Console",description:"Log password at startup",children:M.jsx(gn,{checked:U.LOG_SESSION_PASSWORD,onCheckedChange:T=>Q("LOG_SESSION_PASSWORD",T)})})]}),M.jsxs(E,{title:"Authentication",children:[M.jsx(ie,{label:"Disable Authentication",description:"Allow access without password (skip login)",note:U.AUTH_DISABLED?"⚠️ Security risk":void 0,children:M.jsx(gn,{checked:U.AUTH_DISABLED,onCheckedChange:T=>Q("AUTH_DISABLED",T)})}),M.jsx(ie,{label:"Show Auth Disabled Warning",description:"Show warning banner when auth is disabled",children:M.jsx(gn,{checked:U.SHOW_AUTH_DISABLED_WARNING,onCheckedChange:T=>Q("SHOW_AUTH_DISABLED_WARNING",T)})}),M.jsx(ie,{label:"Enable TOTP",description:"Require TOTP for login. Affects next login attempt",children:M.jsx(gn,{checked:U.TOTP_ENABLED,onCheckedChange:T=>Q("TOTP_ENABLED",T)})})]}),M.jsxs(E,{title:"Passkeys",children:[M.jsx(ie,{label:"Relying Party Origin",description:"URL for passkey verification",children:M.jsx("input",{type:"text",value:U.PASSKEY_RP_ORIGIN,onChange:T=>Q("PASSKEY_RP_ORIGIN",T.target.value),placeholder:"https://example.com",className:"w-80 px-3 py-2 rounded border border-input bg-background text-sm"})}),M.jsxs("div",{className:"px-4 py-4 border-b border-border/50 last:border-b-0",children:[M.jsxs("div",{className:"flex items-center justify-between mb-4",children:[M.jsx("label",{className:"text-sm font-medium",children:"Registered Passkeys"}),M.jsx(Ie,{variant:"outline",size:"icon-sm",onClick:P,disabled:_,title:"Add passkey",children:_?M.jsx(ei,{className:"h-4 w-4 animate-spin"}):M.jsx(za,{className:"h-4 w-4"})})]}),w&&M.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-2 mb-3",children:M.jsx("p",{className:"text-xs text-destructive",children:w})}),a.length===0?M.jsx("p",{className:"text-xs text-muted-foreground italic",children:"No passkeys registered"}):M.jsx("div",{className:"space-y-2",children:a.map(T=>M.jsxs("div",{className:"flex items-center justify-between p-3 rounded border border-border bg-muted/30 text-sm",children:[M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsx("p",{className:"font-medium truncate",children:T.name}),M.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(T.registeredAt).toLocaleDateString()})]}),M.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>J(T.id),className:"ml-2 text-destructive hover:text-destructive hover:bg-destructive/10",children:M.jsx(xg,{className:"h-4 w-4"})})]},T.id))})]})]}),M.jsxs(E,{title:"Rate Limiting",children:[M.jsx(ie,{label:"Global Rate Limit",description:"Max requests per 15 minutes (unauthenticated requests only)",children:M.jsx("input",{type:"number",value:U.RATE_LIMIT_GLOBAL_MAX,onChange:T=>Q("RATE_LIMIT_GLOBAL_MAX",parseInt(T.target.value)),min:10,className:"w-24 px-2 py-1 rounded border border-input bg-background text-sm text-center"})}),M.jsx(ie,{label:"Password Login Rate Limit",description:"Max login attempts per hour",children:M.jsx("input",{type:"number",value:U.RATE_LIMIT_SESSION_PASSWORD_MAX,onChange:T=>Q("RATE_LIMIT_SESSION_PASSWORD_MAX",parseInt(T.target.value)),min:1,className:"w-24 px-2 py-1 rounded border border-input bg-background text-sm text-center"})})]}),M.jsx(E,{title:"Terminal",children:M.jsx(ie,{label:"Scrollback Buffer Size",description:"Number of lines to keep in history. Affects new sessions",children:M.jsx("input",{type:"number",value:U.SCROLLBACK_LINES,onChange:T=>Q("SCROLLBACK_LINES",parseInt(T.target.value)),min:100,max:1e5,className:"w-32 px-2 py-1 rounded border border-input bg-background text-sm text-center"})})})]}),q&&M.jsxs(Ap,{children:[M.jsx(Ie,{variant:"ghost",onClick:j,disabled:H,children:"Discard"}),M.jsxs(Ie,{onClick:Y,disabled:H,children:[H&&M.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Save"]})]})]})})}var hc={exports:{}},Jd;function v0(){return Jd||(Jd=1,(function(b,B){(function(z,k){b.exports=k()})(globalThis,(()=>(()=>{var z={4567:function(H,u,h){var d=this&&this.__decorate||function(a,l,_,C){var w,A=arguments.length,m=A<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,C);else for(var R=a.length-1;R>=0;R--)(w=a[R])&&(m=(A<3?w(m):A>3?w(l,_,m):w(l,_))||m);return A>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const f=h(9042),g=h(9924),y=h(844),D=h(4725),v=h(2585),o=h(3656);let c=u.AccessibilityManager=class extends y.Disposable{constructor(a,l,_,C){super(),this._terminal=a,this._coreBrowserService=_,this._renderService=C,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 w=0;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);if(this._topBoundaryFocusListener=w=>this._handleBoundaryFocus(w,0),this._bottomBoundaryFocusListener=w=>this._handleBoundaryFocus(w,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 g.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((w=>this._handleResize(w.rows)))),this.register(this._terminal.onRender((w=>this._refreshRows(w.start,w.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((w=>this._handleChar(w)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
186
|
+
`)))),this.register(this._terminal.onA11yTab((w=>this._handleTab(w)))),this.register(this._terminal.onKey((w=>this._handleKey(w.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let l=0;l<a;l++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
187
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,l){this._liveRegionDebouncer.refresh(a,l,this._terminal.rows)}_renderRows(a,l){const _=this._terminal.buffer,C=_.lines.length.toString();for(let w=a;w<=l;w++){const A=_.lines.get(_.ydisp+w),m=[],R=A?.translateToString(!0,void 0,void 0,m)||"",G=(_.ydisp+w+1).toString(),q=this._rowElements[w];q&&(R.length===0?(q.innerText=" ",this._rowColumns.set(q,[0,1])):(q.textContent=R,this._rowColumns.set(q,m)),q.setAttribute("aria-posinset",G),q.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,l){const _=a.target,C=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==C)return;let w,A;if(l===0?(w=_,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(w=this._rowElements.shift(),A=_,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:a.anchorNode,offset:a.anchorOffset},_={node:a.focusNode,offset:a.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const C=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:C,offset:C.textContent?.length??0}),!this._rowContainer.contains(_.node))return;const w=({node:R,offset:G})=>{const q=R instanceof Text?R.parentNode:R;let Y=parseInt(q?.getAttribute("aria-posinset"),10)-1;if(isNaN(Y))return console.warn("row is invalid. Race condition?"),null;const j=this._rowColumns.get(q);if(!j)return console.warn("columns is null. Race condition?"),null;let Q=G<j.length?j[G]:j.slice(-1)[0]+1;return Q>=this._terminal.cols&&(++Y,Q=0),{row:Y,column:Q}},A=w(l),m=w(_);if(A&&m){if(A.row>m.row||A.row===m.row&&A.column>=m.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(m.row-A.row)*this._terminal.cols-A.column+m.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_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 a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=c=d([p(1,v.IInstantiationService),p(2,D.ICoreBrowserService),p(3,D.IRenderService)],c)},3614:(H,u)=>{function h(g){return g.replace(/\r?\n/g,"\r")}function d(g,y){return y?"\x1B[200~"+g+"\x1B[201~":g}function p(g,y,D,v){g=d(g=h(g),D.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),D.triggerDataEvent(g,!0),y.value=""}function f(g,y,D){const v=D.getBoundingClientRect(),o=g.clientX-v.left-10,c=g.clientY-v.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${o}px`,y.style.top=`${c}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=h,u.bracketTextForPaste=d,u.copyHandler=function(g,y){g.clipboardData&&g.clipboardData.setData("text/plain",y.selectionText),g.preventDefault()},u.handlePasteEvent=function(g,y,D,v){g.stopPropagation(),g.clipboardData&&p(g.clipboardData.getData("text/plain"),y,D,v)},u.paste=p,u.moveTextAreaUnderMouseCursor=f,u.rightClickHandler=function(g,y,D,v,o){f(g,y,D),o&&v.rightClickSelect(g),y.value=v.selectionText,y.select()}},7239:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=h(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(p,f,g){this._css.set(p,f,g)}getCss(p,f){return this._css.get(p,f)}setColor(p,f,g){this._color.set(p,f,g)}getColor(p,f){return this._color.get(p,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(h,d,p,f){h.addEventListener(d,p,f);let g=!1;return{dispose:()=>{g||(g=!0,h.removeEventListener(d,p,f))}}}},3551:function(H,u,h){var d=this&&this.__decorate||function(c,a,l,_){var C,w=arguments.length,A=w<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(c,a,l,_);else for(var m=c.length-1;m>=0;m--)(C=c[m])&&(A=(w<3?C(A):w>3?C(a,l,A):C(a,l))||A);return w>3&&A&&Object.defineProperty(a,l,A),A},p=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier=void 0;const f=h(3656),g=h(8460),y=h(844),D=h(2585),v=h(4725);let o=u.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(c,a,l,_,C){super(),this._element=c,this._mouseService=a,this._renderService=l,this._bufferService=_,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const l=c.composedPath();for(let _=0;_<l.length;_++){const C=l[_];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){this._activeProviderReplies&&a||(this._activeProviderReplies?.forEach((_=>{_?.forEach((C=>{C.link.dispose&&C.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let l=!1;for(const[_,C]of this._linkProviderService.linkProviders.entries())a?this._activeProviderReplies?.get(_)&&(l=this._checkLinkProviderResult(_,c,l)):C.provideLinks(c.y,(w=>{if(this._isMouseOut)return;const A=w?.map((m=>({link:m})));this._activeProviderReplies?.set(_,A),l=this._checkLinkProviderResult(_,c,l),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,a){const l=new Set;for(let _=0;_<a.size;_++){const C=a.get(_);if(C)for(let w=0;w<C.length;w++){const A=C[w],m=A.link.range.start.y<c?0:A.link.range.start.x,R=A.link.range.end.y>c?this._bufferService.cols:A.link.range.end.x;for(let G=m;G<=R;G++){if(l.has(G)){C.splice(w--,1);break}l.add(G)}}}}_checkLinkProviderResult(c,a,l){if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let C=!1;for(let w=0;w<c;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(C=!0);if(!C&&_){const w=_.find((A=>this._linkAtPosition(A.link,a)));w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let w=0;w<this._activeProviderReplies.size;w++){const A=this._activeProviderReplies.get(w)?.find((m=>this._linkAtPosition(m.link,a)));if(A){l=!0,this._handleNewLink(A);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:l=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:l=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._askForLink(w,!1)}}))))}_linkHover(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(l,a.text)}_fireUnderlineEvent(c,a){const l=c.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(l,a.text)}_linkAtPosition(c,a){const l=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,C=a.y*this._bufferService.cols+a.x;return l<=C&&C<=_}_positionFromMouseEvent(c,a,l){const _=l.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,l,_,C){return{x1:c,y1:a,x2:l,y2:_,cols:this._bufferService.cols,fg:C}}};u.Linkifier=o=d([p(1,v.IMouseService),p(2,v.IRenderService),p(3,D.IBufferService),p(4,v.ILinkProviderService)],o)},9042:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(H,u,h){var d=this&&this.__decorate||function(v,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,o,c,a);else for(var w=v.length-1;w>=0;w--)(l=v[w])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},p=this&&this.__param||function(v,o){return function(c,a){o(c,a,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const f=h(511),g=h(2585);let y=u.OscLinkProvider=class{constructor(v,o,c){this._bufferService=v,this._optionsService=o,this._oscLinkService=c}provideLinks(v,o){const c=this._bufferService.buffer.lines.get(v-1);if(!c)return void o(void 0);const a=[],l=this._optionsService.rawOptions.linkHandler,_=new f.CellData,C=c.getTrimmedLength();let w=-1,A=-1,m=!1;for(let R=0;R<C;R++)if(A!==-1||c.hasContent(R)){if(c.loadCell(R,_),_.hasExtendedAttrs()&&_.extended.urlId){if(A===-1){A=R,w=_.extended.urlId;continue}m=_.extended.urlId!==w}else A!==-1&&(m=!0);if(m||A!==-1&&R===C-1){const G=this._oscLinkService.getLinkData(w)?.uri;if(G){const q={start:{x:A+1,y:v},end:{x:R+(m||R!==C-1?0:1),y:v}};let Y=!1;if(!l?.allowNonHttpProtocols)try{const j=new URL(G);["http:","https:"].includes(j.protocol)||(Y=!0)}catch{Y=!0}Y||a.push({text:G,range:q,activate:(j,Q)=>l?l.activate(j,Q,q):D(0,Q),hover:(j,Q)=>l?.hover?.(j,Q,q),leave:(j,Q)=>l?.leave?.(j,Q,q)})}m=!1,_.hasExtendedAttrs()&&_.extended.urlId?(A=R,w=_.extended.urlId):(A=-1,w=-1)}}o(a)}};function D(v,o){if(confirm(`Do you want to navigate to ${o}?
|
|
188
|
+
|
|
189
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=y=d([p(0,g.IBufferService),p(1,g.IOptionsService),p(2,g.IOscLinkService)],y)},6193:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,d,p){this._rowCount=p,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=h(3614),p=h(3656),f=h(3551),g=h(9042),y=h(3730),D=h(1680),v=h(3107),o=h(5744),c=h(2950),a=h(1296),l=h(428),_=h(4269),C=h(5114),w=h(8934),A=h(3230),m=h(9312),R=h(4725),G=h(6731),q=h(8055),Y=h(8969),j=h(8460),Q=h(844),ae=h(6114),P=h(8437),J=h(2584),ie=h(7399),E=h(5941),T=h(9074),x=h(2585),L=h(5435),W=h(4567),Z=h(779);class oe extends Y.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(F={}){super(F),this.browser=ae,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Q.MutableDisposable),this._onCursorMove=this.register(new j.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new j.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new j.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new j.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new j.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new j.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new j.EventEmitter),this._onBlur=this.register(new j.EventEmitter),this._onA11yCharEmitter=this.register(new j.EventEmitter),this._onA11yTabEmitter=this.register(new j.EventEmitter),this._onWillOpen=this.register(new j.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(T.DecorationService),this._instantiationService.setService(x.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Z.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((N,se)=>this.refresh(N,se)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((N=>this._reportWindowsOptions(N)))),this.register(this._inputHandler.onColor((N=>this._handleColorEvent(N)))),this.register((0,j.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,j.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,j.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,j.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((N=>this._afterResize(N.cols,N.rows)))),this.register((0,Q.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(F){if(this._themeService)for(const N of F){let se,fe="";switch(N.index){case 256:se="foreground",fe="10";break;case 257:se="background",fe="11";break;case 258:se="cursor",fe="12";break;default:se="ansi",fe="4;"+N.index}switch(N.type){case 0:const _e=q.color.toColorRGB(se==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[se]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${fe};${(0,E.toRgbString)(_e)}${J.C1_ESCAPED.ST}`);break;case 1:if(se==="ansi")this._themeService.modifyColors((me=>me.ansi[N.index]=q.channels.toColor(...N.color)));else{const me=se;this._themeService.modifyColors((De=>De[me]=q.channels.toColor(...N.color)))}break;case 2:this._themeService.restoreColor(N.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(F){F?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(F){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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 F=this.buffer.ybase+this.buffer.y,N=this.buffer.lines.get(F);if(!N)return;const se=Math.min(this.buffer.x,this.cols-1),fe=this._renderService.dimensions.css.cell.height,_e=N.getWidth(se),me=this._renderService.dimensions.css.cell.width*_e,De=this.buffer.y*this._renderService.dimensions.css.cell.height,Oe=se*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Oe+"px",this.textarea.style.top=De+"px",this.textarea.style.width=me+"px",this.textarea.style.height=fe+"px",this.textarea.style.lineHeight=fe+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(N=>{this.hasSelection()&&(0,d.copyHandler)(N,this._selectionService)})));const F=N=>(0,d.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",F)),this.register((0,p.addDisposableDomListener)(this.element,"paste",F)),ae.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(N=>{N.button===2&&(0,d.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(N=>{(0,d.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ae.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(N=>{N.button===1&&(0,d.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(F=>this._keyUp(F)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(F=>this._keyDown(F)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(F=>this._keyPress(F)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(F=>this._compositionHelper.compositionupdate(F)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(F=>this._inputEvent(F)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(F){if(!F)throw new Error("Terminal requires a parent element.");if(F.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=F.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"),F.appendChild(this.element);const N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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,p.addDisposableDomListener)(this.screenElement,"mousemove",(se=>this.updateCursorStyle(se)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),ae.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(C.CoreBrowserService,this.textarea,F.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(G.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(w.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(D.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.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(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),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(W.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const F=this,N=this.element;function se(me){const De=F._mouseService.getMouseReportCoords(me,F.screenElement);if(!De)return!1;let Oe,Pe;switch(me.overrideType||me.type){case"mousemove":Pe=32,me.buttons===void 0?(Oe=3,me.button!==void 0&&(Oe=me.button<3?me.button:3)):Oe=1&me.buttons?0:4&me.buttons?1:2&me.buttons?2:3;break;case"mouseup":Pe=0,Oe=me.button<3?me.button:3;break;case"mousedown":Pe=1,Oe=me.button<3?me.button:3;break;case"wheel":if(F._customWheelEventHandler&&F._customWheelEventHandler(me)===!1||F.viewport.getLinesScrolled(me)===0)return!1;Pe=me.deltaY<0?0:1,Oe=4;break;default:return!1}return!(Pe===void 0||Oe===void 0||Oe>4)&&F.coreMouseService.triggerMouseEvent({col:De.col,row:De.row,x:De.x,y:De.y,button:Oe,action:Pe,ctrl:me.ctrlKey,alt:me.altKey,shift:me.shiftKey})}const fe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:me=>(se(me),me.buttons||(this._document.removeEventListener("mouseup",fe.mouseup),fe.mousedrag&&this._document.removeEventListener("mousemove",fe.mousedrag)),this.cancel(me)),wheel:me=>(se(me),this.cancel(me,!0)),mousedrag:me=>{me.buttons&&se(me)},mousemove:me=>{me.buttons||se(me)}};this.register(this.coreMouseService.onProtocolChange((me=>{me?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(me)),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&me?fe.mousemove||(N.addEventListener("mousemove",_e.mousemove),fe.mousemove=_e.mousemove):(N.removeEventListener("mousemove",fe.mousemove),fe.mousemove=null),16&me?fe.wheel||(N.addEventListener("wheel",_e.wheel,{passive:!1}),fe.wheel=_e.wheel):(N.removeEventListener("wheel",fe.wheel),fe.wheel=null),2&me?fe.mouseup||(fe.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",fe.mouseup),fe.mouseup=null),4&me?fe.mousedrag||(fe.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",fe.mousedrag),fe.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(N,"mousedown",(me=>{if(me.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(me))return se(me),fe.mouseup&&this._document.addEventListener("mouseup",fe.mouseup),fe.mousedrag&&this._document.addEventListener("mousemove",fe.mousedrag),this.cancel(me)}))),this.register((0,p.addDisposableDomListener)(N,"wheel",(me=>{if(!fe.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(me)===!1)return!1;if(!this.buffer.hasScrollback){const De=this.viewport.getLinesScrolled(me);if(De===0)return;const Oe=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(me.deltaY<0?"A":"B");let Pe="";for(let nt=0;nt<Math.abs(De);nt++)Pe+=Oe;return this.coreService.triggerDataEvent(Pe,!0),this.cancel(me,!0)}return this.viewport.handleWheel(me)?this.cancel(me):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(N,"touchstart",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(me),this.cancel(me)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(N,"touchmove",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(me)?void 0:this.cancel(me)}),{passive:!1}))}refresh(F,N){this._renderService?.refreshRows(F,N)}updateCursorStyle(F){this._selectionService?.shouldColumnSelect(F)?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(F,N,se=0){se===1?(super.scrollLines(F,N,se),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(F)}paste(F){(0,d.paste)(F,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(F){this._customKeyEventHandler=F}attachCustomWheelEventHandler(F){this._customWheelEventHandler=F}registerLinkProvider(F){return this._linkProviderService.registerLinkProvider(F)}registerCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const N=this._characterJoinerService.register(F);return this.refresh(0,this.rows-1),N}deregisterCharacterJoiner(F){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(F)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(F){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+F)}registerDecoration(F){return this._decorationService.registerDecoration(F)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(F,N,se){this._selectionService.setSelection(F,N,se)}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(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(F,N){this._selectionService?.selectLines(F,N)}_keyDown(F){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&F.altKey;if(!N&&!this._compositionHelper.keydown(F))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||F.key!=="Dead"&&F.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const se=(0,ie.evaluateKeyboardEvent)(F,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(F),se.type===3||se.type===2){const fe=this.rows-1;return this.scrollLines(se.type===2?-fe:fe),this.cancel(F,!0)}return se.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,F)||(se.cancel&&this.cancel(F,!0),!se.key||!!(F.key&&!F.ctrlKey&&!F.altKey&&!F.metaKey&&F.key.length===1&&F.key.charCodeAt(0)>=65&&F.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(se.key!==J.C0.ETX&&se.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:se.key,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(se.key,!0),!this.optionsService.rawOptions.screenReaderMode||F.altKey||F.ctrlKey?this.cancel(F,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(F,N){const se=F.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||F.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||F.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?se:se&&(!N.keyCode||N.keyCode>47)}_keyUp(F){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1||((function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18})(F)||this.focus(),this.updateCursorStyle(F),this._keyPressHandled=!1)}_keyPress(F){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(F)===!1)return!1;if(this.cancel(F),F.charCode)N=F.charCode;else if(F.which===null||F.which===void 0)N=F.keyCode;else{if(F.which===0||F.charCode===0)return!1;N=F.which}return!(!N||(F.altKey||F.ctrlKey||F.metaKey)&&!this._isThirdLevelShift(this.browser,F)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:F}),this._showCursor(),this.coreService.triggerDataEvent(N,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(F){if(F.data&&F.inputType==="insertText"&&(!F.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const N=F.data;return this.coreService.triggerDataEvent(N,!0),this.cancel(F),!0}return!1}resize(F,N){F!==this.cols||N!==this.rows?super.resize(F,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(F,N){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){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 F=1;F<this.rows;F++)this.buffer.lines.push(this.buffer.getBlankLine(P.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const F=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=F,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(F){if(this._renderService)switch(F){case L.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),se=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${se};${N}t`);break;case L.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const fe=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${_e};${fe}t`)}}cancel(F,N){if(this.options.cancelEvents||N)return F.preventDefault(),F.stopPropagation(),!1}}u.Terminal=oe},9924:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(h,d=1e3){this._renderCallback=h,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,d,p){this._rowCount=p,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=f-this._lastRefreshMs,y=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d)}}},1680:function(H,u,h){var d=this&&this.__decorate||function(c,a,l,_){var C,w=arguments.length,A=w<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(c,a,l,_);else for(var m=c.length-1;m>=0;m--)(C=c[m])&&(A=(w<3?C(A):w>3?C(a,l,A):C(a,l))||A);return w>3&&A&&Object.defineProperty(a,l,A),A},p=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const f=h(3656),g=h(4725),y=h(8460),D=h(844),v=h(2585);let o=u.Viewport=class extends D.Disposable{constructor(c,a,l,_,C,w,A,m){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=l,this._optionsService=_,this._charSizeService=C,this._renderService=w,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.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(c){if(c)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 a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){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 a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<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(c,a){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&l<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==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+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){let l,_="";const C=[],w=a??this._bufferService.buffer.lines.length,A=this._bufferService.buffer.lines;for(let m=c;m<w;m++){const R=A.get(m);if(!R)continue;const G=A.get(m+1)?.isWrapped;if(_+=R.translateToString(!G),!G||m===A.length-1){const q=document.createElement("div");q.textContent=_,C.push(q),_.length>0&&(l=q),_=""}}return{bufferElements:C,cursorElement:l}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&a.altKey||l==="ctrl"&&a.ctrlKey||l==="shift"&&a.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};u.Viewport=o=d([p(2,v.IBufferService),p(3,v.IOptionsService),p(4,g.ICharSizeService),p(5,g.IRenderService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],o)},3107:function(H,u,h){var d=this&&this.__decorate||function(v,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,o,c,a);else for(var w=v.length-1;w>=0;w--)(l=v[w])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},p=this&&this.__param||function(v,o){return function(c,a){o(c,a,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const f=h(4725),g=h(844),y=h(2585);let D=u.BufferDecorationRenderer=class extends g.Disposable{constructor(v,o,c,a,l){super(),this._screenElement=v,this._bufferService=o,this._coreBrowserService=c,this._decorationService=a,this._renderService=l,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((_=>this._removeDecoration(_)))),this.register((0,g.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 v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",v?.options?.layer==="top"),o.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(v.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",o.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=v.options.x??0;return c&&c>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(v,o),o}_refreshStyle(v){const o=v.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let c=this._decorationElements.get(v);c||(c=this._createElement(v),v.element=c,this._decorationElements.set(v,c),this._container.appendChild(c),v.onDispose((()=>{this._decorationElements.delete(v),c.remove()}))),c.style.top=o*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(c)}}_refreshXPosition(v,o=v.element){if(!o)return;const c=v.options.x??0;(v.options.anchor||"left")==="right"?o.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(v){this._decorationElements.get(v)?.remove(),this._decorationElements.delete(v),v.dispose()}};u.BufferDecorationRenderer=D=d([p(1,y.IBufferService),p(2,f.ICoreBrowserService),p(3,y.IDecorationService),p(4,f.IRenderService)],D)},5871:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(h){if(h.options.overviewRulerOptions){for(const d of this._zones)if(d.color===h.options.overviewRulerOptions.color&&d.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,h.marker.line))return;if(this._lineAdjacentToZone(d,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(d,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,d){return d>=h.startBufferLine&&d<=h.endBufferLine}_lineAdjacentToZone(h,d,p){return d>=h.startBufferLine-this._linePadding[p||"full"]&&d<=h.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(h,d){h.startBufferLine=Math.min(h.startBufferLine,d),h.endBufferLine=Math.max(h.endBufferLine,d)}}},5744:function(H,u,h){var d=this&&this.__decorate||function(l,_,C,w){var A,m=arguments.length,R=m<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(l,_,C,w);else for(var G=l.length-1;G>=0;G--)(A=l[G])&&(R=(m<3?A(R):m>3?A(_,C,R):A(_,C))||R);return m>3&&R&&Object.defineProperty(_,C,R),R},p=this&&this.__param||function(l,_){return function(C,w){_(C,w,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const f=h(5871),g=h(4725),y=h(844),D=h(2585),v={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let a=u.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,C,w,A,m,R){super(),this._viewportElement=l,this._screenElement=_,this._bufferService=C,this._decorationService=w,this._renderService=A,this._optionsService=m,this._coreBrowserService=R,this._colorZoneStore=new f.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(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const G=this._canvas.getContext("2d");if(!G)throw new Error("Ctx cannot be null");this._ctx=G,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{this._canvas?.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 l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=l,o.center=_,o.right=l,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=o.left,c.right=o.left+o.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);v.left=_,v.center=_,v.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.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 _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(c[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-v[l.position||"full"]/2),o[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=a=d([p(2,D.IBufferService),p(3,D.IDecorationService),p(4,g.IRenderService),p(5,D.IOptionsService),p(6,g.ICoreBrowserService)],a)},2950:function(H,u,h){var d=this&&this.__decorate||function(v,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,o,c,a);else for(var w=v.length-1;w>=0;w--)(l=v[w])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},p=this&&this.__param||function(v,o){return function(c,a){o(c,a,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const f=h(4725),g=h(2585),y=h(2584);let D=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,o,c,a,l,_){this._textarea=v,this._compositionView=o,this._bufferService=c,this._optionsService=a,this._coreService=l,this._renderService=_,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(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const v=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,c=o.replace(v,"");this._dataAlreadySent=c,o.length>v.length?this._coreService.triggerDataEvent(c,!0):o.length<v.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):o.length===v.length&&o!==v&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(v){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}v||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=D=d([p(2,g.IBufferService),p(3,g.IOptionsService),p(4,g.ICoreService),p(5,f.IRenderService)],D)},9806:(H,u)=>{function h(d,p,f){const g=f.getBoundingClientRect(),y=d.getComputedStyle(f),D=parseInt(y.getPropertyValue("padding-left")),v=parseInt(y.getPropertyValue("padding-top"));return[p.clientX-g.left-D,p.clientY-g.top-v]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=h,u.getCoords=function(d,p,f,g,y,D,v,o,c){if(!D)return;const a=h(d,p,f);return a?(a[0]=Math.ceil((a[0]+(c?v/2:0))/v),a[1]=Math.ceil(a[1]/o),a[0]=Math.min(Math.max(a[0],1),g+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),y),a):void 0}},9504:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=h(2584);function p(o,c,a,l){const _=o-f(o,a),C=c-f(c,a),w=Math.abs(_-C)-(function(A,m,R){let G=0;const q=A-f(A,R),Y=m-f(m,R);for(let j=0;j<Math.abs(q-Y);j++){const Q=g(A,m)==="A"?-1:1;R.buffer.lines.get(q+Q*j)?.isWrapped&&G++}return G})(o,c,a);return v(w,D(g(o,c),l))}function f(o,c){let a=0,l=c.buffer.lines.get(o),_=l?.isWrapped;for(;_&&o>=0&&o<c.rows;)a++,l=c.buffer.lines.get(--o),_=l?.isWrapped;return a}function g(o,c){return o>c?"A":"B"}function y(o,c,a,l,_,C){let w=o,A=c,m="";for(;w!==a||A!==l;)w+=_?1:-1,_&&w>C.cols-1?(m+=C.buffer.translateBufferLineToString(A,!1,o,w),w=0,o=0,A++):!_&&w<0&&(m+=C.buffer.translateBufferLineToString(A,!1,0,o+1),w=C.cols-1,o=w,A--);return m+C.buffer.translateBufferLineToString(A,!1,o,w)}function D(o,c){const a=c?"O":"[";return d.C0.ESC+a+o}function v(o,c){o=Math.floor(o);let a="";for(let l=0;l<o;l++)a+=c;return a}u.moveToCellSequence=function(o,c,a,l){const _=a.buffer.x,C=a.buffer.y;if(!a.buffer.hasScrollback)return(function(m,R,G,q,Y,j){return p(R,q,Y,j).length===0?"":v(y(m,R,m,R-f(R,Y),!1,Y).length,D("D",j))})(_,C,0,c,a,l)+p(C,c,a,l)+(function(m,R,G,q,Y,j){let Q;Q=p(R,q,Y,j).length>0?q-f(q,Y):R;const ae=q,P=(function(J,ie,E,T,x,L){let W;return W=p(E,T,x,L).length>0?T-f(T,x):ie,J<E&&W<=T||J>=E&&W<T?"C":"D"})(m,R,G,q,Y,j);return v(y(m,Q,G,ae,P==="C",Y).length,D(P,j))})(_,C,o,c,a,l);let w;if(C===c)return w=_>o?"D":"C",v(Math.abs(_-o),D(w,l));w=C>c?"D":"C";const A=Math.abs(C-c);return v((function(m,R){return R.cols-m})(C>c?o:_,a)+(A-1)*a.cols+1+((C>c?_:o)-1),D(w,l))}},1296:function(H,u,h){var d=this&&this.__decorate||function(j,Q,ae,P){var J,ie=arguments.length,E=ie<3?Q:P===null?P=Object.getOwnPropertyDescriptor(Q,ae):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(j,Q,ae,P);else for(var T=j.length-1;T>=0;T--)(J=j[T])&&(E=(ie<3?J(E):ie>3?J(Q,ae,E):J(Q,ae))||E);return ie>3&&E&&Object.defineProperty(Q,ae,E),E},p=this&&this.__param||function(j,Q){return function(ae,P){Q(ae,P,j)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const f=h(3787),g=h(2550),y=h(2223),D=h(6171),v=h(6052),o=h(4725),c=h(8055),a=h(8460),l=h(844),_=h(2585),C="xterm-dom-renderer-owner-",w="xterm-rows",A="xterm-fg-",m="xterm-bg-",R="xterm-focus",G="xterm-selection";let q=1,Y=u.DomRenderer=class extends l.Disposable{constructor(j,Q,ae,P,J,ie,E,T,x,L,W,Z,oe){super(),this._terminal=j,this._document=Q,this._element=ae,this._screenElement=P,this._viewportElement=J,this._helperContainer=ie,this._linkifier2=E,this._charSizeService=x,this._optionsService=L,this._bufferService=W,this._coreBrowserService=Z,this._themeService=oe,this._terminalClass=q++,this._rowElements=[],this._selectionRenderModel=(0,v.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(w),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(G),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,D.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=T.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.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 j=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*j,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*j),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/j),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/j),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 ae of this._rowElements)ae.style.width=`${this.dimensions.css.canvas.width}px`,ae.style.height=`${this.dimensions.css.cell.height}px`,ae.style.lineHeight=`${this.dimensions.css.cell.height}px`,ae.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Q=`${this._terminalSelector} .${w} 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(j){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Q=`${this._terminalSelector} .${w} { color: ${j.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Q+=`${this._terminalSelector} .${w} .xterm-dim { color: ${c.color.multiplyOpacity(j.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 ae=`blink_underline_${this._terminalClass}`,P=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;Q+=`@keyframes ${ae} { 50% { border-bottom-style: hidden; }}`,Q+=`@keyframes ${P} { 50% { box-shadow: none; }}`,Q+=`@keyframes ${J} { 0% { background-color: ${j.cursor.css}; color: ${j.cursorAccent.css}; } 50% { background-color: inherit; color: ${j.cursor.css}; }}`,Q+=`${this._terminalSelector} .${w}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ae} 1s step-end infinite;}${this._terminalSelector} .${w}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${P} 1s step-end infinite;}${this._terminalSelector} .${w}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block { background-color: ${j.cursor.css}; color: ${j.cursorAccent.css};}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${j.cursor.css} !important; color: ${j.cursorAccent.css} !important;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${j.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${j.cursor.css} inset;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${j.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Q+=`${this._terminalSelector} .${G} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${G} div { position: absolute; background-color: ${j.selectionBackgroundOpaque.css};}${this._terminalSelector} .${G} div { position: absolute; background-color: ${j.selectionInactiveBackgroundOpaque.css};}`;for(const[ie,E]of j.ansi.entries())Q+=`${this._terminalSelector} .${A}${ie} { color: ${E.css}; }${this._terminalSelector} .${A}${ie}.xterm-dim { color: ${c.color.multiplyOpacity(E,.5).css}; }${this._terminalSelector} .${m}${ie} { background-color: ${E.css}; }`;Q+=`${this._terminalSelector} .${A}${y.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(j.background).css}; }${this._terminalSelector} .${A}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(j.background),.5).css}; }${this._terminalSelector} .${m}${y.INVERTED_DEFAULT_COLOR} { background-color: ${j.foreground.css}; }`,this._themeStyleElement.textContent=Q}_setDefaultSpacing(){const j=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${j}px`,this._rowFactory.defaultSpacing=j}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(j,Q){for(let ae=this._rowElements.length;ae<=Q;ae++){const P=this._document.createElement("div");this._rowContainer.appendChild(P),this._rowElements.push(P)}for(;this._rowElements.length>Q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(j,Q){this._refreshRowElements(j,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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(j,Q,ae){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(j,Q,ae),this.renderRows(0,this._bufferService.rows-1),!j||!Q)return;this._selectionRenderModel.update(this._terminal,j,Q,ae);const P=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ie=this._selectionRenderModel.viewportCappedStartRow,E=this._selectionRenderModel.viewportCappedEndRow;if(ie>=this._bufferService.rows||E<0)return;const T=this._document.createDocumentFragment();if(ae){const x=j[0]>Q[0];T.appendChild(this._createSelectionElement(ie,x?Q[0]:j[0],x?j[0]:Q[0],E-ie+1))}else{const x=P===ie?j[0]:0,L=ie===J?Q[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(ie,x,L));const W=E-ie-1;if(T.appendChild(this._createSelectionElement(ie+1,0,this._bufferService.cols,W)),ie!==E){const Z=J===E?Q[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(E,0,Z))}}this._selectionContainer.appendChild(T)}_createSelectionElement(j,Q,ae,P=1){const J=this._document.createElement("div"),ie=Q*this.dimensions.css.cell.width;let E=this.dimensions.css.cell.width*(ae-Q);return ie+E>this.dimensions.css.canvas.width&&(E=this.dimensions.css.canvas.width-ie),J.style.height=P*this.dimensions.css.cell.height+"px",J.style.top=j*this.dimensions.css.cell.height+"px",J.style.left=`${ie}px`,J.style.width=`${E}px`,J}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 j of this._rowElements)j.replaceChildren()}renderRows(j,Q){const ae=this._bufferService.buffer,P=ae.ybase+ae.y,J=Math.min(ae.x,this._bufferService.cols-1),ie=this._optionsService.rawOptions.cursorBlink,E=this._optionsService.rawOptions.cursorStyle,T=this._optionsService.rawOptions.cursorInactiveStyle;for(let x=j;x<=Q;x++){const L=x+ae.ydisp,W=this._rowElements[x],Z=ae.lines.get(L);if(!W||!Z)break;W.replaceChildren(...this._rowFactory.createRow(Z,L,L===P,E,T,J,ie,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(j){this._setCellUnderline(j.x1,j.x2,j.y1,j.y2,j.cols,!0)}_handleLinkLeave(j){this._setCellUnderline(j.x1,j.x2,j.y1,j.y2,j.cols,!1)}_setCellUnderline(j,Q,ae,P,J,ie){ae<0&&(j=0),P<0&&(Q=0);const E=this._bufferService.rows-1;ae=Math.max(Math.min(ae,E),0),P=Math.max(Math.min(P,E),0),J=Math.min(J,this._bufferService.cols);const T=this._bufferService.buffer,x=T.ybase+T.y,L=Math.min(T.x,J-1),W=this._optionsService.rawOptions.cursorBlink,Z=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=ae;he<=P;++he){const F=he+T.ydisp,N=this._rowElements[he],se=T.lines.get(F);if(!N||!se)break;N.replaceChildren(...this._rowFactory.createRow(se,F,F===x,Z,oe,L,W,this.dimensions.css.cell.width,this._widthCache,ie?he===ae?j:0:-1,ie?(he===P?Q:J)-1:-1))}}};u.DomRenderer=Y=d([p(7,_.IInstantiationService),p(8,o.ICharSizeService),p(9,_.IOptionsService),p(10,_.IBufferService),p(11,o.ICoreBrowserService),p(12,o.IThemeService)],Y)},3787:function(H,u,h){var d=this&&this.__decorate||function(w,A,m,R){var G,q=arguments.length,Y=q<3?A:R===null?R=Object.getOwnPropertyDescriptor(A,m):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(w,A,m,R);else for(var j=w.length-1;j>=0;j--)(G=w[j])&&(Y=(q<3?G(Y):q>3?G(A,m,Y):G(A,m))||Y);return q>3&&Y&&Object.defineProperty(A,m,Y),Y},p=this&&this.__param||function(w,A){return function(m,R){A(m,R,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const f=h(2223),g=h(643),y=h(511),D=h(2585),v=h(8055),o=h(4725),c=h(4269),a=h(6171),l=h(3734);let _=u.DomRendererRowFactory=class{constructor(w,A,m,R,G,q,Y){this._document=w,this._characterJoinerService=A,this._optionsService=m,this._coreBrowserService=R,this._coreService=G,this._decorationService=q,this._themeService=Y,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(w,A,m){this._selectionStart=w,this._selectionEnd=A,this._columnSelectMode=m}createRow(w,A,m,R,G,q,Y,j,Q,ae,P){const J=[],ie=this._characterJoinerService.getJoinedCharacters(A),E=this._themeService.colors;let T,x=w.getNoBgTrimmedLength();m&&x<q+1&&(x=q+1);let L=0,W="",Z=0,oe=0,he=0,F=!1,N=0,se=!1,fe=0;const _e=[],me=ae!==-1&&P!==-1;for(let De=0;De<x;De++){w.loadCell(De,this._workCell);let Oe=this._workCell.getWidth();if(Oe===0)continue;let Pe=!1,nt=De,Ee=this._workCell;if(ie.length>0&&De===ie[0][0]){Pe=!0;const Ye=ie.shift();Ee=new c.JoinedCellData(this._workCell,w.translateToString(!0,Ye[0],Ye[1]),Ye[1]-Ye[0]),nt=Ye[1]-1,Oe=Ee.getWidth()}const Et=this._isCellInSelection(De,A),_i=m&&De===q,mi=me&&De>=ae&&De<=P;let ni=!1;this._decorationService.forEachDecorationAtCell(De,A,void 0,(Ye=>{ni=!0}));let Ui=Ee.getChars()||g.WHITESPACE_CELL_CHAR;if(Ui===" "&&(Ee.isUnderline()||Ee.isOverline())&&(Ui=" "),fe=Oe*j-Q.get(Ui,Ee.isBold(),Ee.isItalic()),T){if(L&&(Et&&se||!Et&&!se&&Ee.bg===Z)&&(Et&&se&&E.selectionForeground||Ee.fg===oe)&&Ee.extended.ext===he&&mi===F&&fe===N&&!_i&&!Pe&&!ni){Ee.isInvisible()?W+=g.WHITESPACE_CELL_CHAR:W+=Ui,L++;continue}L&&(T.textContent=W),T=this._document.createElement("span"),L=0,W=""}else T=this._document.createElement("span");if(Z=Ee.bg,oe=Ee.fg,he=Ee.extended.ext,F=mi,N=fe,se=Et,Pe&&q>=De&&q<=nt&&(q=De),!this._coreService.isCursorHidden&&_i&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)Y&&_e.push("xterm-cursor-blink"),_e.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(G)switch(G){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(Ee.isBold()&&_e.push("xterm-bold"),Ee.isItalic()&&_e.push("xterm-italic"),Ee.isDim()&&_e.push("xterm-dim"),W=Ee.isInvisible()?g.WHITESPACE_CELL_CHAR:Ee.getChars()||g.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(_e.push(`xterm-underline-${Ee.extended.underlineStyle}`),W===" "&&(W=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())T.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Ye=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Ye<8&&(Ye+=8),T.style.textDecorationColor=E.ansi[Ye].css}Ee.isOverline()&&(_e.push("xterm-overline"),W===" "&&(W=" ")),Ee.isStrikethrough()&&_e.push("xterm-strikethrough"),mi&&(T.style.textDecoration="underline");let mt=Ee.getFgColor(),Ge=Ee.getFgColorMode(),Ct=Ee.getBgColor(),ti=Ee.getBgColorMode();const ai=!!Ee.isInverse();if(ai){const Ye=mt;mt=Ct,Ct=Ye;const li=Ge;Ge=ti,ti=li}let At,qi,Rt,vi=!1;switch(this._decorationService.forEachDecorationAtCell(De,A,void 0,(Ye=>{Ye.options.layer!=="top"&&vi||(Ye.backgroundColorRGB&&(ti=50331648,Ct=Ye.backgroundColorRGB.rgba>>8&16777215,At=Ye.backgroundColorRGB),Ye.foregroundColorRGB&&(Ge=50331648,mt=Ye.foregroundColorRGB.rgba>>8&16777215,qi=Ye.foregroundColorRGB),vi=Ye.options.layer==="top")})),!vi&&Et&&(At=this._coreBrowserService.isFocused?E.selectionBackgroundOpaque:E.selectionInactiveBackgroundOpaque,Ct=At.rgba>>8&16777215,ti=50331648,vi=!0,E.selectionForeground&&(Ge=50331648,mt=E.selectionForeground.rgba>>8&16777215,qi=E.selectionForeground)),vi&&_e.push("xterm-decoration-top"),ti){case 16777216:case 33554432:Rt=E.ansi[Ct],_e.push(`xterm-bg-${Ct}`);break;case 50331648:Rt=v.channels.toColor(Ct>>16,Ct>>8&255,255&Ct),this._addStyle(T,`background-color:#${C((Ct>>>0).toString(16),"0",6)}`);break;default:ai?(Rt=E.foreground,_e.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):Rt=E.background}switch(At||Ee.isDim()&&(At=v.color.multiplyOpacity(Rt,.5)),Ge){case 16777216:case 33554432:Ee.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(T,Rt,E.ansi[mt],Ee,At,void 0)||_e.push(`xterm-fg-${mt}`);break;case 50331648:const Ye=v.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(T,Rt,Ye,Ee,At,qi)||this._addStyle(T,`color:#${C(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(T,Rt,E.foreground,Ee,At,qi)||ai&&_e.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}_e.length&&(T.className=_e.join(" "),_e.length=0),_i||Pe||ni?T.textContent=W:L++,fe!==this.defaultSpacing&&(T.style.letterSpacing=`${fe}px`),J.push(T),De=nt}return T&&L&&(T.textContent=W),J}_applyMinimumContrast(w,A,m,R,G,q){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const Y=this._getContrastCache(R);let j;if(G||q||(j=Y.getColor(A.rgba,m.rgba)),j===void 0){const Q=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);j=v.color.ensureContrastRatio(G||A,q||m,Q),Y.setColor((G||A).rgba,(q||m).rgba,j??null)}return!!j&&(this._addStyle(w,`color:${j.css}`),!0)}_getContrastCache(w){return w.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(w,A){w.setAttribute("style",`${w.getAttribute("style")||""}${A};`)}_isCellInSelection(w,A){const m=this._selectionStart,R=this._selectionEnd;return!(!m||!R)&&(this._columnSelectMode?m[0]<=R[0]?w>=m[0]&&A>=m[1]&&w<R[0]&&A<=R[1]:w<m[0]&&A>=m[1]&&w>=R[0]&&A<=R[1]:A>m[1]&&A<R[1]||m[1]===R[1]&&A===m[1]&&w>=m[0]&&w<R[0]||m[1]<R[1]&&A===R[1]&&w<R[0]||m[1]<R[1]&&A===m[1]&&w>=m[0])}};function C(w,A,m){for(;w.length<m;)w=A+w;return w}u.DomRendererRowFactory=_=d([p(1,o.ICharacterJoinerService),p(2,D.IOptionsService),p(3,o.ICoreBrowserService),p(4,D.ICoreService),p(5,D.IDecorationService),p(6,o.IThemeService)],_)},2550:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(h,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=h.createElement("span");p.classList.add("xterm-char-measure-element");const f=h.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const g=h.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const y=h.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[p,f,g,y],this._container.appendChild(p),this._container.appendChild(f),this._container.appendChild(g),this._container.appendChild(y),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(h,d,p,f){h===this._font&&d===this._fontSize&&p===this._weight&&f===this._weightBold||(this._font=h,this._fontSize=d,this._weight=p,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(h,d,p){let f=0;if(!d&&!p&&h.length===1&&(f=h.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const D=this._measure(h,0);return D>0&&(this._flat[f]=D),D}let g=h;d&&(g+="B"),p&&(g+="I");let y=this._holey.get(g);if(y===void 0){let D=0;d&&(D|=1),p&&(D|=2),y=this._measure(h,D),y>0&&this._holey.set(g,y)}return y}_measure(h,d){const p=this._measureElements[d];return p.textContent=h.repeat(32),p.offsetWidth/32}}},2223:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=h(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(H,u)=>{function h(p){return 57508<=p&&p<=57558}function d(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(u,"__esModule",{value:!0}),u.computeNextVariantOffset=u.createRenderDimensions=u.treatGlyphAsBackgroundColor=u.allowRescaling=u.isEmoji=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},u.isPowerlineGlyph=h,u.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},u.isEmoji=d,u.allowRescaling=function(p,f,g,y){return f===1&&g>Math.ceil(1.5*y)&&p!==void 0&&p>255&&!d(p)&&!h(p)&&!(function(D){return 57344<=D&&D<=63743})(p)},u.treatGlyphAsBackgroundColor=function(p){return h(p)||(function(f){return 9472<=f&&f<=9631})(p)},u.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}}}},u.computeNextVariantOffset=function(p,f,g=0){return(p-(2*Math.round(f)-g))%(2*Math.round(f))}},6052:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,f,g,y=!1){if(this.selectionStart=f,this.selectionEnd=g,!f||!g||f[0]===g[0]&&f[1]===g[1])return void this.clear();const D=p.buffers.active.ydisp,v=f[1]-D,o=g[1]-D,c=Math.max(v,0),a=Math.min(o,p.rows-1);c>=p.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=v,this.viewportEndRow=o,this.viewportCappedStartRow=c,this.viewportCappedEndRow=a,this.startCol=f[0],this.endCol=g[0])}isCellSelected(p,f,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&g>=this.viewportCappedStartRow&&f<this.endCol&&g<=this.viewportCappedEndRow:f<this.startCol&&g>=this.viewportCappedStartRow&&f>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol)}}u.createSelectionRenderModel=function(){return new h}},456:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,d=this.selectionEnd;return!(!h||!d)&&(h[1]>d[1]||h[1]===d[1]&&h[0]>d[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(H,u,h){var d=this&&this.__decorate||function(a,l,_,C){var w,A=arguments.length,m=A<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,C);else for(var R=a.length-1;R>=0;R--)(w=a[R])&&(m=(A<3?w(m):A>3?w(l,_,m):w(l,_))||m);return A>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const f=h(2585),g=h(8460),y=h(844);let D=u.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new o(a,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};u.CharSizeService=D=d([p(2,f.IOptionsService)],D);class v extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class o extends v{constructor(l,_,C){super(),this._document=l,this._parentElement=_,this._optionsService=C,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 c extends v{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(H,u,h){var d=this&&this.__decorate||function(c,a,l,_){var C,w=arguments.length,A=w<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(c,a,l,_);else for(var m=c.length-1;m>=0;m--)(C=c[m])&&(A=(w<3?C(A):w>3?C(a,l,A):C(a,l))||A);return w>3&&A&&Object.defineProperty(a,l,A),A},p=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const f=h(3734),g=h(643),y=h(511),D=h(2585);class v extends f.AttributeData{constructor(a,l,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=v;let o=u.CharacterJoinerService=class D_{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(a){const l={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(l),l.id}deregister(a){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===a)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(a);if(!l||l.length===0)return[];const _=[],C=l.translateToString(!0);let w=0,A=0,m=0,R=l.getFg(0),G=l.getBg(0);for(let q=0;q<l.getTrimmedLength();q++)if(l.loadCell(q,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==G){if(q-w>1){const Y=this._getJoinedRanges(C,m,A,l,w);for(let j=0;j<Y.length;j++)_.push(Y[j])}w=q,m=A,R=this._workCell.fg,G=this._workCell.bg}A+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-w>1){const q=this._getJoinedRanges(C,m,A,l,w);for(let Y=0;Y<q.length;Y++)_.push(q[Y])}return _}_getJoinedRanges(a,l,_,C,w){const A=a.substring(l,_);let m=[];try{m=this._characterJoiners[0].handler(A)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const G=this._characterJoiners[R].handler(A);for(let q=0;q<G.length;q++)D_._mergeRanges(m,G[q])}catch(G){console.error(G)}return this._stringRangesToCellRanges(m,C,w),m}_stringRangesToCellRanges(a,l,_){let C=0,w=!1,A=0,m=a[C];if(m){for(let R=_;R<this._bufferService.cols;R++){const G=l.getWidth(R),q=l.getString(R).length||g.WHITESPACE_CELL_CHAR.length;if(G!==0){if(!w&&m[0]<=A&&(m[0]=R,w=!0),m[1]<=A){if(m[1]=R,m=a[++C],!m)break;m[0]<=A?(m[0]=R,w=!0):w=!1}A+=q}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(a,l){let _=!1;for(let C=0;C<a.length;C++){const w=a[C];if(_){if(l[1]<=w[0])return a[C-1][1]=l[1],a;if(l[1]<=w[1])return a[C-1][1]=Math.max(l[1],w[1]),a.splice(C,1),a;a.splice(C,1),C--}else{if(l[1]<=w[0])return a.splice(C,0,l),a;if(l[1]<=w[1])return w[0]=Math.min(l[0],w[0]),a;l[0]<w[1]&&(w[0]=Math.min(l[0],w[0]),_=!0)}}return _?a[a.length-1][1]=l[1]:a.push(l),a}};u.CharacterJoinerService=o=d([p(0,D.IBufferService)],o)},5114:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0;const d=h(844),p=h(8460),f=h(3656);class g extends d.Disposable{constructor(v,o,c){super(),this._textarea=v,this._window=o,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,p.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(v){this._window!==v&&(this._window=v,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}}u.CoreBrowserService=g;class y extends d.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.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:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkProviderService=void 0;const d=h(844);class p extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const y=this.linkProviders.indexOf(g);y!==-1&&this.linkProviders.splice(y,1)}}}}u.LinkProviderService=p},8934:function(H,u,h){var d=this&&this.__decorate||function(D,v,o,c){var a,l=arguments.length,_=l<3?v:c===null?c=Object.getOwnPropertyDescriptor(v,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(D,v,o,c);else for(var C=D.length-1;C>=0;C--)(a=D[C])&&(_=(l<3?a(_):l>3?a(v,o,_):a(v,o))||_);return l>3&&_&&Object.defineProperty(v,o,_),_},p=this&&this.__param||function(D,v){return function(o,c){v(o,c,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const f=h(4725),g=h(9806);let y=u.MouseService=class{constructor(D,v){this._renderService=D,this._charSizeService=v}getCoords(D,v,o,c,a){return(0,g.getCoords)(window,D,v,o,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(D,v){const o=(0,g.getCoordsRelativeToElement)(window,D,v);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};u.MouseService=y=d([p(0,f.IRenderService),p(1,f.ICharSizeService)],y)},3230:function(H,u,h){var d=this&&this.__decorate||function(a,l,_,C){var w,A=arguments.length,m=A<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,C);else for(var R=a.length-1;R>=0;R--)(w=a[R])&&(m=(A<3?w(m):A>3?w(l,_,m):w(l,_))||m);return A>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const f=h(6193),g=h(4725),y=h(8460),D=h(844),v=h(7226),o=h(2585);let c=u.RenderService=class extends D.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,l,_,C,w,A,m,R){super(),this._rowCount=a,this._charSizeService=C,this._renderer=this.register(new D.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new D.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((G,q)=>this._renderRows(G,q)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(w.onDecorationRegistered((()=>this._fullRefresh()))),this.register(w.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((G=>this._registerIntersectionObserver(G,l))))}_registerIntersectionObserver(a,l){if("IntersectionObserver"in a){const _=new a.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,D.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.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(a,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,l,this._rowCount))}_renderRows(a,l){this._renderer.value&&(a=Math.min(a,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(a,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:l}),this._onRender.fire({start:a,end:l}),this._isNextRenderRedrawOnly=!0)}resize(a,l){this._rowCount=l,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(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(a,l))):this._renderer.value.handleResize(a,l),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(a,l,_){this._selectionState.start=a,this._selectionState.end=l,this._selectionState.columnSelectMode=_,this._renderer.value?.handleSelectionChanged(a,l,_)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};u.RenderService=c=d([p(2,o.IOptionsService),p(3,g.ICharSizeService),p(4,o.IDecorationService),p(5,o.IBufferService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],c)},9312:function(H,u,h){var d=this&&this.__decorate||function(m,R,G,q){var Y,j=arguments.length,Q=j<3?R:q===null?q=Object.getOwnPropertyDescriptor(R,G):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(m,R,G,q);else for(var ae=m.length-1;ae>=0;ae--)(Y=m[ae])&&(Q=(j<3?Y(Q):j>3?Y(R,G,Q):Y(R,G))||Q);return j>3&&Q&&Object.defineProperty(R,G,Q),Q},p=this&&this.__param||function(m,R){return function(G,q){R(G,q,m)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const f=h(9806),g=h(9504),y=h(456),D=h(4725),v=h(8460),o=h(844),c=h(6114),a=h(4841),l=h(511),_=h(2585),C=" ",w=new RegExp(C,"g");let A=u.SelectionService=class extends o.Disposable{constructor(m,R,G,q,Y,j,Q,ae,P){super(),this._element=m,this._screenElement=R,this._linkifier=G,this._bufferService=q,this._coreService=Y,this._mouseService=j,this._optionsService=Q,this._renderService=ae,this._coreBrowserService=P,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.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 m=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!m||!R||m[0]===R[0]&&m[1]===R[1])}get selectionText(){const m=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!m||!R)return"";const G=this._bufferService.buffer,q=[];if(this._activeSelectionMode===3){if(m[0]===R[0])return"";const Y=m[0]<R[0]?m[0]:R[0],j=m[0]<R[0]?R[0]:m[0];for(let Q=m[1];Q<=R[1];Q++){const ae=G.translateBufferLineToString(Q,!0,Y,j);q.push(ae)}}else{const Y=m[1]===R[1]?R[0]:void 0;q.push(G.translateBufferLineToString(m[1],!0,m[0],Y));for(let j=m[1]+1;j<=R[1]-1;j++){const Q=G.lines.get(j),ae=G.translateBufferLineToString(j,!0);Q?.isWrapped?q[q.length-1]+=ae:q.push(ae)}if(m[1]!==R[1]){const j=G.lines.get(R[1]),Q=G.translateBufferLineToString(R[1],!0,0,R[0]);j&&j.isWrapped?q[q.length-1]+=Q:q.push(Q)}}return q.map((Y=>Y.replace(w," "))).join(c.isWindows?`\r
|
|
190
|
+
`:`
|
|
191
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&m&&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(m){const R=this._getMouseBufferCoords(m),G=this._model.finalSelectionStart,q=this._model.finalSelectionEnd;return!!(G&&q&&R)&&this._areCoordsInSelection(R,G,q)}isCellInSelection(m,R){const G=this._model.finalSelectionStart,q=this._model.finalSelectionEnd;return!(!G||!q)&&this._areCoordsInSelection([m,R],G,q)}_areCoordsInSelection(m,R,G){return m[1]>R[1]&&m[1]<G[1]||R[1]===G[1]&&m[1]===R[1]&&m[0]>=R[0]&&m[0]<G[0]||R[1]<G[1]&&m[1]===G[1]&&m[0]<G[0]||R[1]<G[1]&&m[1]===R[1]&&m[0]>=R[0]}_selectWordAtCursor(m,R){const G=this._linkifier.currentLink?.link?.range;if(G)return this._model.selectionStart=[G.start.x-1,G.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(G,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const q=this._getMouseBufferCoords(m);return!!q&&(this._selectWordAt(q,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,R){this._model.clearSelection(),m=Math.max(m,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const R=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(m){let R=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const G=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=G?0:(R>G&&(R-=G),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(m){return c.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),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(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const R=this._getMouseBufferCoords(m);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(m){return m.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const G=this._bufferService.buffer;if(this._model.selectionEnd[1]<G.lines.length){const q=G.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]++}R&&R[0]===this._model.selectionEnd[0]&&R[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const R=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const G=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(G&&G[0]!==void 0&&G[1]!==void 0){const q=(0,g.moveToCellSequence)(G[0]-1,G[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(q,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,G=!(!m||!R||m[0]===R[0]&&m[1]===R[1]);G?m&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,R,G)):this._oldHasSelection&&this._fireOnSelectionChange(m,R,G)}_fireOnSelectionChange(m,R,G){this._oldSelectionStart=m,this._oldSelectionEnd=R,this._oldHasSelection=G,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(m,R){let G=R;for(let q=0;R>=q;q++){const Y=m.loadCell(q,this._workCell).getChars().length;this._workCell.getWidth()===0?G--:Y>1&&R!==q&&(G+=Y-1)}return G}setSelection(m,R,G){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,R],this._model.selectionStartLength=G,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,R,G=!0,q=!0){if(m[0]>=this._bufferService.cols)return;const Y=this._bufferService.buffer,j=Y.lines.get(m[1]);if(!j)return;const Q=Y.translateBufferLineToString(m[1],!1);let ae=this._convertViewportColToCharacterIndex(j,m[0]),P=ae;const J=m[0]-ae;let ie=0,E=0,T=0,x=0;if(Q.charAt(ae)===" "){for(;ae>0&&Q.charAt(ae-1)===" ";)ae--;for(;P<Q.length&&Q.charAt(P+1)===" ";)P++}else{let Z=m[0],oe=m[0];j.getWidth(Z)===0&&(ie++,Z--),j.getWidth(oe)===2&&(E++,oe++);const he=j.getString(oe).length;for(he>1&&(x+=he-1,P+=he-1);Z>0&&ae>0&&!this._isCharWordSeparator(j.loadCell(Z-1,this._workCell));){j.loadCell(Z-1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===0?(ie++,Z--):F>1&&(T+=F-1,ae-=F-1),ae--,Z--}for(;oe<j.length&&P+1<Q.length&&!this._isCharWordSeparator(j.loadCell(oe+1,this._workCell));){j.loadCell(oe+1,this._workCell);const F=this._workCell.getChars().length;this._workCell.getWidth()===2?(E++,oe++):F>1&&(x+=F-1,P+=F-1),P++,oe++}}P++;let L=ae+J-ie+T,W=Math.min(this._bufferService.cols,P-ae+ie+E-T-x);if(R||Q.slice(ae,P).trim()!==""){if(G&&L===0&&j.getCodePoint(0)!==32){const Z=Y.lines.get(m[1]-1);if(Z&&j.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(oe){const he=this._bufferService.cols-oe.start;L-=he,W+=he}}}if(q&&L+W===this._bufferService.cols&&j.getCodePoint(this._bufferService.cols-1)!==32){const Z=Y.lines.get(m[1]+1);if(Z?.isWrapped&&Z.getCodePoint(0)!==32){const oe=this._getWordAt([0,m[1]+1],!1,!1,!0);oe&&(W+=oe.length)}}return{start:L,length:W}}}_selectWordAt(m,R){const G=this._getWordAt(m,R);if(G){for(;G.start<0;)G.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[G.start,m[1]],this._model.selectionStartLength=G.length}}_selectToWordAt(m){const R=this._getWordAt(m,!0);if(R){let G=m[1];for(;R.start<0;)R.start+=this._bufferService.cols,G--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,G++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,G]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const R=this._bufferService.buffer.getWrappedRangeForLine(m),G={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(G,this._bufferService.cols)}};u.SelectionService=A=d([p(3,_.IBufferService),p(4,_.ICoreService),p(5,D.IMouseService),p(6,_.IOptionsService),p(7,D.IRenderService),p(8,D.ICoreBrowserService)],A)},4725:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ILinkProviderService=u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=h(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService"),u.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(H,u,h){var d=this&&this.__decorate||function(A,m,R,G){var q,Y=arguments.length,j=Y<3?m:G===null?G=Object.getOwnPropertyDescriptor(m,R):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(A,m,R,G);else for(var Q=A.length-1;Q>=0;Q--)(q=A[Q])&&(j=(Y<3?q(j):Y>3?q(m,R,j):q(m,R))||j);return Y>3&&j&&Object.defineProperty(m,R,j),j},p=this&&this.__param||function(A,m){return function(R,G){m(R,G,A)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const f=h(7239),g=h(8055),y=h(8460),D=h(844),v=h(2585),o=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),a=g.css.toColor("#ffffff"),l=g.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let R=0;R<216;R++){const G=m[R/36%6|0],q=m[R/6%6|0],Y=m[R%6];A.push({css:g.channels.toCss(G,q,Y),rgba:g.channels.toRgba(G,q,Y)})}for(let R=0;R<24;R++){const G=8+10*R;A.push({css:g.channels.toCss(G,G,G),rgba:g.channels.toRgba(G,G,G)})}return A})());let C=u.ThemeService=class extends D.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:c,cursor:a,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:g.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:g.color.blend(c,_),ansi:u.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(A={}){const m=this._colors;if(m.foreground=w(A.foreground,o),m.background=w(A.background,c),m.cursor=w(A.cursor,a),m.cursorAccent=w(A.cursorAccent,l),m.selectionBackgroundTransparent=w(A.selectionBackground,_),m.selectionBackgroundOpaque=g.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=w(A.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=g.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=A.selectionForeground?w(A.selectionForeground,g.NULL_COLOR):void 0,m.selectionForeground===g.NULL_COLOR&&(m.selectionForeground=void 0),g.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=g.color.opacity(m.selectionBackgroundTransparent,.3)),g.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=g.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=u.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=w(A.black,u.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=w(A.red,u.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=w(A.green,u.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=w(A.yellow,u.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=w(A.blue,u.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=w(A.magenta,u.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=w(A.cyan,u.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=w(A.white,u.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=w(A.brightBlack,u.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=w(A.brightRed,u.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=w(A.brightGreen,u.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=w(A.brightYellow,u.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=w(A.brightBlue,u.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=w(A.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=w(A.brightCyan,u.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=w(A.brightWhite,u.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const R=Math.min(m.ansi.length-16,A.extendedAnsi.length);for(let G=0;G<R;G++)m.ansi[G+16]=w(A.extendedAnsi[G],u.DEFAULT_ANSI_COLORS[G+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(A){this._restoreColor(A),this._onChangeColors.fire(this.colors)}_restoreColor(A){if(A!==void 0)switch(A){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[A]=this._restoreColors.ansi[A]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(A){A(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 w(A,m){if(A!==void 0)try{return g.css.toColor(A)}catch{}return m}u.ThemeService=C=d([p(0,v.IOptionsService)],C)},6349:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=h(8460),p=h(844);class f extends p.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const D=new Array(y);for(let v=0;v<Math.min(y,this.length);v++)D[v]=this._array[this._getCyclicIndex(v)];this._array=D,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let D=this._length;D<y;D++)this._array[D]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,D){this._array[this._getCyclicIndex(y)]=D}push(y){this._array[this._getCyclicIndex(this._length)]=y,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(y,D,...v){if(D){for(let o=y;o<this._length-D;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+D)];this._length-=D,this.onDeleteEmitter.fire({index:y,amount:D})}for(let o=this._length-1;o>=y;o--)this._array[this._getCyclicIndex(o+v.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<v.length;o++)this._array[this._getCyclicIndex(y+o)]=v[o];if(v.length&&this.onInsertEmitter.fire({index:y,amount:v.length}),this._length+v.length>this._maxLength){const o=this._length+v.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=v.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,D,v){if(!(D<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let c=D-1;c>=0;c--)this.set(y+c+v,this.get(y+c));const o=y+D+v-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let o=0;o<D;o++)this.set(y+o+v,this.get(y+o))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}u.CircularList=f},1439:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function h(d,p=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const g in d)f[g]=p<=1?d[g]:d[g]&&h(d[g],p-1);return f}},8055:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;let h=0,d=0,p=0,f=0;var g,y,D,v,o;function c(l){const _=l.toString(16);return _.length<2?"0"+_:_}function a(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,C,w,A){return A!==void 0?`#${c(_)}${c(C)}${c(w)}${c(A)}`:`#${c(_)}${c(C)}${c(w)}`},l.toRgba=function(_,C,w,A=255){return(_<<24|C<<16|w<<8|A)>>>0},l.toColor=function(_,C,w,A){return{css:l.toCss(_,C,w,A),rgba:l.toRgba(_,C,w,A)}}})(g||(u.channels=g={})),(function(l){function _(C,w){return f=Math.round(255*w),[h,d,p]=o.toChannels(C.rgba),{css:g.toCss(h,d,p,f),rgba:g.toRgba(h,d,p,f)}}l.blend=function(C,w){if(f=(255&w.rgba)/255,f===1)return{css:w.css,rgba:w.rgba};const A=w.rgba>>24&255,m=w.rgba>>16&255,R=w.rgba>>8&255,G=C.rgba>>24&255,q=C.rgba>>16&255,Y=C.rgba>>8&255;return h=G+Math.round((A-G)*f),d=q+Math.round((m-q)*f),p=Y+Math.round((R-Y)*f),{css:g.toCss(h,d,p),rgba:g.toRgba(h,d,p)}},l.isOpaque=function(C){return(255&C.rgba)==255},l.ensureContrastRatio=function(C,w,A){const m=o.ensureContrastRatio(C.rgba,w.rgba,A);if(m)return g.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(C){const w=(255|C.rgba)>>>0;return[h,d,p]=o.toChannels(w),{css:g.toCss(h,d,p),rgba:w}},l.opacity=_,l.multiplyOpacity=function(C,w){return f=255&C.rgba,_(C,f*w/255)},l.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(u.color=y={})),(function(l){let _,C;try{const w=document.createElement("canvas");w.width=1,w.height=1;const A=w.getContext("2d",{willReadFrequently:!0});A&&(_=A,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(w){if(w.match(/#[\da-f]{3,8}/i))switch(w.length){case 4:return h=parseInt(w.slice(1,2).repeat(2),16),d=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),g.toColor(h,d,p);case 5:return h=parseInt(w.slice(1,2).repeat(2),16),d=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),f=parseInt(w.slice(4,5).repeat(2),16),g.toColor(h,d,p,f);case 7:return{css:w,rgba:(parseInt(w.slice(1),16)<<8|255)>>>0};case 9:return{css:w,rgba:parseInt(w.slice(1),16)>>>0}}const A=w.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return h=parseInt(A[1]),d=parseInt(A[2]),p=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),g.toColor(h,d,p,f);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=w,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[h,d,p,f]=_.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(h,d,p,f),css:w}}})(D||(u.css=D={})),(function(l){function _(C,w,A){const m=C/255,R=w/255,G=A/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(G<=.03928?G/12.92:Math.pow((G+.055)/1.055,2.4))}l.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},l.relativeLuminance2=_})(v||(u.rgb=v={})),(function(l){function _(w,A,m){const R=w>>24&255,G=w>>16&255,q=w>>8&255;let Y=A>>24&255,j=A>>16&255,Q=A>>8&255,ae=a(v.relativeLuminance2(Y,j,Q),v.relativeLuminance2(R,G,q));for(;ae<m&&(Y>0||j>0||Q>0);)Y-=Math.max(0,Math.ceil(.1*Y)),j-=Math.max(0,Math.ceil(.1*j)),Q-=Math.max(0,Math.ceil(.1*Q)),ae=a(v.relativeLuminance2(Y,j,Q),v.relativeLuminance2(R,G,q));return(Y<<24|j<<16|Q<<8|255)>>>0}function C(w,A,m){const R=w>>24&255,G=w>>16&255,q=w>>8&255;let Y=A>>24&255,j=A>>16&255,Q=A>>8&255,ae=a(v.relativeLuminance2(Y,j,Q),v.relativeLuminance2(R,G,q));for(;ae<m&&(Y<255||j<255||Q<255);)Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),j=Math.min(255,j+Math.ceil(.1*(255-j))),Q=Math.min(255,Q+Math.ceil(.1*(255-Q))),ae=a(v.relativeLuminance2(Y,j,Q),v.relativeLuminance2(R,G,q));return(Y<<24|j<<16|Q<<8|255)>>>0}l.blend=function(w,A){if(f=(255&A)/255,f===1)return A;const m=A>>24&255,R=A>>16&255,G=A>>8&255,q=w>>24&255,Y=w>>16&255,j=w>>8&255;return h=q+Math.round((m-q)*f),d=Y+Math.round((R-Y)*f),p=j+Math.round((G-j)*f),g.toRgba(h,d,p)},l.ensureContrastRatio=function(w,A,m){const R=v.relativeLuminance(w>>8),G=v.relativeLuminance(A>>8);if(a(R,G)<m){if(G<R){const j=_(w,A,m),Q=a(R,v.relativeLuminance(j>>8));if(Q<m){const ae=C(w,A,m);return Q>a(R,v.relativeLuminance(ae>>8))?j:ae}return j}const q=C(w,A,m),Y=a(R,v.relativeLuminance(q>>8));if(Y<m){const j=_(w,A,m);return Y>a(R,v.relativeLuminance(j>>8))?q:j}return q}},l.reduceLuminance=_,l.increaseLuminance=C,l.toChannels=function(w){return[w>>24&255,w>>16&255,w>>8&255,255&w]}})(o||(u.rgba=o={})),u.toPaddedHex=c,u.contrastRatio=a},8969:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=h(844),p=h(2585),f=h(4348),g=h(7866),y=h(744),D=h(7302),v=h(6975),o=h(8460),c=h(1753),a=h(1480),l=h(7994),_=h(9282),C=h(5435),w=h(5981),A=h(2660);let m=!1;class R extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((q=>{this._onScrollApi?.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 Y in q)this.optionsService.options[Y]=q[Y]}constructor(q){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new D.OptionsService(q)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,o.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,o.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,o.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,o.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((Y=>{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((Y=>{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 w.WriteBuffer(((Y,j)=>this._inputHandler.parse(Y,j)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(q,Y){this._writeBuffer.write(q,Y)}writeSync(q,Y){this._logService.logLevel<=p.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(q,Y)}input(q,Y=!0){this.coreService.triggerDataEvent(q,Y)}resize(q,Y){isNaN(q)||isNaN(Y)||(q=Math.max(q,y.MINIMUM_COLS),Y=Math.max(Y,y.MINIMUM_ROWS),this._bufferService.resize(q,Y))}scroll(q,Y=!1){this._bufferService.scroll(q,Y)}scrollLines(q,Y,j){this._bufferService.scrollLines(q,Y,j)}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 Y=q-this._bufferService.buffer.ydisp;Y!==0&&this.scrollLines(Y)}registerEscHandler(q,Y){return this._inputHandler.registerEscHandler(q,Y)}registerDcsHandler(q,Y){return this._inputHandler.registerDcsHandler(q,Y)}registerCsiHandler(q,Y){return this._inputHandler.registerCsiHandler(q,Y)}registerOscHandler(q,Y){return this._inputHandler.registerOscHandler(q,Y)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let q=!1;const Y=this.optionsService.rawOptions.windowsPty;Y&&Y.buildNumber!==void 0&&Y.buildNumber!==void 0?q=Y.backend==="conpty"&&Y.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(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),q.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const Y of q)Y.dispose()}))}}}u.CoreTerminal=R},8460:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.runAndSubscribe=u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const p=[];for(let f=0;f<this._listeners.length;f++)p.push(this._listeners[f]);for(let f=0;f<p.length;f++)p[f].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(h,d){return h((p=>d.fire(p)))},u.runAndSubscribe=function(h,d){return d(void 0),h((p=>d(p)))}},5435:function(H,u,h){var d=this&&this.__decorate||function(ie,E,T,x){var L,W=arguments.length,Z=W<3?E:x===null?x=Object.getOwnPropertyDescriptor(E,T):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(ie,E,T,x);else for(var oe=ie.length-1;oe>=0;oe--)(L=ie[oe])&&(Z=(W<3?L(Z):W>3?L(E,T,Z):L(E,T))||Z);return W>3&&Z&&Object.defineProperty(E,T,Z),Z},p=this&&this.__param||function(ie,E){return function(T,x){E(T,x,ie)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const f=h(2584),g=h(7116),y=h(2015),D=h(844),v=h(482),o=h(8437),c=h(8460),a=h(643),l=h(511),_=h(3734),C=h(2585),w=h(1480),A=h(6242),m=h(6351),R=h(5941),G={"(":0,")":1,"*":2,"+":3,"-":1,".":2},q=131072;function Y(ie,E){if(ie>24)return E.setWinLines||!1;switch(ie){case 1:return!!E.restoreWin;case 2:return!!E.minimizeWin;case 3:return!!E.setWinPosition;case 4:return!!E.setWinSizePixels;case 5:return!!E.raiseWin;case 6:return!!E.lowerWin;case 7:return!!E.refreshWin;case 8:return!!E.setWinSizeChars;case 9:return!!E.maximizeWin;case 10:return!!E.fullscreenWin;case 11:return!!E.getWinState;case 13:return!!E.getWinPosition;case 14:return!!E.getWinSizePixels;case 15:return!!E.getScreenSizePixels;case 16:return!!E.getCellSizePixels;case 18:return!!E.getWinSizeChars;case 19:return!!E.getScreenSizeChars;case 20:return!!E.getIconTitle;case 21:return!!E.getWinTitle;case 22:return!!E.pushTitle;case 23:return!!E.popTitle;case 24:return!!E.setWinLines}return!1}var j;(function(ie){ie[ie.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ie[ie.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(j||(u.WindowsOptionsReportType=j={}));let Q=0;class ae extends D.Disposable{getAttrData(){return this._curAttrData}constructor(E,T,x,L,W,Z,oe,he,F=new y.EscapeSequenceParser){super(),this._bufferService=E,this._charsetService=T,this._coreService=x,this._logService=L,this._optionsService=W,this._oscLinkService=Z,this._coreMouseService=oe,this._unicodeService=he,this._parser=F,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new P(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((N=>this._activeBuffer=N.activeBuffer))),this._parser.setCsiHandlerFallback(((N,se)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:se.toArray()})})),this._parser.setEscHandlerFallback((N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})})),this._parser.setExecuteHandlerFallback((N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})})),this._parser.setOscHandlerFallback(((N,se,fe)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:se,data:fe})})),this._parser.setDcsHandlerFallback(((N,se,fe)=>{se==="HOOK"&&(fe=fe.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:se,payload:fe})})),this._parser.setPrintHandler(((N,se,fe)=>this.print(N,se,fe))),this._parser.registerCsiHandler({final:"@"},(N=>this.insertChars(N))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(N=>this.scrollLeft(N))),this._parser.registerCsiHandler({final:"A"},(N=>this.cursorUp(N))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(N=>this.scrollRight(N))),this._parser.registerCsiHandler({final:"B"},(N=>this.cursorDown(N))),this._parser.registerCsiHandler({final:"C"},(N=>this.cursorForward(N))),this._parser.registerCsiHandler({final:"D"},(N=>this.cursorBackward(N))),this._parser.registerCsiHandler({final:"E"},(N=>this.cursorNextLine(N))),this._parser.registerCsiHandler({final:"F"},(N=>this.cursorPrecedingLine(N))),this._parser.registerCsiHandler({final:"G"},(N=>this.cursorCharAbsolute(N))),this._parser.registerCsiHandler({final:"H"},(N=>this.cursorPosition(N))),this._parser.registerCsiHandler({final:"I"},(N=>this.cursorForwardTab(N))),this._parser.registerCsiHandler({final:"J"},(N=>this.eraseInDisplay(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(N=>this.eraseInDisplay(N,!0))),this._parser.registerCsiHandler({final:"K"},(N=>this.eraseInLine(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(N=>this.eraseInLine(N,!0))),this._parser.registerCsiHandler({final:"L"},(N=>this.insertLines(N))),this._parser.registerCsiHandler({final:"M"},(N=>this.deleteLines(N))),this._parser.registerCsiHandler({final:"P"},(N=>this.deleteChars(N))),this._parser.registerCsiHandler({final:"S"},(N=>this.scrollUp(N))),this._parser.registerCsiHandler({final:"T"},(N=>this.scrollDown(N))),this._parser.registerCsiHandler({final:"X"},(N=>this.eraseChars(N))),this._parser.registerCsiHandler({final:"Z"},(N=>this.cursorBackwardTab(N))),this._parser.registerCsiHandler({final:"`"},(N=>this.charPosAbsolute(N))),this._parser.registerCsiHandler({final:"a"},(N=>this.hPositionRelative(N))),this._parser.registerCsiHandler({final:"b"},(N=>this.repeatPrecedingCharacter(N))),this._parser.registerCsiHandler({final:"c"},(N=>this.sendDeviceAttributesPrimary(N))),this._parser.registerCsiHandler({prefix:">",final:"c"},(N=>this.sendDeviceAttributesSecondary(N))),this._parser.registerCsiHandler({final:"d"},(N=>this.linePosAbsolute(N))),this._parser.registerCsiHandler({final:"e"},(N=>this.vPositionRelative(N))),this._parser.registerCsiHandler({final:"f"},(N=>this.hVPosition(N))),this._parser.registerCsiHandler({final:"g"},(N=>this.tabClear(N))),this._parser.registerCsiHandler({final:"h"},(N=>this.setMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(N=>this.setModePrivate(N))),this._parser.registerCsiHandler({final:"l"},(N=>this.resetMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(N=>this.resetModePrivate(N))),this._parser.registerCsiHandler({final:"m"},(N=>this.charAttributes(N))),this._parser.registerCsiHandler({final:"n"},(N=>this.deviceStatus(N))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(N=>this.deviceStatusPrivate(N))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(N=>this.softReset(N))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(N=>this.setCursorStyle(N))),this._parser.registerCsiHandler({final:"r"},(N=>this.setScrollRegion(N))),this._parser.registerCsiHandler({final:"s"},(N=>this.saveCursor(N))),this._parser.registerCsiHandler({final:"t"},(N=>this.windowOptions(N))),this._parser.registerCsiHandler({final:"u"},(N=>this.restoreCursor(N))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(N=>this.insertColumns(N))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(N=>this.deleteColumns(N))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(N=>this.selectProtected(N))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(N=>this.requestMode(N,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(N=>this.requestMode(N,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((N=>(this.setTitle(N),this.setIconName(N),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((N=>this.setIconName(N)))),this._parser.registerOscHandler(2,new A.OscHandler((N=>this.setTitle(N)))),this._parser.registerOscHandler(4,new A.OscHandler((N=>this.setOrReportIndexedColor(N)))),this._parser.registerOscHandler(8,new A.OscHandler((N=>this.setHyperlink(N)))),this._parser.registerOscHandler(10,new A.OscHandler((N=>this.setOrReportFgColor(N)))),this._parser.registerOscHandler(11,new A.OscHandler((N=>this.setOrReportBgColor(N)))),this._parser.registerOscHandler(12,new A.OscHandler((N=>this.setOrReportCursorColor(N)))),this._parser.registerOscHandler(104,new A.OscHandler((N=>this.restoreIndexedColor(N)))),this._parser.registerOscHandler(110,new A.OscHandler((N=>this.restoreFgColor(N)))),this._parser.registerOscHandler(111,new A.OscHandler((N=>this.restoreBgColor(N)))),this._parser.registerOscHandler(112,new A.OscHandler((N=>this.restoreCursorColor(N)))),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 N in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},(()=>this.selectCharset("("+N))),this._parser.registerEscHandler({intermediates:")",final:N},(()=>this.selectCharset(")"+N))),this._parser.registerEscHandler({intermediates:"*",final:N},(()=>this.selectCharset("*"+N))),this._parser.registerEscHandler({intermediates:"+",final:N},(()=>this.selectCharset("+"+N))),this._parser.registerEscHandler({intermediates:"-",final:N},(()=>this.selectCharset("-"+N))),this._parser.registerEscHandler({intermediates:".",final:N},(()=>this.selectCharset("."+N))),this._parser.registerEscHandler({intermediates:"/",final:N},(()=>this.selectCharset("/"+N)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((N=>(this._logService.error("Parsing error: ",N),N))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((N,se)=>this.requestStatusString(N,se))))}_preserveStack(E,T,x,L){this._parseStack.paused=!0,this._parseStack.cursorStartX=E,this._parseStack.cursorStartY=T,this._parseStack.decodedLength=x,this._parseStack.position=L}_logSlowResolvingAsync(E){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([E,new Promise(((T,x)=>setTimeout((()=>x("#SLOW_TIMEOUT")),5e3)))]).catch((T=>{if(T!=="#SLOW_TIMEOUT")throw T;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(E,T){let x,L=this._activeBuffer.x,W=this._activeBuffer.y,Z=0;const oe=this._parseStack.paused;if(oe){if(x=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,T))return this._logSlowResolvingAsync(x),x;L=this._parseStack.cursorStartX,W=this._parseStack.cursorStartY,this._parseStack.paused=!1,E.length>q&&(Z=this._parseStack.position+q)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof E=="string"?` "${E}"`:` "${Array.prototype.map.call(E,(N=>String.fromCharCode(N))).join("")}"`),typeof E=="string"?E.split("").map((N=>N.charCodeAt(0))):E),this._parseBuffer.length<E.length&&this._parseBuffer.length<q&&(this._parseBuffer=new Uint32Array(Math.min(E.length,q))),oe||this._dirtyRowTracker.clearRange(),E.length>q)for(let N=Z;N<E.length;N+=q){const se=N+q<E.length?N+q:E.length,fe=typeof E=="string"?this._stringDecoder.decode(E.substring(N,se),this._parseBuffer):this._utf8Decoder.decode(E.subarray(N,se),this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,fe))return this._preserveStack(L,W,fe,N),this._logSlowResolvingAsync(x),x}else if(!oe){const N=typeof E=="string"?this._stringDecoder.decode(E,this._parseBuffer):this._utf8Decoder.decode(E,this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,N))return this._preserveStack(L,W,N,0),this._logSlowResolvingAsync(x),x}this._activeBuffer.x===L&&this._activeBuffer.y===W||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),F=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);F<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(F,this._bufferService.rows-1),Math.min(he,this._bufferService.rows-1))}print(E,T,x){let L,W;const Z=this._charsetService.charset,oe=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,F=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,se=this._curAttrData;let fe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&x-T>0&&fe.getWidth(this._activeBuffer.x-1)===2&&fe.setCellFromCodepoint(this._activeBuffer.x-1,0,1,se);let _e=this._parser.precedingJoinState;for(let me=T;me<x;++me){if(L=E[me],L<127&&Z){const nt=Z[String.fromCharCode(L)];nt&&(L=nt.charCodeAt(0))}const De=this._unicodeService.charProperties(L,_e);W=w.UnicodeService.extractWidth(De);const Oe=w.UnicodeService.extractShouldJoin(De),Pe=Oe?w.UnicodeService.extractWidth(_e):0;if(_e=De,oe&&this._onA11yChar.fire((0,v.stringFromCodePoint)(L)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+W-Pe>he){if(F){const nt=fe;let Ee=this._activeBuffer.x-Pe;for(this._activeBuffer.x=Pe,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),fe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Pe>0&&fe instanceof o.BufferLine&&fe.copyCellsFrom(nt,Ee,0,Pe,!1);Ee<he;)nt.setCellFromCodepoint(Ee++,0,1,se)}else if(this._activeBuffer.x=he-1,W===2)continue}if(Oe&&this._activeBuffer.x){const nt=fe.getWidth(this._activeBuffer.x-1)?1:2;fe.addCodepointToCell(this._activeBuffer.x-nt,L,W);for(let Ee=W-Pe;--Ee>=0;)fe.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}else if(N&&(fe.insertCells(this._activeBuffer.x,W-Pe,this._activeBuffer.getNullCell(se)),fe.getWidth(he-1)===2&&fe.setCellFromCodepoint(he-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,se)),fe.setCellFromCodepoint(this._activeBuffer.x++,L,W,se),W>0)for(;--W;)fe.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}this._parser.precedingJoinState=_e,this._activeBuffer.x<he&&x-T>0&&fe.getWidth(this._activeBuffer.x)===0&&!fe.hasContent(this._activeBuffer.x)&&fe.setCellFromCodepoint(this._activeBuffer.x,0,1,se),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(E,T){return E.final!=="t"||E.prefix||E.intermediates?this._parser.registerCsiHandler(E,T):this._parser.registerCsiHandler(E,(x=>!Y(x.params[0],this._optionsService.rawOptions.windowOptions)||T(x)))}registerDcsHandler(E,T){return this._parser.registerDcsHandler(E,new m.DcsHandler(T))}registerEscHandler(E,T){return this._parser.registerEscHandler(E,T)}registerOscHandler(E,T){return this._parser.registerOscHandler(E,new A.OscHandler(T))}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(){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&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);E.hasWidth(this._activeBuffer.x)&&!E.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const E=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-E),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(E=this._bufferService.cols-1){this._activeBuffer.x=Math.min(E,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(E,T){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=E,this._activeBuffer.y=this._activeBuffer.scrollTop+T):(this._activeBuffer.x=E,this._activeBuffer.y=T),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(E,T){this._restrictCursor(),this._setCursor(this._activeBuffer.x+E,this._activeBuffer.y+T)}cursorUp(E){const T=this._activeBuffer.y-this._activeBuffer.scrollTop;return T>=0?this._moveCursor(0,-Math.min(T,E.params[0]||1)):this._moveCursor(0,-(E.params[0]||1)),!0}cursorDown(E){const T=this._activeBuffer.scrollBottom-this._activeBuffer.y;return T>=0?this._moveCursor(0,Math.min(T,E.params[0]||1)):this._moveCursor(0,E.params[0]||1),!0}cursorForward(E){return this._moveCursor(E.params[0]||1,0),!0}cursorBackward(E){return this._moveCursor(-(E.params[0]||1),0),!0}cursorNextLine(E){return this.cursorDown(E),this._activeBuffer.x=0,!0}cursorPrecedingLine(E){return this.cursorUp(E),this._activeBuffer.x=0,!0}cursorCharAbsolute(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(E){return this._setCursor(E.length>=2?(E.params[1]||1)-1:0,(E.params[0]||1)-1),!0}charPosAbsolute(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(E){return this._moveCursor(E.params[0]||1,0),!0}linePosAbsolute(E){return this._setCursor(this._activeBuffer.x,(E.params[0]||1)-1),!0}vPositionRelative(E){return this._moveCursor(0,E.params[0]||1),!0}hVPosition(E){return this.cursorPosition(E),!0}tabClear(E){const T=E.params[0];return T===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:T===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let T=E.params[0]||1;for(;T--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let T=E.params[0]||1;for(;T--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(E){const T=E.params[0];return T===1&&(this._curAttrData.bg|=536870912),T!==2&&T!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(E,T,x,L=!1,W=!1){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);Z.replaceCells(T,x,this._activeBuffer.getNullCell(this._eraseAttrData()),W),L&&(Z.isWrapped=!1)}_resetBufferLine(E,T=!1){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);x&&(x.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),T),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+E),x.isWrapped=!1)}eraseInDisplay(E,T=!1){let x;switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,T);x<this._bufferService.rows;x++)this._resetBufferLine(x,T);this._dirtyRowTracker.markDirty(x);break;case 1:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x,0,this._activeBuffer.x+1,!0,T),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(x+1).isWrapped=!1);x--;)this._resetBufferLine(x,T);this._dirtyRowTracker.markDirty(0);break;case 2:for(x=this._bufferService.rows,this._dirtyRowTracker.markDirty(x-1);x--;)this._resetBufferLine(x,T);this._dirtyRowTracker.markDirty(0);break;case 3:const L=this._activeBuffer.lines.length-this._bufferService.rows;L>0&&(this._activeBuffer.lines.trimStart(L),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-L,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-L,0),this._onScroll.fire(0))}return!0}eraseInLine(E,T=!1){switch(this._restrictCursor(this._bufferService.cols),E.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,T);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,T);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,T)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(E){this._restrictCursor();let T=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y,L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,W=this._bufferService.rows-1+this._activeBuffer.ybase-L+1;for(;T--;)this._activeBuffer.lines.splice(W-1,1),this._activeBuffer.lines.splice(x,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(E){this._restrictCursor();let T=E.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y;let L;for(L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,L=this._bufferService.rows-1+this._activeBuffer.ybase-L;T--;)this._activeBuffer.lines.splice(x,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(E){this._restrictCursor();const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return T&&(T.insertCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(E){this._restrictCursor();const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return T&&(T.deleteCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(E){let T=E.params[0]||1;for(;T--;)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(E){let T=E.params[0]||1;for(;T--;)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(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=E.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);L.deleteCells(0,T,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=E.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);L.insertCells(0,T,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=E.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);L.insertCells(this._activeBuffer.x,T,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=E.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);L.deleteCells(this._activeBuffer.x,T,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(E){this._restrictCursor();const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return T&&(T.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(E.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(E){const T=this._parser.precedingJoinState;if(!T)return!0;const x=E.params[0]||1,L=w.UnicodeService.extractWidth(T),W=this._activeBuffer.x-L,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(W),oe=new Uint32Array(Z.length*x);let he=0;for(let N=0;N<Z.length;){const se=Z.codePointAt(N)||0;oe[he++]=se,N+=se>65535?2:1}let F=he;for(let N=1;N<x;++N)oe.copyWithin(F,0,he),F+=he;return this.print(oe,0,F),!0}sendDeviceAttributesPrimary(E){return E.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(E){return E.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(E.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(E){return(this._optionsService.rawOptions.termName+"").indexOf(E)===0}setMode(E){for(let T=0;T<E.length;T++)switch(E.params[T]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(E){for(let T=0;T<E.length;T++)switch(E.params[T]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.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(E){for(let T=0;T<E.length;T++)switch(E.params[T]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(E){for(let T=0;T<E.length;T++)switch(E.params[T]){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(),E.params[T]===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(E,T){const x=this._coreService.decPrivateModes,{activeProtocol:L,activeEncoding:W}=this._coreMouseService,Z=this._coreService,{buffers:oe,cols:he}=this._bufferService,{active:F,alt:N}=oe,se=this._optionsService.rawOptions,fe=Oe=>Oe?1:2,_e=E.params[0];return me=_e,De=T?_e===2?4:_e===4?fe(Z.modes.insertMode):_e===12?3:_e===20?fe(se.convertEol):0:_e===1?fe(x.applicationCursorKeys):_e===3?se.windowOptions.setWinLines?he===80?2:he===132?1:0:0:_e===6?fe(x.origin):_e===7?fe(x.wraparound):_e===8?3:_e===9?fe(L==="X10"):_e===12?fe(se.cursorBlink):_e===25?fe(!Z.isCursorHidden):_e===45?fe(x.reverseWraparound):_e===66?fe(x.applicationKeypad):_e===67?4:_e===1e3?fe(L==="VT200"):_e===1002?fe(L==="DRAG"):_e===1003?fe(L==="ANY"):_e===1004?fe(x.sendFocus):_e===1005?4:_e===1006?fe(W==="SGR"):_e===1015?4:_e===1016?fe(W==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?fe(F===N):_e===2004?fe(x.bracketedPasteMode):0,Z.triggerDataEvent(`${f.C0.ESC}[${T?"":"?"}${me};${De}$y`),!0;var me,De}_updateAttrColor(E,T,x,L,W){return T===2?(E|=50331648,E&=-16777216,E|=_.AttributeData.fromColorRGB([x,L,W])):T===5&&(E&=-50331904,E|=33554432|255&x),E}_extractColor(E,T,x){const L=[0,0,-1,0,0,0];let W=0,Z=0;do{if(L[Z+W]=E.params[T+Z],E.hasSubParams(T+Z)){const oe=E.getSubParams(T+Z);let he=0;do L[1]===5&&(W=1),L[Z+he+1+W]=oe[he];while(++he<oe.length&&he+Z+1+W<L.length);break}if(L[1]===5&&Z+W>=2||L[1]===2&&Z+W>=5)break;L[1]&&(W=1)}while(++Z+T<E.length&&Z+W<L.length);for(let oe=2;oe<L.length;++oe)L[oe]===-1&&(L[oe]=0);switch(L[0]){case 38:x.fg=this._updateAttrColor(x.fg,L[1],L[3],L[4],L[5]);break;case 48:x.bg=this._updateAttrColor(x.bg,L[1],L[3],L[4],L[5]);break;case 58:x.extended=x.extended.clone(),x.extended.underlineColor=this._updateAttrColor(x.extended.underlineColor,L[1],L[3],L[4],L[5])}return Z}_processUnderline(E,T){T.extended=T.extended.clone(),(!~E||E>5)&&(E=1),T.extended.underlineStyle=E,T.fg|=268435456,E===0&&(T.fg&=-268435457),T.updateExtended()}_processSGR0(E){E.fg=o.DEFAULT_ATTR_DATA.fg,E.bg=o.DEFAULT_ATTR_DATA.bg,E.extended=E.extended.clone(),E.extended.underlineStyle=0,E.extended.underlineColor&=-67108864,E.updateExtended()}charAttributes(E){if(E.length===1&&E.params[0]===0)return this._processSGR0(this._curAttrData),!0;const T=E.length;let x;const L=this._curAttrData;for(let W=0;W<T;W++)x=E.params[W],x>=30&&x<=37?(L.fg&=-50331904,L.fg|=16777216|x-30):x>=40&&x<=47?(L.bg&=-50331904,L.bg|=16777216|x-40):x>=90&&x<=97?(L.fg&=-50331904,L.fg|=16777224|x-90):x>=100&&x<=107?(L.bg&=-50331904,L.bg|=16777224|x-100):x===0?this._processSGR0(L):x===1?L.fg|=134217728:x===3?L.bg|=67108864:x===4?(L.fg|=268435456,this._processUnderline(E.hasSubParams(W)?E.getSubParams(W)[0]:1,L)):x===5?L.fg|=536870912:x===7?L.fg|=67108864:x===8?L.fg|=1073741824:x===9?L.fg|=2147483648:x===2?L.bg|=134217728:x===21?this._processUnderline(2,L):x===22?(L.fg&=-134217729,L.bg&=-134217729):x===23?L.bg&=-67108865:x===24?(L.fg&=-268435457,this._processUnderline(0,L)):x===25?L.fg&=-536870913:x===27?L.fg&=-67108865:x===28?L.fg&=-1073741825:x===29?L.fg&=2147483647:x===39?(L.fg&=-67108864,L.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):x===49?(L.bg&=-67108864,L.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):x===38||x===48||x===58?W+=this._extractColor(E,W,L):x===53?L.bg|=1073741824:x===55?L.bg&=-1073741825:x===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):x===100?(L.fg&=-67108864,L.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",x);return!0}deviceStatus(E){switch(E.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const T=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${T};${x}R`)}return!0}deviceStatusPrivate(E){if(E.params[0]===6){const T=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${T};${x}R`)}return!0}softReset(E){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=o.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(E){const T=E.params[0]||1;switch(T){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 x=T%2==1;return this._optionsService.options.cursorBlink=x,!0}setScrollRegion(E){const T=E.params[0]||1;let x;return(E.length<2||(x=E.params[1])>this._bufferService.rows||x===0)&&(x=this._bufferService.rows),x>T&&(this._activeBuffer.scrollTop=T-1,this._activeBuffer.scrollBottom=x-1,this._setCursor(0,0)),!0}windowOptions(E){if(!Y(E.params[0],this._optionsService.rawOptions.windowOptions))return!0;const T=E.length>1?E.params[1]:0;switch(E.params[0]){case 14:T!==2&&this._onRequestWindowsOptionsReport.fire(j.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(j.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:T!==0&&T!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),T!==0&&T!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:T!==0&&T!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),T!==0&&T!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(E){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(E){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(E){return this._windowTitle=E,this._onTitleChange.fire(E),!0}setIconName(E){return this._iconName=E,!0}setOrReportIndexedColor(E){const T=[],x=E.split(";");for(;x.length>1;){const L=x.shift(),W=x.shift();if(/^\d+$/.exec(L)){const Z=parseInt(L);if(J(Z))if(W==="?")T.push({type:0,index:Z});else{const oe=(0,R.parseColor)(W);oe&&T.push({type:1,index:Z,color:oe})}}}return T.length&&this._onColor.fire(T),!0}setHyperlink(E){const T=E.split(";");return!(T.length<2)&&(T[1]?this._createHyperlink(T[0],T[1]):!T[0]&&this._finishHyperlink())}_createHyperlink(E,T){this._getCurrentLinkId()&&this._finishHyperlink();const x=E.split(":");let L;const W=x.findIndex((Z=>Z.startsWith("id=")));return W!==-1&&(L=x[W].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:L,uri:T}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(E,T){const x=E.split(";");for(let L=0;L<x.length&&!(T>=this._specialColors.length);++L,++T)if(x[L]==="?")this._onColor.fire([{type:0,index:this._specialColors[T]}]);else{const W=(0,R.parseColor)(x[L]);W&&this._onColor.fire([{type:1,index:this._specialColors[T],color:W}])}return!0}setOrReportFgColor(E){return this._setOrReportSpecialColor(E,0)}setOrReportBgColor(E){return this._setOrReportSpecialColor(E,1)}setOrReportCursorColor(E){return this._setOrReportSpecialColor(E,2)}restoreIndexedColor(E){if(!E)return this._onColor.fire([{type:2}]),!0;const T=[],x=E.split(";");for(let L=0;L<x.length;++L)if(/^\d+$/.exec(x[L])){const W=parseInt(x[L]);J(W)&&T.push({type:2,index:W})}return T.length&&this._onColor.fire(T),!0}restoreFgColor(E){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(E){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(E){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,g.DEFAULT_CHARSET),!0}selectCharset(E){return E.length!==2?(this.selectDefaultCharset(),!0):(E[0]==="/"||this._charsetService.setgCharset(G[E[0]],g.CHARSETS[E[1]]||g.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 E=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,E,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=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(E){return this._charsetService.setgLevel(E),!0}screenAlignmentPattern(){const E=new l.CellData;E.content=4194373,E.fg=this._curAttrData.fg,E.bg=this._curAttrData.bg,this._setCursor(0,0);for(let T=0;T<this._bufferService.rows;++T){const x=this._activeBuffer.ybase+this._activeBuffer.y+T,L=this._activeBuffer.lines.get(x);L&&(L.fill(E),L.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(E,T){const x=this._bufferService.buffer,L=this._optionsService.rawOptions;return(W=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${W}${f.C0.ESC}\\`),!0))(E==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:E==='"p'?'P1$r61;1"p':E==="r"?`P1$r${x.scrollTop+1};${x.scrollBottom+1}r`:E==="m"?"P1$r0m":E===" q"?`P1$r${{block:2,underline:4,bar:6}[L.cursorStyle]-(L.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(E,T){this._dirtyRowTracker.markRangeDirty(E,T)}}u.InputHandler=ae;let P=class{constructor(ie){this._bufferService=ie,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ie){ie<this.start?this.start=ie:ie>this.end&&(this.end=ie)}markRangeDirty(ie,E){ie>E&&(Q=ie,ie=E,E=Q),ie<this.start&&(this.start=ie),E>this.end&&(this.end=E)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ie){return 0<=ie&&ie<256}P=d([p(0,C.IBufferService)],P)},844:(H,u)=>{function h(d){for(const p of d)p.dispose();d.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){this._isDisposed||d===this._value||(this._value?.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=h,u.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},1505:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(p,f,g){this._data[p]||(this._data[p]={}),this._data[p][f]=g}get(p,f){return this._data[p]?this._data[p][f]:void 0}clear(){this._data={}}}u.TwoKeyMap=h,u.FourKeyMap=class{constructor(){this._data=new h}set(d,p,f,g,y){this._data.get(d,p)||this._data.set(d,p,new h),this._data.get(d,p).set(f,g,y)}get(d,p,f,g){return this._data.get(d,p)?.get(f,g)}clear(){this._data.clear()}}},6114:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof process<"u"&&"title"in process;const h=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=h.includes("Firefox"),u.isLegacyEdge=h.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(h),u.getSafariVersion=function(){if(!u.isSafari)return 0;const p=h.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(h)},6106:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let h=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(h=this._search(this._getKey(d)),this._array.splice(h,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const p=this._getKey(d);if(p===void 0||(h=this._search(p),h===-1)||this._getKey(this._array[h])!==p)return!1;do if(this._array[h]===d)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===p);return!1}*getKeyIterator(d){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===d)}forEachByKey(d,p){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do p(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===d)}values(){return[...this._array].values()}_search(d){let p=0,f=this._array.length-1;for(;f>=p;){let g=p+f>>1;const y=this._getKey(this._array[g]);if(y>d)f=g-1;else{if(!(y<d)){for(;g>0&&this._getKey(this._array[g-1])===d;)g--;return g}p=g+1}}return p}}},7226:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=h(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let D=0,v=0,o=y.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(D=Date.now(),this._tasks[this._i]()||this._i++,D=Math.max(1,Date.now()-D),v=Math.max(D,v),c=y.timeRemaining(),1.5*v>c)return o-D<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-D))}ms`),void this._start();o=c}this.clear()}}class f extends p{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const D=Date.now()+y;return{timeRemaining:()=>Math.max(0,D-Date.now())}}}u.PriorityTaskQueue=f,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=h(643);u.updateWindowsModeWrappedState=function(p){const f=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),g=f?.get(p.cols-1),y=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);y&&g&&(y.isWrapped=g[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&g[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new h;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}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}}u.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=h(6349),p=h(7226),f=h(3734),g=h(8437),y=h(4634),D=h(511),v=h(643),o=h(4863),c=h(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,l,_){this._hasScrollback=a,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=D.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=D.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,l){return new g.BufferLine(this._bufferService.cols,this.getNullCell(a),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const l=a+this._optionsService.rawOptions.scrollback;return l>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:l}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=g.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,l){const _=this.getNullCell(g.DEFAULT_ATTR_DATA);let C=0;const w=this._getCorrectBufferLength(l);if(w>this.lines.maxLength&&(this.lines.maxLength=w),this.lines.length>0){if(this._cols<a)for(let m=0;m<this.lines.length;m++)C+=+this.lines.get(m).resize(a,_);let A=0;if(this._rows<l)for(let m=this._rows;m<l;m++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(a,_)));else for(let m=this._rows;m>l;m--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(w<this.lines.maxLength){const m=this.lines.length-w;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=w}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,l-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(a,l),this._cols>a))for(let A=0;A<this.lines.length;A++)C+=+this.lines.get(A).resize(a,_);this._cols=a,this._rows=l,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,l){this._cols!==a&&(a>this._cols?this._reflowLarger(a,l):this._reflowSmaller(a,l))}_reflowLarger(a,l){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(a,l,C.countRemoved)}}_reflowLargerAdjustViewport(a,l,_){const C=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=_;for(;w-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new g.BufferLine(a,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,l){const _=this.getNullCell(g.DEFAULT_ATTR_DATA),C=[];let w=0;for(let A=this.lines.length-1;A>=0;A--){let m=this.lines.get(A);if(!m||!m.isWrapped&&m.getTrimmedLength()<=a)continue;const R=[m];for(;m.isWrapped&&A>0;)m=this.lines.get(--A),R.unshift(m);const G=this.ybase+this.y;if(G>=A&&G<A+R.length)continue;const q=R[R.length-1].getTrimmedLength(),Y=(0,y.reflowSmallerGetNewLineLengths)(R,this._cols,a),j=Y.length-R.length;let Q;Q=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+j):Math.max(0,this.lines.length-this.lines.maxLength+j);const ae=[];for(let x=0;x<j;x++){const L=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);ae.push(L)}ae.length>0&&(C.push({start:A+R.length+w,newLines:ae}),w+=ae.length),R.push(...ae);let P=Y.length-1,J=Y[P];J===0&&(P--,J=Y[P]);let ie=R.length-j-1,E=q;for(;ie>=0;){const x=Math.min(E,J);if(R[P]===void 0)break;if(R[P].copyCellsFrom(R[ie],E-x,J-x,x,!0),J-=x,J===0&&(P--,J=Y[P]),E-=x,E===0){ie--;const L=Math.max(ie,0);E=(0,y.getWrappedLineTrimmedLength)(R,L,this._cols)}}for(let x=0;x<R.length;x++)Y[x]<a&&R[x].setCell(Y[x],_);let T=j-Q;for(;T-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+w)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+j,this.ybase+l-1)}if(C.length>0){const A=[],m=[];for(let P=0;P<this.lines.length;P++)m.push(this.lines.get(P));const R=this.lines.length;let G=R-1,q=0,Y=C[q];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+w);let j=0;for(let P=Math.min(this.lines.maxLength-1,R+w-1);P>=0;P--)if(Y&&Y.start>G+j){for(let J=Y.newLines.length-1;J>=0;J--)this.lines.set(P--,Y.newLines[J]);P++,A.push({index:G+1,amount:Y.newLines.length}),j+=Y.newLines.length,Y=C[++q]}else this.lines.set(P,m[G--]);let Q=0;for(let P=A.length-1;P>=0;P--)A[P].index+=Q,this.lines.onInsertEmitter.fire(A[P]),Q+=A[P].amount;const ae=Math.max(0,R+w-this.lines.maxLength);ae>0&&this.lines.onTrimEmitter.fire(ae)}}translateBufferLineToString(a,l,_=0,C){const w=this.lines.get(a);return w?w.translateToString(l,_,C):""}getWrappedRangeForLine(a){let l=a,_=a;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===a&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const l=new o.Marker(a);return this.markers.push(l),l.register(this.lines.onTrim((_=>{l.line-=_,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((_=>{l.line>=_.index&&(l.line+=_.amount)}))),l.register(this.lines.onDelete((_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=h(3734),p=h(511),f=h(643),g=h(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class D{constructor(o,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const l=c||p.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let _=0;_<o;++_)this.setCell(_,l);this.length=o}get(o){const c=this._data[3*o+0],a=2097151&c;return[this._data[3*o+1],2097152&c?this._combined[o]:a?(0,g.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):a]}set(o,c){this._data[3*o+1]=c[f.CHAR_DATA_ATTR_INDEX],c[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=c[1],this._data[3*o+0]=2097152|o|c[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=c[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(o){return this._data[3*o+0]>>22}hasWidth(o){return 12582912&this._data[3*o+0]}getFg(o){return this._data[3*o+1]}getBg(o){return this._data[3*o+2]}hasContent(o){return 4194303&this._data[3*o+0]}getCodePoint(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&c}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o]:2097151&c?(0,g.stringFromCodePoint)(2097151&c):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,c){return y=3*o,c.content=this._data[y+0],c.fg=this._data[y+1],c.bg=this._data[y+2],2097152&c.content&&(c.combinedData=this._combined[o]),268435456&c.bg&&(c.extended=this._extendedAttrs[o]),c}setCell(o,c){2097152&c.content&&(this._combined[o]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[o]=c.extended),this._data[3*o+0]=c.content,this._data[3*o+1]=c.fg,this._data[3*o+2]=c.bg}setCellFromCodepoint(o,c,a,l){268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=c|a<<22,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}addCodepointToCell(o,c,a){let l=this._data[3*o+0];2097152&l?this._combined[o]+=(0,g.stringFromCodePoint)(c):2097151&l?(this._combined[o]=(0,g.stringFromCodePoint)(2097151&l)+(0,g.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,a&&(l&=-12582913,l|=a<<22),this._data[3*o+0]=l}insertCells(o,c,a){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length-o){const l=new p.CellData;for(let _=this.length-o-c-1;_>=0;--_)this.setCell(o+c+_,this.loadCell(o+_,l));for(let _=0;_<c;++_)this.setCell(o+_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(o,c,a){if(o%=this.length,c<this.length-o){const l=new p.CellData;for(let _=0;_<this.length-o-c;++_)this.setCell(o+_,this.loadCell(o+c+_,l));for(let _=this.length-c;_<this.length;++_)this.setCell(_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,a)}replaceCells(o,c,a,l=!1){if(l)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.isProtected(o)||this.setCell(o,a),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.setCell(o++,a)}resize(o,c){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const l=new Uint32Array(a);l.set(this._data),this._data=l}for(let l=this.length;l<o;++l)this.setCell(l,c)}else{this._data=this._data.subarray(0,a);const l=Object.keys(this._combined);for(let C=0;C<l.length;C++){const w=parseInt(l[C],10);w>=o&&delete this._combined[w]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const w=parseInt(_[C],10);w>=o&&delete this._extendedAttrs[w]}}return this.length=o,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const o=new Uint32Array(this._data.length);return o.set(this._data),this._data=o,1}return 0}fill(o,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,o);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,o)}}copyFrom(o){this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={};for(const c in o._combined)this._combined[c]=o._combined[c];this._extendedAttrs={};for(const c in o._extendedAttrs)this._extendedAttrs[c]=o._extendedAttrs[c];this.isWrapped=o.isWrapped}clone(){const o=new D(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const c in this._combined)o._combined[c]=this._combined[c];for(const c in this._extendedAttrs)o._extendedAttrs[c]=this._extendedAttrs[c];return o.isWrapped=this.isWrapped,o}getTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0}getNoBgTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0]||50331648&this._data[3*o+2])return o+(this._data[3*o+0]>>22);return 0}copyCellsFrom(o,c,a,l,_){const C=o._data;if(_)for(let A=l-1;A>=0;A--){for(let m=0;m<3;m++)this._data[3*(a+A)+m]=C[3*(c+A)+m];268435456&C[3*(c+A)+2]&&(this._extendedAttrs[a+A]=o._extendedAttrs[c+A])}else for(let A=0;A<l;A++){for(let m=0;m<3;m++)this._data[3*(a+A)+m]=C[3*(c+A)+m];268435456&C[3*(c+A)+2]&&(this._extendedAttrs[a+A]=o._extendedAttrs[c+A])}const w=Object.keys(o._combined);for(let A=0;A<w.length;A++){const m=parseInt(w[A],10);m>=c&&(this._combined[m-c+a]=o._combined[m])}}translateToString(o,c,a,l){c=c??0,a=a??this.length,o&&(a=Math.min(a,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;c<a;){const C=this._data[3*c+0],w=2097151&C,A=2097152&C?this._combined[c]:w?(0,g.stringFromCodePoint)(w):f.WHITESPACE_CELL_CHAR;if(_+=A,l)for(let m=0;m<A.length;++m)l.push(c);c+=C>>22||1}return l&&l.push(c),_}}u.BufferLine=D},4841:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(h,d){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return d*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(H,u)=>{function h(d,p,f){if(p===d.length-1)return d[p].getTrimmedLength();const g=!d[p].hasContent(f-1)&&d[p].getWidth(f-1)===1,y=d[p+1].getWidth(0)===2;return g&&y?f-1:f}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,p,f,g,y){const D=[];for(let v=0;v<d.length-1;v++){let o=v,c=d.get(++o);if(!c.isWrapped)continue;const a=[d.get(v)];for(;o<d.length&&c.isWrapped;)a.push(c),c=d.get(++o);if(g>=v&&g<o){v+=a.length-1;continue}let l=0,_=h(a,l,p),C=1,w=0;for(;C<a.length;){const m=h(a,C,p),R=m-w,G=f-_,q=Math.min(R,G);a[l].copyCellsFrom(a[C],w,_,q,!1),_+=q,_===f&&(l++,_=0),w+=q,w===m&&(C++,w=0),_===0&&l!==0&&a[l-1].getWidth(f-1)===2&&(a[l].copyCellsFrom(a[l-1],f-1,_++,1,!1),a[l-1].setCell(f-1,y))}a[l].replaceCells(_,f,y);let A=0;for(let m=a.length-1;m>0&&(m>l||a[m].getTrimmedLength()===0);m--)A++;A>0&&(D.push(v+a.length-A),D.push(A)),v+=a.length-1}return D},u.reflowLargerCreateNewLayout=function(d,p){const f=[];let g=0,y=p[g],D=0;for(let v=0;v<d.length;v++)if(y===v){const o=p[++g];d.onDeleteEmitter.fire({index:v-D,amount:o}),v+=o-1,D+=o,y=p[++g]}else f.push(v);return{layout:f,countRemoved:D}},u.reflowLargerApplyNewLayout=function(d,p){const f=[];for(let g=0;g<p.length;g++)f.push(d.get(p[g]));for(let g=0;g<f.length;g++)d.set(g,f[g]);d.length=p.length},u.reflowSmallerGetNewLineLengths=function(d,p,f){const g=[],y=d.map(((c,a)=>h(d,a,p))).reduce(((c,a)=>c+a));let D=0,v=0,o=0;for(;o<y;){if(y-o<f){g.push(y-o);break}D+=f;const c=h(d,v,p);D>c&&(D-=c,v++);const a=d[v].getWidth(D-1)===2;a&&D--;const l=a?f-1:f;g.push(l),o+=l}return g},u.getWrappedLineTrimmedLength=h},5295:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=h(8460),p=h(844),f=h(9092);class g extends p.Disposable{constructor(D,v){super(),this._optionsService=D,this._bufferService=v,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.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(D){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(D),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(D,v){this._normal.resize(D,v),this._alt.resize(D,v),this.setupTabStops(D)}setupTabStops(D){this._normal.setupTabStops(D),this._alt.setupTabStops(D)}}u.BufferSet=g},511:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=h(482),p=h(643),f=h(3734);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(D){const v=new g;return v.setFromCharData(D),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(D){this.fg=D[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(D[p.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(D[p.CHAR_DATA_CHAR_INDEX].length===2){const o=D[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const c=D[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(o-55296)+c-56320+65536|D[p.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=D[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|D[p.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=D[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|D[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=g},643:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=h(8460),p=h(844);class f{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}u.Marker=f,f._nextId=1},7116:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.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:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(H,u)=>{var h,d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
|
192
|
+
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(h||(u.C0=h={})),(function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""})(d||(u.C1=d={})),(function(f){f.ST=`${h.ESC}\\`})(p||(u.C1_ESCAPED=p={}))},7399:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=h(2584),p={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:["'",'"']};u.evaluateKeyboardEvent=function(f,g,y,D){const v={type:0,cancel:!1,key:void 0},o=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?v.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?v.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?v.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(v.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:v.key=f.ctrlKey?"\b":d.C0.DEL,f.altKey&&(v.key=d.C0.ESC+v.key);break;case 9:if(f.shiftKey){v.key=d.C0.ESC+"[Z";break}v.key=d.C0.HT,v.cancel=!0;break;case 13:v.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,v.cancel=!0;break;case 27:v.key=d.C0.ESC,f.altKey&&(v.key=d.C0.ESC+d.C0.ESC),v.cancel=!0;break;case 37:if(f.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"D",v.key===d.C0.ESC+"[1;3D"&&(v.key=d.C0.ESC+(y?"b":"[1;5D"))):v.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"C",v.key===d.C0.ESC+"[1;3C"&&(v.key=d.C0.ESC+(y?"f":"[1;5C"))):v.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"A",y||v.key!==d.C0.ESC+"[1;3A"||(v.key=d.C0.ESC+"[1;5A")):v.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;o?(v.key=d.C0.ESC+"[1;"+(o+1)+"B",y||v.key!==d.C0.ESC+"[1;3B"||(v.key=d.C0.ESC+"[1;5B")):v.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(v.key=d.C0.ESC+"[2~");break;case 46:v.key=o?d.C0.ESC+"[3;"+(o+1)+"~":d.C0.ESC+"[3~";break;case 36:v.key=o?d.C0.ESC+"[1;"+(o+1)+"H":g?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:v.key=o?d.C0.ESC+"[1;"+(o+1)+"F":g?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?v.type=2:f.ctrlKey?v.key=d.C0.ESC+"[5;"+(o+1)+"~":v.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?v.type=3:f.ctrlKey?v.key=d.C0.ESC+"[6;"+(o+1)+"~":v.key=d.C0.ESC+"[6~";break;case 112:v.key=o?d.C0.ESC+"[1;"+(o+1)+"P":d.C0.ESC+"OP";break;case 113:v.key=o?d.C0.ESC+"[1;"+(o+1)+"Q":d.C0.ESC+"OQ";break;case 114:v.key=o?d.C0.ESC+"[1;"+(o+1)+"R":d.C0.ESC+"OR";break;case 115:v.key=o?d.C0.ESC+"[1;"+(o+1)+"S":d.C0.ESC+"OS";break;case 116:v.key=o?d.C0.ESC+"[15;"+(o+1)+"~":d.C0.ESC+"[15~";break;case 117:v.key=o?d.C0.ESC+"[17;"+(o+1)+"~":d.C0.ESC+"[17~";break;case 118:v.key=o?d.C0.ESC+"[18;"+(o+1)+"~":d.C0.ESC+"[18~";break;case 119:v.key=o?d.C0.ESC+"[19;"+(o+1)+"~":d.C0.ESC+"[19~";break;case 120:v.key=o?d.C0.ESC+"[20;"+(o+1)+"~":d.C0.ESC+"[20~";break;case 121:v.key=o?d.C0.ESC+"[21;"+(o+1)+"~":d.C0.ESC+"[21~";break;case 122:v.key=o?d.C0.ESC+"[23;"+(o+1)+"~":d.C0.ESC+"[23~";break;case 123:v.key=o?d.C0.ESC+"[24;"+(o+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(y&&!D||!f.altKey||f.metaKey)!y||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?v.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(v.key=d.C0.US),f.key==="@"&&(v.key=d.C0.NUL)):f.keyCode===65&&(v.type=1);else{const c=p[f.keyCode],a=c?.[f.shiftKey?1:0];if(a)v.key=d.C0.ESC+a;else if(f.keyCode>=65&&f.keyCode<=90){const l=f.ctrlKey?f.keyCode-64:f.keyCode+32;let _=String.fromCharCode(l);f.shiftKey&&(_=_.toUpperCase()),v.key=d.C0.ESC+_}else if(f.keyCode===32)v.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let l=f.code.slice(3,4);f.shiftKey||(l=l.toLowerCase()),v.key=d.C0.ESC+l,v.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?v.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?v.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?v.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?v.key=d.C0.DEL:f.keyCode===219?v.key=d.C0.ESC:f.keyCode===220?v.key=d.C0.FS:f.keyCode===221&&(v.key=d.C0.GS)}return v}},482:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},u.utf32ToString=function(h,d=0,p=h.length){let f="";for(let g=d;g<p;++g){let y=h[g];y>65535?(y-=65536,f+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):f+=String.fromCharCode(y)}return f},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const p=h.length;if(!p)return 0;let f=0,g=0;if(this._interim){const y=h.charCodeAt(g++);56320<=y&&y<=57343?d[f++]=1024*(this._interim-55296)+y-56320+65536:(d[f++]=this._interim,d[f++]=y),this._interim=0}for(let y=g;y<p;++y){const D=h.charCodeAt(y);if(55296<=D&&D<=56319){if(++y>=p)return this._interim=D,f;const v=h.charCodeAt(y);56320<=v&&v<=57343?d[f++]=1024*(D-55296)+v-56320+65536:(d[f++]=D,d[f++]=v)}else D!==65279&&(d[f++]=D)}return f}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const p=h.length;if(!p)return 0;let f,g,y,D,v=0,o=0,c=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let w,A=0;for(;(w=63&this.interim[++A])&&A<4;)C<<=6,C|=w;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=m-A;for(;c<R;){if(c>=p)return 0;if(w=h[c++],(192&w)!=128){c--,_=!0;break}this.interim[A++]=w,C<<=6,C|=63&w}_||(m===2?C<128?c--:d[v++]=C:m===3?C<2048||C>=55296&&C<=57343||C===65279||(d[v++]=C):C<65536||C>1114111||(d[v++]=C)),this.interim.fill(0)}const a=p-4;let l=c;for(;l<p;){for(;!(!(l<a)||128&(f=h[l])||128&(g=h[l+1])||128&(y=h[l+2])||128&(D=h[l+3]));)d[v++]=f,d[v++]=g,d[v++]=y,d[v++]=D,l+=4;if(f=h[l++],f<128)d[v++]=f;else if((224&f)==192){if(l>=p)return this.interim[0]=f,v;if(g=h[l++],(192&g)!=128){l--;continue}if(o=(31&f)<<6|63&g,o<128){l--;continue}d[v++]=o}else if((240&f)==224){if(l>=p)return this.interim[0]=f,v;if(g=h[l++],(192&g)!=128){l--;continue}if(l>=p)return this.interim[0]=f,this.interim[1]=g,v;if(y=h[l++],(192&y)!=128){l--;continue}if(o=(15&f)<<12|(63&g)<<6|63&y,o<2048||o>=55296&&o<=57343||o===65279)continue;d[v++]=o}else if((248&f)==240){if(l>=p)return this.interim[0]=f,v;if(g=h[l++],(192&g)!=128){l--;continue}if(l>=p)return this.interim[0]=f,this.interim[1]=g,v;if(y=h[l++],(192&y)!=128){l--;continue}if(l>=p)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=y,v;if(D=h[l++],(192&D)!=128){l--;continue}if(o=(7&f)<<18|(63&g)<<12|(63&y)<<6|63&D,o<65536||o>1114111)continue;d[v++]=o}}return v}}},225:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=h(1480),p=[[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]],f=[[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 g;u.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let y=0;y<p.length;++y)g.fill(0,p[y][0],p[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?g[y]:(function(D,v){let o,c=0,a=v.length-1;if(D<v[0][0]||D>v[a][1])return!1;for(;a>=c;)if(o=c+a>>1,D>v[o][1])c=o+1;else{if(!(D<v[o][0]))return!0;a=o-1}return!1})(y,f)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,D){let v=this.wcwidth(y),o=v===0&&D!==0;if(o){const c=d.UnicodeService.extractWidth(D);c===0?o=!1:c>v&&(v=c)}return d.UnicodeService.createPropertyValue(0,v,o)}}},5981:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=h(8460),p=h(844);class f extends p.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,D){if(D!==void 0&&this._syncCalls>D)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,D){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(D),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(D)}_innerWrite(y=0,D=!0){const v=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],c=this._action(o,D);if(c){const l=_=>Date.now()-v>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(v,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(l)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-v>=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()}}u.WriteBuffer=f},5941:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const h=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function p(f,g){const y=f.toString(16),D=y.length<2?"0"+y:y;switch(g){case 4:return y[0];case 8:return D;case 12:return(D+D).slice(0,3);default:return D+D}}u.parseColor=function(f){if(!f)return;let g=f.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const y=h.exec(g);if(y){const D=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/D*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/D*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/D*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),d.exec(g)&&[3,6,9,12].includes(g.length))){const y=g.length/3,D=[0,0,0];for(let v=0;v<3;++v){const o=parseInt(g.slice(y*v,y*v+y),16);D[v]=y===1?o<<4:y===2?o:y===3?o>>4:o>>8}return D}},u.toRgbString=function(f,g=16){const[y,D,v]=f;return`rgb:${p(y,g)}/${p(D,g)}/${p(v,g)}`}},5770:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=h(482),p=h(8742),f=h(5770),g=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(D,v){this._handlers[D]===void 0&&(this._handlers[D]=[]);const o=this._handlers[D];return o.push(v),{dispose:()=>{const c=o.indexOf(v);c!==-1&&o.splice(c,1)}}}clearHandler(D){this._handlers[D]&&delete this._handlers[D]}setHandlerFallback(D){this._handlerFb=D}reset(){if(this._active.length)for(let D=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;D>=0;--D)this._active[D].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(D,v){if(this.reset(),this._ident=D,this._active=this._handlers[D]||g,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(D,v,o){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(D,v,o);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(D,v,o))}unhook(D,v=!0){if(this._active.length){let o=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,o=v,a=this._stack.fallThrough,this._stack.paused=!1),!a&&o===!1){for(;c>=0&&(o=this._active[c].unhook(D),o!==!0);c--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,o;c--}for(;c>=0;c--)if(o=this._active[c].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",D);this._active=g,this._ident=0}};const y=new p.Params;y.addParam(0),u.DcsHandler=class{constructor(D){this._handler=D,this._data="",this._params=y,this._hitLimit=!1}hook(D){this._params=D.length>1||D.params[0]?D.clone():y,this._data="",this._hitLimit=!1}put(D,v,o){this._hitLimit||(this._data+=(0,d.utf32ToString)(D,v,o),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(D){let v=!1;if(this._hitLimit)v=!1;else if(D&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then((o=>(this._params=y,this._data="",this._hitLimit=!1,o)));return this._params=y,this._data="",this._hitLimit=!1,v}}},2015:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=h(844),p=h(8742),f=h(6242),g=h(6351);class y{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,l,_){this.table[a<<8|c]=l<<4|_}addMany(c,a,l,_){for(let C=0;C<c.length;C++)this.table[a<<8|c[C]]=l<<4|_}}u.TransitionTable=y;const D=160;u.VT500_TRANSITION_TABLE=(function(){const o=new y(4095),c=Array.apply(null,Array(256)).map(((A,m)=>m)),a=(A,m)=>c.slice(A,m),l=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const C=a(0,14);let w;for(w in o.setDefault(1,0),o.addMany(l,0,2,0),C)o.addMany([24,26,153,154],w,3,0),o.addMany(a(128,144),w,3,0),o.addMany(a(144,152),w,3,0),o.add(156,w,0,0),o.add(27,w,11,1),o.add(157,w,4,8),o.addMany([152,158,159],w,0,7),o.add(155,w,11,3),o.add(144,w,11,9);return o.addMany(_,0,3,0),o.addMany(_,1,3,1),o.add(127,1,0,1),o.addMany(_,8,0,8),o.addMany(_,3,3,3),o.add(127,3,0,3),o.addMany(_,4,3,4),o.add(127,4,0,4),o.addMany(_,6,3,6),o.addMany(_,5,3,5),o.add(127,5,0,5),o.addMany(_,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(l,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(a(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(l,7,0,7),o.addMany(_,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(a(64,127),3,7,0),o.addMany(a(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(a(48,60),4,8,4),o.addMany(a(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(a(32,64),6,0,6),o.add(127,6,0,6),o.addMany(a(64,127),6,0,0),o.addMany(a(32,48),3,9,5),o.addMany(a(32,48),5,9,5),o.addMany(a(48,64),5,0,6),o.addMany(a(64,127),5,7,0),o.addMany(a(32,48),4,9,5),o.addMany(a(32,48),1,9,2),o.addMany(a(32,48),2,9,2),o.addMany(a(48,127),2,10,0),o.addMany(a(48,80),1,10,0),o.addMany(a(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(a(96,127),1,10,0),o.add(80,1,11,9),o.addMany(_,9,0,9),o.add(127,9,0,9),o.addMany(a(28,32),9,0,9),o.addMany(a(32,48),9,9,12),o.addMany(a(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(_,11,0,11),o.addMany(a(32,128),11,0,11),o.addMany(a(28,32),11,0,11),o.addMany(_,10,0,10),o.add(127,10,0,10),o.addMany(a(28,32),10,0,10),o.addMany(a(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(a(32,48),10,9,12),o.addMany(_,12,0,12),o.add(127,12,0,12),o.addMany(a(28,32),12,0,12),o.addMany(a(32,48),12,9,12),o.addMany(a(48,64),12,0,11),o.addMany(a(64,127),12,12,13),o.addMany(a(64,127),10,12,13),o.addMany(a(64,127),9,12,13),o.addMany(_,13,13,13),o.addMany(l,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(D,0,2,0),o.add(D,8,5,8),o.add(D,6,0,6),o.add(D,11,0,11),o.add(D,13,13,13),o})();class v extends d.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,l,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,l)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[64,126]){let l=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=c.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<c.intermediates.length;++C){const w=c.intermediates.charCodeAt(C);if(32>w||w>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=w}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return l<<=8,l|=_,l}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}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(c,a,l,_,C){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(c,a,l){let _,C=0,w=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&R>-1){for(;R>=0&&(_=m[R](this._params),_!==!0);R--)if(_ instanceof Promise)return this._parseStack.handlerPos=R,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&R>-1){for(;R>=0&&(_=m[R](),_!==!0);R--)if(_ instanceof Promise)return this._parseStack.handlerPos=R,_}this._parseStack.handlers=[];break;case 6:if(C=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=c[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=A;m<a;++m){switch(C=c[m],w=this._transitions.table[this.currentState<<8|(C<160?C:D)],w>>4){case 2:for(let j=m+1;;++j){if(j>=a||(C=c[j])<32||C>126&&C<D){this._printHandler(c,m,j),m=j-1;break}if(++j>=a||(C=c[j])<32||C>126&&C<D){this._printHandler(c,m,j),m=j-1;break}if(++j>=a||(C=c[j])<32||C>126&&C<D){this._printHandler(c,m,j),m=j-1;break}if(++j>=a||(C=c[j])<32||C>126&&C<D){this._printHandler(c,m,j),m=j-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|C];let G=R?R.length-1:-1;for(;G>=0&&(_=R[G](this._params),_!==!0);G--)if(_ instanceof Promise)return this._preserveStack(3,R,G,w,m),_;G<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++m<a&&(C=c[m])>47&&C<60);m--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const q=this._escHandlers[this._collect<<8|C];let Y=q?q.length-1:-1;for(;Y>=0&&(_=q[Y](),_!==!0);Y--)if(_ instanceof Promise)return this._preserveStack(4,q,Y,w,m),_;Y<0&&this._escHandlerFb(this._collect<<8|C),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|C,this._params);break;case 13:for(let j=m+1;;++j)if(j>=a||(C=c[j])===24||C===26||C===27||C>127&&C<D){this._dcsParser.put(c,m,j),m=j-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,w,m),_;C===27&&(w|=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 j=m+1;;j++)if(j>=a||(C=c[j])<32||C>127&&C<D){this._oscParser.put(c,m,j),m=j-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,w,m),_;C===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&w}}}u.EscapeSequenceParser=v},6242:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=h(5770),p=h(482),f=[];u.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,y){this._handlers[g]===void 0&&(this._handlers[g]=[]);const D=this._handlers[g];return D.push(y),{dispose:()=>{const v=D.indexOf(y);v!==-1&&D.splice(v,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,y,D){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(g,y,D);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(g,y,D))}start(){this.reset(),this._state=1}put(g,y,D){if(this._state!==3){if(this._state===1)for(;y<D;){const v=g[y++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&D-y>0&&this._put(g,y,D)}}end(g,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let D=!1,v=this._active.length-1,o=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,D=y,o=this._stack.fallThrough,this._stack.paused=!1),!o&&D===!1){for(;v>=0&&(D=this._active[v].end(g),D!==!0);v--)if(D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,D;v--}for(;v>=0;v--)if(D=this._active[v].end(!1),D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,D}else this._handlerFb(this._id,"END",g);this._active=f,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,y,D){this._hitLimit||(this._data+=(0,p.utf32ToString)(g,y,D),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let y=!1;if(this._hitLimit)y=!1;else if(g&&(y=this._handler(this._data),y instanceof Promise))return y.then((D=>(this._data="",this._hitLimit=!1,D)));return this._data="",this._hitLimit=!1,y}}},8742:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const h=2147483647;class d{static fromArray(f){const g=new d;if(!f.length)return g;for(let y=Array.isArray(f[0])?1:0;y<f.length;++y){const D=f[y];if(Array.isArray(D))for(let v=0;v<D.length;++v)g.addSubParam(D[v]);else g.addParam(D)}return g}constructor(f=32,g=32){if(this.maxLength=f,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let g=0;g<this.length;++g){f.push(this.params[g]);const y=this._subParamsIdx[g]>>8,D=255&this._subParamsIdx[g];D-y>0&&f.push(Array.prototype.slice.call(this._subParams,y,D))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>h?h:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>h?h:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const g=this._subParamsIdx[f]>>8,y=255&this._subParamsIdx[f];return y-g>0?this._subParams.subarray(g,y):null}getSubParamsAll(){const f={};for(let g=0;g<this.length;++g){const y=this._subParamsIdx[g]>>8,D=255&this._subParamsIdx[g];D-y>0&&(f[g]=this._subParams.slice(y,D))}return f}addDigit(f){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,D=y[g-1];y[g-1]=~D?Math.min(10*D+f,h):f}}u.Params=d},5741:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,d){const p={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(p),d.dispose=()=>this._wrappedAddonDispose(p),d.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let d=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===h){d=p;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(d,1)}}},8771:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=h(3785),p=h(511);u.BufferApiView=class{constructor(f,g){this._buffer=f,this.type=g}init(f){return this._buffer=f,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(f){const g=this._buffer.lines.get(f);if(g)return new d.BufferLineApiView(g)}getNullCell(){return new p.CellData}}},3785:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=h(511);u.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,f){if(!(p<0||p>=this._line.length))return f?(this._line.loadCell(p,f),f):this._line.loadCell(p,new d.CellData)}translateToString(p,f,g){return this._line.translateToString(p,f,g)}}},8285:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=h(8771),p=h(8460),f=h(844);class g extends f.Disposable{constructor(D){super(),this._core=D,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=g},7975:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,d){return this._core.registerCsiHandler(h,(p=>d(p.toArray())))}addCsiHandler(h,d){return this.registerCsiHandler(h,d)}registerDcsHandler(h,d){return this._core.registerDcsHandler(h,((p,f)=>d(p,f.toArray())))}addDcsHandler(h,d){return this.registerDcsHandler(h,d)}registerEscHandler(h,d){return this._core.registerEscHandler(h,d)}addEscHandler(h,d){return this.registerEscHandler(h,d)}registerOscHandler(h,d){return this._core.registerOscHandler(h,d)}addOscHandler(h,d){return this.registerOscHandler(h,d)}}},7090:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(H,u,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,w=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,c,a,l);else for(var A=o.length-1;A>=0;A--)(_=o[A])&&(w=(C<3?_(w):C>3?_(c,a,w):_(c,a))||w);return C>3&&w&&Object.defineProperty(c,a,w),w},p=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const f=h(8460),g=h(844),y=h(5295),D=h(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let v=u.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(o,this))}resize(o,c){this.cols=o,this.rows=c,this.buffers.resize(o,c),this._onResize.fire({cols:o,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,c=!1){const a=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===o.fg&&l.getBg(0)===o.bg||(l=a.getBlankLine(o,c),this._cachedBlankLine=l),l.isWrapped=c;const _=a.ybase+a.scrollTop,C=a.ybase+a.scrollBottom;if(a.scrollTop===0){const w=a.lines.isFull;C===a.lines.length-1?w?a.lines.recycle().copyFrom(l):a.lines.push(l.clone()):a.lines.splice(C+1,0,l.clone()),w?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const w=C-_+1;a.lines.shiftElements(_+1,w-1,-1),a.lines.set(C,l.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(o,c,a){const l=this.buffer;if(o<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else o+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+o,l.ybase),0),_!==l.ydisp&&(c||this._onScroll.fire(l.ydisp))}};u.BufferService=v=d([p(0,D.IOptionsService)],v)},7994:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,d){this._charsets[h]=d,this.glevel===h&&(this.charset=d)}}},1753:function(H,u,h){var d=this&&this.__decorate||function(l,_,C,w){var A,m=arguments.length,R=m<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(l,_,C,w);else for(var G=l.length-1;G>=0;G--)(A=l[G])&&(R=(m<3?A(R):m>3?A(_,C,R):A(_,C))||R);return m>3&&R&&Object.defineProperty(_,C,R),R},p=this&&this.__param||function(l,_){return function(C,w){_(C,w,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const f=h(2585),g=h(8460),y=h(844),D={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function v(l,_){let C=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(C|=64,C|=l.action):(C|=3&l.button,4&l.button&&(C|=64),8&l.button&&(C|=128),l.action===32?C|=32:l.action!==0||_||(C|=3)),C}const o=String.fromCharCode,c={DEFAULT:l=>{const _=[v(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${o(_[0])}${o(_[1])}${o(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.x};${l.y}${_}`}};let a=u.CoreMouseService=class extends y.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(D))this.addProtocol(C,D[C]);for(const C of Object.keys(c))this.addEncoding(C,c[C]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,C){if(C){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};u.CoreMouseService=a=d([p(0,f.IBufferService),p(1,f.ICoreService)],a)},6975:function(H,u,h){var d=this&&this.__decorate||function(a,l,_,C){var w,A=arguments.length,m=A<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,C);else for(var R=a.length-1;R>=0;R--)(w=a[R])&&(m=(A<3?w(m):A>3?w(l,_,m):w(l,_))||m);return A>3&&m&&Object.defineProperty(l,_,m),m},p=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const f=h(1439),g=h(8460),y=h(844),D=h(2585),v=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends y.Disposable{constructor(a,l,_){super(),this._bufferService=a,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(v),this.decPrivateModes=(0,f.clone)(o)}reset(){this.modes=(0,f.clone)(v),this.decPrivateModes=(0,f.clone)(o)}triggerDataEvent(a,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=c=d([p(0,D.IBufferService),p(1,D.ILogService),p(2,D.IOptionsService)],c)},9074:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=h(8055),p=h(8460),f=h(844),g=h(6106);let y=0,D=0;class v extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const l=new o(a);if(l){const _=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,l,_){let C=0,w=0;for(const A of this._decorations.getKeyIterator(l))C=A.options.x??0,w=C+(A.options.width??1),a>=C&&a<w&&(!_||(A.options.layer??"bottom")===_)&&(yield A)}forEachDecorationAtCell(a,l,_,C){this._decorations.forEachByKey(l,(w=>{y=w.options.x??0,D=y+(w.options.width??1),a>=y&&a<D&&(!_||(w.options.layer??"bottom")===_)&&C(w)}))}}u.DecorationService=v;class o extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=h(2585),p=h(8343);class f{constructor(...y){this._entries=new Map;for(const[D,v]of y)this.set(D,v)}set(y,D){const v=this._entries.get(y);return this._entries.set(y,D),v}forEach(y){for(const[D,v]of this._entries.entries())y(D,v)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}u.ServiceCollection=f,u.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(g,y){this._services.set(g,y)}getService(g){return this._services.get(g)}createInstance(g,...y){const D=(0,p.getServiceDependencies)(g).sort(((c,a)=>c.index-a.index)),v=[];for(const c of D){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${c.id}.`);v.push(a)}const o=D.length>0?D[0].index:y.length;if(y.length!==o)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${o+1} conflicts with ${y.length} static arguments`);return new g(...y,...v)}}},7866:function(H,u,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,w=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,c,a,l);else for(var A=o.length-1;A>=0;A--)(_=o[A])&&(w=(C<3?_(w):C>3?_(c,a,w):_(c,a))||w);return C>3&&w&&Object.defineProperty(c,a,w),w},p=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const f=h(844),g=h(2585),y={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let D,v=u.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),D=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let c=0;c<o.length;c++)typeof o[c]=="function"&&(o[c]=o[c]())}_log(o,c,a){this._evalLazyOptionalParams(a),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(o,...c){this._logLevel<=g.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,o,c)}debug(o,...c){this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,o,c)}info(o,...c){this._logLevel<=g.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,o,c)}warn(o,...c){this._logLevel<=g.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,o,c)}error(o,...c){this._logLevel<=g.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,o,c)}};u.LogService=v=d([p(0,g.IOptionsService)],v),u.setTraceLogger=function(o){D=o},u.traceCall=function(o,c,a){if(typeof a.value!="function")throw new Error("not supported");const l=a.value;a.value=function(..._){if(D.logLevel!==g.LogLevelEnum.TRACE)return l.apply(this,_);D.trace(`GlyphRenderer#${l.name}(${_.map((w=>JSON.stringify(w))).join(", ")})`);const C=l.apply(this,_);return D.trace(`GlyphRenderer#${l.name} return`,C),C}}},7302:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=h(8460),p=h(844),f=h(6114);u.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:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends p.Disposable{constructor(v){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...u.DEFAULT_OPTIONS};for(const c in v)if(c in o)try{const a=v[c];o[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(v,o){return this.onOptionChange((c=>{c===v&&o(this.rawOptions[v])}))}onMultipleOptionChange(v,o){return this.onOptionChange((c=>{v.indexOf(c)!==-1&&o()}))}_setupOptions(){const v=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},o=(c,a)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:v.bind(this,c),set:o.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(v,o){switch(v){case"cursorStyle":if(o||(o=u.DEFAULT_OPTIONS[v]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(o))throw new Error(`"${o}" is not a valid value for ${v}`);break;case"wordSeparator":o||(o=u.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=g.includes(o)?o:u.DEFAULT_OPTIONS[v];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${v} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${v} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${v} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}u.OptionsService=y},2660:function(H,u,h){var d=this&&this.__decorate||function(y,D,v,o){var c,a=arguments.length,l=a<3?D:o===null?o=Object.getOwnPropertyDescriptor(D,v):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(y,D,v,o);else for(var _=y.length-1;_>=0;_--)(c=y[_])&&(l=(a<3?c(l):a>3?c(D,v,l):c(D,v))||l);return a>3&&l&&Object.defineProperty(D,v,l),l},p=this&&this.__param||function(y,D){return function(v,o){D(v,o,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const f=h(2585);let g=u.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const D=this._bufferService.buffer;if(y.id===void 0){const _=D.addMarker(D.ybase+D.y),C={data:y,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(C,_))),this._dataByLinkId.set(C.id,C),C.id}const v=y,o=this._getEntryIdKey(v),c=this._entriesWithId.get(o);if(c)return this.addLineToLink(c.id,D.ybase+D.y),c.id;const a=D.addMarker(D.ybase+D.y),l={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(l,a))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(y,D){const v=this._dataByLinkId.get(y);if(v&&v.lines.every((o=>o.line!==D))){const o=this._bufferService.buffer.addMarker(D);v.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(v,o)))}}getLinkData(y){return this._dataByLinkId.get(y)?.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,D){const v=y.lines.indexOf(D);v!==-1&&(y.lines.splice(v,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};u.OscLinkService=g=d([p(0,f.IBufferService)],g)},8343:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const h="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(p){return p[d]||[]},u.createDecorator=function(p){if(u.serviceRegistry.has(p))return u.serviceRegistry.get(p);const f=function(g,y,D){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,o,c){o[h]===o?o[d].push({id:v,index:c}):(o[d]=[{id:v,index:c}],o[h]=o)})(f,g,D)};return f.toString=()=>p,u.serviceRegistry.set(p,f),f}},2585:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=h(8343);var p;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(p||(u.LogLevelEnum=p={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=h(8460),p=h(225);class f{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,D,v=!1){return(16777215&y)<<3|(3&D)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new p.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let D=0,v=0;const o=y.length;for(let c=0;c<o;++c){let a=y.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=o)return D+this.wcwidth(a);const C=y.charCodeAt(c);56320<=C&&C<=57343?a=1024*(a-55296)+C-56320+65536:D+=this.wcwidth(C)}const l=this.charProperties(a,v);let _=f.extractWidth(l);f.extractShouldJoin(l)&&(_-=f.extractWidth(v)),D+=_,v=l}return D}charProperties(y,D){return this._activeProvider.charProperties(y,D)}}u.UnicodeService=f}},k={};function U(H){var u=k[H];if(u!==void 0)return u.exports;var h=k[H]={exports:{}};return z[H].call(h.exports,h,h.exports,U),h.exports}var K={};return(()=>{var H=K;Object.defineProperty(H,"__esModule",{value:!0}),H.Terminal=void 0;const u=U(9042),h=U(3236),d=U(844),p=U(5741),f=U(8285),g=U(7975),y=U(7090),D=["cols","rows"];class v extends d.Disposable{constructor(c){super(),this._core=this.register(new h.Terminal(c)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const a=_=>this._core.options[_],l=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:a.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(c){if(D.includes(c))throw new Error(`Option "${c}" 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 g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,a=!0){this._core.input(c,a)}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,l){this._verifyIntegers(c,a,l),this._core.select(c,a,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
|
|
193
|
+
`,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}H.Terminal=v})(),K})()))})(hc)),hc.exports}var g0=v0(),fc={exports:{}},$d;function p0(){return $d||($d=1,(function(b,B){(function(z,k){b.exports=k()})(self,(()=>(()=>{var z={};return(()=>{var k=z;Object.defineProperty(k,"__esModule",{value:!0}),k.FitAddon=void 0,k.FitAddon=class{activate(U){this._terminal=U}dispose(){}fit(){const U=this.proposeDimensions();if(!U||!this._terminal||isNaN(U.cols)||isNaN(U.rows))return;const K=this._terminal._core;this._terminal.rows===U.rows&&this._terminal.cols===U.cols||(K._renderService.clear(),this._terminal.resize(U.cols,U.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const U=this._terminal._core,K=U._renderService.dimensions;if(K.css.cell.width===0||K.css.cell.height===0)return;const H=this._terminal.options.scrollback===0?0:U.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),f=h-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),g=d-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-H;return{cols:Math.max(2,Math.floor(g/K.css.cell.width)),rows:Math.max(1,Math.floor(f/K.css.cell.height))}}}})(),z})()))})(fc)),fc.exports}var S0=p0();const Na=new Map;function b0({sessionId:b,isActive:B,clientId:z,lockHeldBy:k,scrollbackLines:U=1e4,onReadOnlyInput:K}){const H=ne.useRef(null),u=ne.useRef(null),h=ne.useRef(null),d=ne.useRef(null),p=ne.useRef(null),f=ne.useRef(null),[g,y]=ne.useState(!1),D=g||k===z;return ne.useEffect(()=>{if(!H.current)return;let v=Na.get(b),o=v?.terminal,c=v?.fitAddon;return(!o||!c)&&(o=new g0.Terminal({cursorBlink:!0,fontSize:14,theme:{background:"#1a1a1a",foreground:"#d4d4d4"},scrollback:U}),c=new S0.FitAddon,o.loadAddon(c),Na.set(b,{terminal:o,fitAddon:c})),u.current=o,h.current=c,()=>{}},[b,U]),ne.useEffect(()=>{const v=u.current,o=h.current;if(!v||!o)return;if(H.current&&(H.current.style.display=B?"block":"none"),B&&!v.element&&H.current){if(v.open(H.current),v.element){const C=v.element;C.style.padding="8px",C.style.boxSizing="border-box"}requestAnimationFrame(()=>{setTimeout(()=>{try{o.fit()}catch(C){console.error("Fit error on activation:",C)}},0)})}else B&&v.element&&requestAnimationFrame(()=>{setTimeout(()=>{try{o.fit()}catch(C){console.error("Refit error:",C)}},0)});if(!B){d.current&&d.current.readyState===WebSocket.OPEN&&d.current.close();return}const a=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/terminal/${b}?clientId=${encodeURIComponent(z)}`,l=new WebSocket(a);d.current=l,l.binaryType="arraybuffer",l.onopen=()=>{l.send(JSON.stringify({type:"resize",cols:v.cols,rows:v.rows})),(!k||k===z)&&(y(!0),l.send(JSON.stringify({type:"acquire-lock"})))},l.onmessage=C=>{if(typeof C.data=="string")try{JSON.parse(C.data).type==="exit"&&v.write(`\r
|
|
194
|
+
[Process exited]`)}catch{v.write(C.data)}else{const w=new Uint8Array(C.data);v.write(new TextDecoder().decode(w))}},l.onclose=()=>{y(!1)},l.onerror=C=>{console.error("WebSocket error:",C),v.write(`\r
|
|
195
|
+
[Connection error]`)};const _=new ResizeObserver(()=>{try{H.current&&H.current.offsetWidth>0&&H.current.offsetHeight>0&&(o.fit(),l.readyState===WebSocket.OPEN&&l.send(JSON.stringify({type:"resize",cols:v.cols,rows:v.rows})))}catch(C){console.error("Resize error:",C)}});return p.current=_,H.current&&_.observe(H.current),()=>{f.current&&(f.current.dispose(),f.current=null),p.current&&p.current.disconnect(),d.current&&d.current.readyState===WebSocket.OPEN&&d.current.close()}},[b,B,z]),ne.useEffect(()=>{const v=u.current;if(!v)return;v.options.cursorBlink=D,f.current&&f.current.dispose();const o=d.current;return f.current=v.onData(c=>{D&&o&&o.readyState===WebSocket.OPEN?o.send(c):!D&&K&&K(k)}),()=>{}},[D,g,k,K]),ne.useEffect(()=>{k!==null&&k!==z&&y(!1)},[k,z]),ne.useEffect(()=>{B&&!D&&!k&&d.current&&d.current.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"acquire-lock"}))},[k,B,D]),ne.useEffect(()=>()=>{const v=Na.get(b);v&&(v.terminal.dispose(),Na.delete(b))},[b]),M.jsx("div",{ref:H,style:{display:B?"block":"none",width:"100%",height:"100%",overflow:"hidden"}})}function mn({size:b="md"}={}){const B=b==="sm"?"h-8":"h-12";return M.jsxs("svg",{className:`w-auto ${B}`,viewBox:"0 0 320 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[M.jsx("rect",{x:"4",y:"8",width:"48",height:"48",rx:"2",className:"stroke-primary",strokeWidth:"1.5"}),M.jsx("polyline",{points:"16,24 28,32 16,40",className:"stroke-primary",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"miter",fill:"none"}),M.jsx("line",{x1:"32",y1:"40",x2:"40",y2:"40",className:"stroke-primary",strokeWidth:"2.5",strokeLinecap:"round"}),M.jsx("text",{x:"68",y:"41",fontFamily:"monospace",fontSize:"28",fontWeight:"600",className:"fill-primary",children:"PuTTrY"})]})}function y0(){let b=localStorage.getItem("wt_client_id");return b||(b=crypto.randomUUID(),localStorage.setItem("wt_client_id",b)),b}function C0(){const[b,B]=ne.useState("loading"),[z,k]=ne.useState(!1),[U,K]=ne.useState(""),[H,u]=ne.useState(""),[h,d]=ne.useState(!1),[p,f]=ne.useState(["","","","","",""]),[g,y]=ne.useState(""),[D,v]=ne.useState(""),[o,c]=ne.useState(!1),[a,l]=ne.useState(!1),_=ne.useRef([]),C=()=>p.join(""),[w,A]=ne.useState(!1),[m,R]=ne.useState(!1),[G,q]=ne.useState(""),[Y,j]=ne.useState([]),[Q,ae]=ne.useState(null),[P,J]=ne.useState(!1),[ie,E]=ne.useState(192),[T,x]=ne.useState(!1),[L,W]=ne.useState(1e4),Z=ne.useRef(y0()),[oe,he]=ne.useState({}),F=ne.useRef(0),N=ne.useRef({}),[se,fe]=ne.useState(new Set),_e=ne.useRef({}),me=de=>{const ve=Date.now(),ye=3e3;ve-F.current<ye||(pn.error(de,{position:"bottom-right",duration:ye,style:{fontSize:"12px",padding:"8px 12px"}}),F.current=ve)},De=de=>{const ve=new WebSocket(`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/terminal/${de}?clientId=${encodeURIComponent(Z.current)}`);ve.onopen=()=>{ve.send(JSON.stringify({type:"acquire-lock",force:!0}))},setTimeout(()=>{ve.readyState===WebSocket.OPEN&&ve.close()},500)},[Oe,Pe]=ne.useState(!1),[nt,Ee]=ne.useState(!1),[Et,_i]=ne.useState(null),[mi,ni]=ne.useState(!1),Ui=ne.useRef(null),mt=ne.useRef(null),Ge=ne.useRef(null),[Ct,ti]=ne.useState(!1);ne.useEffect(()=>{if(!Ct)return;const de=setTimeout(()=>ti(!1),4e3);return()=>clearTimeout(de)},[Ct]),ne.useEffect(()=>{At()},[]);const ai=ne.useCallback(()=>{const de=window.location.protocol==="https:"?"wss":"ws",ve=new WebSocket(`${de}://${window.location.host}/sync?clientId=${encodeURIComponent(Z.current)}`);mt.current=ve,ve.onmessage=ye=>{const we=JSON.parse(ye.data);if(we.type==="snapshot"){j(we.sessions);const He={};for(const Ke of we.sessions)He[Ke.id]=Ke.inputLockClientId??null;he(He),Ge.current&&we.sessions.find(Ke=>Ke.id===Ge.current)&&(ae(Ge.current),Ge.current=null)}else we.type==="session-created"?(j(He=>He.find(Ke=>Ke.id===we.session.id)?He:[...He,we.session]),Ge.current===we.session.id&&(ae(we.session.id),Ge.current=null)):we.type==="session-deleted"?(j(He=>He.filter(Ke=>Ke.id!==we.sessionId)),ae(He=>He===we.sessionId?null:He),he(He=>{const Ke={...He};return delete Ke[we.sessionId],Ke})):we.type==="session-renamed"?j(He=>He.map(Ke=>Ke.id===we.sessionId?{...Ke,label:we.label}:Ke)):we.type==="input-lock-acquired"?he(He=>({...He,[we.sessionId]:we.clientId})):we.type==="input-lock-released"?he(He=>({...He,[we.sessionId]:null})):we.type==="data-activity"&&(fe(He=>{const Ke=new Set(He);return Ke.add(we.sessionId),Ke}),_e.current[we.sessionId]&&clearTimeout(_e.current[we.sessionId]),_e.current[we.sessionId]=setTimeout(()=>{fe(He=>{const Ke=new Set(He);return Ke.delete(we.sessionId),Ke}),delete _e.current[we.sessionId]},500))},ve.onclose=()=>{setTimeout(ai,2e3)}},[]);ne.useEffect(()=>{if(b==="authenticated")return ai(),()=>{mt.current?.close()}},[b,ai]),ne.useEffect(()=>{if(b!=="authenticated")return;async function de(){try{const ve=await fetch("/api/config");if(ve.ok){const ye=await ve.json();W(ye.scrollbackLines)}}catch(ve){console.error("Failed to fetch config:",ve)}}de()},[b]),ne.useEffect(()=>{for(const[de,ve]of Object.entries(oe))N.current[de]===Z.current&&ve!==Z.current&&ve!==null&&me(`Session control lost to another browser with Session ID: ${ve.split("-").pop()}`);N.current={...oe}},[oe]),ne.useEffect(()=>()=>{Object.values(_e.current).forEach(de=>clearTimeout(de))},[]),ne.useEffect(()=>{Y.length>0&&!Q&&ae(Y[0].id)},[Y,Q]);async function At(){try{const ve=await(await fetch("/api/auth-status")).json();console.log("[Auth] Status response:",ve),k(ve.authDisabled),ve.authDisabled&&ve.showAuthDisabledWarning&&(console.log("[Auth] Setting showAuthDisabledWarning to true"),ti(!0)),ve.authenticated?B("authenticated"):B("unauthenticated")}catch(de){console.error("Auth check failed:",de),B("unauthenticated")}}async function qi(){x(!0);try{const de=await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:Z.current})});if(de.ok){const ve=await de.json();Ge.current=ve.id,setTimeout(()=>{Ge.current===ve.id&&(ae(ve.id),Ge.current=null)},500)}}catch(de){console.error("Failed to create session:",de)}finally{x(!1)}}async function Rt(de){de.preventDefault(),K(""),x(!0);try{const ve=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:H})}),ye=await ve.json();if(!ve.ok){K("Invalid password");return}ye.authenticated?(u(""),B("authenticated")):ye.requiresPasskey&&!ye.requiresTOTP?(u(""),A(!1),B("passkey-verify")):ye.canChoose?(u(""),A(!0),B("totp-verify")):ye.requiresTOTP&&(u(""),A(!1),ye.totpMode==="setup"?(B("totp-setup"),await vi()):ye.totpMode==="verify"&&B("totp-verify"))}catch(ve){K("Login failed"),console.error("Login error:",ve)}finally{x(!1)}}async function vi(){try{const de=await fetch("/api/auth/2fa/qr",{credentials:"include"});if(de.ok){const ve=await de.json();y(ve.dataUrl),v(ve.manualEntryKey)}else K("Failed to generate QR code")}catch(de){K("Failed to fetch QR code"),console.error("QR fetch error:",de)}}function Ye(de,ve){const ye=ve.replace(/\D/g,"").slice(0,1),we=[...p];if(we[de]=ye,f(we),ye&&de<5&&_.current[de+1]?.focus(),ye&&we.every(He=>He!=="")){const He=we.join("");b==="totp-setup"?Dt(He):b==="totp-verify"&&oi(He)}}function li(de,ve){ve.key==="Backspace"&&!p[de]&&de>0&&_.current[de-1]?.focus()}async function Dt(de){const ve=typeof de=="string"?de:C();de?.preventDefault?.(),K(""),l(!0);try{console.log("[TOTP] Setting up with code:",ve);const ye=await fetch("/api/auth/2fa/setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:D,code:ve})}),we=await ye.json();if(console.log("[TOTP] Setup response status:",ye.status,"data:",we),!ye.ok){console.log("[TOTP] Setup failed:",we.error),K(we.error||"Failed to setup 2FA"),f(["","","","","",""]),_.current[0]?.focus(),l(!1);return}console.log("[TOTP] Setup successful, redirecting to authenticated"),f(["","","","","",""]),y(""),v(""),B("authenticated")}catch(ye){console.error("[TOTP] Setup error:",ye),K("Setup failed"),l(!1)}}async function oi(de){const ve=typeof de=="string"?de:C();de?.preventDefault?.(),K(""),l(!0);try{console.log("[TOTP] Verifying code:",ve);const ye=await fetch("/api/auth/2fa/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:ve})}),we=await ye.json();if(console.log("[TOTP] Response status:",ye.status,"data:",we),!ye.ok){console.log("[TOTP] Response not ok, error:",we.error),K(we.error||"Invalid code"),f(["","","","","",""]),_.current[0]?.focus(),l(!1);return}console.log("[TOTP] Verification successful, redirecting to authenticated"),f(["","","","","",""]),B("authenticated")}catch(ye){console.error("[TOTP] Verify error:",ye),K("Verification failed"),l(!1)}}async function wt(){q(""),R(!0);try{const{startAuthentication:de}=await e_(async()=>{const{startAuthentication:Ke}=await import("./index-BDkarAkX.js");return{startAuthentication:Ke}},[]),ve=await fetch("/api/auth/passkey/auth/options",{method:"POST",credentials:"include"});if(!ve.ok){q("Failed to start authentication");return}const ye=await ve.json(),we=await de({optionsJSON:ye}),He=await fetch("/api/auth/passkey/auth/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:we})});if(!He.ok){const Ke=await He.json();q(Ke.error||"Authentication failed");return}B("authenticated")}catch(de){de.name==="NotAllowedError"?q("Authentication cancelled"):(q("Authentication failed"),console.error("[Passkey] Auth error:",de))}finally{R(!1)}}async function Pa(){if(Q){ni(!0);try{const de=await fetch(`/api/sessions/${Q}/info`);if(de.ok){const ve=await de.json();_i(ve),Ee(!0)}}catch(de){console.error("Failed to fetch process info:",de)}finally{ni(!1)}}}async function Ga(){try{await fetch("/api/auth",{method:"DELETE"}),B("unauthenticated"),j([]),ae(null)}catch(de){console.error("Logout failed:",de)}}async function Va(de,ve){try{await fetch(`/api/sessions/${de}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:ve})}),j(ye=>ye.map(we=>we.id===de?{...we,label:ve}:we))}catch(ye){console.error("Failed to rename session:",ye)}}async function Ns(de){try{await fetch(`/api/sessions/${de}`,{method:"DELETE"}),j(ve=>ve.filter(ye=>ye.id!==de)),Q===de&&ae(Y.find(ve=>ve.id!==de)?.id??null)}catch(ve){console.error("Failed to close session:",ve)}}async function zs(){try{await Promise.all(Y.map(de=>fetch(`/api/sessions/${de.id}`,{method:"DELETE"}))),j([]),ae(null)}catch(de){console.error("Failed to close all sessions:",de)}}return b==="loading"?M.jsx("div",{className:"flex items-center justify-center w-full h-screen bg-background text-foreground",children:M.jsxs("div",{className:"text-center",children:[M.jsx("div",{className:"mb-4 inline-block",children:M.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-border border-t-primary"})}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}):b==="unauthenticated"?M.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:M.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[M.jsx("div",{className:"flex flex-col items-center mb-4",children:M.jsx(mn,{})}),M.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:M.jsxs("div",{className:"space-y-3",children:[M.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your session password to continue"}),M.jsxs("div",{className:"relative",children:[M.jsx("input",{type:h?"text":"password",value:H,onChange:de=>u(de.target.value),onKeyDown:de=>{de.key==="Enter"&&Rt(de)},placeholder:"Enter password...",className:"w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-sm outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-ring/50 focus:ring-[3px]",disabled:T,autoFocus:!0}),M.jsx("button",{type:"button",onClick:()=>d(!h),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",tabIndex:-1,children:h?M.jsx(dc,{className:"h-4 w-4"}):M.jsx(_c,{className:"h-4 w-4"})})]}),U&&M.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3",children:M.jsx("p",{className:"text-xs text-destructive",children:U})}),M.jsx(Ie,{className:"w-full",disabled:!H.trim()||T,onClick:Rt,children:T?M.jsxs(M.Fragment,{children:[M.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Verifying..."]}):"Continue"})]})})]})}):b==="totp-setup"?M.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:M.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[M.jsx("div",{className:"flex flex-col items-center mb-4",children:M.jsx(mn,{})}),M.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:M.jsxs("div",{className:"space-y-3",children:[M.jsx("p",{className:"text-sm font-medium",children:"Setup Two-Factor Authentication"}),M.jsx("p",{className:"text-xs text-muted-foreground",children:"Scan the QR code with your authenticator app"}),g&&M.jsx("div",{className:"flex justify-center",children:M.jsx("img",{src:g,alt:"TOTP QR Code",className:"border border-border rounded-md p-2 bg-white dark:bg-slate-900"})}),D&&M.jsxs("div",{className:"space-y-1",children:[M.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:o?"Hide":"Or enter manually"}),o&&M.jsx("div",{className:"px-3 py-2 rounded border border-border bg-muted/50 font-mono text-sm break-all text-center",children:D})]}),M.jsxs("div",{className:"space-y-3 pt-2",children:[M.jsx("label",{className:"text-xs font-medium block",children:"Enter 6-digit code"}),M.jsx("div",{className:"flex justify-center gap-2",children:p.map((de,ve)=>M.jsx("input",{ref:ye=>{_.current[ve]=ye},type:"text",inputMode:"numeric",value:de,onChange:ye=>Ye(ve,ye.target.value),onKeyDown:ye=>li(ve,ye),maxLength:1,className:"w-10 h-10 rounded-md border border-input bg-background text-sm font-semibold text-center outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-ring/50 focus:ring-[2px]",disabled:a,autoFocus:ve===0},ve))})]}),U&&M.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3 mt-3",children:M.jsx("p",{className:"text-xs text-destructive",children:U})}),a&&M.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground mt-3",children:[M.jsx(ei,{className:"h-4 w-4 animate-spin"}),"Verifying..."]})]})})]})}):b==="totp-verify"?M.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:M.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[M.jsx("div",{className:"flex flex-col items-center mb-4",children:M.jsx(mn,{})}),M.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:M.jsxs("div",{className:"space-y-3",children:[M.jsx("p",{className:"text-sm font-medium",children:"Enter Verification Code"}),M.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter the 6-digit code from your authenticator app"}),M.jsx("div",{className:"space-y-3 pt-4",children:M.jsx("div",{className:"flex justify-center gap-2",children:p.map((de,ve)=>M.jsx("input",{ref:ye=>{_.current[ve]=ye},type:"text",inputMode:"numeric",value:de,onChange:ye=>Ye(ve,ye.target.value),onKeyDown:ye=>li(ve,ye),maxLength:1,className:"w-10 h-10 rounded-md border border-input bg-background text-sm font-semibold text-center outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-ring/50 focus:ring-[2px]",disabled:a,autoFocus:ve===0},ve))})}),U&&M.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3 mt-3",children:M.jsx("p",{className:"text-xs text-destructive",children:U})}),a&&M.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground mt-3",children:[M.jsx(ei,{className:"h-4 w-4 animate-spin"}),"Verifying..."]}),w&&M.jsxs("div",{className:"pt-2 border-t border-border/50",children:[M.jsx("p",{className:"text-xs text-muted-foreground text-center mb-3",children:"or"}),M.jsx(Ie,{className:"w-full",disabled:m,onClick:wt,children:m?M.jsxs(M.Fragment,{children:[M.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Waiting..."]}):M.jsxs(M.Fragment,{children:[M.jsx(Nd,{className:"h-4 w-4 mr-2"}),"Use Passkey"]})}),G&&M.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3 mt-3",children:M.jsx("p",{className:"text-xs text-destructive",children:G})})]})]})})]})}):b==="passkey-verify"?M.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:M.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[M.jsx("div",{className:"flex flex-col items-center mb-4",children:M.jsx(mn,{})}),M.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:M.jsxs("div",{className:"space-y-3",children:[M.jsx("p",{className:"text-sm font-medium",children:"Verify with Passkey"}),M.jsx("p",{className:"text-xs text-muted-foreground",children:"Use your fingerprint, face, or security key to continue"}),M.jsx(Ie,{className:"w-full",disabled:m,onClick:wt,children:m?M.jsxs(M.Fragment,{children:[M.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Waiting..."]}):M.jsxs(M.Fragment,{children:[M.jsx(Nd,{className:"h-4 w-4 mr-2"}),"Continue with Passkey"]})}),G&&M.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3",children:M.jsx("p",{className:"text-xs text-destructive",children:G})}),w&&M.jsxs("div",{className:"pt-2 border-t border-border/50",children:[M.jsx("p",{className:"text-xs text-muted-foreground text-center mb-3",children:"or"}),M.jsx(Ie,{className:"w-full",onClick:()=>B("totp-verify"),children:"Use Authenticator App"})]})]})})]})}):M.jsxs("div",{className:"flex flex-col h-screen w-full bg-background text-foreground",children:[Ct&&M.jsx("div",{className:"px-4 py-2 bg-amber-400/40 border-b border-amber-600/50 text-sm text-black dark:text-black text-center animate-pulse",children:"⚠️ Authentication is disabled"}),M.jsx(_0,{position:"bottom-right"}),M.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[M.jsx(Ep,{sessions:Y,activeSessionId:Q,onSelectSession:ae,onNewSession:qi,onCloseSession:Ns,onRenameSession:Va,onCloseAllSessions:zs,loading:T,collapsed:P,onToggleCollapse:()=>{J(!P),P&&E(192)},width:ie,onWidthChange:E,inputLocks:oe,clientId:Z.current,onTakeControl:De,dataReceivedSessions:se}),M.jsxs("div",{className:"flex-1 flex flex-col",children:[M.jsxs("div",{className:"border-b border-border bg-card px-4 py-2 flex items-center justify-between",children:[M.jsx(mn,{size:"sm"}),M.jsxs("div",{className:"flex items-center gap-2",children:[b==="authenticated"&&Q&&M.jsxs("div",{className:"relative",ref:Ui,children:[M.jsx(Ie,{variant:"ghost",size:"sm",onClick:Pa,disabled:mi,className:"[&_svg]:size-4",title:"Session info",children:M.jsx(cg,{className:"h-4 w-4"})}),nt&&Et&&M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>Ee(!1)}),M.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 bg-card border border-border rounded-lg shadow-lg w-80",onClick:de=>de.stopPropagation(),children:M.jsxs("div",{className:"p-3 space-y-2",children:[M.jsxs("div",{className:"flex justify-between items-center pb-2 border-b border-border/50",children:[M.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"PID"}),M.jsx("span",{className:"text-xs font-mono font-bold",children:Et.pid})]}),M.jsxs("div",{className:"flex justify-between items-center",children:[M.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"Memory"}),M.jsx("span",{className:"text-xs font-mono font-bold",children:Et.memory})]}),M.jsxs("div",{className:"flex justify-between items-center",children:[M.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"CPU"}),M.jsxs("span",{className:"text-xs font-mono font-bold",children:[Et.cpu.toFixed(1),"%"]})]}),M.jsxs("div",{className:"flex justify-between items-center",children:[M.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"Uptime"}),M.jsx("span",{className:"text-xs font-mono font-bold",children:Et.uptime})]}),M.jsxs("div",{className:"flex justify-between items-center pt-2 border-t border-border/50",children:[M.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"Started"}),M.jsx("span",{className:"text-xs font-mono font-bold text-right",children:new Date(Et.startedAt).toLocaleString()})]})]})})]})]}),!z&&M.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>Pe(!0),className:"[&_svg]:size-4",title:"Settings",children:M.jsx(yg,{className:"h-4 w-4"})}),M.jsx(m0,{open:Oe,onOpenChange:Pe}),!z&&M.jsxs(Ie,{variant:"ghost",size:"sm",onClick:Ga,className:"[&_svg]:size-4",children:[M.jsx(fg,{className:"mr-2"}),"Logout"]})]})]}),M.jsx("div",{className:"flex-1 relative overflow-hidden",children:Y.map(de=>M.jsx(b0,{sessionId:de.id,isActive:Q===de.id,clientId:Z.current,lockHeldBy:oe[de.id]??null,scrollbackLines:L,onReadOnlyInput:ve=>{const ye=ve?`Terminal locked by another browser with Session ID: ${ve.split("-").pop()}`:"Terminal locked by another browser";me(ye)}},de.id))})]})]})]})}Xv.createRoot(document.getElementById("root")).render(M.jsx(ne.StrictMode,{children:M.jsx(C0,{})}));
|