@staff0rd/assist 0.203.0 → 0.205.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,47 +1,241 @@
1
- "use strict";(()=>{var k1=Object.create;var pf=Object.defineProperty;var O1=Object.getOwnPropertyDescriptor;var z1=Object.getOwnPropertyNames;var L1=Object.getPrototypeOf,N1=Object.prototype.hasOwnProperty;var $t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var H1=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of z1(t))!N1.call(e,r)&&r!==i&&pf(e,r,{get:()=>t[r],enumerable:!(s=O1(t,r))||s.enumerable});return e};var A=(e,t,i)=>(i=e!=null?k1(L1(e)):{},H1(t||!e||!e.__esModule?pf(i,"default",{value:e,enumerable:!0}):i,e));var Rf=$t(K=>{"use strict";var vh=Symbol.for("react.transitional.element"),U1=Symbol.for("react.portal"),q1=Symbol.for("react.fragment"),K1=Symbol.for("react.strict_mode"),Y1=Symbol.for("react.profiler"),W1=Symbol.for("react.consumer"),P1=Symbol.for("react.context"),V1=Symbol.for("react.forward_ref"),F1=Symbol.for("react.suspense"),X1=Symbol.for("react.memo"),bf=Symbol.for("react.lazy"),G1=Symbol.for("react.activity"),vf=Symbol.iterator;function j1(e){return e===null||typeof e!="object"?null:(e=vf&&e[vf]||e["@@iterator"],typeof e=="function"?e:null)}var Cf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wf=Object.assign,Ef={};function or(e,t,i){this.props=e,this.context=t,this.refs=Ef,this.updater=i||Cf}or.prototype.isReactComponent={};or.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};or.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xf(){}xf.prototype=or.prototype;function mh(e,t,i){this.props=e,this.context=t,this.refs=Ef,this.updater=i||Cf}var Sh=mh.prototype=new xf;Sh.constructor=mh;wf(Sh,or.prototype);Sh.isPureReactComponent=!0;var mf=Array.isArray;function ph(){}var ae={H:null,A:null,T:null,S:null},Df=Object.prototype.hasOwnProperty;function yh(e,t,i){var s=i.ref;return{$$typeof:vh,type:e,key:t,ref:s!==void 0?s:null,props:i}}function I1(e,t){return yh(e.type,t,e.props)}function bh(e){return typeof e=="object"&&e!==null&&e.$$typeof===vh}function Z1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return t[i]})}var Sf=/\/+/g;function gh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Z1(""+e.key):t.toString(36)}function Q1(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(ph,ph):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ar(e,t,i,s,r){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(n){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case vh:case U1:l=!0;break;case bf:return l=e._init,ar(l(e._payload),t,i,s,r)}}if(l)return r=r(e),l=s===""?"."+gh(e,0):s,mf(r)?(i="",l!=null&&(i=l.replace(Sf,"$&/")+"/"),ar(r,t,i,"",function(h){return h})):r!=null&&(bh(r)&&(r=I1(r,i+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Sf,"$&/")+"/")+l)),t.push(r)),1;l=0;var a=s===""?".":s+":";if(mf(e))for(var o=0;o<e.length;o++)s=e[o],n=a+gh(s,o),l+=ar(s,t,i,n,r);else if(o=j1(e),typeof o=="function")for(e=o.call(e),o=0;!(s=e.next()).done;)s=s.value,n=a+gh(s,o++),l+=ar(s,t,i,n,r);else if(n==="object"){if(typeof e.then=="function")return ar(Q1(e),t,i,s,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Zl(e,t,i){if(e==null)return e;var s=[],r=0;return ar(e,s,"","",function(n){return t.call(i,n,r++)}),s}function $1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(i){(e._status===0||e._status===-1)&&(e._status=1,e._result=i)},function(i){(e._status===0||e._status===-1)&&(e._status=2,e._result=i)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var yf=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)},J1={map:Zl,forEach:function(e,t,i){Zl(e,function(){t.apply(this,arguments)},i)},count:function(e){var t=0;return Zl(e,function(){t++}),t},toArray:function(e){return Zl(e,function(t){return t})||[]},only:function(e){if(!bh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};K.Activity=G1;K.Children=J1;K.Component=or;K.Fragment=q1;K.Profiler=Y1;K.PureComponent=mh;K.StrictMode=K1;K.Suspense=F1;K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ae;K.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ae.H.useMemoCache(e)}};K.cache=function(e){return function(){return e.apply(null,arguments)}};K.cacheSignal=function(){return null};K.cloneElement=function(e,t,i){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=wf({},e.props),r=e.key;if(t!=null)for(n in t.key!==void 0&&(r=""+t.key),t)!Df.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=i;else if(1<n){for(var l=Array(n),a=0;a<n;a++)l[a]=arguments[a+2];s.children=l}return yh(e.type,r,s)};K.createContext=function(e){return e={$$typeof:P1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:W1,_context:e},e};K.createElement=function(e,t,i){var s,r={},n=null;if(t!=null)for(s in t.key!==void 0&&(n=""+t.key),t)Df.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var l=arguments.length-2;if(l===1)r.children=i;else if(1<l){for(var a=Array(l),o=0;o<l;o++)a[o]=arguments[o+2];r.children=a}if(e&&e.defaultProps)for(s in l=e.defaultProps,l)r[s]===void 0&&(r[s]=l[s]);return yh(e,n,r)};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:V1,render:e}};K.isValidElement=bh;K.lazy=function(e){return{$$typeof:bf,_payload:{_status:-1,_result:e},_init:$1}};K.memo=function(e,t){return{$$typeof:X1,type:e,compare:t===void 0?null:t}};K.startTransition=function(e){var t=ae.T,i={};ae.T=i;try{var s=e(),r=ae.S;r!==null&&r(i,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(ph,yf)}catch(n){yf(n)}finally{t!==null&&i.types!==null&&(t.types=i.types),ae.T=t}};K.unstable_useCacheRefresh=function(){return ae.H.useCacheRefresh()};K.use=function(e){return ae.H.use(e)};K.useActionState=function(e,t,i){return ae.H.useActionState(e,t,i)};K.useCallback=function(e,t){return ae.H.useCallback(e,t)};K.useContext=function(e){return ae.H.useContext(e)};K.useDebugValue=function(){};K.useDeferredValue=function(e,t){return ae.H.useDeferredValue(e,t)};K.useEffect=function(e,t){return ae.H.useEffect(e,t)};K.useEffectEvent=function(e){return ae.H.useEffectEvent(e)};K.useId=function(){return ae.H.useId()};K.useImperativeHandle=function(e,t,i){return ae.H.useImperativeHandle(e,t,i)};K.useInsertionEffect=function(e,t){return ae.H.useInsertionEffect(e,t)};K.useLayoutEffect=function(e,t){return ae.H.useLayoutEffect(e,t)};K.useMemo=function(e,t){return ae.H.useMemo(e,t)};K.useOptimistic=function(e,t){return ae.H.useOptimistic(e,t)};K.useReducer=function(e,t,i){return ae.H.useReducer(e,t,i)};K.useRef=function(e){return ae.H.useRef(e)};K.useState=function(e){return ae.H.useState(e)};K.useSyncExternalStore=function(e,t,i){return ae.H.useSyncExternalStore(e,t,i)};K.useTransition=function(){return ae.H.useTransition()};K.version="19.2.4"});var Xe=$t((Wx,Mf)=>{"use strict";Mf.exports=Rf()});var Uf=$t(fe=>{"use strict";function xh(e,t){var i=e.length;e.push(t);e:for(;0<i;){var s=i-1>>>1,r=e[s];if(0<Ql(r,t))e[s]=t,e[i]=r,i=s;else break e}}function Jt(e){return e.length===0?null:e[0]}function Jl(e){if(e.length===0)return null;var t=e[0],i=e.pop();if(i!==t){e[0]=i;e:for(var s=0,r=e.length,n=r>>>1;s<n;){var l=2*(s+1)-1,a=e[l],o=l+1,h=e[o];if(0>Ql(a,i))o<r&&0>Ql(h,a)?(e[s]=h,e[o]=i,s=o):(e[s]=a,e[l]=i,s=l);else if(o<r&&0>Ql(h,i))e[s]=h,e[o]=i,s=o;else break e}}return t}function Ql(e,t){var i=e.sortIndex-t.sortIndex;return i!==0?i:e.id-t.id}fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Tf=performance,fe.unstable_now=function(){return Tf.now()}):(Ch=Date,Af=Ch.now(),fe.unstable_now=function(){return Ch.now()-Af});var Tf,Ch,Af,di=[],Vi=[],ey=1,Bt=null,Je=3,Dh=!1,mn=!1,Sn=!1,Rh=!1,Of=typeof setTimeout=="function"?setTimeout:null,zf=typeof clearTimeout=="function"?clearTimeout:null,Bf=typeof setImmediate<"u"?setImmediate:null;function $l(e){for(var t=Jt(Vi);t!==null;){if(t.callback===null)Jl(Vi);else if(t.startTime<=e)Jl(Vi),t.sortIndex=t.expirationTime,xh(di,t);else break;t=Jt(Vi)}}function Mh(e){if(Sn=!1,$l(e),!mn)if(Jt(di)!==null)mn=!0,cr||(cr=!0,hr());else{var t=Jt(Vi);t!==null&&Th(Mh,t.startTime-e)}}var cr=!1,yn=-1,Lf=5,Nf=-1;function Hf(){return Rh?!0:!(fe.unstable_now()-Nf<Lf)}function wh(){if(Rh=!1,cr){var e=fe.unstable_now();Nf=e;var t=!0;try{e:{mn=!1,Sn&&(Sn=!1,zf(yn),yn=-1),Dh=!0;var i=Je;try{t:{for($l(e),Bt=Jt(di);Bt!==null&&!(Bt.expirationTime>e&&Hf());){var s=Bt.callback;if(typeof s=="function"){Bt.callback=null,Je=Bt.priorityLevel;var r=s(Bt.expirationTime<=e);if(e=fe.unstable_now(),typeof r=="function"){Bt.callback=r,$l(e),t=!0;break t}Bt===Jt(di)&&Jl(di),$l(e)}else Jl(di);Bt=Jt(di)}if(Bt!==null)t=!0;else{var n=Jt(Vi);n!==null&&Th(Mh,n.startTime-e),t=!1}}break e}finally{Bt=null,Je=i,Dh=!1}t=void 0}}finally{t?hr():cr=!1}}}var hr;typeof Bf=="function"?hr=function(){Bf(wh)}:typeof MessageChannel<"u"?(Eh=new MessageChannel,kf=Eh.port2,Eh.port1.onmessage=wh,hr=function(){kf.postMessage(null)}):hr=function(){Of(wh,0)};var Eh,kf;function Th(e,t){yn=Of(function(){e(fe.unstable_now())},t)}fe.unstable_IdlePriority=5;fe.unstable_ImmediatePriority=1;fe.unstable_LowPriority=4;fe.unstable_NormalPriority=3;fe.unstable_Profiling=null;fe.unstable_UserBlockingPriority=2;fe.unstable_cancelCallback=function(e){e.callback=null};fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Lf=0<e?Math.floor(1e3/e):5};fe.unstable_getCurrentPriorityLevel=function(){return Je};fe.unstable_next=function(e){switch(Je){case 1:case 2:case 3:var t=3;break;default:t=Je}var i=Je;Je=t;try{return e()}finally{Je=i}};fe.unstable_requestPaint=function(){Rh=!0};fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=Je;Je=e;try{return t()}finally{Je=i}};fe.unstable_scheduleCallback=function(e,t,i){var s=fe.unstable_now();switch(typeof i=="object"&&i!==null?(i=i.delay,i=typeof i=="number"&&0<i?s+i:s):i=s,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=i+r,e={id:ey++,callback:t,priorityLevel:e,startTime:i,expirationTime:r,sortIndex:-1},i>s?(e.sortIndex=i,xh(Vi,e),Jt(di)===null&&e===Jt(Vi)&&(Sn?(zf(yn),yn=-1):Sn=!0,Th(Mh,i-s))):(e.sortIndex=r,xh(di,e),mn||Dh||(mn=!0,cr||(cr=!0,hr()))),e};fe.unstable_shouldYield=Hf;fe.unstable_wrapCallback=function(e){var t=Je;return function(){var i=Je;Je=t;try{return e.apply(this,arguments)}finally{Je=i}}}});var Kf=$t((Vx,qf)=>{"use strict";qf.exports=Uf()});var Wf=$t(st=>{"use strict";var ty=Xe();function Yf(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 Fi(){}var it={d:{f:Fi,r:function(){throw Error(Yf(522))},D:Fi,C:Fi,L:Fi,m:Fi,X:Fi,S:Fi,M:Fi},p:0,findDOMNode:null},iy=Symbol.for("react.portal");function sy(e,t,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:iy,key:s==null?null:""+s,children:e,containerInfo:t,implementation:i}}var bn=ty.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ea(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}st.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=it;st.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Yf(299));return sy(e,t,null,i)};st.flushSync=function(e){var t=bn.T,i=it.p;try{if(bn.T=null,it.p=2,e)return e()}finally{bn.T=t,it.p=i,it.d.f()}};st.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,it.d.C(e,t))};st.prefetchDNS=function(e){typeof e=="string"&&it.d.D(e)};st.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var i=t.as,s=ea(i,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;i==="style"?it.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:n}):i==="script"&&it.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};st.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var i=ea(t.as,t.crossOrigin);it.d.M(e,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&it.d.M(e)};st.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var i=t.as,s=ea(i,t.crossOrigin);it.d.L(e,i,{crossOrigin:s,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};st.preloadModule=function(e,t){if(typeof e=="string")if(t){var i=ea(t.as,t.crossOrigin);it.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else it.d.m(e)};st.requestFormReset=function(e){it.d.r(e)};st.unstable_batchedUpdates=function(e,t){return e(t)};st.useFormState=function(e,t,i){return bn.H.useFormState(e,t,i)};st.useFormStatus=function(){return bn.H.useHostTransitionStatus()};st.version="19.2.4"});var Ff=$t((Xx,Vf)=>{"use strict";function Pf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Pf)}catch(e){console.error(e)}}Pf(),Vf.exports=Wf()});var sm=$t(Do=>{"use strict";var ke=Kf(),vg=Xe(),ry=Ff();function y(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 mg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function al(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 Sg(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 yg(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 Xf(e){if(al(e)!==e)throw Error(y(188))}function ny(e){var t=e.alternate;if(!t){if(t=al(e),t===null)throw Error(y(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 Xf(r),e;if(n===s)return Xf(r),t;n=n.sibling}throw Error(y(188))}if(i.return!==s.return)i=r,s=n;else{for(var l=!1,a=r.child;a;){if(a===i){l=!0,i=r,s=n;break}if(a===s){l=!0,s=r,i=n;break}a=a.sibling}if(!l){for(a=n.child;a;){if(a===i){l=!0,i=n,s=r;break}if(a===s){l=!0,s=n,i=r;break}a=a.sibling}if(!l)throw Error(y(189))}}if(i.alternate!==s)throw Error(y(190))}if(i.tag!==3)throw Error(y(188));return i.stateNode.current===i?e:t}function bg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=bg(e),t!==null)return t;e=e.sibling}return null}var ce=Object.assign,ly=Symbol.for("react.element"),ta=Symbol.for("react.transitional.element"),Tn=Symbol.for("react.portal"),pr=Symbol.for("react.fragment"),Cg=Symbol.for("react.strict_mode"),hc=Symbol.for("react.profiler"),wg=Symbol.for("react.consumer"),yi=Symbol.for("react.context"),ru=Symbol.for("react.forward_ref"),cc=Symbol.for("react.suspense"),uc=Symbol.for("react.suspense_list"),nu=Symbol.for("react.memo"),Xi=Symbol.for("react.lazy"),dc=Symbol.for("react.activity"),ay=Symbol.for("react.memo_cache_sentinel"),Gf=Symbol.iterator;function Cn(e){return e===null||typeof e!="object"?null:(e=Gf&&e[Gf]||e["@@iterator"],typeof e=="function"?e:null)}var oy=Symbol.for("react.client.reference");function fc(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oy?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pr:return"Fragment";case hc:return"Profiler";case Cg:return"StrictMode";case cc:return"Suspense";case uc:return"SuspenseList";case dc:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Tn:return"Portal";case yi:return e.displayName||"Context";case wg:return(e._context.displayName||"Context")+".Consumer";case ru:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nu:return t=e.displayName||null,t!==null?t:fc(e.type)||"Memo";case Xi:t=e._payload,e=e._init;try{return fc(e(t))}catch{}}return null}var An=Array.isArray,H=vg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=ry.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Os={pending:!1,data:null,method:null,action:null},_c=[],vr=-1;function ri(e){return{current:e}}function qe(e){0>vr||(e.current=_c[vr],_c[vr]=null,vr--)}function le(e,t){vr++,_c[vr]=e.current,e.current=t}var si=ri(null),Gn=ri(null),ss=ri(null),za=ri(null);function La(e,t){switch(le(ss,t),le(Gn,e),le(si,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?eg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=eg(t),e=Pv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}qe(si),le(si,e)}function Lr(){qe(si),qe(Gn),qe(ss)}function gc(e){e.memoizedState!==null&&le(za,e);var t=si.current,i=Pv(t,e.type);t!==i&&(le(Gn,e),le(si,i))}function Na(e){Gn.current===e&&(qe(si),qe(Gn)),za.current===e&&(qe(za),rl._currentValue=Os)}var Ah,jf;function Ts(e){if(Ah===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Ah=t&&t[1]||"",jf=-1<i.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ah+e+jf}var Bh=!1;function kh(e,t){if(!e||Bh)return"";Bh=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(f){var d=f}Reflect.construct(e,[],c)}else{try{c.call()}catch(f){d=f}e.call(c.prototype)}}else{try{throw Error()}catch(f){d=f}(c=e())&&typeof c.catch=="function"&&c.catch(function(){})}}catch(f){if(f&&d&&typeof f.stack=="string")return[f.stack,d.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(),l=n[0],a=n[1];if(l&&a){var o=l.split(`
4
- `),h=a.split(`
5
- `);for(r=s=0;s<o.length&&!o[s].includes("DetermineComponentFrameRoot");)s++;for(;r<h.length&&!h[r].includes("DetermineComponentFrameRoot");)r++;if(s===o.length||r===h.length)for(s=o.length-1,r=h.length-1;1<=s&&0<=r&&o[s]!==h[r];)r--;for(;1<=s&&0<=r;s--,r--)if(o[s]!==h[r]){if(s!==1||r!==1)do if(s--,r--,0>r||o[s]!==h[r]){var u=`
6
- `+o[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=r);break}}}finally{Bh=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ts(i):""}function hy(e,t){switch(e.tag){case 26:case 27:case 5:return Ts(e.type);case 16:return Ts("Lazy");case 13:return e.child!==t&&t!==null?Ts("Suspense Fallback"):Ts("Suspense");case 19:return Ts("SuspenseList");case 0:case 15:return kh(e.type,!1);case 11:return kh(e.type.render,!1);case 1:return kh(e.type,!0);case 31:return Ts("Activity");default:return""}}function If(e){try{var t="",i=null;do t+=hy(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
7
- Error generating stack: `+s.message+`
8
- `+s.stack}}var pc=Object.prototype.hasOwnProperty,lu=ke.unstable_scheduleCallback,Oh=ke.unstable_cancelCallback,cy=ke.unstable_shouldYield,uy=ke.unstable_requestPaint,bt=ke.unstable_now,dy=ke.unstable_getCurrentPriorityLevel,Eg=ke.unstable_ImmediatePriority,xg=ke.unstable_UserBlockingPriority,Ha=ke.unstable_NormalPriority,fy=ke.unstable_LowPriority,Dg=ke.unstable_IdlePriority,_y=ke.log,gy=ke.unstable_setDisableYieldValue,ol=null,Ct=null;function $i(e){if(typeof _y=="function"&&gy(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(ol,e)}catch{}}var wt=Math.clz32?Math.clz32:my,py=Math.log,vy=Math.LN2;function my(e){return e>>>=0,e===0?32:31-(py(e)/vy|0)|0}var ia=256,sa=262144,ra=4194304;function As(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 ho(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var a=s&134217727;return a!==0?(s=a&~n,s!==0?r=As(s):(l&=a,l!==0?r=As(l):i||(i=a&~e,i!==0&&(r=As(i))))):(a=s&~n,a!==0?r=As(a):l!==0?r=As(l):i||(i=s&~e,i!==0&&(r=As(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 hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Sy(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 Rg(){var e=ra;return ra<<=1,(ra&62914560)===0&&(ra=4194304),e}function zh(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function cl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yy(e,t,i,s,r,n){var l=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var a=e.entanglements,o=e.expirationTimes,h=e.hiddenUpdates;for(i=l&~i;0<i;){var u=31-wt(i),c=1<<u;a[u]=0,o[u]=-1;var d=h[u];if(d!==null)for(h[u]=null,u=0;u<d.length;u++){var f=d[u];f!==null&&(f.lane&=-536870913)}i&=~c}s!==0&&Mg(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(l&~t))}function Mg(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 Tg(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 Ag(e,t){var i=t&-t;return i=(i&42)!==0?1:au(i),(i&(e.suspendedLanes|t))!==0?0:i}function au(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 ou(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Bg(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:em(e.type))}function Zf(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var ps=Math.random().toString(36).slice(2),je="__reactFiber$"+ps,ft="__reactProps$"+ps,Xr="__reactContainer$"+ps,vc="__reactEvents$"+ps,by="__reactListeners$"+ps,Cy="__reactHandles$"+ps,Qf="__reactResources$"+ps,ul="__reactMarker$"+ps;function hu(e){delete e[je],delete e[ft],delete e[vc],delete e[by],delete e[Cy]}function mr(e){var t=e[je];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Xr]||i[je]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=ng(e);e!==null;){if(i=e[je])return i;e=ng(e)}return t}e=i,i=e.parentNode}return null}function Gr(e){if(e=e[je]||e[Xr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(y(33))}function Mr(e){var t=e[Qf];return t||(t=e[Qf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ue(e){e[ul]=!0}var kg=new Set,Og={};function Ps(e,t){Nr(e,t),Nr(e+"Capture",t)}function Nr(e,t){for(Og[e]=t,e=0;e<t.length;e++)kg.add(t[e])}var wy=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]*$"),$f={},Jf={};function Ey(e){return pc.call(Jf,e)?!0:pc.call($f,e)?!1:wy.test(e)?Jf[e]=!0:($f[e]=!0,!1)}function Sa(e,t,i){if(Ey(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 na(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 fi(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 Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xy(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(l){i=""+l,n.call(this,l)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(l){i=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mc(e){if(!e._valueTracker){var t=zg(e)?"checked":"value";e._valueTracker=xy(e,t,""+e[t])}}function Lg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=zg(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Ua(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 Dy=/[\n"\\]/g;function Nt(e){return e.replace(Dy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sc(e,t,i,s,r,n,l,a){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?yc(e,l,Ot(t)):i!=null?yc(e,l,Ot(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.name=""+Ot(a):e.removeAttribute("name")}function Ng(e,t,i,s,r,n,l,a){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)){mc(e);return}i=i!=null?""+Ot(i):"",t=t!=null?""+Ot(t):i,a||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=a?e.checked:!!s,e.defaultChecked=!!s,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),mc(e)}function yc(e,t,i){t==="number"&&Ua(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Tr(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=""+Ot(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 Hg(e,t,i){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ot(i):""}function Ug(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(y(92));if(An(s)){if(1<s.length)throw Error(y(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ot(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),mc(e)}function Hr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ry=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 e_(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||Ry.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function qg(e,t,i){if(t!=null&&typeof t!="object")throw Error(y(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&&e_(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&e_(e,n,t[n])}function cu(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 My=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"]]),Ty=/^[\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 ya(e){return Ty.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function bi(){}var bc=null;function uu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sr=null,Ar=null;function t_(e){var t=Gr(e);if(t&&(e=t.stateNode)){var i=e[ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(Sc(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="'+Nt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[ft]||null;if(!r)throw Error(y(90));Sc(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&&Lg(s)}break e;case"textarea":Hg(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Tr(e,!!i.multiple,t,!1)}}}var Lh=!1;function Kg(e,t,i){if(Lh)return e(t,i);Lh=!0;try{var s=e(t);return s}finally{if(Lh=!1,(Sr!==null||Ar!==null)&&(Co(),Sr&&(t=Sr,e=Ar,Ar=Sr=null,t_(t),e)))for(t=0;t<e.length;t++)t_(e[t])}}function jn(e,t){var i=e.stateNode;if(i===null)return null;var s=i[ft]||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(y(231,t,typeof i));return i}var Di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cc=!1;if(Di)try{ur={},Object.defineProperty(ur,"passive",{get:function(){Cc=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Cc=!1}var ur,Ji=null,du=null,ba=null;function Yg(){if(ba)return ba;var e,t=du,i=t.length,s,r="value"in Ji?Ji.value:Ji.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var l=i-e;for(s=1;s<=l&&t[i-s]===r[n-s];s++);return ba=r.slice(e,1<s?1-s:void 0)}function Ca(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 la(){return!0}function i_(){return!1}function _t(e){function t(i,s,r,n,l){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=l,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(i=e[a],this[a]=i?i(n):n[a]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?la:i_,this.isPropagationStopped=i_,this}return ce(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=la)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),t}var Vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=_t(Vs),dl=ce({},Vs,{view:0,detail:0}),Ay=_t(dl),Nh,Hh,wn,uo=ce({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==wn&&(wn&&e.type==="mousemove"?(Nh=e.screenX-wn.screenX,Hh=e.screenY-wn.screenY):Hh=Nh=0,wn=e),Nh)},movementY:function(e){return"movementY"in e?e.movementY:Hh}}),s_=_t(uo),By=ce({},uo,{dataTransfer:0}),ky=_t(By),Oy=ce({},dl,{relatedTarget:0}),Uh=_t(Oy),zy=ce({},Vs,{animationName:0,elapsedTime:0,pseudoElement:0}),Ly=_t(zy),Ny=ce({},Vs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hy=_t(Ny),Uy=ce({},Vs,{data:0}),r_=_t(Uy),qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ky={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"},Yy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yy[e])?!!t[e]:!1}function fu(){return Wy}var Py=ce({},dl,{key:function(e){if(e.key){var t=qy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ca(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ky[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(e){return e.type==="keypress"?Ca(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ca(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vy=_t(Py),Fy=ce({},uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),n_=_t(Fy),Xy=ce({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),Gy=_t(Xy),jy=ce({},Vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Iy=_t(jy),Zy=ce({},uo,{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}),Qy=_t(Zy),$y=ce({},Vs,{newState:0,oldState:0}),Jy=_t($y),eb=[9,13,27,32],_u=Di&&"CompositionEvent"in window,zn=null;Di&&"documentMode"in document&&(zn=document.documentMode);var tb=Di&&"TextEvent"in window&&!zn,Wg=Di&&(!_u||zn&&8<zn&&11>=zn),l_=" ",a_=!1;function Pg(e,t){switch(e){case"keyup":return eb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yr=!1;function ib(e,t){switch(e){case"compositionend":return Vg(t);case"keypress":return t.which!==32?null:(a_=!0,l_);case"textInput":return e=t.data,e===l_&&a_?null:e;default:return null}}function sb(e,t){if(yr)return e==="compositionend"||!_u&&Pg(e,t)?(e=Yg(),ba=du=Ji=null,yr=!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 Wg&&t.locale!=="ko"?null:t.data;default:return null}}var rb={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 o_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rb[e.type]:t==="textarea"}function Fg(e,t,i,s){Sr?Ar?Ar.push(s):Ar=[s]:Sr=s,t=io(t,"onChange"),0<t.length&&(i=new co("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Ln=null,In=null;function nb(e){Kv(e,0)}function fo(e){var t=Bn(e);if(Lg(t))return e}function h_(e,t){if(e==="change")return t}var Xg=!1;Di&&(Di?(oa="oninput"in document,oa||(qh=document.createElement("div"),qh.setAttribute("oninput","return;"),oa=typeof qh.oninput=="function"),aa=oa):aa=!1,Xg=aa&&(!document.documentMode||9<document.documentMode));var aa,oa,qh;function c_(){Ln&&(Ln.detachEvent("onpropertychange",Gg),In=Ln=null)}function Gg(e){if(e.propertyName==="value"&&fo(In)){var t=[];Fg(t,In,e,uu(e)),Kg(nb,t)}}function lb(e,t,i){e==="focusin"?(c_(),Ln=t,In=i,Ln.attachEvent("onpropertychange",Gg)):e==="focusout"&&c_()}function ab(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fo(In)}function ob(e,t){if(e==="click")return fo(t)}function hb(e,t){if(e==="input"||e==="change")return fo(t)}function cb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:cb;function Zn(e,t){if(xt(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(!pc.call(t,r)||!xt(e[r],t[r]))return!1}return!0}function u_(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function d_(e,t){var i=u_(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=u_(i)}}function jg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ig(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ua(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=Ua(e.document)}return t}function gu(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 ub=Di&&"documentMode"in document&&11>=document.documentMode,br=null,wc=null,Nn=null,Ec=!1;function f_(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ec||br==null||br!==Ua(s)||(s=br,"selectionStart"in s&&gu(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}),Nn&&Zn(Nn,s)||(Nn=s,s=io(wc,"onSelect"),0<s.length&&(t=new co("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=br)))}function Ms(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Cr={animationend:Ms("Animation","AnimationEnd"),animationiteration:Ms("Animation","AnimationIteration"),animationstart:Ms("Animation","AnimationStart"),transitionrun:Ms("Transition","TransitionRun"),transitionstart:Ms("Transition","TransitionStart"),transitioncancel:Ms("Transition","TransitionCancel"),transitionend:Ms("Transition","TransitionEnd")},Kh={},Zg={};Di&&(Zg=document.createElement("div").style,"AnimationEvent"in window||(delete Cr.animationend.animation,delete Cr.animationiteration.animation,delete Cr.animationstart.animation),"TransitionEvent"in window||delete Cr.transitionend.transition);function Fs(e){if(Kh[e])return Kh[e];if(!Cr[e])return e;var t=Cr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Zg)return Kh[e]=t[i];return e}var Qg=Fs("animationend"),$g=Fs("animationiteration"),Jg=Fs("animationstart"),db=Fs("transitionrun"),fb=Fs("transitionstart"),_b=Fs("transitioncancel"),ep=Fs("transitionend"),tp=new Map,xc="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(" ");xc.push("scrollEnd");function It(e,t){tp.set(e,t),Ps(t,[e])}var qa=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)},kt=[],wr=0,pu=0;function _o(){for(var e=wr,t=pu=wr=0;t<e;){var i=kt[t];kt[t++]=null;var s=kt[t];kt[t++]=null;var r=kt[t];kt[t++]=null;var n=kt[t];if(kt[t++]=null,s!==null&&r!==null){var l=s.pending;l===null?r.next=r:(r.next=l.next,l.next=r),s.pending=r}n!==0&&ip(i,r,n)}}function go(e,t,i,s){kt[wr++]=e,kt[wr++]=t,kt[wr++]=i,kt[wr++]=s,pu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function vu(e,t,i,s){return go(e,t,i,s),Ka(e)}function Xs(e,t){return go(e,null,null,t),Ka(e)}function ip(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 Ka(e){if(50<Fn)throw Fn=0,Xc=null,Error(y(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Er={};function gb(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 St(e,t,i,s){return new gb(e,t,i,s)}function mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wi(e,t){var i=e.alternate;return i===null?(i=St(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 sp(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 wa(e,t,i,s,r,n){var l=0;if(s=e,typeof e=="function")mu(e)&&(l=1);else if(typeof e=="string")l=mC(e,i,si.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case dc:return e=St(31,i,t,r),e.elementType=dc,e.lanes=n,e;case pr:return zs(i.children,r,n,t);case Cg:l=8,r|=24;break;case hc:return e=St(12,i,t,r|2),e.elementType=hc,e.lanes=n,e;case cc:return e=St(13,i,t,r),e.elementType=cc,e.lanes=n,e;case uc:return e=St(19,i,t,r),e.elementType=uc,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yi:l=10;break e;case wg:l=9;break e;case ru:l=11;break e;case nu:l=14;break e;case Xi:l=16,s=null;break e}l=29,i=Error(y(130,e===null?"null":typeof e,"")),s=null}return t=St(l,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function zs(e,t,i,s){return e=St(7,e,s,t),e.lanes=i,e}function Yh(e,t,i){return e=St(6,e,null,t),e.lanes=i,e}function rp(e){var t=St(18,null,null,0);return t.stateNode=e,t}function Wh(e,t,i){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var __=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var i=__.get(e);return i!==void 0?i:(t={value:e,source:t,stack:If(t)},__.set(e,t),t)}return{value:e,source:t,stack:If(t)}}var xr=[],Dr=0,Ya=null,Qn=0,zt=[],Lt=0,ds=null,ei=1,ti="";function mi(e,t){xr[Dr++]=Qn,xr[Dr++]=Ya,Ya=e,Qn=t}function np(e,t,i){zt[Lt++]=ei,zt[Lt++]=ti,zt[Lt++]=ds,ds=e;var s=ei;e=ti;var r=32-wt(s)-1;s&=~(1<<r),i+=1;var n=32-wt(t)+r;if(30<n){var l=r-r%5;n=(s&(1<<l)-1).toString(32),s>>=l,r-=l,ei=1<<32-wt(t)+r|i<<r|s,ti=n+e}else ei=1<<n|i<<r|s,ti=e}function Su(e){e.return!==null&&(mi(e,1),np(e,1,0))}function yu(e){for(;e===Ya;)Ya=xr[--Dr],xr[Dr]=null,Qn=xr[--Dr],xr[Dr]=null;for(;e===ds;)ds=zt[--Lt],zt[Lt]=null,ti=zt[--Lt],zt[Lt]=null,ei=zt[--Lt],zt[Lt]=null}function lp(e,t){zt[Lt++]=ei,zt[Lt++]=ti,zt[Lt++]=ds,ei=t.id,ti=t.overflow,ds=e}var Ie=null,he=null,I=!1,rs=null,Ut=!1,Dc=Error(y(519));function fs(e){var t=Error(y(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $n(Ht(t,e)),Dc}function g_(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[je]=e,t[ft]=s,i){case"dialog":F("cancel",t),F("close",t);break;case"iframe":case"object":case"embed":F("load",t);break;case"video":case"audio":for(i=0;i<il.length;i++)F(il[i],t);break;case"source":F("error",t);break;case"img":case"image":case"link":F("error",t),F("load",t);break;case"details":F("toggle",t);break;case"input":F("invalid",t),Ng(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":F("invalid",t);break;case"textarea":F("invalid",t),Ug(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||Wv(t.textContent,i)?(s.popover!=null&&(F("beforetoggle",t),F("toggle",t)),s.onScroll!=null&&F("scroll",t),s.onScrollEnd!=null&&F("scrollend",t),s.onClick!=null&&(t.onclick=bi),t=!0):t=!1,t||fs(e,!0)}function p_(e){for(Ie=e.return;Ie;)switch(Ie.tag){case 5:case 31:case 13:Ut=!1;return;case 27:case 3:Ut=!0;return;default:Ie=Ie.return}}function dr(e){if(e!==Ie)return!1;if(!I)return p_(e),I=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Qc(e.type,e.memoizedProps)),i=!i),i&&he&&fs(e),p_(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(y(317));he=rg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(y(317));he=rg(e)}else t===27?(t=he,vs(e.type)?(e=tu,tu=null,he=e):he=t):he=Ie?Kt(e.stateNode.nextSibling):null;return!0}function Us(){he=Ie=null,I=!1}function Ph(){var e=rs;return e!==null&&(ut===null?ut=e:ut.push.apply(ut,e),rs=null),e}function $n(e){rs===null?rs=[e]:rs.push(e)}var Rc=ri(null),Gs=null,Ci=null;function ji(e,t,i){le(Rc,t._currentValue),t._currentValue=i}function Ei(e){e._currentValue=Rc.current,qe(Rc)}function Mc(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 Tc(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var l=r.child;n=n.firstContext;e:for(;n!==null;){var a=n;n=r;for(var o=0;o<t.length;o++)if(a.context===t[o]){n.lanes|=i,a=n.alternate,a!==null&&(a.lanes|=i),Mc(n.return,i,e),s||(l=null);break e}n=a.next}}else if(r.tag===18){if(l=r.return,l===null)throw Error(y(341));l.lanes|=i,n=l.alternate,n!==null&&(n.lanes|=i),Mc(l,i,e),l=null}else l=r.child;if(l!==null)l.return=r;else for(l=r;l!==null;){if(l===e){l=null;break}if(r=l.sibling,r!==null){r.return=l.return,l=r;break}l=l.return}r=l}}function jr(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 l=r.alternate;if(l===null)throw Error(y(387));if(l=l.memoizedProps,l!==null){var a=r.type;xt(r.pendingProps.value,l.value)||(e!==null?e.push(a):e=[a])}}else if(r===za.current){if(l=r.alternate,l===null)throw Error(y(387));l.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(rl):e=[rl])}r=r.return}e!==null&&Tc(t,e,i,s),t.flags|=262144}function Wa(e){for(e=e.firstContext;e!==null;){if(!xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qs(e){Gs=e,Ci=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ze(e){return ap(Gs,e)}function ha(e,t){return Gs===null&&qs(e),ap(e,t)}function ap(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ci===null){if(e===null)throw Error(y(308));Ci=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ci=Ci.next=t;return i}var pb=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()})}},vb=ke.unstable_scheduleCallback,mb=ke.unstable_NormalPriority,Re={$$typeof:yi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bu(){return{controller:new pb,data:new Map,refCount:0}}function fl(e){e.refCount--,e.refCount===0&&vb(mb,function(){e.controller.abort()})}var Hn=null,Ac=0,Ur=0,Br=null;function Sb(e,t){if(Hn===null){var i=Hn=[];Ac=0,Ur=Xu(),Br={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ac++,t.then(v_,v_),t}function v_(){if(--Ac===0&&Hn!==null){Br!==null&&(Br.status="fulfilled");var e=Hn;Hn=null,Ur=0,Br=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function yb(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 m_=H.S;H.S=function(e,t){bv=bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Sb(e,t),m_!==null&&m_(e,t)};var Ls=ri(null);function Cu(){var e=Ls.current;return e!==null?e:ne.pooledCache}function Ea(e,t){t===null?le(Ls,Ls.current):le(Ls,t.pool)}function op(){var e=Cu();return e===null?null:{parent:Re._currentValue,pool:e}}var Ir=Error(y(460)),wu=Error(y(474)),po=Error(y(542)),Pa={then:function(){}};function S_(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hp(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(bi,bi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,b_(e),e;default:if(typeof t.status=="string")t.then(bi,bi);else{if(e=ne,e!==null&&100<e.shellSuspendCounter)throw Error(y(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,b_(e),e}throw Ns=t,Ir}}function Bs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ns=i,Ir):i}}var Ns=null;function y_(){if(Ns===null)throw Error(y(459));var e=Ns;return Ns=null,e}function b_(e){if(e===Ir||e===po)throw Error(y(483))}var kr=null,Jn=0;function ca(e){var t=Jn;return Jn+=1,kr===null&&(kr=[]),hp(kr,e,t)}function En(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ua(e,t){throw t.$$typeof===ly?Error(y(525)):(e=Object.prototype.toString.call(t),Error(y(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function cp(e){function t(_,g){if(e){var v=_.deletions;v===null?(_.deletions=[g],_.flags|=16):v.push(g)}}function i(_,g){if(!e)return null;for(;g!==null;)t(_,g),g=g.sibling;return null}function s(_){for(var g=new Map;_!==null;)_.key!==null?g.set(_.key,_):g.set(_.index,_),_=_.sibling;return g}function r(_,g){return _=wi(_,g),_.index=0,_.sibling=null,_}function n(_,g,v){return _.index=v,e?(v=_.alternate,v!==null?(v=v.index,v<g?(_.flags|=67108866,g):v):(_.flags|=67108866,g)):(_.flags|=1048576,g)}function l(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function a(_,g,v,S){return g===null||g.tag!==6?(g=Yh(v,_.mode,S),g.return=_,g):(g=r(g,v),g.return=_,g)}function o(_,g,v,S){var w=v.type;return w===pr?u(_,g,v.props.children,S,v.key):g!==null&&(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Xi&&Bs(w)===g.type)?(g=r(g,v.props),En(g,v),g.return=_,g):(g=wa(v.type,v.key,v.props,null,_.mode,S),En(g,v),g.return=_,g)}function h(_,g,v,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Wh(v,_.mode,S),g.return=_,g):(g=r(g,v.children||[]),g.return=_,g)}function u(_,g,v,S,w){return g===null||g.tag!==7?(g=zs(v,_.mode,S,w),g.return=_,g):(g=r(g,v),g.return=_,g)}function c(_,g,v){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Yh(""+g,_.mode,v),g.return=_,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ta:return v=wa(g.type,g.key,g.props,null,_.mode,v),En(v,g),v.return=_,v;case Tn:return g=Wh(g,_.mode,v),g.return=_,g;case Xi:return g=Bs(g),c(_,g,v)}if(An(g)||Cn(g))return g=zs(g,_.mode,v,null),g.return=_,g;if(typeof g.then=="function")return c(_,ca(g),v);if(g.$$typeof===yi)return c(_,ha(_,g),v);ua(_,g)}return null}function d(_,g,v,S){var w=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return w!==null?null:a(_,g,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ta:return v.key===w?o(_,g,v,S):null;case Tn:return v.key===w?h(_,g,v,S):null;case Xi:return v=Bs(v),d(_,g,v,S)}if(An(v)||Cn(v))return w!==null?null:u(_,g,v,S,null);if(typeof v.then=="function")return d(_,g,ca(v),S);if(v.$$typeof===yi)return d(_,g,ha(_,v),S);ua(_,v)}return null}function f(_,g,v,S,w){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return _=_.get(v)||null,a(g,_,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ta:return _=_.get(S.key===null?v:S.key)||null,o(g,_,S,w);case Tn:return _=_.get(S.key===null?v:S.key)||null,h(g,_,S,w);case Xi:return S=Bs(S),f(_,g,v,S,w)}if(An(S)||Cn(S))return _=_.get(v)||null,u(g,_,S,w,null);if(typeof S.then=="function")return f(_,g,v,ca(S),w);if(S.$$typeof===yi)return f(_,g,v,ha(g,S),w);ua(g,S)}return null}function p(_,g,v,S){for(var w=null,O=null,D=g,N=g=0,U=null;D!==null&&N<v.length;N++){D.index>N?(U=D,D=null):U=D.sibling;var V=d(_,D,v[N],S);if(V===null){D===null&&(D=U);break}e&&D&&V.alternate===null&&t(_,D),g=n(V,g,N),O===null?w=V:O.sibling=V,O=V,D=U}if(N===v.length)return i(_,D),I&&mi(_,N),w;if(D===null){for(;N<v.length;N++)D=c(_,v[N],S),D!==null&&(g=n(D,g,N),O===null?w=D:O.sibling=D,O=D);return I&&mi(_,N),w}for(D=s(D);N<v.length;N++)U=f(D,_,N,v[N],S),U!==null&&(e&&U.alternate!==null&&D.delete(U.key===null?N:U.key),g=n(U,g,N),O===null?w=U:O.sibling=U,O=U);return e&&D.forEach(function(Z){return t(_,Z)}),I&&mi(_,N),w}function m(_,g,v,S){if(v==null)throw Error(y(151));for(var w=null,O=null,D=g,N=g=0,U=null,V=v.next();D!==null&&!V.done;N++,V=v.next()){D.index>N?(U=D,D=null):U=D.sibling;var Z=d(_,D,V.value,S);if(Z===null){D===null&&(D=U);break}e&&D&&Z.alternate===null&&t(_,D),g=n(Z,g,N),O===null?w=Z:O.sibling=Z,O=Z,D=U}if(V.done)return i(_,D),I&&mi(_,N),w;if(D===null){for(;!V.done;N++,V=v.next())V=c(_,V.value,S),V!==null&&(g=n(V,g,N),O===null?w=V:O.sibling=V,O=V);return I&&mi(_,N),w}for(D=s(D);!V.done;N++,V=v.next())V=f(D,_,N,V.value,S),V!==null&&(e&&V.alternate!==null&&D.delete(V.key===null?N:V.key),g=n(V,g,N),O===null?w=V:O.sibling=V,O=V);return e&&D.forEach(function(gn){return t(_,gn)}),I&&mi(_,N),w}function C(_,g,v,S){if(typeof v=="object"&&v!==null&&v.type===pr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ta:e:{for(var w=v.key;g!==null;){if(g.key===w){if(w=v.type,w===pr){if(g.tag===7){i(_,g.sibling),S=r(g,v.props.children),S.return=_,_=S;break e}}else if(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Xi&&Bs(w)===g.type){i(_,g.sibling),S=r(g,v.props),En(S,v),S.return=_,_=S;break e}i(_,g);break}else t(_,g);g=g.sibling}v.type===pr?(S=zs(v.props.children,_.mode,S,v.key),S.return=_,_=S):(S=wa(v.type,v.key,v.props,null,_.mode,S),En(S,v),S.return=_,_=S)}return l(_);case Tn:e:{for(w=v.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){i(_,g.sibling),S=r(g,v.children||[]),S.return=_,_=S;break e}else{i(_,g);break}else t(_,g);g=g.sibling}S=Wh(v,_.mode,S),S.return=_,_=S}return l(_);case Xi:return v=Bs(v),C(_,g,v,S)}if(An(v))return p(_,g,v,S);if(Cn(v)){if(w=Cn(v),typeof w!="function")throw Error(y(150));return v=w.call(v),m(_,g,v,S)}if(typeof v.then=="function")return C(_,g,ca(v),S);if(v.$$typeof===yi)return C(_,g,ha(_,v),S);ua(_,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,g!==null&&g.tag===6?(i(_,g.sibling),S=r(g,v),S.return=_,_=S):(i(_,g),S=Yh(v,_.mode,S),S.return=_,_=S),l(_)):i(_,g)}return function(_,g,v,S){try{Jn=0;var w=C(_,g,v,S);return kr=null,w}catch(D){if(D===Ir||D===po)throw D;var O=St(29,D,null,_.mode);return O.lanes=S,O.return=_,O}}}var Ks=cp(!0),up=cp(!1),Gi=!1;function Eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bc(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 ns(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ls(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Q&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Ka(e),ip(e,null,i),t}return go(e,s,t,i),Ka(e)}function Un(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,Tg(e,i)}}function Vh(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 l={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=l:n=n.next=l,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 kc=!1;function qn(){if(kc){var e=Br;if(e!==null)throw e}}function Kn(e,t,i,s){kc=!1;var r=e.updateQueue;Gi=!1;var n=r.firstBaseUpdate,l=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var o=a,h=o.next;o.next=null,l===null?n=h:l.next=h,l=o;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==l&&(a===null?u.firstBaseUpdate=h:a.next=h,u.lastBaseUpdate=o))}if(n!==null){var c=r.baseState;l=0,u=h=o=null,a=n;do{var d=a.lane&-536870913,f=d!==a.lane;if(f?(j&d)===d:(s&d)===d){d!==0&&d===Ur&&(kc=!0),u!==null&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=e,m=a;d=t;var C=i;switch(m.tag){case 1:if(p=m.payload,typeof p=="function"){c=p.call(C,c,d);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(C,c,d):p,d==null)break e;c=ce({},c,d);break e;case 2:Gi=!0}}d=a.callback,d!==null&&(e.flags|=64,f&&(e.flags|=8192),f=r.callbacks,f===null?r.callbacks=[d]:f.push(d))}else f={lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(h=u=f,o=c):u=u.next=f,l|=d;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);u===null&&(o=c),r.baseState=o,r.firstBaseUpdate=h,r.lastBaseUpdate=u,n===null&&(r.shared.lanes=0),gs|=l,e.lanes=l,e.memoizedState=c}}function dp(e,t){if(typeof e!="function")throw Error(y(191,e));e.call(t)}function fp(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)dp(i[e],t)}var qr=ri(null),Va=ri(0);function C_(e,t){e=Ai,le(Va,e),le(qr,t),Ai=e|t.baseLanes}function Oc(){le(Va,Ai),le(qr,qr.current)}function xu(){Ai=Va.current,qe(qr),qe(Va)}var Dt=ri(null),qt=null;function Ii(e){var t=e.alternate;le(Ce,Ce.current&1),le(Dt,e),qt===null&&(t===null||qr.current!==null||t.memoizedState!==null)&&(qt=e)}function zc(e){le(Ce,Ce.current),le(Dt,e),qt===null&&(qt=e)}function _p(e){e.tag===22?(le(Ce,Ce.current),le(Dt,e),qt===null&&(qt=e)):Zi(e)}function Zi(){le(Ce,Ce.current),le(Dt,Dt.current)}function mt(e){qe(Dt),qt===e&&(qt=null),qe(Ce)}var Ce=ri(0);function Fa(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Jc(i)||eu(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 Ri=0,Y=null,se=null,xe=null,Xa=!1,Or=!1,Ys=!1,Ga=0,el=0,zr=null,bb=0;function me(){throw Error(y(321))}function Du(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!xt(e[i],t[i]))return!1;return!0}function Ru(e,t,i,s,r,n){return Ri=n,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?Fp:Uu,Ys=!1,n=i(s,r),Ys=!1,Or&&(n=pp(t,i,s,r)),gp(e),n}function gp(e){H.H=tl;var t=se!==null&&se.next!==null;if(Ri=0,xe=se=Y=null,Xa=!1,el=0,zr=null,t)throw Error(y(300));e===null||Me||(e=e.dependencies,e!==null&&Wa(e)&&(Me=!0))}function pp(e,t,i,s){Y=e;var r=0;do{if(Or&&(zr=null),el=0,Or=!1,25<=r)throw Error(y(301));if(r+=1,xe=se=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}H.H=Xp,n=t(i,s)}while(Or);return n}function Cb(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?_l(t):t,e=e.useState()[0],(se!==null?se.memoizedState:null)!==e&&(Y.flags|=1024),t}function Mu(){var e=Ga!==0;return Ga=0,e}function Tu(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Au(e){if(Xa){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xa=!1}Ri=0,xe=se=Y=null,Or=!1,el=Ga=0,zr=null}function rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?Y.memoizedState=xe=e:xe=xe.next=e,xe}function we(){if(se===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=se.next;var t=xe===null?Y.memoizedState:xe.next;if(t!==null)xe=t,se=e;else{if(e===null)throw Y.alternate===null?Error(y(467)):Error(y(310));se=e,e={memoizedState:se.memoizedState,baseState:se.baseState,baseQueue:se.baseQueue,queue:se.queue,next:null},xe===null?Y.memoizedState=xe=e:xe=xe.next=e}return xe}function vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _l(e){var t=el;return el+=1,zr===null&&(zr=[]),e=hp(zr,e,t),t=Y,(xe===null?t.memoizedState:xe.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Fp:Uu),e}function mo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _l(e);if(e.$$typeof===yi)return Ze(e)}throw Error(y(438,String(e)))}function Bu(e){var t=null,i=Y.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Y.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=vo(),Y.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]=ay;return t.index++,i}function Mi(e,t){return typeof t=="function"?t(e):t}function xa(e){var t=we();return ku(t,se,e)}function ku(e,t,i){var s=e.queue;if(s===null)throw Error(y(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var l=r.next;r.next=n.next,n.next=l}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var a=l=null,o=null,h=t,u=!1;do{var c=h.lane&-536870913;if(c!==h.lane?(j&c)===c:(Ri&c)===c){var d=h.revertLane;if(d===0)o!==null&&(o=o.next={lane:0,revertLane:0,gesture:null,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),c===Ur&&(u=!0);else if((Ri&d)===d){h=h.next,d===Ur&&(u=!0);continue}else c={lane:0,revertLane:h.revertLane,gesture:null,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null},o===null?(a=o=c,l=n):o=o.next=c,Y.lanes|=d,gs|=d;c=h.action,Ys&&i(n,c),n=h.hasEagerState?h.eagerState:i(n,c)}else d={lane:c,revertLane:h.revertLane,gesture:h.gesture,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null},o===null?(a=o=d,l=n):o=o.next=d,Y.lanes|=c,gs|=c;h=h.next}while(h!==null&&h!==t);if(o===null?l=n:o.next=a,!xt(n,e.memoizedState)&&(Me=!0,u&&(i=Br,i!==null)))throw i;e.memoizedState=n,e.baseState=l,e.baseQueue=o,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Fh(e){var t=we(),i=t.queue;if(i===null)throw Error(y(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var l=r=r.next;do n=e(n,l.action),l=l.next;while(l!==r);xt(n,t.memoizedState)||(Me=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function vp(e,t,i){var s=Y,r=we(),n=I;if(n){if(i===void 0)throw Error(y(407));i=i()}else i=t();var l=!xt((se||r).memoizedState,i);if(l&&(r.memoizedState=i,Me=!0),r=r.queue,Ou(yp.bind(null,s,r,e),[e]),r.getSnapshot!==t||l||xe!==null&&xe.memoizedState.tag&1){if(s.flags|=2048,Kr(9,{destroy:void 0},Sp.bind(null,s,r,i,t),null),ne===null)throw Error(y(349));n||(Ri&127)!==0||mp(s,t,i)}return i}function mp(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Y.updateQueue,t===null?(t=vo(),Y.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Sp(e,t,i,s){t.value=i,t.getSnapshot=s,bp(t)&&Cp(e)}function yp(e,t,i){return i(function(){bp(t)&&Cp(e)})}function bp(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!xt(e,i)}catch{return!0}}function Cp(e){var t=Xs(e,2);t!==null&&dt(t,e,2)}function Lc(e){var t=rt();if(typeof e=="function"){var i=e;if(e=i(),Ys){$i(!0);try{i()}finally{$i(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:e},t}function wp(e,t,i,s){return e.baseState=i,ku(e,se,typeof s=="function"?s:Mi)}function wb(e,t,i,s,r){if(yo(e))throw Error(y(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(l){n.listeners.push(l)}};H.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,Ep(t,n)):(n.next=i.next,t.pending=i.next=n)}}function Ep(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=H.T,l={};H.T=l;try{var a=i(r,s),o=H.S;o!==null&&o(l,a),w_(e,t,a)}catch(h){Nc(e,t,h)}finally{n!==null&&l.types!==null&&(n.types=l.types),H.T=n}}else try{n=i(r,s),w_(e,t,n)}catch(h){Nc(e,t,h)}}function w_(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){E_(e,t,s)},function(s){return Nc(e,t,s)}):E_(e,t,i)}function E_(e,t,i){t.status="fulfilled",t.value=i,xp(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Ep(e,i)))}function Nc(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,xp(t),t=t.next;while(t!==s)}e.action=null}function xp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dp(e,t){return t}function x_(e,t){if(I){var i=ne.formState;if(i!==null){e:{var s=Y;if(I){if(he){t:{for(var r=he,n=Ut;r.nodeType!==8;){if(!n){r=null;break t}if(r=Kt(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){he=Kt(r.nextSibling),s=r.data==="F!";break e}}fs(s)}s=!1}s&&(t=i[0])}}return i=rt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dp,lastRenderedState:t},i.queue=s,i=Wp.bind(null,Y,s),s.dispatch=i,s=Lc(!1),n=Hu.bind(null,Y,!1,s.queue),s=rt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=wb.bind(null,Y,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function D_(e){var t=we();return Rp(t,se,e)}function Rp(e,t,i){if(t=ku(e,t,Dp)[0],e=xa(Mi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=_l(t)}catch(l){throw l===Ir?po:l}else s=t;t=we();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Y.flags|=2048,Kr(9,{destroy:void 0},Eb.bind(null,r,i),null)),[s,n,e]}function Eb(e,t){e.action=t}function R_(e){var t=we(),i=se;if(i!==null)return Rp(t,i,e);we(),t=t.memoizedState,i=we();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Kr(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Y.updateQueue,t===null&&(t=vo(),Y.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 Mp(){return we().memoizedState}function Da(e,t,i,s){var r=rt();Y.flags|=e,r.memoizedState=Kr(1|t,{destroy:void 0},i,s===void 0?null:s)}function So(e,t,i,s){var r=we();s=s===void 0?null:s;var n=r.memoizedState.inst;se!==null&&s!==null&&Du(s,se.memoizedState.deps)?r.memoizedState=Kr(t,n,i,s):(Y.flags|=e,r.memoizedState=Kr(1|t,n,i,s))}function M_(e,t){Da(8390656,8,e,t)}function Ou(e,t){So(2048,8,e,t)}function xb(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=vo(),Y.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Tp(e){var t=we().memoizedState;return xb({ref:t,nextImpl:e}),function(){if((Q&2)!==0)throw Error(y(440));return t.impl.apply(void 0,arguments)}}function Ap(e,t){return So(4,2,e,t)}function Bp(e,t){return So(4,4,e,t)}function kp(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 Op(e,t,i){i=i!=null?i.concat([e]):null,So(4,4,kp.bind(null,t,e),i)}function zu(){}function zp(e,t){var i=we();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Du(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Lp(e,t){var i=we();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Du(t,s[1]))return s[0];if(s=e(),Ys){$i(!0);try{e()}finally{$i(!1)}}return i.memoizedState=[s,t],s}function Lu(e,t,i){return i===void 0||(Ri&1073741824)!==0&&(j&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=wv(),Y.lanes|=e,gs|=e,i)}function Np(e,t,i,s){return xt(i,t)?i:qr.current!==null?(e=Lu(e,i,s),xt(e,t)||(Me=!0),e):(Ri&42)===0||(Ri&1073741824)!==0&&(j&261930)===0?(Me=!0,e.memoizedState=i):(e=wv(),Y.lanes|=e,gs|=e,t)}function Hp(e,t,i,s,r){var n=$.p;$.p=n!==0&&8>n?n:8;var l=H.T,a={};H.T=a,Hu(e,!1,t,i);try{var o=r(),h=H.S;if(h!==null&&h(a,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var u=yb(o,s);Yn(e,t,u,Et(e))}else Yn(e,t,s,Et(e))}catch(c){Yn(e,t,{then:function(){},status:"rejected",reason:c},Et())}finally{$.p=n,l!==null&&a.types!==null&&(l.types=a.types),H.T=l}}function Db(){}function Hc(e,t,i,s){if(e.tag!==5)throw Error(y(476));var r=Up(e).queue;Hp(e,r,t,Os,i===null?Db:function(){return qp(e),i(s)})}function Up(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Os,baseState:Os,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:Os},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function qp(e){var t=Up(e);t.next===null&&(t=e.alternate.memoizedState),Yn(e,t.next.queue,{},Et())}function Nu(){return Ze(rl)}function Kp(){return we().memoizedState}function Yp(){return we().memoizedState}function Rb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Et();e=ns(i);var s=ls(t,e,i);s!==null&&(dt(s,t,i),Un(s,t,i)),t={cache:bu()},e.payload=t;return}t=t.return}}function Mb(e,t,i){var s=Et();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yo(e)?Pp(t,i):(i=vu(e,t,i,s),i!==null&&(dt(i,e,s),Vp(i,t,s)))}function Wp(e,t,i){var s=Et();Yn(e,t,i,s)}function Yn(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(yo(e))Pp(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var l=t.lastRenderedState,a=n(l,i);if(r.hasEagerState=!0,r.eagerState=a,xt(a,l))return go(e,t,r,0),ne===null&&_o(),!1}catch{}if(i=vu(e,t,r,s),i!==null)return dt(i,e,s),Vp(i,t,s),!0}return!1}function Hu(e,t,i,s){if(s={lane:2,revertLane:Xu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},yo(e)){if(t)throw Error(y(479))}else t=vu(e,i,s,2),t!==null&&dt(t,e,2)}function yo(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Pp(e,t){Or=Xa=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Vp(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Tg(e,i)}}var tl={readContext:Ze,use:mo,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useLayoutEffect:me,useInsertionEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useSyncExternalStore:me,useId:me,useHostTransitionStatus:me,useFormState:me,useActionState:me,useOptimistic:me,useMemoCache:me,useCacheRefresh:me};tl.useEffectEvent=me;var Fp={readContext:Ze,use:mo,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:Ze,useEffect:M_,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Da(4194308,4,kp.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){Da(4,2,e,t)},useMemo:function(e,t){var i=rt();t=t===void 0?null:t;var s=e();if(Ys){$i(!0);try{e()}finally{$i(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=rt();if(i!==void 0){var r=i(t);if(Ys){$i(!0);try{i(t)}finally{$i(!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=Mb.bind(null,Y,e),[s.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,i=Wp.bind(null,Y,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:zu,useDeferredValue:function(e,t){var i=rt();return Lu(i,e,t)},useTransition:function(){var e=Lc(!1);return e=Hp.bind(null,Y,e.queue,!0,!1),rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Y,r=rt();if(I){if(i===void 0)throw Error(y(407));i=i()}else{if(i=t(),ne===null)throw Error(y(349));(j&127)!==0||mp(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,M_(yp.bind(null,s,n,e),[e]),s.flags|=2048,Kr(9,{destroy:void 0},Sp.bind(null,s,n,i,t),null),i},useId:function(){var e=rt(),t=ne.identifierPrefix;if(I){var i=ti,s=ei;i=(s&~(1<<32-wt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ga++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=bb++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Nu,useFormState:x_,useActionState:x_,useOptimistic:function(e){var t=rt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Hu.bind(null,Y,!0,i),i.dispatch=t,[e,t]},useMemoCache:Bu,useCacheRefresh:function(){return rt().memoizedState=Rb.bind(null,Y)},useEffectEvent:function(e){var t=rt(),i={impl:e};return t.memoizedState=i,function(){if((Q&2)!==0)throw Error(y(440));return i.impl.apply(void 0,arguments)}}},Uu={readContext:Ze,use:mo,useCallback:zp,useContext:Ze,useEffect:Ou,useImperativeHandle:Op,useInsertionEffect:Ap,useLayoutEffect:Bp,useMemo:Lp,useReducer:xa,useRef:Mp,useState:function(){return xa(Mi)},useDebugValue:zu,useDeferredValue:function(e,t){var i=we();return Np(i,se.memoizedState,e,t)},useTransition:function(){var e=xa(Mi)[0],t=we().memoizedState;return[typeof e=="boolean"?e:_l(e),t]},useSyncExternalStore:vp,useId:Kp,useHostTransitionStatus:Nu,useFormState:D_,useActionState:D_,useOptimistic:function(e,t){var i=we();return wp(i,se,e,t)},useMemoCache:Bu,useCacheRefresh:Yp};Uu.useEffectEvent=Tp;var Xp={readContext:Ze,use:mo,useCallback:zp,useContext:Ze,useEffect:Ou,useImperativeHandle:Op,useInsertionEffect:Ap,useLayoutEffect:Bp,useMemo:Lp,useReducer:Fh,useRef:Mp,useState:function(){return Fh(Mi)},useDebugValue:zu,useDeferredValue:function(e,t){var i=we();return se===null?Lu(i,e,t):Np(i,se.memoizedState,e,t)},useTransition:function(){var e=Fh(Mi)[0],t=we().memoizedState;return[typeof e=="boolean"?e:_l(e),t]},useSyncExternalStore:vp,useId:Kp,useHostTransitionStatus:Nu,useFormState:R_,useActionState:R_,useOptimistic:function(e,t){var i=we();return se!==null?wp(i,se,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Bu,useCacheRefresh:Yp};Xp.useEffectEvent=Tp;function Xh(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:ce({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Uc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Et(),r=ns(s);r.payload=t,i!=null&&(r.callback=i),t=ls(e,r,s),t!==null&&(dt(t,e,s),Un(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Et(),r=ns(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=ls(e,r,s),t!==null&&(dt(t,e,s),Un(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Et(),s=ns(i);s.tag=2,t!=null&&(s.callback=t),t=ls(e,s,i),t!==null&&(dt(t,e,i),Un(t,e,i))}};function T_(e,t,i,s,r,n,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,l):t.prototype&&t.prototype.isPureReactComponent?!Zn(i,s)||!Zn(r,n):!0}function A_(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&&Uc.enqueueReplaceState(t,t.state,null)}function Ws(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=ce({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Gp(e){qa(e)}function jp(e){console.error(e)}function Ip(e){qa(e)}function ja(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function B_(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 qc(e,t,i){return i=ns(i),i.tag=3,i.payload={element:null},i.callback=function(){ja(e,t)},i}function Zp(e){return e=ns(e),e.tag=3,e}function Qp(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(){B_(t,i,s)}}var l=i.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){B_(t,i,s),typeof r!="function"&&(as===null?as=new Set([this]):as.add(this));var a=s.stack;this.componentDidCatch(s.value,{componentStack:a!==null?a:""})})}function Tb(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&jr(t,i,r,!0),i=Dt.current,i!==null){switch(i.tag){case 31:case 13:return qt===null?Ja():i.alternate===null&&Se===0&&(Se=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Pa?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),sc(e,s,r)),!1;case 22:return i.flags|=65536,s===Pa?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)),sc(e,s,r)),!1}throw Error(y(435,i.tag))}return sc(e,s,r),Ja(),!1}if(I)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Dc&&(e=Error(y(422),{cause:s}),$n(Ht(e,i)))):(s!==Dc&&(t=Error(y(423),{cause:s}),$n(Ht(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Ht(s,i),r=qc(e.stateNode,s,r),Vh(e,r),Se!==4&&(Se=2)),!1;var n=Error(y(520),{cause:s});if(n=Ht(n,i),Vn===null?Vn=[n]:Vn.push(n),Se!==4&&(Se=2),t===null)return!0;s=Ht(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=qc(i.stateNode,s,e),Vh(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"&&(as===null||!as.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Zp(r),Qp(r,e,i,s),Vh(i,r),!1}i=i.return}while(i!==null);return!1}var qu=Error(y(461)),Me=!1;function Ge(e,t,i,s){t.child=e===null?up(t,null,i,s):Ks(t,e.child,i,s)}function k_(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var l={};for(var a in s)a!=="ref"&&(l[a]=s[a])}else l=s;return qs(t),s=Ru(e,t,i,l,n,r),a=Mu(),e!==null&&!Me?(Tu(e,t,r),Ti(e,t,r)):(I&&a&&Su(t),t.flags|=1,Ge(e,t,s,r),t.child)}function O_(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!mu(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,$p(e,t,n,s,r)):(e=wa(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ku(e,r)){var l=n.memoizedProps;if(i=i.compare,i=i!==null?i:Zn,i(l,s)&&e.ref===t.ref)return Ti(e,t,r)}return t.flags|=1,e=wi(n,s),e.ref=t.ref,e.return=t,t.child=e}function $p(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Zn(n,s)&&e.ref===t.ref)if(Me=!1,t.pendingProps=s=n,Ku(e,r))(e.flags&131072)!==0&&(Me=!0);else return t.lanes=e.lanes,Ti(e,t,r)}return Kc(e,t,i,s,r)}function Jp(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 z_(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ea(t,n!==null?n.cachePool:null),n!==null?C_(t,n):Oc(),_p(t);else return s=t.lanes=536870912,z_(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(Ea(t,n.cachePool),C_(t,n),Zi(t),t.memoizedState=null):(e!==null&&Ea(t,null),Oc(),Zi(t));return Ge(e,t,r,i),t.child}function kn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function z_(e,t,i,s,r){var n=Cu();return n=n===null?null:{parent:Re._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&Ea(t,null),Oc(),_p(t),e!==null&&jr(e,t,s,!0),t.childLanes=r,null}function Ra(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 L_(e,t,i){return Ks(t,e.child,null,i),e=Ra(t,t.pendingProps),e.flags|=2,mt(t),t.memoizedState=null,e}function Ab(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(I){if(s.mode==="hidden")return e=Ra(t,s),t.lanes=536870912,kn(null,e);if(zc(t),(e=he)?(e=Fv(e,Ut),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ds!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=rp(e),i.return=t,t.child=i,Ie=t,he=null)):e=null,e===null)throw fs(t);return t.lanes=536870912,null}return Ra(t,s)}var n=e.memoizedState;if(n!==null){var l=n.dehydrated;if(zc(t),r)if(t.flags&256)t.flags&=-257,t=L_(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(y(558));else if(Me||jr(e,t,i,!1),r=(i&e.childLanes)!==0,Me||r){if(s=ne,s!==null&&(l=Ag(s,i),l!==0&&l!==n.retryLane))throw n.retryLane=l,Xs(e,l),dt(s,e,l),qu;Ja(),t=L_(e,t,i)}else e=n.treeContext,he=Kt(l.nextSibling),Ie=t,I=!0,rs=null,Ut=!1,e!==null&&lp(t,e),t=Ra(t,s),t.flags|=4096;return t}return e=wi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ma(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(y(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Kc(e,t,i,s,r){return qs(t),i=Ru(e,t,i,s,void 0,r),s=Mu(),e!==null&&!Me?(Tu(e,t,r),Ti(e,t,r)):(I&&s&&Su(t),t.flags|=1,Ge(e,t,i,r),t.child)}function N_(e,t,i,s,r,n){return qs(t),t.updateQueue=null,i=pp(t,s,i,r),gp(e),s=Mu(),e!==null&&!Me?(Tu(e,t,n),Ti(e,t,n)):(I&&s&&Su(t),t.flags|=1,Ge(e,t,i,n),t.child)}function H_(e,t,i,s,r){if(qs(t),t.stateNode===null){var n=Er,l=i.contextType;typeof l=="object"&&l!==null&&(n=Ze(l)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Uc,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},Eu(t),l=i.contextType,n.context=typeof l=="object"&&l!==null?Ze(l):Er,n.state=t.memoizedState,l=i.getDerivedStateFromProps,typeof l=="function"&&(Xh(t,i,l,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(l=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),l!==n.state&&Uc.enqueueReplaceState(n,n.state,null),Kn(t,s,n,r),qn(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var a=t.memoizedProps,o=Ws(i,a);n.props=o;var h=n.context,u=i.contextType;l=Er,typeof u=="object"&&u!==null&&(l=Ze(u));var c=i.getDerivedStateFromProps;u=typeof c=="function"||typeof n.getSnapshotBeforeUpdate=="function",a=t.pendingProps!==a,u||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(a||h!==l)&&A_(t,n,s,l),Gi=!1;var d=t.memoizedState;n.state=d,Kn(t,s,n,r),qn(),h=t.memoizedState,a||d!==h||Gi?(typeof c=="function"&&(Xh(t,i,c,s),h=t.memoizedState),(o=Gi||T_(t,i,o,s,d,h,l))?(u||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=h),n.props=s,n.state=h,n.context=l,s=o):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,Bc(e,t),l=t.memoizedProps,u=Ws(i,l),n.props=u,c=t.pendingProps,d=n.context,h=i.contextType,o=Er,typeof h=="object"&&h!==null&&(o=Ze(h)),a=i.getDerivedStateFromProps,(h=typeof a=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(l!==c||d!==o)&&A_(t,n,s,o),Gi=!1,d=t.memoizedState,n.state=d,Kn(t,s,n,r),qn();var f=t.memoizedState;l!==c||d!==f||Gi||e!==null&&e.dependencies!==null&&Wa(e.dependencies)?(typeof a=="function"&&(Xh(t,i,a,s),f=t.memoizedState),(u=Gi||T_(t,i,u,s,d,f,o)||e!==null&&e.dependencies!==null&&Wa(e.dependencies))?(h||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,f,o),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,f,o)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=f),n.props=s,n.state=f,n.context=o,s=u):(typeof n.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Ma(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=Ks(t,e.child,null,r),t.child=Ks(t,null,i,r)):Ge(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ti(e,t,r),e}function U_(e,t,i,s){return Us(),t.flags|=256,Ge(e,t,i,s),t.child}var Gh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jh(e){return{baseLanes:e,cachePool:op()}}function Ih(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=yt),e}function ev(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,l;if((l=n)||(l=e!==null&&e.memoizedState===null?!1:(Ce.current&2)!==0),l&&(r=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(I){if(r?Ii(t):Zi(t),(e=he)?(e=Fv(e,Ut),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ds!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=rp(e),i.return=t,t.child=i,Ie=t,he=null)):e=null,e===null)throw fs(t);return eu(e)?t.lanes=32:t.lanes=536870912,null}var a=s.children;return s=s.fallback,r?(Zi(t),r=t.mode,a=Ia({mode:"hidden",children:a},r),s=zs(s,r,i,null),a.return=t,s.return=t,a.sibling=s,t.child=a,s=t.child,s.memoizedState=jh(i),s.childLanes=Ih(e,l,i),t.memoizedState=Gh,kn(null,s)):(Ii(t),Yc(t,a))}var o=e.memoizedState;if(o!==null&&(a=o.dehydrated,a!==null)){if(n)t.flags&256?(Ii(t),t.flags&=-257,t=Zh(e,t,i)):t.memoizedState!==null?(Zi(t),t.child=e.child,t.flags|=128,t=null):(Zi(t),a=s.fallback,r=t.mode,s=Ia({mode:"visible",children:s.children},r),a=zs(a,r,i,null),a.flags|=2,s.return=t,a.return=t,s.sibling=a,t.child=s,Ks(t,e.child,null,i),s=t.child,s.memoizedState=jh(i),s.childLanes=Ih(e,l,i),t.memoizedState=Gh,t=kn(null,s));else if(Ii(t),eu(a)){if(l=a.nextSibling&&a.nextSibling.dataset,l)var h=l.dgst;l=h,s=Error(y(419)),s.stack="",s.digest=l,$n({value:s,source:null,stack:null}),t=Zh(e,t,i)}else if(Me||jr(e,t,i,!1),l=(i&e.childLanes)!==0,Me||l){if(l=ne,l!==null&&(s=Ag(l,i),s!==0&&s!==o.retryLane))throw o.retryLane=s,Xs(e,s),dt(l,e,s),qu;Jc(a)||Ja(),t=Zh(e,t,i)}else Jc(a)?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,he=Kt(a.nextSibling),Ie=t,I=!0,rs=null,Ut=!1,e!==null&&lp(t,e),t=Yc(t,s.children),t.flags|=4096);return t}return r?(Zi(t),a=s.fallback,r=t.mode,o=e.child,h=o.sibling,s=wi(o,{mode:"hidden",children:s.children}),s.subtreeFlags=o.subtreeFlags&65011712,h!==null?a=wi(h,a):(a=zs(a,r,i,null),a.flags|=2),a.return=t,s.return=t,s.sibling=a,t.child=s,kn(null,s),s=t.child,a=e.child.memoizedState,a===null?a=jh(i):(r=a.cachePool,r!==null?(o=Re._currentValue,r=r.parent!==o?{parent:o,pool:o}:r):r=op(),a={baseLanes:a.baseLanes|i,cachePool:r}),s.memoizedState=a,s.childLanes=Ih(e,l,i),t.memoizedState=Gh,kn(e.child,s)):(Ii(t),i=e.child,e=i.sibling,i=wi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=i,t.memoizedState=null,i)}function Yc(e,t){return t=Ia({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ia(e,t){return e=St(22,e,null,t),e.lanes=0,e}function Zh(e,t,i){return Ks(t,e.child,null,i),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function q_(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Mc(e.return,t,i)}function Qh(e,t,i,s,r,n){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=s,l.tail=i,l.tailMode=r,l.treeForkCount=n)}function tv(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var l=Ce.current,a=(l&2)!==0;if(a?(l=l&1|2,t.flags|=128):l&=1,le(Ce,l),Ge(e,t,s,i),s=I?Qn:0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&q_(e,i,t);else if(e.tag===19)q_(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&&Fa(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Qh(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&&Fa(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Qh(t,!0,i,null,n,s);break;case"together":Qh(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ti(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),gs|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(jr(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(y(153));if(t.child!==null){for(e=t.child,i=wi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=wi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ku(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wa(e)))}function Bb(e,t,i){switch(t.tag){case 3:La(t,t.stateNode.containerInfo),ji(t,Re,e.memoizedState.cache),Us();break;case 27:case 5:gc(t);break;case 4:La(t,t.stateNode.containerInfo);break;case 10:ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zc(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ii(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ev(e,t,i):(Ii(t),e=Ti(e,t,i),e!==null?e.sibling:null);Ii(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(jr(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return tv(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),le(Ce,Ce.current),s)break;return null;case 22:return t.lanes=0,Jp(e,t,i,t.pendingProps);case 24:ji(t,Re,e.memoizedState.cache)}return Ti(e,t,i)}function iv(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Me=!0;else{if(!Ku(e,i)&&(t.flags&128)===0)return Me=!1,Bb(e,t,i);Me=(e.flags&131072)!==0}else Me=!1,I&&(t.flags&1048576)!==0&&np(t,Qn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Bs(t.elementType),t.type=e,typeof e=="function")mu(e)?(s=Ws(e,s),t.tag=1,t=H_(null,t,e,s,i)):(t.tag=0,t=Kc(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===ru){t.tag=11,t=k_(null,t,e,s,i);break e}else if(r===nu){t.tag=14,t=O_(null,t,e,s,i);break e}}throw t=fc(e)||e,Error(y(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Ws(s,t.pendingProps),H_(e,t,s,r,i);case 3:e:{if(La(t,t.stateNode.containerInfo),e===null)throw Error(y(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,Bc(e,t),Kn(t,s,null,i);var l=t.memoizedState;if(s=l.cache,ji(t,Re,s),s!==n.cache&&Tc(t,[Re],i,!0),qn(),s=l.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=U_(e,t,s,i);break e}else if(s!==r){r=Ht(Error(y(424)),t),$n(r),t=U_(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,he=Kt(e.firstChild),Ie=t,I=!0,rs=null,Ut=!0,i=up(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Us(),s===r){t=Ti(e,t,i);break e}Ge(e,t,s,i)}t=t.child}return t;case 26:return Ma(e,t),e===null?(i=ag(t.type,null,t.pendingProps,null))?t.memoizedState=i:I||(i=t.type,e=t.pendingProps,s=so(ss.current).createElement(i),s[je]=t,s[ft]=e,Qe(s,i,e),Ue(s),t.stateNode=s):t.memoizedState=ag(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return gc(t),e===null&&I&&(s=t.stateNode=Xv(t.type,t.pendingProps,ss.current),Ie=t,Ut=!0,r=he,vs(t.type)?(tu=r,he=Kt(s.firstChild)):he=r),Ge(e,t,t.pendingProps.children,i),Ma(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((r=s=he)&&(s=nC(s,t.type,t.pendingProps,Ut),s!==null?(t.stateNode=s,Ie=t,he=Kt(s.firstChild),Ut=!1,r=!0):r=!1),r||fs(t)),gc(t),r=t.type,n=t.pendingProps,l=e!==null?e.memoizedProps:null,s=n.children,Qc(r,n)?s=null:l!==null&&Qc(r,l)&&(t.flags|=32),t.memoizedState!==null&&(r=Ru(e,t,Cb,null,null,i),rl._currentValue=r),Ma(e,t),Ge(e,t,s,i),t.child;case 6:return e===null&&I&&((e=i=he)&&(i=lC(i,t.pendingProps,Ut),i!==null?(t.stateNode=i,Ie=t,he=null,e=!0):e=!1),e||fs(t)),null;case 13:return ev(e,t,i);case 4:return La(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ks(t,null,s,i):Ge(e,t,s,i),t.child;case 11:return k_(e,t,t.type,t.pendingProps,i);case 7:return Ge(e,t,t.pendingProps,i),t.child;case 8:return Ge(e,t,t.pendingProps.children,i),t.child;case 12:return Ge(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,ji(t,t.type,s.value),Ge(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,qs(t),r=Ze(r),s=s(r),t.flags|=1,Ge(e,t,s,i),t.child;case 14:return O_(e,t,t.type,t.pendingProps,i);case 15:return $p(e,t,t.type,t.pendingProps,i);case 19:return tv(e,t,i);case 31:return Ab(e,t,i);case 22:return Jp(e,t,i,t.pendingProps);case 24:return qs(t),s=Ze(Re),e===null?(r=Cu(),r===null&&(r=ne,n=bu(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},Eu(t),ji(t,Re,r)):((e.lanes&i)!==0&&(Bc(e,t),Kn(t,null,null,i),qn()),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),ji(t,Re,s)):(s=n.cache,ji(t,Re,s),s!==r.cache&&Tc(t,[Re],i,!0))),Ge(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(y(156,t.tag))}function _i(e){e.flags|=4}function $h(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(Dv())e.flags|=8192;else throw Ns=Pa,wu}else e.flags&=-16777217}function K_(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Iv(t))if(Dv())e.flags|=8192;else throw Ns=Pa,wu}function da(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Rg():536870912,e.lanes|=t,Yr|=t)}function xn(e,t){if(!I)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 oe(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 kb(e,t,i){var s=t.pendingProps;switch(yu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oe(t),null;case 1:return oe(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ei(Re),Lr(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(dr(t)?_i(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ph())),oe(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(_i(t),n!==null?(oe(t),K_(t,n)):(oe(t),$h(t,r,null,s,i))):n?n!==e.memoizedState?(_i(t),oe(t),K_(t,n)):(oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&_i(t),oe(t),$h(t,r,e,s,i)),null;case 27:if(Na(t),i=ss.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&_i(t);else{if(!s){if(t.stateNode===null)throw Error(y(166));return oe(t),null}e=si.current,dr(t)?g_(t,e):(e=Xv(r,s,i),t.stateNode=e,_i(t))}return oe(t),null;case 5:if(Na(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&_i(t);else{if(!s){if(t.stateNode===null)throw Error(y(166));return oe(t),null}if(n=si.current,dr(t))g_(t,n);else{var l=so(ss.current);switch(n){case 1:n=l.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=l.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=l.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?l.createElement("select",{is:s.is}):l.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?l.createElement(r,{is:s.is}):l.createElement(r)}}n[je]=t,n[ft]=s;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)n.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=n;e:switch(Qe(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&&_i(t)}}return oe(t),$h(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&_i(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(y(166));if(e=ss.current,dr(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=Ie,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[je]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Wv(e.nodeValue,i)),e||fs(t,!0)}else e=so(e).createTextNode(s),e[je]=t,t.stateNode=e}return oe(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=dr(t),i!==null){if(e===null){if(!s)throw Error(y(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(y(557));e[je]=t}else Us(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;oe(t),e=!1}else i=Ph(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(mt(t),t):(mt(t),null);if((t.flags&128)!==0)throw Error(y(558))}return oe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=dr(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(y(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(y(317));r[je]=t}else Us(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;oe(t),r=!1}else r=Ph(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(mt(t),t):(mt(t),null)}return mt(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),da(t,t.updateQueue),oe(t),null);case 4:return Lr(),e===null&&Gu(t.stateNode.containerInfo),oe(t),null;case 10:return Ei(t.type),oe(t),null;case 19:if(qe(Ce),s=t.memoizedState,s===null)return oe(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)xn(s,!1);else{if(Se!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Fa(e),n!==null){for(t.flags|=128,xn(s,!1),e=n.updateQueue,t.updateQueue=e,da(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)sp(i,e),i=i.sibling;return le(Ce,Ce.current&1|2),I&&mi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&bt()>Qa&&(t.flags|=128,r=!0,xn(s,!1),t.lanes=4194304)}else{if(!r)if(e=Fa(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,da(t,e),xn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!I)return oe(t),null}else 2*bt()-s.renderingStartTime>Qa&&i!==536870912&&(t.flags|=128,r=!0,xn(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=bt(),e.sibling=null,i=Ce.current,le(Ce,r?i&1|2:i&1),I&&mi(t,s.treeForkCount),e):(oe(t),null);case 22:case 23:return mt(t),xu(),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&&(oe(t),t.subtreeFlags&6&&(t.flags|=8192)):oe(t),i=t.updateQueue,i!==null&&da(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&&qe(Ls),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ei(Re),oe(t),null;case 25:return null;case 30:return null}throw Error(y(156,t.tag))}function Ob(e,t){switch(yu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(Re),Lr(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Na(t),null;case 31:if(t.memoizedState!==null){if(mt(t),t.alternate===null)throw Error(y(340));Us()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));Us()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qe(Ce),null;case 4:return Lr(),null;case 10:return Ei(t.type),null;case 22:case 23:return mt(t),xu(),e!==null&&qe(Ls),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ei(Re),null;case 25:return null;default:return null}}function sv(e,t){switch(yu(t),t.tag){case 3:Ei(Re),Lr();break;case 26:case 27:case 5:Na(t);break;case 4:Lr();break;case 31:t.memoizedState!==null&&mt(t);break;case 13:mt(t);break;case 19:qe(Ce);break;case 10:Ei(t.type);break;case 22:case 23:mt(t),xu(),e!==null&&qe(Ls);break;case 24:Ei(Re)}}function gl(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,l=i.inst;s=n(),l.destroy=s}i=i.next}while(i!==r)}}catch(a){te(t,t.return,a)}}function _s(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 l=s.inst,a=l.destroy;if(a!==void 0){l.destroy=void 0,r=t;var o=i,h=a;try{h()}catch(u){te(r,o,u)}}}s=s.next}while(s!==n)}}catch(u){te(t,t.return,u)}}function rv(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{fp(t,i)}catch(s){te(e,e.return,s)}}}function nv(e,t,i){i.props=Ws(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){te(e,t,s)}}function Wn(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){te(e,t,r)}}function ii(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){te(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){te(e,t,r)}else i.current=null}function lv(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){te(e,e.return,r)}}function Jh(e,t,i){try{var s=e.stateNode;Jb(s,e.type,i,t),s[ft]=t}catch(r){te(e,e.return,r)}}function av(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&vs(e.type)||e.tag===4}function ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||av(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&&vs(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 Wc(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=bi));else if(s!==4&&(s===27&&vs(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,i),e=e.sibling;e!==null;)Wc(e,t,i),e=e.sibling}function Za(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&&vs(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Za(e,t,i),e=e.sibling;e!==null;)Za(e,t,i),e=e.sibling}function ov(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Qe(t,s,i),t[je]=e,t[ft]=i}catch(n){te(e,e.return,n)}}var Si=!1,De=!1,tc=!1,Y_=typeof WeakSet=="function"?WeakSet:Set,He=null;function zb(e,t){if(e=e.containerInfo,Ic=ao,e=Ig(e),gu(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 l=0,a=-1,o=-1,h=0,u=0,c=e,d=null;t:for(;;){for(var f;c!==i||r!==0&&c.nodeType!==3||(a=l+r),c!==n||s!==0&&c.nodeType!==3||(o=l+s),c.nodeType===3&&(l+=c.nodeValue.length),(f=c.firstChild)!==null;)d=c,c=f;for(;;){if(c===e)break t;if(d===i&&++h===r&&(a=l),d===n&&++u===s&&(o=l),(f=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=f}i=a===-1||o===-1?null:{start:a,end:o}}else i=null}i=i||{start:0,end:0}}else i=null;for(Zc={focusedElem:e,selectionRange:i},ao=!1,He=t;He!==null;)if(t=He,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,He=e;else for(;He!==null;){switch(t=He,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 p=Ws(i.type,r);e=s.getSnapshotBeforeUpdate(p,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(m){te(i,i.return,m)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)$c(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$c(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(y(163))}if(e=t.sibling,e!==null){e.return=t.return,He=e;break}He=t.return}}function hv(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:pi(e,i),s&4&&gl(5,i);break;case 1:if(pi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(l){te(i,i.return,l)}else{var r=Ws(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){te(i,i.return,l)}}s&64&&rv(i),s&512&&Wn(i,i.return);break;case 3:if(pi(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{fp(e,t)}catch(l){te(i,i.return,l)}}break;case 27:t===null&&s&4&&ov(i);case 26:case 5:pi(e,i),t===null&&s&4&&lv(i),s&512&&Wn(i,i.return);break;case 12:pi(e,i);break;case 31:pi(e,i),s&4&&dv(e,i);break;case 13:pi(e,i),s&4&&fv(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Pb.bind(null,i),aC(e,i))));break;case 22:if(s=i.memoizedState!==null||Si,!s){t=t!==null&&t.memoizedState!==null||De,r=Si;var n=De;Si=s,(De=t)&&!n?vi(e,i,(i.subtreeFlags&8772)!==0):pi(e,i),Si=r,De=n}break;case 30:break;default:pi(e,i)}}function cv(e){var t=e.alternate;t!==null&&(e.alternate=null,cv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&hu(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 _e=null,ct=!1;function gi(e,t,i){for(i=i.child;i!==null;)uv(e,t,i),i=i.sibling}function uv(e,t,i){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(ol,i)}catch{}switch(i.tag){case 26:De||ii(i,t),gi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:De||ii(i,t);var s=_e,r=ct;vs(i.type)&&(_e=i.stateNode,ct=!1),gi(e,t,i),Xn(i.stateNode),_e=s,ct=r;break;case 5:De||ii(i,t);case 6:if(s=_e,r=ct,_e=null,gi(e,t,i),_e=s,ct=r,_e!==null)if(ct)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(i.stateNode)}catch(n){te(i,t,n)}else try{_e.removeChild(i.stateNode)}catch(n){te(i,t,n)}break;case 18:_e!==null&&(ct?(e=_e,ig(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Fr(e)):ig(_e,i.stateNode));break;case 4:s=_e,r=ct,_e=i.stateNode.containerInfo,ct=!0,gi(e,t,i),_e=s,ct=r;break;case 0:case 11:case 14:case 15:_s(2,i,t),De||_s(4,i,t),gi(e,t,i);break;case 1:De||(ii(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&nv(i,t,s)),gi(e,t,i);break;case 21:gi(e,t,i);break;case 22:De=(s=De)||i.memoizedState!==null,gi(e,t,i),De=s;break;default:gi(e,t,i)}}function dv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fr(e)}catch(i){te(t,t.return,i)}}}function fv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fr(e)}catch(i){te(t,t.return,i)}}function Lb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Y_),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Y_),t;default:throw Error(y(435,e.tag))}}function fa(e,t){var i=Lb(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=Vb.bind(null,e,s);s.then(r,r)}})}function ot(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,l=t,a=l;e:for(;a!==null;){switch(a.tag){case 27:if(vs(a.type)){_e=a.stateNode,ct=!1;break e}break;case 5:_e=a.stateNode,ct=!1;break e;case 3:case 4:_e=a.stateNode.containerInfo,ct=!0;break e}a=a.return}if(_e===null)throw Error(y(160));uv(n,l,r),_e=null,ct=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_v(t,e),t=t.sibling}var jt=null;function _v(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ot(t,e),ht(e),s&4&&(_s(3,e,e.return),gl(3,e),_s(5,e,e.return));break;case 1:ot(t,e),ht(e),s&512&&(De||i===null||ii(i,i.return)),s&64&&Si&&(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=jt;if(ot(t,e),ht(e),s&512&&(De||i===null||ii(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[ul]||n[je]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),Qe(n,s,i),n[je]=e,Ue(n),s=n;break e;case"link":var l=hg("link","href",r).get(s+(i.href||""));if(l){for(var a=0;a<l.length;a++)if(n=l[a],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)){l.splice(a,1);break t}}n=r.createElement(s),Qe(n,s,i),r.head.appendChild(n);break;case"meta":if(l=hg("meta","content",r).get(s+(i.content||""))){for(a=0;a<l.length;a++)if(n=l[a],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)){l.splice(a,1);break t}}n=r.createElement(s),Qe(n,s,i),r.head.appendChild(n);break;default:throw Error(y(468,s))}n[je]=e,Ue(n),s=n}e.stateNode=s}else cg(r,e.type,e.stateNode);else e.stateNode=og(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?cg(r,e.type,e.stateNode):og(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Jh(e,e.memoizedProps,i.memoizedProps)}break;case 27:ot(t,e),ht(e),s&512&&(De||i===null||ii(i,i.return)),i!==null&&s&4&&Jh(e,e.memoizedProps,i.memoizedProps);break;case 5:if(ot(t,e),ht(e),s&512&&(De||i===null||ii(i,i.return)),e.flags&32){r=e.stateNode;try{Hr(r,"")}catch(p){te(e,e.return,p)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Jh(e,r,i!==null?i.memoizedProps:r)),s&1024&&(tc=!0);break;case 6:if(ot(t,e),ht(e),s&4){if(e.stateNode===null)throw Error(y(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(p){te(e,e.return,p)}}break;case 3:if(Ba=null,r=jt,jt=ro(t.containerInfo),ot(t,e),jt=r,ht(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Fr(t.containerInfo)}catch(p){te(e,e.return,p)}tc&&(tc=!1,gv(e));break;case 4:s=jt,jt=ro(e.stateNode.containerInfo),ot(t,e),ht(e),jt=s;break;case 12:ot(t,e),ht(e);break;case 31:ot(t,e),ht(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,fa(e,s)));break;case 13:ot(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(bo=bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,fa(e,s)));break;case 22:r=e.memoizedState!==null;var o=i!==null&&i.memoizedState!==null,h=Si,u=De;if(Si=h||r,De=u||o,ot(t,e),De=u,Si=h,ht(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||o||Si||De||ks(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){o=i=t;try{if(n=o.stateNode,r)l=n.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{a=o.stateNode;var c=o.memoizedProps.style,d=c!=null&&c.hasOwnProperty("display")?c.display:null;a.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(p){te(o,o.return,p)}}}else if(t.tag===6){if(i===null){o=t;try{o.stateNode.nodeValue=r?"":o.memoizedProps}catch(p){te(o,o.return,p)}}}else if(t.tag===18){if(i===null){o=t;try{var f=o.stateNode;r?sg(f,!0):sg(o.stateNode,!1)}catch(p){te(o,o.return,p)}}}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,fa(e,i))));break;case 19:ot(t,e),ht(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,fa(e,s)));break;case 30:break;case 21:break;default:ot(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(av(s)){i=s;break}s=s.return}if(i==null)throw Error(y(160));switch(i.tag){case 27:var r=i.stateNode,n=ec(e);Za(e,n,r);break;case 5:var l=i.stateNode;i.flags&32&&(Hr(l,""),i.flags&=-33);var a=ec(e);Za(e,a,l);break;case 3:case 4:var o=i.stateNode.containerInfo,h=ec(e);Wc(e,h,o);break;default:throw Error(y(161))}}catch(u){te(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gv(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hv(e,t.alternate,t),t=t.sibling}function ks(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_s(4,t,t.return),ks(t);break;case 1:ii(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nv(t,t.return,i),ks(t);break;case 27:Xn(t.stateNode);case 26:case 5:ii(t,t.return),ks(t);break;case 22:t.memoizedState===null&&ks(t);break;case 30:ks(t);break;default:ks(t)}e=e.sibling}}function vi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,l=n.flags;switch(n.tag){case 0:case 11:case 15:vi(r,n,i),gl(4,n);break;case 1:if(vi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(h){te(s,s.return,h)}if(s=n,r=s.updateQueue,r!==null){var a=s.stateNode;try{var o=r.shared.hiddenCallbacks;if(o!==null)for(r.shared.hiddenCallbacks=null,r=0;r<o.length;r++)dp(o[r],a)}catch(h){te(s,s.return,h)}}i&&l&64&&rv(n),Wn(n,n.return);break;case 27:ov(n);case 26:case 5:vi(r,n,i),i&&s===null&&l&4&&lv(n),Wn(n,n.return);break;case 12:vi(r,n,i);break;case 31:vi(r,n,i),i&&l&4&&dv(r,n);break;case 13:vi(r,n,i),i&&l&4&&fv(r,n);break;case 22:n.memoizedState===null&&vi(r,n,i),Wn(n,n.return);break;case 30:break;default:vi(r,n,i)}t=t.sibling}}function Yu(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&&fl(i))}function Wu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fl(e))}function Gt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pv(e,t,i,s),t=t.sibling}function pv(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,i,s),r&2048&&gl(9,t);break;case 1:Gt(e,t,i,s);break;case 3:Gt(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&&fl(e)));break;case 12:if(r&2048){Gt(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,l=n.id,a=n.onPostCommit;typeof a=="function"&&a(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){te(t,t.return,o)}}else Gt(e,t,i,s);break;case 31:Gt(e,t,i,s);break;case 13:Gt(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,l=t.alternate,t.memoizedState!==null?n._visibility&2?Gt(e,t,i,s):Pn(e,t):n._visibility&2?Gt(e,t,i,s):(n._visibility|=2,_r(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Yu(l,t);break;case 24:Gt(e,t,i,s),r&2048&&Wu(t.alternate,t);break;default:Gt(e,t,i,s)}}function _r(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,l=t,a=i,o=s,h=l.flags;switch(l.tag){case 0:case 11:case 15:_r(n,l,a,o,r),gl(8,l);break;case 23:break;case 22:var u=l.stateNode;l.memoizedState!==null?u._visibility&2?_r(n,l,a,o,r):Pn(n,l):(u._visibility|=2,_r(n,l,a,o,r)),r&&h&2048&&Yu(l.alternate,l);break;case 24:_r(n,l,a,o,r),r&&h&2048&&Wu(l.alternate,l);break;default:_r(n,l,a,o,r)}t=t.sibling}}function Pn(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:Pn(i,s),r&2048&&Yu(s.alternate,s);break;case 24:Pn(i,s),r&2048&&Wu(s.alternate,s);break;default:Pn(i,s)}t=t.sibling}}var On=8192;function fr(e,t,i){if(e.subtreeFlags&On)for(e=e.child;e!==null;)vv(e,t,i),e=e.sibling}function vv(e,t,i){switch(e.tag){case 26:fr(e,t,i),e.flags&On&&e.memoizedState!==null&&SC(i,jt,e.memoizedState,e.memoizedProps);break;case 5:fr(e,t,i);break;case 3:case 4:var s=jt;jt=ro(e.stateNode.containerInfo),fr(e,t,i),jt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=On,On=16777216,fr(e,t,i),On=s):fr(e,t,i));break;default:fr(e,t,i)}}function mv(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 Dn(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];He=s,yv(s,e)}mv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sv(e),e=e.sibling}function Sv(e){switch(e.tag){case 0:case 11:case 15:Dn(e),e.flags&2048&&_s(9,e,e.return);break;case 3:Dn(e);break;case 12:Dn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ta(e)):Dn(e);break;default:Dn(e)}}function Ta(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];He=s,yv(s,e)}mv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_s(8,t,t.return),Ta(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Ta(t));break;default:Ta(t)}e=e.sibling}}function yv(e,t){for(;He!==null;){var i=He;switch(i.tag){case 0:case 11:case 15:_s(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:fl(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,He=s;else e:for(i=e;He!==null;){s=He;var r=s.sibling,n=s.return;if(cv(s),s===i){He=null;break e}if(r!==null){r.return=n,He=r;break e}He=n}}}var Nb={getCacheForType:function(e){var t=Ze(Re),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ze(Re).controller.signal}},Hb=typeof WeakMap=="function"?WeakMap:Map,Q=0,ne=null,X=null,j=0,ee=0,vt=null,es=!1,Zr=!1,Pu=!1,Ai=0,Se=0,gs=0,Hs=0,Vu=0,yt=0,Yr=0,Vn=null,ut=null,Pc=!1,bo=0,bv=0,Qa=1/0,$a=null,as=null,Be=0,os=null,Wr=null,xi=0,Vc=0,Fc=null,Cv=null,Fn=0,Xc=null;function Et(){return(Q&2)!==0&&j!==0?j&-j:H.T!==null?Xu():Bg()}function wv(){if(yt===0)if((j&536870912)===0||I){var e=sa;sa<<=1,(sa&3932160)===0&&(sa=262144),yt=e}else yt=536870912;return e=Dt.current,e!==null&&(e.flags|=32),yt}function dt(e,t,i){(e===ne&&(ee===2||ee===9)||e.cancelPendingCommit!==null)&&(Pr(e,0),ts(e,j,yt,!1)),cl(e,i),((Q&2)===0||e!==ne)&&(e===ne&&((Q&2)===0&&(Hs|=i),Se===4&&ts(e,j,yt,!1)),ni(e))}function Ev(e,t,i){if((Q&6)!==0)throw Error(y(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||hl(e,t),r=s?Kb(e,t):ic(e,t,!0),n=s;do{if(r===0){Zr&&!s&&ts(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!Ub(i)){r=ic(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var a=e;r=Vn;var o=a.current.memoizedState.isDehydrated;if(o&&(Pr(a,l).flags|=256),l=ic(a,l,!1),l!==2){if(Pu&&!o){a.errorRecoveryDisabledLanes|=n,Hs|=n,r=4;break e}n=ut,ut=r,n!==null&&(ut===null?ut=n:ut.push.apply(ut,n))}r=l}if(n=!1,r!==2)continue}}if(r===1){Pr(e,0),ts(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(y(345));case 4:if((t&4194048)!==t)break;case 6:ts(s,t,yt,!es);break e;case 2:ut=null;break;case 3:case 5:break;default:throw Error(y(329))}if((t&62914560)===t&&(r=bo+300-bt(),10<r)){if(ts(s,t,yt,!es),ho(s,0,!0)!==0)break e;xi=t,s.timeoutHandle=Vv(W_.bind(null,s,i,ut,$a,Pc,t,yt,Hs,Yr,es,n,"Throttled",-0,0),r);break e}W_(s,i,ut,$a,Pc,t,yt,Hs,Yr,es,n,null,-0,0)}}break}while(!0);ni(e)}function W_(e,t,i,s,r,n,l,a,o,h,u,c,d,f){if(e.timeoutHandle=-1,c=t.subtreeFlags,c&8192||(c&16785408)===16785408){c={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bi},vv(t,n,c);var p=(n&62914560)===n?bo-bt():(n&4194048)===n?bv-bt():0;if(p=yC(c,p),p!==null){xi=n,e.cancelPendingCommit=p(V_.bind(null,e,t,n,i,s,r,l,a,o,u,c,null,d,f)),ts(e,n,l,!h);return}}V_(e,t,n,i,s,r,l,a,o)}function Ub(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(!xt(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 ts(e,t,i,s){t&=~Vu,t&=~Hs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-wt(r),l=1<<n;s[n]=-1,r&=~l}i!==0&&Mg(e,i,t)}function Co(){return(Q&6)===0?(pl(0,!1),!1):!0}function Fu(){if(X!==null){if(ee===0)var e=X.return;else e=X,Ci=Gs=null,Au(e),kr=null,Jn=0,e=X;for(;e!==null;)sv(e.alternate,e),e=e.return;X=null}}function Pr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,iC(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),xi=0,Fu(),ne=e,X=i=wi(e.current,null),j=t,ee=0,vt=null,es=!1,Zr=hl(e,t),Pu=!1,Yr=yt=Vu=Hs=gs=Se=0,ut=Vn=null,Pc=!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 Ai=t,_o(),i}function xv(e,t){Y=null,H.H=tl,t===Ir||t===po?(t=y_(),ee=3):t===wu?(t=y_(),ee=4):ee=t===qu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vt=t,X===null&&(Se=1,ja(e,Ht(t,e.current)))}function Dv(){var e=Dt.current;return e===null?!0:(j&4194048)===j?qt===null:(j&62914560)===j||(j&536870912)!==0?e===qt:!1}function Rv(){var e=H.H;return H.H=tl,e===null?tl:e}function Mv(){var e=H.A;return H.A=Nb,e}function Ja(){Se=4,es||(j&4194048)!==j&&Dt.current!==null||(Zr=!0),(gs&134217727)===0&&(Hs&134217727)===0||ne===null||ts(ne,j,yt,!1)}function ic(e,t,i){var s=Q;Q|=2;var r=Rv(),n=Mv();(ne!==e||j!==t)&&($a=null,Pr(e,t)),t=!1;var l=Se;e:do try{if(ee!==0&&X!==null){var a=X,o=vt;switch(ee){case 8:Fu(),l=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var h=ee;if(ee=0,vt=null,Rr(e,a,o,h),i&&Zr){l=0;break e}break;default:h=ee,ee=0,vt=null,Rr(e,a,o,h)}}qb(),l=Se;break}catch(u){xv(e,u)}while(!0);return t&&e.shellSuspendCounter++,Ci=Gs=null,Q=s,H.H=r,H.A=n,X===null&&(ne=null,j=0,_o()),l}function qb(){for(;X!==null;)Tv(X)}function Kb(e,t){var i=Q;Q|=2;var s=Rv(),r=Mv();ne!==e||j!==t?($a=null,Qa=bt()+500,Pr(e,t)):Zr=hl(e,t);e:do try{if(ee!==0&&X!==null){t=X;var n=vt;t:switch(ee){case 1:ee=0,vt=null,Rr(e,t,n,1);break;case 2:case 9:if(S_(n)){ee=0,vt=null,P_(t);break}t=function(){ee!==2&&ee!==9||ne!==e||(ee=7),ni(e)},n.then(t,t);break e;case 3:ee=7;break e;case 4:ee=5;break e;case 7:S_(n)?(ee=0,vt=null,P_(t)):(ee=0,vt=null,Rr(e,t,n,7));break;case 5:var l=null;switch(X.tag){case 26:l=X.memoizedState;case 5:case 27:var a=X;if(l?Iv(l):a.stateNode.complete){ee=0,vt=null;var o=a.sibling;if(o!==null)X=o;else{var h=a.return;h!==null?(X=h,wo(h)):X=null}break t}}ee=0,vt=null,Rr(e,t,n,5);break;case 6:ee=0,vt=null,Rr(e,t,n,6);break;case 8:Fu(),Se=6;break e;default:throw Error(y(462))}}Yb();break}catch(u){xv(e,u)}while(!0);return Ci=Gs=null,H.H=s,H.A=r,Q=i,X!==null?0:(ne=null,j=0,_o(),Se)}function Yb(){for(;X!==null&&!cy();)Tv(X)}function Tv(e){var t=iv(e.alternate,e,Ai);e.memoizedProps=e.pendingProps,t===null?wo(e):X=t}function P_(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=N_(i,t,t.pendingProps,t.type,void 0,j);break;case 11:t=N_(i,t,t.pendingProps,t.type.render,t.ref,j);break;case 5:Au(t);default:sv(i,t),t=X=sp(t,Ai),t=iv(i,t,Ai)}e.memoizedProps=e.pendingProps,t===null?wo(e):X=t}function Rr(e,t,i,s){Ci=Gs=null,Au(t),kr=null,Jn=0;var r=t.return;try{if(Tb(e,r,t,i,j)){Se=1,ja(e,Ht(i,e.current)),X=null;return}}catch(n){if(r!==null)throw X=r,n;Se=1,ja(e,Ht(i,e.current)),X=null;return}t.flags&32768?(I||s===1?e=!0:Zr||(j&536870912)!==0?e=!1:(es=e=!0,(s===2||s===9||s===3||s===6)&&(s=Dt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Av(t,e)):wo(t)}function wo(e){var t=e;do{if((t.flags&32768)!==0){Av(t,es);return}e=t.return;var i=kb(t.alternate,t,Ai);if(i!==null){X=i;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);Se===0&&(Se=5)}function Av(e,t){do{var i=Ob(e.alternate,e);if(i!==null){i.flags&=32767,X=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){X=e;return}X=e=i}while(e!==null);Se=6,X=null}function V_(e,t,i,s,r,n,l,a,o){e.cancelPendingCommit=null;do Eo();while(Be!==0);if((Q&6)!==0)throw Error(y(327));if(t!==null){if(t===e.current)throw Error(y(177));if(n=t.lanes|t.childLanes,n|=pu,yy(e,i,n,l,a,o),e===ne&&(X=ne=null,j=0),Wr=t,os=e,xi=i,Vc=n,Fc=r,Cv=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Fb(Ha,function(){return Lv(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=H.T,H.T=null,r=$.p,$.p=2,l=Q,Q|=4;try{zb(e,t,i)}finally{Q=l,$.p=r,H.T=s}}Be=1,Bv(),kv(),Ov()}}function Bv(){if(Be===1){Be=0;var e=os,t=Wr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=H.T,H.T=null;var s=$.p;$.p=2;var r=Q;Q|=4;try{_v(t,e);var n=Zc,l=Ig(e.containerInfo),a=n.focusedElem,o=n.selectionRange;if(l!==a&&a&&a.ownerDocument&&jg(a.ownerDocument.documentElement,a)){if(o!==null&&gu(a)){var h=o.start,u=o.end;if(u===void 0&&(u=h),"selectionStart"in a)a.selectionStart=h,a.selectionEnd=Math.min(u,a.value.length);else{var c=a.ownerDocument||document,d=c&&c.defaultView||window;if(d.getSelection){var f=d.getSelection(),p=a.textContent.length,m=Math.min(o.start,p),C=o.end===void 0?m:Math.min(o.end,p);!f.extend&&m>C&&(l=C,C=m,m=l);var _=d_(a,m),g=d_(a,C);if(_&&g&&(f.rangeCount!==1||f.anchorNode!==_.node||f.anchorOffset!==_.offset||f.focusNode!==g.node||f.focusOffset!==g.offset)){var v=c.createRange();v.setStart(_.node,_.offset),f.removeAllRanges(),m>C?(f.addRange(v),f.extend(g.node,g.offset)):(v.setEnd(g.node,g.offset),f.addRange(v))}}}}for(c=[],f=a;f=f.parentNode;)f.nodeType===1&&c.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<c.length;a++){var S=c[a];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}ao=!!Ic,Zc=Ic=null}finally{Q=r,$.p=s,H.T=i}}e.current=t,Be=2}}function kv(){if(Be===2){Be=0;var e=os,t=Wr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=H.T,H.T=null;var s=$.p;$.p=2;var r=Q;Q|=4;try{hv(e,t.alternate,t)}finally{Q=r,$.p=s,H.T=i}}Be=3}}function Ov(){if(Be===4||Be===3){Be=0,uy();var e=os,t=Wr,i=xi,s=Cv;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Be=5:(Be=0,Wr=os=null,zv(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(as=null),ou(i),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(ol,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=H.T,r=$.p,$.p=2,H.T=null;try{for(var n=e.onRecoverableError,l=0;l<s.length;l++){var a=s[l];n(a.value,{componentStack:a.stack})}}finally{H.T=t,$.p=r}}(xi&3)!==0&&Eo(),ni(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Xc?Fn++:(Fn=0,Xc=e):Fn=0,pl(0,!1)}}function zv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fl(t)))}function Eo(){return Bv(),kv(),Ov(),Lv()}function Lv(){if(Be!==5)return!1;var e=os,t=Vc;Vc=0;var i=ou(xi),s=H.T,r=$.p;try{$.p=32>i?32:i,H.T=null,i=Fc,Fc=null;var n=os,l=xi;if(Be=0,Wr=os=null,xi=0,(Q&6)!==0)throw Error(y(331));var a=Q;if(Q|=4,Sv(n.current),pv(n,n.current,l,i),Q=a,pl(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(ol,n)}catch{}return!0}finally{$.p=r,H.T=s,zv(e,t)}}function F_(e,t,i){t=Ht(i,t),t=qc(e.stateNode,t,2),e=ls(e,t,2),e!==null&&(cl(e,2),ni(e))}function te(e,t,i){if(e.tag===3)F_(e,e,i);else for(;t!==null;){if(t.tag===3){F_(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(as===null||!as.has(s))){e=Ht(i,e),i=Zp(2),s=ls(t,i,2),s!==null&&(Qp(i,s,t,e),cl(s,2),ni(s));break}}t=t.return}}function sc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Hb;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)||(Pu=!0,r.add(i),e=Wb.bind(null,e,t,i),t.then(e,e))}function Wb(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ne===e&&(j&i)===i&&(Se===4||Se===3&&(j&62914560)===j&&300>bt()-bo?(Q&2)===0&&Pr(e,0):Vu|=i,Yr===j&&(Yr=0)),ni(e)}function Nv(e,t){t===0&&(t=Rg()),e=Xs(e,t),e!==null&&(cl(e,t),ni(e))}function Pb(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Nv(e,i)}function Vb(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(y(314))}s!==null&&s.delete(t),Nv(e,i)}function Fb(e,t){return lu(e,t)}var eo=null,gr=null,Gc=!1,to=!1,rc=!1,is=0;function ni(e){e!==gr&&e.next===null&&(gr===null?eo=gr=e:gr=gr.next=e),to=!0,Gc||(Gc=!0,Gb())}function pl(e,t){if(!rc&&to){rc=!0;do for(var i=!1,s=eo;s!==null;){if(!t)if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var l=s.suspendedLanes,a=s.pingedLanes;n=(1<<31-wt(42|e)+1)-1,n&=r&~(l&~a),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,X_(s,n))}else n=j,n=ho(s,s===ne?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||hl(s,n)||(i=!0,X_(s,n));s=s.next}while(i);rc=!1}}function Xb(){Hv()}function Hv(){to=Gc=!1;var e=0;is!==0&&tC()&&(e=is);for(var t=bt(),i=null,s=eo;s!==null;){var r=s.next,n=Uv(s,t);n===0?(s.next=null,i===null?eo=r:i.next=r,r===null&&(gr=i)):(i=s,(e!==0||(n&3)!==0)&&(to=!0)),s=r}Be!==0&&Be!==5||pl(e,!1),is!==0&&(is=0)}function Uv(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var l=31-wt(n),a=1<<l,o=r[l];o===-1?((a&i)===0||(a&s)!==0)&&(r[l]=Sy(a,t)):o<=t&&(e.expiredLanes|=a),n&=~a}if(t=ne,i=j,i=ho(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(ee===2||ee===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Oh(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||hl(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Oh(s),ou(i)){case 2:case 8:i=xg;break;case 32:i=Ha;break;case 268435456:i=Dg;break;default:i=Ha}return s=qv.bind(null,e),i=lu(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Oh(s),e.callbackPriority=2,e.callbackNode=null,2}function qv(e,t){if(Be!==0&&Be!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Eo()&&e.callbackNode!==i)return null;var s=j;return s=ho(e,e===ne?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ev(e,s,t),Uv(e,bt()),e.callbackNode!=null&&e.callbackNode===i?qv.bind(null,e):null)}function X_(e,t){if(Eo())return null;Ev(e,t,!0)}function Gb(){sC(function(){(Q&6)!==0?lu(Eg,Xb):Hv()})}function Xu(){if(is===0){var e=Ur;e===0&&(e=ia,ia<<=1,(ia&261888)===0&&(ia=256)),is=e}return is}function G_(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ya(""+e)}function j_(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 jb(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=G_((r[ft]||null).action),l=s.submitter;l&&(t=(t=l[ft]||null)?G_(t.formAction):l.getAttribute("formAction"),t!==null&&(n=t,l=null));var a=new co("action","action",null,s,r);e.push({event:a,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(is!==0){var o=l?j_(r,l):new FormData(r);Hc(i,{pending:!0,data:o,method:r.method,action:n},null,o)}}else typeof n=="function"&&(a.preventDefault(),o=l?j_(r,l):new FormData(r),Hc(i,{pending:!0,data:o,method:r.method,action:n},n,o))},currentTarget:r}]})}}for(_a=0;_a<xc.length;_a++)ga=xc[_a],I_=ga.toLowerCase(),Z_=ga[0].toUpperCase()+ga.slice(1),It(I_,"on"+Z_);var ga,I_,Z_,_a;It(Qg,"onAnimationEnd");It($g,"onAnimationIteration");It(Jg,"onAnimationStart");It("dblclick","onDoubleClick");It("focusin","onFocus");It("focusout","onBlur");It(db,"onTransitionRun");It(fb,"onTransitionStart");It(_b,"onTransitionCancel");It(ep,"onTransitionEnd");Nr("onMouseEnter",["mouseout","mouseover"]);Nr("onMouseLeave",["mouseout","mouseover"]);Nr("onPointerEnter",["pointerout","pointerover"]);Nr("onPointerLeave",["pointerout","pointerover"]);Ps("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ps("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ps("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ps("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ps("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ps("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var il="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(" "),Ib=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(il));function Kv(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 l=s.length-1;0<=l;l--){var a=s[l],o=a.instance,h=a.currentTarget;if(a=a.listener,o!==n&&r.isPropagationStopped())break e;n=a,r.currentTarget=h;try{n(r)}catch(u){qa(u)}r.currentTarget=null,n=o}else for(l=0;l<s.length;l++){if(a=s[l],o=a.instance,h=a.currentTarget,a=a.listener,o!==n&&r.isPropagationStopped())break e;n=a,r.currentTarget=h;try{n(r)}catch(u){qa(u)}r.currentTarget=null,n=o}}}}function F(e,t){var i=t[vc];i===void 0&&(i=t[vc]=new Set);var s=e+"__bubble";i.has(s)||(Yv(t,e,2,!1),i.add(s))}function nc(e,t,i){var s=0;t&&(s|=4),Yv(i,e,s,t)}var pa="_reactListening"+Math.random().toString(36).slice(2);function Gu(e){if(!e[pa]){e[pa]=!0,kg.forEach(function(i){i!=="selectionchange"&&(Ib.has(i)||nc(i,!1,e),nc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pa]||(t[pa]=!0,nc("selectionchange",!1,t))}}function Yv(e,t,i,s){switch(em(t)){case 2:var r=wC;break;case 8:r=EC;break;default:r=Qu}i=r.bind(null,t,i,e),r=void 0,!Cc||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 lc(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var l=s.tag;if(l===3||l===4){var a=s.stateNode.containerInfo;if(a===r)break;if(l===4)for(l=s.return;l!==null;){var o=l.tag;if((o===3||o===4)&&l.stateNode.containerInfo===r)return;l=l.return}for(;a!==null;){if(l=mr(a),l===null)return;if(o=l.tag,o===5||o===6||o===26||o===27){s=n=l;continue e}a=a.parentNode}}s=s.return}Kg(function(){var h=n,u=uu(i),c=[];e:{var d=tp.get(e);if(d!==void 0){var f=co,p=e;switch(e){case"keypress":if(Ca(i)===0)break e;case"keydown":case"keyup":f=Vy;break;case"focusin":p="focus",f=Uh;break;case"focusout":p="blur",f=Uh;break;case"beforeblur":case"afterblur":f=Uh;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":f=s_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=ky;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Gy;break;case Qg:case $g:case Jg:f=Ly;break;case ep:f=Iy;break;case"scroll":case"scrollend":f=Ay;break;case"wheel":f=Qy;break;case"copy":case"cut":case"paste":f=Hy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=n_;break;case"toggle":case"beforetoggle":f=Jy}var m=(t&4)!==0,C=!m&&(e==="scroll"||e==="scrollend"),_=m?d!==null?d+"Capture":null:d;m=[];for(var g=h,v;g!==null;){var S=g;if(v=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||v===null||_===null||(S=jn(g,_),S!=null&&m.push(sl(g,S,v))),C)break;g=g.return}0<m.length&&(d=new f(d,p,null,i,u),c.push({event:d,listeners:m}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",d&&i!==bc&&(p=i.relatedTarget||i.fromElement)&&(mr(p)||p[Xr]))break e;if((f||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,f?(p=i.relatedTarget||i.toElement,f=h,p=p?mr(p):null,p!==null&&(C=al(p),m=p.tag,p!==C||m!==5&&m!==27&&m!==6)&&(p=null)):(f=null,p=h),f!==p)){if(m=s_,S="onMouseLeave",_="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=n_,S="onPointerLeave",_="onPointerEnter",g="pointer"),C=f==null?d:Bn(f),v=p==null?d:Bn(p),d=new m(S,g+"leave",f,i,u),d.target=C,d.relatedTarget=v,S=null,mr(u)===h&&(m=new m(_,g+"enter",p,i,u),m.target=v,m.relatedTarget=C,S=m),C=S,f&&p)t:{for(m=Zb,_=f,g=p,v=0,S=_;S;S=m(S))v++;S=0;for(var w=g;w;w=m(w))S++;for(;0<v-S;)_=m(_),v--;for(;0<S-v;)g=m(g),S--;for(;v--;){if(_===g||g!==null&&_===g.alternate){m=_;break t}_=m(_),g=m(g)}m=null}else m=null;f!==null&&Q_(c,d,f,m,!1),p!==null&&C!==null&&Q_(c,C,p,m,!0)}}e:{if(d=h?Bn(h):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var O=h_;else if(o_(d))if(Xg)O=hb;else{O=ab;var D=lb}else f=d.nodeName,!f||f.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?h&&cu(h.elementType)&&(O=h_):O=ob;if(O&&(O=O(e,h))){Fg(c,O,i,u);break e}D&&D(e,d,h),e==="focusout"&&h&&d.type==="number"&&h.memoizedProps.value!=null&&yc(d,"number",d.value)}switch(D=h?Bn(h):window,e){case"focusin":(o_(D)||D.contentEditable==="true")&&(br=D,wc=h,Nn=null);break;case"focusout":Nn=wc=br=null;break;case"mousedown":Ec=!0;break;case"contextmenu":case"mouseup":case"dragend":Ec=!1,f_(c,i,u);break;case"selectionchange":if(ub)break;case"keydown":case"keyup":f_(c,i,u)}var N;if(_u)e:{switch(e){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else yr?Pg(e,i)&&(U="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(U="onCompositionStart");U&&(Wg&&i.locale!=="ko"&&(yr||U!=="onCompositionStart"?U==="onCompositionEnd"&&yr&&(N=Yg()):(Ji=u,du="value"in Ji?Ji.value:Ji.textContent,yr=!0)),D=io(h,U),0<D.length&&(U=new r_(U,e,null,i,u),c.push({event:U,listeners:D}),N?U.data=N:(N=Vg(i),N!==null&&(U.data=N)))),(N=tb?ib(e,i):sb(e,i))&&(U=io(h,"onBeforeInput"),0<U.length&&(D=new r_("onBeforeInput","beforeinput",null,i,u),c.push({event:D,listeners:U}),D.data=N)),jb(c,e,h,i,u)}Kv(c,t)})}function sl(e,t,i){return{instance:e,listener:t,currentTarget:i}}function io(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=jn(e,i),r!=null&&s.unshift(sl(e,r,n)),r=jn(e,t),r!=null&&s.push(sl(e,r,n))),e.tag===3)return s;e=e.return}return[]}function Zb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Q_(e,t,i,s,r){for(var n=t._reactName,l=[];i!==null&&i!==s;){var a=i,o=a.alternate,h=a.stateNode;if(a=a.tag,o!==null&&o===s)break;a!==5&&a!==26&&a!==27||h===null||(o=h,r?(h=jn(i,n),h!=null&&l.unshift(sl(i,h,o))):r||(h=jn(i,n),h!=null&&l.push(sl(i,h,o)))),i=i.return}l.length!==0&&e.push({event:t,listeners:l})}var Qb=/\r\n?/g,$b=/\u0000|\uFFFD/g;function $_(e){return(typeof e=="string"?e:""+e).replace(Qb,`
9
- `).replace($b,"")}function Wv(e,t){return t=$_(t),$_(e)===t}function ie(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Hr(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Hr(e,""+s);break;case"className":na(e,"class",s);break;case"tabIndex":na(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":na(e,i,s);break;case"style":qg(e,s,n);break;case"data":if(t!=="object"){na(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=ya(""+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"&&ie(e,t,"name",r.name,r,null),ie(e,t,"formEncType",r.formEncType,r,null),ie(e,t,"formMethod",r.formMethod,r,null),ie(e,t,"formTarget",r.formTarget,r,null)):(ie(e,t,"encType",r.encType,r,null),ie(e,t,"method",r.method,r,null),ie(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ya(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=bi);break;case"onScroll":s!=null&&F("scroll",e);break;case"onScrollEnd":s!=null&&F("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(y(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(y(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=ya(""+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":F("beforetoggle",e),F("toggle",e),Sa(e,"popover",s);break;case"xlinkActuate":fi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":fi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":fi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":fi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":fi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":fi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":fi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":fi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":fi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Sa(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=My.get(i)||i,Sa(e,i,s))}}function jc(e,t,i,s,r,n){switch(i){case"style":qg(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(y(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(y(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Hr(e,s):(typeof s=="number"||typeof s=="bigint")&&Hr(e,""+s);break;case"onScroll":s!=null&&F("scroll",e);break;case"onScrollEnd":s!=null&&F("scrollend",e);break;case"onClick":s!=null&&(e.onclick=bi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Og.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[ft]||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,""):Sa(e,i,s)}}}function Qe(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":F("error",e),F("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var l=i[n];if(l!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(y(137,t));default:ie(e,t,n,l,i,null)}}r&&ie(e,t,"srcSet",i.srcSet,i,null),s&&ie(e,t,"src",i.src,i,null);return;case"input":F("invalid",e);var a=n=l=r=null,o=null,h=null;for(s in i)if(i.hasOwnProperty(s)){var u=i[s];if(u!=null)switch(s){case"name":r=u;break;case"type":l=u;break;case"checked":o=u;break;case"defaultChecked":h=u;break;case"value":n=u;break;case"defaultValue":a=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(y(137,t));break;default:ie(e,t,s,u,i,null)}}Ng(e,n,a,o,h,l,r,!1);return;case"select":F("invalid",e),s=l=n=null;for(r in i)if(i.hasOwnProperty(r)&&(a=i[r],a!=null))switch(r){case"value":n=a;break;case"defaultValue":l=a;break;case"multiple":s=a;default:ie(e,t,r,a,i,null)}t=n,i=l,e.multiple=!!s,t!=null?Tr(e,!!s,t,!1):i!=null&&Tr(e,!!s,i,!0);return;case"textarea":F("invalid",e),n=r=s=null;for(l in i)if(i.hasOwnProperty(l)&&(a=i[l],a!=null))switch(l){case"value":s=a;break;case"defaultValue":r=a;break;case"children":n=a;break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(y(91));break;default:ie(e,t,l,a,i,null)}Ug(e,s,r,n);return;case"option":for(o in i)i.hasOwnProperty(o)&&(s=i[o],s!=null)&&(o==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":ie(e,t,o,s,i,null));return;case"dialog":F("beforetoggle",e),F("toggle",e),F("cancel",e),F("close",e);break;case"iframe":case"object":F("load",e);break;case"video":case"audio":for(s=0;s<il.length;s++)F(il[s],e);break;case"image":F("error",e),F("load",e);break;case"details":F("toggle",e);break;case"embed":case"source":case"link":F("error",e),F("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(h in i)if(i.hasOwnProperty(h)&&(s=i[h],s!=null))switch(h){case"children":case"dangerouslySetInnerHTML":throw Error(y(137,t));default:ie(e,t,h,s,i,null)}return;default:if(cu(t)){for(u in i)i.hasOwnProperty(u)&&(s=i[u],s!==void 0&&jc(e,t,u,s,i,void 0));return}}for(a in i)i.hasOwnProperty(a)&&(s=i[a],s!=null&&ie(e,t,a,s,i,null))}function Jb(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,l=null,a=null,o=null,h=null,u=null;for(f in i){var c=i[f];if(i.hasOwnProperty(f)&&c!=null)switch(f){case"checked":break;case"value":break;case"defaultValue":o=c;default:s.hasOwnProperty(f)||ie(e,t,f,null,s,c)}}for(var d in s){var f=s[d];if(c=i[d],s.hasOwnProperty(d)&&(f!=null||c!=null))switch(d){case"type":n=f;break;case"name":r=f;break;case"checked":h=f;break;case"defaultChecked":u=f;break;case"value":l=f;break;case"defaultValue":a=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(y(137,t));break;default:f!==c&&ie(e,t,d,f,s,c)}}Sc(e,l,a,o,h,u,n,r);return;case"select":f=l=a=d=null;for(n in i)if(o=i[n],i.hasOwnProperty(n)&&o!=null)switch(n){case"value":break;case"multiple":f=o;default:s.hasOwnProperty(n)||ie(e,t,n,null,s,o)}for(r in s)if(n=s[r],o=i[r],s.hasOwnProperty(r)&&(n!=null||o!=null))switch(r){case"value":d=n;break;case"defaultValue":a=n;break;case"multiple":l=n;default:n!==o&&ie(e,t,r,n,s,o)}t=a,i=l,s=f,d!=null?Tr(e,!!i,d,!1):!!s!=!!i&&(t!=null?Tr(e,!!i,t,!0):Tr(e,!!i,i?[]:"",!1));return;case"textarea":f=d=null;for(a in i)if(r=i[a],i.hasOwnProperty(a)&&r!=null&&!s.hasOwnProperty(a))switch(a){case"value":break;case"children":break;default:ie(e,t,a,null,s,r)}for(l in s)if(r=s[l],n=i[l],s.hasOwnProperty(l)&&(r!=null||n!=null))switch(l){case"value":d=r;break;case"defaultValue":f=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(y(91));break;default:r!==n&&ie(e,t,l,r,s,n)}Hg(e,d,f);return;case"option":for(var p in i)d=i[p],i.hasOwnProperty(p)&&d!=null&&!s.hasOwnProperty(p)&&(p==="selected"?e.selected=!1:ie(e,t,p,null,s,d));for(o in s)d=s[o],f=i[o],s.hasOwnProperty(o)&&d!==f&&(d!=null||f!=null)&&(o==="selected"?e.selected=d&&typeof d!="function"&&typeof d!="symbol":ie(e,t,o,d,s,f));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 m in i)d=i[m],i.hasOwnProperty(m)&&d!=null&&!s.hasOwnProperty(m)&&ie(e,t,m,null,s,d);for(h in s)if(d=s[h],f=i[h],s.hasOwnProperty(h)&&d!==f&&(d!=null||f!=null))switch(h){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(y(137,t));break;default:ie(e,t,h,d,s,f)}return;default:if(cu(t)){for(var C in i)d=i[C],i.hasOwnProperty(C)&&d!==void 0&&!s.hasOwnProperty(C)&&jc(e,t,C,void 0,s,d);for(u in s)d=s[u],f=i[u],!s.hasOwnProperty(u)||d===f||d===void 0&&f===void 0||jc(e,t,u,d,s,f);return}}for(var _ in i)d=i[_],i.hasOwnProperty(_)&&d!=null&&!s.hasOwnProperty(_)&&ie(e,t,_,null,s,d);for(c in s)d=s[c],f=i[c],!s.hasOwnProperty(c)||d===f||d==null&&f==null||ie(e,t,c,d,s,f)}function J_(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eC(){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,l=r.initiatorType,a=r.duration;if(n&&a&&J_(l)){for(l=0,a=r.responseEnd,s+=1;s<i.length;s++){var o=i[s],h=o.startTime;if(h>a)break;var u=o.transferSize,c=o.initiatorType;u&&J_(c)&&(o=o.responseEnd,l+=u*(o<a?1:(a-h)/(o-h)))}if(--s,t+=8*(n+l)/(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 Ic=null,Zc=null;function so(e){return e.nodeType===9?e:e.ownerDocument}function eg(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 Pv(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 Qc(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 ac=null;function tC(){var e=window.event;return e&&e.type==="popstate"?e===ac?!1:(ac=e,!0):(ac=null,!1)}var Vv=typeof setTimeout=="function"?setTimeout:void 0,iC=typeof clearTimeout=="function"?clearTimeout:void 0,tg=typeof Promise=="function"?Promise:void 0,sC=typeof queueMicrotask=="function"?queueMicrotask:typeof tg<"u"?function(e){return tg.resolve(null).then(e).catch(rC)}:Vv;function rC(e){setTimeout(function(){throw e})}function vs(e){return e==="head"}function ig(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),Fr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Xn(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Xn(i);for(var n=i.firstChild;n;){var l=n.nextSibling,a=n.nodeName;n[ul]||a==="SCRIPT"||a==="STYLE"||a==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=l}}else i==="body"&&Xn(e.ownerDocument.body);i=r}while(i);Fr(t)}function sg(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 $c(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":$c(i),hu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function nC(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[ul])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=Kt(e.nextSibling),e===null)break}return null}function lC(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Kt(e.nextSibling),e===null))return null;return e}function Fv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(e.nextSibling),e===null))return null;return e}function Jc(e){return e.data==="$?"||e.data==="$~"}function eu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aC(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 Kt(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 tu=null;function rg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Kt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function ng(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 Xv(e,t,i){switch(t=so(i),e){case"html":if(e=t.documentElement,!e)throw Error(y(452));return e;case"head":if(e=t.head,!e)throw Error(y(453));return e;case"body":if(e=t.body,!e)throw Error(y(454));return e;default:throw Error(y(451))}}function Xn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);hu(e)}var Yt=new Map,lg=new Set;function ro(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bi=$.d;$.d={f:oC,r:hC,D:cC,C:uC,L:dC,m:fC,X:gC,S:_C,M:pC};function oC(){var e=Bi.f(),t=Co();return e||t}function hC(e){var t=Gr(e);t!==null&&t.tag===5&&t.type==="form"?qp(t):Bi.r(e)}var Qr=typeof document>"u"?null:document;function Gv(e,t,i){var s=Qr;if(s&&typeof t=="string"&&t){var r=Nt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),lg.has(r)||(lg.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Qe(t,"link",e),Ue(t),s.head.appendChild(t)))}}function cC(e){Bi.D(e),Gv("dns-prefetch",e,null)}function uC(e,t){Bi.C(e,t),Gv("preconnect",e,t)}function dC(e,t,i){Bi.L(e,t,i);var s=Qr;if(s&&e&&t){var r='link[rel="preload"][as="'+Nt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Nt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Nt(i.imageSizes)+'"]')):r+='[href="'+Nt(e)+'"]';var n=r;switch(t){case"style":n=Vr(e);break;case"script":n=$r(e)}Yt.has(n)||(e=ce({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(vl(n))||t==="script"&&s.querySelector(ml(n))||(t=s.createElement("link"),Qe(t,"link",e),Ue(t),s.head.appendChild(t)))}}function fC(e,t){Bi.m(e,t);var i=Qr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Nt(s)+'"][href="'+Nt(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=$r(e)}if(!Yt.has(n)&&(e=ce({rel:"modulepreload",href:e},t),Yt.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ml(n)))return}s=i.createElement("link"),Qe(s,"link",e),Ue(s),i.head.appendChild(s)}}}function _C(e,t,i){Bi.S(e,t,i);var s=Qr;if(s&&e){var r=Mr(s).hoistableStyles,n=Vr(e);t=t||"default";var l=r.get(n);if(!l){var a={loading:0,preload:null};if(l=s.querySelector(vl(n)))a.loading=5;else{e=ce({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yt.get(n))&&ju(e,i);var o=l=s.createElement("link");Ue(o),Qe(o,"link",e),o._p=new Promise(function(h,u){o.onload=h,o.onerror=u}),o.addEventListener("load",function(){a.loading|=1}),o.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Aa(l,t,s)}l={type:"stylesheet",instance:l,count:1,state:a},r.set(n,l)}}}function gC(e,t){Bi.X(e,t);var i=Qr;if(i&&e){var s=Mr(i).hoistableScripts,r=$r(e),n=s.get(r);n||(n=i.querySelector(ml(r)),n||(e=ce({src:e,async:!0},t),(t=Yt.get(r))&&Iu(e,t),n=i.createElement("script"),Ue(n),Qe(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function pC(e,t){Bi.M(e,t);var i=Qr;if(i&&e){var s=Mr(i).hoistableScripts,r=$r(e),n=s.get(r);n||(n=i.querySelector(ml(r)),n||(e=ce({src:e,async:!0,type:"module"},t),(t=Yt.get(r))&&Iu(e,t),n=i.createElement("script"),Ue(n),Qe(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function ag(e,t,i,s){var r=(r=ss.current)?ro(r):null;if(!r)throw Error(y(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Vr(i.href),i=Mr(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=Vr(i.href);var n=Mr(r).hoistableStyles,l=n.get(e);if(l||(r=r.ownerDocument||r,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,l),(n=r.querySelector(vl(e)))&&!n._p&&(l.instance=n,l.state.loading=5),Yt.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},Yt.set(e,i),n||vC(r,e,i,l.state))),t&&s===null)throw Error(y(528,""));return l}if(t&&s!==null)throw Error(y(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$r(i),i=Mr(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(y(444,e))}}function Vr(e){return'href="'+Nt(e)+'"'}function vl(e){return'link[rel="stylesheet"]['+e+"]"}function jv(e){return ce({},e,{"data-precedence":e.precedence,precedence:null})}function vC(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}),Qe(t,"link",i),Ue(t),e.head.appendChild(t))}function $r(e){return'[src="'+Nt(e)+'"]'}function ml(e){return"script[async]"+e}function og(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Nt(i.href)+'"]');if(s)return t.instance=s,Ue(s),s;var r=ce({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ue(s),Qe(s,"style",r),Aa(s,i.precedence,e),t.instance=s;case"stylesheet":r=Vr(i.href);var n=e.querySelector(vl(r));if(n)return t.state.loading|=4,t.instance=n,Ue(n),n;s=jv(i),(r=Yt.get(r))&&ju(s,r),n=(e.ownerDocument||e).createElement("link"),Ue(n);var l=n;return l._p=new Promise(function(a,o){l.onload=a,l.onerror=o}),Qe(n,"link",s),t.state.loading|=4,Aa(n,i.precedence,e),t.instance=n;case"script":return n=$r(i.src),(r=e.querySelector(ml(n)))?(t.instance=r,Ue(r),r):(s=i,(r=Yt.get(n))&&(s=ce({},i),Iu(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ue(r),Qe(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(y(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Aa(s,i.precedence,e));return t.instance}function Aa(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,l=0;l<s.length;l++){var a=s[l];if(a.dataset.precedence===t)n=a;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 ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Iu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ba=null;function hg(e,t,i){if(Ba===null){var s=new Map,r=Ba=new Map;r.set(i,s)}else r=Ba,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[ul]||n[je]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var l=n.getAttribute(t)||"";l=e+l;var a=s.get(l);a?a.push(n):s.set(l,[n])}}return s}function cg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function mC(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 Iv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function SC(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=Vr(s.href),n=t.querySelector(vl(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=no.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,Ue(n);return}n=t.ownerDocument||t,s=jv(s),(r=Yt.get(r))&&ju(s,r),n=n.createElement("link"),Ue(n);var l=n;l._p=new Promise(function(a,o){l.onload=a,l.onerror=o}),Qe(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=no.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var oc=0;function yC(e,t){return e.stylesheets&&e.count===0&&ka(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ka(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&oc===0&&(oc=62500*eC());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ka(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>oc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function no(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ka(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var lo=null;function ka(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lo=new Map,t.forEach(bC,e),lo=null,no.call(e))}function bC(e,t){if(!(t.state.loading&4)){var i=lo.get(e);if(i)var s=i.get(null);else{i=new Map,lo.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var l=r[n];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(i.set(l.dataset.precedence,l),s=l)}s&&i.set(null,s)}r=t.instance,l=r.getAttribute("data-precedence"),n=i.get(l)||s,n===s&&i.set(null,r),i.set(l,r),this.count++,s=no.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 rl={$$typeof:yi,Provider:null,Consumer:null,_currentValue:Os,_currentValue2:Os,_threadCount:0};function CC(e,t,i,s,r,n,l,a,o){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=zh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.hiddenUpdates=zh(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Zv(e,t,i,s,r,n,l,a,o,h,u,c){return e=new CC(e,t,i,l,o,h,u,c,a),t=1,n===!0&&(t|=24),n=St(3,null,null,t),e.current=n,n.stateNode=e,t=bu(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},Eu(n),e}function Qv(e){return e?(e=Er,e):Er}function $v(e,t,i,s,r,n){r=Qv(r),s.context===null?s.context=r:s.pendingContext=r,s=ns(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=ls(e,s,t),i!==null&&(dt(i,e,t),Un(i,e,t))}function ug(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Zu(e,t){ug(e,t),(e=e.alternate)&&ug(e,t)}function Jv(e){if(e.tag===13||e.tag===31){var t=Xs(e,67108864);t!==null&&dt(t,e,67108864),Zu(e,67108864)}}function dg(e){if(e.tag===13||e.tag===31){var t=Et();t=au(t);var i=Xs(e,t);i!==null&&dt(i,e,t),Zu(e,t)}}var ao=!0;function wC(e,t,i,s){var r=H.T;H.T=null;var n=$.p;try{$.p=2,Qu(e,t,i,s)}finally{$.p=n,H.T=r}}function EC(e,t,i,s){var r=H.T;H.T=null;var n=$.p;try{$.p=8,Qu(e,t,i,s)}finally{$.p=n,H.T=r}}function Qu(e,t,i,s){if(ao){var r=iu(s);if(r===null)lc(e,t,s,oo,i),fg(e,s);else if(DC(r,e,t,i,s))s.stopPropagation();else if(fg(e,s),t&4&&-1<xC.indexOf(e)){for(;r!==null;){var n=Gr(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var l=As(n.pendingLanes);if(l!==0){var a=n;for(a.pendingLanes|=2,a.entangledLanes|=2;l;){var o=1<<31-wt(l);a.entanglements[1]|=o,l&=~o}ni(n),(Q&6)===0&&(Qa=bt()+500,pl(0,!1))}}break;case 31:case 13:a=Xs(n,2),a!==null&&dt(a,n,2),Co(),Zu(n,2)}if(n=iu(s),n===null&&lc(e,t,s,oo,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else lc(e,t,s,null,i)}}function iu(e){return e=uu(e),$u(e)}var oo=null;function $u(e){if(oo=null,e=mr(e),e!==null){var t=al(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=Sg(t),e!==null)return e;e=null}else if(i===31){if(e=yg(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 oo=e,null}function em(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(dy()){case Eg:return 2;case xg:return 8;case Ha:case fy:return 32;case Dg:return 268435456;default:return 32}default:return 32}}var su=!1,hs=null,cs=null,us=null,nl=new Map,ll=new Map,Qi=[],xC="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 fg(e,t){switch(e){case"focusin":case"focusout":hs=null;break;case"dragenter":case"dragleave":cs=null;break;case"mouseover":case"mouseout":us=null;break;case"pointerover":case"pointerout":nl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ll.delete(t.pointerId)}}function Rn(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=Gr(t),t!==null&&Jv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function DC(e,t,i,s,r){switch(t){case"focusin":return hs=Rn(hs,e,t,i,s,r),!0;case"dragenter":return cs=Rn(cs,e,t,i,s,r),!0;case"mouseover":return us=Rn(us,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return nl.set(n,Rn(nl.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,ll.set(n,Rn(ll.get(n)||null,e,t,i,s,r)),!0}return!1}function tm(e){var t=mr(e.target);if(t!==null){var i=al(t);if(i!==null){if(t=i.tag,t===13){if(t=Sg(i),t!==null){e.blockedOn=t,Zf(e.priority,function(){dg(i)});return}}else if(t===31){if(t=yg(i),t!==null){e.blockedOn=t,Zf(e.priority,function(){dg(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 Oa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=iu(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);bc=s,i.target.dispatchEvent(s),bc=null}else return t=Gr(i),t!==null&&Jv(t),e.blockedOn=i,!1;t.shift()}return!0}function _g(e,t,i){Oa(e)&&i.delete(t)}function RC(){su=!1,hs!==null&&Oa(hs)&&(hs=null),cs!==null&&Oa(cs)&&(cs=null),us!==null&&Oa(us)&&(us=null),nl.forEach(_g),ll.forEach(_g)}function va(e,t){e.blockedOn===t&&(e.blockedOn=null,su||(su=!0,ke.unstable_scheduleCallback(ke.unstable_NormalPriority,RC)))}var ma=null;function gg(e){ma!==e&&(ma=e,ke.unstable_scheduleCallback(ke.unstable_NormalPriority,function(){ma===e&&(ma=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($u(s||i)===null)continue;break}var n=Gr(i);n!==null&&(e.splice(t,3),t-=3,Hc(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Fr(e){function t(o){return va(o,e)}hs!==null&&va(hs,e),cs!==null&&va(cs,e),us!==null&&va(us,e),nl.forEach(t),ll.forEach(t);for(var i=0;i<Qi.length;i++){var s=Qi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qi.length&&(i=Qi[0],i.blockedOn===null);)tm(i),i.blockedOn===null&&Qi.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],l=r[ft]||null;if(typeof n=="function")l||gg(i);else if(l){var a=null;if(n&&n.hasAttribute("formAction")){if(r=n,l=n[ft]||null)a=l.formAction;else if($u(r)!==null)continue}else a=l.action;typeof a=="function"?i[s+1]=a:(i.splice(s,3),s-=3),gg(i)}}}function im(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(l){return r=l})},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 Ju(e){this._internalRoot=e}xo.prototype.render=Ju.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(y(409));var i=t.current,s=Et();$v(i,s,e,t,null,null)};xo.prototype.unmount=Ju.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$v(e.current,2,null,e,null,null),Co(),t[Xr]=null}};function xo(e){this._internalRoot=e}xo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bg();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Qi.length&&t!==0&&t<Qi[i].priority;i++);Qi.splice(i,0,e),i===0&&tm(e)}};var pg=vg.version;if(pg!=="19.2.4")throw Error(y(527,pg,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(y(188)):(e=Object.keys(e).join(","),Error(y(268,e)));return e=ny(t),e=e!==null?bg(e):null,e=e===null?null:e.stateNode,e};var MC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Mn=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Mn.isDisabled&&Mn.supportsFiber))try{ol=Mn.inject(MC),Ct=Mn}catch{}var Mn;Do.createRoot=function(e,t){if(!mg(e))throw Error(y(299));var i=!1,s="",r=Gp,n=jp,l=Ip;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&&(l=t.onRecoverableError)),t=Zv(e,1,!1,null,null,i,s,null,r,n,l,im),e[Xr]=t.current,Gu(e),new Ju(t)};Do.hydrateRoot=function(e,t,i){if(!mg(e))throw Error(y(299));var s=!1,r="",n=Gp,l=jp,a=Ip,o=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&&(l=i.onCaughtError),i.onRecoverableError!==void 0&&(a=i.onRecoverableError),i.formState!==void 0&&(o=i.formState)),t=Zv(e,1,!0,t,i??null,s,r,o,n,l,a,im),t.context=Qv(null),i=t.current,s=Et(),s=au(s),r=ns(s),r.callback=null,ls(i,r,s),i=s,t.current.lanes=i,cl(t,i),ni(t),e[Xr]=t.current,Gu(e),new xo(t)};Do.version="19.2.4"});var lm=$t((jx,nm)=>{"use strict";function rm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rm)}catch(e){console.error(e)}}rm(),nm.exports=sm()});var um=$t(Mo=>{"use strict";var AC=Symbol.for("react.transitional.element"),BC=Symbol.for("react.fragment");function cm(e,t,i){var s=null;if(i!==void 0&&(s=""+i),t.key!==void 0&&(s=""+t.key),"key"in t){i={};for(var r in t)r!=="key"&&(i[r]=t[r])}else i=t;return t=i.ref,{$$typeof:AC,type:e,key:s,ref:t!==void 0?t:null,props:i}}Mo.Fragment=BC;Mo.jsx=cm;Mo.jsxs=cm});var z=$t((Qx,dm)=>{"use strict";dm.exports=um()});var A1=A(Xe(),1),B1=A(lm(),1);var Ho=A(Xe(),1);var ed={"assist-draft":{label:"\u25B6 /draft",args:["draft"]},"assist-bug":{label:"\u25B6 /bug",args:["bug"]},"assist-next":{label:"\u25B6 /next",args:["next"]}};function td(e){return e in ed}function TC(e){return[...ed[e].args]}function am(e,t,i,s){if(td(e)&&t){i(TC(e),t);return}s(e)}var om=[{value:"free",label:"Free"},...Object.entries(ed).map(([e,{label:t}])=>({value:e,label:t}))],hm="Enter prompt...";function Ro(e){return{padding:"5px 10px",fontSize:13,border:"1px solid",borderColor:e?"#007acc":"#555",borderRadius:3,background:e?"#007acc":"transparent",color:e?"#fff":"#ccc",cursor:"pointer",transition:"all 0.15s"}}var ms={flex:1,padding:"6px 10px",background:"#3c3c3c",border:"1px solid #555",borderRadius:4,color:"#d4d4d4",fontSize:13,outline:"none"};function ki(e,t){e.currentTarget.style.borderColor=t}var mm=A(Xe(),1);var en=A(Xe(),1);var Jr=A(z(),1),kC={padding:"4px 8px",fontSize:11,background:"#007acc",border:"none",borderRadius:4,color:"#fff",cursor:"pointer"},OC={padding:"4px 8px",fontSize:11,background:"none",border:"1px solid #555",borderRadius:4,color:"#999",cursor:"pointer"};function fm({onConfirm:e,onCancel:t}){let[i,s]=(0,en.useState)(""),r=(0,en.useRef)(null);return(0,en.useEffect)(()=>{r.current?.focus()},[]),(0,Jr.jsxs)("form",{onSubmit:n=>{n.preventDefault(),n.stopPropagation();let l=i.trim();l&&e(l)},style:{display:"flex",gap:4},children:[(0,Jr.jsx)("input",{ref:r,value:i,onChange:n=>s(n.target.value),placeholder:"/path/to/repo",style:{...ms,fontSize:12},onKeyDown:n=>{n.key==="Escape"&&t()}}),(0,Jr.jsx)("button",{type:"submit",style:kC,children:"OK"}),(0,Jr.jsx)("button",{type:"button",onClick:t,style:OC,children:"Cancel"})]})}var To=A(Xe(),1);var Sl=A(z(),1),zC={display:"flex",alignItems:"center",gap:4,padding:"4px 8px",fontSize:11,color:"#ccc",background:"#333",border:"1px solid #444",borderRadius:4,cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",font:"inherit"};function _m({label:e,open:t,onClick:i}){return(0,Sl.jsxs)("button",{type:"button",style:zC,onClick:i,children:[(0,Sl.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:e}),(0,Sl.jsx)("span",{style:{fontSize:9},children:t?"\u25B2":"\u25BC"})]})}var Bo=A(z(),1),id={position:"absolute",top:"100%",left:0,right:0,marginTop:2,background:"#2d2d2d",border:"1px solid #444",borderRadius:4,maxHeight:200,overflowY:"auto",zIndex:10},gm={...id,top:void 0,marginTop:void 0,bottom:"100%",marginBottom:2};function Ao({label:e,children:t}){let[i,s]=(0,To.useState)(!1),r=(0,To.useRef)(null);return(0,Bo.jsxs)("fieldset",{ref:r,style:{position:"relative",border:"none",margin:0,padding:0},onBlur:n=>{r.current?.contains(n.relatedTarget)||s(!1)},children:[(0,Bo.jsx)(_m,{label:e,open:i,onClick:()=>s(!i)}),i&&t(()=>s(!1))]})}var yl=A(z(),1),pm=e=>({display:"block",width:"100%",padding:"6px 8px",fontSize:12,color:e?"#fff":"#ccc",background:e?"#007acc":"none",cursor:"pointer",border:"none",textAlign:"left",font:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"});function sd(e){let t=e.includes("\\")?"\\":"/";return e.split(t).filter(Boolean).pop()??e}function vm({repos:e,selected:t,onSelect:i,onCustom:s,close:r}){return(0,yl.jsxs)("div",{style:gm,children:[e.map(n=>(0,yl.jsx)("button",{type:"button",style:pm(n===t),title:n,onClick:()=>{i(n),r()},children:sd(n)},n)),(0,yl.jsx)("button",{type:"button",style:{...pm(!1),borderTop:"1px solid #444",color:"#888",fontStyle:"italic"},onClick:()=>{r(),s()},children:"Custom path..."})]})}var ko=A(z(),1);function Sm({repos:e,selected:t,onSelect:i}){let[s,r]=(0,mm.useState)(!1);return s?(0,ko.jsx)(fm,{onConfirm:n=>{i(n),r(!1)},onCancel:()=>r(!1)}):(0,ko.jsx)(Ao,{label:t?sd(t):"Select repo...",children:n=>(0,ko.jsx)(vm,{repos:e,selected:t,onSelect:i,onCustom:()=>r(!0),close:n})})}var js=A(z(),1);function ym({repos:e,selectedCwd:t,onSelectCwd:i,runFilter:s,onFilterChange:r,showFilter:n}){return(0,js.jsxs)(js.Fragment,{children:[(0,js.jsx)(Sm,{repos:e,selected:t,onSelect:i}),n&&(0,js.jsx)("input",{type:"text",value:s,onChange:l=>r(l.target.value),placeholder:"Filter runs...",style:ms,onFocus:l=>ki(l,"#007acc"),onBlur:l=>ki(l,"#555")})]})}var Cm=A(z(),1);function LC(e){return(e.params?.length??0)>0}function bm({config:e,active:t,onClick:i}){return(0,Cm.jsxs)("button",{type:"button",onClick:i,style:Ro(t),children:[!LC(e)&&"\u25B6 ",e.name]})}var tn=A(z(),1),NC=10;function wm({mode:e,onSelectMode:t,runConfigs:i,totalRunCount:s,selectedRun:r,onSelectRun:n}){let l=i.slice(0,NC),a=s-l.length;return(0,tn.jsxs)("div",{style:{display:"flex",gap:4,flexWrap:"wrap",alignItems:"center"},children:[om.map(o=>(0,tn.jsx)("button",{type:"button",onClick:()=>{n(null),t(o.value)},style:Ro(!r&&e===o.value),children:o.label},o.value)),l.map(o=>(0,tn.jsx)(bm,{config:o,active:r===o.name,onClick:()=>n(o.name)},o.name)),a>0&&(0,tn.jsxs)("span",{style:{fontSize:11,color:"#888"},children:["+",a," more"]})]})}var bl=A(z(),1),HC={padding:"6px 12px",background:"#007acc",border:"none",borderRadius:4,color:"#fff",fontSize:13,cursor:"pointer",whiteSpace:"nowrap"};function Em({prompt:e,setPrompt:t}){return(0,bl.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,bl.jsx)("input",{value:e,onChange:i=>t(i.target.value),placeholder:hm,style:ms,onFocus:i=>ki(i,"#007acc"),onBlur:i=>ki(i,"#555")}),(0,bl.jsx)("button",{type:"submit",style:HC,children:"Start"})]})}var sn=A(z(),1),UC={padding:"6px 12px",background:"#007acc",border:"none",borderRadius:4,color:"#fff",fontSize:13,cursor:"pointer",whiteSpace:"nowrap"},qC={fontSize:11,color:"#999",marginBottom:2};function KC(e){let t=e.description?` \u2014 ${e.description}`:"";return e.required?`${e.name} *${t}`:`${e.name}${t}`}function xm({config:e,values:t,onChange:i}){let s=e.params??[],r=(n,l)=>i({...t,[n]:l});return(0,sn.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[s.map(n=>(0,sn.jsxs)("label",{style:{display:"flex",flexDirection:"column",...qC},children:[KC(n),(0,sn.jsx)("input",{value:t[n.name]??n.default??"",onChange:l=>r(n.name,l.target.value),placeholder:n.default??"",style:ms,onFocus:l=>ki(l,"#007acc"),onBlur:l=>ki(l,"#555")})]},n.name)),(0,sn.jsxs)("button",{type:"submit",style:UC,children:["Run ",e.name]})]})}var Ss=A(z(),1);function Dm({form:e,totalRunCount:t}){let i=e.selectedRun?e.filteredRunConfigs.find(r=>r.name===e.selectedRun):null,s=!td(e.mode)&&!e.selectedRun;return(0,Ss.jsxs)(Ss.Fragment,{children:[(0,Ss.jsx)(wm,{mode:e.mode,onSelectMode:e.handleSelectMode,runConfigs:e.filteredRunConfigs,totalRunCount:t,selectedRun:e.selectedRun,onSelectRun:e.handleSelectRun}),e.selectedRun&&i?(0,Ss.jsx)(xm,{config:i,values:e.runParams,onChange:e.setRunParams}):s?(0,Ss.jsx)(Em,{prompt:e.prompt,setPrompt:e.setPrompt}):null]})}var Is=A(Xe(),1);function Rm(e,t,i,s){return e&&!t.find(n=>n.name===e)?.params?.length?(s(e,[],i),null):e}function Mm(e,t,i){i(e.trim(),t)}function Tm(e,t){return(e?.params??[]).map(i=>t[i.name]?.trim()).filter(Boolean)}function Am(e){if(e.selectedRun){let t=e.configs.find(i=>i.name===e.selectedRun);return e.onCreateRun(e.selectedRun,Tm(t,e.runParams),e.cwd),"run"}return Mm(e.prompt,e.cwd,e.onCreate),"claude"}var Oo=A(Xe(),1);function Bm(e,t){if(!t)return!0;let s=(t.includes("*")?t:`*${t}*`).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${s}$`,"i").test(e)}function km(e){let[t,i]=(0,Oo.useState)(""),s=(0,Oo.useMemo)(()=>e.filter(r=>Bm(r.name,t)),[e,t]);return{runFilter:t,setRunFilter:i,filteredRunConfigs:s}}function Om(e){let{runConfigs:t,selectedCwd:i,onCreateRun:s,onRequestRunConfigs:r}=e,[n,l]=(0,Is.useState)("free"),[a,o]=(0,Is.useState)(""),[h,u]=(0,Is.useState)(null),[c,d]=(0,Is.useState)({}),f=km(t);return(0,Is.useEffect)(()=>{i&&r(i)},[i,r]),{mode:n,prompt:a,setPrompt:o,selectedRun:h,runParams:c,setRunParams:d,...f,handleSelectRun(p){u(Rm(p,t,i,s)),d({})},handleSelectMode(p){u(null),am(p,i,e.onCreateAssist,l)},handleSubmit(p){if(p.preventDefault(),!i)return;Am({selectedRun:h,runParams:c,prompt:a,cwd:i,configs:t,onCreate:e.onCreate,onCreateRun:e.onCreateRun})==="run"?d({}):o("")}}}var rn=A(Xe(),1);function zm(e,t){let i=new Set;e&&i.add(e);for(let s of t)s.cwd&&i.add(s.cwd);return[...i].sort((s,r)=>s.localeCompare(r))}function Lm(e,t){let[i,s]=(0,rn.useState)(e);return(0,rn.useEffect)(()=>{e&&!i&&s(e)},[e,i]),{repos:(0,rn.useMemo)(()=>zm(e,t),[e,t]),selectedCwd:i,setSelectedCwd:s}}var nn=A(z(),1);function Nm(e){let{currentCwd:t,history:i,runConfigs:s}=e,{repos:r,selectedCwd:n,setSelectedCwd:l}=Lm(t,i),a=Om({...e,selectedCwd:n}),o=n!=="";return(0,nn.jsxs)("form",{onSubmit:a.handleSubmit,style:{padding:12,borderTop:"1px solid #333",display:"flex",flexDirection:"column",gap:8},children:[(0,nn.jsx)(ym,{repos:r,selectedCwd:n,onSelectCwd:l,runFilter:a.runFilter,onFilterChange:a.setRunFilter,showFilter:s.length>0}),o?(0,nn.jsx)(Dm,{form:a,totalRunCount:s.length}):(0,nn.jsx)("div",{style:{color:"#888",fontSize:12,padding:"6px 0"},children:"Select a repo above to create a session"})]})}var zo={background:"none",border:"none",color:"#888",cursor:"pointer",lineHeight:1,padding:"2px 4px",borderRadius:"50%",transition:"background 0.15s, color 0.15s"};function ln(e,t){e.currentTarget.style.background=t?"#4a4a4a":"none",e.currentTarget.style.color=t?"#d4d4d4":"#888"}var Um=A(z(),1);function Hm({onDismiss:e}){return(0,Um.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),e()},onMouseEnter:t=>ln(t,!0),onMouseLeave:t=>ln(t,!1),style:{...zo,fontSize:16},title:"Dismiss",children:"\xD7"})}var Km=A(z(),1);function qm({onRetry:e}){return(0,Km.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),e()},onMouseEnter:t=>ln(t,!0),onMouseLeave:t=>ln(t,!1),style:{...zo,fontSize:14},title:"Retry",children:"\u21BB"})}var Oi=A(z(),1),YC={running:"#4ec9b0",waiting:"#dcdcaa",done:"#569cd6"},WC={fontSize:13,color:"#d4d4d4",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1};function Ym(e){return{display:"block",width:"100%",textAlign:"left",padding:"10px 12px",marginBottom:4,borderRadius:6,background:e?"#37373d":"#2d2d2d",border:e?"1px solid #007acc":"1px solid transparent",cursor:"pointer",transition:"background 0.15s",font:"inherit",color:"inherit"}}function Wm({status:e,elapsed:t}){return(0,Oi.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:4},children:[(0,Oi.jsxs)("span",{style:{fontSize:11,color:YC[e]},children:["\u25CF ",e]}),(0,Oi.jsx)("span",{style:{fontSize:11,color:"#888"},children:t})]})}function Pm({name:e,isDone:t,onRetry:i,onDismiss:s}){return(0,Oi.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,Oi.jsx)("span",{style:WC,children:e}),t&&i&&(0,Oi.jsx)(qm,{onRetry:i}),t&&(0,Oi.jsx)(Hm,{onDismiss:s})]})}var Lo=A(Xe(),1);function Vm(e){let[,t]=(0,Lo.useState)(0);(0,Lo.useEffect)(()=>{let n=setInterval(()=>t(l=>l+1),1e3);return()=>clearInterval(n)},[]);let i=Math.floor((Date.now()-e)/1e3),s=Math.floor(i/60),r=i%60;return s>=60?`${Math.floor(s/60)}h ${s%60}m`:s>0?`${s}m ${r}s`:`${r}s`}var Cl=A(z(),1);function Fm({session:e,active:t,onClick:i,onRetry:s,onDismiss:r}){let n=Vm(e.startedAt),l=(a,o)=>{t||(a.currentTarget.style.background=o?"#333":"#2d2d2d")};return(0,Cl.jsxs)("button",{type:"button",onClick:i,style:Ym(t),onMouseEnter:a=>l(a,!0),onMouseLeave:a=>l(a,!1),children:[(0,Cl.jsx)(Pm,{name:e.name,isDone:e.status==="done",onRetry:s,onDismiss:r}),(0,Cl.jsx)(Wm,{status:e.status,elapsed:n})]})}var wl=A(z(),1);function Xm({sessions:e,activeId:t,onSelect:i,onRetry:s,onDismiss:r}){return(0,wl.jsxs)("div",{style:{flex:1,overflow:"auto",padding:8},children:[e.map(n=>(0,wl.jsx)(Fm,{session:n,active:n.id===t,onClick:()=>i(n.id),onRetry:n.commandType==="run"&&n.status==="done"?()=>s(n.id):void 0,onDismiss:()=>r(n.id)},n.id)),e.length===0&&(0,wl.jsx)("div",{style:{padding:16,textAlign:"center",color:"#666",fontSize:13},children:"No sessions yet"})]})}var Zs=A(z(),1);function Gm({sessions:e,activeId:t,currentCwd:i,history:s,run:r,onSelect:n,onCreate:l,onCreateAssist:a,onRetry:o,onDismiss:h}){return(0,Zs.jsxs)(Zs.Fragment,{children:[(0,Zs.jsx)(Xm,{sessions:e,activeId:t,onSelect:n,onRetry:o,onDismiss:h}),(0,Zs.jsx)(Nm,{currentCwd:i,history:s,runConfigs:r.configs,onCreate:l,onCreateRun:r.create,onCreateAssist:a,onRequestRunConfigs:r.requestConfigs})]})}var No=A(Xe(),1);function jm(e){let t=Date.now()-new Date(e).getTime(),i=Math.floor(t/1e3);if(i<60)return"just now";let s=Math.floor(i/60);if(s<60)return`${s}m ago`;let r=Math.floor(s/60);if(r<24)return`${r}h ago`;let n=Math.floor(r/24);return n<30?`${n}d ago`:`${Math.floor(n/30)}mo ago`}var Qs=A(z(),1),PC={display:"block",width:"100%",textAlign:"left",padding:"10px 12px",marginBottom:4,borderRadius:6,background:"#2d2d2d",border:"1px solid transparent",cursor:"pointer",transition:"background 0.15s",font:"inherit",color:"inherit"},VC={fontSize:13,color:"#d4d4d4",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FC={display:"flex",justifyContent:"space-between",marginTop:4};function Im({session:e,onResume:t}){let i=(s,r)=>{s.currentTarget.style.background=r?"#333":"#2d2d2d"};return(0,Qs.jsxs)("button",{type:"button",style:PC,onClick:()=>t(e),onMouseEnter:s=>i(s,!0),onMouseLeave:s=>i(s,!1),children:[(0,Qs.jsx)("div",{style:VC,children:e.name}),(0,Qs.jsxs)("div",{style:FC,children:[(0,Qs.jsx)("span",{style:{fontSize:11,color:"#569cd6"},children:e.project}),(0,Qs.jsx)("span",{style:{fontSize:11,color:"#888"},children:jm(e.timestamp)})]})]})}var El=A(z(),1),XC=e=>({display:"flex",alignItems:"center",gap:6,padding:"6px 8px",fontSize:12,color:e?"#d4d4d4":"#999",cursor:"pointer",background:"none",border:"none",width:"100%",textAlign:"left",font:"inherit"}),GC=e=>({width:14,height:14,border:"1px solid #555",borderRadius:2,background:e?"#007acc":"transparent",flexShrink:0});function Zm({items:e,selected:t,onToggle:i}){return(0,El.jsx)("div",{style:id,children:e.map(s=>(0,El.jsxs)("button",{type:"button",style:XC(t.has(s)),onClick:()=>i(s),children:[(0,El.jsx)("span",{style:GC(t.has(s))}),s]},s))})}var rd=A(z(),1);function jC(e){return e.size===0?"All projects":e.size===1?[...e][0]:`${e.size} projects`}function Qm({projects:e,selected:t,onChange:i}){let s=r=>{let n=new Set(t);n.has(r)?n.delete(r):n.add(r),i(n)};return(0,rd.jsx)(Ao,{label:jC(t),children:()=>(0,rd.jsx)(Zm,{items:e,selected:t,onToggle:s})})}var zi=A(z(),1);function IC(e){let t=new Set;for(let i of e)t.add(i.project);return[...t].sort()}function ZC(e,t){return t.size===0?e:e.filter(i=>t.has(i.project))}function QC({hasAny:e}){return(0,zi.jsx)("div",{style:{padding:16,textAlign:"center",color:"#666",fontSize:13},children:e?"No sessions match filter":"No session history"})}function $m({sessions:e,onResume:t}){let[i,s]=(0,No.useState)(new Set),r=(0,No.useMemo)(()=>IC(e),[e]),n=ZC(e,i);return(0,zi.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[r.length>1&&(0,zi.jsx)("div",{style:{padding:"8px 8px 0"},children:(0,zi.jsx)(Qm,{projects:r,selected:i,onChange:s})}),(0,zi.jsxs)("div",{style:{flex:1,overflow:"auto",padding:8},children:[n.map(l=>(0,zi.jsx)(Im,{session:l,onResume:t},l.sessionId)),n.length===0&&(0,zi.jsx)(QC,{hasAny:e.length>0})]})]})}var $s=A(z(),1),Jm=e=>({flex:1,padding:"8px 0",fontSize:12,fontWeight:600,letterSpacing:.5,textTransform:"uppercase",color:e?"#ccc":"#666",background:"none",border:"none",borderBottom:e?"2px solid #007acc":"2px solid transparent",cursor:"pointer",font:"inherit"}),e0={color:"#666",fontWeight:400};function t0({tab:e,activeCount:t,historyCount:i,onChange:s}){return(0,$s.jsxs)("div",{style:{display:"flex",borderBottom:"1px solid #333"},children:[(0,$s.jsxs)("button",{type:"button",style:Jm(e==="active"),onClick:()=>s("active"),children:["Active ",(0,$s.jsx)("span",{style:e0,children:t})]}),(0,$s.jsxs)("button",{type:"button",style:Jm(e==="history"),onClick:()=>s("history"),children:["History ",(0,$s.jsx)("span",{style:e0,children:i})]})]})}var an=A(z(),1);function i0(e){return(0,an.jsxs)("div",{style:{width:280,minWidth:280,borderRight:"1px solid #333",display:"flex",flexDirection:"column",background:"#252526"},children:[(0,an.jsx)(t0,{tab:e.tab,activeCount:e.sessions.length,historyCount:e.history.length,onChange:e.onTabChange}),e.tab==="active"?(0,an.jsx)(Gm,{sessions:e.sessions,activeId:e.activeId,currentCwd:e.currentCwd,history:e.history,run:e.run,onSelect:e.onSelect,onCreate:e.onCreate,onCreateAssist:e.onCreateAssist,onRetry:e.onRetry,onDismiss:e.onDismiss}):(0,an.jsx)($m,{sessions:e.history,onResume:e.onResume})]})}var r0=A(z(),1);function s0({socket:e,tab:t,onTabChange:i}){let s=(0,Ho.useCallback)(n=>{e.resumeSession(n.sessionId,n.cwd,n.name),i("active")},[e.resumeSession,i]),r=(0,Ho.useMemo)(()=>({configs:e.runConfigs,create:e.createRunSession,requestConfigs:e.requestRunConfigs}),[e.runConfigs,e.createRunSession,e.requestRunConfigs]);return(0,r0.jsx)(i0,{sessions:e.sessions,history:e.history,run:r,activeId:e.activeId,currentCwd:e.currentCwd,tab:t,onTabChange:i,onSelect:e.setActiveId,onCreate:e.createSession,onCreateAssist:e.createAssistSession,onResume:s,onRetry:e.retrySession,onDismiss:e.dismissSession})}var fn=A(Xe(),1);var $C=2,JC=1,n0=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),l={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},a=l.top+l.bottom,o=l.right+l.left,h=s-a,u=r-o-t;return{cols:Math.max($C,Math.floor(u/e.css.cell.width)),rows:Math.max(JC,Math.floor(h/e.css.cell.height))}}};var hS=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,tw=(e,t)=>{for(var i in t)hS(e,i,{get:t[i],enumerable:!0})},be=(e,t,i,s)=>{for(var r=s>1?void 0:s?ew(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(r=(s?l(t,i,r):l(r))||r);return s&&r&&hS(t,i,r),r},B=(e,t)=>(i,s)=>t(i,s,e),l0="Terminal input",bd={get:()=>l0,set:e=>l0=e},a0="Too much output to announce, navigate to rows manually to read",Cd={get:()=>a0,set:e=>a0=e};function iw(e){return e.replace(/\r?\n/g,"\r")}function sw(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function rw(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function nw(e,t,i,s){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");cS(r,t,i,s)}}function cS(e,t,i,s){e=iw(e),e=sw(e,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function uS(e,t,i){let s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function o0(e,t,i,s,r){uS(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Es(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function oh(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let n=e[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var lw=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){let n=e.charCodeAt(r++);56320<=n&&n<=57343?t[s++]=(this._interim-55296)*1024+n-56320+65536:(t[s++]=this._interim,t[s++]=n),this._interim=0}for(let n=r;n<i;++n){let l=e.charCodeAt(n);if(55296<=l&&l<=56319){if(++n>=i)return this._interim=l,s;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[s++]=(l-55296)*1024+a-56320+65536:(t[s++]=l,t[s++]=a);continue}l!==65279&&(t[s++]=l)}return s}},aw=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r,n,l,a,o=0,h=0;if(this.interim[0]){let d=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let p=0,m;for(;(m=this.interim[++p]&63)&&p<4;)f<<=6,f|=m;let C=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,_=C-p;for(;h<_;){if(h>=i)return 0;if(m=e[h++],(m&192)!==128){h--,d=!0;break}else this.interim[p++]=m,f<<=6,f|=m&63}d||(C===2?f<128?h--:t[s++]=f:C===3?f<2048||f>=55296&&f<=57343||f===65279||(t[s++]=f):f<65536||f>1114111||(t[s++]=f)),this.interim.fill(0)}let u=i-4,c=h;for(;c<i;){for(;c<u&&!((r=e[c])&128)&&!((n=e[c+1])&128)&&!((l=e[c+2])&128)&&!((a=e[c+3])&128);)t[s++]=r,t[s++]=n,t[s++]=l,t[s++]=a,c+=4;if(r=e[c++],r<128)t[s++]=r;else if((r&224)===192){if(c>=i)return this.interim[0]=r,s;if(n=e[c++],(n&192)!==128){c--;continue}if(o=(r&31)<<6|n&63,o<128){c--;continue}t[s++]=o}else if((r&240)===224){if(c>=i)return this.interim[0]=r,s;if(n=e[c++],(n&192)!==128){c--;continue}if(c>=i)return this.interim[0]=r,this.interim[1]=n,s;if(l=e[c++],(l&192)!==128){c--;continue}if(o=(r&15)<<12|(n&63)<<6|l&63,o<2048||o>=55296&&o<=57343||o===65279)continue;t[s++]=o}else if((r&248)===240){if(c>=i)return this.interim[0]=r,s;if(n=e[c++],(n&192)!==128){c--;continue}if(c>=i)return this.interim[0]=r,this.interim[1]=n,s;if(l=e[c++],(l&192)!==128){c--;continue}if(c>=i)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=l,s;if(a=e[c++],(a&192)!==128){c--;continue}if(o=(r&7)<<18|(n&63)<<12|(l&63)<<6|a&63,o<65536||o>1114111)continue;t[s++]=o}}return s}},dS="",xs=" ",Vl=class fS{constructor(){this.fg=0,this.bg=0,this.extended=new Jo}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new fS;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Jo=class _S{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new _S(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ft=class gS extends Vl{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Jo,this.combinedData=""}static fromCharData(t){let i=new gS;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Es(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},h0="di$target",wd="di$dependencies",nd=new Map;function ow(e){return e[wd]||[]}function Ve(e){if(nd.has(e))return nd.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");hw(t,i,r)};return t._id=e,nd.set(e,t),t}function hw(e,t,i){t[h0]===t?t[wd].push({id:e,index:i}):(t[wd]=[{id:e,index:i}],t[h0]=t)}var lt=Ve("BufferService"),pS=Ve("CoreMouseService"),lr=Ve("CoreService"),cw=Ve("CharsetService"),lf=Ve("InstantiationService"),vS=Ve("LogService"),at=Ve("OptionsService"),mS=Ve("OscLinkService"),uw=Ve("UnicodeService"),Fl=Ve("DecorationService"),Ed=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let s=[],r=this._optionsService.rawOptions.linkHandler,n=new Ft,l=i.getTrimmedLength(),a=-1,o=-1,h=!1;for(let u=0;u<l;u++)if(!(o===-1&&!i.hasContent(u))){if(i.loadCell(u,n),n.hasExtendedAttrs()&&n.extended.urlId)if(o===-1){o=u,a=n.extended.urlId;continue}else h=n.extended.urlId!==a;else o!==-1&&(h=!0);if(h||o!==-1&&u===l-1){let c=this._oscLinkService.getLinkData(a)?.uri;if(c){let d={start:{x:o+1,y:e},end:{x:u+(!h&&u===l-1?1:0),y:e}},f=!1;if(!r?.allowNonHttpProtocols)try{let p=new URL(c);["http:","https:"].includes(p.protocol)||(f=!0)}catch{f=!0}f||s.push({text:c,range:d,activate:(p,m)=>r?r.activate(p,m,d):dw(p,m),hover:(p,m)=>r?.hover?.(p,m,d),leave:(p,m)=>r?.leave?.(p,m,d)})}h=!1,n.hasExtendedAttrs()&&n.extended.urlId?(o=u,a=n.extended.urlId):(o=-1,a=-1)}}t(s)}};Ed=be([B(0,lt),B(1,at),B(2,mS)],Ed);function dw(e,t){if(confirm(`Do you want to navigate to ${t}?
10
-
11
- WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var hh=Ve("CharSizeService"),qi=Ve("CoreBrowserService"),af=Ve("MouseService"),Ki=Ve("RenderService"),fw=Ve("SelectionService"),SS=Ve("CharacterJoinerService"),un=Ve("ThemeService"),yS=Ve("LinkProviderService"),_w=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?c0.isErrorNoTelemetry(e)?new c0(e.message+`
1
+ "use strict";(()=>{var GI=Object.create;var $b=Object.defineProperty;var YI=Object.getOwnPropertyDescriptor;var XI=Object.getOwnPropertyNames;var ZI=Object.getPrototypeOf,QI=Object.prototype.hasOwnProperty;var JI=(e,t,r)=>t in e?$b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Vr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ez=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of XI(t))!QI.call(e,i)&&i!==r&&$b(e,i,{get:()=>t[i],enumerable:!(o=YI(t,i))||o.enumerable});return e};var S=(e,t,r)=>(r=e!=null?GI(ZI(e)):{},ez(t||!e||!e.__esModule?$b(r,"default",{value:e,enumerable:!0}):r,e));var ze=(e,t,r)=>JI(e,typeof t!="symbol"?t+"":t,r);var $C=Vr(_e=>{"use strict";var Vb=Symbol.for("react.transitional.element"),cz=Symbol.for("react.portal"),uz=Symbol.for("react.fragment"),pz=Symbol.for("react.strict_mode"),dz=Symbol.for("react.profiler"),fz=Symbol.for("react.consumer"),hz=Symbol.for("react.context"),mz=Symbol.for("react.forward_ref"),yz=Symbol.for("react.suspense"),gz=Symbol.for("react.memo"),LC=Symbol.for("react.lazy"),vz=Symbol.for("react.activity"),MC=Symbol.iterator;function bz(e){return e===null||typeof e!="object"?null:(e=MC&&e[MC]||e["@@iterator"],typeof e=="function"?e:null)}var IC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zC=Object.assign,FC={};function Ql(e,t,r){this.props=e,this.context=t,this.refs=FC,this.updater=r||IC}Ql.prototype.isReactComponent={};Ql.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ql.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function HC(){}HC.prototype=Ql.prototype;function qb(e,t,r){this.props=e,this.context=t,this.refs=FC,this.updater=r||IC}var Kb=qb.prototype=new HC;Kb.constructor=qb;zC(Kb,Ql.prototype);Kb.isPureReactComponent=!0;var AC=Array.isArray;function Wb(){}var _t={H:null,A:null,T:null,S:null},UC=Object.prototype.hasOwnProperty;function Gb(e,t,r){var o=r.ref;return{$$typeof:Vb,type:e,key:t,ref:o!==void 0?o:null,props:r}}function _z(e,t){return Gb(e.type,t,e.props)}function Yb(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vb}function Sz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var BC=/\/+/g;function jb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Sz(""+e.key):t.toString(36)}function xz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Wb,Wb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Zl(e,t,r,o,i){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(n){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Vb:case cz:s=!0;break;case LC:return s=e._init,Zl(s(e._payload),t,r,o,i)}}if(s)return i=i(e),s=o===""?"."+jb(e,0):o,AC(i)?(r="",s!=null&&(r=s.replace(BC,"$&/")+"/"),Zl(i,t,r,"",function(c){return c})):i!=null&&(Yb(i)&&(i=_z(i,r+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(BC,"$&/")+"/")+s)),t.push(i)),1;s=0;var a=o===""?".":o+":";if(AC(e))for(var l=0;l<e.length;l++)o=e[l],n=a+jb(o,l),s+=Zl(o,t,r,n,i);else if(l=bz(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,n=a+jb(o,l++),s+=Zl(o,t,r,n,i);else if(n==="object"){if(typeof e.then=="function")return Zl(xz(e),t,r,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function $h(e,t,r){if(e==null)return e;var o=[],i=0;return Zl(e,o,"","",function(n){return t.call(r,n,i++)}),o}function Tz(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var NC=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)},Cz={map:$h,forEach:function(e,t,r){$h(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return $h(e,function(){t++}),t},toArray:function(e){return $h(e,function(t){return t})||[]},only:function(e){if(!Yb(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_e.Activity=vz;_e.Children=Cz;_e.Component=Ql;_e.Fragment=uz;_e.Profiler=dz;_e.PureComponent=qb;_e.StrictMode=pz;_e.Suspense=yz;_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_t;_e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return _t.H.useMemoCache(e)}};_e.cache=function(e){return function(){return e.apply(null,arguments)}};_e.cacheSignal=function(){return null};_e.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=zC({},e.props),i=e.key;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)!UC.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(o[n]=t[n]);var n=arguments.length-2;if(n===1)o.children=r;else if(1<n){for(var s=Array(n),a=0;a<n;a++)s[a]=arguments[a+2];o.children=s}return Gb(e.type,i,o)};_e.createContext=function(e){return e={$$typeof:hz,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:fz,_context:e},e};_e.createElement=function(e,t,r){var o,i={},n=null;if(t!=null)for(o in t.key!==void 0&&(n=""+t.key),t)UC.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var a=Array(s),l=0;l<s;l++)a[l]=arguments[l+2];i.children=a}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)i[o]===void 0&&(i[o]=s[o]);return Gb(e,n,i)};_e.createRef=function(){return{current:null}};_e.forwardRef=function(e){return{$$typeof:mz,render:e}};_e.isValidElement=Yb;_e.lazy=function(e){return{$$typeof:LC,_payload:{_status:-1,_result:e},_init:Tz}};_e.memo=function(e,t){return{$$typeof:gz,type:e,compare:t===void 0?null:t}};_e.startTransition=function(e){var t=_t.T,r={};_t.T=r;try{var o=e(),i=_t.S;i!==null&&i(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Wb,NC)}catch(n){NC(n)}finally{t!==null&&r.types!==null&&(t.types=r.types),_t.T=t}};_e.unstable_useCacheRefresh=function(){return _t.H.useCacheRefresh()};_e.use=function(e){return _t.H.use(e)};_e.useActionState=function(e,t,r){return _t.H.useActionState(e,t,r)};_e.useCallback=function(e,t){return _t.H.useCallback(e,t)};_e.useContext=function(e){return _t.H.useContext(e)};_e.useDebugValue=function(){};_e.useDeferredValue=function(e,t){return _t.H.useDeferredValue(e,t)};_e.useEffect=function(e,t){return _t.H.useEffect(e,t)};_e.useEffectEvent=function(e){return _t.H.useEffectEvent(e)};_e.useId=function(){return _t.H.useId()};_e.useImperativeHandle=function(e,t,r){return _t.H.useImperativeHandle(e,t,r)};_e.useInsertionEffect=function(e,t){return _t.H.useInsertionEffect(e,t)};_e.useLayoutEffect=function(e,t){return _t.H.useLayoutEffect(e,t)};_e.useMemo=function(e,t){return _t.H.useMemo(e,t)};_e.useOptimistic=function(e,t){return _t.H.useOptimistic(e,t)};_e.useReducer=function(e,t,r){return _t.H.useReducer(e,t,r)};_e.useRef=function(e){return _t.H.useRef(e)};_e.useState=function(e){return _t.H.useState(e)};_e.useSyncExternalStore=function(e,t,r){return _t.H.useSyncExternalStore(e,t,r)};_e.useTransition=function(){return _t.H.useTransition()};_e.version="19.2.4"});var I=Vr((JZ,jC)=>{"use strict";jC.exports=$C()});var fw=Vr(Je=>{"use strict";var ur=typeof Symbol=="function"&&Symbol.for,Jb=ur?Symbol.for("react.element"):60103,e_=ur?Symbol.for("react.portal"):60106,Zh=ur?Symbol.for("react.fragment"):60107,Qh=ur?Symbol.for("react.strict_mode"):60108,Jh=ur?Symbol.for("react.profiler"):60114,em=ur?Symbol.for("react.provider"):60109,tm=ur?Symbol.for("react.context"):60110,t_=ur?Symbol.for("react.async_mode"):60111,rm=ur?Symbol.for("react.concurrent_mode"):60111,om=ur?Symbol.for("react.forward_ref"):60112,im=ur?Symbol.for("react.suspense"):60113,Lz=ur?Symbol.for("react.suspense_list"):60120,nm=ur?Symbol.for("react.memo"):60115,sm=ur?Symbol.for("react.lazy"):60116,Iz=ur?Symbol.for("react.block"):60121,zz=ur?Symbol.for("react.fundamental"):60117,Fz=ur?Symbol.for("react.responder"):60118,Hz=ur?Symbol.for("react.scope"):60119;function xo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Jb:switch(e=e.type,e){case t_:case rm:case Zh:case Jh:case Qh:case im:return e;default:switch(e=e&&e.$$typeof,e){case tm:case om:case sm:case nm:case em:return e;default:return t}}case e_:return t}}}function dw(e){return xo(e)===rm}Je.AsyncMode=t_;Je.ConcurrentMode=rm;Je.ContextConsumer=tm;Je.ContextProvider=em;Je.Element=Jb;Je.ForwardRef=om;Je.Fragment=Zh;Je.Lazy=sm;Je.Memo=nm;Je.Portal=e_;Je.Profiler=Jh;Je.StrictMode=Qh;Je.Suspense=im;Je.isAsyncMode=function(e){return dw(e)||xo(e)===t_};Je.isConcurrentMode=dw;Je.isContextConsumer=function(e){return xo(e)===tm};Je.isContextProvider=function(e){return xo(e)===em};Je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jb};Je.isForwardRef=function(e){return xo(e)===om};Je.isFragment=function(e){return xo(e)===Zh};Je.isLazy=function(e){return xo(e)===sm};Je.isMemo=function(e){return xo(e)===nm};Je.isPortal=function(e){return xo(e)===e_};Je.isProfiler=function(e){return xo(e)===Jh};Je.isStrictMode=function(e){return xo(e)===Qh};Je.isSuspense=function(e){return xo(e)===im};Je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zh||e===rm||e===Jh||e===Qh||e===im||e===Lz||typeof e=="object"&&e!==null&&(e.$$typeof===sm||e.$$typeof===nm||e.$$typeof===em||e.$$typeof===tm||e.$$typeof===om||e.$$typeof===zz||e.$$typeof===Fz||e.$$typeof===Hz||e.$$typeof===Iz)};Je.typeOf=xo});var mw=Vr((xQ,hw)=>{"use strict";hw.exports=fw()});var xw=Vr((TQ,Sw)=>{"use strict";var r_=mw(),Uz={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},jz={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o_={};o_[r_.ForwardRef]=jz;o_[r_.Memo]=bw;function yw(e){return r_.isMemo(e)?bw:o_[e.$$typeof]||Uz}var Wz=Object.defineProperty,Vz=Object.getOwnPropertyNames,gw=Object.getOwnPropertySymbols,qz=Object.getOwnPropertyDescriptor,Kz=Object.getPrototypeOf,vw=Object.prototype;function _w(e,t,r){if(typeof t!="string"){if(vw){var o=Kz(t);o&&o!==vw&&_w(e,o,r)}var i=Vz(t);gw&&(i=i.concat(gw(t)));for(var n=yw(e),s=yw(t),a=0;a<i.length;++a){var l=i[a];if(!$z[l]&&!(r&&r[l])&&!(s&&s[l])&&!(n&&n[l])){var c=qz(t,l);try{Wz(e,l,c)}catch{}}}}return e}Sw.exports=_w});var Uw=Vr(um=>{"use strict";var u4=Symbol.for("react.transitional.element"),p4=Symbol.for("react.fragment");function Hw(e,t,r){var o=null;if(r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),"key"in t){r={};for(var i in t)i!=="key"&&(r[i]=t[i])}else r=t;return t=r.ref,{$$typeof:u4,type:e,key:o,ref:t!==void 0?t:null,props:r}}um.Fragment=p4;um.jsx=Hw;um.jsxs=Hw});var k=Vr((vJ,$w)=>{"use strict";$w.exports=Uw()});var qw=Vr(at=>{"use strict";var a_=Symbol.for("react.transitional.element"),l_=Symbol.for("react.portal"),pm=Symbol.for("react.fragment"),dm=Symbol.for("react.strict_mode"),fm=Symbol.for("react.profiler"),hm=Symbol.for("react.consumer"),mm=Symbol.for("react.context"),ym=Symbol.for("react.forward_ref"),gm=Symbol.for("react.suspense"),vm=Symbol.for("react.suspense_list"),bm=Symbol.for("react.memo"),_m=Symbol.for("react.lazy"),f4=Symbol.for("react.view_transition"),h4=Symbol.for("react.client.reference");function Go(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case a_:switch(e=e.type,e){case pm:case fm:case dm:case gm:case vm:case f4:return e;default:switch(e=e&&e.$$typeof,e){case mm:case ym:case _m:case bm:return e;case hm:return e;default:return t}}case l_:return t}}}at.ContextConsumer=hm;at.ContextProvider=mm;at.Element=a_;at.ForwardRef=ym;at.Fragment=pm;at.Lazy=_m;at.Memo=bm;at.Portal=l_;at.Profiler=fm;at.StrictMode=dm;at.Suspense=gm;at.SuspenseList=vm;at.isContextConsumer=function(e){return Go(e)===hm};at.isContextProvider=function(e){return Go(e)===mm};at.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===a_};at.isForwardRef=function(e){return Go(e)===ym};at.isFragment=function(e){return Go(e)===pm};at.isLazy=function(e){return Go(e)===_m};at.isMemo=function(e){return Go(e)===bm};at.isPortal=function(e){return Go(e)===l_};at.isProfiler=function(e){return Go(e)===fm};at.isStrictMode=function(e){return Go(e)===dm};at.isSuspense=function(e){return Go(e)===gm};at.isSuspenseList=function(e){return Go(e)===vm};at.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pm||e===fm||e===dm||e===gm||e===vm||typeof e=="object"&&e!==null&&(e.$$typeof===_m||e.$$typeof===bm||e.$$typeof===mm||e.$$typeof===hm||e.$$typeof===ym||e.$$typeof===h4||e.getModuleId!==void 0)};at.typeOf=Go});var Gw=Vr((kJ,Kw)=>{"use strict";Kw.exports=qw()});var cP=Vr(Xr=>{"use strict";var jF=I();function lP(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 Ts(){}var Yr={d:{f:Ts,r:function(){throw Error(lP(522))},D:Ts,C:Ts,L:Ts,m:Ts,X:Ts,S:Ts,M:Ts},p:0,findDOMNode:null},WF=Symbol.for("react.portal");function VF(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:WF,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var pd=jF.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ty(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yr;Xr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(lP(299));return VF(e,t,null,r)};Xr.flushSync=function(e){var t=pd.T,r=Yr.p;try{if(pd.T=null,Yr.p=2,e)return e()}finally{pd.T=t,Yr.p=r,Yr.d.f()}};Xr.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yr.d.C(e,t))};Xr.prefetchDNS=function(e){typeof e=="string"&&Yr.d.D(e)};Xr.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,o=ty(r,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Yr.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:n}):r==="script"&&Yr.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Xr.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=ty(t.as,t.crossOrigin);Yr.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yr.d.M(e)};Xr.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,o=ty(r,t.crossOrigin);Yr.d.L(e,r,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Xr.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=ty(t.as,t.crossOrigin);Yr.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yr.d.m(e)};Xr.requestFormReset=function(e){Yr.d.r(e)};Xr.unstable_batchedUpdates=function(e,t){return e(t)};Xr.useFormState=function(e,t,r){return pd.H.useFormState(e,t,r)};Xr.useFormStatus=function(){return pd.H.useHostTransitionStatus()};Xr.version="19.2.4"});var ry=Vr((Cle,pP)=>{"use strict";function uP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uP)}catch(e){console.error(e)}}uP(),pP.exports=cP()});var A2=Vr(Pt=>{"use strict";function Q0(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,i=e[o];if(0<ig(i,t))e[o]=t,e[r]=i,r=o;else break e}}function rn(e){return e.length===0?null:e[0]}function sg(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,i=e.length,n=i>>>1;o<n;){var s=2*(o+1)-1,a=e[s],l=s+1,c=e[l];if(0>ig(a,r))l<i&&0>ig(c,a)?(e[o]=c,e[l]=r,o=l):(e[o]=a,e[s]=r,o=s);else if(l<i&&0>ig(c,r))e[o]=c,e[l]=r,o=l;else break e}}return t}function ig(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}Pt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(C2=performance,Pt.unstable_now=function(){return C2.now()}):(Y0=Date,w2=Y0.now(),Pt.unstable_now=function(){return Y0.now()-w2});var C2,Y0,w2,zn=[],Bs=[],m9=1,oi=null,Ur=3,J0=!1,Qd=!1,Jd=!1,eS=!1,E2=typeof setTimeout=="function"?setTimeout:null,k2=typeof clearTimeout=="function"?clearTimeout:null,R2=typeof setImmediate<"u"?setImmediate:null;function ng(e){for(var t=rn(Bs);t!==null;){if(t.callback===null)sg(Bs);else if(t.startTime<=e)sg(Bs),t.sortIndex=t.expirationTime,Q0(zn,t);else break;t=rn(Bs)}}function tS(e){if(Jd=!1,ng(e),!Qd)if(rn(zn)!==null)Qd=!0,yu||(yu=!0,mu());else{var t=rn(Bs);t!==null&&rS(tS,t.startTime-e)}}var yu=!1,ef=-1,O2=5,D2=-1;function M2(){return eS?!0:!(Pt.unstable_now()-D2<O2)}function X0(){if(eS=!1,yu){var e=Pt.unstable_now();D2=e;var t=!0;try{e:{Qd=!1,Jd&&(Jd=!1,k2(ef),ef=-1),J0=!0;var r=Ur;try{t:{for(ng(e),oi=rn(zn);oi!==null&&!(oi.expirationTime>e&&M2());){var o=oi.callback;if(typeof o=="function"){oi.callback=null,Ur=oi.priorityLevel;var i=o(oi.expirationTime<=e);if(e=Pt.unstable_now(),typeof i=="function"){oi.callback=i,ng(e),t=!0;break t}oi===rn(zn)&&sg(zn),ng(e)}else sg(zn);oi=rn(zn)}if(oi!==null)t=!0;else{var n=rn(Bs);n!==null&&rS(tS,n.startTime-e),t=!1}}break e}finally{oi=null,Ur=r,J0=!1}t=void 0}}finally{t?mu():yu=!1}}}var mu;typeof R2=="function"?mu=function(){R2(X0)}:typeof MessageChannel<"u"?(Z0=new MessageChannel,P2=Z0.port2,Z0.port1.onmessage=X0,mu=function(){P2.postMessage(null)}):mu=function(){E2(X0,0)};var Z0,P2;function rS(e,t){ef=E2(function(){e(Pt.unstable_now())},t)}Pt.unstable_IdlePriority=5;Pt.unstable_ImmediatePriority=1;Pt.unstable_LowPriority=4;Pt.unstable_NormalPriority=3;Pt.unstable_Profiling=null;Pt.unstable_UserBlockingPriority=2;Pt.unstable_cancelCallback=function(e){e.callback=null};Pt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O2=0<e?Math.floor(1e3/e):5};Pt.unstable_getCurrentPriorityLevel=function(){return Ur};Pt.unstable_next=function(e){switch(Ur){case 1:case 2:case 3:var t=3;break;default:t=Ur}var r=Ur;Ur=t;try{return e()}finally{Ur=r}};Pt.unstable_requestPaint=function(){eS=!0};Pt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Ur;Ur=e;try{return t()}finally{Ur=r}};Pt.unstable_scheduleCallback=function(e,t,r){var o=Pt.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?o+r:o):r=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=r+i,e={id:m9++,callback:t,priorityLevel:e,startTime:r,expirationTime:i,sortIndex:-1},r>o?(e.sortIndex=r,Q0(Bs,e),rn(zn)===null&&e===rn(Bs)&&(Jd?(k2(ef),ef=-1):Jd=!0,rS(tS,r-o))):(e.sortIndex=i,Q0(zn,e),Qd||J0||(Qd=!0,yu||(yu=!0,mu()))),e};Pt.unstable_shouldYield=M2;Pt.unstable_wrapCallback=function(e){var t=Ur;return function(){var r=Ur;Ur=t;try{return e.apply(this,arguments)}finally{Ur=r}}}});var N2=Vr((f2e,B2)=>{"use strict";B2.exports=A2()});var KA=Vr(Dv=>{"use strict";var ir=N2(),aD=I(),y9=ry();function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 lD(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Uf(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function cD(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 uD(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 L2(e){if(Uf(e)!==e)throw Error(U(188))}function g9(e){var t=e.alternate;if(!t){if(t=Uf(e),t===null)throw Error(U(188));return t!==e?null:e}for(var r=e,o=t;;){var i=r.return;if(i===null)break;var n=i.alternate;if(n===null){if(o=i.return,o!==null){r=o;continue}break}if(i.child===n.child){for(n=i.child;n;){if(n===r)return L2(i),e;if(n===o)return L2(i),t;n=n.sibling}throw Error(U(188))}if(r.return!==o.return)r=i,o=n;else{for(var s=!1,a=i.child;a;){if(a===r){s=!0,r=i,o=n;break}if(a===o){s=!0,o=i,r=n;break}a=a.sibling}if(!s){for(a=n.child;a;){if(a===r){s=!0,r=n,o=i;break}if(a===o){s=!0,o=n,r=i;break}a=a.sibling}if(!s)throw Error(U(189))}}if(r.alternate!==o)throw Error(U(190))}if(r.tag!==3)throw Error(U(188));return r.stateNode.current===r?e:t}function pD(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=pD(e),t!==null)return t;e=e.sibling}return null}var Tt=Object.assign,v9=Symbol.for("react.element"),ag=Symbol.for("react.transitional.element"),cf=Symbol.for("react.portal"),xu=Symbol.for("react.fragment"),dD=Symbol.for("react.strict_mode"),LS=Symbol.for("react.profiler"),fD=Symbol.for("react.consumer"),qn=Symbol.for("react.context"),Dx=Symbol.for("react.forward_ref"),IS=Symbol.for("react.suspense"),zS=Symbol.for("react.suspense_list"),Mx=Symbol.for("react.memo"),Ns=Symbol.for("react.lazy"),FS=Symbol.for("react.activity"),b9=Symbol.for("react.memo_cache_sentinel"),I2=Symbol.iterator;function tf(e){return e===null||typeof e!="object"?null:(e=I2&&e[I2]||e["@@iterator"],typeof e=="function"?e:null)}var _9=Symbol.for("react.client.reference");function HS(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_9?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xu:return"Fragment";case LS:return"Profiler";case dD:return"StrictMode";case IS:return"Suspense";case zS:return"SuspenseList";case FS:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case cf:return"Portal";case qn:return e.displayName||"Context";case fD:return(e._context.displayName||"Context")+".Consumer";case Dx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mx:return t=e.displayName||null,t!==null?t:HS(e.type)||"Memo";case Ns:t=e._payload,e=e._init;try{return HS(e(t))}catch{}}return null}var uf=Array.isArray,ye=aD.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qe=y9.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,cl={pending:!1,data:null,method:null,action:null},US=[],Tu=-1;function ln(e){return{current:e}}function yr(e){0>Tu||(e.current=US[Tu],US[Tu]=null,Tu--)}function mt(e,t){Tu++,US[Tu]=e.current,e.current=t}var an=ln(null),Pf=ln(null),qs=ln(null),Hg=ln(null);function Ug(e,t){switch(mt(qs,t),mt(Pf,e),mt(an,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?WO(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=WO(t),e=AA(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}yr(an),mt(an,e)}function Uu(){yr(an),yr(Pf),yr(qs)}function $S(e){e.memoizedState!==null&&mt(Hg,e);var t=an.current,r=AA(t,e.type);t!==r&&(mt(Pf,e),mt(an,r))}function $g(e){Pf.current===e&&(yr(an),yr(Pf)),Hg.current===e&&(yr(Hg),zf._currentValue=cl)}var oS,z2;function nl(e){if(oS===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);oS=t&&t[1]||"",z2=-1<r.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+oS+e+z2}var iS=!1;function nS(e,t){if(!e||iS)return"";iS=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(d){var f=d}Reflect.construct(e,[],p)}else{try{p.call()}catch(d){f=d}e.call(p.prototype)}}else{try{throw Error()}catch(d){f=d}(p=e())&&typeof p.catch=="function"&&p.catch(function(){})}}catch(d){if(d&&f&&typeof d.stack=="string")return[d.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=o.DetermineComponentFrameRoot(),s=n[0],a=n[1];if(s&&a){var l=s.split(`
4
+ `),c=a.split(`
5
+ `);for(i=o=0;o<l.length&&!l[o].includes("DetermineComponentFrameRoot");)o++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(o===l.length||i===c.length)for(o=l.length-1,i=c.length-1;1<=o&&0<=i&&l[o]!==c[i];)i--;for(;1<=o&&0<=i;o--,i--)if(l[o]!==c[i]){if(o!==1||i!==1)do if(o--,i--,0>i||l[o]!==c[i]){var u=`
6
+ `+l[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=i);break}}}finally{iS=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?nl(r):""}function S9(e,t){switch(e.tag){case 26:case 27:case 5:return nl(e.type);case 16:return nl("Lazy");case 13:return e.child!==t&&t!==null?nl("Suspense Fallback"):nl("Suspense");case 19:return nl("SuspenseList");case 0:case 15:return nS(e.type,!1);case 11:return nS(e.type.render,!1);case 1:return nS(e.type,!0);case 31:return nl("Activity");default:return""}}function F2(e){try{var t="",r=null;do t+=S9(e,r),r=e,e=e.return;while(e);return t}catch(o){return`
7
+ Error generating stack: `+o.message+`
8
+ `+o.stack}}var jS=Object.prototype.hasOwnProperty,Ax=ir.unstable_scheduleCallback,sS=ir.unstable_cancelCallback,x9=ir.unstable_shouldYield,T9=ir.unstable_requestPaint,Bo=ir.unstable_now,C9=ir.unstable_getCurrentPriorityLevel,hD=ir.unstable_ImmediatePriority,mD=ir.unstable_UserBlockingPriority,jg=ir.unstable_NormalPriority,w9=ir.unstable_LowPriority,yD=ir.unstable_IdlePriority,R9=ir.log,P9=ir.unstable_setDisableYieldValue,$f=null,No=null;function Us(e){if(typeof R9=="function"&&P9(e),No&&typeof No.setStrictMode=="function")try{No.setStrictMode($f,e)}catch{}}var Lo=Math.clz32?Math.clz32:O9,E9=Math.log,k9=Math.LN2;function O9(e){return e>>>=0,e===0?32:31-(E9(e)/k9|0)|0}var lg=256,cg=262144,ug=4194304;function sl(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 mv(e,t,r){var o=e.pendingLanes;if(o===0)return 0;var i=0,n=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var a=o&134217727;return a!==0?(o=a&~n,o!==0?i=sl(o):(s&=a,s!==0?i=sl(s):r||(r=a&~e,r!==0&&(i=sl(r))))):(a=o&~n,a!==0?i=sl(a):s!==0?i=sl(s):r||(r=o&~e,r!==0&&(i=sl(r)))),i===0?0:t!==0&&t!==i&&(t&n)===0&&(n=i&-i,r=t&-t,n>=r||n===32&&(r&4194048)!==0)?t:i}function jf(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function D9(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 gD(){var e=ug;return ug<<=1,(ug&62914560)===0&&(ug=4194304),e}function aS(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Wf(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function M9(e,t,r,o,i,n){var s=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var a=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(r=s&~r;0<r;){var u=31-Lo(r),p=1<<u;a[u]=0,l[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var d=f[u];d!==null&&(d.lane&=-536870913)}r&=~p}o!==0&&vD(e,o,0),n!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=n&~(s&~t))}function vD(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Lo(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|r&261930}function bD(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-Lo(r),i=1<<o;i&t|e[o]&t&&(e[o]|=t),r&=~i}}function _D(e,t){var r=t&-t;return r=(r&42)!==0?1:Bx(r),(r&(e.suspendedLanes|t))!==0?0:r}function Bx(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 Nx(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function SD(){var e=qe.p;return e!==0?e:(e=window.event,e===void 0?32:WA(e.type))}function H2(e,t){var r=qe.p;try{return qe.p=e,t()}finally{qe.p=r}}var na=Math.random().toString(36).slice(2),Mr="__reactFiber$"+na,mo="__reactProps$"+na,Qu="__reactContainer$"+na,WS="__reactEvents$"+na,A9="__reactListeners$"+na,B9="__reactHandles$"+na,U2="__reactResources$"+na,Vf="__reactMarker$"+na;function Lx(e){delete e[Mr],delete e[mo],delete e[WS],delete e[A9],delete e[B9]}function Cu(e){var t=e[Mr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Qu]||r[Mr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=YO(e);e!==null;){if(r=e[Mr])return r;e=YO(e)}return t}e=r,r=e.parentNode}return null}function Ju(e){if(e=e[Mr]||e[Qu]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pf(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function Bu(e){var t=e[U2];return t||(t=e[U2]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mr(e){e[Vf]=!0}var xD=new Set,TD={};function bl(e,t){$u(e,t),$u(e+"Capture",t)}function $u(e,t){for(TD[e]=t,e=0;e<t.length;e++)xD.add(t[e])}var N9=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]*$"),$2={},j2={};function L9(e){return jS.call(j2,e)?!0:jS.call($2,e)?!1:N9.test(e)?j2[e]=!0:($2[e]=!0,!1)}function wg(e,t,r){if(L9(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function pg(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Fn(e,t,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+o)}}function ni(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function CD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function I9(e,t,r){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,n=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,n.call(this,s)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function VS(e){if(!e._valueTracker){var t=CD(e)?"checked":"value";e._valueTracker=I9(e,t,""+e[t])}}function wD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=CD(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Wg(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 z9=/[\n"\\]/g;function li(e){return e.replace(z9,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function qS(e,t,r,o,i,n,s,a){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=""+ni(t)):e.value!==""+ni(t)&&(e.value=""+ni(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?KS(e,s,ni(t)):r!=null?KS(e,s,ni(r)):o!=null&&e.removeAttribute("value"),i==null&&n!=null&&(e.defaultChecked=!!n),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.name=""+ni(a):e.removeAttribute("name")}function RD(e,t,r,o,i,n,s,a){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||r!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){VS(e);return}r=r!=null?""+ni(r):"",t=t!=null?""+ni(t):r,a||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=a?e.checked:!!o,e.defaultChecked=!!o,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),VS(e)}function KS(e,t,r){t==="number"&&Wg(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Nu(e,t,r,o){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&o&&(e[r].defaultSelected=!0)}else{for(r=""+ni(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function PD(e,t,r){if(t!=null&&(t=""+ni(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+ni(r):""}function ED(e,t,r,o){if(t==null){if(o!=null){if(r!=null)throw Error(U(92));if(uf(o)){if(1<o.length)throw Error(U(93));o=o[0]}r=o}r==null&&(r=""),t=r}r=ni(t),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o),VS(e)}function ju(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var F9=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 W2(e,t,r){var o=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,r):typeof r!="number"||r===0||F9.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function kD(e,t,r){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&r[i]!==o&&W2(e,i,o)}else for(var n in t)t.hasOwnProperty(n)&&W2(e,n,t[n])}function Ix(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 H9=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"]]),U9=/^[\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 Rg(e){return U9.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var GS=null;function zx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wu=null,Lu=null;function V2(e){var t=Ju(e);if(t&&(e=t.stateNode)){var r=e[mo]||null;e:switch(e=t.stateNode,t.type){case"input":if(qS(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+li(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var i=o[mo]||null;if(!i)throw Error(U(90));qS(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<r.length;t++)o=r[t],o.form===e.form&&wD(o)}break e;case"textarea":PD(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Nu(e,!!r.multiple,t,!1)}}}var lS=!1;function OD(e,t,r){if(lS)return e(t,r);lS=!0;try{var o=e(t);return o}finally{if(lS=!1,(wu!==null||Lu!==null)&&(Pv(),wu&&(t=wu,e=Lu,Lu=wu=null,V2(t),e)))for(t=0;t<e.length;t++)V2(e[t])}}function Ef(e,t){var r=e.stateNode;if(r===null)return null;var o=r[mo]||null;if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(U(231,t,typeof r));return r}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YS=!1;if(Qn)try{gu={},Object.defineProperty(gu,"passive",{get:function(){YS=!0}}),window.addEventListener("test",gu,gu),window.removeEventListener("test",gu,gu)}catch{YS=!1}var gu,$s=null,Fx=null,Pg=null;function DD(){if(Pg)return Pg;var e,t=Fx,r=t.length,o,i="value"in $s?$s.value:$s.textContent,n=i.length;for(e=0;e<r&&t[e]===i[e];e++);var s=r-e;for(o=1;o<=s&&t[r-o]===i[n-o];o++);return Pg=i.slice(e,1<o?1-o:void 0)}function Eg(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 dg(){return!0}function q2(){return!1}function yo(e){function t(r,o,i,n,s){this._reactName=r,this._targetInst=i,this.type=o,this.nativeEvent=n,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(n):n[a]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?dg:q2,this.isPropagationStopped=q2,this}return Tt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=dg)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=dg)},persist:function(){},isPersistent:dg}),t}var _l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yv=yo(_l),qf=Tt({},_l,{view:0,detail:0}),$9=yo(qf),cS,uS,rf,gv=Tt({},qf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hx,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!==rf&&(rf&&e.type==="mousemove"?(cS=e.screenX-rf.screenX,uS=e.screenY-rf.screenY):uS=cS=0,rf=e),cS)},movementY:function(e){return"movementY"in e?e.movementY:uS}}),K2=yo(gv),j9=Tt({},gv,{dataTransfer:0}),W9=yo(j9),V9=Tt({},qf,{relatedTarget:0}),pS=yo(V9),q9=Tt({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),K9=yo(q9),G9=Tt({},_l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Y9=yo(G9),X9=Tt({},_l,{data:0}),G2=yo(X9),Z9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q9={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"},J9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e7(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J9[e])?!!t[e]:!1}function Hx(){return e7}var t7=Tt({},qf,{key:function(e){if(e.key){var t=Z9[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Eg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Q9[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hx,charCode:function(e){return e.type==="keypress"?Eg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Eg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),r7=yo(t7),o7=Tt({},gv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y2=yo(o7),i7=Tt({},qf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hx}),n7=yo(i7),s7=Tt({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),a7=yo(s7),l7=Tt({},gv,{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}),c7=yo(l7),u7=Tt({},_l,{newState:0,oldState:0}),p7=yo(u7),d7=[9,13,27,32],Ux=Qn&&"CompositionEvent"in window,hf=null;Qn&&"documentMode"in document&&(hf=document.documentMode);var f7=Qn&&"TextEvent"in window&&!hf,MD=Qn&&(!Ux||hf&&8<hf&&11>=hf),X2=" ",Z2=!1;function AD(e,t){switch(e){case"keyup":return d7.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ru=!1;function h7(e,t){switch(e){case"compositionend":return BD(t);case"keypress":return t.which!==32?null:(Z2=!0,X2);case"textInput":return e=t.data,e===X2&&Z2?null:e;default:return null}}function m7(e,t){if(Ru)return e==="compositionend"||!Ux&&AD(e,t)?(e=DD(),Pg=Fx=$s=null,Ru=!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 MD&&t.locale!=="ko"?null:t.data;default:return null}}var y7={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 Q2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!y7[e.type]:t==="textarea"}function ND(e,t,r,o){wu?Lu?Lu.push(o):Lu=[o]:wu=o,t=lv(t,"onChange"),0<t.length&&(r=new yv("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var mf=null,kf=null;function g7(e){OA(e,0)}function vv(e){var t=pf(e);if(wD(t))return e}function J2(e,t){if(e==="change")return t}var LD=!1;Qn&&(Qn?(hg="oninput"in document,hg||(dS=document.createElement("div"),dS.setAttribute("oninput","return;"),hg=typeof dS.oninput=="function"),fg=hg):fg=!1,LD=fg&&(!document.documentMode||9<document.documentMode));var fg,hg,dS;function eO(){mf&&(mf.detachEvent("onpropertychange",ID),kf=mf=null)}function ID(e){if(e.propertyName==="value"&&vv(kf)){var t=[];ND(t,kf,e,zx(e)),OD(g7,t)}}function v7(e,t,r){e==="focusin"?(eO(),mf=t,kf=r,mf.attachEvent("onpropertychange",ID)):e==="focusout"&&eO()}function b7(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vv(kf)}function _7(e,t){if(e==="click")return vv(t)}function S7(e,t){if(e==="input"||e==="change")return vv(t)}function x7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zo=typeof Object.is=="function"?Object.is:x7;function Of(e,t){if(zo(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var i=r[o];if(!jS.call(t,i)||!zo(e[i],t[i]))return!1}return!0}function tO(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rO(e,t){var r=tO(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tO(r)}}function zD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function FD(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wg(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Wg(e.document)}return t}function $x(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 T7=Qn&&"documentMode"in document&&11>=document.documentMode,Pu=null,XS=null,yf=null,ZS=!1;function oO(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ZS||Pu==null||Pu!==Wg(o)||(o=Pu,"selectionStart"in o&&$x(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),yf&&Of(yf,o)||(yf=o,o=lv(XS,"onSelect"),0<o.length&&(t=new yv("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Pu)))}function il(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Eu={animationend:il("Animation","AnimationEnd"),animationiteration:il("Animation","AnimationIteration"),animationstart:il("Animation","AnimationStart"),transitionrun:il("Transition","TransitionRun"),transitionstart:il("Transition","TransitionStart"),transitioncancel:il("Transition","TransitionCancel"),transitionend:il("Transition","TransitionEnd")},fS={},HD={};Qn&&(HD=document.createElement("div").style,"AnimationEvent"in window||(delete Eu.animationend.animation,delete Eu.animationiteration.animation,delete Eu.animationstart.animation),"TransitionEvent"in window||delete Eu.transitionend.transition);function Sl(e){if(fS[e])return fS[e];if(!Eu[e])return e;var t=Eu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in HD)return fS[e]=t[r];return e}var UD=Sl("animationend"),$D=Sl("animationiteration"),jD=Sl("animationstart"),C7=Sl("transitionrun"),w7=Sl("transitionstart"),R7=Sl("transitioncancel"),WD=Sl("transitionend"),VD=new Map,QS="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(" ");QS.push("scrollEnd");function Li(e,t){VD.set(e,t),bl(t,[e])}var Vg=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)},ii=[],ku=0,jx=0;function bv(){for(var e=ku,t=jx=ku=0;t<e;){var r=ii[t];ii[t++]=null;var o=ii[t];ii[t++]=null;var i=ii[t];ii[t++]=null;var n=ii[t];if(ii[t++]=null,o!==null&&i!==null){var s=o.pending;s===null?i.next=i:(i.next=s.next,s.next=i),o.pending=i}n!==0&&qD(r,i,n)}}function _v(e,t,r,o){ii[ku++]=e,ii[ku++]=t,ii[ku++]=r,ii[ku++]=o,jx|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Wx(e,t,r,o){return _v(e,t,r,o),qg(e)}function xl(e,t){return _v(e,null,null,t),qg(e)}function qD(e,t,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var i=!1,n=e.return;n!==null;)n.childLanes|=r,o=n.alternate,o!==null&&(o.childLanes|=r),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(i=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,i&&t!==null&&(i=31-Lo(r),e=n.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=r|536870912),n):null}function qg(e){if(50<wf)throw wf=0,bx=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ou={};function P7(e,t,r,o){this.tag=e,this.key=r,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mo(e,t,r,o){return new P7(e,t,r,o)}function Vx(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var r=e.alternate;return r===null?(r=Mo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function KD(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function kg(e,t,r,o,i,n){var s=0;if(o=e,typeof e=="function")Vx(e)&&(s=1);else if(typeof e=="string")s=OW(e,r,an.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case FS:return e=Mo(31,r,t,i),e.elementType=FS,e.lanes=n,e;case xu:return ul(r.children,i,n,t);case dD:s=8,i|=24;break;case LS:return e=Mo(12,r,t,i|2),e.elementType=LS,e.lanes=n,e;case IS:return e=Mo(13,r,t,i),e.elementType=IS,e.lanes=n,e;case zS:return e=Mo(19,r,t,i),e.elementType=zS,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qn:s=10;break e;case fD:s=9;break e;case Dx:s=11;break e;case Mx:s=14;break e;case Ns:s=16,o=null;break e}s=29,r=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=Mo(s,r,t,i),t.elementType=e,t.type=o,t.lanes=n,t}function ul(e,t,r,o){return e=Mo(7,e,o,t),e.lanes=r,e}function hS(e,t,r){return e=Mo(6,e,null,t),e.lanes=r,e}function GD(e){var t=Mo(18,null,null,0);return t.stateNode=e,t}function mS(e,t,r){return t=Mo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var iO=new WeakMap;function ci(e,t){if(typeof e=="object"&&e!==null){var r=iO.get(e);return r!==void 0?r:(t={value:e,source:t,stack:F2(t)},iO.set(e,t),t)}return{value:e,source:t,stack:F2(t)}}var Du=[],Mu=0,Kg=null,Df=0,si=[],ai=0,ta=null,on=1,nn="";function Wn(e,t){Du[Mu++]=Df,Du[Mu++]=Kg,Kg=e,Df=t}function YD(e,t,r){si[ai++]=on,si[ai++]=nn,si[ai++]=ta,ta=e;var o=on;e=nn;var i=32-Lo(o)-1;o&=~(1<<i),r+=1;var n=32-Lo(t)+i;if(30<n){var s=i-i%5;n=(o&(1<<s)-1).toString(32),o>>=s,i-=s,on=1<<32-Lo(t)+i|r<<i|o,nn=n+e}else on=1<<n|r<<i|o,nn=e}function qx(e){e.return!==null&&(Wn(e,1),YD(e,1,0))}function Kx(e){for(;e===Kg;)Kg=Du[--Mu],Du[Mu]=null,Df=Du[--Mu],Du[Mu]=null;for(;e===ta;)ta=si[--ai],si[ai]=null,nn=si[--ai],si[ai]=null,on=si[--ai],si[ai]=null}function XD(e,t){si[ai++]=on,si[ai++]=nn,si[ai++]=ta,on=t.id,nn=t.overflow,ta=e}var Ar=null,xt=null,Ne=!1,Ks=null,ui=!1,JS=Error(U(519));function ra(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mf(ci(t,e)),JS}function nO(e){var t=e.stateNode,r=e.type,o=e.memoizedProps;switch(t[Mr]=e,t[mo]=o,r){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(r=0;r<Lf.length;r++)ke(Lf[r],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),RD(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),ED(t,o.value,o.defaultValue,o.children)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||o.suppressHydrationWarning===!0||MA(t.textContent,r)?(o.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),o.onScroll!=null&&ke("scroll",t),o.onScrollEnd!=null&&ke("scrollend",t),o.onClick!=null&&(t.onclick=Kn),t=!0):t=!1,t||ra(e,!0)}function sO(e){for(Ar=e.return;Ar;)switch(Ar.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:Ar=Ar.return}}function vu(e){if(e!==Ar)return!1;if(!Ne)return sO(e),Ne=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Cx(e.type,e.memoizedProps)),r=!r),r&&xt&&ra(e),sO(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));xt=GO(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));xt=GO(e)}else t===27?(t=xt,sa(e.type)?(e=Ex,Ex=null,xt=e):xt=t):xt=Ar?di(e.stateNode.nextSibling):null;return!0}function hl(){xt=Ar=null,Ne=!1}function yS(){var e=Ks;return e!==null&&(fo===null?fo=e:fo.push.apply(fo,e),Ks=null),e}function Mf(e){Ks===null?Ks=[e]:Ks.push(e)}var ex=ln(null),Tl=null,Gn=null;function Is(e,t,r){mt(ex,t._currentValue),t._currentValue=r}function Xn(e){e._currentValue=ex.current,yr(ex)}function tx(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function rx(e,t,r,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var n=i.dependencies;if(n!==null){var s=i.child;n=n.firstContext;e:for(;n!==null;){var a=n;n=i;for(var l=0;l<t.length;l++)if(a.context===t[l]){n.lanes|=r,a=n.alternate,a!==null&&(a.lanes|=r),tx(n.return,r,e),o||(s=null);break e}n=a.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(U(341));s.lanes|=r,n=s.alternate,n!==null&&(n.lanes|=r),tx(s,r,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ep(e,t,r,o){e=null;for(var i=t,n=!1;i!==null;){if(!n){if((i.flags&524288)!==0)n=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(U(387));if(s=s.memoizedProps,s!==null){var a=i.type;zo(i.pendingProps.value,s.value)||(e!==null?e.push(a):e=[a])}}else if(i===Hg.current){if(s=i.alternate,s===null)throw Error(U(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(zf):e=[zf])}i=i.return}e!==null&&rx(t,e,r,o),t.flags|=262144}function Gg(e){for(e=e.firstContext;e!==null;){if(!zo(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ml(e){Tl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Br(e){return ZD(Tl,e)}function mg(e,t){return Tl===null&&ml(e),ZD(e,t)}function ZD(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Gn===null){if(e===null)throw Error(U(308));Gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gn=Gn.next=t;return r}var E7=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},k7=ir.unstable_scheduleCallback,O7=ir.unstable_NormalPriority,Qt={$$typeof:qn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gx(){return{controller:new E7,data:new Map,refCount:0}}function Kf(e){e.refCount--,e.refCount===0&&k7(O7,function(){e.controller.abort()})}var gf=null,ox=0,Wu=0,Iu=null;function D7(e,t){if(gf===null){var r=gf=[];ox=0,Wu=bT(),Iu={status:"pending",value:void 0,then:function(o){r.push(o)}}}return ox++,t.then(aO,aO),t}function aO(){if(--ox===0&&gf!==null){Iu!==null&&(Iu.status="fulfilled");var e=gf;gf=null,Wu=0,Iu=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function M7(e,t){var r=[],o={status:"pending",value:null,reason:null,then:function(i){r.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<r.length;i++)(0,r[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<r.length;i++)(0,r[i])(void 0)}),o}var lO=ye.S;ye.S=function(e,t){pA=Bo(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&D7(e,t),lO!==null&&lO(e,t)};var pl=ln(null);function Yx(){var e=pl.current;return e!==null?e:ut.pooledCache}function Og(e,t){t===null?mt(pl,pl.current):mt(pl,t.pool)}function QD(){var e=Yx();return e===null?null:{parent:Qt._currentValue,pool:e}}var tp=Error(U(460)),Xx=Error(U(474)),Sv=Error(U(542)),Yg={then:function(){}};function cO(e){return e=e.status,e==="fulfilled"||e==="rejected"}function JD(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Kn,Kn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pO(e),e;default:if(typeof t.status=="string")t.then(Kn,Kn);else{if(e=ut,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pO(e),e}throw dl=t,tp}}function al(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(dl=r,tp):r}}var dl=null;function uO(){if(dl===null)throw Error(U(459));var e=dl;return dl=null,e}function pO(e){if(e===tp||e===Sv)throw Error(U(483))}var zu=null,Af=0;function yg(e){var t=Af;return Af+=1,zu===null&&(zu=[]),JD(zu,e,t)}function of(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gg(e,t){throw t.$$typeof===v9?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function eM(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function r(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function o(m){for(var g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function i(m,g){return m=Yn(m,g),m.index=0,m.sibling=null,m}function n(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=67108866,g):v):(m.flags|=67108866,g)):(m.flags|=1048576,g)}function s(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function a(m,g,v,_){return g===null||g.tag!==6?(g=hS(v,m.mode,_),g.return=m,g):(g=i(g,v),g.return=m,g)}function l(m,g,v,_){var C=v.type;return C===xu?u(m,g,v.props.children,_,v.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ns&&al(C)===g.type)?(g=i(g,v.props),of(g,v),g.return=m,g):(g=kg(v.type,v.key,v.props,null,m.mode,_),of(g,v),g.return=m,g)}function c(m,g,v,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=mS(v,m.mode,_),g.return=m,g):(g=i(g,v.children||[]),g.return=m,g)}function u(m,g,v,_,C){return g===null||g.tag!==7?(g=ul(v,m.mode,_,C),g.return=m,g):(g=i(g,v),g.return=m,g)}function p(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=hS(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ag:return v=kg(g.type,g.key,g.props,null,m.mode,v),of(v,g),v.return=m,v;case cf:return g=mS(g,m.mode,v),g.return=m,g;case Ns:return g=al(g),p(m,g,v)}if(uf(g)||tf(g))return g=ul(g,m.mode,v,null),g.return=m,g;if(typeof g.then=="function")return p(m,yg(g),v);if(g.$$typeof===qn)return p(m,mg(m,g),v);gg(m,g)}return null}function f(m,g,v,_){var C=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return C!==null?null:a(m,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ag:return v.key===C?l(m,g,v,_):null;case cf:return v.key===C?c(m,g,v,_):null;case Ns:return v=al(v),f(m,g,v,_)}if(uf(v)||tf(v))return C!==null?null:u(m,g,v,_,null);if(typeof v.then=="function")return f(m,g,yg(v),_);if(v.$$typeof===qn)return f(m,g,mg(m,v),_);gg(m,v)}return null}function d(m,g,v,_,C){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return m=m.get(v)||null,a(g,m,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ag:return m=m.get(_.key===null?v:_.key)||null,l(g,m,_,C);case cf:return m=m.get(_.key===null?v:_.key)||null,c(g,m,_,C);case Ns:return _=al(_),d(m,g,v,_,C)}if(uf(_)||tf(_))return m=m.get(v)||null,u(g,m,_,C,null);if(typeof _.then=="function")return d(m,g,v,yg(_),C);if(_.$$typeof===qn)return d(m,g,v,mg(g,_),C);gg(g,_)}return null}function h(m,g,v,_){for(var C=null,w=null,E=g,O=g=0,A=null;E!==null&&O<v.length;O++){E.index>O?(A=E,E=null):A=E.sibling;var B=f(m,E,v[O],_);if(B===null){E===null&&(E=A);break}e&&E&&B.alternate===null&&t(m,E),g=n(B,g,O),w===null?C=B:w.sibling=B,w=B,E=A}if(O===v.length)return r(m,E),Ne&&Wn(m,O),C;if(E===null){for(;O<v.length;O++)E=p(m,v[O],_),E!==null&&(g=n(E,g,O),w===null?C=E:w.sibling=E,w=E);return Ne&&Wn(m,O),C}for(E=o(E);O<v.length;O++)A=d(E,m,O,v[O],_),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?O:A.key),g=n(A,g,O),w===null?C=A:w.sibling=A,w=A);return e&&E.forEach(function(D){return t(m,D)}),Ne&&Wn(m,O),C}function y(m,g,v,_){if(v==null)throw Error(U(151));for(var C=null,w=null,E=g,O=g=0,A=null,B=v.next();E!==null&&!B.done;O++,B=v.next()){E.index>O?(A=E,E=null):A=E.sibling;var D=f(m,E,B.value,_);if(D===null){E===null&&(E=A);break}e&&E&&D.alternate===null&&t(m,E),g=n(D,g,O),w===null?C=D:w.sibling=D,w=D,E=A}if(B.done)return r(m,E),Ne&&Wn(m,O),C;if(E===null){for(;!B.done;O++,B=v.next())B=p(m,B.value,_),B!==null&&(g=n(B,g,O),w===null?C=B:w.sibling=B,w=B);return Ne&&Wn(m,O),C}for(E=o(E);!B.done;O++,B=v.next())B=d(E,m,O,B.value,_),B!==null&&(e&&B.alternate!==null&&E.delete(B.key===null?O:B.key),g=n(B,g,O),w===null?C=B:w.sibling=B,w=B);return e&&E.forEach(function(x){return t(m,x)}),Ne&&Wn(m,O),C}function b(m,g,v,_){if(typeof v=="object"&&v!==null&&v.type===xu&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ag:e:{for(var C=v.key;g!==null;){if(g.key===C){if(C=v.type,C===xu){if(g.tag===7){r(m,g.sibling),_=i(g,v.props.children),_.return=m,m=_;break e}}else if(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ns&&al(C)===g.type){r(m,g.sibling),_=i(g,v.props),of(_,v),_.return=m,m=_;break e}r(m,g);break}else t(m,g);g=g.sibling}v.type===xu?(_=ul(v.props.children,m.mode,_,v.key),_.return=m,m=_):(_=kg(v.type,v.key,v.props,null,m.mode,_),of(_,v),_.return=m,m=_)}return s(m);case cf:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){r(m,g.sibling),_=i(g,v.children||[]),_.return=m,m=_;break e}else{r(m,g);break}else t(m,g);g=g.sibling}_=mS(v,m.mode,_),_.return=m,m=_}return s(m);case Ns:return v=al(v),b(m,g,v,_)}if(uf(v))return h(m,g,v,_);if(tf(v)){if(C=tf(v),typeof C!="function")throw Error(U(150));return v=C.call(v),y(m,g,v,_)}if(typeof v.then=="function")return b(m,g,yg(v),_);if(v.$$typeof===qn)return b(m,g,mg(m,v),_);gg(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,g!==null&&g.tag===6?(r(m,g.sibling),_=i(g,v),_.return=m,m=_):(r(m,g),_=hS(v,m.mode,_),_.return=m,m=_),s(m)):r(m,g)}return function(m,g,v,_){try{Af=0;var C=b(m,g,v,_);return zu=null,C}catch(E){if(E===tp||E===Sv)throw E;var w=Mo(29,E,null,m.mode);return w.lanes=_,w.return=m,w}}}var yl=eM(!0),tM=eM(!1),Ls=!1;function Zx(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ix(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 Gs(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ys(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ve&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=qg(e),qD(e,null,r),t}return _v(e,o,t,r),qg(e)}function vf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,bD(e,r)}}function gS(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var i=null,n=null;if(r=r.firstBaseUpdate,r!==null){do{var s={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};n===null?i=n=s:n=n.next=s,r=r.next}while(r!==null);n===null?i=n=t:n=n.next=t}else i=n=t;r={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:n,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var nx=!1;function bf(){if(nx){var e=Iu;if(e!==null)throw e}}function _f(e,t,r,o){nx=!1;var i=e.updateQueue;Ls=!1;var n=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?n=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(n!==null){var p=i.baseState;s=0,u=c=l=null,a=n;do{var f=a.lane&-536870913,d=f!==a.lane;if(d?(De&f)===f:(o&f)===f){f!==0&&f===Wu&&(nx=!0),u!==null&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var h=e,y=a;f=t;var b=r;switch(y.tag){case 1:if(h=y.payload,typeof h=="function"){p=h.call(b,p,f);break e}p=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=y.payload,f=typeof h=="function"?h.call(b,p,f):h,f==null)break e;p=Tt({},p,f);break e;case 2:Ls=!0}}f=a.callback,f!==null&&(e.flags|=64,d&&(e.flags|=8192),d=i.callbacks,d===null?i.callbacks=[f]:d.push(f))}else d={lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=d,l=p):u=u.next=d,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);u===null&&(l=p),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,n===null&&(i.shared.lanes=0),ia|=s,e.lanes=s,e.memoizedState=p}}function rM(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function oM(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)rM(r[e],t)}var Vu=ln(null),Xg=ln(0);function dO(e,t){e=rs,mt(Xg,e),mt(Vu,t),rs=e|t.baseLanes}function sx(){mt(Xg,rs),mt(Vu,Vu.current)}function Qx(){rs=Xg.current,yr(Vu),yr(Xg)}var Fo=ln(null),pi=null;function zs(e){var t=e.alternate;mt(Vt,Vt.current&1),mt(Fo,e),pi===null&&(t===null||Vu.current!==null||t.memoizedState!==null)&&(pi=e)}function ax(e){mt(Vt,Vt.current),mt(Fo,e),pi===null&&(pi=e)}function iM(e){e.tag===22?(mt(Vt,Vt.current),mt(Fo,e),pi===null&&(pi=e)):Fs(e)}function Fs(){mt(Vt,Vt.current),mt(Fo,Fo.current)}function Do(e){yr(Fo),pi===e&&(pi=null),yr(Vt)}var Vt=ln(0);function Zg(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Rx(r)||Px(r)))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 Jn=0,Se=null,it=null,Xt=null,Qg=!1,Fu=!1,gl=!1,Jg=0,Bf=0,Hu=null,A7=0;function zt(){throw Error(U(321))}function Jx(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!zo(e[r],t[r]))return!1;return!0}function eT(e,t,r,o,i,n){return Jn=n,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ye.H=e===null||e.memoizedState===null?NM:pT,gl=!1,n=r(o,i),gl=!1,Fu&&(n=sM(t,r,o,i)),nM(e),n}function nM(e){ye.H=Nf;var t=it!==null&&it.next!==null;if(Jn=0,Xt=it=Se=null,Qg=!1,Bf=0,Hu=null,t)throw Error(U(300));e===null||Jt||(e=e.dependencies,e!==null&&Gg(e)&&(Jt=!0))}function sM(e,t,r,o){Se=e;var i=0;do{if(Fu&&(Hu=null),Bf=0,Fu=!1,25<=i)throw Error(U(301));if(i+=1,Xt=it=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}ye.H=LM,n=t(r,o)}while(Fu);return n}function B7(){var e=ye.H,t=e.useState()[0];return t=typeof t.then=="function"?Gf(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(Se.flags|=1024),t}function tT(){var e=Jg!==0;return Jg=0,e}function rT(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function oT(e){if(Qg){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qg=!1}Jn=0,Xt=it=Se=null,Fu=!1,Bf=Jg=0,Hu=null}function Zr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Se.memoizedState=Xt=e:Xt=Xt.next=e,Xt}function qt(){if(it===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=Xt===null?Se.memoizedState:Xt.next;if(t!==null)Xt=t,it=e;else{if(e===null)throw Se.alternate===null?Error(U(467)):Error(U(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},Xt===null?Se.memoizedState=Xt=e:Xt=Xt.next=e}return Xt}function xv(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gf(e){var t=Bf;return Bf+=1,Hu===null&&(Hu=[]),e=JD(Hu,e,t),t=Se,(Xt===null?t.memoizedState:Xt.next)===null&&(t=t.alternate,ye.H=t===null||t.memoizedState===null?NM:pT),e}function Tv(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gf(e);if(e.$$typeof===qn)return Br(e)}throw Error(U(438,String(e)))}function iT(e){var t=null,r=Se.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var o=Se.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=xv(),Se.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),o=0;o<e;o++)r[o]=b9;return t.index++,r}function es(e,t){return typeof t=="function"?t(e):t}function Dg(e){var t=qt();return nT(t,it,e)}function nT(e,t,r){var o=e.queue;if(o===null)throw Error(U(311));o.lastRenderedReducer=r;var i=e.baseQueue,n=o.pending;if(n!==null){if(i!==null){var s=i.next;i.next=n.next,n.next=s}t.baseQueue=i=n,o.pending=null}if(n=e.baseState,i===null)e.memoizedState=n;else{t=i.next;var a=s=null,l=null,c=t,u=!1;do{var p=c.lane&-536870913;if(p!==c.lane?(De&p)===p:(Jn&p)===p){var f=c.revertLane;if(f===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),p===Wu&&(u=!0);else if((Jn&f)===f){c=c.next,f===Wu&&(u=!0);continue}else p={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=p,s=n):l=l.next=p,Se.lanes|=f,ia|=f;p=c.action,gl&&r(n,p),n=c.hasEagerState?c.eagerState:r(n,p)}else f={lane:p,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=f,s=n):l=l.next=f,Se.lanes|=p,ia|=p;c=c.next}while(c!==null&&c!==t);if(l===null?s=n:l.next=a,!zo(n,e.memoizedState)&&(Jt=!0,u&&(r=Iu,r!==null)))throw r;e.memoizedState=n,e.baseState=s,e.baseQueue=l,o.lastRenderedState=n}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function vS(e){var t=qt(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,n=t.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do n=e(n,s.action),s=s.next;while(s!==i);zo(n,t.memoizedState)||(Jt=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),r.lastRenderedState=n}return[n,o]}function aM(e,t,r){var o=Se,i=qt(),n=Ne;if(n){if(r===void 0)throw Error(U(407));r=r()}else r=t();var s=!zo((it||i).memoizedState,r);if(s&&(i.memoizedState=r,Jt=!0),i=i.queue,sT(uM.bind(null,o,i,e),[e]),i.getSnapshot!==t||s||Xt!==null&&Xt.memoizedState.tag&1){if(o.flags|=2048,qu(9,{destroy:void 0},cM.bind(null,o,i,r,t),null),ut===null)throw Error(U(349));n||(Jn&127)!==0||lM(o,t,r)}return r}function lM(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Se.updateQueue,t===null?(t=xv(),Se.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function cM(e,t,r,o){t.value=r,t.getSnapshot=o,pM(t)&&dM(e)}function uM(e,t,r){return r(function(){pM(t)&&dM(e)})}function pM(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!zo(e,r)}catch{return!0}}function dM(e){var t=xl(e,2);t!==null&&ho(t,e,2)}function lx(e){var t=Zr();if(typeof e=="function"){var r=e;if(e=r(),gl){Us(!0);try{r()}finally{Us(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:e},t}function fM(e,t,r,o){return e.baseState=r,nT(e,it,typeof o=="function"?o:es)}function N7(e,t,r,o,i){if(wv(e))throw Error(U(485));if(e=t.action,e!==null){var n={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){n.listeners.push(s)}};ye.T!==null?r(!0):n.isTransition=!1,o(n),r=t.pending,r===null?(n.next=t.pending=n,hM(t,n)):(n.next=r.next,t.pending=r.next=n)}}function hM(e,t){var r=t.action,o=t.payload,i=e.state;if(t.isTransition){var n=ye.T,s={};ye.T=s;try{var a=r(i,o),l=ye.S;l!==null&&l(s,a),fO(e,t,a)}catch(c){cx(e,t,c)}finally{n!==null&&s.types!==null&&(n.types=s.types),ye.T=n}}else try{n=r(i,o),fO(e,t,n)}catch(c){cx(e,t,c)}}function fO(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){hO(e,t,o)},function(o){return cx(e,t,o)}):hO(e,t,r)}function hO(e,t,r){t.status="fulfilled",t.value=r,mM(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,hM(e,r)))}function cx(e,t,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=r,mM(t),t=t.next;while(t!==o)}e.action=null}function mM(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function yM(e,t){return t}function mO(e,t){if(Ne){var r=ut.formState;if(r!==null){e:{var o=Se;if(Ne){if(xt){t:{for(var i=xt,n=ui;i.nodeType!==8;){if(!n){i=null;break t}if(i=di(i.nextSibling),i===null){i=null;break t}}n=i.data,i=n==="F!"||n==="F"?i:null}if(i){xt=di(i.nextSibling),o=i.data==="F!";break e}}ra(o)}o=!1}o&&(t=r[0])}}return r=Zr(),r.memoizedState=r.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yM,lastRenderedState:t},r.queue=o,r=MM.bind(null,Se,o),o.dispatch=r,o=lx(!1),n=uT.bind(null,Se,!1,o.queue),o=Zr(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,r=N7.bind(null,Se,i,n,r),i.dispatch=r,o.memoizedState=e,[t,r,!1]}function yO(e){var t=qt();return gM(t,it,e)}function gM(e,t,r){if(t=nT(e,t,yM)[0],e=Dg(es)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Gf(t)}catch(s){throw s===tp?Sv:s}else o=t;t=qt();var i=t.queue,n=i.dispatch;return r!==t.memoizedState&&(Se.flags|=2048,qu(9,{destroy:void 0},L7.bind(null,i,r),null)),[o,n,e]}function L7(e,t){e.action=t}function gO(e){var t=qt(),r=it;if(r!==null)return gM(t,r,e);qt(),t=t.memoizedState,r=qt();var o=r.queue.dispatch;return r.memoizedState=e,[t,o,!1]}function qu(e,t,r,o){return e={tag:e,create:r,deps:o,inst:t,next:null},t=Se.updateQueue,t===null&&(t=xv(),Se.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e),e}function vM(){return qt().memoizedState}function Mg(e,t,r,o){var i=Zr();Se.flags|=e,i.memoizedState=qu(1|t,{destroy:void 0},r,o===void 0?null:o)}function Cv(e,t,r,o){var i=qt();o=o===void 0?null:o;var n=i.memoizedState.inst;it!==null&&o!==null&&Jx(o,it.memoizedState.deps)?i.memoizedState=qu(t,n,r,o):(Se.flags|=e,i.memoizedState=qu(1|t,n,r,o))}function vO(e,t){Mg(8390656,8,e,t)}function sT(e,t){Cv(2048,8,e,t)}function I7(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=xv(),Se.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function bM(e){var t=qt().memoizedState;return I7({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function _M(e,t){return Cv(4,2,e,t)}function SM(e,t){return Cv(4,4,e,t)}function xM(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function TM(e,t,r){r=r!=null?r.concat([e]):null,Cv(4,4,xM.bind(null,t,e),r)}function aT(){}function CM(e,t){var r=qt();t=t===void 0?null:t;var o=r.memoizedState;return t!==null&&Jx(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function wM(e,t){var r=qt();t=t===void 0?null:t;var o=r.memoizedState;if(t!==null&&Jx(t,o[1]))return o[0];if(o=e(),gl){Us(!0);try{e()}finally{Us(!1)}}return r.memoizedState=[o,t],o}function lT(e,t,r){return r===void 0||(Jn&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=fA(),Se.lanes|=e,ia|=e,r)}function RM(e,t,r,o){return zo(r,t)?r:Vu.current!==null?(e=lT(e,r,o),zo(e,t)||(Jt=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(De&261930)===0?(Jt=!0,e.memoizedState=r):(e=fA(),Se.lanes|=e,ia|=e,t)}function PM(e,t,r,o,i){var n=qe.p;qe.p=n!==0&&8>n?n:8;var s=ye.T,a={};ye.T=a,uT(e,!1,t,r);try{var l=i(),c=ye.S;if(c!==null&&c(a,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=M7(l,o);Sf(e,t,u,Io(e))}else Sf(e,t,o,Io(e))}catch(p){Sf(e,t,{then:function(){},status:"rejected",reason:p},Io())}finally{qe.p=n,s!==null&&a.types!==null&&(s.types=a.types),ye.T=s}}function z7(){}function ux(e,t,r,o){if(e.tag!==5)throw Error(U(476));var i=EM(e).queue;PM(e,i,t,cl,r===null?z7:function(){return kM(e),r(o)})}function EM(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:cl,baseState:cl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:cl},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function kM(e){var t=EM(e);t.next===null&&(t=e.alternate.memoizedState),Sf(e,t.next.queue,{},Io())}function cT(){return Br(zf)}function OM(){return qt().memoizedState}function DM(){return qt().memoizedState}function F7(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=Io();e=Gs(r);var o=Ys(t,e,r);o!==null&&(ho(o,t,r),vf(o,t,r)),t={cache:Gx()},e.payload=t;return}t=t.return}}function H7(e,t,r){var o=Io();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},wv(e)?AM(t,r):(r=Wx(e,t,r,o),r!==null&&(ho(r,e,o),BM(r,t,o)))}function MM(e,t,r){var o=Io();Sf(e,t,r,o)}function Sf(e,t,r,o){var i={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(wv(e))AM(t,i);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var s=t.lastRenderedState,a=n(s,r);if(i.hasEagerState=!0,i.eagerState=a,zo(a,s))return _v(e,t,i,0),ut===null&&bv(),!1}catch{}if(r=Wx(e,t,i,o),r!==null)return ho(r,e,o),BM(r,t,o),!0}return!1}function uT(e,t,r,o){if(o={lane:2,revertLane:bT(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},wv(e)){if(t)throw Error(U(479))}else t=Wx(e,r,o,2),t!==null&&ho(t,e,2)}function wv(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function AM(e,t){Fu=Qg=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function BM(e,t,r){if((r&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,bD(e,r)}}var Nf={readContext:Br,use:Tv,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Nf.useEffectEvent=zt;var NM={readContext:Br,use:Tv,useCallback:function(e,t){return Zr().memoizedState=[e,t===void 0?null:t],e},useContext:Br,useEffect:vO,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Mg(4194308,4,xM.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Mg(4194308,4,e,t)},useInsertionEffect:function(e,t){Mg(4,2,e,t)},useMemo:function(e,t){var r=Zr();t=t===void 0?null:t;var o=e();if(gl){Us(!0);try{e()}finally{Us(!1)}}return r.memoizedState=[o,t],o},useReducer:function(e,t,r){var o=Zr();if(r!==void 0){var i=r(t);if(gl){Us(!0);try{r(t)}finally{Us(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=H7.bind(null,Se,e),[o.memoizedState,e]},useRef:function(e){var t=Zr();return e={current:e},t.memoizedState=e},useState:function(e){e=lx(e);var t=e.queue,r=MM.bind(null,Se,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:aT,useDeferredValue:function(e,t){var r=Zr();return lT(r,e,t)},useTransition:function(){var e=lx(!1);return e=PM.bind(null,Se,e.queue,!0,!1),Zr().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var o=Se,i=Zr();if(Ne){if(r===void 0)throw Error(U(407));r=r()}else{if(r=t(),ut===null)throw Error(U(349));(De&127)!==0||lM(o,t,r)}i.memoizedState=r;var n={value:r,getSnapshot:t};return i.queue=n,vO(uM.bind(null,o,n,e),[e]),o.flags|=2048,qu(9,{destroy:void 0},cM.bind(null,o,n,r,t),null),r},useId:function(){var e=Zr(),t=ut.identifierPrefix;if(Ne){var r=nn,o=on;r=(o&~(1<<32-Lo(o)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Jg++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=A7++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cT,useFormState:mO,useActionState:mO,useOptimistic:function(e){var t=Zr();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=uT.bind(null,Se,!0,r),r.dispatch=t,[e,t]},useMemoCache:iT,useCacheRefresh:function(){return Zr().memoizedState=F7.bind(null,Se)},useEffectEvent:function(e){var t=Zr(),r={impl:e};return t.memoizedState=r,function(){if((Ve&2)!==0)throw Error(U(440));return r.impl.apply(void 0,arguments)}}},pT={readContext:Br,use:Tv,useCallback:CM,useContext:Br,useEffect:sT,useImperativeHandle:TM,useInsertionEffect:_M,useLayoutEffect:SM,useMemo:wM,useReducer:Dg,useRef:vM,useState:function(){return Dg(es)},useDebugValue:aT,useDeferredValue:function(e,t){var r=qt();return RM(r,it.memoizedState,e,t)},useTransition:function(){var e=Dg(es)[0],t=qt().memoizedState;return[typeof e=="boolean"?e:Gf(e),t]},useSyncExternalStore:aM,useId:OM,useHostTransitionStatus:cT,useFormState:yO,useActionState:yO,useOptimistic:function(e,t){var r=qt();return fM(r,it,e,t)},useMemoCache:iT,useCacheRefresh:DM};pT.useEffectEvent=bM;var LM={readContext:Br,use:Tv,useCallback:CM,useContext:Br,useEffect:sT,useImperativeHandle:TM,useInsertionEffect:_M,useLayoutEffect:SM,useMemo:wM,useReducer:vS,useRef:vM,useState:function(){return vS(es)},useDebugValue:aT,useDeferredValue:function(e,t){var r=qt();return it===null?lT(r,e,t):RM(r,it.memoizedState,e,t)},useTransition:function(){var e=vS(es)[0],t=qt().memoizedState;return[typeof e=="boolean"?e:Gf(e),t]},useSyncExternalStore:aM,useId:OM,useHostTransitionStatus:cT,useFormState:gO,useActionState:gO,useOptimistic:function(e,t){var r=qt();return it!==null?fM(r,it,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:iT,useCacheRefresh:DM};LM.useEffectEvent=bM;function bS(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:Tt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var px={enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Io(),i=Gs(o);i.payload=t,r!=null&&(i.callback=r),t=Ys(e,i,o),t!==null&&(ho(t,e,o),vf(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Io(),i=Gs(o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Ys(e,i,o),t!==null&&(ho(t,e,o),vf(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Io(),o=Gs(r);o.tag=2,t!=null&&(o.callback=t),t=Ys(e,o,r),t!==null&&(ho(t,e,r),vf(t,e,r))}};function bO(e,t,r,o,i,n,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,n,s):t.prototype&&t.prototype.isPureReactComponent?!Of(r,o)||!Of(i,n):!0}function _O(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&px.enqueueReplaceState(t,t.state,null)}function vl(e,t){var r=t;if("ref"in t){r={};for(var o in t)o!=="ref"&&(r[o]=t[o])}if(e=e.defaultProps){r===t&&(r=Tt({},r));for(var i in e)r[i]===void 0&&(r[i]=e[i])}return r}function IM(e){Vg(e)}function zM(e){console.error(e)}function FM(e){Vg(e)}function ev(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function SO(e,t,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function dx(e,t,r){return r=Gs(r),r.tag=3,r.payload={element:null},r.callback=function(){ev(e,t)},r}function HM(e){return e=Gs(e),e.tag=3,e}function UM(e,t,r,o){var i=r.type.getDerivedStateFromError;if(typeof i=="function"){var n=o.value;e.payload=function(){return i(n)},e.callback=function(){SO(t,r,o)}}var s=r.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){SO(t,r,o),typeof i!="function"&&(Xs===null?Xs=new Set([this]):Xs.add(this));var a=o.stack;this.componentDidCatch(o.value,{componentStack:a!==null?a:""})})}function U7(e,t,r,o,i){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=r.alternate,t!==null&&ep(t,r,i,!0),r=Fo.current,r!==null){switch(r.tag){case 31:case 13:return pi===null?nv():r.alternate===null&&Ft===0&&(Ft=3),r.flags&=-257,r.flags|=65536,r.lanes=i,o===Yg?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([o]):t.add(o),OS(e,o,i)),!1;case 22:return r.flags|=65536,o===Yg?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([o]):r.add(o)),OS(e,o,i)),!1}throw Error(U(435,r.tag))}return OS(e,o,i),nv(),!1}if(Ne)return t=Fo.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==JS&&(e=Error(U(422),{cause:o}),Mf(ci(e,r)))):(o!==JS&&(t=Error(U(423),{cause:o}),Mf(ci(t,r))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=ci(o,r),i=dx(e.stateNode,o,i),gS(e,i),Ft!==4&&(Ft=2)),!1;var n=Error(U(520),{cause:o});if(n=ci(n,r),Cf===null?Cf=[n]:Cf.push(n),Ft!==4&&(Ft=2),t===null)return!0;o=ci(o,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=i&-i,r.lanes|=e,e=dx(r.stateNode,o,e),gS(r,e),!1;case 1:if(t=r.type,n=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Xs===null||!Xs.has(n))))return r.flags|=65536,i&=-i,r.lanes|=i,i=HM(i),UM(i,e,r,o),gS(r,i),!1}r=r.return}while(r!==null);return!1}var dT=Error(U(461)),Jt=!1;function Dr(e,t,r,o){t.child=e===null?tM(t,null,r,o):yl(t,e.child,r,o)}function xO(e,t,r,o,i){r=r.render;var n=t.ref;if("ref"in o){var s={};for(var a in o)a!=="ref"&&(s[a]=o[a])}else s=o;return ml(t),o=eT(e,t,r,s,n,i),a=tT(),e!==null&&!Jt?(rT(e,t,i),ts(e,t,i)):(Ne&&a&&qx(t),t.flags|=1,Dr(e,t,o,i),t.child)}function TO(e,t,r,o,i){if(e===null){var n=r.type;return typeof n=="function"&&!Vx(n)&&n.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=n,$M(e,t,n,o,i)):(e=kg(r.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!fT(e,i)){var s=n.memoizedProps;if(r=r.compare,r=r!==null?r:Of,r(s,o)&&e.ref===t.ref)return ts(e,t,i)}return t.flags|=1,e=Yn(n,o),e.ref=t.ref,e.return=t,t.child=e}function $M(e,t,r,o,i){if(e!==null){var n=e.memoizedProps;if(Of(n,o)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=o=n,fT(e,i))(e.flags&131072)!==0&&(Jt=!0);else return t.lanes=e.lanes,ts(e,t,i)}return fx(e,t,r,o,i)}function jM(e,t,r,o){var i=o.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|r:r,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~n}else o=0,t.child=null;return CO(e,t,n,r,o)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Og(t,n!==null?n.cachePool:null),n!==null?dO(t,n):sx(),iM(t);else return o=t.lanes=536870912,CO(e,t,n!==null?n.baseLanes|r:r,r,o)}else n!==null?(Og(t,n.cachePool),dO(t,n),Fs(t),t.memoizedState=null):(e!==null&&Og(t,null),sx(),Fs(t));return Dr(e,t,i,r),t.child}function df(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function CO(e,t,r,o,i){var n=Yx();return n=n===null?null:{parent:Qt._currentValue,pool:n},t.memoizedState={baseLanes:r,cachePool:n},e!==null&&Og(t,null),sx(),iM(t),e!==null&&ep(e,t,o,!0),t.childLanes=i,null}function Ag(e,t){return t=tv({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wO(e,t,r){return yl(t,e.child,null,r),e=Ag(t,t.pendingProps),e.flags|=2,Do(t),t.memoizedState=null,e}function $7(e,t,r){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(o.mode==="hidden")return e=Ag(t,o),t.lanes=536870912,df(null,e);if(ax(t),(e=xt)?(e=NA(e,ui),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ta!==null?{id:on,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},r=GD(e),r.return=t,t.child=r,Ar=t,xt=null)):e=null,e===null)throw ra(t);return t.lanes=536870912,null}return Ag(t,o)}var n=e.memoizedState;if(n!==null){var s=n.dehydrated;if(ax(t),i)if(t.flags&256)t.flags&=-257,t=wO(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(Jt||ep(e,t,r,!1),i=(r&e.childLanes)!==0,Jt||i){if(o=ut,o!==null&&(s=_D(o,r),s!==0&&s!==n.retryLane))throw n.retryLane=s,xl(e,s),ho(o,e,s),dT;nv(),t=wO(e,t,r)}else e=n.treeContext,xt=di(s.nextSibling),Ar=t,Ne=!0,Ks=null,ui=!1,e!==null&&XD(t,e),t=Ag(t,o),t.flags|=4096;return t}return e=Yn(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bg(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(U(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function fx(e,t,r,o,i){return ml(t),r=eT(e,t,r,o,void 0,i),o=tT(),e!==null&&!Jt?(rT(e,t,i),ts(e,t,i)):(Ne&&o&&qx(t),t.flags|=1,Dr(e,t,r,i),t.child)}function RO(e,t,r,o,i,n){return ml(t),t.updateQueue=null,r=sM(t,o,r,i),nM(e),o=tT(),e!==null&&!Jt?(rT(e,t,n),ts(e,t,n)):(Ne&&o&&qx(t),t.flags|=1,Dr(e,t,r,n),t.child)}function PO(e,t,r,o,i){if(ml(t),t.stateNode===null){var n=Ou,s=r.contextType;typeof s=="object"&&s!==null&&(n=Br(s)),n=new r(o,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=px,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=o,n.state=t.memoizedState,n.refs={},Zx(t),s=r.contextType,n.context=typeof s=="object"&&s!==null?Br(s):Ou,n.state=t.memoizedState,s=r.getDerivedStateFromProps,typeof s=="function"&&(bS(t,r,s,o),n.state=t.memoizedState),typeof r.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&&px.enqueueReplaceState(n,n.state,null),_f(t,o,n,i),bf(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){n=t.stateNode;var a=t.memoizedProps,l=vl(r,a);n.props=l;var c=n.context,u=r.contextType;s=Ou,typeof u=="object"&&u!==null&&(s=Br(u));var p=r.getDerivedStateFromProps;u=typeof p=="function"||typeof n.getSnapshotBeforeUpdate=="function",a=t.pendingProps!==a,u||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(a||c!==s)&&_O(t,n,o,s),Ls=!1;var f=t.memoizedState;n.state=f,_f(t,o,n,i),bf(),c=t.memoizedState,a||f!==c||Ls?(typeof p=="function"&&(bS(t,r,p,o),c=t.memoizedState),(l=Ls||bO(t,r,l,o,f,c,s))?(u||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=o,t.memoizedState=c),n.props=o,n.state=c,n.context=s,o=l):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{n=t.stateNode,ix(e,t),s=t.memoizedProps,u=vl(r,s),n.props=u,p=t.pendingProps,f=n.context,c=r.contextType,l=Ou,typeof c=="object"&&c!==null&&(l=Br(c)),a=r.getDerivedStateFromProps,(c=typeof a=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(s!==p||f!==l)&&_O(t,n,o,l),Ls=!1,f=t.memoizedState,n.state=f,_f(t,o,n,i),bf();var d=t.memoizedState;s!==p||f!==d||Ls||e!==null&&e.dependencies!==null&&Gg(e.dependencies)?(typeof a=="function"&&(bS(t,r,a,o),d=t.memoizedState),(u=Ls||bO(t,r,u,o,f,d,l)||e!==null&&e.dependencies!==null&&Gg(e.dependencies))?(c||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(o,d,l),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(o,d,l)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=d),n.props=o,n.state=d,n.context=l,o=u):(typeof n.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return n=o,Bg(e,t),o=(t.flags&128)!==0,n||o?(n=t.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&o?(t.child=yl(t,e.child,null,i),t.child=yl(t,null,r,i)):Dr(e,t,r,i),t.memoizedState=n.state,e=t.child):e=ts(e,t,i),e}function EO(e,t,r,o){return hl(),t.flags|=256,Dr(e,t,r,o),t.child}var _S={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function SS(e){return{baseLanes:e,cachePool:QD()}}function xS(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=Ao),e}function WM(e,t,r){var o=t.pendingProps,i=!1,n=(t.flags&128)!==0,s;if((s=n)||(s=e!==null&&e.memoizedState===null?!1:(Vt.current&2)!==0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(i?zs(t):Fs(t),(e=xt)?(e=NA(e,ui),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ta!==null?{id:on,overflow:nn}:null,retryLane:536870912,hydrationErrors:null},r=GD(e),r.return=t,t.child=r,Ar=t,xt=null)):e=null,e===null)throw ra(t);return Px(e)?t.lanes=32:t.lanes=536870912,null}var a=o.children;return o=o.fallback,i?(Fs(t),i=t.mode,a=tv({mode:"hidden",children:a},i),o=ul(o,i,r,null),a.return=t,o.return=t,a.sibling=o,t.child=a,o=t.child,o.memoizedState=SS(r),o.childLanes=xS(e,s,r),t.memoizedState=_S,df(null,o)):(zs(t),hx(t,a))}var l=e.memoizedState;if(l!==null&&(a=l.dehydrated,a!==null)){if(n)t.flags&256?(zs(t),t.flags&=-257,t=TS(e,t,r)):t.memoizedState!==null?(Fs(t),t.child=e.child,t.flags|=128,t=null):(Fs(t),a=o.fallback,i=t.mode,o=tv({mode:"visible",children:o.children},i),a=ul(a,i,r,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,yl(t,e.child,null,r),o=t.child,o.memoizedState=SS(r),o.childLanes=xS(e,s,r),t.memoizedState=_S,t=df(null,o));else if(zs(t),Px(a)){if(s=a.nextSibling&&a.nextSibling.dataset,s)var c=s.dgst;s=c,o=Error(U(419)),o.stack="",o.digest=s,Mf({value:o,source:null,stack:null}),t=TS(e,t,r)}else if(Jt||ep(e,t,r,!1),s=(r&e.childLanes)!==0,Jt||s){if(s=ut,s!==null&&(o=_D(s,r),o!==0&&o!==l.retryLane))throw l.retryLane=o,xl(e,o),ho(s,e,o),dT;Rx(a)||nv(),t=TS(e,t,r)}else Rx(a)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,xt=di(a.nextSibling),Ar=t,Ne=!0,Ks=null,ui=!1,e!==null&&XD(t,e),t=hx(t,o.children),t.flags|=4096);return t}return i?(Fs(t),a=o.fallback,i=t.mode,l=e.child,c=l.sibling,o=Yn(l,{mode:"hidden",children:o.children}),o.subtreeFlags=l.subtreeFlags&65011712,c!==null?a=Yn(c,a):(a=ul(a,i,r,null),a.flags|=2),a.return=t,o.return=t,o.sibling=a,t.child=o,df(null,o),o=t.child,a=e.child.memoizedState,a===null?a=SS(r):(i=a.cachePool,i!==null?(l=Qt._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=QD(),a={baseLanes:a.baseLanes|r,cachePool:i}),o.memoizedState=a,o.childLanes=xS(e,s,r),t.memoizedState=_S,df(e.child,o)):(zs(t),r=e.child,e=r.sibling,r=Yn(r,{mode:"visible",children:o.children}),r.return=t,r.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=r,t.memoizedState=null,r)}function hx(e,t){return t=tv({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function tv(e,t){return e=Mo(22,e,null,t),e.lanes=0,e}function TS(e,t,r){return yl(t,e.child,null,r),e=hx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kO(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),tx(e.return,t,r)}function CS(e,t,r,o,i,n){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:i,treeForkCount:n}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=r,s.tailMode=i,s.treeForkCount=n)}function VM(e,t,r){var o=t.pendingProps,i=o.revealOrder,n=o.tail;o=o.children;var s=Vt.current,a=(s&2)!==0;if(a?(s=s&1|2,t.flags|=128):s&=1,mt(Vt,s),Dr(e,t,o,r),o=Ne?Df:0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kO(e,r,t);else if(e.tag===19)kO(e,r,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(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Zg(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),CS(t,!1,i,r,n,o);break;case"backwards":case"unstable_legacy-backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Zg(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}CS(t,!0,r,null,n,o);break;case"together":CS(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function ts(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ia|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(ep(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,r=Yn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Yn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function fT(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Gg(e)))}function j7(e,t,r){switch(t.tag){case 3:Ug(t,t.stateNode.containerInfo),Is(t,Qt,e.memoizedState.cache),hl();break;case 27:case 5:$S(t);break;case 4:Ug(t,t.stateNode.containerInfo);break;case 10:Is(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ax(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(zs(t),t.flags|=128,null):(r&t.child.childLanes)!==0?WM(e,t,r):(zs(t),e=ts(e,t,r),e!==null?e.sibling:null);zs(t);break;case 19:var i=(e.flags&128)!==0;if(o=(r&t.childLanes)!==0,o||(ep(e,t,r,!1),o=(r&t.childLanes)!==0),i){if(o)return VM(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),mt(Vt,Vt.current),o)break;return null;case 22:return t.lanes=0,jM(e,t,r,t.pendingProps);case 24:Is(t,Qt,e.memoizedState.cache)}return ts(e,t,r)}function qM(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Jt=!0;else{if(!fT(e,r)&&(t.flags&128)===0)return Jt=!1,j7(e,t,r);Jt=(e.flags&131072)!==0}else Jt=!1,Ne&&(t.flags&1048576)!==0&&YD(t,Df,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=al(t.elementType),t.type=e,typeof e=="function")Vx(e)?(o=vl(e,o),t.tag=1,t=PO(null,t,e,o,r)):(t.tag=0,t=fx(null,t,e,o,r));else{if(e!=null){var i=e.$$typeof;if(i===Dx){t.tag=11,t=xO(null,t,e,o,r);break e}else if(i===Mx){t.tag=14,t=TO(null,t,e,o,r);break e}}throw t=HS(e)||e,Error(U(306,t,""))}}return t;case 0:return fx(e,t,t.type,t.pendingProps,r);case 1:return o=t.type,i=vl(o,t.pendingProps),PO(e,t,o,i,r);case 3:e:{if(Ug(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var n=t.memoizedState;i=n.element,ix(e,t),_f(t,o,null,r);var s=t.memoizedState;if(o=s.cache,Is(t,Qt,o),o!==n.cache&&rx(t,[Qt],r,!0),bf(),o=s.element,n.isDehydrated)if(n={element:o,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=EO(e,t,o,r);break e}else if(o!==i){i=ci(Error(U(424)),t),Mf(i),t=EO(e,t,o,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,xt=di(e.firstChild),Ar=t,Ne=!0,Ks=null,ui=!0,r=tM(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(hl(),o===i){t=ts(e,t,r);break e}Dr(e,t,o,r)}t=t.child}return t;case 26:return Bg(e,t),e===null?(r=ZO(t.type,null,t.pendingProps,null))?t.memoizedState=r:Ne||(r=t.type,e=t.pendingProps,o=cv(qs.current).createElement(r),o[Mr]=t,o[mo]=e,Nr(o,r,e),mr(o),t.stateNode=o):t.memoizedState=ZO(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $S(t),e===null&&Ne&&(o=t.stateNode=LA(t.type,t.pendingProps,qs.current),Ar=t,ui=!0,i=xt,sa(t.type)?(Ex=i,xt=di(o.firstChild)):xt=i),Dr(e,t,t.pendingProps.children,r),Bg(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((i=o=xt)&&(o=gW(o,t.type,t.pendingProps,ui),o!==null?(t.stateNode=o,Ar=t,xt=di(o.firstChild),ui=!1,i=!0):i=!1),i||ra(t)),$S(t),i=t.type,n=t.pendingProps,s=e!==null?e.memoizedProps:null,o=n.children,Cx(i,n)?o=null:s!==null&&Cx(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=eT(e,t,B7,null,null,r),zf._currentValue=i),Bg(e,t),Dr(e,t,o,r),t.child;case 6:return e===null&&Ne&&((e=r=xt)&&(r=vW(r,t.pendingProps,ui),r!==null?(t.stateNode=r,Ar=t,xt=null,e=!0):e=!1),e||ra(t)),null;case 13:return WM(e,t,r);case 4:return Ug(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=yl(t,null,o,r):Dr(e,t,o,r),t.child;case 11:return xO(e,t,t.type,t.pendingProps,r);case 7:return Dr(e,t,t.pendingProps,r),t.child;case 8:return Dr(e,t,t.pendingProps.children,r),t.child;case 12:return Dr(e,t,t.pendingProps.children,r),t.child;case 10:return o=t.pendingProps,Is(t,t.type,o.value),Dr(e,t,o.children,r),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,ml(t),i=Br(i),o=o(i),t.flags|=1,Dr(e,t,o,r),t.child;case 14:return TO(e,t,t.type,t.pendingProps,r);case 15:return $M(e,t,t.type,t.pendingProps,r);case 19:return VM(e,t,r);case 31:return $7(e,t,r);case 22:return jM(e,t,r,t.pendingProps);case 24:return ml(t),o=Br(Qt),e===null?(i=Yx(),i===null&&(i=ut,n=Gx(),i.pooledCache=n,n.refCount++,n!==null&&(i.pooledCacheLanes|=r),i=n),t.memoizedState={parent:o,cache:i},Zx(t),Is(t,Qt,i)):((e.lanes&r)!==0&&(ix(e,t),_f(t,null,null,r),bf()),i=e.memoizedState,n=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Is(t,Qt,o)):(o=n.cache,Is(t,Qt,o),o!==i.cache&&rx(t,[Qt],r,!0))),Dr(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function Hn(e){e.flags|=4}function wS(e,t,r,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(yA())e.flags|=8192;else throw dl=Yg,Xx}else e.flags&=-16777217}function OO(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!FA(t))if(yA())e.flags|=8192;else throw dl=Yg,Xx}function vg(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gD():536870912,e.lanes|=t,Ku|=t)}function nf(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function St(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function W7(e,t,r){var o=t.pendingProps;switch(Kx(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(t),null;case 1:return St(t),null;case 3:return r=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Xn(Qt),Uu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(vu(t)?Hn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yS())),St(t),null;case 26:var i=t.type,n=t.memoizedState;return e===null?(Hn(t),n!==null?(St(t),OO(t,n)):(St(t),wS(t,i,null,o,r))):n?n!==e.memoizedState?(Hn(t),St(t),OO(t,n)):(St(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Hn(t),St(t),wS(t,i,e,o,r)),null;case 27:if($g(t),r=qs.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Hn(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return St(t),null}e=an.current,vu(t)?nO(t,e):(e=LA(i,o,r),t.stateNode=e,Hn(t))}return St(t),null;case 5:if($g(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Hn(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return St(t),null}if(n=an.current,vu(t))nO(t,n);else{var s=cv(qs.current);switch(n){case 1:n=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:n=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":n=s.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":n=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":n=s.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof o.is=="string"?s.createElement("select",{is:o.is}):s.createElement("select"),o.multiple?n.multiple=!0:o.size&&(n.size=o.size);break;default:n=typeof o.is=="string"?s.createElement(i,{is:o.is}):s.createElement(i)}}n[Mr]=t,n[mo]=o;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(Nr(n,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Hn(t)}}return St(t),wS(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Hn(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=qs.current,vu(t)){if(e=t.stateNode,r=t.memoizedProps,o=null,i=Ar,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Mr]=t,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||MA(e.nodeValue,r)),e||ra(t,!0)}else e=cv(e).createTextNode(o),e[Mr]=t,t.stateNode=e}return St(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(o=vu(t),r!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Mr]=t}else hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),e=!1}else r=yS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(Do(t),t):(Do(t),null);if((t.flags&128)!==0)throw Error(U(558))}return St(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=vu(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Mr]=t}else hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),i=!1}else i=yS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Do(t),t):(Do(t),null)}return Do(t),(t.flags&128)!==0?(t.lanes=r,t):(r=o!==null,e=e!==null&&e.memoizedState!==null,r&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),n=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(n=o.memoizedState.cachePool.pool),n!==i&&(o.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),vg(t,t.updateQueue),St(t),null);case 4:return Uu(),e===null&&_T(t.stateNode.containerInfo),St(t),null;case 10:return Xn(t.type),St(t),null;case 19:if(yr(Vt),o=t.memoizedState,o===null)return St(t),null;if(i=(t.flags&128)!==0,n=o.rendering,n===null)if(i)nf(o,!1);else{if(Ft!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=Zg(e),n!==null){for(t.flags|=128,nf(o,!1),e=n.updateQueue,t.updateQueue=e,vg(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)KD(r,e),r=r.sibling;return mt(Vt,Vt.current&1|2),Ne&&Wn(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Bo()>ov&&(t.flags|=128,i=!0,nf(o,!1),t.lanes=4194304)}else{if(!i)if(e=Zg(n),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,vg(t,e),nf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!n.alternate&&!Ne)return St(t),null}else 2*Bo()-o.renderingStartTime>ov&&r!==536870912&&(t.flags|=128,i=!0,nf(o,!1),t.lanes=4194304);o.isBackwards?(n.sibling=t.child,t.child=n):(e=o.last,e!==null?e.sibling=n:t.child=n,o.last=n)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Bo(),e.sibling=null,r=Vt.current,mt(Vt,i?r&1|2:r&1),Ne&&Wn(t,o.treeForkCount),e):(St(t),null);case 22:case 23:return Do(t),Qx(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(r&536870912)!==0&&(t.flags&128)===0&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),r=t.updateQueue,r!==null&&vg(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==r&&(t.flags|=2048),e!==null&&yr(pl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xn(Qt),St(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function V7(e,t){switch(Kx(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(Qt),Uu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $g(t),null;case 31:if(t.memoizedState!==null){if(Do(t),t.alternate===null)throw Error(U(340));hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Do(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return yr(Vt),null;case 4:return Uu(),null;case 10:return Xn(t.type),null;case 22:case 23:return Do(t),Qx(),e!==null&&yr(pl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xn(Qt),null;case 25:return null;default:return null}}function KM(e,t){switch(Kx(t),t.tag){case 3:Xn(Qt),Uu();break;case 26:case 27:case 5:$g(t);break;case 4:Uu();break;case 31:t.memoizedState!==null&&Do(t);break;case 13:Do(t);break;case 19:yr(Vt);break;case 10:Xn(t.type);break;case 22:case 23:Do(t),Qx(),e!==null&&yr(pl);break;case 24:Xn(Qt)}}function Yf(e,t){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var i=o.next;r=i;do{if((r.tag&e)===e){o=void 0;var n=r.create,s=r.inst;o=n(),s.destroy=o}r=r.next}while(r!==i)}}catch(a){rt(t,t.return,a)}}function oa(e,t,r){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var n=i.next;o=n;do{if((o.tag&e)===e){var s=o.inst,a=s.destroy;if(a!==void 0){s.destroy=void 0,i=t;var l=r,c=a;try{c()}catch(u){rt(i,l,u)}}}o=o.next}while(o!==n)}}catch(u){rt(t,t.return,u)}}function GM(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{oM(t,r)}catch(o){rt(e,e.return,o)}}}function YM(e,t,r){r.props=vl(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){rt(e,t,o)}}function xf(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(i){rt(e,t,i)}}function sn(e,t){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(i){rt(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(i){rt(e,t,i)}else r.current=null}function XM(e){var t=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(i){rt(e,e.return,i)}}function RS(e,t,r){try{var o=e.stateNode;pW(o,e.type,r,t),o[mo]=t}catch(i){rt(e,e.return,i)}}function ZM(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sa(e.type)||e.tag===4}function PS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZM(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&&sa(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 mx(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Kn));else if(o!==4&&(o===27&&sa(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(mx(e,t,r),e=e.sibling;e!==null;)mx(e,t,r),e=e.sibling}function rv(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(o===27&&sa(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(rv(e,t,r),e=e.sibling;e!==null;)rv(e,t,r),e=e.sibling}function QM(e){var t=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Nr(t,o,r),t[Mr]=e,t[mo]=r}catch(n){rt(e,e.return,n)}}var Vn=!1,Zt=!1,ES=!1,DO=typeof WeakSet=="function"?WeakSet:Set,hr=null;function q7(e,t){if(e=e.containerInfo,xx=fv,e=FD(e),$x(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var i=o.anchorOffset,n=o.focusNode;o=o.focusOffset;try{r.nodeType,n.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,p=e,f=null;t:for(;;){for(var d;p!==r||i!==0&&p.nodeType!==3||(a=s+i),p!==n||o!==0&&p.nodeType!==3||(l=s+o),p.nodeType===3&&(s+=p.nodeValue.length),(d=p.firstChild)!==null;)f=p,p=d;for(;;){if(p===e)break t;if(f===r&&++c===i&&(a=s),f===n&&++u===o&&(l=s),(d=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=d}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Tx={focusedElem:e,selectionRange:r},fv=!1,hr=t;hr!==null;)if(t=hr,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,hr=e;else for(;hr!==null;){switch(t=hr,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(r=0;r<e.length;r++)i=e[r],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&n!==null){e=void 0,r=t,i=n.memoizedProps,n=n.memoizedState,o=r.stateNode;try{var h=vl(r.type,i);e=o.getSnapshotBeforeUpdate(h,n),o.__reactInternalSnapshotBeforeUpdate=e}catch(y){rt(r,r.return,y)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)wx(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":wx(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(U(163))}if(e=t.sibling,e!==null){e.return=t.return,hr=e;break}hr=t.return}}function JM(e,t,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:$n(e,r),o&4&&Yf(5,r);break;case 1:if($n(e,r),o&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(s){rt(r,r.return,s)}else{var i=vl(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){rt(r,r.return,s)}}o&64&&GM(r),o&512&&xf(r,r.return);break;case 3:if($n(e,r),o&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{oM(e,t)}catch(s){rt(r,r.return,s)}}break;case 27:t===null&&o&4&&QM(r);case 26:case 5:$n(e,r),t===null&&o&4&&XM(r),o&512&&xf(r,r.return);break;case 12:$n(e,r);break;case 31:$n(e,r),o&4&&rA(e,r);break;case 13:$n(e,r),o&4&&oA(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=tW.bind(null,r),bW(e,r))));break;case 22:if(o=r.memoizedState!==null||Vn,!o){t=t!==null&&t.memoizedState!==null||Zt,i=Vn;var n=Zt;Vn=o,(Zt=t)&&!n?jn(e,r,(r.subtreeFlags&8772)!==0):$n(e,r),Vn=i,Zt=n}break;case 30:break;default:$n(e,r)}}function eA(e){var t=e.alternate;t!==null&&(e.alternate=null,eA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lx(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,po=!1;function Un(e,t,r){for(r=r.child;r!==null;)tA(e,t,r),r=r.sibling}function tA(e,t,r){if(No&&typeof No.onCommitFiberUnmount=="function")try{No.onCommitFiberUnmount($f,r)}catch{}switch(r.tag){case 26:Zt||sn(r,t),Un(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Zt||sn(r,t);var o=Et,i=po;sa(r.type)&&(Et=r.stateNode,po=!1),Un(e,t,r),Rf(r.stateNode),Et=o,po=i;break;case 5:Zt||sn(r,t);case 6:if(o=Et,i=po,Et=null,Un(e,t,r),Et=o,po=i,Et!==null)if(po)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(r.stateNode)}catch(n){rt(r,t,n)}else try{Et.removeChild(r.stateNode)}catch(n){rt(r,t,n)}break;case 18:Et!==null&&(po?(e=Et,qO(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Zu(e)):qO(Et,r.stateNode));break;case 4:o=Et,i=po,Et=r.stateNode.containerInfo,po=!0,Un(e,t,r),Et=o,po=i;break;case 0:case 11:case 14:case 15:oa(2,r,t),Zt||oa(4,r,t),Un(e,t,r);break;case 1:Zt||(sn(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"&&YM(r,t,o)),Un(e,t,r);break;case 21:Un(e,t,r);break;case 22:Zt=(o=Zt)||r.memoizedState!==null,Un(e,t,r),Zt=o;break;default:Un(e,t,r)}}function rA(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zu(e)}catch(r){rt(t,t.return,r)}}}function oA(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zu(e)}catch(r){rt(t,t.return,r)}}function K7(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new DO),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new DO),t;default:throw Error(U(435,e.tag))}}function bg(e,t){var r=K7(e);t.forEach(function(o){if(!r.has(o)){r.add(o);var i=rW.bind(null,e,o);o.then(i,i)}})}function co(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var i=r[o],n=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 27:if(sa(a.type)){Et=a.stateNode,po=!1;break e}break;case 5:Et=a.stateNode,po=!1;break e;case 3:case 4:Et=a.stateNode.containerInfo,po=!0;break e}a=a.return}if(Et===null)throw Error(U(160));tA(n,s,i),Et=null,po=!1,n=i.alternate,n!==null&&(n.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)iA(t,e),t=t.sibling}var Ni=null;function iA(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:co(t,e),uo(e),o&4&&(oa(3,e,e.return),Yf(3,e),oa(5,e,e.return));break;case 1:co(t,e),uo(e),o&512&&(Zt||r===null||sn(r,r.return)),o&64&&Vn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var i=Ni;if(co(t,e),uo(e),o&512&&(Zt||r===null||sn(r,r.return)),o&4){var n=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":n=i.getElementsByTagName("title")[0],(!n||n[Vf]||n[Mr]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=i.createElement(o),i.head.insertBefore(n,i.querySelector("head > title"))),Nr(n,o,r),n[Mr]=e,mr(n),o=n;break e;case"link":var s=JO("link","href",i).get(o+(r.href||""));if(s){for(var a=0;a<s.length;a++)if(n=s[a],n.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&n.getAttribute("rel")===(r.rel==null?null:r.rel)&&n.getAttribute("title")===(r.title==null?null:r.title)&&n.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){s.splice(a,1);break t}}n=i.createElement(o),Nr(n,o,r),i.head.appendChild(n);break;case"meta":if(s=JO("meta","content",i).get(o+(r.content||""))){for(a=0;a<s.length;a++)if(n=s[a],n.getAttribute("content")===(r.content==null?null:""+r.content)&&n.getAttribute("name")===(r.name==null?null:r.name)&&n.getAttribute("property")===(r.property==null?null:r.property)&&n.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&n.getAttribute("charset")===(r.charSet==null?null:r.charSet)){s.splice(a,1);break t}}n=i.createElement(o),Nr(n,o,r),i.head.appendChild(n);break;default:throw Error(U(468,o))}n[Mr]=e,mr(n),o=n}e.stateNode=o}else eD(i,e.type,e.stateNode);else e.stateNode=QO(i,o,e.memoizedProps);else n!==o?(n===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):n.count--,o===null?eD(i,e.type,e.stateNode):QO(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&RS(e,e.memoizedProps,r.memoizedProps)}break;case 27:co(t,e),uo(e),o&512&&(Zt||r===null||sn(r,r.return)),r!==null&&o&4&&RS(e,e.memoizedProps,r.memoizedProps);break;case 5:if(co(t,e),uo(e),o&512&&(Zt||r===null||sn(r,r.return)),e.flags&32){i=e.stateNode;try{ju(i,"")}catch(h){rt(e,e.return,h)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,RS(e,i,r!==null?r.memoizedProps:i)),o&1024&&(ES=!0);break;case 6:if(co(t,e),uo(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(h){rt(e,e.return,h)}}break;case 3:if(Ig=null,i=Ni,Ni=uv(t.containerInfo),co(t,e),Ni=i,uo(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Zu(t.containerInfo)}catch(h){rt(e,e.return,h)}ES&&(ES=!1,nA(e));break;case 4:o=Ni,Ni=uv(e.stateNode.containerInfo),co(t,e),uo(e),Ni=o;break;case 12:co(t,e),uo(e);break;case 31:co(t,e),uo(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bg(e,o)));break;case 13:co(t,e),uo(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Rv=Bo()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bg(e,o)));break;case 22:i=e.memoizedState!==null;var l=r!==null&&r.memoizedState!==null,c=Vn,u=Zt;if(Vn=c||i,Zt=u||l,co(t,e),Zt=u,Vn=c,uo(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(r===null||l||Vn||Zt||ll(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){l=r=t;try{if(n=l.stateNode,i)s=n.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{a=l.stateNode;var p=l.memoizedProps.style,f=p!=null&&p.hasOwnProperty("display")?p.display:null;a.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(h){rt(l,l.return,h)}}}else if(t.tag===6){if(r===null){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(h){rt(l,l.return,h)}}}else if(t.tag===18){if(r===null){l=t;try{var d=l.stateNode;i?KO(d,!0):KO(l.stateNode,!1)}catch(h){rt(l,l.return,h)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,bg(e,r))));break;case 19:co(t,e),uo(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bg(e,o)));break;case 30:break;case 21:break;default:co(t,e),uo(e)}}function uo(e){var t=e.flags;if(t&2){try{for(var r,o=e.return;o!==null;){if(ZM(o)){r=o;break}o=o.return}if(r==null)throw Error(U(160));switch(r.tag){case 27:var i=r.stateNode,n=PS(e);rv(e,n,i);break;case 5:var s=r.stateNode;r.flags&32&&(ju(s,""),r.flags&=-33);var a=PS(e);rv(e,a,s);break;case 3:case 4:var l=r.stateNode.containerInfo,c=PS(e);mx(e,c,l);break;default:throw Error(U(161))}}catch(u){rt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nA(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;nA(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function $n(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)JM(e,t.alternate,t),t=t.sibling}function ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:oa(4,t,t.return),ll(t);break;case 1:sn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&YM(t,t.return,r),ll(t);break;case 27:Rf(t.stateNode);case 26:case 5:sn(t,t.return),ll(t);break;case 22:t.memoizedState===null&&ll(t);break;case 30:ll(t);break;default:ll(t)}e=e.sibling}}function jn(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,n=t,s=n.flags;switch(n.tag){case 0:case 11:case 15:jn(i,n,r),Yf(4,n);break;case 1:if(jn(i,n,r),o=n,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(c){rt(o,o.return,c)}if(o=n,i=o.updateQueue,i!==null){var a=o.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)rM(l[i],a)}catch(c){rt(o,o.return,c)}}r&&s&64&&GM(n),xf(n,n.return);break;case 27:QM(n);case 26:case 5:jn(i,n,r),r&&o===null&&s&4&&XM(n),xf(n,n.return);break;case 12:jn(i,n,r);break;case 31:jn(i,n,r),r&&s&4&&rA(i,n);break;case 13:jn(i,n,r),r&&s&4&&oA(i,n);break;case 22:n.memoizedState===null&&jn(i,n,r),xf(n,n.return);break;case 30:break;default:jn(i,n,r)}t=t.sibling}}function hT(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Kf(r))}function mT(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kf(e))}function Bi(e,t,r,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sA(e,t,r,o),t=t.sibling}function sA(e,t,r,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Bi(e,t,r,o),i&2048&&Yf(9,t);break;case 1:Bi(e,t,r,o);break;case 3:Bi(e,t,r,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kf(e)));break;case 12:if(i&2048){Bi(e,t,r,o),e=t.stateNode;try{var n=t.memoizedProps,s=n.id,a=n.onPostCommit;typeof a=="function"&&a(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){rt(t,t.return,l)}}else Bi(e,t,r,o);break;case 31:Bi(e,t,r,o);break;case 13:Bi(e,t,r,o);break;case 23:break;case 22:n=t.stateNode,s=t.alternate,t.memoizedState!==null?n._visibility&2?Bi(e,t,r,o):Tf(e,t):n._visibility&2?Bi(e,t,r,o):(n._visibility|=2,_u(e,t,r,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&hT(s,t);break;case 24:Bi(e,t,r,o),i&2048&&mT(t.alternate,t);break;default:Bi(e,t,r,o)}}function _u(e,t,r,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,s=t,a=r,l=o,c=s.flags;switch(s.tag){case 0:case 11:case 15:_u(n,s,a,l,i),Yf(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?_u(n,s,a,l,i):Tf(n,s):(u._visibility|=2,_u(n,s,a,l,i)),i&&c&2048&&hT(s.alternate,s);break;case 24:_u(n,s,a,l,i),i&&c&2048&&mT(s.alternate,s);break;default:_u(n,s,a,l,i)}t=t.sibling}}function Tf(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,o=t,i=o.flags;switch(o.tag){case 22:Tf(r,o),i&2048&&hT(o.alternate,o);break;case 24:Tf(r,o),i&2048&&mT(o.alternate,o);break;default:Tf(r,o)}t=t.sibling}}var ff=8192;function bu(e,t,r){if(e.subtreeFlags&ff)for(e=e.child;e!==null;)aA(e,t,r),e=e.sibling}function aA(e,t,r){switch(e.tag){case 26:bu(e,t,r),e.flags&ff&&e.memoizedState!==null&&DW(r,Ni,e.memoizedState,e.memoizedProps);break;case 5:bu(e,t,r);break;case 3:case 4:var o=Ni;Ni=uv(e.stateNode.containerInfo),bu(e,t,r),Ni=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ff,ff=16777216,bu(e,t,r),ff=o):bu(e,t,r));break;default:bu(e,t,r)}}function lA(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 sf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];hr=o,uA(o,e)}lA(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cA(e),e=e.sibling}function cA(e){switch(e.tag){case 0:case 11:case 15:sf(e),e.flags&2048&&oa(9,e,e.return);break;case 3:sf(e);break;case 12:sf(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ng(e)):sf(e);break;default:sf(e)}}function Ng(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var o=t[r];hr=o,uA(o,e)}lA(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:oa(8,t,t.return),Ng(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Ng(t));break;default:Ng(t)}e=e.sibling}}function uA(e,t){for(;hr!==null;){var r=hr;switch(r.tag){case 0:case 11:case 15:oa(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Kf(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,hr=o;else e:for(r=e;hr!==null;){o=hr;var i=o.sibling,n=o.return;if(eA(o),o===r){hr=null;break e}if(i!==null){i.return=n,hr=i;break e}hr=n}}}var G7={getCacheForType:function(e){var t=Br(Qt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Br(Qt).controller.signal}},Y7=typeof WeakMap=="function"?WeakMap:Map,Ve=0,ut=null,Oe=null,De=0,tt=0,Oo=null,js=!1,rp=!1,yT=!1,rs=0,Ft=0,ia=0,fl=0,gT=0,Ao=0,Ku=0,Cf=null,fo=null,yx=!1,Rv=0,pA=0,ov=1/0,iv=null,Xs=null,or=0,Zs=null,Gu=null,Zn=0,gx=0,vx=null,dA=null,wf=0,bx=null;function Io(){return(Ve&2)!==0&&De!==0?De&-De:ye.T!==null?bT():SD()}function fA(){if(Ao===0)if((De&536870912)===0||Ne){var e=cg;cg<<=1,(cg&3932160)===0&&(cg=262144),Ao=e}else Ao=536870912;return e=Fo.current,e!==null&&(e.flags|=32),Ao}function ho(e,t,r){(e===ut&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Yu(e,0),Ws(e,De,Ao,!1)),Wf(e,r),((Ve&2)===0||e!==ut)&&(e===ut&&((Ve&2)===0&&(fl|=r),Ft===4&&Ws(e,De,Ao,!1)),cn(e))}function hA(e,t,r){if((Ve&6)!==0)throw Error(U(327));var o=!r&&(t&127)===0&&(t&e.expiredLanes)===0||jf(e,t),i=o?Q7(e,t):kS(e,t,!0),n=o;do{if(i===0){rp&&!o&&Ws(e,t,0,!1);break}else{if(r=e.current.alternate,n&&!X7(r)){i=kS(e,t,!1),n=!1;continue}if(i===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 a=e;i=Cf;var l=a.current.memoizedState.isDehydrated;if(l&&(Yu(a,s).flags|=256),s=kS(a,s,!1),s!==2){if(yT&&!l){a.errorRecoveryDisabledLanes|=n,fl|=n,i=4;break e}n=fo,fo=i,n!==null&&(fo===null?fo=n:fo.push.apply(fo,n))}i=s}if(n=!1,i!==2)continue}}if(i===1){Yu(e,0),Ws(e,t,0,!0);break}e:{switch(o=e,n=i,n){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:Ws(o,t,Ao,!js);break e;case 2:fo=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=Rv+300-Bo(),10<i)){if(Ws(o,t,Ao,!js),mv(o,0,!0)!==0)break e;Zn=t,o.timeoutHandle=BA(MO.bind(null,o,r,fo,iv,yx,t,Ao,fl,Ku,js,n,"Throttled",-0,0),i);break e}MO(o,r,fo,iv,yx,t,Ao,fl,Ku,js,n,null,-0,0)}}break}while(!0);cn(e)}function MO(e,t,r,o,i,n,s,a,l,c,u,p,f,d){if(e.timeoutHandle=-1,p=t.subtreeFlags,p&8192||(p&16785408)===16785408){p={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},aA(t,n,p);var h=(n&62914560)===n?Rv-Bo():(n&4194048)===n?pA-Bo():0;if(h=MW(p,h),h!==null){Zn=n,e.cancelPendingCommit=h(BO.bind(null,e,t,n,r,o,i,s,a,l,u,p,null,f,d)),Ws(e,n,s,!c);return}}BO(e,t,n,r,o,i,s,a,l)}function X7(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var i=r[o],n=i.getSnapshot;i=i.value;try{if(!zo(n(),i))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Ws(e,t,r,o){t&=~gT,t&=~fl,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var n=31-Lo(i),s=1<<n;o[n]=-1,i&=~s}r!==0&&vD(e,r,t)}function Pv(){return(Ve&6)===0?(Xf(0,!1),!1):!0}function vT(){if(Oe!==null){if(tt===0)var e=Oe.return;else e=Oe,Gn=Tl=null,oT(e),zu=null,Af=0,e=Oe;for(;e!==null;)KM(e.alternate,e),e=e.return;Oe=null}}function Yu(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,hW(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Zn=0,vT(),ut=e,Oe=r=Yn(e.current,null),De=t,tt=0,Oo=null,js=!1,rp=jf(e,t),yT=!1,Ku=Ao=gT=fl=ia=Ft=0,fo=Cf=null,yx=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-Lo(o),n=1<<i;t|=e[i],o&=~n}return rs=t,bv(),r}function mA(e,t){Se=null,ye.H=Nf,t===tp||t===Sv?(t=uO(),tt=3):t===Xx?(t=uO(),tt=4):tt=t===dT?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Oo=t,Oe===null&&(Ft=1,ev(e,ci(t,e.current)))}function yA(){var e=Fo.current;return e===null?!0:(De&4194048)===De?pi===null:(De&62914560)===De||(De&536870912)!==0?e===pi:!1}function gA(){var e=ye.H;return ye.H=Nf,e===null?Nf:e}function vA(){var e=ye.A;return ye.A=G7,e}function nv(){Ft=4,js||(De&4194048)!==De&&Fo.current!==null||(rp=!0),(ia&134217727)===0&&(fl&134217727)===0||ut===null||Ws(ut,De,Ao,!1)}function kS(e,t,r){var o=Ve;Ve|=2;var i=gA(),n=vA();(ut!==e||De!==t)&&(iv=null,Yu(e,t)),t=!1;var s=Ft;e:do try{if(tt!==0&&Oe!==null){var a=Oe,l=Oo;switch(tt){case 8:vT(),s=6;break e;case 3:case 2:case 9:case 6:Fo.current===null&&(t=!0);var c=tt;if(tt=0,Oo=null,Au(e,a,l,c),r&&rp){s=0;break e}break;default:c=tt,tt=0,Oo=null,Au(e,a,l,c)}}Z7(),s=Ft;break}catch(u){mA(e,u)}while(!0);return t&&e.shellSuspendCounter++,Gn=Tl=null,Ve=o,ye.H=i,ye.A=n,Oe===null&&(ut=null,De=0,bv()),s}function Z7(){for(;Oe!==null;)bA(Oe)}function Q7(e,t){var r=Ve;Ve|=2;var o=gA(),i=vA();ut!==e||De!==t?(iv=null,ov=Bo()+500,Yu(e,t)):rp=jf(e,t);e:do try{if(tt!==0&&Oe!==null){t=Oe;var n=Oo;t:switch(tt){case 1:tt=0,Oo=null,Au(e,t,n,1);break;case 2:case 9:if(cO(n)){tt=0,Oo=null,AO(t);break}t=function(){tt!==2&&tt!==9||ut!==e||(tt=7),cn(e)},n.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:cO(n)?(tt=0,Oo=null,AO(t)):(tt=0,Oo=null,Au(e,t,n,7));break;case 5:var s=null;switch(Oe.tag){case 26:s=Oe.memoizedState;case 5:case 27:var a=Oe;if(s?FA(s):a.stateNode.complete){tt=0,Oo=null;var l=a.sibling;if(l!==null)Oe=l;else{var c=a.return;c!==null?(Oe=c,Ev(c)):Oe=null}break t}}tt=0,Oo=null,Au(e,t,n,5);break;case 6:tt=0,Oo=null,Au(e,t,n,6);break;case 8:vT(),Ft=6;break e;default:throw Error(U(462))}}J7();break}catch(u){mA(e,u)}while(!0);return Gn=Tl=null,ye.H=o,ye.A=i,Ve=r,Oe!==null?0:(ut=null,De=0,bv(),Ft)}function J7(){for(;Oe!==null&&!x9();)bA(Oe)}function bA(e){var t=qM(e.alternate,e,rs);e.memoizedProps=e.pendingProps,t===null?Ev(e):Oe=t}function AO(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=RO(r,t,t.pendingProps,t.type,void 0,De);break;case 11:t=RO(r,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:oT(t);default:KM(r,t),t=Oe=KD(t,rs),t=qM(r,t,rs)}e.memoizedProps=e.pendingProps,t===null?Ev(e):Oe=t}function Au(e,t,r,o){Gn=Tl=null,oT(t),zu=null,Af=0;var i=t.return;try{if(U7(e,i,t,r,De)){Ft=1,ev(e,ci(r,e.current)),Oe=null;return}}catch(n){if(i!==null)throw Oe=i,n;Ft=1,ev(e,ci(r,e.current)),Oe=null;return}t.flags&32768?(Ne||o===1?e=!0:rp||(De&536870912)!==0?e=!1:(js=e=!0,(o===2||o===9||o===3||o===6)&&(o=Fo.current,o!==null&&o.tag===13&&(o.flags|=16384))),_A(t,e)):Ev(t)}function Ev(e){var t=e;do{if((t.flags&32768)!==0){_A(t,js);return}e=t.return;var r=W7(t.alternate,t,rs);if(r!==null){Oe=r;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Ft===0&&(Ft=5)}function _A(e,t){do{var r=V7(e.alternate,e);if(r!==null){r.flags&=32767,Oe=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=r}while(e!==null);Ft=6,Oe=null}function BO(e,t,r,o,i,n,s,a,l){e.cancelPendingCommit=null;do kv();while(or!==0);if((Ve&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(n=t.lanes|t.childLanes,n|=jx,M9(e,r,n,s,a,l),e===ut&&(Oe=ut=null,De=0),Gu=t,Zs=e,Zn=r,gx=n,vx=i,dA=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,oW(jg,function(){return wA(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ye.T,ye.T=null,i=qe.p,qe.p=2,s=Ve,Ve|=4;try{q7(e,t,r)}finally{Ve=s,qe.p=i,ye.T=o}}or=1,SA(),xA(),TA()}}function SA(){if(or===1){or=0;var e=Zs,t=Gu,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=ye.T,ye.T=null;var o=qe.p;qe.p=2;var i=Ve;Ve|=4;try{iA(t,e);var n=Tx,s=FD(e.containerInfo),a=n.focusedElem,l=n.selectionRange;if(s!==a&&a&&a.ownerDocument&&zD(a.ownerDocument.documentElement,a)){if(l!==null&&$x(a)){var c=l.start,u=l.end;if(u===void 0&&(u=c),"selectionStart"in a)a.selectionStart=c,a.selectionEnd=Math.min(u,a.value.length);else{var p=a.ownerDocument||document,f=p&&p.defaultView||window;if(f.getSelection){var d=f.getSelection(),h=a.textContent.length,y=Math.min(l.start,h),b=l.end===void 0?y:Math.min(l.end,h);!d.extend&&y>b&&(s=b,b=y,y=s);var m=rO(a,y),g=rO(a,b);if(m&&g&&(d.rangeCount!==1||d.anchorNode!==m.node||d.anchorOffset!==m.offset||d.focusNode!==g.node||d.focusOffset!==g.offset)){var v=p.createRange();v.setStart(m.node,m.offset),d.removeAllRanges(),y>b?(d.addRange(v),d.extend(g.node,g.offset)):(v.setEnd(g.node,g.offset),d.addRange(v))}}}}for(p=[],d=a;d=d.parentNode;)d.nodeType===1&&p.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<p.length;a++){var _=p[a];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}fv=!!xx,Tx=xx=null}finally{Ve=i,qe.p=o,ye.T=r}}e.current=t,or=2}}function xA(){if(or===2){or=0;var e=Zs,t=Gu,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=ye.T,ye.T=null;var o=qe.p;qe.p=2;var i=Ve;Ve|=4;try{JM(e,t.alternate,t)}finally{Ve=i,qe.p=o,ye.T=r}}or=3}}function TA(){if(or===4||or===3){or=0,T9();var e=Zs,t=Gu,r=Zn,o=dA;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?or=5:(or=0,Gu=Zs=null,CA(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Xs=null),Nx(r),t=t.stateNode,No&&typeof No.onCommitFiberRoot=="function")try{No.onCommitFiberRoot($f,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ye.T,i=qe.p,qe.p=2,ye.T=null;try{for(var n=e.onRecoverableError,s=0;s<o.length;s++){var a=o[s];n(a.value,{componentStack:a.stack})}}finally{ye.T=t,qe.p=i}}(Zn&3)!==0&&kv(),cn(e),i=e.pendingLanes,(r&261930)!==0&&(i&42)!==0?e===bx?wf++:(wf=0,bx=e):wf=0,Xf(0,!1)}}function CA(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Kf(t)))}function kv(){return SA(),xA(),TA(),wA()}function wA(){if(or!==5)return!1;var e=Zs,t=gx;gx=0;var r=Nx(Zn),o=ye.T,i=qe.p;try{qe.p=32>r?32:r,ye.T=null,r=vx,vx=null;var n=Zs,s=Zn;if(or=0,Gu=Zs=null,Zn=0,(Ve&6)!==0)throw Error(U(331));var a=Ve;if(Ve|=4,cA(n.current),sA(n,n.current,s,r),Ve=a,Xf(0,!1),No&&typeof No.onPostCommitFiberRoot=="function")try{No.onPostCommitFiberRoot($f,n)}catch{}return!0}finally{qe.p=i,ye.T=o,CA(e,t)}}function NO(e,t,r){t=ci(r,t),t=dx(e.stateNode,t,2),e=Ys(e,t,2),e!==null&&(Wf(e,2),cn(e))}function rt(e,t,r){if(e.tag===3)NO(e,e,r);else for(;t!==null;){if(t.tag===3){NO(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Xs===null||!Xs.has(o))){e=ci(r,e),r=HM(2),o=Ys(t,r,2),o!==null&&(UM(r,o,t,e),Wf(o,2),cn(o));break}}t=t.return}}function OS(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new Y7;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(r)||(yT=!0,i.add(r),e=eW.bind(null,e,t,r),t.then(e,e))}function eW(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ut===e&&(De&r)===r&&(Ft===4||Ft===3&&(De&62914560)===De&&300>Bo()-Rv?(Ve&2)===0&&Yu(e,0):gT|=r,Ku===De&&(Ku=0)),cn(e)}function RA(e,t){t===0&&(t=gD()),e=xl(e,t),e!==null&&(Wf(e,t),cn(e))}function tW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),RA(e,r)}function rW(e,t){var r=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(U(314))}o!==null&&o.delete(t),RA(e,r)}function oW(e,t){return Ax(e,t)}var sv=null,Su=null,_x=!1,av=!1,DS=!1,Vs=0;function cn(e){e!==Su&&e.next===null&&(Su===null?sv=Su=e:Su=Su.next=e),av=!0,_x||(_x=!0,nW())}function Xf(e,t){if(!DS&&av){DS=!0;do for(var r=!1,o=sv;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var n=0;else{var s=o.suspendedLanes,a=o.pingedLanes;n=(1<<31-Lo(42|e)+1)-1,n&=i&~(s&~a),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(r=!0,LO(o,n))}else n=De,n=mv(o,o===ut?n:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(n&3)===0||jf(o,n)||(r=!0,LO(o,n));o=o.next}while(r);DS=!1}}function iW(){PA()}function PA(){av=_x=!1;var e=0;Vs!==0&&fW()&&(e=Vs);for(var t=Bo(),r=null,o=sv;o!==null;){var i=o.next,n=EA(o,t);n===0?(o.next=null,r===null?sv=i:r.next=i,i===null&&(Su=r)):(r=o,(e!==0||(n&3)!==0)&&(av=!0)),o=i}or!==0&&or!==5||Xf(e,!1),Vs!==0&&(Vs=0)}function EA(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var s=31-Lo(n),a=1<<s,l=i[s];l===-1?((a&r)===0||(a&o)!==0)&&(i[s]=D9(a,t)):l<=t&&(e.expiredLanes|=a),n&=~a}if(t=ut,r=De,r=mv(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&sS(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||jf(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(o!==null&&sS(o),Nx(r)){case 2:case 8:r=mD;break;case 32:r=jg;break;case 268435456:r=yD;break;default:r=jg}return o=kA.bind(null,e),r=Ax(r,o),e.callbackPriority=t,e.callbackNode=r,t}return o!==null&&o!==null&&sS(o),e.callbackPriority=2,e.callbackNode=null,2}function kA(e,t){if(or!==0&&or!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(kv()&&e.callbackNode!==r)return null;var o=De;return o=mv(e,e===ut?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(hA(e,o,t),EA(e,Bo()),e.callbackNode!=null&&e.callbackNode===r?kA.bind(null,e):null)}function LO(e,t){if(kv())return null;hA(e,t,!0)}function nW(){mW(function(){(Ve&6)!==0?Ax(hD,iW):PA()})}function bT(){if(Vs===0){var e=Wu;e===0&&(e=lg,lg<<=1,(lg&261888)===0&&(lg=256)),Vs=e}return Vs}function IO(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rg(""+e)}function zO(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function sW(e,t,r,o,i){if(t==="submit"&&r&&r.stateNode===i){var n=IO((i[mo]||null).action),s=o.submitter;s&&(t=(t=s[mo]||null)?IO(t.formAction):s.getAttribute("formAction"),t!==null&&(n=t,s=null));var a=new yv("action","action",null,o,i);e.push({event:a,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Vs!==0){var l=s?zO(i,s):new FormData(i);ux(r,{pending:!0,data:l,method:i.method,action:n},null,l)}}else typeof n=="function"&&(a.preventDefault(),l=s?zO(i,s):new FormData(i),ux(r,{pending:!0,data:l,method:i.method,action:n},n,l))},currentTarget:i}]})}}for(_g=0;_g<QS.length;_g++)Sg=QS[_g],FO=Sg.toLowerCase(),HO=Sg[0].toUpperCase()+Sg.slice(1),Li(FO,"on"+HO);var Sg,FO,HO,_g;Li(UD,"onAnimationEnd");Li($D,"onAnimationIteration");Li(jD,"onAnimationStart");Li("dblclick","onDoubleClick");Li("focusin","onFocus");Li("focusout","onBlur");Li(C7,"onTransitionRun");Li(w7,"onTransitionStart");Li(R7,"onTransitionCancel");Li(WD,"onTransitionEnd");$u("onMouseEnter",["mouseout","mouseover"]);$u("onMouseLeave",["mouseout","mouseover"]);$u("onPointerEnter",["pointerout","pointerover"]);$u("onPointerLeave",["pointerout","pointerover"]);bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bl("onBeforeInput",["compositionend","keypress","textInput","paste"]);bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lf="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(" "),aW=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lf));function OA(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],i=o.event;o=o.listeners;e:{var n=void 0;if(t)for(var s=o.length-1;0<=s;s--){var a=o[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==n&&i.isPropagationStopped())break e;n=a,i.currentTarget=c;try{n(i)}catch(u){Vg(u)}i.currentTarget=null,n=l}else for(s=0;s<o.length;s++){if(a=o[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==n&&i.isPropagationStopped())break e;n=a,i.currentTarget=c;try{n(i)}catch(u){Vg(u)}i.currentTarget=null,n=l}}}}function ke(e,t){var r=t[WS];r===void 0&&(r=t[WS]=new Set);var o=e+"__bubble";r.has(o)||(DA(t,e,2,!1),r.add(o))}function MS(e,t,r){var o=0;t&&(o|=4),DA(r,e,o,t)}var xg="_reactListening"+Math.random().toString(36).slice(2);function _T(e){if(!e[xg]){e[xg]=!0,xD.forEach(function(r){r!=="selectionchange"&&(aW.has(r)||MS(r,!1,e),MS(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xg]||(t[xg]=!0,MS("selectionchange",!1,t))}}function DA(e,t,r,o){switch(WA(t)){case 2:var i=NW;break;case 8:i=LW;break;default:i=CT}r=i.bind(null,t,r,e),i=void 0,!YS||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function AS(e,t,r,o,i){var n=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var s=o.tag;if(s===3||s===4){var a=o.stateNode.containerInfo;if(a===i)break;if(s===4)for(s=o.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;a!==null;){if(s=Cu(a),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){o=n=s;continue e}a=a.parentNode}}o=o.return}OD(function(){var c=n,u=zx(r),p=[];e:{var f=VD.get(e);if(f!==void 0){var d=yv,h=e;switch(e){case"keypress":if(Eg(r)===0)break e;case"keydown":case"keyup":d=r7;break;case"focusin":h="focus",d=pS;break;case"focusout":h="blur",d=pS;break;case"beforeblur":case"afterblur":d=pS;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=K2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=W9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=n7;break;case UD:case $D:case jD:d=K9;break;case WD:d=a7;break;case"scroll":case"scrollend":d=$9;break;case"wheel":d=c7;break;case"copy":case"cut":case"paste":d=Y9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=Y2;break;case"toggle":case"beforetoggle":d=p7}var y=(t&4)!==0,b=!y&&(e==="scroll"||e==="scrollend"),m=y?f!==null?f+"Capture":null:f;y=[];for(var g=c,v;g!==null;){var _=g;if(v=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||v===null||m===null||(_=Ef(g,m),_!=null&&y.push(If(g,_,v))),b)break;g=g.return}0<y.length&&(f=new d(f,h,null,r,u),p.push({event:f,listeners:y}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&r!==GS&&(h=r.relatedTarget||r.fromElement)&&(Cu(h)||h[Qu]))break e;if((d||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,d?(h=r.relatedTarget||r.toElement,d=c,h=h?Cu(h):null,h!==null&&(b=Uf(h),y=h.tag,h!==b||y!==5&&y!==27&&y!==6)&&(h=null)):(d=null,h=c),d!==h)){if(y=K2,_="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=Y2,_="onPointerLeave",m="onPointerEnter",g="pointer"),b=d==null?f:pf(d),v=h==null?f:pf(h),f=new y(_,g+"leave",d,r,u),f.target=b,f.relatedTarget=v,_=null,Cu(u)===c&&(y=new y(m,g+"enter",h,r,u),y.target=v,y.relatedTarget=b,_=y),b=_,d&&h)t:{for(y=lW,m=d,g=h,v=0,_=m;_;_=y(_))v++;_=0;for(var C=g;C;C=y(C))_++;for(;0<v-_;)m=y(m),v--;for(;0<_-v;)g=y(g),_--;for(;v--;){if(m===g||g!==null&&m===g.alternate){y=m;break t}m=y(m),g=y(g)}y=null}else y=null;d!==null&&UO(p,f,d,y,!1),h!==null&&b!==null&&UO(p,b,h,y,!0)}}e:{if(f=c?pf(c):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var w=J2;else if(Q2(f))if(LD)w=S7;else{w=b7;var E=v7}else d=f.nodeName,!d||d.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&Ix(c.elementType)&&(w=J2):w=_7;if(w&&(w=w(e,c))){ND(p,w,r,u);break e}E&&E(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&KS(f,"number",f.value)}switch(E=c?pf(c):window,e){case"focusin":(Q2(E)||E.contentEditable==="true")&&(Pu=E,XS=c,yf=null);break;case"focusout":yf=XS=Pu=null;break;case"mousedown":ZS=!0;break;case"contextmenu":case"mouseup":case"dragend":ZS=!1,oO(p,r,u);break;case"selectionchange":if(T7)break;case"keydown":case"keyup":oO(p,r,u)}var O;if(Ux)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Ru?AD(e,r)&&(A="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(A="onCompositionStart");A&&(MD&&r.locale!=="ko"&&(Ru||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ru&&(O=DD()):($s=u,Fx="value"in $s?$s.value:$s.textContent,Ru=!0)),E=lv(c,A),0<E.length&&(A=new G2(A,e,null,r,u),p.push({event:A,listeners:E}),O?A.data=O:(O=BD(r),O!==null&&(A.data=O)))),(O=f7?h7(e,r):m7(e,r))&&(A=lv(c,"onBeforeInput"),0<A.length&&(E=new G2("onBeforeInput","beforeinput",null,r,u),p.push({event:E,listeners:A}),E.data=O)),sW(p,e,c,r,u)}OA(p,t)})}function If(e,t,r){return{instance:e,listener:t,currentTarget:r}}function lv(e,t){for(var r=t+"Capture",o=[];e!==null;){var i=e,n=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||n===null||(i=Ef(e,r),i!=null&&o.unshift(If(e,i,n)),i=Ef(e,t),i!=null&&o.push(If(e,i,n))),e.tag===3)return o;e=e.return}return[]}function lW(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function UO(e,t,r,o,i){for(var n=t._reactName,s=[];r!==null&&r!==o;){var a=r,l=a.alternate,c=a.stateNode;if(a=a.tag,l!==null&&l===o)break;a!==5&&a!==26&&a!==27||c===null||(l=c,i?(c=Ef(r,n),c!=null&&s.unshift(If(r,c,l))):i||(c=Ef(r,n),c!=null&&s.push(If(r,c,l)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var cW=/\r\n?/g,uW=/\u0000|\uFFFD/g;function $O(e){return(typeof e=="string"?e:""+e).replace(cW,`
9
+ `).replace(uW,"")}function MA(e,t){return t=$O(t),$O(e)===t}function ot(e,t,r,o,i,n){switch(r){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||ju(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&ju(e,""+o);break;case"className":pg(e,"class",o);break;case"tabIndex":pg(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":pg(e,r,o);break;case"style":kD(e,o,n);break;case"data":if(t!=="object"){pg(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Rg(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"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"&&(r==="formAction"?(t!=="input"&&ot(e,t,"name",i.name,i,null),ot(e,t,"formEncType",i.formEncType,i,null),ot(e,t,"formMethod",i.formMethod,i,null),ot(e,t,"formTarget",i.formTarget,i,null)):(ot(e,t,"encType",i.encType,i,null),ot(e,t,"method",i.method,i,null),ot(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=Rg(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=Kn);break;case"onScroll":o!=null&&ke("scroll",e);break;case"onScrollEnd":o!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(r=o.__html,r!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=Rg(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":ke("beforetoggle",e),ke("toggle",e),wg(e,"popover",o);break;case"xlinkActuate":Fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Fn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Fn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Fn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Fn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":wg(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=H9.get(r)||r,wg(e,r,o))}}function Sx(e,t,r,o,i,n){switch(r){case"style":kD(e,o,n);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(r=o.__html,r!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=r}}break;case"children":typeof o=="string"?ju(e,o):(typeof o=="number"||typeof o=="bigint")&&ju(e,""+o);break;case"onScroll":o!=null&&ke("scroll",e);break;case"onScrollEnd":o!=null&&ke("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!TD.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(i=r.endsWith("Capture"),t=r.slice(2,i?r.length-7:void 0),n=e[mo]||null,n=n!=null?n[r]:null,typeof n=="function"&&e.removeEventListener(t,n,i),typeof o=="function")){typeof n!="function"&&n!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,o,i);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):wg(e,r,o)}}}function Nr(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var o=!1,i=!1,n;for(n in r)if(r.hasOwnProperty(n)){var s=r[n];if(s!=null)switch(n){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:ot(e,t,n,s,r,null)}}i&&ot(e,t,"srcSet",r.srcSet,r,null),o&&ot(e,t,"src",r.src,r,null);return;case"input":ke("invalid",e);var a=n=s=i=null,l=null,c=null;for(o in r)if(r.hasOwnProperty(o)){var u=r[o];if(u!=null)switch(o){case"name":i=u;break;case"type":s=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":n=u;break;case"defaultValue":a=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(U(137,t));break;default:ot(e,t,o,u,r,null)}}RD(e,n,a,l,c,s,i,!1);return;case"select":ke("invalid",e),o=s=n=null;for(i in r)if(r.hasOwnProperty(i)&&(a=r[i],a!=null))switch(i){case"value":n=a;break;case"defaultValue":s=a;break;case"multiple":o=a;default:ot(e,t,i,a,r,null)}t=n,r=s,e.multiple=!!o,t!=null?Nu(e,!!o,t,!1):r!=null&&Nu(e,!!o,r,!0);return;case"textarea":ke("invalid",e),n=i=o=null;for(s in r)if(r.hasOwnProperty(s)&&(a=r[s],a!=null))switch(s){case"value":o=a;break;case"defaultValue":i=a;break;case"children":n=a;break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(U(91));break;default:ot(e,t,s,a,r,null)}ED(e,o,i,n);return;case"option":for(l in r)r.hasOwnProperty(l)&&(o=r[l],o!=null)&&(l==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":ot(e,t,l,o,r,null));return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(o=0;o<Lf.length;o++)ke(Lf[o],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("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(c in r)if(r.hasOwnProperty(c)&&(o=r[c],o!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:ot(e,t,c,o,r,null)}return;default:if(Ix(t)){for(u in r)r.hasOwnProperty(u)&&(o=r[u],o!==void 0&&Sx(e,t,u,o,r,void 0));return}}for(a in r)r.hasOwnProperty(a)&&(o=r[a],o!=null&&ot(e,t,a,o,r,null))}function pW(e,t,r,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,n=null,s=null,a=null,l=null,c=null,u=null;for(d in r){var p=r[d];if(r.hasOwnProperty(d)&&p!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":l=p;default:o.hasOwnProperty(d)||ot(e,t,d,null,o,p)}}for(var f in o){var d=o[f];if(p=r[f],o.hasOwnProperty(f)&&(d!=null||p!=null))switch(f){case"type":n=d;break;case"name":i=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":s=d;break;case"defaultValue":a=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(U(137,t));break;default:d!==p&&ot(e,t,f,d,o,p)}}qS(e,s,a,l,c,u,n,i);return;case"select":d=s=a=f=null;for(n in r)if(l=r[n],r.hasOwnProperty(n)&&l!=null)switch(n){case"value":break;case"multiple":d=l;default:o.hasOwnProperty(n)||ot(e,t,n,null,o,l)}for(i in o)if(n=o[i],l=r[i],o.hasOwnProperty(i)&&(n!=null||l!=null))switch(i){case"value":f=n;break;case"defaultValue":a=n;break;case"multiple":s=n;default:n!==l&&ot(e,t,i,n,o,l)}t=a,r=s,o=d,f!=null?Nu(e,!!r,f,!1):!!o!=!!r&&(t!=null?Nu(e,!!r,t,!0):Nu(e,!!r,r?[]:"",!1));return;case"textarea":d=f=null;for(a in r)if(i=r[a],r.hasOwnProperty(a)&&i!=null&&!o.hasOwnProperty(a))switch(a){case"value":break;case"children":break;default:ot(e,t,a,null,o,i)}for(s in o)if(i=o[s],n=r[s],o.hasOwnProperty(s)&&(i!=null||n!=null))switch(s){case"value":f=i;break;case"defaultValue":d=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(U(91));break;default:i!==n&&ot(e,t,s,i,o,n)}PD(e,f,d);return;case"option":for(var h in r)f=r[h],r.hasOwnProperty(h)&&f!=null&&!o.hasOwnProperty(h)&&(h==="selected"?e.selected=!1:ot(e,t,h,null,o,f));for(l in o)f=o[l],d=r[l],o.hasOwnProperty(l)&&f!==d&&(f!=null||d!=null)&&(l==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":ot(e,t,l,f,o,d));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 y in r)f=r[y],r.hasOwnProperty(y)&&f!=null&&!o.hasOwnProperty(y)&&ot(e,t,y,null,o,f);for(c in o)if(f=o[c],d=r[c],o.hasOwnProperty(c)&&f!==d&&(f!=null||d!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:ot(e,t,c,f,o,d)}return;default:if(Ix(t)){for(var b in r)f=r[b],r.hasOwnProperty(b)&&f!==void 0&&!o.hasOwnProperty(b)&&Sx(e,t,b,void 0,o,f);for(u in o)f=o[u],d=r[u],!o.hasOwnProperty(u)||f===d||f===void 0&&d===void 0||Sx(e,t,u,f,o,d);return}}for(var m in r)f=r[m],r.hasOwnProperty(m)&&f!=null&&!o.hasOwnProperty(m)&&ot(e,t,m,null,o,f);for(p in o)f=o[p],d=r[p],!o.hasOwnProperty(p)||f===d||f==null&&d==null||ot(e,t,p,f,o,d)}function jO(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dW(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),o=0;o<r.length;o++){var i=r[o],n=i.transferSize,s=i.initiatorType,a=i.duration;if(n&&a&&jO(s)){for(s=0,a=i.responseEnd,o+=1;o<r.length;o++){var l=r[o],c=l.startTime;if(c>a)break;var u=l.transferSize,p=l.initiatorType;u&&jO(p)&&(l=l.responseEnd,s+=u*(l<a?1:(a-c)/(l-c)))}if(--o,t+=8*(n+s)/(i.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 xx=null,Tx=null;function cv(e){return e.nodeType===9?e:e.ownerDocument}function WO(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 AA(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 Cx(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 BS=null;function fW(){var e=window.event;return e&&e.type==="popstate"?e===BS?!1:(BS=e,!0):(BS=null,!1)}var BA=typeof setTimeout=="function"?setTimeout:void 0,hW=typeof clearTimeout=="function"?clearTimeout:void 0,VO=typeof Promise=="function"?Promise:void 0,mW=typeof queueMicrotask=="function"?queueMicrotask:typeof VO<"u"?function(e){return VO.resolve(null).then(e).catch(yW)}:BA;function yW(e){setTimeout(function(){throw e})}function sa(e){return e==="head"}function qO(e,t){var r=t,o=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"||r==="/&"){if(o===0){e.removeChild(i),Zu(t);return}o--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")o++;else if(r==="html")Rf(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Rf(r);for(var n=r.firstChild;n;){var s=n.nextSibling,a=n.nodeName;n[Vf]||a==="SCRIPT"||a==="STYLE"||a==="LINK"&&n.rel.toLowerCase()==="stylesheet"||r.removeChild(n),n=s}}else r==="body"&&Rf(e.ownerDocument.body);r=i}while(r);Zu(t)}function KO(e,t){var r=e;e=0;do{var o=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=o}while(r)}function wx(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":wx(r),Lx(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function gW(e,t,r,o){for(;e.nodeType===1;){var i=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Vf])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!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=di(e.nextSibling),e===null)break}return null}function vW(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=di(e.nextSibling),e===null))return null;return e}function NA(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=di(e.nextSibling),e===null))return null;return e}function Rx(e){return e.data==="$?"||e.data==="$~"}function Px(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bW(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var o=function(){t(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function di(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 Ex=null;function GO(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return di(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function YO(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function LA(e,t,r){switch(t=cv(r),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Rf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lx(e)}var fi=new Map,XO=new Set;function uv(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var os=qe.d;qe.d={f:_W,r:SW,D:xW,C:TW,L:CW,m:wW,X:PW,S:RW,M:EW};function _W(){var e=os.f(),t=Pv();return e||t}function SW(e){var t=Ju(e);t!==null&&t.tag===5&&t.type==="form"?kM(t):os.r(e)}var op=typeof document>"u"?null:document;function IA(e,t,r){var o=op;if(o&&typeof t=="string"&&t){var i=li(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof r=="string"&&(i+='[crossorigin="'+r+'"]'),XO.has(i)||(XO.add(i),e={rel:e,crossOrigin:r,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),Nr(t,"link",e),mr(t),o.head.appendChild(t)))}}function xW(e){os.D(e),IA("dns-prefetch",e,null)}function TW(e,t){os.C(e,t),IA("preconnect",e,t)}function CW(e,t,r){os.L(e,t,r);var o=op;if(o&&e&&t){var i='link[rel="preload"][as="'+li(t)+'"]';t==="image"&&r&&r.imageSrcSet?(i+='[imagesrcset="'+li(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(i+='[imagesizes="'+li(r.imageSizes)+'"]')):i+='[href="'+li(e)+'"]';var n=i;switch(t){case"style":n=Xu(e);break;case"script":n=ip(e)}fi.has(n)||(e=Tt({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),fi.set(n,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(Zf(n))||t==="script"&&o.querySelector(Qf(n))||(t=o.createElement("link"),Nr(t,"link",e),mr(t),o.head.appendChild(t)))}}function wW(e,t){os.m(e,t);var r=op;if(r&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+li(o)+'"][href="'+li(e)+'"]',n=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=ip(e)}if(!fi.has(n)&&(e=Tt({rel:"modulepreload",href:e},t),fi.set(n,e),r.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Qf(n)))return}o=r.createElement("link"),Nr(o,"link",e),mr(o),r.head.appendChild(o)}}}function RW(e,t,r){os.S(e,t,r);var o=op;if(o&&e){var i=Bu(o).hoistableStyles,n=Xu(e);t=t||"default";var s=i.get(n);if(!s){var a={loading:0,preload:null};if(s=o.querySelector(Zf(n)))a.loading=5;else{e=Tt({rel:"stylesheet",href:e,"data-precedence":t},r),(r=fi.get(n))&&ST(e,r);var l=s=o.createElement("link");mr(l),Nr(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Lg(s,t,o)}s={type:"stylesheet",instance:s,count:1,state:a},i.set(n,s)}}}function PW(e,t){os.X(e,t);var r=op;if(r&&e){var o=Bu(r).hoistableScripts,i=ip(e),n=o.get(i);n||(n=r.querySelector(Qf(i)),n||(e=Tt({src:e,async:!0},t),(t=fi.get(i))&&xT(e,t),n=r.createElement("script"),mr(n),Nr(n,"link",e),r.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},o.set(i,n))}}function EW(e,t){os.M(e,t);var r=op;if(r&&e){var o=Bu(r).hoistableScripts,i=ip(e),n=o.get(i);n||(n=r.querySelector(Qf(i)),n||(e=Tt({src:e,async:!0,type:"module"},t),(t=fi.get(i))&&xT(e,t),n=r.createElement("script"),mr(n),Nr(n,"link",e),r.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},o.set(i,n))}}function ZO(e,t,r,o){var i=(i=qs.current)?uv(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Xu(r.href),r=Bu(i).hoistableStyles,o=r.get(t),o||(o={type:"style",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Xu(r.href);var n=Bu(i).hoistableStyles,s=n.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,s),(n=i.querySelector(Zf(e)))&&!n._p&&(s.instance=n,s.state.loading=5),fi.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},fi.set(e,r),n||kW(i,e,r,s.state))),t&&o===null)throw Error(U(528,""));return s}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ip(r),r=Bu(i).hoistableScripts,o=r.get(t),o||(o={type:"script",instance:null,count:0,state:null},r.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function Xu(e){return'href="'+li(e)+'"'}function Zf(e){return'link[rel="stylesheet"]['+e+"]"}function zA(e){return Tt({},e,{"data-precedence":e.precedence,precedence:null})}function kW(e,t,r,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Nr(t,"link",r),mr(t),e.head.appendChild(t))}function ip(e){return'[src="'+li(e)+'"]'}function Qf(e){return"script[async]"+e}function QO(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+li(r.href)+'"]');if(o)return t.instance=o,mr(o),o;var i=Tt({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),mr(o),Nr(o,"style",i),Lg(o,r.precedence,e),t.instance=o;case"stylesheet":i=Xu(r.href);var n=e.querySelector(Zf(i));if(n)return t.state.loading|=4,t.instance=n,mr(n),n;o=zA(r),(i=fi.get(i))&&ST(o,i),n=(e.ownerDocument||e).createElement("link"),mr(n);var s=n;return s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),Nr(n,"link",o),t.state.loading|=4,Lg(n,r.precedence,e),t.instance=n;case"script":return n=ip(r.src),(i=e.querySelector(Qf(n)))?(t.instance=i,mr(i),i):(o=r,(i=fi.get(n))&&(o=Tt({},r),xT(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),mr(i),Nr(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Lg(o,r.precedence,e));return t.instance}function Lg(e,t,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,n=i,s=0;s<o.length;s++){var a=o[s];if(a.dataset.precedence===t)n=a;else if(n!==i)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function ST(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xT(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ig=null;function JO(e,t,r){if(Ig===null){var o=new Map,i=Ig=new Map;i.set(r,o)}else i=Ig,o=i.get(r),o||(o=new Map,i.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),i=0;i<r.length;i++){var n=r[i];if(!(n[Vf]||n[Mr]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var s=n.getAttribute(t)||"";s=e+s;var a=o.get(s);a?a.push(n):o.set(s,[n])}}return o}function eD(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function OW(e,t,r){if(r===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 FA(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function DW(e,t,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var i=Xu(o.href),n=t.querySelector(Zf(i));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pv.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=n,mr(n);return}n=t.ownerDocument||t,o=zA(o),(i=fi.get(i))&&ST(o,i),n=n.createElement("link"),mr(n);var s=n;s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),Nr(n,"link",o),r.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=pv.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var NS=0;function MW(e,t){return e.stylesheets&&e.count===0&&zg(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var o=setTimeout(function(){if(e.stylesheets&&zg(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&NS===0&&(NS=62500*dW());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zg(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>NS?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function pv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zg(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dv=null;function zg(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dv=new Map,t.forEach(AW,e),dv=null,pv.call(e))}function AW(e,t){if(!(t.state.loading&4)){var r=dv.get(e);if(r)var o=r.get(null);else{r=new Map,dv.set(e,r);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<i.length;n++){var s=i[n];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(r.set(s.dataset.precedence,s),o=s)}o&&r.set(null,o)}i=t.instance,s=i.getAttribute("data-precedence"),n=r.get(s)||o,n===o&&r.set(null,i),r.set(s,i),this.count++,o=pv.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),n?n.parentNode.insertBefore(i,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var zf={$$typeof:qn,Provider:null,Consumer:null,_currentValue:cl,_currentValue2:cl,_threadCount:0};function BW(e,t,r,o,i,n,s,a,l){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=aS(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aS(0),this.hiddenUpdates=aS(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=n,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function HA(e,t,r,o,i,n,s,a,l,c,u,p){return e=new BW(e,t,r,s,l,c,u,p,a),t=1,n===!0&&(t|=24),n=Mo(3,null,null,t),e.current=n,n.stateNode=e,t=Gx(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:o,isDehydrated:r,cache:t},Zx(n),e}function UA(e){return e?(e=Ou,e):Ou}function $A(e,t,r,o,i,n){i=UA(i),o.context===null?o.context=i:o.pendingContext=i,o=Gs(t),o.payload={element:r},n=n===void 0?null:n,n!==null&&(o.callback=n),r=Ys(e,o,t),r!==null&&(ho(r,e,t),vf(r,e,t))}function tD(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function TT(e,t){tD(e,t),(e=e.alternate)&&tD(e,t)}function jA(e){if(e.tag===13||e.tag===31){var t=xl(e,67108864);t!==null&&ho(t,e,67108864),TT(e,67108864)}}function rD(e){if(e.tag===13||e.tag===31){var t=Io();t=Bx(t);var r=xl(e,t);r!==null&&ho(r,e,t),TT(e,t)}}var fv=!0;function NW(e,t,r,o){var i=ye.T;ye.T=null;var n=qe.p;try{qe.p=2,CT(e,t,r,o)}finally{qe.p=n,ye.T=i}}function LW(e,t,r,o){var i=ye.T;ye.T=null;var n=qe.p;try{qe.p=8,CT(e,t,r,o)}finally{qe.p=n,ye.T=i}}function CT(e,t,r,o){if(fv){var i=kx(o);if(i===null)AS(e,t,o,hv,r),oD(e,o);else if(zW(i,e,t,r,o))o.stopPropagation();else if(oD(e,o),t&4&&-1<IW.indexOf(e)){for(;i!==null;){var n=Ju(i);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var s=sl(n.pendingLanes);if(s!==0){var a=n;for(a.pendingLanes|=2,a.entangledLanes|=2;s;){var l=1<<31-Lo(s);a.entanglements[1]|=l,s&=~l}cn(n),(Ve&6)===0&&(ov=Bo()+500,Xf(0,!1))}}break;case 31:case 13:a=xl(n,2),a!==null&&ho(a,n,2),Pv(),TT(n,2)}if(n=kx(o),n===null&&AS(e,t,o,hv,r),n===i)break;i=n}i!==null&&o.stopPropagation()}else AS(e,t,o,null,r)}}function kx(e){return e=zx(e),wT(e)}var hv=null;function wT(e){if(hv=null,e=Cu(e),e!==null){var t=Uf(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=cD(t),e!==null)return e;e=null}else if(r===31){if(e=uD(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hv=e,null}function WA(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(C9()){case hD:return 2;case mD:return 8;case jg:case w9:return 32;case yD:return 268435456;default:return 32}default:return 32}}var Ox=!1,Qs=null,Js=null,ea=null,Ff=new Map,Hf=new Map,Hs=[],IW="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 oD(e,t){switch(e){case"focusin":case"focusout":Qs=null;break;case"dragenter":case"dragleave":Js=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":Ff.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hf.delete(t.pointerId)}}function af(e,t,r,o,i,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:n,targetContainers:[i]},t!==null&&(t=Ju(t),t!==null&&jA(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zW(e,t,r,o,i){switch(t){case"focusin":return Qs=af(Qs,e,t,r,o,i),!0;case"dragenter":return Js=af(Js,e,t,r,o,i),!0;case"mouseover":return ea=af(ea,e,t,r,o,i),!0;case"pointerover":var n=i.pointerId;return Ff.set(n,af(Ff.get(n)||null,e,t,r,o,i)),!0;case"gotpointercapture":return n=i.pointerId,Hf.set(n,af(Hf.get(n)||null,e,t,r,o,i)),!0}return!1}function VA(e){var t=Cu(e.target);if(t!==null){var r=Uf(t);if(r!==null){if(t=r.tag,t===13){if(t=cD(r),t!==null){e.blockedOn=t,H2(e.priority,function(){rD(r)});return}}else if(t===31){if(t=uD(r),t!==null){e.blockedOn=t,H2(e.priority,function(){rD(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=kx(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);GS=o,r.target.dispatchEvent(o),GS=null}else return t=Ju(r),t!==null&&jA(t),e.blockedOn=r,!1;t.shift()}return!0}function iD(e,t,r){Fg(e)&&r.delete(t)}function FW(){Ox=!1,Qs!==null&&Fg(Qs)&&(Qs=null),Js!==null&&Fg(Js)&&(Js=null),ea!==null&&Fg(ea)&&(ea=null),Ff.forEach(iD),Hf.forEach(iD)}function Tg(e,t){e.blockedOn===t&&(e.blockedOn=null,Ox||(Ox=!0,ir.unstable_scheduleCallback(ir.unstable_NormalPriority,FW)))}var Cg=null;function nD(e){Cg!==e&&(Cg=e,ir.unstable_scheduleCallback(ir.unstable_NormalPriority,function(){Cg===e&&(Cg=null);for(var t=0;t<e.length;t+=3){var r=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(wT(o||r)===null)continue;break}var n=Ju(r);n!==null&&(e.splice(t,3),t-=3,ux(n,{pending:!0,data:i,method:r.method,action:o},o,i))}}))}function Zu(e){function t(l){return Tg(l,e)}Qs!==null&&Tg(Qs,e),Js!==null&&Tg(Js,e),ea!==null&&Tg(ea,e),Ff.forEach(t),Hf.forEach(t);for(var r=0;r<Hs.length;r++){var o=Hs[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Hs.length&&(r=Hs[0],r.blockedOn===null);)VA(r),r.blockedOn===null&&Hs.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var i=r[o],n=r[o+1],s=i[mo]||null;if(typeof n=="function")s||nD(r);else if(s){var a=null;if(n&&n.hasAttribute("formAction")){if(i=n,s=n[mo]||null)a=s.formAction;else if(wT(i)!==null)continue}else a=s.action;typeof a=="function"?r[o+1]=a:(r.splice(o,3),o-=3),nD(r)}}}function qA(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(s){return i=s})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(r,20)}function r(){if(!o&&!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 o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function RT(e){this._internalRoot=e}Ov.prototype.render=RT.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var r=t.current,o=Io();$A(r,o,e,t,null,null)};Ov.prototype.unmount=RT.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$A(e.current,2,null,e,null,null),Pv(),t[Qu]=null}};function Ov(e){this._internalRoot=e}Ov.prototype.unstable_scheduleHydration=function(e){if(e){var t=SD();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Hs.length&&t!==0&&t<Hs[r].priority;r++);Hs.splice(r,0,e),r===0&&VA(e)}};var sD=aD.version;if(sD!=="19.2.4")throw Error(U(527,sD,"19.2.4"));qe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=g9(t),e=e!==null?pD(e):null,e=e===null?null:e.stateNode,e};var HW={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(lf=__REACT_DEVTOOLS_GLOBAL_HOOK__,!lf.isDisabled&&lf.supportsFiber))try{$f=lf.inject(HW),No=lf}catch{}var lf;Dv.createRoot=function(e,t){if(!lD(e))throw Error(U(299));var r=!1,o="",i=IM,n=zM,s=FM;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=HA(e,1,!1,null,null,r,o,null,i,n,s,qA),e[Qu]=t.current,_T(e),new RT(t)};Dv.hydrateRoot=function(e,t,r){if(!lD(e))throw Error(U(299));var o=!1,i="",n=IM,s=zM,a=FM,l=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onUncaughtError!==void 0&&(n=r.onUncaughtError),r.onCaughtError!==void 0&&(s=r.onCaughtError),r.onRecoverableError!==void 0&&(a=r.onRecoverableError),r.formState!==void 0&&(l=r.formState)),t=HA(e,1,!0,t,r??null,o,i,l,n,s,a,qA),t.context=UA(null),r=t.current,o=Io(),o=Bx(o),i=Gs(o),i.callback=null,Ys(r,i,o),r=o,t.current.lanes=r,Wf(t,r),cn(t),e[Qu]=t.current,_T(e),new Ov(t)};Dv.version="19.2.4"});var XA=Vr((m2e,YA)=>{"use strict";function GA(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GA)}catch(e){console.error(e)}}GA(),YA.exports=KA()});var tz={black:"#000",white:"#fff"},Yl=tz;var rz={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},xa=rz;var oz={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ta=oz;var iz={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ca=iz;var nz={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},wa=nz;var sz={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ra=sz;var az={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Xl=az;var lz={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},DC=lz;function cr(e,...t){let r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>r.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${r} for the full message.`}var Cr="$$material";function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Pa.apply(null,arguments)}var Ko=S(I()),am=S(I());var wz=!1;function Rz(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Pz(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var WC=(function(){function e(r){var o=this;this._insertTag=function(i){var n;o.tags.length===0?o.insertionPoint?n=o.insertionPoint.nextSibling:o.prepend?n=o.container.firstChild:n=o.before:n=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(i,n),o.tags.push(i)},this.isSpeedy=r.speedy===void 0?!wz:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(o){o.forEach(this._insertTag)},t.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Pz(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Rz(i);try{n.insertRule(o,n.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(o));this.ctr++},t.flush=function(){this.tags.forEach(function(o){var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)}),this.tags=[],this.ctr=0},e})();var wr="-ms-",Np="-moz-",Ue="-webkit-",jh="comm",Jl="rule",ec="decl";var VC="@import";var Wh="@keyframes";var qC="@layer";var KC=Math.abs,Ea=String.fromCharCode,GC=Object.assign;function YC(e,t){return jt(e,0)^45?(((t<<2^jt(e,0))<<2^jt(e,1))<<2^jt(e,2))<<2^jt(e,3):0}function Vh(e){return e.trim()}function Xb(e,t){return(e=t.exec(e))?e[0]:e}function Le(e,t,r){return e.replace(t,r)}function Lp(e,t){return e.indexOf(t)}function jt(e,t){return e.charCodeAt(t)|0}function gs(e,t,r){return e.slice(t,r)}function qr(e){return e.length}function tc(e){return e.length}function rc(e,t){return t.push(e),e}function Zb(e,t){return e.map(t).join("")}var qh=1,oc=1,XC=0,Kr=0,Gt=0,nc="";function Ip(e,t,r,o,i,n,s){return{value:e,root:t,parent:r,type:o,props:i,children:n,line:qh,column:oc,length:s,return:""}}function sc(e,t){return GC(Ip("",null,null,"",null,null,0),e,{length:-e.length},t)}function ZC(){return Gt}function QC(){return Gt=Kr>0?jt(nc,--Kr):0,oc--,Gt===10&&(oc=1,qh--),Gt}function Gr(){return Gt=Kr<XC?jt(nc,Kr++):0,oc++,Gt===10&&(oc=1,qh++),Gt}function qo(){return jt(nc,Kr)}function zp(){return Kr}function ac(e,t){return gs(nc,e,t)}function ic(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Kh(e){return qh=oc=1,XC=qr(nc=e),Kr=0,[]}function Gh(e){return nc="",e}function lc(e){return Vh(ac(Kr-1,Qb(e===91?e+2:e===40?e+1:e)))}function JC(e){for(;(Gt=qo())&&Gt<33;)Gr();return ic(e)>2||ic(Gt)>3?"":" "}function ew(e,t){for(;--t&&Gr()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return ac(e,zp()+(t<6&&qo()==32&&Gr()==32))}function Qb(e){for(;Gr();)switch(Gt){case e:return Kr;case 34:case 39:e!==34&&e!==39&&Qb(Gt);break;case 40:e===41&&Qb(e);break;case 92:Gr();break}return Kr}function tw(e,t){for(;Gr()&&e+Gt!==57;)if(e+Gt===84&&qo()===47)break;return"/*"+ac(t,Kr-1)+"*"+Ea(e===47?e:Gr())}function rw(e){for(;!ic(qo());)Gr();return ac(e,Kr)}function nw(e){return Gh(Yh("",null,null,null,[""],e=Kh(e),0,[0],e))}function Yh(e,t,r,o,i,n,s,a,l){for(var c=0,u=0,p=s,f=0,d=0,h=0,y=1,b=1,m=1,g=0,v="",_=i,C=n,w=o,E=v;b;)switch(h=g,g=Gr()){case 40:if(h!=108&&jt(E,p-1)==58){Lp(E+=Le(lc(g),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:E+=lc(g);break;case 9:case 10:case 13:case 32:E+=JC(h);break;case 92:E+=ew(zp()-1,7);continue;case 47:switch(qo()){case 42:case 47:rc(Ez(tw(Gr(),zp()),t,r),l);break;default:E+="/"}break;case 123*y:a[c++]=qr(E)*m;case 125*y:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+u:m==-1&&(E=Le(E,/\f/g,"")),d>0&&qr(E)-p&&rc(d>32?iw(E+";",o,r,p-1):iw(Le(E," ","")+";",o,r,p-2),l);break;case 59:E+=";";default:if(rc(w=ow(E,t,r,c,u,i,a,v,_=[],C=[],p),n),g===123)if(u===0)Yh(E,t,w,w,_,n,p,a,C);else switch(f===99&&jt(E,3)===110?100:f){case 100:case 108:case 109:case 115:Yh(e,w,w,o&&rc(ow(e,w,w,0,0,i,a,v,i,_=[],p),C),i,C,p,a,o?_:C);break;default:Yh(E,w,w,w,[""],C,0,a,C)}}c=u=d=0,y=m=1,v=E="",p=s;break;case 58:p=1+qr(E),d=h;default:if(y<1){if(g==123)--y;else if(g==125&&y++==0&&QC()==125)continue}switch(E+=Ea(g),g*y){case 38:m=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(qr(E)-1)*m,m=1;break;case 64:qo()===45&&(E+=lc(Gr())),f=qo(),u=p=qr(v=E+=rw(zp())),g++;break;case 45:h===45&&qr(E)==2&&(y=0)}}return n}function ow(e,t,r,o,i,n,s,a,l,c,u){for(var p=i-1,f=i===0?n:[""],d=tc(f),h=0,y=0,b=0;h<o;++h)for(var m=0,g=gs(e,p+1,p=KC(y=s[h])),v=e;m<d;++m)(v=Vh(y>0?f[m]+" "+g:Le(g,/&\f/g,f[m])))&&(l[b++]=v);return Ip(e,t,r,i===0?Jl:a,l,c,u)}function Ez(e,t,r){return Ip(e,t,r,jh,Ea(ZC()),gs(e,2,-2),0)}function iw(e,t,r,o){return Ip(e,t,r,ec,gs(e,0,o),gs(e,o+1,-1),o)}function ka(e,t){for(var r="",o=tc(e),i=0;i<o;i++)r+=t(e[i],i,e,t)||"";return r}function sw(e,t,r,o){switch(e.type){case qC:if(e.children.length)break;case VC:case ec:return e.return=e.return||e.value;case jh:return"";case Wh:return e.return=e.value+"{"+ka(e.children,o)+"}";case Jl:e.value=e.props.join(",")}return qr(r=ka(e.children,o))?e.return=e.value+"{"+r+"}":""}function aw(e){var t=tc(e);return function(r,o,i,n){for(var s="",a=0;a<t;a++)s+=e[a](r,o,i,n)||"";return s}}function lw(e){return function(t){t.root||(t=t.return)&&e(t)}}function Xh(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var kz=function(t,r,o){for(var i=0,n=0;i=n,n=qo(),i===38&&n===12&&(r[o]=1),!ic(n);)Gr();return ac(t,Kr)},Oz=function(t,r){var o=-1,i=44;do switch(ic(i)){case 0:i===38&&qo()===12&&(r[o]=1),t[o]+=kz(Kr-1,r,o);break;case 2:t[o]+=lc(i);break;case 4:if(i===44){t[++o]=qo()===58?"&\f":"",r[o]=t[o].length;break}default:t[o]+=Ea(i)}while(i=Gr());return t},Dz=function(t,r){return Gh(Oz(Kh(t),r))},cw=new WeakMap,Mz=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,o=t.parent,i=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!cw.get(o))&&!i){cw.set(t,!0);for(var n=[],s=Dz(r,n),a=o.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=n[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},Az=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function uw(e,t){switch(YC(e,t)){case 5103:return Ue+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ue+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ue+e+Np+e+wr+e+e;case 6828:case 4268:return Ue+e+wr+e+e;case 6165:return Ue+e+wr+"flex-"+e+e;case 5187:return Ue+e+Le(e,/(\w+).+(:[^]+)/,Ue+"box-$1$2"+wr+"flex-$1$2")+e;case 5443:return Ue+e+wr+"flex-item-"+Le(e,/flex-|-self/,"")+e;case 4675:return Ue+e+wr+"flex-line-pack"+Le(e,/align-content|flex-|-self/,"")+e;case 5548:return Ue+e+wr+Le(e,"shrink","negative")+e;case 5292:return Ue+e+wr+Le(e,"basis","preferred-size")+e;case 6060:return Ue+"box-"+Le(e,"-grow","")+Ue+e+wr+Le(e,"grow","positive")+e;case 4554:return Ue+Le(e,/([^-])(transform)/g,"$1"+Ue+"$2")+e;case 6187:return Le(Le(Le(e,/(zoom-|grab)/,Ue+"$1"),/(image-set)/,Ue+"$1"),e,"")+e;case 5495:case 3959:return Le(e,/(image-set\([^]*)/,Ue+"$1$`$1");case 4968:return Le(Le(e,/(.+:)(flex-)?(.*)/,Ue+"box-pack:$3"+wr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ue+e+e;case 4095:case 3583:case 4068:case 2532:return Le(e,/(.+)-inline(.+)/,Ue+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(qr(e)-1-t>6)switch(jt(e,t+1)){case 109:if(jt(e,t+4)!==45)break;case 102:return Le(e,/(.+:)(.+)-([^]+)/,"$1"+Ue+"$2-$3$1"+Np+(jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Lp(e,"stretch")?uw(Le(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(jt(e,t+1)!==115)break;case 6444:switch(jt(e,qr(e)-3-(~Lp(e,"!important")&&10))){case 107:return Le(e,":",":"+Ue)+e;case 101:return Le(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ue+(jt(e,14)===45?"inline-":"")+"box$3$1"+Ue+"$2$3$1"+wr+"$2box$3")+e}break;case 5936:switch(jt(e,t+11)){case 114:return Ue+e+wr+Le(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ue+e+wr+Le(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ue+e+wr+Le(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ue+e+wr+e+e}return e}var Bz=function(t,r,o,i){if(t.length>-1&&!t.return)switch(t.type){case ec:t.return=uw(t.value,t.length);break;case Wh:return ka([sc(t,{value:Le(t.value,"@","@"+Ue)})],i);case Jl:if(t.length)return Zb(t.props,function(n){switch(Xb(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ka([sc(t,{props:[Le(n,/:(read-\w+)/,":"+Np+"$1")]})],i);case"::placeholder":return ka([sc(t,{props:[Le(n,/:(plac\w+)/,":"+Ue+"input-$1")]}),sc(t,{props:[Le(n,/:(plac\w+)/,":"+Np+"$1")]}),sc(t,{props:[Le(n,/:(plac\w+)/,wr+"input-$1")]})],i)}return""})}},Nz=[Bz],pw=function(t){var r=t.key;if(r==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(y){var b=y.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Nz,n={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var b=y.getAttribute("data-emotion").split(" "),m=1;m<b.length;m++)n[b[m]]=!0;a.push(y)});var l,c=[Mz,Az];{var u,p=[sw,lw(function(y){u.insert(y)})],f=aw(c.concat(i,p)),d=function(b){return ka(nw(b),f)};l=function(b,m,g,v){u=g,d(b?b+"{"+m.styles+"}":m.styles),v&&(h.inserted[m.name]=!0)}}var h={key:r,sheet:new WC({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:n,registered:{},insert:l};return h.sheet.hydrate(a),h};var Gz=!0;function Fp(e,t,r){var o="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(o+=i+" ")}),o}var cc=function(t,r,o){var i=t.key+"-"+r.name;(o===!1||Gz===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},uc=function(t,r,o){cc(t,r,o);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var n=r;do t.insert(r===n?"."+i:"",n,t.sheet,!0),n=n.next;while(n!==void 0)}};function Tw(e){for(var t=0,r,o=0,i=e.length;i>=4;++o,i-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Cw={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Yz=!1,Xz=/[A-Z]|^ms/g,Zz=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ew=function(t){return t.charCodeAt(1)===45},ww=function(t){return t!=null&&typeof t!="boolean"},i_=Xh(function(e){return Ew(e)?e:e.replace(Xz,"-$&").toLowerCase()}),Rw=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Zz,function(o,i,n){return Ui={name:i,styles:n,next:Ui},i})}return Cw[t]!==1&&!Ew(t)&&typeof r=="number"&&r!==0?r+"px":r},Qz="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Hp(e,t,r){if(r==null)return"";var o=r;if(o.__emotion_styles!==void 0)return o;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Ui={name:i.name,styles:i.styles,next:Ui},i.name;var n=r;if(n.styles!==void 0){var s=n.next;if(s!==void 0)for(;s!==void 0;)Ui={name:s.name,styles:s.styles,next:Ui},s=s.next;var a=n.styles+";";return a}return Jz(e,t,r)}case"function":{if(e!==void 0){var l=Ui,c=r(e);return Ui=l,Hp(e,t,c)}break}}var u=r;if(t==null)return u;var p=t[u];return p!==void 0?p:u}function Jz(e,t,r){var o="";if(Array.isArray(r))for(var i=0;i<r.length;i++)o+=Hp(e,t,r[i])+";";else for(var n in r){var s=r[n];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?o+=n+"{"+t[a]+"}":ww(a)&&(o+=i_(n)+":"+Rw(n,a)+";")}else{if(n==="NO_COMPONENT_SELECTOR"&&Yz)throw new Error(Qz);if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)ww(s[l])&&(o+=i_(n)+":"+Rw(n,s[l])+";");else{var c=Hp(e,t,s);switch(n){case"animation":case"animationName":{o+=i_(n)+":"+c+";";break}default:o+=n+"{"+c+"}"}}}}return o}var Pw=/label:\s*([^\s;{]+)\s*(;|$)/g,Ui;function xn(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";Ui=void 0;var n=e[0];if(n==null||n.raw===void 0)o=!1,i+=Hp(r,t,n);else{var s=n;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=Hp(r,t,e[a]),o){var l=n;i+=l[a]}Pw.lastIndex=0;for(var c="",u;(u=Pw.exec(i))!==null;)c+="-"+u[1];var p=Tw(i)+c;return{name:p,styles:i,next:Ui}}var Up=S(I()),e4=function(t){return t()},kw=Up.useInsertionEffect?Up.useInsertionEffect:!1,$p=kw||e4,n_=kw||Up.useLayoutEffect;var Ow=!1,Dw=Ko.createContext(typeof HTMLElement<"u"?pw({key:"css"}):null),t4=Dw.Provider;var pc=function(t){return(0,am.forwardRef)(function(r,o){var i=(0,am.useContext)(Dw);return t(r,i,o)})},Ri=Ko.createContext({});var lm={}.hasOwnProperty,s_="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Mw=function(t,r){var o={};for(var i in r)lm.call(r,i)&&(o[i]=r[i]);return o[s_]=t,o},r4=function(t){var r=t.cache,o=t.serialized,i=t.isStringTag;return cc(r,o,i),$p(function(){return uc(r,o,i)}),null},o4=pc(function(e,t,r){var o=e.css;typeof o=="string"&&t.registered[o]!==void 0&&(o=t.registered[o]);var i=e[s_],n=[o],s="";typeof e.className=="string"?s=Fp(t.registered,n,e.className):e.className!=null&&(s=e.className+" ");var a=xn(n,void 0,Ko.useContext(Ri));s+=t.key+"-"+a.name;var l={};for(var c in e)lm.call(e,c)&&c!=="css"&&c!==s_&&!Ow&&(l[c]=e[c]);return l.className=s,r&&(l.ref=r),Ko.createElement(Ko.Fragment,null,Ko.createElement(r4,{cache:t,serialized:a,isStringTag:typeof i=="string"}),Ko.createElement(i,l))}),Aw=o4;var vs=S(I());var ZQ=S(xw()),Bw=function(t,r){var o=arguments;if(r==null||!lm.call(r,"css"))return vs.createElement.apply(void 0,o);var i=o.length,n=new Array(i);n[0]=Aw,n[1]=Mw(t,r);for(var s=2;s<i;s++)n[s]=o[s];return vs.createElement.apply(null,n)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Bw||(Bw={}));var Nw=pc(function(e,t){var r=e.styles,o=xn([r],void 0,vs.useContext(Ri)),i=vs.useRef();return n_(function(){var n=t.key+"-global",s=new t.sheet.constructor({key:n,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+n+" "+o.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",n),s.hydrate([l])),i.current=[s,a],function(){s.flush()}},[t]),n_(function(){var n=i.current,s=n[0],a=n[1];if(a){n[1]=!1;return}if(o.next!==void 0&&uc(t,o.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}t.insert("",o,s,!1)},[t,o.name]),null});function Oa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xn(t)}function $i(){var e=Oa.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var bs=S(I());var i4=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Lw=Xh(function(e){return i4.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});var n4=!1,s4=Lw,a4=function(t){return t!=="theme"},Iw=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?s4:a4},zw=function(t,r,o){var i;if(r){var n=r.shouldForwardProp;i=t.__emotion_forwardProp&&n?function(s){return t.__emotion_forwardProp(s)&&n(s)}:n}return typeof i!="function"&&o&&(i=t.__emotion_forwardProp),i},l4=function(t){var r=t.cache,o=t.serialized,i=t.isStringTag;return cc(r,o,i),$p(function(){return uc(r,o,i)}),null},Fw=function e(t,r){var o=t.__emotion_real===t,i=o&&t.__emotion_base||t,n,s;r!==void 0&&(n=r.label,s=r.target);var a=zw(t,r,o),l=a||Iw(i),c=!l("as");return function(){var u=arguments,p=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(n!==void 0&&p.push("label:"+n+";"),u[0]==null||u[0].raw===void 0)p.push.apply(p,u);else{var f=u[0];p.push(f[0]);for(var d=u.length,h=1;h<d;h++)p.push(u[h],f[h])}var y=pc(function(b,m,g){var v=c&&b.as||i,_="",C=[],w=b;if(b.theme==null){w={};for(var E in b)w[E]=b[E];w.theme=bs.useContext(Ri)}typeof b.className=="string"?_=Fp(m.registered,C,b.className):b.className!=null&&(_=b.className+" ");var O=xn(p.concat(C),m.registered,w);_+=m.key+"-"+O.name,s!==void 0&&(_+=" "+s);var A=c&&a===void 0?Iw(v):l,B={};for(var D in b)c&&D==="as"||A(D)&&(B[D]=b[D]);return B.className=_,g&&(B.ref=g),bs.createElement(bs.Fragment,null,bs.createElement(l4,{cache:m,serialized:O,isStringTag:typeof v=="string"}),bs.createElement(v,B))});return y.displayName=n!==void 0?n:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",y.defaultProps=t.defaultProps,y.__emotion_real=y,y.__emotion_base=i,y.__emotion_styles=p,y.__emotion_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return s===void 0&&n4?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(b,m){var g=e(b,Pa({},r,m,{shouldForwardProp:zw(y,m,!0)}));return g.apply(void 0,p)},y}};var hJ=S(I());var c4=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],cm=Fw.bind(null);c4.forEach(function(e){cm[e]=cm(e)});var jw=S(k(),1);function d4(e){return e==null||Object.keys(e).length===0}function Da(e){let{styles:t,defaultTheme:r={}}=e;return(0,jw.jsx)(Nw,{styles:typeof t=="function"?i=>t(d4(i)?r:i):t})}function jp(e,t){return cm(e,t)}function Vw(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Ww=[];function Pi(e){return Ww[0]=e,xn(Ww)}var c_=S(I(),1),u_=S(Gw(),1);function Ei(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yw(e){if(c_.isValidElement(e)||(0,u_.isValidElementType)(e)||!Ei(e))return e;let t={};return Object.keys(e).forEach(r=>{t[r]=Yw(e[r])}),t}function Ke(e,t,r={clone:!0}){let o=r.clone?{...e}:e;return Ei(e)&&Ei(t)&&Object.keys(t).forEach(i=>{c_.isValidElement(t[i])||(0,u_.isValidElementType)(t[i])?o[i]=t[i]:Ei(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ei(e[i])?o[i]=Ke(e[i],t[i],r):r.clone?o[i]=Ei(t[i])?Yw(t[i]):t[i]:o[i]=t[i]}),o}var m4=e=>{let t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,o)=>r.val-o.val),t.reduce((r,o)=>({...r,[o.key]:o.val}),{})};function Wp(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5,...i}=e,n=m4(t),s=Object.keys(n);function a(d){return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r})`}function l(d){return`@media (max-width:${(typeof t[d]=="number"?t[d]:d)-o/100}${r})`}function c(d,h){let y=s.indexOf(h);return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r}) and (max-width:${(y!==-1&&typeof t[s[y]]=="number"?t[s[y]]:h)-o/100}${r})`}function u(d){return s.indexOf(d)+1<s.length?c(d,s[s.indexOf(d)+1]):a(d)}function p(d){let h=s.indexOf(d);return h===0?a(s[1]):h===s.length-1?l(s[h]):c(d,s[s.indexOf(d)+1]).replace("@media","@media not all and")}let f=[];for(let d=0;d<s.length;d+=1)f.push(a(s[d]));return{keys:s,values:n,up:a,down:l,between:c,only:u,not:p,unit:r,internal_mediaKeys:f,...i}}var Xw=/min-width:\s*([0-9.]+)/;function Sm(e,t){if(!e.containerQueries||!y4(t))return t;let r=[];for(let i in t)i.startsWith("@container")&&r.push(i);r.sort((i,n)=>+(i.match(Xw)?.[1]||0)-+(n.match(Xw)?.[1]||0));let o=t;for(let i=0;i<r.length;i+=1){let n=r[i],s=o[n];delete o[n],o[n]=s}return o}function y4(e){for(let t in e)if(t.startsWith("@container"))return!0;return!1}function xm(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function p_(e,t){let r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;let[,o,i]=r,n=Number.isNaN(+o)?o||0:+o;return e.containerQueries(i).up(n)}function Tm(e){let t=(n,s)=>n.replace("@media",s?`@container ${s}`:"@container");function r(n,s){n.up=(...a)=>t(e.breakpoints.up(...a),s),n.down=(...a)=>t(e.breakpoints.down(...a),s),n.between=(...a)=>t(e.breakpoints.between(...a),s),n.only=(...a)=>t(e.breakpoints.only(...a),s),n.not=(...a)=>{let l=t(e.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}let o={},i=n=>(r(o,n),o);return r(i),{...e,containerQueries:i}}var g4={borderRadius:4},Zw=g4;function dc(e){if(e==null)return!0;for(let t in e)return!1;return!0}function ji(e,t){let r=Array.isArray(t),o=Array.isArray(e);return x4(t)?t:T4(e)?fc(t):r&&o?_4(e,t):r!==o?fc(t):C4(e,t)}function v4(e){let t=0,r=e.length,o=new Array(r);for(t=0;t<r;t+=1)o[t]=fc(e[t]);return o}function b4(e){let t={};for(let r in e)t[r]=fc(e[r]);return t}function _4(e,t){let r=e.length;for(let o=0;o<t.length;o+=1)e[r+o]=fc(t[o]);return e}function S4(e){return typeof e=="object"&&e!==null&&!(e instanceof RegExp)&&!(e instanceof Date)}function x4(e){return typeof e!="object"||e===null}function T4(e){return typeof e!="object"||e===null||e instanceof RegExp||e instanceof Date}function fc(e){return S4(e)?Array.isArray(e)?v4(e):b4(e):e}function C4(e,t){for(let r in t)r in e?e[r]=ji(e[r],t[r]):e[r]=fc(t[r]);return e}var w4={},qp={xs:0,sm:600,md:900,lg:1200,xl:1536},Vp=Wp({values:qp}),R4={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:qp[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function To(e,t,r){let o={};return hc(o,e.theme,t,(i,n,s)=>{let a=r(n,s);i?o[i]=a:ji(o,a)})}function hc(e,t,r,o){if(t??(t=w4),Array.isArray(r)){let i=t.breakpoints??Vp;for(let n=0;n<r.length;n+=1)d_(e,i.up(i.keys[n]),r[n],void 0,o);return e}if(typeof r=="object"){let i=t.breakpoints??Vp,n=i.values??qp;for(let s in r)if(xm(i.keys,s)){let a=p_(t.containerQueries?t:R4,s);a&&d_(e,a,r[s],s,o)}else if(s in n){let a=i.up(s);d_(e,a,r[s],s,o)}else{let a=s;e[a]=r[a]}return e}return o(void 0,r),e}function d_(e,t,r,o,i){e[t]??(e[t]={}),i(t,r,o)}function f_(e=Vp){let{internal_mediaKeys:t}=e,r={};for(let o=0;o<t.length;o+=1)r[t[o]]={};return r}function Cm(e,t){let r=e.internal_mediaKeys;for(let o=0;o<r.length;o+=1){let i=r[o];dc(t[i])&&delete t[i]}return t}function Qw(e,...t){let o=[f_(e),...t].reduce((i,n)=>Ke(i,n),{});return Cm(e,o)}function P4(e,t){if(typeof e!="object")return{};let r={},o=Object.keys(t);return Array.isArray(e)?o.forEach((i,n)=>{n<e.length&&(r[i]=!0)}):o.forEach(i=>{e[i]!=null&&(r[i]=!0)}),r}function wm({values:e,breakpoints:t,base:r}){let o=r||P4(e,t),i=Object.keys(o);if(i.length===0)return e;let n;return i.reduce((s,a,l)=>(Array.isArray(e)?(s[a]=e[l]!=null?e[l]:e[n],n=l):typeof e=="object"?(s[a]=e[a]!=null?e[a]:e[n],n=a):s[a]=e,s),{})}function Jw(e,t){if(Array.isArray(t))return!0;if(typeof t=="object"&&t!==null){for(let o=0;o<e.keys.length;o+=1)if(e.keys[o]in t)return!0;let r=Object.keys(t);for(let o=0;o<r.length;o+=1)if(xm(e.keys,r[o]))return!0}return!1}function Tn(e){if(typeof e!="string")throw new Error(cr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function h_(e,t,r,o){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||r:typeof r=="string"?i=Co(e,r,!0,o)||r:i=r,t&&(i=t(i,r,e)),i}function Co(e,t,r=!0,o=void 0){if(!e||!t)return null;let i=t.split(".");if(e.vars&&r){let n=eR(e.vars,i,o);if(n!=null)return n}return eR(e,i,o)}function eR(e,t,r=void 0){let o,i=e,n=0;for(;n<t.length;){if(i==null)return i;o=i,i=i[t[n]],n+=1}if(r&&i===void 0){let s=t[t.length-1],a=`${r}${s==="default"?"":Tn(s)}`;return o?.[a]}return i}function lt(e){let{prop:t,cssProperty:r=e.prop,themeKey:o,transform:i}=e,n=s=>{if(s[t]==null)return null;let a=s[t],l=s.theme,c=Co(l,o)||{};return To(s,a,p=>{let f=h_(c,i,p,t);return r===!1?f:{[r]:f}})};return n.propTypes={},n.filterProps=[t],n}var E4={internal_cache:{}},Rm={m:"margin",p:"padding"},tR={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},rR={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Kp={};for(let e in Rm)Kp[e]=[Rm[e]];for(let e in Rm)for(let t in tR){let r=Rm[e],o=tR[t],i=Array.isArray(o)?o.map(n=>r+n):[r+o];Kp[e+t]=i}for(let e in rR)Kp[e]=Kp[rR[e]];var m_=new Set(["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"]),y_=new Set(["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"]),iR=new Set([...m_,...y_]);function Ma(e,t,r,o){let i=Co(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?n=>typeof n=="string"?n:typeof i=="string"?i.startsWith("var(")&&n===0?0:i.startsWith("var(")&&n===1?i:`calc(${n} * ${i})`:i*n:Array.isArray(i)?n=>{if(typeof n=="string")return n;let s=Math.abs(n),a=i[s];return n>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof i=="function"?i:()=>{}}function Aa(e){return Ma(e,"spacing",8,"spacing")}function Wi(e,t){return typeof t=="string"||t==null?t:e(t)}var oR=[""];function g_(e,t){let r=e.theme??E4,o=r?.internal_cache?.unarySpacing??Aa(r),i={};for(let n in e){if(!t.has(n))continue;let s=Kp[n]??(oR[0]=n,oR),a=e[n];hc(i,e.theme,a,(l,c)=>{let u=l?i[l]:i;for(let p=0;p<s.length;p+=1)u[s[p]]=Wi(o,c)})}return i}function Ot(e){return g_(e,m_)}Ot.propTypes={};Ot.filterProps=m_;function Dt(e){return g_(e,y_)}Dt.propTypes={};Dt.filterProps=y_;function nR(e){return g_(e,iR)}nR.propTypes={};nR.filterProps=iR;function mc(e=8,t=Aa({spacing:e})){if(e.mui)return e;let r=(...o)=>(o.length===0?[1]:o).map(n=>{let s=t(n);return typeof s=="number"?`${s}px`:s}).join(" ");return r.mui=!0,r}function k4(...e){let t=e.reduce((o,i)=>(i.filterProps.forEach(n=>{o[n]=i}),o),{}),r=o=>{let i={};for(let n in o)t[n]&&ji(i,t[n](o));return i};return r.propTypes={},r.filterProps=e.reduce((o,i)=>o.concat(i.filterProps),[]),r}var Cn=k4;function wo(e){return typeof e!="number"?e:`${e}px solid`}function Yo(e,t){return lt({prop:e,themeKey:"borders",transform:t})}var O4=Yo("border",wo),D4=Yo("borderTop",wo),M4=Yo("borderRight",wo),A4=Yo("borderBottom",wo),B4=Yo("borderLeft",wo),N4=Yo("borderColor"),L4=Yo("borderTopColor"),I4=Yo("borderRightColor"),z4=Yo("borderBottomColor"),F4=Yo("borderLeftColor"),H4=Yo("outline",wo),U4=Yo("outlineColor"),Gp=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Ma(e.theme,"shape.borderRadius",4,"borderRadius"),r=o=>({borderRadius:Wi(t,o)});return To(e,e.borderRadius,r)}return null};Gp.propTypes={};Gp.filterProps=["borderRadius"];var See=Cn(O4,D4,M4,A4,B4,N4,L4,I4,z4,F4,Gp,H4,U4);var Yp=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Ma(e.theme,"spacing",8,"gap"),r=o=>({gap:Wi(t,o)});return To(e,e.gap,r)}return null};Yp.propTypes={};Yp.filterProps=["gap"];var Xp=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Ma(e.theme,"spacing",8,"columnGap"),r=o=>({columnGap:Wi(t,o)});return To(e,e.columnGap,r)}return null};Xp.propTypes={};Xp.filterProps=["columnGap"];var Zp=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Ma(e.theme,"spacing",8,"rowGap"),r=o=>({rowGap:Wi(t,o)});return To(e,e.rowGap,r)}return null};Zp.propTypes={};Zp.filterProps=["rowGap"];var $4=lt({prop:"gridColumn"}),j4=lt({prop:"gridRow"}),W4=lt({prop:"gridAutoFlow"}),V4=lt({prop:"gridAutoColumns"}),q4=lt({prop:"gridAutoRows"}),K4=lt({prop:"gridTemplateColumns"}),G4=lt({prop:"gridTemplateRows"}),Y4=lt({prop:"gridTemplateAreas"}),X4=lt({prop:"gridArea"}),Pee=Cn(Yp,Xp,Zp,$4,j4,W4,V4,q4,K4,G4,Y4,X4);function Ba(e,t){return t==="grey"?t:e}var Z4=lt({prop:"color",themeKey:"palette",transform:Ba}),Q4=lt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ba}),J4=lt({prop:"backgroundColor",themeKey:"palette",transform:Ba}),Dee=Cn(Z4,Q4,J4);function io(e){return e<=1&&e!==0?`${e*100}%`:e}var e6=lt({prop:"width",transform:io}),Pm=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){let t=r=>{let o=e.theme?.breakpoints?.values?.[r]||qp[r];return o?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:io(r)}};return To(e,e.maxWidth,t)}return null};Pm.filterProps=["maxWidth"];var t6=lt({prop:"minWidth",transform:io}),r6=lt({prop:"height",transform:io}),o6=lt({prop:"maxHeight",transform:io}),i6=lt({prop:"minHeight",transform:io}),Lee=lt({prop:"size",cssProperty:"width",transform:io}),Iee=lt({prop:"size",cssProperty:"height",transform:io}),n6=lt({prop:"boxSizing"}),zee=Cn(e6,Pm,t6,r6,o6,i6,n6);var s6={border:{themeKey:"borders",transform:wo},borderTop:{themeKey:"borders",transform:wo},borderRight:{themeKey:"borders",transform:wo},borderBottom:{themeKey:"borders",transform:wo},borderLeft:{themeKey:"borders",transform:wo},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wo},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Gp},color:{themeKey:"palette",transform:Ba},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ba},backgroundColor:{themeKey:"palette",transform:Ba},p:{style:Dt},pt:{style:Dt},pr:{style:Dt},pb:{style:Dt},pl:{style:Dt},px:{style:Dt},py:{style:Dt},padding:{style:Dt},paddingTop:{style:Dt},paddingRight:{style:Dt},paddingBottom:{style:Dt},paddingLeft:{style:Dt},paddingX:{style:Dt},paddingY:{style:Dt},paddingInline:{style:Dt},paddingInlineStart:{style:Dt},paddingInlineEnd:{style:Dt},paddingBlock:{style:Dt},paddingBlockStart:{style:Dt},paddingBlockEnd:{style:Dt},m:{style:Ot},mt:{style:Ot},mr:{style:Ot},mb:{style:Ot},ml:{style:Ot},mx:{style:Ot},my:{style:Ot},margin:{style:Ot},marginTop:{style:Ot},marginRight:{style:Ot},marginBottom:{style:Ot},marginLeft:{style:Ot},marginX:{style:Ot},marginY:{style:Ot},marginInline:{style:Ot},marginInlineStart:{style:Ot},marginInlineEnd:{style:Ot},marginBlock:{style:Ot},marginBlockStart:{style:Ot},marginBlockEnd:{style:Ot},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Yp},rowGap:{style:Zp},columnGap:{style:Xp},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:io},maxWidth:{style:Pm},minWidth:{transform:io},height:{transform:io},maxHeight:{transform:io},minHeight:{transform:io},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},wn=s6;var a6={};function l6(){function e(t){if(!t.sx)return null;let{sx:r,theme:o=a6,nested:i}=t,n=o.unstable_sxConfig??wn,s={sx:null,theme:o,nested:!0};function a(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;let u=o.breakpoints??Vp,p=f_(u);for(let f in c){let d=c6(c[f],o);if(d!=null){if(typeof d!="object"){sR(p,f,d,o,n);continue}if(n[f]){sR(p,f,d,o,n);continue}Jw(u,d)?hc(p,t.theme,d,(h,y)=>{p[h][f]=y}):(s.sx=d,p[f]=e(s))}}return!i&&o.modularCssLayers?{"@layer sx":Sm(o,Cm(u,p))}:Sm(o,Cm(u,p))}return Array.isArray(r)?r.map(a):a(r)}return e.filterProps=["sx"],e}var no=l6();function sR(e,t,r,o,i){let n=i[t];if(!n){e[t]=r;return}if(r==null)return;let{themeKey:s}=n;if(s==="typography"&&r==="inherit"){e[t]=r;return}let{style:a}=n;if(a){ji(e,a({[t]:r,theme:o}));return}let{cssProperty:l=t,transform:c}=n,u=Co(o,s);hc(e,o,r,(p,f)=>{let d=h_(u,c,f,t);l===!1?p?e[p]=d:ji(e,d):p?e[p][l]=d:e[l]=d})}function c6(e,t){return typeof e=="function"?e(t):e}function v_(e,t){let r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function u6(e={},...t){let{breakpoints:r={},palette:o={},spacing:i,shape:n={},...s}=e,a=Wp(r),l=mc(i),c=Ke({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Zw,...n}},s);return c=Tm(c),c.applyStyles=v_,c=t.reduce((u,p)=>Ke(u,p),c),c.unstable_sxConfig={...wn,...s?.unstable_sxConfig},c.unstable_sx=function(p){return no({sx:p,theme:this})},c.internal_cache={},c}var ki=u6;var aR=S(I(),1);function p6(e){return Object.keys(e).length===0}function d6(e=null){let t=aR.useContext(Ri);return!t||p6(t)?e:t}var Na=d6;var f6=ki();function h6(e=f6){return Na(e)}var Vi=h6;var lR=S(k(),1);function b_(e){let t=Pi(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function m6({styles:e,themeId:t,defaultTheme:r={}}){let o=Vi(r),i=t&&o[t]||o,n=typeof e=="function"?e(i):e;return i.modularCssLayers&&(Array.isArray(n)?n=n.map(s=>b_(typeof s=="function"?s(i):s)):n=b_(n)),(0,lR.jsx)(Da,{styles:n})}var yc=m6;var cR=e=>e,y6=()=>{let e=cR;return{configure(t){e=t},generate(t){return e(t)},reset(){e=cR}}},g6=y6(),gc=g6;var pR=S(I(),1);function uR(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=uR(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function v6(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=uR(e))&&(o&&(o+=" "),o+=t);return o}var H=v6;var dR=S(k(),1);function Qp(e={}){let{themeId:t,defaultTheme:r,defaultClassName:o="MuiBox-root",generateClassName:i}=e,n=jp("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(no);return pR.forwardRef(function(l,c){let u=Vi(r),{className:p,component:f="div",...d}=l;return(0,dR.jsx)(n,{as:f,ref:c,className:H(p,i?i(o):o),theme:t&&u[t]||u,...d})})}var b6={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function W(e,t,r="Mui"){let o=b6[t];return o?`${r}-${o}`:`${gc.generate(e)}-${t}`}function j(e,t,r="Mui"){let o={};return t.forEach(i=>{o[i]=W(e,i,r)}),o}function Jp(e){let{variants:t,...r}=e,o={variants:t,style:Pi(r),isProcessed:!0};return o.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Pi(i.style))}),o}var _6=ki();function __(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function La(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function S6(e){return e?(t,r)=>r[e]:null}function x6(e,t,r){e.theme=dc(e.theme)?r:e.theme[t]||e.theme}function Em(e,t,r){let o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(i=>Em(e,i,r));if(Array.isArray(o?.variants)){let i;if(o.isProcessed)i=r?La(o.style,r):o.style;else{let{variants:n,...s}=o;i=r?La(Pi(s),r):s}return fR(e,o.variants,[i],r)}return o?.isProcessed?r?La(Pi(o.style),r):o.style:r?La(Pi(o),r):o}function fR(e,t,r=[],o=void 0){let i;e:for(let n=0;n<t.length;n+=1){let s=t[n];if(typeof s.props=="function"){if(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(i))continue}else for(let a in s.props)if(e[a]!==s.props[a]&&e.ownerState?.[a]!==s.props[a])continue e;typeof s.style=="function"?(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),r.push(o?La(Pi(s.style(i)),o):s.style(i))):r.push(o?La(Pi(s.style),o):s.style)}return r}function vc(e={}){let{themeId:t,defaultTheme:r=_6,rootShouldForwardProp:o=__,slotShouldForwardProp:i=__}=e;function n(a){x6(a,t,r)}return(a,l={})=>{Vw(a,w=>w.filter(E=>E!==no));let{name:c,slot:u,skipVariantsResolver:p,skipSx:f,overridesResolver:d=S6(w6(u)),...h}=l,y=c&&c.startsWith("Mui")||u?"components":"custom",b=p!==void 0?p:u&&u!=="Root"&&u!=="root"||!1,m=f||!1,g=__;u==="Root"||u==="root"?g=o:u?g=i:C6(a)&&(g=void 0);let v=jp(a,{shouldForwardProp:g,label:T6(c,u),...h}),_=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(O){return Em(O,w,O.theme.modularCssLayers?y:void 0)};if(Ei(w)){let E=Jp(w);return function(A){return E.variants?Em(A,E,A.theme.modularCssLayers?y:void 0):A.theme.modularCssLayers?La(E.style,y):E.style}}return w},C=(...w)=>{let E=[],O=w.map(_),A=[];if(E.push(n),c&&d&&A.push(function(R){let P=R.theme.components?.[c]?.styleOverrides;if(!P)return null;let M={};for(let L in P)M[L]=Em(R,P[L],R.theme.modularCssLayers?"theme":void 0);return d(R,M)}),c&&!b&&A.push(function(R){let P=R.theme?.components?.[c]?.variants;return P?fR(R,P,[],R.theme.modularCssLayers?"theme":void 0):null}),m||A.push(no),Array.isArray(O[0])){let x=O.shift(),R=new Array(E.length).fill(""),T=new Array(A.length).fill(""),P;P=[...R,...x,...T],P.raw=[...R,...x.raw,...T],E.unshift(P)}let B=[...E,...O,...A],D=v(...B);return a.muiName&&(D.muiName=a.muiName),D};return v.withConfig&&(C.withConfig=v.withConfig),C}}function T6(e,t){return void 0}function C6(e){return typeof e=="string"&&e.charCodeAt(0)>96}function w6(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var R6=vc(),ed=R6;function qi(e,t,r=!1){let o={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let n=i;if(n==="components"||n==="slots")o[n]={...e[n],...o[n]};else if(n==="componentsProps"||n==="slotProps"){let s=e[n],a=t[n];if(!a)o[n]=s||{};else if(!s)o[n]=a;else{o[n]={...a};for(let l in s)if(Object.prototype.hasOwnProperty.call(s,l)){let c=l;o[n][c]=qi(s[c],a[c],r)}}}else n==="className"&&r&&t.className?o.className=H(e?.className,t?.className):n==="style"&&r&&t.style?o.style={...e?.style,...t?.style}:o[n]===void 0&&(o[n]=e[n])}return o}function S_(e){let{theme:t,name:r,props:o}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?o:qi(t.components[r].defaultProps,o)}function bc({props:e,name:t,defaultTheme:r,themeId:o}){let i=Vi(r);return o&&(i=i[o]||i),S_({theme:i,name:t,props:e})}var km=S(I(),1),P6=typeof window<"u"?km.useLayoutEffect:km.useEffect,pr=P6;function E6(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}var x_=E6;function C_(e,t=0,r=1){return x_(e,t,r)}function k6(e){e=e.slice(1);let t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g"),r=e.match(t);return r&&r[0].length===1&&(r=r.map(o=>o+o)),r?`rgb${r.length===4?"a":""}(${r.map((o,i)=>i<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function _s(e){if(e.type)return e;if(e.charAt(0)==="#")return _s(k6(e));let t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(cr(9,e));let o=e.substring(t+1,e.length-1),i;if(r==="color"){if(o=o.split(" "),i=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(cr(10,i))}else o=o.split(",");return o=o.map(n=>parseFloat(n)),{type:r,values:o,colorSpace:i}}var O6=e=>{let t=_s(e);return t.values.slice(0,3).map((r,o)=>t.type.includes("hsl")&&o!==0?`${r}%`:r).join(" ")},_c=(e,t)=>{try{return O6(e)}catch{return e}};function Om(e){let{type:t,colorSpace:r}=e,{values:o}=e;return t.includes("rgb")?o=o.map((i,n)=>n<3?parseInt(i,10):i):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${r} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function w_(e){e=_s(e);let{values:t}=e,r=t[0],o=t[1]/100,i=t[2]/100,n=o*Math.min(i,1-i),s=(c,u=(c+r/30)%12)=>i-n*Math.max(Math.min(u-3,9-u,1),-1),a="rgb",l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Om({type:a,values:l})}function T_(e){e=_s(e);let t=e.type==="hsl"||e.type==="hsla"?_s(w_(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function hR(e,t){let r=T_(e),o=T_(t);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}function Ss(e,t){return e=_s(e),t=C_(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Om(e)}function xs(e,t,r){try{return Ss(e,t)}catch{return e}}function Sc(e,t){if(e=_s(e),t=C_(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Om(e)}function Ge(e,t,r){try{return Sc(e,t)}catch{return e}}function xc(e,t){if(e=_s(e),t=C_(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Om(e)}function Ye(e,t,r){try{return xc(e,t)}catch{return e}}function D6(e,t=.15){return T_(e)>.5?Sc(e,t):xc(e,t)}function td(e,t,r){try{return D6(e,t)}catch{return e}}var kR=S(I(),1);var gR=S(I(),1);var mR=S(I(),1),M6=mR.createContext(null),Dm=M6;var R_=S(I(),1);function Rn(){return R_.useContext(Dm)}var A6=typeof Symbol=="function"&&Symbol.for,yR=A6?Symbol.for("mui.nested"):"__THEME_NESTED__";var vR=S(k(),1);function B6(e,t){return typeof t=="function"?t(e):{...e,...t}}function N6(e){let{children:t,theme:r}=e,o=Rn(),i=gR.useMemo(()=>{let n=o===null?{...r}:B6(o,r);return n!=null&&(n[yR]=o!==null),n},[r,o]);return(0,vR.jsx)(Dm.Provider,{value:i,children:t})}var Mm=N6;var Am=S(I(),1);var bR=S(k(),1),_R=Am.createContext();function L6({value:e,...t}){return(0,bR.jsx)(_R.Provider,{value:e??!0,...t})}var Tc=()=>Am.useContext(_R)??!1,SR=L6;var Bm=S(I(),1);var xR=S(k(),1),TR=Bm.createContext(void 0);function I6({value:e,children:t}){return(0,xR.jsx)(TR.Provider,{value:e,children:t})}function z6(e){let{theme:t,name:r,props:o}=e;if(!t||!t.components||!t.components[r])return o;let i=t.components[r];return i.defaultProps?qi(i.defaultProps,o,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?qi(i,o,t.components.mergeClassNameAndStyle):o}function P_({props:e,name:t}){let r=Bm.useContext(TR);return z6({props:e,name:t,theme:{components:r}})}var Nm=I6;var rd=S(I(),1),CR=0;function F6(e){let[t,r]=rd.useState(e),o=e||t;return rd.useEffect(()=>{t==null&&(CR+=1,r(`mui-${CR}`))},[t]),o}var H6={...rd},wR=H6.useId;function Ro(e){if(wR!==void 0){let t=wR();return e??t}return F6(e)}var RR=S(k(),1);function E_(e){let t=Na(),r=Ro()||"",{modularCssLayers:o}=e,i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!o||t!==null?i="":typeof o=="string"?i=o.replace(/mui(?!\.)/g,i):i=`@layer ${i};`,pr(()=>{let n=document.querySelector("head");if(!n)return;let s=n.firstChild;if(i){if(s&&s.hasAttribute?.("data-mui-layer-order")&&s.getAttribute("data-mui-layer-order")===r)return;let a=document.createElement("style");a.setAttribute("data-mui-layer-order",r),a.textContent=i,n.prepend(a)}else n.querySelector(`style[data-mui-layer-order="${r}"]`)?.remove()},[i,r]),i?(0,RR.jsx)(yc,{styles:i}):null}var Cc=S(k(),1),PR={};function ER(e,t,r,o=!1){return kR.useMemo(()=>{let i=e&&t[e]||t;if(typeof r=="function"){let n=r(i),s=e?{...t,[e]:n}:n;return o?()=>s:s}return e?{...t,[e]:r}:{...t,...r}},[e,t,r,o])}function U6(e){let{children:t,theme:r,themeId:o}=e,i=Na(PR),n=Rn()||PR,s=ER(o,i,r),a=ER(o,n,r,!0),l=(o?s[o]:s).direction==="rtl",c=E_(s);return(0,Cc.jsx)(Mm,{theme:a,children:(0,Cc.jsx)(Ri.Provider,{value:s,children:(0,Cc.jsx)(SR,{value:l,children:(0,Cc.jsxs)(Nm,{value:o?s[o].components:s.components,children:[c,t]})})})})}var wc=U6;var OR={theme:void 0};function Lm(e){let t,r;return function(i){let n=t;return(n===void 0||i.theme!==r)&&(OR.theme=i.theme,n=Jp(e(OR)),t=n,r=i.theme),n}}var Pr=S(I(),1);var DR=S(k(),1),od="mode",id="color-scheme",$6="data-color-scheme";function k_(e){let{defaultMode:t="system",defaultLightColorScheme:r="light",defaultDarkColorScheme:o="dark",modeStorageKey:i=od,colorSchemeStorageKey:n=id,attribute:s=$6,colorSchemeNode:a="document.documentElement",nonce:l}=e||{},c="",u=s;if(s==="class"&&(u=".%s"),s==="data"&&(u="[data-%s]"),u.startsWith(".")){let f=u.substring(1);c+=`${a}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark));
10
+ ${a}.classList.add('${f}'.replace('%s', colorScheme));`}let p=u.match(/\[([^[\]]+)\]/);if(p){let[f,d]=p[1].split("=");d||(c+=`${a}.removeAttribute('${f}'.replace('%s', light));
11
+ ${a}.removeAttribute('${f}'.replace('%s', dark));`),c+=`
12
+ ${a}.setAttribute('${f}'.replace('%s', colorScheme), ${d?`${d}.replace('%s', colorScheme)`:'""'});`}else u!==".%s"&&(c+=`${a}.setAttribute('${u}', colorScheme);`);return(0,DR.jsx)("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() {
13
+ try {
14
+ let colorScheme = '';
15
+ const mode = localStorage.getItem('${i}') || '${t}';
16
+ const dark = localStorage.getItem('${n}-dark') || '${o}';
17
+ const light = localStorage.getItem('${n}-light') || '${r}';
18
+ if (mode === 'system') {
19
+ // handle system mode
20
+ const mql = window.matchMedia('(prefers-color-scheme: dark)');
21
+ if (mql.matches) {
22
+ colorScheme = dark
23
+ } else {
24
+ colorScheme = light
25
+ }
26
+ }
27
+ if (mode === 'light') {
28
+ colorScheme = light;
29
+ }
30
+ if (mode === 'dark') {
31
+ colorScheme = dark;
32
+ }
33
+ if (colorScheme) {
34
+ ${c}
35
+ }
36
+ } catch(e){}})();`}},"mui-color-scheme-init")}var Rr=S(I(),1);function j6(){}var W6=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(r){if(typeof window>"u")return;if(!t)return r;let o;try{o=t.localStorage.getItem(e)}catch{}return o||r},set:r=>{if(t)try{t.localStorage.setItem(e,r)}catch{}},subscribe:r=>{if(!t)return j6;let o=i=>{let n=i.newValue;i.key===e&&r(n)};return t.addEventListener("storage",o),()=>{t.removeEventListener("storage",o)}}}),MR=W6;function O_(){}function AR(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function BR(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function V6(e){return BR(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function D_(e){let{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:n=od,colorSchemeStorageKey:s=id,storageWindow:a=typeof window>"u"?void 0:window,storageManager:l=MR,noSsr:c=!1}=e,u=i.join(","),p=i.length>1,f=Rr.useMemo(()=>l?.({key:n,storageWindow:a}),[l,n,a]),d=Rr.useMemo(()=>l?.({key:`${s}-light`,storageWindow:a}),[l,s,a]),h=Rr.useMemo(()=>l?.({key:`${s}-dark`,storageWindow:a}),[l,s,a]),[y,b]=Rr.useState(()=>{let O=f?.get(t)||t,A=d?.get(r)||r,B=h?.get(o)||o;return{mode:O,systemMode:AR(O),lightColorScheme:A,darkColorScheme:B}}),[m,g]=Rr.useState(c||!p);Rr.useEffect(()=>{g(!0)},[]);let v=V6(y),_=Rr.useCallback(O=>{b(A=>{if(O===A.mode)return A;let B=O??t;return f?.set(B),{...A,mode:B,systemMode:AR(B)}})},[f,t]),C=Rr.useCallback(O=>{O?typeof O=="string"?O&&!u.includes(O)?console.error(`\`${O}\` does not exist in \`theme.colorSchemes\`.`):b(A=>{let B={...A};return BR(A,D=>{D==="light"&&(d?.set(O),B.lightColorScheme=O),D==="dark"&&(h?.set(O),B.darkColorScheme=O)}),B}):b(A=>{let B={...A},D=O.light===null?r:O.light,x=O.dark===null?o:O.dark;return D&&(u.includes(D)?(B.lightColorScheme=D,d?.set(D)):console.error(`\`${D}\` does not exist in \`theme.colorSchemes\`.`)),x&&(u.includes(x)?(B.darkColorScheme=x,h?.set(x)):console.error(`\`${x}\` does not exist in \`theme.colorSchemes\`.`)),B}):b(A=>(d?.set(r),h?.set(o),{...A,lightColorScheme:r,darkColorScheme:o}))},[u,d,h,r,o]),w=Rr.useCallback(O=>{y.mode==="system"&&b(A=>{let B=O?.matches?"dark":"light";return A.systemMode===B?A:{...A,systemMode:B}})},[y.mode]),E=Rr.useRef(w);return E.current=w,Rr.useEffect(()=>{if(typeof window.matchMedia!="function"||!p)return;let O=(...B)=>E.current(...B),A=window.matchMedia("(prefers-color-scheme: dark)");return A.addListener(O),O(A),()=>{A.removeListener(O)}},[p]),Rr.useEffect(()=>{if(p){let O=f?.subscribe(D=>{(!D||["light","dark","system"].includes(D))&&_(D||t)})||O_,A=d?.subscribe(D=>{(!D||u.match(D))&&C({light:D})})||O_,B=h?.subscribe(D=>{(!D||u.match(D))&&C({dark:D})})||O_;return()=>{O(),A(),B()}}},[C,_,u,t,a,p,f,d,h]),{...y,mode:m?y.mode:void 0,systemMode:m?y.systemMode:void 0,colorScheme:m?v:void 0,setMode:_,setColorScheme:C}}var Rc=S(k(),1),q6="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Im(e){let{themeId:t,theme:r={},modeStorageKey:o=od,colorSchemeStorageKey:i=id,disableTransitionOnChange:n=!1,defaultColorScheme:s,resolveTheme:a}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=Pr.createContext(void 0),u=()=>Pr.useContext(c)||l,p={},f={};function d(m){let{children:g,theme:v,modeStorageKey:_=o,colorSchemeStorageKey:C=i,disableTransitionOnChange:w=n,storageManager:E,storageWindow:O=typeof window>"u"?void 0:window,documentNode:A=typeof document>"u"?void 0:document,colorSchemeNode:B=typeof document>"u"?void 0:document.documentElement,disableNestedContext:D=!1,disableStyleSheetGeneration:x=!1,defaultMode:R="system",forceThemeRerender:T=!1,noSsr:P}=m,M=Pr.useRef(!1),L=Rn(),N=Pr.useContext(c),Y=!!N&&!D,ee=Pr.useMemo(()=>v||(typeof r=="function"?r():r),[v]),Q=ee[t],fe=Q||ee,{colorSchemes:ve=p,components:he=f,cssVarPrefix:ae}=fe,re=Object.keys(ve).filter(st=>!!ve[st]).join(","),pe=Pr.useMemo(()=>re.split(","),[re]),te=typeof s=="string"?s:s.light,ie=typeof s=="string"?s:s.dark,Pe=ve[te]&&ve[ie]?R:ve[fe.defaultColorScheme]?.palette?.mode||fe.palette?.mode,{mode:gt,setMode:be,systemMode:oe,lightColorScheme:dt,darkColorScheme:xr,colorScheme:ft,setColorScheme:Ze}=D_({supportedColorSchemes:pe,defaultLightColorScheme:te,defaultDarkColorScheme:ie,modeStorageKey:_,colorSchemeStorageKey:C,defaultMode:Pe,storageManager:E,storageWindow:O,noSsr:P}),vt=gt,we=ft;Y&&(vt=N.mode,we=N.colorScheme);let Ir=we||fe.defaultColorScheme;fe.vars&&!T&&(Ir=fe.defaultColorScheme);let lr=Pr.useMemo(()=>{let st=fe.generateThemeVars?.()||fe.vars,Fe={...fe,components:he,colorSchemes:ve,cssVarPrefix:ae,vars:st};if(typeof Fe.generateSpacing=="function"&&(Fe.spacing=Fe.generateSpacing()),Ir){let bt=ve[Ir];bt&&typeof bt=="object"&&Object.keys(bt).forEach(Te=>{bt[Te]&&typeof bt[Te]=="object"?Fe[Te]={...Fe[Te],...bt[Te]}:Fe[Te]=bt[Te]})}return a?a(Fe):Fe},[fe,Ir,he,ve,ae]),kt=fe.colorSchemeSelector;pr(()=>{if(we&&B&&kt&&kt!=="media"){let st=kt,Fe=kt;if(st==="class"&&(Fe=".%s"),st==="data"&&(Fe="[data-%s]"),st?.startsWith("data-")&&!st.includes("%s")&&(Fe=`[${st}="%s"]`),Fe.startsWith("."))B.classList.remove(...pe.map(bt=>Fe.substring(1).replace("%s",bt))),B.classList.add(Fe.substring(1).replace("%s",we));else{let bt=Fe.replace("%s",we).match(/\[([^\]]+)\]/);if(bt){let[Te,Wr]=bt[1].split("=");Wr||pe.forEach(Ci=>{B.removeAttribute(Te.replace(we,Ci))}),B.setAttribute(Te,Wr?Wr.replace(/"|'/g,""):"")}else B.setAttribute(Fe,we)}}},[we,kt,B,pe]),Pr.useEffect(()=>{let st;if(w&&M.current&&A){let Fe=A.createElement("style");Fe.appendChild(A.createTextNode(q6)),A.head.appendChild(Fe),window.getComputedStyle(A.body),st=setTimeout(()=>{A.head.removeChild(Fe)},1)}return()=>{clearTimeout(st)}},[we,w,A]),Pr.useEffect(()=>(M.current=!0,()=>{M.current=!1}),[]);let Hi=Pr.useMemo(()=>({allColorSchemes:pe,colorScheme:we,darkColorScheme:xr,lightColorScheme:dt,mode:vt,setColorScheme:Ze,setMode:be,systemMode:oe}),[pe,we,xr,dt,vt,Ze,be,oe,lr.colorSchemeSelector]),So=!0;(x||fe.cssVariables===!1||Y&&L?.cssVarPrefix===ae)&&(So=!1);let Ti=(0,Rc.jsxs)(Pr.Fragment,{children:[(0,Rc.jsx)(wc,{themeId:Q?t:void 0,theme:lr,children:g}),So&&(0,Rc.jsx)(Da,{styles:lr.generateStyleSheets?.()||[]})]});return Y?Ti:(0,Rc.jsx)(c.Provider,{value:Hi,children:Ti})}let h=typeof s=="string"?s:s.light,y=typeof s=="string"?s:s.dark;return{CssVarsProvider:d,useColorScheme:u,getInitColorSchemeScript:m=>k_({colorSchemeStorageKey:i,defaultLightColorScheme:h,defaultDarkColorScheme:y,modeStorageKey:o,...m})}}function zm(e=""){function t(...o){if(!o.length)return"";let i=o[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...o.slice(1))})`:`, ${i}`}return(o,...i)=>`var(--${e?`${e}-`:""}${o}${t(...i)})`}var NR=(e,t,r,o=[])=>{let i=e;t.forEach((n,s)=>{s===t.length-1?Array.isArray(i)?i[Number(n)]=r:i&&typeof i=="object"&&(i[n]=r):i&&typeof i=="object"&&(i[n]||(i[n]=o.includes(n)?[]:{}),i=i[n])})},K6=(e,t,r)=>{function o(i,n=[],s=[]){Object.entries(i).forEach(([a,l])=>{(!r||r&&!r([...n,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?o(l,[...n,a],Array.isArray(l)?[...s,a]:s):t([...n,a],l,s))})}o(e)},G6=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function nd(e,t){let{prefix:r,shouldSkipGeneratingVar:o}=t||{},i={},n={},s={};return K6(e,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!o||!o(a,l))){let u=`--${r?`${r}-`:""}${a.join("-")}`,p=G6(a,l);Object.assign(i,{[u]:p}),NR(n,a,`var(${u})`,c),NR(s,a,`var(${u}, ${p})`,c)}},a=>a[0]==="vars"),{css:i,vars:n,varsWithDefaults:s}}function Y6(e,t={}){let{getSelector:r=m,disableCssColorScheme:o,colorSchemeSelector:i,enableContrastVars:n}=t,{colorSchemes:s={},components:a,defaultColorScheme:l="light",...c}=e,{vars:u,css:p,varsWithDefaults:f}=nd(c,t),d=f,h={},{[l]:y,...b}=s;if(Object.entries(b||{}).forEach(([_,C])=>{let{vars:w,css:E,varsWithDefaults:O}=nd(C,t);d=Ke(d,O),h[_]={css:E,vars:w}}),y){let{css:_,vars:C,varsWithDefaults:w}=nd(y,t);d=Ke(d,w),h[l]={css:_,vars:C}}function m(_,C){let w=i;if(i==="class"&&(w=".%s"),i==="data"&&(w="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(w=`[${i}="%s"]`),_){if(w==="media")return e.defaultColorScheme===_?":root":{[`@media (prefers-color-scheme: ${s[_]?.palette?.mode||_})`]:{":root":C}};if(w)return e.defaultColorScheme===_?`:root, ${w.replace("%s",String(_))}`:w.replace("%s",String(_))}return":root"}return{vars:d,generateThemeVars:()=>{let _={...u};return Object.entries(h).forEach(([,{vars:C}])=>{_=Ke(_,C)}),_},generateStyleSheets:()=>{let _=[],C=e.defaultColorScheme||"light";function w(A,B){Object.keys(B).length&&_.push(typeof A=="string"?{[A]:{...B}}:A)}w(r(void 0,{...p}),p);let{[C]:E,...O}=h;if(E){let{css:A}=E,B=s[C]?.palette?.mode,D=!o&&B?{colorScheme:B,...A}:{...A};w(r(C,{...D}),D)}return Object.entries(O).forEach(([A,{css:B}])=>{let D=s[A]?.palette?.mode,x=!o&&D?{colorScheme:D,...B}:{...B};w(r(A,{...x}),x)}),n&&_.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),_}}}var M_=Y6;function A_(e){return function(r){return e==="media"?`@media (prefers-color-scheme: ${r})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}var LR=S(I(),1);function V(e,t,r=void 0){let o={};for(let i in e){let n=e[i],s="",a=!0;for(let l=0;l<n.length;l+=1){let c=n[l];c&&(s+=(a===!0?"":" ")+t(c),a=!1,r&&r[c]&&(s+=" "+r[c]))}o[i]=s}return o}var IR=S(k(),1),X6=ki(),Z6=ed("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`maxWidth${Tn(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),Q6=e=>bc({props:e,name:"MuiContainer",defaultTheme:X6}),J6=(e,t)=>{let r=l=>W(t,l),{classes:o,fixed:i,disableGutters:n,maxWidth:s}=e,a={root:["root",s&&`maxWidth${Tn(String(s))}`,i&&"fixed",n&&"disableGutters"]};return V(a,r,o)};function Fm(e={}){let{createStyledComponent:t=Z6,useThemeProps:r=Q6,componentName:o="MuiContainer"}=e,i=t(({theme:s,ownerState:a})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!a.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}}),({theme:s,ownerState:a})=>a.fixed&&Object.keys(s.breakpoints.values).reduce((l,c)=>{let u=c,p=s.breakpoints.values[u];return p!==0&&(l[s.breakpoints.up(u)]={maxWidth:`${p}${s.breakpoints.unit}`}),l},{}),({theme:s,ownerState:a})=>({...a.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},...a.maxWidth&&a.maxWidth!=="xs"&&{[s.breakpoints.up(a.maxWidth)]:{maxWidth:`${s.breakpoints.values[a.maxWidth]}${s.breakpoints.unit}`}}}));return LR.forwardRef(function(a,l){let c=r(a),{className:u,component:p="div",disableGutters:f=!1,fixed:d=!1,maxWidth:h="lg",classes:y,...b}=c,m={...c,component:p,disableGutters:f,fixed:d,maxWidth:h},g=J6(m,o);return(0,IR.jsx)(i,{as:p,ownerState:m,className:H(g.root,u),ref:l,...b})})}var zR=S(I(),1);function Hm(e,t){return zR.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var Pc=S(I(),1);var FR=S(k(),1),eF=ki(),tF=ed("div",{name:"MuiStack",slot:"Root"});function rF(e){return bc({props:e,name:"MuiStack",defaultTheme:eF})}function oF(e,t){let r=Pc.Children.toArray(e).filter(Boolean);return r.reduce((o,i,n)=>(o.push(i),n<r.length-1&&o.push(Pc.cloneElement(t,{key:`separator-${n}`})),o),[])}var iF=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],nF=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...To({theme:t},wm({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o}))};if(e.spacing){let o=Aa(t),i=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),n=wm({values:e.direction,base:i}),s=wm({values:e.spacing,base:i});typeof n=="object"&&Object.keys(n).forEach((l,c,u)=>{if(!n[l]){let f=c>0?n[u[c-1]]:"column";n[l]=f}}),r=Ke(r,To({theme:t},s,(l,c)=>e.useFlexGap?{gap:Wi(o,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${iF(c?n[c]:e.direction)}`]:Wi(o,l)}}))}return r=Qw(t.breakpoints,r),r};function Um(e={}){let{createStyledComponent:t=tF,useThemeProps:r=rF,componentName:o="MuiStack"}=e,i=()=>V({root:["root"]},l=>W(o,l),{}),n=t(nF);return Pc.forwardRef(function(l,c){let u=r(l),{component:p="div",direction:f="column",spacing:d=0,divider:h,children:y,className:b,useFlexGap:m=!1,...g}=u,v={direction:f,spacing:d,useFlexGap:m},_=i();return(0,FR.jsx)(n,{as:p,ownerState:v,ref:c,className:H(_.root,b),...g,children:h?oF(y,h):y})})}function $R(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Yl.white,default:Yl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}var B_=$R();function jR(){return{text:{primary:Yl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Yl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}var $m=jR();function HR(e,t,r,o){let i=o.light||o,n=o.dark||o*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=xc(e.main,i):t==="dark"&&(e.dark=Sc(e.main,n)))}function UR(e,t,r,o,i){let n=i.light||i,s=i.dark||i*1.5;t[r]||(t.hasOwnProperty(o)?t[r]=t[o]:r==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(n*100).toFixed(0)}%)`:r==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(s*100).toFixed(0)}%)`))}function sF(e="light"){return e==="dark"?{main:Ca[200],light:Ca[50],dark:Ca[400]}:{main:Ca[700],light:Ca[400],dark:Ca[800]}}function aF(e="light"){return e==="dark"?{main:Ta[200],light:Ta[50],dark:Ta[400]}:{main:Ta[500],light:Ta[300],dark:Ta[700]}}function lF(e="light"){return e==="dark"?{main:xa[500],light:xa[300],dark:xa[700]}:{main:xa[700],light:xa[400],dark:xa[800]}}function cF(e="light"){return e==="dark"?{main:wa[400],light:wa[300],dark:wa[700]}:{main:wa[700],light:wa[500],dark:wa[900]}}function uF(e="light"){return e==="dark"?{main:Ra[400],light:Ra[300],dark:Ra[700]}:{main:Ra[800],light:Ra[500],dark:Ra[900]}}function pF(e="light"){return e==="dark"?{main:Xl[400],light:Xl[300],dark:Xl[700]}:{main:"#ed6c02",light:Xl[500],dark:Xl[900]}}function dF(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Ia(e){let{mode:t="light",contrastThreshold:r=3,tonalOffset:o=.2,colorSpace:i,...n}=e,s=e.primary||sF(t),a=e.secondary||aF(t),l=e.error||lF(t),c=e.info||cF(t),u=e.success||uF(t),p=e.warning||pF(t);function f(b){return i?dF(b):hR(b,$m.text.primary)>=r?$m.text.primary:B_.text.primary}let d=({color:b,name:m,mainShade:g=500,lightShade:v=300,darkShade:_=700})=>{if(b={...b},!b.main&&b[g]&&(b.main=b[g]),!b.hasOwnProperty("main"))throw new Error(cr(11,m?` (${m})`:"",g));if(typeof b.main!="string")throw new Error(cr(12,m?` (${m})`:"",JSON.stringify(b.main)));return i?(UR(i,b,"light",v,o),UR(i,b,"dark",_,o)):(HR(b,"light",v,o),HR(b,"dark",_,o)),b.contrastText||(b.contrastText=f(b.main)),b},h;return t==="light"?h=$R():t==="dark"&&(h=jR()),Ke({common:{...Yl},mode:t,primary:d({color:s,name:"primary"}),secondary:d({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:l,name:"error"}),warning:d({color:p,name:"warning"}),info:d({color:c,name:"info"}),success:d({color:u,name:"success"}),grey:DC,contrastThreshold:r,getContrastText:f,augmentColor:d,tonalOffset:o,...h},n)}function jm(e){let t={};return Object.entries(e).forEach(o=>{let[i,n]=o;typeof n=="object"&&(t[i]=`${n.fontStyle?`${n.fontStyle} `:""}${n.fontVariant?`${n.fontVariant} `:""}${n.fontWeight?`${n.fontWeight} `:""}${n.fontStretch?`${n.fontStretch} `:""}${n.fontSize||""}${n.lineHeight?`/${n.lineHeight} `:""}${n.fontFamily||""}`)}),t}function N_(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function fF(e){return Math.round(e*1e5)/1e5}var WR={textTransform:"uppercase"},VR='"Roboto", "Helvetica", "Arial", sans-serif';function sd(e,t){let{fontFamily:r=VR,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:n=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...p}=typeof t=="function"?t(e):t,f=o/14,d=u||(b=>`${b/l*f}rem`),h=(b,m,g,v,_)=>({fontFamily:r,fontWeight:b,fontSize:d(m),lineHeight:g,...r===VR?{letterSpacing:`${fF(v/m)}em`}:{},..._,...c}),y={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(n,48,1.167,0),h4:h(n,34,1.235,.25),h5:h(n,24,1.334,0),h6:h(s,20,1.6,.15),subtitle1:h(n,16,1.75,.15),subtitle2:h(s,14,1.57,.1),body1:h(n,16,1.5,.15),body2:h(n,14,1.43,.15),button:h(s,14,1.75,.4,WR),caption:h(n,12,1.66,.4),overline:h(n,12,2.66,1,WR),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ke({htmlFontSize:l,pxToRem:d,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:n,fontWeightMedium:s,fontWeightBold:a,...y},p,{clone:!1})}function Rt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${.2})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${.14})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${.12})`].join(",")}var hF=["none",Rt(0,2,1,-1,0,1,1,0,0,1,3,0),Rt(0,3,1,-2,0,2,2,0,0,1,5,0),Rt(0,3,3,-2,0,3,4,0,0,1,8,0),Rt(0,2,4,-1,0,4,5,0,0,1,10,0),Rt(0,3,5,-1,0,5,8,0,0,1,14,0),Rt(0,3,5,-1,0,6,10,0,0,1,18,0),Rt(0,4,5,-2,0,7,10,1,0,2,16,1),Rt(0,5,5,-3,0,8,10,1,0,3,14,2),Rt(0,5,6,-3,0,9,12,1,0,3,16,2),Rt(0,6,6,-3,0,10,14,1,0,4,18,3),Rt(0,6,7,-4,0,11,15,1,0,4,20,3),Rt(0,7,8,-4,0,12,17,2,0,5,22,4),Rt(0,7,8,-4,0,13,19,2,0,5,24,4),Rt(0,7,9,-4,0,14,21,2,0,5,26,4),Rt(0,8,9,-5,0,15,22,2,0,6,28,5),Rt(0,8,10,-5,0,16,24,2,0,6,30,5),Rt(0,8,11,-5,0,17,26,2,0,6,32,5),Rt(0,9,11,-5,0,18,28,2,0,7,34,6),Rt(0,9,12,-6,0,19,29,2,0,7,36,6),Rt(0,10,13,-6,0,20,31,3,0,8,38,7),Rt(0,10,13,-6,0,21,33,3,0,8,40,7),Rt(0,10,14,-6,0,22,35,3,0,8,42,7),Rt(0,11,14,-7,0,23,36,3,0,9,44,8),Rt(0,11,15,-7,0,24,38,3,0,9,46,8)],qR=hF;var mF={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},yF={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function KR(e){return`${Math.round(e)}ms`}function gF(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function L_(e){let t={...mF,...e.easing},r={...yF,...e.duration};return{getAutoHeightDuration:gF,create:(i=["all"],n={})=>{let{duration:s=r.standard,easing:a=t.easeInOut,delay:l=0,...c}=n;return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:KR(s)} ${a} ${typeof l=="string"?l:KR(l)}`).join(",")},...e,easing:t,duration:r}}var vF={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},GR=vF;function bF(e){return Ei(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Wm(e={}){let t={...e};function r(o){let i=Object.entries(o);for(let n=0;n<i.length;n++){let[s,a]=i[n];!bF(a)||s.startsWith("unstable_")||s.startsWith("internal_")?delete o[s]:Ei(a)&&(o[s]={...a},r(o[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
37
+
38
+ const theme = ${JSON.stringify(t,null,2)};
39
+
40
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
41
+ theme.transitions = createTransitions(theme.transitions || {});
42
+
43
+ export default theme;`}function YR(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var _F=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let r=0;for(let o=0;o<t.length;o+=1)r+=+t[o];return r};function SF(e){Object.assign(e,{alpha(t,r){let o=this||e;return o.colorSpace?`oklch(from ${t} l c h / ${typeof r=="string"?`calc(${r})`:r})`:o.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:Ss(t,_F(r))},lighten(t,r){let o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #fff ${YR(r)})`:xc(t,r)},darken(t,r){let o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${t}, #000 ${YR(r)})`:Sc(t,r)}})}function xF(e={},...t){let{breakpoints:r,mixins:o={},spacing:i,palette:n={},transitions:s={},typography:a={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(cr(22));let p=Ia({...n,colorSpace:c}),f=ki(e),d=Ke(f,{mixins:N_(f.breakpoints,o),palette:p,shadows:qR.slice(),typography:sd(p,a),transitions:L_(s),zIndex:{...GR}});return d=Ke(d,u),d=t.reduce((h,y)=>Ke(h,y),d),d.unstable_sxConfig={...wn,...u?.unstable_sxConfig},d.unstable_sx=function(y){return no({sx:y,theme:this})},d.toRuntimeSource=Wm,SF(d),d}var ad=xF;function Ec(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var TF=[...Array(25)].map((e,t)=>{if(t===0)return"none";let r=Ec(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function I_(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function z_(e){return e==="dark"?TF:[]}function F_(e){let{palette:t={mode:"light"},opacity:r,overlays:o,colorSpace:i,...n}=e,s=Ia({...t,colorSpace:i});return{palette:s,opacity:{...I_(s.mode),...r},overlays:o||z_(s.mode),...n}}function H_(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var CF=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],XR=CF;var ZR=e=>(t,r)=>{let o=e.rootSelector||":root",i=e.colorSchemeSelector,n=i;if(i==="class"&&(n=".%s"),i==="data"&&(n="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(n=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){let s={};return XR(e.cssVarPrefix).forEach(a=>{s[a]=r[a],delete r[a]}),n==="media"?{[o]:r,"@media (prefers-color-scheme: dark)":{[o]:s}}:n?{[n.replace("%s",t)]:s,[`${o}, ${n.replace("%s",t)}`]:r}:{[o]:{...r,...s}}}if(n&&n!=="media")return`${o}, ${n.replace("%s",String(t))}`}else if(t){if(n==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:r}};if(n)return n.replace("%s",String(t))}return o};function wF(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function F(e,t,r){!e[t]&&r&&(e[t]=r)}function ld(e){return typeof e!="string"||!e.startsWith("hsl")?e:w_(e)}function Pn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=_c(ld(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
44
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function RF(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}var Ki=e=>{try{return e()}catch{}},PF=(e="mui")=>zm(e);function U_(e,t,r,o,i){if(!r)return;r=r===!0?{}:r;let n=i==="dark"?"dark":"light";if(!o){t[i]=F_({...r,palette:{mode:n,...r?.palette},colorSpace:e});return}let{palette:s,...a}=ad({...o,palette:{mode:n,...r?.palette},colorSpace:e});return t[i]={...r,palette:s,opacity:{...I_(n),...r?.opacity},overlays:r?.overlays||z_(n)},a}function $_(e={},...t){let{colorSchemes:r={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:n="mui",nativeColor:s=!1,shouldSkipGeneratingVar:a=H_,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,p=Object.keys(r)[0],f=o||(r.light&&p!=="light"?"light":p),d=PF(n),{[f]:h,light:y,dark:b,...m}=r,g={...m},v=h;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(v=!0),!v)throw new Error(cr(21,f));let _;s&&(_="oklch");let C=U_(_,g,v,u,f);y&&!g.light&&U_(_,g,y,void 0,"light"),b&&!g.dark&&U_(_,g,b,void 0,"dark");let w={defaultColorScheme:f,...C,cssVarPrefix:n,colorSchemeSelector:l,rootSelector:c,getCssVar:d,colorSchemes:g,font:{...jm(C.typography),...C.font},spacing:RF(u.spacing)};Object.keys(w.colorSchemes).forEach(D=>{let x=w.colorSchemes[D].palette,R=P=>{let M=P.split("-"),L=M[1],N=M[2];return d(P,x[L][N])};x.mode==="light"&&(F(x.common,"background","#fff"),F(x.common,"onBackground","#000")),x.mode==="dark"&&(F(x.common,"background","#000"),F(x.common,"onBackground","#fff"));function T(P,M,L){if(_){let N;return P===xs&&(N=`transparent ${((1-L)*100).toFixed(0)}%`),P===Ge&&(N=`#000 ${(L*100).toFixed(0)}%`),P===Ye&&(N=`#fff ${(L*100).toFixed(0)}%`),`color-mix(in ${_}, ${M}, ${N})`}return P(M,L)}if(wF(x,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x.mode==="light"){F(x.Alert,"errorColor",T(Ge,s?d("palette-error-light"):x.error.light,.6)),F(x.Alert,"infoColor",T(Ge,s?d("palette-info-light"):x.info.light,.6)),F(x.Alert,"successColor",T(Ge,s?d("palette-success-light"):x.success.light,.6)),F(x.Alert,"warningColor",T(Ge,s?d("palette-warning-light"):x.warning.light,.6)),F(x.Alert,"errorFilledBg",R("palette-error-main")),F(x.Alert,"infoFilledBg",R("palette-info-main")),F(x.Alert,"successFilledBg",R("palette-success-main")),F(x.Alert,"warningFilledBg",R("palette-warning-main")),F(x.Alert,"errorFilledColor",Ki(()=>x.getContrastText(x.error.main))),F(x.Alert,"infoFilledColor",Ki(()=>x.getContrastText(x.info.main))),F(x.Alert,"successFilledColor",Ki(()=>x.getContrastText(x.success.main))),F(x.Alert,"warningFilledColor",Ki(()=>x.getContrastText(x.warning.main))),F(x.Alert,"errorStandardBg",T(Ye,s?d("palette-error-light"):x.error.light,.9)),F(x.Alert,"infoStandardBg",T(Ye,s?d("palette-info-light"):x.info.light,.9)),F(x.Alert,"successStandardBg",T(Ye,s?d("palette-success-light"):x.success.light,.9)),F(x.Alert,"warningStandardBg",T(Ye,s?d("palette-warning-light"):x.warning.light,.9)),F(x.Alert,"errorIconColor",R("palette-error-main")),F(x.Alert,"infoIconColor",R("palette-info-main")),F(x.Alert,"successIconColor",R("palette-success-main")),F(x.Alert,"warningIconColor",R("palette-warning-main")),F(x.AppBar,"defaultBg",R("palette-grey-100")),F(x.Avatar,"defaultBg",R("palette-grey-400")),F(x.Button,"inheritContainedBg",R("palette-grey-300")),F(x.Button,"inheritContainedHoverBg",R("palette-grey-A100")),F(x.Chip,"defaultBorder",R("palette-grey-400")),F(x.Chip,"defaultAvatarColor",R("palette-grey-700")),F(x.Chip,"defaultIconColor",R("palette-grey-700")),F(x.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),F(x.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),F(x.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),F(x.LinearProgress,"primaryBg",T(Ye,s?d("palette-primary-main"):x.primary.main,.62)),F(x.LinearProgress,"secondaryBg",T(Ye,s?d("palette-secondary-main"):x.secondary.main,.62)),F(x.LinearProgress,"errorBg",T(Ye,s?d("palette-error-main"):x.error.main,.62)),F(x.LinearProgress,"infoBg",T(Ye,s?d("palette-info-main"):x.info.main,.62)),F(x.LinearProgress,"successBg",T(Ye,s?d("palette-success-main"):x.success.main,.62)),F(x.LinearProgress,"warningBg",T(Ye,s?d("palette-warning-light"):x.warning.main,.62)),F(x.Skeleton,"bg",_?T(xs,s?d("palette-text-primary"):x.text.primary,.11):`rgba(${R("palette-text-primaryChannel")} / 0.11)`),F(x.Slider,"primaryTrack",T(Ye,s?d("palette-primary-main"):x.primary.main,.62)),F(x.Slider,"secondaryTrack",T(Ye,s?d("palette-secondary-main"):x.secondary.main,.62)),F(x.Slider,"errorTrack",T(Ye,s?d("palette-error-main"):x.error.main,.62)),F(x.Slider,"infoTrack",T(Ye,s?d("palette-info-main"):x.info.main,.62)),F(x.Slider,"successTrack",T(Ye,s?d("palette-success-main"):x.success.main,.62)),F(x.Slider,"warningTrack",T(Ye,s?d("palette-warning-main"):x.warning.main,.62));let P=_?T(Ge,s?d("palette-background-default"):x.background.default,.6825):td(x.background.default,.8);F(x.SnackbarContent,"bg",P),F(x.SnackbarContent,"color",Ki(()=>_?$m.text.primary:x.getContrastText(P))),F(x.SpeedDialAction,"fabHoverBg",td(x.background.paper,.15)),F(x.StepConnector,"border",R("palette-grey-400")),F(x.StepContent,"border",R("palette-grey-400")),F(x.Switch,"defaultColor",R("palette-common-white")),F(x.Switch,"defaultDisabledColor",R("palette-grey-100")),F(x.Switch,"primaryDisabledColor",T(Ye,s?d("palette-primary-main"):x.primary.main,.62)),F(x.Switch,"secondaryDisabledColor",T(Ye,s?d("palette-secondary-main"):x.secondary.main,.62)),F(x.Switch,"errorDisabledColor",T(Ye,s?d("palette-error-main"):x.error.main,.62)),F(x.Switch,"infoDisabledColor",T(Ye,s?d("palette-info-main"):x.info.main,.62)),F(x.Switch,"successDisabledColor",T(Ye,s?d("palette-success-main"):x.success.main,.62)),F(x.Switch,"warningDisabledColor",T(Ye,s?d("palette-warning-main"):x.warning.main,.62)),F(x.TableCell,"border",T(Ye,xs(s?d("palette-divider"):x.divider,1),.88)),F(x.Tooltip,"bg",T(xs,s?d("palette-grey-700"):x.grey[700],.92))}if(x.mode==="dark"){F(x.Alert,"errorColor",T(Ye,s?d("palette-error-light"):x.error.light,.6)),F(x.Alert,"infoColor",T(Ye,s?d("palette-info-light"):x.info.light,.6)),F(x.Alert,"successColor",T(Ye,s?d("palette-success-light"):x.success.light,.6)),F(x.Alert,"warningColor",T(Ye,s?d("palette-warning-light"):x.warning.light,.6)),F(x.Alert,"errorFilledBg",R("palette-error-dark")),F(x.Alert,"infoFilledBg",R("palette-info-dark")),F(x.Alert,"successFilledBg",R("palette-success-dark")),F(x.Alert,"warningFilledBg",R("palette-warning-dark")),F(x.Alert,"errorFilledColor",Ki(()=>x.getContrastText(x.error.dark))),F(x.Alert,"infoFilledColor",Ki(()=>x.getContrastText(x.info.dark))),F(x.Alert,"successFilledColor",Ki(()=>x.getContrastText(x.success.dark))),F(x.Alert,"warningFilledColor",Ki(()=>x.getContrastText(x.warning.dark))),F(x.Alert,"errorStandardBg",T(Ge,s?d("palette-error-light"):x.error.light,.9)),F(x.Alert,"infoStandardBg",T(Ge,s?d("palette-info-light"):x.info.light,.9)),F(x.Alert,"successStandardBg",T(Ge,s?d("palette-success-light"):x.success.light,.9)),F(x.Alert,"warningStandardBg",T(Ge,s?d("palette-warning-light"):x.warning.light,.9)),F(x.Alert,"errorIconColor",R("palette-error-main")),F(x.Alert,"infoIconColor",R("palette-info-main")),F(x.Alert,"successIconColor",R("palette-success-main")),F(x.Alert,"warningIconColor",R("palette-warning-main")),F(x.AppBar,"defaultBg",R("palette-grey-900")),F(x.AppBar,"darkBg",R("palette-background-paper")),F(x.AppBar,"darkColor",R("palette-text-primary")),F(x.Avatar,"defaultBg",R("palette-grey-600")),F(x.Button,"inheritContainedBg",R("palette-grey-800")),F(x.Button,"inheritContainedHoverBg",R("palette-grey-700")),F(x.Chip,"defaultBorder",R("palette-grey-700")),F(x.Chip,"defaultAvatarColor",R("palette-grey-300")),F(x.Chip,"defaultIconColor",R("palette-grey-300")),F(x.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),F(x.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),F(x.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),F(x.LinearProgress,"primaryBg",T(Ge,s?d("palette-primary-main"):x.primary.main,.5)),F(x.LinearProgress,"secondaryBg",T(Ge,s?d("palette-secondary-main"):x.secondary.main,.5)),F(x.LinearProgress,"errorBg",T(Ge,s?d("palette-error-main"):x.error.main,.5)),F(x.LinearProgress,"infoBg",T(Ge,s?d("palette-info-main"):x.info.main,.5)),F(x.LinearProgress,"successBg",T(Ge,s?d("palette-success-main"):x.success.main,.5)),F(x.LinearProgress,"warningBg",T(Ge,s?d("palette-warning-main"):x.warning.main,.5)),F(x.Skeleton,"bg",_?T(xs,s?d("palette-text-primary"):x.text.primary,.13):`rgba(${R("palette-text-primaryChannel")} / 0.13)`),F(x.Slider,"primaryTrack",T(Ge,s?d("palette-primary-main"):x.primary.main,.5)),F(x.Slider,"secondaryTrack",T(Ge,s?d("palette-secondary-main"):x.secondary.main,.5)),F(x.Slider,"errorTrack",T(Ge,s?d("palette-error-main"):x.error.main,.5)),F(x.Slider,"infoTrack",T(Ge,s?d("palette-info-main"):x.info.main,.5)),F(x.Slider,"successTrack",T(Ge,s?d("palette-success-main"):x.success.main,.5)),F(x.Slider,"warningTrack",T(Ge,s?d("palette-warning-light"):x.warning.main,.5));let P=_?T(Ye,s?d("palette-background-default"):x.background.default,.985):td(x.background.default,.98);F(x.SnackbarContent,"bg",P),F(x.SnackbarContent,"color",Ki(()=>_?B_.text.primary:x.getContrastText(P))),F(x.SpeedDialAction,"fabHoverBg",td(x.background.paper,.15)),F(x.StepConnector,"border",R("palette-grey-600")),F(x.StepContent,"border",R("palette-grey-600")),F(x.Switch,"defaultColor",R("palette-grey-300")),F(x.Switch,"defaultDisabledColor",R("palette-grey-600")),F(x.Switch,"primaryDisabledColor",T(Ge,s?d("palette-primary-main"):x.primary.main,.55)),F(x.Switch,"secondaryDisabledColor",T(Ge,s?d("palette-secondary-main"):x.secondary.main,.55)),F(x.Switch,"errorDisabledColor",T(Ge,s?d("palette-error-main"):x.error.main,.55)),F(x.Switch,"infoDisabledColor",T(Ge,s?d("palette-info-main"):x.info.main,.55)),F(x.Switch,"successDisabledColor",T(Ge,s?d("palette-success-main"):x.success.main,.55)),F(x.Switch,"warningDisabledColor",T(Ge,s?d("palette-warning-light"):x.warning.main,.55)),F(x.TableCell,"border",T(Ge,xs(s?d("palette-divider"):x.divider,1),.68)),F(x.Tooltip,"bg",T(xs,s?d("palette-grey-700"):x.grey[700],.92))}s||(Pn(x.background,"default"),Pn(x.background,"paper"),Pn(x.common,"background"),Pn(x.common,"onBackground"),Pn(x,"divider")),Object.keys(x).forEach(P=>{let M=x[P];P!=="tonalOffset"&&!s&&M&&typeof M=="object"&&(M.main&&F(x[P],"mainChannel",_c(ld(M.main))),M.light&&F(x[P],"lightChannel",_c(ld(M.light))),M.dark&&F(x[P],"darkChannel",_c(ld(M.dark))),M.contrastText&&F(x[P],"contrastTextChannel",_c(ld(M.contrastText))),P==="text"&&(Pn(x[P],"primary"),Pn(x[P],"secondary")),P==="action"&&(M.active&&Pn(x[P],"active"),M.selected&&Pn(x[P],"selected")))})}),w=t.reduce((D,x)=>Ke(D,x),w);let E={prefix:n,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:ZR(w),enableContrastVars:s},{vars:O,generateThemeVars:A,generateStyleSheets:B}=M_(w,E);return w.vars=O,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([D,x])=>{w[D]=x}),w.generateThemeVars=A,w.generateStyleSheets=B,w.generateSpacing=function(){return mc(u.spacing,Aa(this))},w.getColorSchemeSelector=A_(l),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...wn,...u?.unstable_sxConfig},w.unstable_sx=function(x){return no({sx:x,theme:this})},w.internal_cache={},w.toRuntimeSource=Wm,w}function QR(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ia({...r===!0?{}:r.palette,mode:t})})}function Gi(e={},...t){let{palette:r,cssVariables:o=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:n=r?.mode,...s}=e,a=n||"light",l=i?.[a],c={...i,...r?{[a]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(o===!1){if(!("colorSchemes"in e))return ad(e,...t);let u=r;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));let p=ad({...e,palette:u},...t);return p.defaultColorScheme=a,p.colorSchemes=c,p.palette.mode==="light"&&(p.colorSchemes.light={...c.light!==!0&&c.light,palette:p.palette},QR(p,"dark",c.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:p.palette},QR(p,"light",c.light)),p}return!r&&!("light"in c)&&a==="light"&&(c.light=!0),$_({...s,colorSchemes:c,defaultColorScheme:a,...typeof o!="boolean"&&o},...t)}var kF=S(I(),1);var EF=Gi(),kc=EF;function so(){let e=Vi(kc);return e[Cr]||e}function OF(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}var Vm=OF;var DF=e=>Vm(e)&&e!=="classes",Ae=DF;var MF=vc({themeId:Cr,defaultTheme:kc,rootShouldForwardProp:Ae}),z=MF;var tP=S(I(),1);var ase=S(I(),1);var JR=S(k(),1);function j_({theme:e,...t}){let r=Cr in e?e[Cr]:void 0;return(0,JR.jsx)(wc,{...t,themeId:r?Cr:void 0,theme:r||e})}var AF=S(k(),1),cd={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};var BF=S(k(),1),{CssVarsProvider:NF,useColorScheme:vse,getInitColorSchemeScript:bse}=Im({themeId:Cr,theme:()=>Gi({cssVariables:!0}),colorSchemeStorageKey:cd.colorSchemeStorageKey,modeStorageKey:cd.modeStorageKey,defaultColorScheme:{light:cd.defaultLightColorScheme,dark:cd.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:sd(e.palette,e.typography)};return t.unstable_sx=function(o){return no({sx:o,theme:this})},t}});var eP=NF;var W_=S(k(),1);function qm({theme:e,...t}){let r=tP.useMemo(()=>{if(typeof e=="function")return e;let o=Cr in e?e[Cr]:e;return"colorSchemes"in o?null:"vars"in o?e:{...e,vars:null}},[e]);return r?(0,W_.jsx)(j_,{theme:r,...t}):(0,W_.jsx)(eP,{theme:e,...t})}var K=Tn;function za(...e){return e.reduce((t,r)=>r==null?t:function(...i){t.apply(this,i),r.apply(this,i)},()=>{})}var rP=za;var Ym=S(I(),1);var Km=S(I(),1);var oP=S(k(),1);function LF(e){return(0,oP.jsx)(yc,{...e,defaultTheme:kc,themeId:Cr})}var V_=LF;var iP=S(k(),1);function ud(e){return function(r){return(0,iP.jsx)(V_,{styles:typeof e=="function"?o=>e({theme:o,...r}):e})}}var IF=Lm,X=IF;var Yse=S(I(),1);var zF=S(k(),1);function q(e){return P_(e)}function nP(e){return W("MuiSvgIcon",e)}var oae=j("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var Gm=S(k(),1),FF=e=>{let{color:t,fontSize:r,classes:o}=e,i={root:["root",t!=="inherit"&&`color${K(t)}`,`fontSize${K(r)}`]};return V(i,nP,o)},HF=z("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${K(r.color)}`],t[`fontSize${K(r.fontSize)}`]]}})(X(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),sP=Km.forwardRef(function(t,r){let o=q({props:t,name:"MuiSvgIcon"}),{children:i,className:n,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:p,viewBox:f="0 0 24 24",...d}=o,h=Km.isValidElement(i)&&i.type==="svg",y={...o,color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},b={};u||(b.viewBox=f);let m=FF(y);return(0,Gm.jsxs)(HF,{as:a,className:H(m.root,n),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...b,...d,...h&&i.props,ownerState:y,children:[h?i.props.children:i,p?(0,Gm.jsx)("title",{children:p}):null]})});sP.muiName="SvgIcon";var q_=sP;var aP=S(k(),1);function Ie(e,t){function r(o,i){return(0,aP.jsx)(q_,{"data-testid":void 0,ref:i,...o,children:e})}return r.muiName=q_.muiName,Ym.memo(Ym.forwardRef(r))}function Oc(e,t=166){let r;function o(...i){let n=()=>{e.apply(this,i)};clearTimeout(r),r=setTimeout(n,t)}return o.clear=()=>{clearTimeout(r)},o}var Dc=Oc;var Xm=Hm;function Fa(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var Yi=Fa;function dr(e){return e&&e.ownerDocument||document}var Xi=dr;function Xo(e){return dr(e).defaultView||window}var Zi=Xo;function Ha(e,t){typeof e=="function"?e(t):e&&(e.current=t)}var En=pr;var kn=Ro;var Ua=S(I(),1);function Zm(e){let{controlled:t,default:r,name:o,state:i="value"}=e,{current:n}=Ua.useRef(t!==void 0),[s,a]=Ua.useState(r),l=n?t:s,c=Ua.useCallback(u=>{n||a(u)},[]);return[l,c]}var $a=Zm;var K_=S(I(),1);function UF(e){let t=K_.useRef(e);return pr(()=>{t.current=e}),K_.useRef((...r)=>(0,t.current)(...r)).current}var Zo=UF;var Qo=Zo;var Mc=S(I(),1);function fr(...e){let t=Mc.useRef(void 0),r=Mc.useCallback(o=>{let i=e.map(n=>{if(n==null)return null;if(typeof n=="function"){let s=n,a=s(o);return typeof a=="function"?a:()=>{s(null)}}return n.current=o,()=>{n.current=null}});return()=>{i.forEach(n=>n?.())}},e);return Mc.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=r(o))},e)}var Mt=fr;function $F(e,t){let r=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&r>=65&&r<=90&&typeof t=="function"}function Ac(e,t){if(!e)return t;function r(s,a){let l={};return Object.keys(a).forEach(c=>{$F(c,a[c])&&typeof s[c]=="function"&&(l[c]=(...u)=>{s[c](...u),a[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return s=>{let a=typeof t=="function"?t(s):t,l=typeof e=="function"?e({...s,...a}):e,c=H(s?.className,a?.className,l?.className),u=r(l,a);return{...a,...l,...u,...!!c&&{className:c},...a?.style&&l?.style&&{style:{...a.style,...l.style}},...a?.sx&&l?.sx&&{sx:[...Array.isArray(a.sx)?a.sx:[a.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};let o=t,i=r(e,o),n=H(o?.className,e?.className);return{...t,...e,...i,...!!n&&{className:n},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Qm(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function Jm(e,t){return Jm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Jm(e,t)}function ey(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jm(e,t)}var dd=S(I()),fd=S(ry());var G_={disabled:!1};var dP=S(I()),Bc=dP.default.createContext(null);var fP=function(t){return t.scrollTop};var hd="unmounted",ja="exited",Wa="entering",Lc="entered",Y_="exiting",On=(function(e){ey(t,e);function t(o,i){var n;n=e.call(this,o,i)||this;var s=i,a=s&&!s.isMounting?o.enter:o.appear,l;return n.appearStatus=null,o.in?a?(l=ja,n.appearStatus=Wa):l=Lc:o.unmountOnExit||o.mountOnEnter?l=hd:l=ja,n.state={status:l},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var s=i.in;return s&&n.status===hd?{status:ja}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var n=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Wa&&s!==Lc&&(n=Wa):(s===Wa||s===Lc)&&(n=Y_)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,n,s,a;return n=s=a=i,i!=null&&typeof i!="number"&&(n=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:n,enter:s,appear:a}},r.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===Wa){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:fd.default.findDOMNode(this);s&&fP(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ja&&this.setState({status:hd})},r.performEnter=function(i){var n=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[fd.default.findDOMNode(this),a],c=l[0],u=l[1],p=this.getTimeouts(),f=a?p.appear:p.enter;if(!i&&!s||G_.disabled){this.safeSetState({status:Lc},function(){n.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Wa},function(){n.props.onEntering(c,u),n.onTransitionEnd(f,function(){n.safeSetState({status:Lc},function(){n.props.onEntered(c,u)})})})},r.performExit=function(){var i=this,n=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:fd.default.findDOMNode(this);if(!n||G_.disabled){this.safeSetState({status:ja},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Y_},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ja},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},r.setNextCallback=function(i){var n=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,n.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(i,n){this.setNextCallback(n);var s=this.props.nodeRef?this.props.nodeRef.current:fd.default.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===hd)return null;var n=this.props,s=n.children,a=n.in,l=n.mountOnEnter,c=n.unmountOnExit,u=n.appear,p=n.enter,f=n.exit,d=n.timeout,h=n.addEndListener,y=n.onEnter,b=n.onEntering,m=n.onEntered,g=n.onExit,v=n.onExiting,_=n.onExited,C=n.nodeRef,w=Qm(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return dd.default.createElement(Bc.Provider,{value:null},typeof s=="function"?s(i,w):dd.default.cloneElement(dd.default.Children.only(s),w))},t})(dd.default.Component);On.contextType=Bc;On.propTypes={};function Nc(){}On.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Nc,onEntering:Nc,onEntered:Nc,onExit:Nc,onExiting:Nc,onExited:Nc};On.UNMOUNTED=hd;On.EXITED=ja;On.ENTERING=Wa;On.ENTERED=Lc;On.EXITING=Y_;var md=On;function hP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var yd=S(I());var Jo=S(I());function oy(e,t){var r=function(n){return t&&(0,Jo.isValidElement)(n)?t(n):n},o=Object.create(null);return e&&Jo.Children.map(e,function(i){return i}).forEach(function(i){o[i.key]=r(i)}),o}function qF(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var o=Object.create(null),i=[];for(var n in e)n in t?i.length&&(o[n]=i,i=[]):i.push(n);var s,a={};for(var l in t){if(o[l])for(s=0;s<o[l].length;s++){var c=o[l][s];a[o[l][s]]=r(c)}a[l]=r(l)}for(s=0;s<i.length;s++)a[i[s]]=r(i[s]);return a}function Va(e,t,r){return r[t]!=null?r[t]:e.props[t]}function mP(e,t){return oy(e.children,function(r){return(0,Jo.cloneElement)(r,{onExited:t.bind(null,r),in:!0,appear:Va(r,"appear",e),enter:Va(r,"enter",e),exit:Va(r,"exit",e)})})}function yP(e,t,r){var o=oy(e.children),i=qF(t,o);return Object.keys(i).forEach(function(n){var s=i[n];if((0,Jo.isValidElement)(s)){var a=n in t,l=n in o,c=t[n],u=(0,Jo.isValidElement)(c)&&!c.props.in;l&&(!a||u)?i[n]=(0,Jo.cloneElement)(s,{onExited:r.bind(null,s),in:!0,exit:Va(s,"exit",e),enter:Va(s,"enter",e)}):!l&&a&&!u?i[n]=(0,Jo.cloneElement)(s,{in:!1}):l&&a&&(0,Jo.isValidElement)(c)&&(i[n]=(0,Jo.cloneElement)(s,{onExited:r.bind(null,s),in:c.props.in,exit:Va(s,"exit",e),enter:Va(s,"enter",e)}))}}),i}var KF=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},GF={component:"div",childFactory:function(t){return t}},X_=(function(e){ey(t,e);function t(o,i){var n;n=e.call(this,o,i)||this;var s=n.handleExited.bind(hP(n));return n.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},n}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,n){var s=n.children,a=n.handleExited,l=n.firstRender;return{children:l?mP(i,a):yP(i,s,a),firstRender:!1}},r.handleExited=function(i,n){var s=oy(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(n),this.mounted&&this.setState(function(a){var l=Pa({},a.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,n=i.component,s=i.childFactory,a=Qm(i,["component","childFactory"]),l=this.state.contextValue,c=KF(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,n===null?yd.default.createElement(Bc.Provider,{value:l},c):yd.default.createElement(Bc.Provider,{value:l},yd.default.createElement(n,a,c))},t})(yd.default.Component);X_.propTypes={};X_.defaultProps=GF;var Z_=X_;var vP=S(I(),1),gP={};function Ic(e,t){let r=vP.useRef(gP);return r.current===gP&&(r.current=e(t)),r}var bP=S(I(),1),YF=[];function Q_(e){bP.useEffect(e,YF)}var J_=class e{constructor(){ze(this,"currentId",null);ze(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});ze(this,"disposeEffect",()=>this.clear)}static create(){return new e}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}};function zc(){let e=Ic(J_.create).current;return Q_(e.disposeEffect),e}var iy=e=>e.scrollTop;function ao(e,t){return r=>{if(t){let o=e.current;r===void 0?t(o):t(o,r)}}}function ny(e,t,r,o,i,n){let s=e==="exited"&&!t?o:r[e]||r.exited;return i||n?{...s,...i,...n}:s}function Fc(e,t){let{timeout:r,easing:o,style:i={}}=e;return{duration:i.transitionDuration??(typeof r=="number"?r:r[t.mode]||0),easing:i.transitionTimingFunction??(typeof o=="object"?o[t.mode]:o),delay:i.transitionDelay}}function XF(e){return typeof e=="string"}var Cs=XF;function ZF(e,t,r){return e===void 0||Cs(e)?t:{...t,ownerState:{...t.ownerState,...r}}}var gd=ZF;function QF(e,t,r){return typeof e=="function"?e(t,r):e}var vd=QF;function JF(e,t=[]){if(e===void 0)return{};let r={};return Object.keys(e).filter(o=>o.match(/^on[A-Z]/)&&typeof e[o]=="function"&&!t.includes(o)).forEach(o=>{r[o]=e[o]}),r}var bd=JF;function eH(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}var sy=eH;function tH(e){let{getSlotProps:t,additionalProps:r,externalSlotProps:o,externalForwardedProps:i,className:n}=e;if(!t){let d=H(r?.className,n,i?.className,o?.className),h={...r?.style,...i?.style,...o?.style},y={...r,...i,...o};return d.length>0&&(y.className=d),Object.keys(h).length>0&&(y.style=h),{props:y,internalRef:void 0}}let s=bd({...i,...o}),a=sy(o),l=sy(i),c=t(s),u=H(c?.className,r?.className,n,i?.className,o?.className),p={...c?.style,...r?.style,...i?.style,...o?.style},f={...c,...r,...l,...a};return u.length>0&&(f.className=u),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:c.ref}}var _d=tH;function ne(e,t){let{className:r,elementType:o,ownerState:i,externalForwardedProps:n,internalForwardedProps:s,shouldForwardComponentProp:a=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:p={[e]:void 0},...f}=n,d=u[e]||o,h=vd(p[e],i),{props:{component:y,...b},internalRef:m}=_d({className:r,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:h}),g=fr(m,h?.ref,t.ref),v=e==="root"?y||c:y,_=gd(d,{...e==="root"&&!c&&!u[e]&&s,...e!=="root"&&!u[e]&&s,...b,...v&&!a&&{as:v},...v&&a&&{component:v},ref:g},i);return[d,_]}var SP=S(I(),1);function _P(e){return W("MuiPaper",e)}var Oce=j("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var xP=S(k(),1),rH=e=>{let{square:t,elevation:r,variant:o,classes:i}=e,n={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return V(n,_P,i)},oH=z("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(X(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),iH=SP.forwardRef(function(t,r){let o=q({props:t,name:"MuiPaper"}),i=so(),{className:n,component:s="div",elevation:a=1,square:l=!1,variant:c="elevation",...u}=o,p={...o,component:s,elevation:a,square:l,variant:c},f=rH(p);return(0,xP.jsx)(oH,{as:s,ownerState:p,className:H(f.root,n),ref:r,...u,style:{...c==="elevation"&&{"--Paper-shadow":(i.vars||i).shadows[a],...i.vars&&{"--Paper-overlay":i.vars.overlays?.[a]},...!i.vars&&i.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Ss("#fff",Ec(a))}, ${Ss("#fff",Ec(a))})`}},...u.style}})}),Wt=iH;var Ps=S(I(),1);function ws(e){try{return e.matches(":focus-visible")}catch{}return!1}var Rs=S(I(),1);var TP=S(I(),1);function e0(e){let{focusableWhenDisabled:t,disabled:r,composite:o=!1,tabIndex:i=0,isNativeButton:n}=e,s=o&&t!==!1,a=o&&t===!1;return TP.useMemo(()=>{let c={onKeyDown(u){r&&t&&u.key!=="Tab"&&u.preventDefault()}};return o||(c.tabIndex=i,!n&&r&&(c.tabIndex=t?i:-1)),(n&&(t||s)||!n&&r)&&(c["aria-disabled"]=r),n&&(!t||a)&&(c.disabled=r),c},[o,r,t,s,a,n,i])}var nH={};function t0(e){let{nativeButton:t,nativeButtonProp:r,internalNativeButton:o=t,allowInferredHostMismatch:i=!1,disabled:n,type:s,hasFormAction:a=!1,tabIndex:l=0,focusableWhenDisabled:c,stopEventPropagation:u=!1,onBeforeKeyDown:p,onBeforeKeyUp:f}=e,d=Rs.useRef(null),h=c===!0,y=e0({focusableWhenDisabled:h,disabled:n,isNativeButton:t,tabIndex:l}),b=Rs.useCallback(()=>{let v=d.current;return v==null?t:v.tagName==="BUTTON"?!0:!!(v.tagName==="A"&&v.href)},[t]),m=Rs.useMemo(()=>{let v=h?{}:{tabIndex:n?-1:l};return t?(v.type=s===void 0&&!a?"button":s,h||(v.disabled=n)):(v.role="button",!h&&n&&(v["aria-disabled"]=n)),h?{...v,...y}:v},[n,h,y,a,t,l,s]);return{getButtonProps:Rs.useCallback((v=nH)=>{let{onClick:_,onKeyDown:C,onKeyUp:w,...E}=v;return{...m,...E,onClick:D=>{if(u&&D.stopPropagation(),n){D.preventDefault();return}_?.(D)},onKeyDown:D=>{if(h&&y.onKeyDown(D),!n&&(p?.(D),C?.(D),!(D.target!==D.currentTarget||b()))){if(D.key===" "){D.preventDefault();return}D.key==="Enter"&&(D.preventDefault(),D.currentTarget.click())}},onKeyUp:D=>{n||(f?.(D),w?.(D),D.target===D.currentTarget&&!b()&&D.key===" "&&!D.defaultPrevented&&D.currentTarget.click())}}},[m,n,h,y,b,p,f,u]),rootRef:d}}var ay=S(I(),1);var r0=class e{constructor(){ze(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new e}static use(){let t=Ic(e.create).current,[r,o]=ay.useState(!1);return t.shouldMount=r,t.setShouldMount=o,ay.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=sH(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}};function ly(){return r0.use()}function sH(){let e,t,r=new Promise((o,i)=>{e=o,t=i});return r.resolve=e,r.reject=t,r}var rr=S(I(),1);var cy=S(I(),1);var o0=S(k(),1);function aH(e){let{className:t,classes:r,pulsate:o=!1,rippleX:i,rippleY:n,rippleSize:s,in:a,onExited:l,timeout:c}=e,[u,p]=cy.useState(!1),f=H(t,r.ripple,r.rippleVisible,o&&r.ripplePulsate),d={width:s,height:s,top:-(s/2)+n,left:-(s/2)+i},h=H(r.child,u&&r.childLeaving,o&&r.childPulsate);return!a&&!u&&p(!0),cy.useEffect(()=>{if(!a&&l!=null){let y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,a,c]),(0,o0.jsx)("span",{className:f,style:d,children:(0,o0.jsx)("span",{className:h})})}var CP=aH;var lH=j("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Po=lH;var uy=S(k(),1),i0=550,cH=80,uH=$i`
45
+ 0% {
46
+ transform: scale(0);
47
+ opacity: 0.1;
48
+ }
49
+
50
+ 100% {
51
+ transform: scale(1);
52
+ opacity: 0.3;
53
+ }
54
+ `,pH=$i`
55
+ 0% {
56
+ opacity: 1;
57
+ }
58
+
59
+ 100% {
60
+ opacity: 0;
61
+ }
62
+ `,dH=$i`
63
+ 0% {
64
+ transform: scale(1);
65
+ }
66
+
67
+ 50% {
68
+ transform: scale(0.92);
69
+ }
70
+
71
+ 100% {
72
+ transform: scale(1);
73
+ }
74
+ `,fH=z("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),hH=z(CP,{name:"MuiTouchRipple",slot:"Ripple"})`
75
+ opacity: 0;
76
+ position: absolute;
77
+
78
+ &.${Po.rippleVisible} {
79
+ opacity: 0.3;
80
+ transform: scale(1);
81
+ animation-name: ${uH};
82
+ animation-duration: ${i0}ms;
83
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
84
+ }
85
+
86
+ &.${Po.ripplePulsate} {
87
+ animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
88
+ }
89
+
90
+ & .${Po.child} {
91
+ opacity: 1;
92
+ display: block;
93
+ width: 100%;
94
+ height: 100%;
95
+ border-radius: 50%;
96
+ background-color: currentColor;
97
+ }
98
+
99
+ & .${Po.childLeaving} {
100
+ opacity: 0;
101
+ animation-name: ${pH};
102
+ animation-duration: ${i0}ms;
103
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
104
+ }
105
+
106
+ & .${Po.childPulsate} {
107
+ position: absolute;
108
+ /* @noflip */
109
+ left: 0px;
110
+ top: 0;
111
+ animation-name: ${dH};
112
+ animation-duration: 2500ms;
113
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
114
+ animation-iteration-count: infinite;
115
+ animation-delay: 200ms;
116
+ }
117
+ `,mH=rr.forwardRef(function(t,r){let o=q({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:n={},className:s,...a}=o,[l,c]=rr.useState([]),u=rr.useRef(0),p=rr.useRef(null);rr.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);let f=rr.useRef(!1),d=zc(),h=rr.useRef(null),y=rr.useRef(null),b=rr.useCallback(_=>{let{pulsate:C,rippleX:w,rippleY:E,rippleSize:O,cb:A}=_;c(B=>[...B,(0,uy.jsx)(hH,{classes:{ripple:H(n.ripple,Po.ripple),rippleVisible:H(n.rippleVisible,Po.rippleVisible),ripplePulsate:H(n.ripplePulsate,Po.ripplePulsate),child:H(n.child,Po.child),childLeaving:H(n.childLeaving,Po.childLeaving),childPulsate:H(n.childPulsate,Po.childPulsate)},timeout:i0,pulsate:C,rippleX:w,rippleY:E,rippleSize:O},u.current)]),u.current+=1,p.current=A},[n]),m=rr.useCallback((_={},C={},w=()=>{})=>{let{pulsate:E=!1,center:O=i||C.pulsate,fakeElement:A=!1}=C;if(_?.type==="mousedown"&&f.current){f.current=!1;return}_?.type==="touchstart"&&(f.current=!0);let B=A?null:y.current,D=B?B.getBoundingClientRect():{width:0,height:0,left:0,top:0},x,R,T;if(O||_===void 0||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)x=Math.round(D.width/2),R=Math.round(D.height/2);else{let{clientX:P,clientY:M}=_.touches&&_.touches.length>0?_.touches[0]:_;x=Math.round(P-D.left),R=Math.round(M-D.top)}if(O)T=Math.sqrt((2*D.width**2+D.height**2)/3),T%2===0&&(T+=1);else{let P=Math.max(Math.abs((B?B.clientWidth:0)-x),x)*2+2,M=Math.max(Math.abs((B?B.clientHeight:0)-R),R)*2+2;T=Math.sqrt(P**2+M**2)}_?.touches?h.current===null&&(h.current=()=>{b({pulsate:E,rippleX:x,rippleY:R,rippleSize:T,cb:w})},d.start(cH,()=>{h.current&&(h.current(),h.current=null)})):b({pulsate:E,rippleX:x,rippleY:R,rippleSize:T,cb:w})},[i,b,d]),g=rr.useCallback(()=>{m({},{pulsate:!0})},[m]),v=rr.useCallback((_,C)=>{if(d.clear(),_?.type==="touchend"&&h.current){h.current(),h.current=null,d.start(0,()=>{v(_,C)});return}h.current=null,c(w=>w.length>0?w.slice(1):w),p.current=C},[d]);return rr.useImperativeHandle(r,()=>({pulsate:g,start:m,stop:v}),[g,m,v]),(0,uy.jsx)(fH,{className:H(Po.root,n.root,s),ref:y,...a,children:(0,uy.jsx)(Z_,{component:null,exit:!0,children:l})})}),wP=mH;function RP(e){return W("MuiButtonBase",e)}var yH=j("MuiButtonBase",["root","disabled","focusVisible"]),PP=yH;var py=S(k(),1),gH=e=>{let{disabled:t,focusVisible:r,focusVisibleClassName:o,suppressFocusVisible:i,classes:n}=e,a=V({root:["root",t&&"disabled",r&&!i&&"focusVisible"]},RP,n);return r&&!i&&o&&(a.root+=` ${o}`),a},vH=z("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${PP.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),bH=Ps.forwardRef(function(t,r){let o=q({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:n=!1,children:s,className:a,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:p=!1,focusRipple:f=!1,focusVisibleClassName:d,focusableWhenDisabled:h,suppressFocusVisible:y=!1,internalNativeButton:b,LinkComponent:m="a",nativeButton:g,onBlur:v,onClick:_,onContextMenu:C,onDragLeave:w,onFocus:E,onFocusVisible:O,onKeyDown:A,onKeyUp:B,onMouseDown:D,onMouseLeave:x,onMouseUp:R,onTouchEnd:T,onTouchMove:P,onTouchStart:M,tabIndex:L=0,TouchRippleProps:N,touchRippleRef:Y,type:ee,...Q}=o,fe=!!(Q.href||Q.to),ve=!!Q.formAction,he=l;he==="button"&&fe&&(he=m);let ae=typeof he=="string"?he==="button":b??!1,re=g??ae,pe=ly(),te=Mt(pe.ref,Y),[ie,Pe]=Ps.useState(!1);(c||y)&&ie&&Pe(!1);let gt=Qo(ht=>{f&&!ht.repeat&&ie&&ht.key===" "&&pe.stop(ht,()=>{pe.start(ht)})}),be=Qo(ht=>{f&&ht.key===" "&&ie&&!ht.defaultPrevented&&pe.stop(ht,()=>{pe.pulsate(ht)})}),{getButtonProps:oe,rootRef:dt}=t0({nativeButton:re,nativeButtonProp:g,internalNativeButton:ae,allowInferredHostMismatch:fe||typeof he=="string",disabled:c,type:ee,hasFormAction:ve,tabIndex:L,onBeforeKeyDown:gt,onBeforeKeyUp:be}),{onClick:xr,onKeyDown:ft,onKeyUp:Ze,...vt}=oe({onClick:_,onKeyDown:A,onKeyUp:B});Ps.useImperativeHandle(i,()=>({focusVisible:()=>{Pe(!0),dt.current.focus()}}),[dt]);let we=pe.shouldMount&&!u&&!c;Ps.useEffect(()=>{ie&&f&&!u&&pe.pulsate()},[u,f,ie,pe]);let Ir=Dn(pe,"start",D,p),lr=Dn(pe,"stop",C,p),kt=Dn(pe,"stop",w,p),Hi=Dn(pe,"stop",R,p),So=Dn(pe,"stop",ht=>{ie&&ht.preventDefault(),x&&x(ht)},p),Ti=Dn(pe,"start",M,p),st=Dn(pe,"stop",T,p),Fe=Dn(pe,"stop",P,p),bt=Dn(pe,"stop",ht=>{ws(ht.target)||Pe(!1),v&&v(ht)},!1),Te=Qo(ht=>{dt.current||(dt.current=ht.currentTarget),!y&&ws(ht.target)&&(Pe(!0),O&&O(ht)),E&&E(ht)}),Wr={};fe&&(Wr.tabIndex=c?-1:L,c&&(Wr["aria-disabled"]=c),Wr.type=ee);let Ci=Mt(r,dt),ms={...o,centerRipple:n,component:l,disabled:c,disableRipple:u,disableTouchRipple:p,focusRipple:f,suppressFocusVisible:y,tabIndex:L,focusVisible:ie},ba=gH(ms);return(0,py.jsxs)(vH,{as:he,className:H(ba.root,a),ownerState:ms,onBlur:bt,onClick:xr,onContextMenu:lr,onFocus:Te,onKeyDown:ft,onKeyUp:Ze,onMouseDown:Ir,onMouseLeave:So,onMouseUp:Hi,onDragLeave:kt,onTouchEnd:st,onTouchMove:Fe,onTouchStart:Ti,ref:Ci,...fe?Wr:vt,...Q,children:[s,we?(0,py.jsx)(wP,{ref:te,center:n,...N}):null]})});function Dn(e,t,r,o=!1){return Qo(i=>(r&&r(i),o||e[t](i),!0))}var At=bH;function _H(e){return typeof e.main=="string"}function SH(e,t=[]){if(!_H(e))return!1;for(let r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Be(e=[]){return([,t])=>t&&SH(t,e)}var dy=S(I(),1);var kP=S(I(),1);function EP(e){return W("MuiCircularProgress",e)}var Iue=j("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDisableShrink"]);var Hc=S(k(),1),Oi=44,n0=$i`
118
+ 0% {
119
+ transform: rotate(0deg);
120
+ }
121
+
122
+ 100% {
123
+ transform: rotate(360deg);
124
+ }
125
+ `,s0=$i`
126
+ 0% {
127
+ stroke-dasharray: 1px, 200px;
128
+ stroke-dashoffset: 0;
129
+ }
130
+
131
+ 50% {
132
+ stroke-dasharray: 100px, 200px;
133
+ stroke-dashoffset: -15px;
134
+ }
135
+
136
+ 100% {
137
+ stroke-dasharray: 1px, 200px;
138
+ stroke-dashoffset: -126px;
139
+ }
140
+ `,xH=typeof n0!="string"?Oa`
141
+ animation: ${n0} 1.4s linear infinite;
142
+ `:null,TH=typeof s0!="string"?Oa`
143
+ animation: ${s0} 1.4s ease-in-out infinite;
144
+ `:null,CH=e=>{let{classes:t,variant:r,color:o,disableShrink:i}=e,n={root:["root",r,`color${K(o)}`],svg:["svg"],track:["track"],circle:["circle",i&&"circleDisableShrink"]};return V(n,EP,t)},wH=z("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`color${K(r.color)}`]]}})(X(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:xH||{animation:`${n0} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),RH=z("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),PH=z("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.circle,r.disableShrink&&t.circleDisableShrink]}})(X(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:TH||{animation:`${s0} 1.4s ease-in-out infinite`}}]}))),EH=z("circle",{name:"MuiCircularProgress",slot:"Track"})(X(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),kH=kP.forwardRef(function(t,r){let o=q({props:t,name:"MuiCircularProgress"}),{className:i,color:n="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:c,thickness:u=3.6,value:p=0,variant:f="indeterminate",...d}=o,h={...o,color:n,disableShrink:s,size:l,thickness:u,value:p,variant:f,enableTrackSlot:a},y=CH(h),b={},m={},g={};if(f==="determinate"){let v=2*Math.PI*((Oi-u)/2);b.strokeDasharray=v.toFixed(3),g["aria-valuenow"]=Math.round(p),b.strokeDashoffset=`${((100-p)/100*v).toFixed(3)}px`,m.transform="rotate(-90deg)"}return(0,Hc.jsx)(wH,{className:H(y.root,i),style:{width:l,height:l,...m,...c},ownerState:h,ref:r,role:"progressbar",...g,...d,children:(0,Hc.jsxs)(RH,{className:y.svg,ownerState:h,viewBox:`${Oi/2} ${Oi/2} ${Oi} ${Oi}`,children:[a?(0,Hc.jsx)(EH,{className:y.track,ownerState:h,cx:Oi,cy:Oi,r:(Oi-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,(0,Hc.jsx)(PH,{className:y.circle,style:b,ownerState:h,cx:Oi,cy:Oi,r:(Oi-u)/2,fill:"none",strokeWidth:u})]})})}),Sd=kH;function OP(e){return W("MuiIconButton",e)}var OH=j("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),a0=OH;var Uc=S(k(),1),DH=e=>{let{classes:t,disabled:r,color:o,edge:i,size:n,loading:s}=e,a={root:["root",s&&"loading",r&&"disabled",o!=="default"&&`color${K(o)}`,i&&`edge${K(i)}`,`size${K(n)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return V(a,OP,t)},MH=z(At,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${K(r.color)}`],r.edge&&t[`edge${K(r.edge)}`],t[`size${K(r.size)}`]]}})(X(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),X(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${a0.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${a0.loading}`]:{color:"transparent"}}))),AH=z("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),BH=dy.forwardRef(function(t,r){let o=q({props:t,name:"MuiIconButton"}),{edge:i=!1,children:n,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:p,loading:f=null,loadingIndicator:d,...h}=o,y=kn(p),b=d??(0,Uc.jsx)(Sd,{"aria-labelledby":y,color:"inherit",size:16}),m={...o,edge:i,color:a,disabled:l,disableFocusRipple:c,loading:f,loadingIndicator:b,size:u},g=DH(m);return(0,Uc.jsxs)(MH,{id:f?y:p,className:H(g.root,s),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:l||f,ref:r,...h,ownerState:m,children:[typeof f=="boolean"&&(0,Uc.jsx)("span",{className:g.loadingWrapper,style:{display:"contents"},children:(0,Uc.jsx)(AH,{className:g.loadingIndicator,ownerState:m,children:f&&b})}),n]})}),qa=BH;var AP=S(I(),1);function DP(e){return W("MuiTypography",e)}var NH=j("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom"]),fy=NH;var BP=S(k(),1),LH=e=>{let{align:t,gutterBottom:r,noWrap:o,variant:i,classes:n}=e,s={root:["root",i,e.align!=="inherit"&&`align${K(t)}`,r&&"gutterBottom",o&&"noWrap"]};return V(s,DP,n)},IH=z("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${K(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom]}})(X(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,r])=>t!=="inherit"&&r&&typeof r=="object").map(([t,r])=>({props:{variant:t},style:r})),...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${K(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}}]}))),MP={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},zH=AP.forwardRef(function(t,r){let o=q({props:t,name:"MuiTypography"}),{color:i,align:n="inherit",className:s,component:a,gutterBottom:l=!1,noWrap:c=!1,variant:u="body1",variantMapping:p=MP,...f}=o,d={...o,align:n,color:i,className:s,component:a,gutterBottom:l,noWrap:c,variant:u,variantMapping:p},h=a||p[u]||MP[u]||"span",y=LH(d);return(0,BP.jsx)(IH,{as:h,ref:r,className:H(y.root,s),...f,ownerState:d,style:{...n!=="inherit"&&{"--Typography-textAlign":n},...f.style}})}),Z=zH;var IP=S(I(),1);function NP(e){return W("MuiAppBar",e)}var Ape=j("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var zP=S(k(),1),FH=e=>{let{color:t,position:r,classes:o}=e,i={root:["root",`color${K(t)}`,`position${K(r)}`]};return V(i,NP,o)},LP=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,HH=z(Wt,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`position${K(r.position)}`],t[`color${K(r.color)}`]]}})(X(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Be(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?LP(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?LP(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),UH=IP.forwardRef(function(t,r){let o=q({props:t,name:"MuiAppBar"}),{className:i,color:n="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=o,c={...o,color:n,position:a,enableColorOnDark:s},u=FH(c);return(0,zP.jsx)(HH,{square:!0,component:"header",ownerState:c,elevation:4,className:H(u.root,i,a==="fixed"&&"mui-fixed"),ref:r,...l})}),l0=UH;function $H(e){let{elementType:t,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1,...n}=e,s=i?{}:vd(r,o),{props:a,internalRef:l}=_d({...n,externalSlotProps:s}),c=fr(l,s?.ref,e.additionalProps?.ref);return gd(t,{...a,ref:c},o)}var Mn=$H;var An=S(I(),1),HP=S(ry(),1);var FP=S(I(),1);function ei(e){return parseInt(FP.version,10)>=19?e?.props?.ref||null:e?.ref||null}function jH(e){return typeof e=="function"?e():e}var WH=An.forwardRef(function(t,r){let{children:o,container:i,disablePortal:n=!1}=t,[s,a]=An.useState(null),l=fr(An.isValidElement(o)?ei(o):null,r);return pr(()=>{n||a(jH(i)||document.body)},[i,n]),pr(()=>{if(s&&!n)return Ha(r,s),()=>{Ha(r,null)}},[r,s,n]),n?An.isValidElement(o)?An.cloneElement(o,{ref:l}):o:s&&HP.createPortal(o,s)}),c0=WH;var Eo=S(I(),1);var UP=S(k(),1),$P=Ie((0,UP.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function jP(e){return W("MuiChip",e)}var VH=j("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","deletable","outlined","filled","avatar","icon","label","deleteIcon","focusVisible"]),We=VH;var xd=S(k(),1),qH=e=>{let{classes:t,disabled:r,size:o,color:i,onDelete:n,clickable:s,variant:a}=e,l={root:["root",a,r&&"disabled",`size${K(o)}`,`color${K(i)}`,s&&"clickable",n&&"deletable"],label:["label"],avatar:["avatar"],icon:["icon"],deleteIcon:["deleteIcon"]};return V(l,jP,t)},KH=z("div",{name:"MuiChip",slot:"Root",shouldForwardProp:e=>Ae(e)&&e!=="focusableWhenDisabled"&&e!=="skipFocusWhenDisabled",overridesResolver:(e,t)=>{let{ownerState:r}=e,{color:o,clickable:i,onDelete:n,size:s,variant:a}=r;return[{[`& .${We.avatar}`]:t.avatar},{[`& .${We.icon}`]:t.icon},{[`& .${We.deleteIcon}`]:t.deleteIcon},t.root,t[`size${K(s)}`],t[`color${K(o)}`],i&&t.clickable,n&&t.deletable,t[a]]}})(X(({theme:e})=>{let t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${We.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${We.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${We.icon}`]:{marginLeft:5,marginRight:-6},[`& .${We.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:"primary"},style:{[`& .${We.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:"secondary"},style:{[`& .${We.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:"small"},style:{height:24,[`& .${We.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${We.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${We.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Be(["contrastText"])).map(([r])=>({props:{color:r},style:{backgroundColor:(e.vars||e).palette[r].main,color:(e.vars||e).palette[r].contrastText,[`& .${We.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[r].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[r].contrastText}}}})),{props:r=>r.iconColor===r.color,style:{[`& .${We.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:r=>r.iconColor===r.color&&r.color!=="default",style:{[`& .${We.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${We.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Be(["dark"])).map(([r])=>({props:{color:r,onDelete:!0},style:{[`&.${We.focusVisible}`]:{background:(e.vars||e).palette[r].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${We.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Be(["dark"])).map(([r])=>({props:{color:r,clickable:!0},style:{[`&:hover, &.${We.focusVisible}`]:{backgroundColor:(e.vars||e).palette[r].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${We.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${We.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${We.avatar}`]:{marginLeft:4},[`& .${We.icon}`]:{marginLeft:4},[`& .${We.deleteIcon}`]:{marginRight:5}}},{props:{size:"small",variant:"outlined"},style:{[`& .${We.avatar}`]:{marginLeft:2},[`& .${We.icon}`]:{marginLeft:2},[`& .${We.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Be()).map(([r])=>({props:{variant:"outlined",color:r},style:{color:(e.vars||e).palette[r].main,border:`1px solid ${e.alpha((e.vars||e).palette[r].main,.7)}`,[`&.${We.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${We.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.focusOpacity)},[`& .${We.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[r].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[r].main}}}}))]}})),GH=z("span",{name:"MuiChip",slot:"Label"})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function WP(e){return e.key==="Backspace"||e.key==="Delete"}var YH=Eo.forwardRef(function(t,r){let o=q({props:t,name:"MuiChip"}),{avatar:i,className:n,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:p,label:f,onClick:d,onDelete:h,onKeyDown:y,onKeyUp:b,size:m="medium",variant:g="filled",tabIndex:v,skipFocusWhenDisabled:_=!1,slots:C={},slotProps:w={},...E}=o,{nativeButton:O,...A}=E,B=Eo.useRef(null),D=Mt(B,r),x=te=>{te.stopPropagation(),h(te)},R=te=>{te.currentTarget===te.target&&WP(te)&&te.preventDefault(),y&&y(te)},T=te=>{te.currentTarget===te.target&&h&&WP(te)&&h(te),b&&b(te)},P=s!==!1&&d?!0:s,M=P||h?At:l||"div",L={...o,component:M,disabled:u,size:m,color:a,iconColor:Eo.isValidElement(p)&&p.props.color||a,onDelete:!!h,clickable:P,variant:g},N=qH(L),Y=M===At?{component:l||"div",internalNativeButton:!1,focusVisibleClassName:N.focusVisible,...h&&{disableRipple:!0},...O!==void 0&&{nativeButton:O}}:{},ee=null;h&&(ee=c&&Eo.isValidElement(c)?Eo.cloneElement(c,{className:H(c.props.className,N.deleteIcon),onClick:x}):(0,xd.jsx)($P,{className:N.deleteIcon,onClick:x}));let Q=null;i&&Eo.isValidElement(i)&&(Q=Eo.cloneElement(i,{className:H(N.avatar,i.props.className)}));let fe=null;p&&Eo.isValidElement(p)&&(fe=Eo.cloneElement(p,{className:H(N.icon,p.props.className)}));let ve={slots:C,slotProps:w},[he,ae]=ne("root",{elementType:KH,externalForwardedProps:{...ve,...A},ownerState:L,shouldForwardComponentProp:!0,ref:D,className:H(N.root,n),additionalProps:{disabled:P&&u?!0:void 0,tabIndex:_&&u?-1:v,...Y},getSlotProps:te=>({...te,onClick:ie=>{te.onClick?.(ie),d?.(ie)},onKeyDown:ie=>{te.onKeyDown?.(ie),R(ie)},onKeyUp:ie=>{te.onKeyUp?.(ie),T(ie)}})}),[re,pe]=ne("label",{elementType:GH,externalForwardedProps:ve,ownerState:L,className:N.label});return(0,xd.jsxs)(he,{as:M,...ae,children:[Q||fe,(0,xd.jsx)(re,{...pe,children:f}),ee]})}),Qi=YH;var zr=S(I(),1);var ko=S(I(),1);var Td=S(k(),1);function hy(e){return parseInt(e,10)||0}var XH={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function ZH(e){for(let t in e)return!1;return!0}function VP(e){return ZH(e)||e.outerHeightStyle===0&&!e.overflowing}var QH=ko.forwardRef(function(t,r){let{onChange:o,maxRows:i,minRows:n=1,style:s,value:a,...l}=t,{current:c}=ko.useRef(a!=null),u=ko.useRef(null),p=fr(r,u),f=ko.useRef(null),d=ko.useRef(null),h=ko.useCallback(()=>{let v=u.current,_=d.current;if(!v||!_)return;let w=Xo(v).getComputedStyle(v);if(w.width==="0px")return{outerHeightStyle:0,overflowing:!1};_.style.width=w.width,_.value=v.value||t.placeholder||"x",_.value.slice(-1)===`
145
+ `&&(_.value+=" ");let E=w.boxSizing,O=hy(w.paddingBottom)+hy(w.paddingTop),A=hy(w.borderBottomWidth)+hy(w.borderTopWidth),B=_.scrollHeight;_.value="x";let D=_.scrollHeight,x=B;n&&(x=Math.max(Number(n)*D,x)),i&&(x=Math.min(Number(i)*D,x)),x=Math.max(x,D);let R=x+(E==="border-box"?O+A:0),T=Math.abs(x-B)<=1;return{outerHeightStyle:R,overflowing:T}},[i,n,t.placeholder]),y=Zo(()=>{let v=u.current,_=h();if(!v||!_||VP(_))return!1;let C=_.outerHeightStyle;return f.current!=null&&f.current!==C}),b=ko.useCallback(()=>{let v=u.current,_=h();if(!v||!_||VP(_))return;let C=_.outerHeightStyle;f.current!==C&&(f.current=C,v.style.height=`${C}px`),v.style.overflow=_.overflowing?"hidden":""},[h]),m=ko.useRef(-1);return pr(()=>{let v=Oc(b),_=u?.current;if(!_)return;let C=Xo(_);C.addEventListener("resize",v);let w;return typeof ResizeObserver<"u"&&(w=new ResizeObserver(()=>{y()&&(w.unobserve(_),cancelAnimationFrame(m.current),b(),m.current=requestAnimationFrame(()=>{w.observe(_)}))}),w.observe(_)),()=>{v.clear(),cancelAnimationFrame(m.current),C.removeEventListener("resize",v),w&&w.disconnect()}},[h,b,y]),pr(()=>{b()}),(0,Td.jsxs)(ko.Fragment,{children:[(0,Td.jsx)("textarea",{value:a,onChange:v=>{c||b();let _=v.target,C=_.value.length,w=_.value.endsWith(`
146
+ `),E=_.selectionStart===C;w&&E&&_.setSelectionRange(C,C),o&&o(v)},ref:p,rows:n,style:s,...l}),(0,Td.jsx)("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:d,tabIndex:-1,style:{...XH.shadow,...s,paddingTop:0,paddingBottom:0}})]})}),u0=QH;function Er({props:e,states:t,muiFormControl:r}){return t.reduce((o,i)=>(o[i]=e[i],r&&typeof e[i]>"u"&&(o[i]=r[i]),o),{})}var qP=S(I(),1),JH=qP.createContext(void 0),$c=JH;var KP=S(I(),1);function Lt(){return KP.useContext($c)}function GP(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ka(e,t=!1){return e&&(GP(e.value)&&e.value!==""||t&&GP(e.defaultValue)&&e.defaultValue!=="")}function YP(e){return e.startAdornment}function XP(e){return W("MuiInputBase",e)}var eU=j("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputTypeSearch"]),Di=eU;var Ga=S(k(),1),ZP,Ya=(e,t)=>{let{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${K(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},Xa=(e,t)=>{let{ownerState:r}=e;return[t.input,r.type==="search"&&t.inputTypeSearch]},tU=e=>{let{classes:t,color:r,disabled:o,error:i,endAdornment:n,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:p,size:f,startAdornment:d,type:h}=e,y={root:["root",`color${K(r)}`,o&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",f&&f!=="medium"&&`size${K(f)}`,u&&"multiline",d&&"adornedStart",n&&"adornedEnd",c&&"hiddenLabel",p&&"readOnly"],input:["input",o&&"disabled",h==="search"&&"inputTypeSearch",p&&"readOnly"]};return V(y,XP,t)},Za=z("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ya})(X(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Di.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:r})=>t.multiline&&r==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Qa=z("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Xa})(X(({theme:e})=>{let t=e.palette.mode==="light",r={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Di.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Di.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:n})=>!n.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:n})=>n.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),QP=ud({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),rU=zr.forwardRef(function(t,r){let o=q({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:n,autoFocus:s,className:a,color:l,defaultValue:c,disabled:u,disableInjectingGlobalStyles:p,endAdornment:f,error:d,fullWidth:h=!1,id:y,inputComponent:b="input",inputProps:m={},inputRef:g,margin:v,maxRows:_,minRows:C,multiline:w=!1,name:E,onBlur:O,onChange:A,onClick:B,onFocus:D,onKeyDown:x,onKeyUp:R,placeholder:T,readOnly:P,renderSuffix:M,rows:L,size:N,slotProps:Y={},slots:ee={},startAdornment:Q,type:fe="text",value:ve,...he}=o,ae=m.value!=null?m.value:ve,{current:re}=zr.useRef(ae!=null),pe=zr.useRef(),te=zr.useCallback(Te=>{},[]),ie=Mt(pe,g,m.ref,te),[Pe,gt]=zr.useState(!1),be=Lt(),oe=Er({props:o,muiFormControl:be,states:["color","disabled","error","hiddenLabel","size","required","filled"]});oe.focused=be?be.focused:Pe,zr.useEffect(()=>{!be&&u&&Pe&&(gt(!1),O&&O())},[be,u,Pe,O]);let dt=be&&be.onFilled,xr=be&&be.onEmpty,ft=zr.useCallback(Te=>{Ka(Te)?dt&&dt():xr&&xr()},[dt,xr]);En(()=>{re&&ft({value:ae})},[ae,ft,re]);let Ze=Te=>{D&&D(Te),m.onFocus&&m.onFocus(Te),be&&be.onFocus?be.onFocus(Te):gt(!0)},vt=Te=>{O&&O(Te),m.onBlur&&m.onBlur(Te),be&&be.onBlur?be.onBlur(Te):gt(!1)},we=(Te,...Wr)=>{if(!re){let Ci=Te.target||pe.current;if(Ci==null)throw new Error(cr(1));ft({value:Ci.value})}m.onChange&&m.onChange(Te,...Wr),A&&A(Te,...Wr)};zr.useEffect(()=>{ft(pe.current)},[]);let Ir=Te=>{pe.current&&Te.currentTarget===Te.target&&pe.current.focus(),B&&B(Te)},lr=b,kt=m;w&&lr==="input"&&(L?kt={type:void 0,minRows:L,maxRows:L,...kt}:kt={type:void 0,maxRows:_,minRows:C,...kt},lr=u0);let Hi=Te=>{ft(Te.animationName==="mui-auto-fill-cancel"?pe.current:{value:"x"})};zr.useEffect(()=>{be&&be.setAdornedStart(!!Q)},[be,Q]);let So={...o,color:oe.color||"primary",disabled:oe.disabled,endAdornment:f,error:oe.error,focused:oe.focused,formControl:be,fullWidth:h,hiddenLabel:oe.hiddenLabel,multiline:w,size:oe.size,startAdornment:Q,type:fe},Ti=tU(So),st=ee.root||Za,Fe=Y.root||{},bt=ee.input||Qa;return kt={...kt,...Y.input},(0,Ga.jsxs)(zr.Fragment,{children:[!p&&typeof QP=="function"&&(ZP||(ZP=(0,Ga.jsx)(QP,{}))),(0,Ga.jsxs)(st,{...Fe,ref:r,onClick:Ir,...he,...!Cs(st)&&{ownerState:{...So,...Fe.ownerState}},className:H(Ti.root,Fe.className,a,P&&"MuiInputBase-readOnly"),children:[Q,(0,Ga.jsx)($c.Provider,{value:null,children:(0,Ga.jsx)(bt,{"aria-invalid":oe.error,"aria-describedby":i,autoComplete:n,autoFocus:s,defaultValue:c,disabled:oe.disabled,id:y,onAnimationStart:Hi,name:E,placeholder:T,readOnly:P,required:oe.required,rows:L,value:ae,onKeyDown:x,onKeyUp:R,type:fe,...kt,...!Cs(bt)&&{as:lr,ownerState:{...So,...kt.ownerState}},ref:ie,className:H(Ti.input,kt.className,P&&"MuiInputBase-readOnly"),onBlur:vt,onChange:we,onFocus:Ze})}),f,M?M({...oe,startAdornment:Q}):null]})]})}),Ja=rU;function JP(e){return W("MuiInput",e)}var oU={...Di,...j("MuiInput",["root","underline","input"])},jc=oU;function eE(e){return W("MuiOutlinedInput",e)}var iU={...Di,...j("MuiOutlinedInput",["root","notchedOutline","input"])},Mi=iU;function tE(e){return W("MuiFilledInput",e)}var nU={...Di,...j("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Es=nU;var rE=S(k(),1),oE=Ie((0,rE.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var sE=S(I(),1);var Wc=S(I(),1);var iE=S(k(),1),sU={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},aU={opacity:0,visibility:"hidden"},lU=Wc.forwardRef(function(t,r){let o=so(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:n,appear:s=!0,children:a,easing:l,in:c,onEnter:u,onEntered:p,onEntering:f,onExit:d,onExited:h,onExiting:y,style:b,timeout:m=i,...g}=t,v=Wc.useRef(null),_=Mt(v,ei(a),r),C=ao(v,f),w=ao(v,(x,R)=>{iy(x);let T=Fc({style:b,timeout:m,easing:l},{mode:"enter"});x.style.transition=o.transitions.create("opacity",T),u&&u(x,R)}),E=ao(v,p),O=ao(v,y),A=ao(v,x=>{let R=Fc({style:b,timeout:m,easing:l},{mode:"exit"});x.style.transition=o.transitions.create("opacity",R),d&&d(x)}),B=ao(v,x=>{x.style.transition="",h&&h(x)});return(0,iE.jsx)(md,{appear:s,in:c,nodeRef:v,onEnter:w,onEntered:E,onEntering:C,onExit:A,onExited:B,onExiting:O,addEndListener:x=>{n&&n(v.current,x)},timeout:m,...g,children:(x,{ownerState:R,...T})=>{let P=ny(x,c,sU,aU,b,a.props.style);return Wc.cloneElement(a,{style:P,ref:_,...T})}})}),Cd=lU;function nE(e){return W("MuiBackdrop",e)}var Hfe=j("MuiBackdrop",["root","invisible"]);var p0=S(k(),1),cU=e=>{let{classes:t,invisible:r}=e;return V({root:["root",r&&"invisible"]},nE,t)},uU=z("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),pU=sE.forwardRef(function(t,r){let o=q({props:t,name:"MuiBackdrop"}),{children:i,className:n,component:s="div",invisible:a=!1,open:l,slotProps:c={},slots:u={},transitionDuration:p,...f}=o,d={...o,component:s,invisible:a},h=cU(d),y={component:s,slots:u,slotProps:c},[b,m]=ne("root",{elementType:uU,externalForwardedProps:y,className:H(h.root,n),ownerState:d}),[g,v]=ne("transition",{elementType:Cd,externalForwardedProps:y,ownerState:d});return(0,p0.jsx)(g,{in:l,timeout:p,...f,...v,children:(0,p0.jsx)(b,{...m,ref:r,children:i})})}),wd=pU;var dU=j("MuiBox",["root"]),aE=dU;var fU=Gi(),hU=Qp({themeId:Cr,defaultTheme:fU,defaultClassName:aE.root,generateClassName:gc.generate}),me=hU;var Rd=S(I(),1);function lE(e){return W("MuiButton",e)}var mU=j("MuiButton",["root","text","outlined","contained","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),ks=mU;var cE=S(I(),1),yU=cE.createContext({}),uE=yU;var pE=S(I(),1),gU=pE.createContext(void 0),dE=gU;var Ji=S(k(),1),vU=e=>{let{color:t,disableElevation:r,fullWidth:o,size:i,variant:n,loading:s,loadingPosition:a,classes:l}=e,c={root:["root",s&&"loading",n,`size${K(i)}`,`color${K(t)}`,r&&"disableElevation",o&&"fullWidth",s&&`loadingPosition${K(a)}`],startIcon:["icon","startIcon"],endIcon:["icon","endIcon"],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=V(c,lE,l);return{...l,...u}},hE=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],bU=z(At,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${K(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(X(({theme:e})=>{let t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],r=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${ks.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${ks.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ks.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${ks.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Be()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ks.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ks.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${ks.loading}`]:{color:"transparent"}}}]}})),_U=z("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...hE]})),SU=z("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...hE]})),xU=z("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),fE=z("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),TU=Rd.forwardRef(function(t,r){let o=Rd.useContext(uE),i=Rd.useContext(dE),n=qi(o,t),s=q({props:n,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:p=!1,disableElevation:f=!1,disableFocusRipple:d=!1,endIcon:h,focusVisibleClassName:y,fullWidth:b=!1,id:m,loading:g=null,loadingIndicator:v,loadingPosition:_="center",size:C="medium",startIcon:w,type:E,variant:O="text",...A}=s,B=kn(m),D=v??(0,Ji.jsx)(Sd,{"aria-labelledby":B,color:"inherit",size:16}),x={...s,color:l,component:c,disabled:p,disableElevation:f,disableFocusRipple:d,fullWidth:b,loading:g,loadingIndicator:D,loadingPosition:_,size:C,type:E,variant:O},R=vU(x),T=(w||g&&_==="start")&&(0,Ji.jsx)(_U,{className:R.startIcon,ownerState:x,children:w||(0,Ji.jsx)(fE,{className:R.loadingIconPlaceholder,ownerState:x})}),P=(h||g&&_==="end")&&(0,Ji.jsx)(SU,{className:R.endIcon,ownerState:x,children:h||(0,Ji.jsx)(fE,{className:R.loadingIconPlaceholder,ownerState:x})}),M=i||"",L=typeof g=="boolean"?(0,Ji.jsx)("span",{className:R.loadingWrapper,style:{display:"contents"},children:g&&(0,Ji.jsx)(xU,{className:R.loadingIndicator,ownerState:x,children:D})}):null;return(0,Ji.jsxs)(bU,{ownerState:x,className:H(o.className,R.root,u,M),component:c,disabled:p||g,focusRipple:!d,focusVisibleClassName:H(R.focusVisible,y),ref:r,internalNativeButton:!0,type:E,id:g?B:m,...A,classes:R,children:[T,_!=="end"&&L,a,_==="end"&&L,P]})}),Ee=TU;var Pd=S(I(),1);var yE=S(I(),1);function mE(e){return W("PrivateSwitchBase",e)}var zhe=j("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var my=S(k(),1),CU=e=>{let{classes:t,checked:r,disabled:o,edge:i}=e,n={root:["root",r&&"checked",o&&"disabled",i&&`edge${K(i)}`],input:["input"]};return V(n,mE,t)},wU=z(At,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),RU=z("input",{name:"MuiSwitchBase",shouldForwardProp:Ae})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),PU=yE.forwardRef(function(t,r){let{autoFocus:o,checked:i,checkedIcon:n,defaultChecked:s,disabled:a,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:p,name:f,onBlur:d,onChange:h,onFocus:y,readOnly:b,required:m=!1,tabIndex:g,type:v,value:_,slots:C={},slotProps:w={},...E}=t,{nativeButton:O,...A}=E,[B,D]=$a({controlled:i,default:!!s,name:"SwitchBase",state:"checked"}),x=Lt(),R=ae=>{y&&y(ae),x&&x.onFocus&&x.onFocus(ae)},T=ae=>{d&&d(ae),x&&x.onBlur&&x.onBlur(ae)},P=ae=>{if(ae.nativeEvent.defaultPrevented||b)return;let re=ae.target.checked;D(re),h&&h(ae,re)},M=a;x&&typeof M>"u"&&(M=x.disabled);let L=v==="checkbox"||v==="radio",N={...t,checked:B,disabled:M,disableFocusRipple:l,edge:c},Y=CU(N),ee={slots:C,slotProps:w},[Q,fe]=ne("root",{ref:r,elementType:wU,className:Y.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ee,component:"span",...A},getSlotProps:ae=>({...ae,onFocus:re=>{ae.onFocus?.(re),R(re)},onBlur:re=>{ae.onBlur?.(re),T(re)}}),ownerState:N,additionalProps:{centerRipple:!0,focusRipple:!l,role:void 0,tabIndex:null}}),[ve,he]=ne("input",{elementType:RU,className:Y.input,externalForwardedProps:ee,getSlotProps:ae=>({...ae,onChange:re=>{ae.onChange?.(re),P(re)}}),ownerState:N,additionalProps:{autoFocus:o,checked:i,defaultChecked:s,disabled:M,id:L?p:void 0,name:f,readOnly:b,required:m,tabIndex:g,type:v,...v==="checkbox"&&_===void 0?{}:{value:_}}});return(0,my.jsxs)(Q,{...fe,children:[(0,my.jsx)(ve,{...he}),B?n:u]})}),Vc=PU;var gE=S(k(),1),vE=Ie((0,gE.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");var bE=S(k(),1),_E=Ie((0,bE.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");var SE=S(k(),1),xE=Ie((0,SE.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function TE(e){return W("MuiCheckbox",e)}var EU=j("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),yy=EU;var Ed=S(k(),1),kU=e=>{let{classes:t,indeterminate:r,color:o,size:i}=e,n={root:["root",r&&"indeterminate",`color${K(o)}`,`size${K(i)}`]},s=V(n,TE,t);return{...t,...s}},OU=z(Vc,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${K(r.size)}`],r.color!=="default"&&t[`color${K(r.color)}`]]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{[`&.${yy.checked}, &.${yy.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${yy.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),DU=(0,Ed.jsx)(_E,{}),MU=(0,Ed.jsx)(vE,{}),AU=(0,Ed.jsx)(xE,{}),BU=Pd.forwardRef(function(t,r){let o=q({props:t,name:"MuiCheckbox"}),{checkedIcon:i=DU,color:n="primary",icon:s=MU,indeterminate:a=!1,indeterminateIcon:l=AU,size:c="medium",disableRipple:u=!1,className:p,slots:f={},slotProps:d={},...h}=o,y=a?l:s,b=a?l:i,m={...o,disableRipple:u,color:n,indeterminate:a,size:c},g=kU(m),v=d.input,[_,C]=ne("root",{ref:r,elementType:OU,className:H(g.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:d,...h},ownerState:m,additionalProps:{type:"checkbox",icon:Pd.cloneElement(y,{fontSize:y.props.fontSize??c}),checkedIcon:Pd.cloneElement(b,{fontSize:b.props.fontSize??c}),disableRipple:u,slots:f,slotProps:{input:Ac(typeof v=="function"?v(m):v,{"data-indeterminate":a})}}});return(0,Ed.jsx)(_,{...C,classes:g})}),d0=BU;var NU=Fm({createStyledComponent:z("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`maxWidth${K(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>q({props:e,name:"MuiContainer"})}),f0=NU;var CE=S(I(),1);var kd=S(k(),1),h0=typeof ud({})=="function",LU=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),IU=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),wE=(e,t=!1)=>{let r={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([n,s])=>{let a=e.getColorSchemeSelector(n);a.startsWith("@")?r[a]={":root":{colorScheme:s.palette?.mode}}:r[a.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let o={html:LU(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...IU(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r},i=e.components?.MuiCssBaseline?.styleOverrides;return i&&(o=[o,i]),o},gy="mui-ecs",zU=e=>{let t=wE(e,!1),r=Array.isArray(t)?t[0]:t;return!e.vars&&r&&(r.html[`:root:has(${gy})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([o,i])=>{let n=e.getColorSchemeSelector(o);n.startsWith("@")?r[n]={[`:root:not(:has(.${gy}))`]:{colorScheme:i.palette?.mode}}:r[n.replace(/\s*&/,"")]={[`&:not(:has(.${gy}))`]:{colorScheme:i.palette?.mode}}}),t},FU=ud(h0?({theme:e,enableColorScheme:t})=>wE(e,t):({theme:e})=>zU(e));function HU(e){let t=q({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:o=!1}=t;return(0,kd.jsxs)(CE.Fragment,{children:[h0&&(0,kd.jsx)(FU,{enableColorScheme:o}),!h0&&!o&&(0,kd.jsx)("span",{className:gy,style:{display:"none"}}),r]})}var vy=HU;var Xc=S(I(),1);function qc(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function UU(e){let t=dr(e);return t.body===e?Xo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Kc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function RE(e){return parseFloat(Xo(e).getComputedStyle(e).paddingRight)||0}function $U(e){let r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function PE(e,t,r,o,i){let n=[t,r,...o];[].forEach.call(e.children,s=>{let a=!n.includes(s),l=!$U(s);a&&l&&Kc(s,i)})}function m0(e,t){let r=-1;return e.some((o,i)=>t(o)?(r=i,!0):!1),r}function jU(e,t){let r=[],o=e.container;if(!t.disableScrollLock){if(UU(o)){let s=qc(Xo(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${RE(o)+s}px`;let a=dr(o).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${RE(l)+s}px`})}let n;if(o.parentNode instanceof DocumentFragment)n=dr(o).body;else{let s=o.parentElement,a=Xo(o);n=s?.nodeName==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:o}r.push({value:n.style.overflow,property:"overflow",el:n},{value:n.style.overflowX,property:"overflow-x",el:n},{value:n.style.overflowY,property:"overflow-y",el:n}),n.style.overflow="hidden"}return()=>{r.forEach(({value:n,el:s,property:a})=>{n?s.style.setProperty(a,n):s.style.removeProperty(a)})}}function WU(e){let t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}var by=class{constructor(){this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&Kc(t.modalRef,!1);let i=WU(r);PE(r,t.mount,t.modalRef,i,!0);let n=m0(this.containers,s=>s.container===r);return n!==-1?(this.containers[n].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:i}),o)}mount(t,r){let o=m0(this.containers,n=>n.modals.includes(t)),i=this.containers[o];i.restore||(i.restore=jU(i,r))}remove(t,r=!0){let o=this.modals.indexOf(t);if(o===-1)return o;let i=m0(this.containers,s=>s.modals.includes(t)),n=this.containers[i];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(o,1),n.modals.length===0)n.restore&&n.restore(),t.modalRef&&Kc(t.modalRef,r),PE(n.container,t.mount,t.modalRef,n.hiddenSiblings,!1),this.containers.splice(i,1);else{let s=n.modals[n.modals.length-1];s.modalRef&&Kc(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}};var Sy=S(I(),1);var kr=S(I(),1);var Od=S(k(),1),VU=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function qU(e){let t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function KU(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;let t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`),r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function GU(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||KU(e))}function YU(e){let t=[],r=[];return Array.from(e.querySelectorAll(VU)).forEach((o,i)=>{let n=qU(o);n===-1||!GU(o)||(n===0?t.push(o):r.push({documentOrder:i,tabIndex:n,node:o}))}),r.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function XU(){return!0}function ZU(e){let{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:n=YU,isEnabled:s=XU,open:a}=e,l=kr.useRef(!1),c=kr.useRef(null),u=kr.useRef(null),p=kr.useRef(null),f=kr.useRef(null),d=kr.useRef(!1),h=kr.useRef(null),y=fr(ei(t),h),b=kr.useRef(null);kr.useEffect(()=>{!a||!h.current||(d.current=!r)},[r,a]),kr.useEffect(()=>{if(!a||!h.current)return;let v=dr(h.current),_=Yi(v);return h.current.contains(_)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),d.current&&h.current.focus()),()=>{i||(p.current&&p.current.focus&&(l.current=!0,p.current.focus()),p.current=null)}},[a]),kr.useEffect(()=>{if(!a||!h.current)return;let v=dr(h.current),_=E=>{if(b.current=E,o||!s()||E.key!=="Tab")return;Yi(v)===h.current&&E.shiftKey&&(l.current=!0,u.current&&u.current.focus())},C=()=>{let E=h.current;if(E===null)return;let O=Yi(v);if(!v.hasFocus()||!s()||l.current){l.current=!1;return}if(E.contains(O)||o&&O!==c.current&&O!==u.current)return;if(O!==f.current)f.current=null;else if(f.current!==null)return;if(!d.current)return;let A=[];if((O===c.current||O===u.current)&&(A=n(h.current)),A.length>0){let B=!!(b.current?.shiftKey&&b.current?.key==="Tab"),D=A[0],x=A[A.length-1];typeof D!="string"&&typeof x!="string"&&(B?x.focus():D.focus())}else E.focus()};v.addEventListener("focusin",C),v.addEventListener("keydown",_,!0);let w=setInterval(()=>{let E=Yi(v);E&&E.tagName==="BODY"&&C()},50);return()=>{clearInterval(w),v.removeEventListener("focusin",C),v.removeEventListener("keydown",_,!0)}},[r,o,i,s,a,n]);let m=v=>{p.current===null&&(p.current=v.relatedTarget),d.current=!0,f.current=v.target;let _=t.props.onFocus;_&&_(v)},g=v=>{p.current===null&&(p.current=v.relatedTarget),d.current=!0};return(0,Od.jsxs)(kr.Fragment,{children:[(0,Od.jsx)("div",{tabIndex:a?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),kr.cloneElement(t,{ref:y,onFocus:m}),(0,Od.jsx)("div",{tabIndex:a?0:-1,onFocus:g,ref:u,"data-testid":"sentinelEnd"})]})}var y0=ZU;var Ai=S(I(),1);function QU(e){return typeof e=="function"?e():e}function JU(e){return e?e.props.hasOwnProperty("in"):!1}var EE=()=>{},_y=new by;function e8(e){let{container:t,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:n,children:s,onClose:a,open:l,rootRef:c}=e,u=Ai.useRef({}),p=Ai.useRef(null),f=Ai.useRef(null),d=fr(f,c),[h,y]=Ai.useState(!l),b=JU(s),m=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(m=!1);let g=()=>dr(p.current),v=()=>(u.current.modalRef=f.current,u.current.mount=p.current,u.current),_=()=>{_y.mount(v(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},C=Zo(()=>{let T=QU(t)||g().body;_y.add(v(),T),f.current&&_()}),w=()=>_y.isTopModal(v()),E=Zo(T=>{p.current=T,T&&(l&&w()?_():f.current&&Kc(f.current,m))}),O=Ai.useCallback(()=>{_y.remove(v(),m)},[m]);Ai.useEffect(()=>()=>{O()},[O]),Ai.useEffect(()=>{l?C():(!b||!o)&&O()},[l,O,b,o,C]);let A=T=>P=>{T.onKeyDown?.(P),!(P.key!=="Escape"||P.which===229||!w())&&(P.stopPropagation(),a&&a(P,"escapeKeyDown"))},B=T=>P=>{T.onClick?.(P),P.target===P.currentTarget&&a&&a(P,"backdropClick")};return{getRootProps:(T={})=>{let P=bd(e);delete P.onTransitionEnter,delete P.onTransitionExited;let M={...P,...T};return{role:"presentation",...M,onKeyDown:A(M),ref:d}},getBackdropProps:(T={})=>{let P=T;return{"aria-hidden":!0,...P,onClick:B(P),open:l}},getTransitionProps:()=>{let T=()=>{y(!1),i&&i()},P=()=>{y(!0),n&&n(),o&&O()};return{onEnter:za(T,s?.props.onEnter??EE),onExited:za(P,s?.props.onExited??EE)}},rootRef:d,portalRef:E,isTopModal:w,exited:h,hasTransition:b}}var kE=e8;function OE(e){return W("MuiModal",e)}var sye=j("MuiModal",["root","hidden","backdrop"]);var Gc=S(k(),1),t8=e=>{let{open:t,exited:r,classes:o}=e;return V({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},OE,o)},r8=z("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(X(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),o8=z(wd,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),i8=Sy.forwardRef(function(t,r){let o=q({name:"MuiModal",props:t}),{classes:i,className:n,closeAfterTransition:s=!1,children:a,container:l,component:c,disableAutoFocus:u=!1,disableEnforceFocus:p=!1,disablePortal:f=!1,disableRestoreFocus:d=!1,disableScrollLock:h=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:m,onTransitionEnter:g,onTransitionExited:v,open:_,slotProps:C={},slots:w={},theme:E,...O}=o,A={...o,closeAfterTransition:s,disableAutoFocus:u,disableEnforceFocus:p,disablePortal:f,disableRestoreFocus:d,disableScrollLock:h,hideBackdrop:y,keepMounted:b},{getRootProps:B,getBackdropProps:D,getTransitionProps:x,portalRef:R,isTopModal:T,exited:P,hasTransition:M}=kE({...A,rootRef:r}),L={...A,exited:P},N=t8(L),Y={};if(a.props.tabIndex===void 0&&(Y.tabIndex="-1"),M){let{onEnter:ae,onExited:re}=x();Y.onEnter=ae,Y.onExited=re}let ee={slots:w,slotProps:C},[Q,fe]=ne("root",{ref:r,elementType:r8,externalForwardedProps:{...ee,...O,component:c},getSlotProps:B,ownerState:L,className:H(n,N?.root,!L.open&&L.exited&&N?.hidden)}),[ve,he]=ne("backdrop",{elementType:o8,externalForwardedProps:ee,shouldForwardComponentProp:!0,getSlotProps:ae=>D({...ae,onClick:re=>{ae?.onClick&&ae.onClick(re)}}),className:N?.backdrop,ownerState:L});return!b&&!_&&(!M||P)?null:(0,Gc.jsx)(c0,{ref:R,container:l,disablePortal:f,children:(0,Gc.jsxs)(Q,{...fe,children:[y?null:(0,Gc.jsx)(ve,{...he}),(0,Gc.jsx)(y0,{disableEnforceFocus:p,disableAutoFocus:u,disableRestoreFocus:d,isEnabled:T,open:_,children:Sy.cloneElement(a,Y)})]})})}),Dd=i8;function DE(e){return W("MuiDialog",e)}var wye=j("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var ME=S(I(),1),n8=ME.createContext({}),xy=n8;var Yc=S(k(),1),s8=z(wd,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),a8=e=>{let{classes:t,scroll:r,maxWidth:o,fullWidth:i,fullScreen:n}=e,s={root:["root"],backdrop:["backdrop"],container:["container",`scroll${K(r)}`],paper:["paper",`paperWidth${K(String(o))}`,i&&"paperFullWidth",n&&"paperFullScreen"]};return V(s,DE,t)},l8=z(Dd,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),c8=z("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.container,t[`scroll${K(r.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),u8=z(Wt,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.paper,t[`paperWidth${K(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(X(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:"xs",scroll:"body"},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t,scroll:"body"},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0}},{props:({ownerState:t})=>t.fullScreen&&t.scroll==="body",style:{margin:0,maxWidth:"100%"}}]}))),p8=Xc.forwardRef(function(t,r){let o=q({props:t,name:"MuiDialog"}),i=so(),n={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,children:c,className:u,fullScreen:p=!1,fullWidth:f=!1,maxWidth:d="sm",onClick:h,onClose:y,open:b,PaperComponent:m=Wt,role:g="dialog",scroll:v="paper",slots:_={},slotProps:C={},transitionDuration:w=n,...E}=o,O={...o,fullScreen:p,fullWidth:f,maxWidth:d,scroll:v},A=a8(O),B=Xc.useRef(),D=re=>{B.current=re.target===re.currentTarget},x=re=>{h&&h(re),B.current&&(B.current=null,y&&y(re,"backdropClick"))},R=Ro(a),T=Xc.useMemo(()=>({titleId:R}),[R]),P={slots:_,slotProps:C},[M,L]=ne("root",{elementType:l8,shouldForwardComponentProp:!0,externalForwardedProps:P,ownerState:O,className:H(A.root,u),ref:r}),[N,Y]=ne("backdrop",{elementType:s8,shouldForwardComponentProp:!0,externalForwardedProps:P,ownerState:O,className:A.backdrop}),[ee,Q]=ne("paper",{elementType:u8,shouldForwardComponentProp:!0,externalForwardedProps:P,ownerState:O,className:A.paper}),[fe,ve]=ne("container",{elementType:c8,externalForwardedProps:P,ownerState:O,className:A.container}),[he,ae]=ne("transition",{elementType:Cd,externalForwardedProps:P,ownerState:O,additionalProps:{appear:!0,in:b,timeout:w,role:"presentation"}});return(0,Yc.jsx)(M,{closeAfterTransition:!0,slots:{backdrop:N},slotProps:{backdrop:{transitionDuration:w,...Y}},onClose:y,open:b,onClick:x,...L,...E,children:(0,Yc.jsx)(he,{...ae,children:(0,Yc.jsx)(fe,{onMouseDown:D,...ve,children:(0,Yc.jsx)(ee,{as:m,elevation:24,role:g,"aria-describedby":s,"aria-labelledby":R,"aria-modal":l,...Q,children:(0,Yc.jsx)(xy.Provider,{value:T,children:c})})})})})}),Zc=p8;var BE=S(I(),1);function AE(e){return W("MuiDialogActions",e)}var Gye=j("MuiDialogActions",["root","spacing"]);var NE=S(k(),1),d8=e=>{let{classes:t,disableSpacing:r}=e;return V({root:["root",!r&&"spacing"]},AE,t)},f8=z("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),h8=BE.forwardRef(function(t,r){let o=q({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:n=!1,...s}=o,a={...o,disableSpacing:n},l=d8(a);return(0,NE.jsx)(f8,{className:H(l.root,i),ownerState:a,ref:r,...s})}),Qc=h8;var FE=S(I(),1);function LE(e){return W("MuiDialogContent",e)}var age=j("MuiDialogContent",["root","dividers"]);function IE(e){return W("MuiDialogTitle",e)}var m8=j("MuiDialogTitle",["root"]),zE=m8;var HE=S(k(),1),y8=e=>{let{classes:t,dividers:r}=e;return V({root:["root",r&&"dividers"]},LE,t)},g8=z("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(X(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${zE.root} + &`]:{paddingTop:0}}}]}))),v8=FE.forwardRef(function(t,r){let o=q({props:t,name:"MuiDialogContent"}),{className:i,dividers:n=!1,...s}=o,a={...o,dividers:n},l=y8(a);return(0,HE.jsx)(g8,{className:H(l.root,i),ownerState:a,ref:r,...s})}),Jc=v8;var $E=S(I(),1);function UE(e){return W("MuiDialogContentText",e)}var wge=j("MuiDialogContentText",["root"]);var jE=S(k(),1),b8=e=>{let{classes:t}=e,o=V({root:["root"]},UE,t);return{...t,...o}},_8=z(Z,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),S8=$E.forwardRef(function(t,r){let o=q({props:t,name:"MuiDialogContentText"}),{children:i,className:n,...s}=o,a=b8(s);return(0,jE.jsx)(_8,{component:"p",variant:"body1",color:"textSecondary",ref:r,ownerState:s,className:H(a.root,n),...o,classes:a})}),Ty=S8;var Cy=S(I(),1);var WE=S(k(),1),x8=e=>{let{classes:t}=e;return V({root:["root"]},IE,t)},T8=z(Z,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),C8=Cy.forwardRef(function(t,r){let o=q({props:t,name:"MuiDialogTitle"}),{className:i,id:n,...s}=o,a=o,l=x8(a),{titleId:c=n}=Cy.useContext(xy);return(0,WE.jsx)(T8,{component:"h2",className:H(l.root,i),ownerState:a,ref:r,variant:"h6",id:n??c,...s})}),eu=C8;var qE=S(I(),1);function VE(e){return W("MuiDivider",e)}var w8=j("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","vertical","withChildren","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),wy=w8;var g0=S(k(),1),R8=e=>{let{absolute:t,children:r,classes:o,flexItem:i,orientation:n,textAlign:s,variant:a}=e;return V({root:["root",t&&"absolute",a,n==="vertical"&&"vertical",i&&"flexItem",r&&"withChildren",s==="right"&&n!=="vertical"&&"textAlignRight",s==="left"&&n!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",n==="vertical"&&"wrapperVertical"]},VE,o)},P8=z("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(X(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),E8=z("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(X(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),k8=qE.forwardRef(function(t,r){let o=q({props:t,name:"MuiDivider"}),{absolute:i=!1,children:n,className:s,orientation:a="horizontal",component:l=n||a==="vertical"?"div":"hr",flexItem:c=!1,role:u=l!=="hr"?"separator":void 0,textAlign:p="center",variant:f="fullWidth",...d}=o,h={...o,absolute:i,component:l,flexItem:c,orientation:a,role:u,textAlign:p,variant:f},y=R8(h);return(0,g0.jsx)(P8,{as:l,className:H(y.root,s),role:u,ref:r,ownerState:h,"aria-orientation":u==="separator"&&(l!=="hr"||a==="vertical")?a:void 0,...d,children:n?(0,g0.jsx)(E8,{className:y.wrapper,ownerState:h,children:n}):null})}),tu=k8;var KE=S(I(),1);var GE=S(k(),1),O8=e=>{let{classes:t,disableUnderline:r,startAdornment:o,endAdornment:i,size:n,hiddenLabel:s,multiline:a}=e,l={root:["root",!r&&"underline",o&&"adornedStart",i&&"adornedEnd",n==="small"&&`size${K(n)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},c=V(l,tE,t);return{...t,...c}},D8=z(Za,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[...Ya(e,t),!r.disableUnderline&&t.underline]}})(X(({theme:e})=>{let t=e.palette.mode==="light",r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",n=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Es.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Es.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:n},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Es.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Es.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):r}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Es.disabled}, .${Es.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Es.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Be()).map(([s])=>({props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),M8=z(Qa,{name:"MuiFilledInput",slot:"Input",overridesResolver:Xa})(X(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),YE=KE.forwardRef(function(t,r){let o=q({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,fullWidth:n=!1,hiddenLabel:s,inputComponent:a="input",multiline:l=!1,slotProps:c,slots:u={},type:p="text",...f}=o,d={...o,disableUnderline:i,fullWidth:n,inputComponent:a,multiline:l,type:p},h=O8(o),y={root:{ownerState:d},input:{ownerState:d}},b=c?Ke(y,c):y,m=u.root??D8,g=u.input??M8;return(0,GE.jsx)(Ja,{slots:{root:m,input:g},slotProps:b,fullWidth:n,inputComponent:a,multiline:l,ref:r,type:p,...f,classes:h})});YE.muiName="Input";var Md=YE;var Fr=S(I(),1);function XE(e){return W("MuiFormControl",e)}var Rve=j("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var v0=S(k(),1),A8=e=>{let{classes:t,margin:r,fullWidth:o}=e,i={root:["root",r!=="none"&&`margin${K(r)}`,o&&"fullWidth"]};return V(i,XE,t)},B8=z("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`margin${K(r.margin)}`],r.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),N8=Fr.forwardRef(function(t,r){let o=q({props:t,name:"MuiFormControl"}),{children:i,className:n,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:p=!1,hiddenLabel:f=!1,margin:d="none",required:h=!1,size:y="medium",variant:b="outlined",...m}=o,g={...o,color:s,component:a,disabled:l,error:c,fullWidth:p,hiddenLabel:f,margin:d,required:h,size:y,variant:b},v=A8(g),[_,C]=Fr.useState(()=>{let M=!1;return i&&Fr.Children.forEach(i,L=>{if(!Xm(L,["Input","Select"]))return;let N=Xm(L,["Select"])?L.props.input:L;N&&YP(N.props)&&(M=!0)}),M}),[w,E]=Fr.useState(()=>{let M=!1;return i&&Fr.Children.forEach(i,L=>{Xm(L,["Input","Select"])&&(Ka(L.props,!0)||Ka(L.props.inputProps,!0))&&(M=!0)}),M}),[O,A]=Fr.useState(!1);l&&O&&A(!1);let B=u!==void 0&&!l?u:O,D,x=Fr.useRef(!1),R=Fr.useCallback(()=>{E(!0)},[]),T=Fr.useCallback(()=>{E(!1)},[]),P=Fr.useMemo(()=>({adornedStart:_,setAdornedStart:C,color:s,disabled:l,error:c,filled:w,focused:B,fullWidth:p,hiddenLabel:f,size:y,onBlur:()=>{A(!1)},onFocus:()=>{A(!0)},onEmpty:T,onFilled:R,registerEffect:D,required:h,variant:b}),[_,s,l,c,w,B,p,f,D,T,R,h,y,b]);return(0,v0.jsx)($c.Provider,{value:P,children:(0,v0.jsx)(B8,{as:a,ownerState:g,className:H(v.root,n),ref:r,...m,children:i})})}),ru=N8;var Ry=S(I(),1);function ZE(e){return W("MuiFormControlLabel",e)}var L8=j("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),ou=L8;var iu=S(k(),1),I8=e=>{let{classes:t,disabled:r,labelPlacement:o,error:i,required:n}=e,s={root:["root",r&&"disabled",`labelPlacement${K(o)}`,i&&"error",n&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",i&&"error"]};return V(s,ZE,t)},z8=z("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${ou.label}`]:t.label},t.root,t[`labelPlacement${K(r.labelPlacement)}`]]}})(X(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${ou.disabled}`]:{cursor:"default"},[`& .${ou.label}`]:{[`&.${ou.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),F8=z("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(X(({theme:e})=>({[`&.${ou.error}`]:{color:(e.vars||e).palette.error.main}}))),H8=Ry.forwardRef(function(t,r){let o=q({props:t,name:"MuiFormControlLabel"}),{checked:i,className:n,control:s,disabled:a,disableTypography:l,inputRef:c,label:u,labelPlacement:p="end",name:f,onChange:d,required:h,slots:y={},slotProps:b={},value:m,...g}=o,v=Lt(),_=a??s.props.disabled??v?.disabled,C=h??s.props.required,w={disabled:_,required:C};["checked","name","onChange","value","inputRef"].forEach(T=>{typeof s.props[T]>"u"&&typeof o[T]<"u"&&(w[T]=o[T])});let E=Er({props:o,muiFormControl:v,states:["error"]}),O={...o,disabled:_,labelPlacement:p,required:C,error:E.error},A=I8(O),B={slots:y,slotProps:b},[D,x]=ne("typography",{elementType:Z,externalForwardedProps:B,ownerState:O}),R=u;return R!=null&&R.type!==Z&&!l&&(R=(0,iu.jsx)(D,{component:"span",...x,className:H(A.label,x?.className),children:R})),(0,iu.jsxs)(z8,{className:H(A.root,n),ownerState:O,ref:r,...g,children:[Ry.cloneElement(s,w),C?(0,iu.jsxs)("div",{children:[R,(0,iu.jsxs)(F8,{ownerState:O,"aria-hidden":!0,className:A.asterisk,children:["\u2009","*"]})]}):R]})}),nu=H8;var JE=S(I(),1);function QE(e){return W("MuiFormGroup",e)}var lbe=j("MuiFormGroup",["root","row","error"]);var ek=S(k(),1),U8=e=>{let{classes:t,row:r,error:o}=e;return V({root:["root",r&&"row",o&&"error"]},QE,t)},$8=z("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),j8=JE.forwardRef(function(t,r){let o=q({props:t,name:"MuiFormGroup"}),{className:i,row:n=!1,...s}=o,a=Lt(),l=Er({props:o,muiFormControl:a,states:["error"]}),c={...o,row:n,error:l.error},u=U8(c);return(0,ek.jsx)($8,{className:H(u.root,i),ownerState:c,ref:r,...s})}),b0=j8;var ok=S(I(),1);function tk(e){return W("MuiFormHelperText",e)}var W8=j("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),_0=W8;var S0=S(k(),1),rk,V8=e=>{let{classes:t,contained:r,size:o,disabled:i,error:n,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",n&&"error",o&&`size${K(o)}`,r&&"contained",a&&"focused",s&&"filled",l&&"required"]};return V(c,tk,t)},q8=z("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.size&&t[`size${K(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${_0.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${_0.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),K8=ok.forwardRef(function(t,r){let o=q({props:t,name:"MuiFormHelperText"}),{children:i,className:n,component:s="p",disabled:a,error:l,filled:c,focused:u,margin:p,required:f,variant:d,...h}=o,y=Lt(),b=Er({props:o,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),m={...o,component:s,contained:b.variant==="filled"||b.variant==="outlined",variant:b.variant,size:b.size,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required};delete m.ownerState;let g=V8(m);return(0,S0.jsx)(q8,{as:s,className:H(g.root,n),ref:r,...h,ownerState:m,children:i===" "?rk||(rk=(0,S0.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"})):i})}),x0=K8;var nk=S(I(),1);function ik(e){return W("MuiFormLabel",e)}var G8=j("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Os=G8;var T0=S(k(),1),Y8=e=>{let{classes:t,color:r,focused:o,disabled:i,error:n,filled:s,required:a}=e,l={root:["root",`color${K(r)}`,i&&"disabled",n&&"error",s&&"filled",o&&"focused",a&&"required"],asterisk:["asterisk",n&&"error"]};return V(l,ik,t)},X8=z("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.color==="secondary"&&t.colorSecondary,r.filled&&t.filled]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t},style:{[`&.${Os.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Os.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Os.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Z8=z("span",{name:"MuiFormLabel",slot:"Asterisk"})(X(({theme:e})=>({[`&.${Os.error}`]:{color:(e.vars||e).palette.error.main}}))),Q8=nk.forwardRef(function(t,r){let o=q({props:t,name:"MuiFormLabel"}),{children:i,className:n,color:s,component:a="label",disabled:l,error:c,filled:u,focused:p,required:f,...d}=o,h=Lt(),y=Er({props:o,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),b={...o,color:y.color||"primary",component:a,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},m=Y8(b);return(0,T0.jsxs)(X8,{as:a,ownerState:b,className:H(m.root,n),ref:r,...d,children:[i,y.required&&(0,T0.jsxs)(Z8,{ownerState:b,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]})}),su=Q8;var el=S(I(),1);var sk=S(k(),1);function Ad(e){return`scale(${e}, ${e**2})`}var J8={entering:{opacity:1,transform:Ad(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:Ad(.75)},exited:{opacity:0,transform:Ad(.75)}},e$={opacity:0,transform:Ad(.75),visibility:"hidden"},C0=el.forwardRef(function(t,r){let{addEndListener:o,appear:i=!0,children:n,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:p,onExited:f,onExiting:d,style:h,timeout:y="auto",...b}=t,m=zc(),g=el.useRef(),v=so(),_=el.useRef(null),C=Mt(_,ei(n),r),w=ao(_,u),E=ao(_,(R,T)=>{iy(R);let{duration:P,delay:M,easing:L}=Fc({style:h,timeout:y,easing:s},{mode:"enter"}),N;y==="auto"?(N=v.transitions.getAutoHeightDuration(R.clientHeight),g.current=N):N=P,R.style.transition=[v.transitions.create("opacity",{duration:N,delay:M}),v.transitions.create("transform",{duration:N*.666,delay:M,easing:L})].join(","),l&&l(R,T)}),O=ao(_,c),A=ao(_,d),B=ao(_,R=>{let{duration:T,delay:P,easing:M}=Fc({style:h,timeout:y,easing:s},{mode:"exit"}),L;y==="auto"?(L=v.transitions.getAutoHeightDuration(R.clientHeight),g.current=L):L=T,R.style.transition=[v.transitions.create("opacity",{duration:L,delay:P}),v.transitions.create("transform",{duration:L*.666,delay:P||L*.333,easing:M})].join(","),R.style.opacity=0,R.style.transform=Ad(.75),p&&p(R)}),D=ao(_,R=>{R.style.transition="",f&&f(R)});return(0,sk.jsx)(md,{appear:i,in:a,nodeRef:_,onEnter:E,onEntered:O,onEntering:w,onExit:B,onExited:D,onExiting:A,addEndListener:R=>{y==="auto"&&m.start(g.current||0,R),o&&o(_.current,R)},timeout:y==="auto"?null:y,...b,children:(R,{ownerState:T,...P})=>{let M=ny(R,a,J8,e$,h,n.props.style);return el.cloneElement(n,{style:M,ref:C,...P})}})});C0&&(C0.muiSupportAuto=!0);var w0=C0;var ck=S(I(),1);function ak(e){return W("MuiInputLabel",e)}var t$=j("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]),lk=t$;var uk=S(k(),1),r$=e=>{let{classes:t,disableUnderline:r}=e,i=V({root:["root",!r&&"underline"],input:["input"]},JP,t);return{...t,...i}},o$=z(Za,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[...Ya(e,t),!r.disableUnderline&&t.underline]}})(X(({theme:e})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{[`label + &, .${lk.root} + &`]:{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${jc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${jc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${jc.disabled}, .${jc.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${jc.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Be()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),i$=z(Qa,{name:"MuiInput",slot:"Input",overridesResolver:Xa})({}),pk=ck.forwardRef(function(t,r){let o=q({props:t,name:"MuiInput"}),{disableUnderline:i=!1,fullWidth:n=!1,inputComponent:s="input",multiline:a=!1,slotProps:l,slots:c={},type:u="text",...p}=o,f=r$(o),h={root:{ownerState:{disableUnderline:i}}},y=l?Ke(l,h):h,b=c.root??o$,m=c.input??i$;return(0,uk.jsx)(Ja,{slots:{root:b,input:m},slotProps:y,fullWidth:n,inputComponent:s,multiline:a,ref:r,type:u,...p,classes:f})});pk.muiName="Input";var Bd=pk;var dk=S(I(),1);var fk=S(k(),1),n$=e=>{let{classes:t,formControl:r,size:o,shrink:i,disableAnimation:n,variant:s,required:a}=e,l={root:["root",r&&"formControl",!n&&"animated",i&&"shrink",o&&o!=="medium"&&`size${K(o)}`,s],asterisk:[a&&"asterisk"]},c=V(l,ak,t);return{...t,...c}},s$=z(su,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${Os.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,r.size==="small"&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})(X(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:r})=>t==="filled"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:r,size:o})=>t==="filled"&&r.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:r})=>t==="outlined"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),a$=dk.forwardRef(function(t,r){let o=q({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,margin:n,shrink:s,variant:a,className:l,...c}=o,u=Lt(),p=s;typeof p>"u"&&u&&(p=u.filled||u.focused||u.adornedStart);let f=Er({props:o,muiFormControl:u,states:["size","variant","required","focused"]}),d={...o,disableAnimation:i,formControl:u,shrink:p,size:f.size,variant:f.variant,required:f.required,focused:f.focused},h=n$(d);return(0,fk.jsx)(s$,{"data-shrink":p,ref:r,className:H(h.root,l),...c,ownerState:d,classes:h})}),R0=a$;var Py=S(I(),1);function hk(e){return W("MuiLink",e)}var l$=j("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),mk=l$;var c$=({theme:e,ownerState:t})=>{let r=t.color;if("colorSpace"in e&&e.colorSpace){let n=Co(e,`palette.${r}.main`)||Co(e,`palette.${r}`)||t.color;return e.alpha(n,.4)}let o=Co(e,`palette.${r}.main`,!1)||Co(e,`palette.${r}`,!1)||t.color,i=Co(e,`palette.${r}.mainChannel`)||Co(e,`palette.${r}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:Ss(o,.4)},yk=c$;var vk=S(k(),1),gk={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},u$=e=>{let{classes:t,component:r,focusVisible:o,underline:i}=e,n={root:["root",`underline${K(i)}`,r==="button"&&"button",o&&"focusVisible"]};return V(n,hk,t)},p$=z(Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`underline${K(r.underline)}`],r.component==="button"&&t.button]}})(X(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:r})=>t==="always"&&r.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:r})=>t==="always"&&r.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${mk.focusVisible}`]:{outline:"auto"}}}]}))),d$=Py.forwardRef(function(t,r){let o=q({props:t,name:"MuiLink"}),i=so(),{className:n,color:s="primary",component:a="a",onBlur:l,onFocus:c,TypographyClasses:u,underline:p="always",variant:f="inherit",sx:d,...h}=o,[y,b]=Py.useState(!1),m=C=>{ws(C.target)||b(!1),l&&l(C)},g=C=>{ws(C.target)&&b(!0),c&&c(C)},v={...o,color:s,component:a,focusVisible:y,underline:p,variant:f},_=u$(v);return(0,vk.jsx)(p$,{color:s,className:H(_.root,n),classes:u,component:a,onBlur:m,onFocus:g,ref:r,ownerState:v,variant:f,...h,sx:[...gk[s]===void 0?[{color:s}]:[],...Array.isArray(d)?d:[d]],style:{...h.style,...p==="always"&&s!=="inherit"&&!gk[s]&&{"--Link-underlineColor":yk({theme:i,ownerState:v})}}})}),Ey=d$;var ky=S(I(),1);var bk=S(I(),1),f$=bk.createContext({}),ti=f$;function _k(e){return W("MuiList",e)}var h0e=j("MuiList",["root","padding","dense","subheader"]);var Oy=S(k(),1),h$=e=>{let{classes:t,disablePadding:r,dense:o,subheader:i}=e;return V({root:["root",!r&&"padding",o&&"dense",i&&"subheader"]},_k,t)},m$=z("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),y$=ky.forwardRef(function(t,r){let o=q({props:t,name:"MuiList"}),{children:i,className:n,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:c,...u}=o,p=ky.useMemo(()=>({dense:a}),[a]),f={...o,component:s,dense:a,disablePadding:l},d=h$(f);return(0,Oy.jsx)(ti.Provider,{value:p,children:(0,Oy.jsxs)(m$,{as:s,className:H(d.root,n),ref:r,ownerState:f,...u,children:[c,i]})})}),en=y$;var au=S(I(),1);function Sk(e){return W("MuiListItem",e)}var E0e=j("MuiListItem",["root","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);var g$=j("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),P0=g$;var Dy=S(I(),1);function xk(e){return W("MuiListItemSecondaryAction",e)}var I0e=j("MuiListItemSecondaryAction",["root","disableGutters"]);var Tk=S(k(),1),v$=e=>{let{disableGutters:t,classes:r}=e;return V({root:["root",t&&"disableGutters"]},xk,r)},b$=z("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Ck=Dy.forwardRef(function(t,r){let o=q({props:t,name:"MuiListItemSecondaryAction"}),{className:i,component:n,...s}=o,a=Dy.useContext(ti),l={...o,disableGutters:a.disableGutters},c=v$(l);return(0,Tk.jsx)(b$,{as:n,className:H(c.root,i),ownerState:l,ref:r,...s})});Ck.muiName="ListItemSecondaryAction";var E0=Ck;var Nd=S(k(),1),_$=(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.alignItems==="flex-start"&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding]},S$=e=>{let{alignItems:t,classes:r,dense:o,disableGutters:i,disablePadding:n,divider:s}=e;return V({root:["root",o&&"dense",!i&&"gutters",!n&&"padding",s&&"divider",t==="flex-start"&&"alignItemsFlexStart"],secondaryAction:["secondaryAction"]},Sk,r)},x$=z("div",{name:"MuiListItem",slot:"Root",overridesResolver:_$})(X(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${P0.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),T$=z(E0,{name:"MuiListItem",slot:"secondaryAction"})({}),C$=au.forwardRef(function(t,r){let o=q({props:t,name:"MuiListItem"}),{alignItems:i="center",children:n,className:s,component:a="li",dense:l=!1,disableGutters:c=!1,disablePadding:u=!1,divider:p=!1,secondaryAction:f,slotProps:d={},slots:h={},...y}=o,b=au.useContext(ti),m=au.useMemo(()=>({dense:l||b.dense||!1,alignItems:i,disableGutters:c}),[i,b.dense,l,c]),g={...o,alignItems:i,dense:m.dense,disableGutters:c,disablePadding:u,divider:p,secondaryAction:f},v=S$(g),_={slots:h,slotProps:d},[C,w]=ne("root",{ref:r,elementType:x$,externalForwardedProps:{component:a,..._,...y},ownerState:g,className:H(v.root,s)}),[E,O]=ne("secondaryAction",{elementType:T$,shouldForwardComponentProp:!0,externalForwardedProps:_,ownerState:g,className:v.secondaryAction});return(0,Nd.jsx)(ti.Provider,{value:m,children:(0,Nd.jsxs)(C,{...w,children:[n,f&&(0,Nd.jsx)(E,{...O,children:f})]})})}),Ds=C$;var w$=j("MuiListItemIcon",["root","alignItemsFlexStart"]),My=w$;var Ay=S(I(),1);function wk(e){return W("MuiListItemText",e)}var R$=j("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Bn=R$;var Ld=S(k(),1),P$=e=>{let{classes:t,inset:r,primary:o,secondary:i,dense:n}=e;return V({root:["root",r&&"inset",n&&"dense",o&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},wk,t)},E$=z("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${Bn.primary}`]:t.primary},{[`& .${Bn.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${fy.root}:where(& .${Bn.primary})`]:{display:"block"},[`.${fy.root}:where(& .${Bn.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),k$=Ay.forwardRef(function(t,r){let o=q({props:t,name:"MuiListItemText"}),{children:i,className:n,disableTypography:s=!1,inset:a=!1,primary:l,secondary:c,slots:u={},slotProps:p={},...f}=o,{dense:d}=Ay.useContext(ti),h=l??i,y=c,b={...o,disableTypography:s,inset:a,primary:!!h,secondary:!!y,dense:d},m=P$(b),g={slots:u,slotProps:p},[v,_]=ne("root",{className:H(m.root,n),elementType:E$,externalForwardedProps:{...g,...f},ownerState:b,ref:r}),[C,w]=ne("primary",{className:m.primary,elementType:Z,externalForwardedProps:g,ownerState:b}),[E,O]=ne("secondary",{className:m.secondary,elementType:Z,externalForwardedProps:g,ownerState:b});return h!=null&&h.type!==Z&&!s&&(h=(0,Ld.jsx)(C,{variant:d?"body2":"body1",component:w?.variant?void 0:"span",...w,children:h})),y!=null&&y.type!==Z&&!s&&(y=(0,Ld.jsx)(E,{variant:"body2",color:"textSecondary",...O,children:y})),(0,Ld.jsxs)(v,{..._,children:[h,y]})}),k0=k$;var Wy=S(I(),1);var lo=S(I(),1);var By=S(I(),1),lu=By.createContext(void 0);function Id(){let e=By.useContext(lu);if(e===void 0)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}var It=S(I(),1);var O$=Object.is;function Ny(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,o=0;for(let i in e)if(r+=1,!O$(e[i],t[i])||!(i in t))return!1;for(let i in t)o+=1;return r===o}var D$=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function zd(e){let{activeItemId:t,getDefaultActiveItemId:r,orientation:o,isRtl:i=!1,isItemFocusable:n=cu,wrap:s=!0}=e,[a,l]=It.useState(t),c=It.useRef(t),u=a;t!==c.current&&(c.current=t,t!==void 0&&t!==a&&(u=t,l(t)));let p=It.useRef(null),f=It.useRef(new Map),[d,h]=It.useState(0),y=It.useMemo(()=>O0(f.current),[d]),b=Rk(u,y,n,r),m=It.useRef(b);m.current=b;let g=It.useCallback(()=>{let D=O0(f.current),x=Rk(m.current,D,n,r);return Dk(D,x)},[r,n]),v=It.useCallback(()=>f.current,[]),_=Zo(D=>{let x=f.current.get(D.id);Ny(x??null,D)||(f.current.set(D.id,D),h(R=>R+1))}),C=Zo(D=>{f.current.delete(D)&&h(x=>x+1)}),w=Zo(D=>{l(D)}),E=It.useCallback(D=>m.current===D,[]),O=It.useCallback((D,x,R,T)=>{let P=Ly(f.current),M=kk(P,D,x,R,T??n);return M?(M.element?.focus(),l(M.id),M):null},[n]),A=It.useCallback(D=>({onFocus:T=>{let P=Ly(f.current),M=Ak(P,T.target);M!==-1&&l(P[M].id)},onKeyDown:T=>{if(T.altKey||T.shiftKey||T.ctrlKey||T.metaKey||!D$.includes(T.key))return;let P=o==="horizontal"?"ArrowLeft":"ArrowUp",M=o==="horizontal"?"ArrowRight":"ArrowDown";o==="horizontal"&&i&&(P="ArrowRight",M="ArrowLeft");let L=Ly(f.current),N=Fa(dr(p.current)),Y=N===p.current,ee=Pk(L,N,m.current),Q="next";switch(T.key){case P:Q="previous",T.preventDefault(),Y&&(ee=L.length);break;case M:T.preventDefault(),Y&&(ee=-1);break;case"Home":T.preventDefault(),ee=-1;break;case"End":T.preventDefault(),Q="previous",ee=L.length;break;default:return}O(ee,Q,s)},ref:N$(D,T=>{p.current=T})}),[O,i,o,s]),B=It.useCallback(D=>{let x=Ly(f.current),R=Fa(dr(p.current)),P=R===p.current?-1:Pk(x,R,m.current);return O(P,"next",!0,D)?.id??null},[O]);return It.useMemo(()=>({activeItemId:b,focusNext:B,getActiveItem:g,getContainerProps:A,getItemMap:v,isItemActive:E,registerItem:_,setActiveItemId:w,unregisterItem:C}),[b,B,g,A,v,E,_,w,C])}function Fd(e){let t=Id(),{activeItemId:r,registerItem:o,unregisterItem:i}=t,n=It.useRef(null),s=It.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),a=It.useRef(s);a.current=s;let l=It.useCallback(u=>{if(n.current=u,u==null){queueMicrotask(()=>{n.current==null&&i(e.id)});return}o({...a.current,element:u})},[e.id,o,i]),c=fr(e.ref,l);return pr(()=>{n.current&&o({...s,element:n.current})},[s,o]),pr(()=>{let u=e.id;return()=>{i(u)}},[e.id,i]),{ref:c,tabIndex:r===e.id?0:-1}}function Rk(e,t,r,o){return e!=null?M$(e,t,r):A$(t,r,o)}function M$(e,t,r){let o=Mk(t,e);return o===-1?Ok(t,r):r(t[o])?t[o].id:kk(t,o,"next",!1,r)?.id??null}function A$(e,t,r){let o=r?.(e);if(o!=null){let i=Dk(e,o);if(i&&t(i))return i.id}return Ok(e,t)}function Pk(e,t,r){if(t){let o=Ak(e,t);if(o!==-1)return o}return Mk(e,r)}function kk(e,t,r,o,i){let n=e.length-1;if(n===-1)return null;let s=!1,a=Ek(t,n,r,o),l=a;for(;a!==-1;){if(a===l){if(s)return null;s=!0}let c=e[a];if(!c||!i(c))a=Ek(a,n,r,o);else return c}return null}function Ok(e,t){return e.find(r=>t(r))?.id??null}function Dk(e,t){return t==null?null:e.find(r=>r.id===t)??null}function Mk(e,t){return t==null?-1:e.findIndex(r=>r.id===t)}function Ak(e,t){return t?e.findIndex(r=>r.element===t||r.element?.contains(t)):-1}function O0(e){let t=Array.from(e.values());if(t.every(i=>i.element==null))return t;let r=t.filter(D0).sort((i,n)=>B$(i.element,n.element)),o=t.filter(i=>!D0(i));return[...r,...o]}function Ly(e){return O0(e).filter(D0)}function Ek(e,t,r,o=!0){return r==="next"?e===t?o?0:-1:e+1:e===0?o?t:-1:e-1}function cu(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute("disabled")&&e.element.getAttribute("aria-disabled")!=="true"&&e.element.hasAttribute("tabindex"):!1}function D0(e){return e.element!=null&&e.element.isConnected}function B$(e,t){if(e===t)return 0;let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function N$(...e){return t=>{e.forEach(r=>{Ha(r??null,t)})}}var Bk=qc;function Hd(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t==="keyboard"})}catch{e.focus()}}function Iy(e){return e?e.type==="mousedown"||e.type==="pointerdown"||e.type==="touchstart"?"pointer":e.type==="keydown"||e.type==="click"&&e.detail===0?"keyboard":null:null}function zy(e){return e==null||typeof e=="string"&&!e.trim()}function Ud(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}var Fy=S(I(),1),Nk=Fy.createContext(null);function $d(){return Fy.useContext(Nk)}var M0=Nk.Provider;var Hy=S(I(),1),A0=Hy.createContext(void 0);function Lk(){let e=Hy.useContext(A0);if(e===void 0)throw new Error("MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.");return e}var Uy=S(k(),1);function L$(e){let t=e?.element??e;if(!t)return"";if(e?.textValue!==void 0)return e.textValue;let r=t.innerText;return r===void 0&&(r=t.textContent),r??""}function Ik(e,t){if(t===void 0)return!0;let r=L$(e);return r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.startsWith(t.keys.join(""))}function I$(e,t){return Ik(e,t)?cu(e):!1}function z$(e,t){Hd(e,t)}var F$=lo.forwardRef(function(t,r){let{actions:o,autoFocus:i=!1,autoFocusItem:n=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:p="selectedMenu",...f}=t,d=lo.useRef(null),h=lo.useRef(!1),[y,b]=lo.useState(!1),m=$d(),g=lo.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=lo.useCallback(P=>p==="selectedMenu"?P.find(M=>M.selected&&cu(M))?.id??P.find(M=>cu(M))?.id??null:P.find(M=>cu(M))?.id??null,[p]),_=zd({activeItemId:void 0,getDefaultActiveItemId:v,orientation:"vertical",wrap:!c}),{activeItemId:C,focusNext:w,getActiveItem:E,getContainerProps:O,getItemMap:A}=_,B=Qo((P=!1)=>{if(!d.current||!P&&h.current)return null;if(n){let M=E();if(M?.element){let L=Array.from(A().values()).some(Y=>Y.selected),N=p==="menu"&&L&&!M.selected&&m==null;return b(N),z$(M.element,m),h.current=!0,M.element}return i?(b(!1),d.current.focus(),d.current):null}return i?(b(!1),d.current.focus(),h.current=!0,d.current):(b(!1),null)});En(()=>{if(!i&&!n){h.current=!1,b(!1);return}B()},[C,n,i,B]),lo.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(P,{direction:M})=>{let L=!d.current.style.width;if(P.clientHeight<d.current.clientHeight&&L){let N=`${Bk(Zi(P))}px`;d.current.style[M==="rtl"?"paddingLeft":"paddingRight"]=N,d.current.style.width=`calc(100% + ${N})`}return d.current},focusInitialTarget:()=>{if(!d.current)return null;let P=Yi(Xi(d.current));return P&&d.current.contains(P)?P:B(!0)}}),[B]);let D=O(),x=Mt(d,D.ref,r),R=lo.useMemo(()=>({itemsFocusableWhenDisabled:l,suppressInitialFocusVisible:y,variant:p}),[l,y,p]),T=Qo(P=>{if(y&&b(!1),(P.ctrlKey||P.metaKey||P.altKey)&&u){u(P);return}if(D.onKeyDown(P),P.key.length===1){let L=g.current,N=P.key.toLowerCase(),Y=performance.now();L.keys.length>0&&(Y-L.lastTime>500?(L.keys=[],L.repeating=!0,L.previousKeyMatched=!0):L.repeating&&N!==L.keys[0]&&(L.repeating=!1)),L.lastTime=Y,L.keys.push(N);let ee=Yi(Xi(d.current)),Q=ee&&!L.repeating&&Ik(ee,L);L.previousKeyMatched&&(Q||w(fe=>I$(fe,L))!=null)?P.preventDefault():L.previousKeyMatched=!1}u&&u(P)});return(0,Uy.jsx)(en,{role:"menu",ref:x,className:a,onKeyDown:T,onFocus:D.onFocus,tabIndex:-1,...f,children:(0,Uy.jsx)(A0.Provider,{value:R,children:(0,Uy.jsx)(lu.Provider,{value:_,children:s})})})}),tl=F$;var Or=S(I(),1);function zk(e){return W("MuiPopover",e)}var xxe=j("MuiPopover",["root","paper"]);var jy=S(k(),1);function Fk(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Hk(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function Uk(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function $y(e){return typeof e=="function"?e():e}var H$=e=>{let{classes:t}=e;return V({root:["root"],paper:["paper"]},zk,t)},U$=z(Dd,{name:"MuiPopover",slot:"Root"})({}),B0=z(Wt,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$$=Or.forwardRef(function(t,r){let o=q({props:t,name:"MuiPopover"}),{action:i,anchorEl:n,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:c,className:u,container:p,disableAutoFocus:f=!1,elevation:d=8,marginThreshold:h=16,open:y,slots:b={},slotProps:m={},transformOrigin:g={vertical:"top",horizontal:"left"},transitionDuration:v="auto",disableScrollLock:_=!1,...C}=o,w=Or.useRef(),E={...o,anchorOrigin:s,anchorReference:l,elevation:d,marginThreshold:h,transformOrigin:g,transitionDuration:v},O=H$(E),A=Or.useCallback(()=>{if(l==="anchorPosition")return a;let te=$y(n),Pe=(te&&te.nodeType===1?te:Xi(w.current).body).getBoundingClientRect();return{top:Pe.top+Fk(Pe,s.vertical),left:Pe.left+Hk(Pe,s.horizontal)}},[n,s.horizontal,s.vertical,a,l]),B=Or.useCallback(te=>({vertical:Fk(te,g.vertical),horizontal:Hk(te,g.horizontal)}),[g.horizontal,g.vertical]),D=Or.useCallback(te=>{let ie={width:te.offsetWidth,height:te.offsetHeight},Pe=B(ie);if(l==="none")return{top:null,left:null,transformOrigin:Uk(Pe)};let gt=A(),be=gt.top-Pe.vertical,oe=gt.left-Pe.horizontal,dt=be+ie.height,xr=oe+ie.width,ft=Zi($y(n)),Ze=ft.innerHeight-h,vt=ft.innerWidth-h;if(h!=null&&be<h){let we=be-h;be-=we,Pe.vertical+=we}else if(h!=null&&dt>Ze){let we=dt-Ze;be-=we,Pe.vertical+=we}if(h!=null&&oe<h){let we=oe-h;oe-=we,Pe.horizontal+=we}else if(xr>vt){let we=xr-vt;oe-=we,Pe.horizontal+=we}return{top:`${Math.round(be)}px`,left:`${Math.round(oe)}px`,transformOrigin:Uk(Pe)}},[n,l,A,B,h]),[x,R]=Or.useState(y),T=Or.useCallback(()=>{let te=w.current;if(!te)return;let ie=D(te);ie.top!=null&&te.style.setProperty("top",ie.top),ie.left!=null&&(te.style.left=ie.left),te.style.transformOrigin=ie.transformOrigin,R(!0)},[D]);Or.useEffect(()=>(_&&window.addEventListener("scroll",T),()=>window.removeEventListener("scroll",T)),[n,_,T]);let P=()=>{T()},M=()=>{R(!1)};Or.useEffect(()=>{y&&T()}),Or.useImperativeHandle(i,()=>y?{updatePosition:()=>{T()}}:null,[y,T]),Or.useEffect(()=>{if(!y)return;let te=Dc(()=>{T()}),ie=Zi($y(n));return ie.addEventListener("resize",te),()=>{te.clear(),ie.removeEventListener("resize",te)}},[n,y,T]);let L=v,N={slots:b,slotProps:m},[Y,ee]=ne("transition",{elementType:w0,externalForwardedProps:N,ownerState:E,getSlotProps:te=>({...te,onEntering:(ie,Pe)=>{te.onEntering?.(ie,Pe),P()},onExited:ie=>{te.onExited?.(ie),M()}}),additionalProps:{appear:!0,in:y}});v==="auto"&&!Y.muiSupportAuto&&(L=void 0);let Q=p||(n?Xi($y(n)).body:void 0),[fe,{slots:ve,slotProps:he,...ae}]=ne("root",{ref:r,elementType:U$,externalForwardedProps:{...N,...C},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:b.backdrop},slotProps:{backdrop:Ac(typeof m.backdrop=="function"?m.backdrop(E):m.backdrop,{invisible:!0})},container:Q,open:y},ownerState:E,className:H(O.root,u)}),[re,pe]=ne("paper",{ref:w,className:O.paper,elementType:B0,externalForwardedProps:N,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:x?void 0:{opacity:0}},ownerState:E});return(0,jy.jsx)(fe,{...ae,...!Cs(fe)&&{slots:ve,slotProps:he,disableAutoFocus:f,disableScrollLock:_},children:(0,jy.jsx)(Y,{...ee,timeout:L,children:(0,jy.jsx)(re,{...pe,children:c})})})}),N0=$$;function $k(e){return W("MuiMenu",e)}var Vxe=j("MuiMenu",["root","paper","list"]);var L0=S(k(),1),j$={vertical:"top",horizontal:"right"},W$={vertical:"top",horizontal:"left"},V$=e=>{let{classes:t}=e;return V({root:["root"],paper:["paper"],list:["list"]},$k,t)},q$=z(N0,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),K$=z(B0,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),G$=z(tl,{name:"MuiMenu",slot:"List"})({outline:0}),Y$=Wy.forwardRef(function(t,r){let o=q({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:n,className:s,disableAutoFocusItem:a=!1,onClose:l,open:c,PopoverClasses:u,transitionDuration:p="auto",variant:f="selectedMenu",slots:d={},slotProps:h={},...y}=o,b=Tc(),m={...o,autoFocus:i,disableAutoFocusItem:a,transitionDuration:p,variant:f},g=V$(m),v=i&&c,_=v&&!a,C=Wy.useRef(null),w=(P,M)=>{C.current&&(C.current.adjustStyleForScrollbar(P,{direction:b?"rtl":"ltr"}),v&&C.current.focusInitialTarget?.())},E=P=>{P.key==="Tab"&&(P.preventDefault(),l&&l(P,"tabKeyDown"))},O={slots:d,slotProps:h},A=Mn({elementType:d.root,externalSlotProps:h.root,ownerState:m,className:[g.root,s]}),[B,D]=ne("paper",{className:g.paper,elementType:K$,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:m}),[x,R]=ne("list",{className:g.list,elementType:G$,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:P=>({...P,onKeyDown:M=>{E(M),P.onKeyDown?.(M)}}),ownerState:m}),T=typeof h.transition=="function"?h.transition(m):h.transition;return(0,L0.jsx)(q$,{disableAutoFocus:i,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:b?"right":"left"},transformOrigin:b?j$:W$,slots:{root:d.root,paper:B,backdrop:d.backdrop,transition:d.transition},slotProps:{root:A,paper:D,backdrop:typeof h.backdrop=="function"?h.backdrop(m):h.backdrop,transition:{...T,onEntering:(...P)=>{w(...P),T?.onEntering?.(...P)}}},open:c,ref:r,transitionDuration:p,ownerState:m,...y,classes:u,children:(0,L0.jsx)(x,{actions:C,autoFocus:v,autoFocusItem:_,variant:f,...R,children:n})})}),jk=Y$;var Ms=S(I(),1);function Wk(e){return W("MuiMenuItem",e)}var X$=j("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),uu=X$;var I0=S(k(),1),Z$=(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},Q$=e=>{let{disabled:t,dense:r,divider:o,disableGutters:i,selected:n,classes:s}=e,l=V({root:["root",r&&"dense",t&&"disabled",!i&&"gutters",o&&"divider",n&&"selected"]},Wk,s);return{...s,...l}},J$=z(At,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Z$})(X(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${uu.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${uu.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${uu.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${uu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${uu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${wy.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${wy.inset}`]:{marginLeft:52},[`& .${Bn.root}`]:{marginTop:0,marginBottom:0},[`& .${Bn.inset}`]:{paddingLeft:36},[`& .${My.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${My.root} svg`]:{fontSize:"1.25rem"}}}]}))),ej=Ms.forwardRef(function(t,r){let o=q({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:n="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:p,className:f,...d}=o,h=$d(),y=Ms.useContext(ti),b=Ms.useMemo(()=>({dense:s||y.dense||!1,disableGutters:l}),[y.dense,s,l]),m=Lk(),g=kn(),v=m.suppressInitialFocusVisible,_=m.itemsFocusableWhenDisabled,C=Ms.useRef(null);En(()=>{i&&C.current&&Hd(C.current,h)},[i]);let w={...o,dense:b.dense,divider:a,disableGutters:l},E=Q$(o),O=Fd({id:g,ref:r,disabled:o.disabled,focusableWhenDisabled:_,selected:o.selected}),A=Mt(C,O.ref),B;return p!==void 0?B=p:m.variant==="selectedMenu"?B=O.tabIndex:(!o.disabled||_)&&(B=-1),(0,I0.jsx)(ti.Provider,{value:b,children:(0,I0.jsx)(J$,{ref:A,role:u,tabIndex:B,component:n,internalNativeButton:!1,focusableWhenDisabled:_,suppressFocusVisible:v,focusVisibleClassName:H(E.focusVisible,c),className:H(E.root,f),...d,ownerState:w,classes:E})})}),Nn=ej;var qy=S(I(),1);function Vk(e){return W("MuiNativeSelect",e)}var tj=j("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Vy=tj;var jd=S(k(),1),rj=e=>{let{classes:t,variant:r,disabled:o,multiple:i,open:n,error:s}=e,a={select:["select",r,o&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${K(r)}`,n&&"iconOpen",o&&"disabled"]};return V(a,Vk,t)},z0=z("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Vy.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),oj=z(z0,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ae,overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${Vy.multiple}`]:t.multiple}]}})({}),F0=z("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Vy.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),ij=z(F0,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${K(r.variant)}`],r.open&&t.iconOpen]}})({}),nj=qy.forwardRef(function(t,r){let{className:o,disabled:i,error:n,IconComponent:s,inputRef:a,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:n},p=rj(u);return(0,jd.jsxs)(qy.Fragment,{children:[(0,jd.jsx)(oj,{ownerState:u,className:H(p.select,o),disabled:i,ref:a||r,...c}),t.multiple?null:(0,jd.jsx)(ij,{as:s,ownerState:u,className:p.icon})]})}),qk=nj;var Ky=S(I(),1);var Wd=S(k(),1),Kk,sj=z("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ae})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),aj=z("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ae})(X(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function H0(e){let{children:t,classes:r,className:o,label:i,notched:n,...s}=e,a=i!=null&&i!=="",l={...e,notched:n,withLabel:a};return(0,Wd.jsx)(sj,{"aria-hidden":!0,className:o,ownerState:l,...s,children:(0,Wd.jsx)(aj,{ownerState:l,children:a?(0,Wd.jsx)("span",{children:i}):Kk||(Kk=(0,Wd.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"}))})})}var Vd=S(k(),1),lj=e=>{let{classes:t}=e,o=V({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},eE,t);return{...t,...o}},cj=z(Za,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ya})(X(({theme:e})=>{let t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Mi.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Mi.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Mi.focused} .${Mi.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Be()).map(([r])=>({props:{color:r},style:{[`&.${Mi.focused} .${Mi.notchedOutline}`]:{borderColor:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${Mi.error} .${Mi.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Mi.disabled} .${Mi.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:r})=>r.startAdornment,style:{paddingLeft:14}},{props:({ownerState:r})=>r.endAdornment,style:{paddingRight:14}},{props:({ownerState:r})=>r.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:r,size:o})=>r.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),uj=z(H0,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(X(({theme:e})=>{let t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),pj=z(Qa,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Xa})(X(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Gk=Ky.forwardRef(function(t,r){let o=q({props:t,name:"MuiOutlinedInput"}),{fullWidth:i=!1,inputComponent:n="input",label:s,multiline:a=!1,notched:l,slots:c={},slotProps:u={},type:p="text",...f}=o,d=lj(o),h=Lt(),y=Er({props:o,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...o,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:h,fullWidth:i,hiddenLabel:y.hiddenLabel,multiline:a,size:y.size,type:p},m=c.root??cj,g=c.input??pj,[v,_]=ne("notchedOutline",{elementType:uj,className:d.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:c,slotProps:u},additionalProps:{label:s!=null&&s!==""&&y.required?(0,Vd.jsxs)(Ky.Fragment,{children:[s,"\u2009","*"]}):s}});return(0,Vd.jsx)(Ja,{slots:{root:m,input:g},slotProps:u,renderSuffix:C=>(0,Vd.jsx)(v,{..._,notched:typeof l<"u"?l:!!(C.startAdornment||C.filled||C.focused)}),fullWidth:i,inputComponent:n,multiline:a,ref:r,type:p,...f,classes:{...d,notchedOutline:null}})});Gk.muiName="Input";var qd=Gk;var Gd=S(I(),1);var Yk=S(k(),1),Xk=Ie((0,Yk.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked");var Zk=S(k(),1),Qk=Ie((0,Zk.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");var Kd=S(k(),1),dj=z("span",{name:"MuiRadioButtonIcon",shouldForwardProp:Ae})({position:"relative",display:"flex"}),fj=z(Xk,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),hj=z(Qk,{name:"MuiRadioButtonIcon"})(X(({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function mj(e){let{checked:t=!1,classes:r={},fontSize:o}=e,i={...e,checked:t};return(0,Kd.jsxs)(dj,{className:r.root,ownerState:i,children:[(0,Kd.jsx)(fj,{fontSize:o,className:r.background,ownerState:i}),(0,Kd.jsx)(hj,{fontSize:o,className:r.dot,ownerState:i})]})}var U0=mj;var e2=S(I(),1);var Jk=S(I(),1),yj=Jk.createContext(void 0),Gy=yj;function $0(){return e2.useContext(Gy)}function t2(e){return W("MuiRadio",e)}var gj=j("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),j0=gj;var Yy=S(k(),1),vj=e=>{let{classes:t,color:r,size:o}=e,i={root:["root",`color${K(r)}`,o!=="medium"&&`size${K(o)}`]};return{...t,...V(i,t2,t)}},bj=z(Vc,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.size!=="medium"&&t[`size${K(r.size)}`],t[`color${K(r.color)}`]]}})(X(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${j0.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Be()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${j0.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function _j(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}var Sj=(0,Yy.jsx)(U0,{checked:!0}),xj=(0,Yy.jsx)(U0,{}),Tj=Gd.forwardRef(function(t,r){let o=q({props:t,name:"MuiRadio"}),{checked:i,checkedIcon:n=Sj,color:s="primary",icon:a=xj,name:l,onChange:c,size:u="medium",className:p,disabled:f,disableRipple:d=!1,slots:h={},slotProps:y={},...b}=o,m=Lt(),g=f;m&&typeof g>"u"&&(g=m.disabled),g??(g=!1);let v={...o,disabled:g,disableRipple:d,color:s,size:u},_=vj(v),C=$0(),w=i,E=rP(c,C&&C.onChange),O=l;C&&(typeof w>"u"&&(w=_j(C.value,o.value)),typeof O>"u"&&(O=C.name));let A=y.input,[B,D]=ne("root",{ref:r,elementType:bj,className:H(_.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:y,...b},getSlotProps:x=>({...x,onChange:(R,...T)=>{x.onChange?.(R,...T),E(R,...T)}}),ownerState:v,additionalProps:{type:"radio",icon:Gd.cloneElement(a,{fontSize:a.props.fontSize??u}),checkedIcon:Gd.cloneElement(n,{fontSize:n.props.fontSize??u}),disabled:g,name:O,checked:w,slots:h,slotProps:{input:typeof A=="function"?A(v):A}}});return(0,Yy.jsx)(B,{...D,classes:_})}),Xy=Tj;var As=S(I(),1);function r2(e){return W("MuiRadioGroup",e)}var j1e=j("MuiRadioGroup",["root","row","error"]);var W0=S(k(),1),Cj=e=>{let{classes:t,row:r,error:o}=e;return V({root:["root",r&&"row",o&&"error"]},r2,t)},wj=As.forwardRef(function(t,r){let{actions:o,children:i,className:n,defaultValue:s,name:a,onChange:l,value:c,...u}=t,p=As.useRef(null),f=Cj(t),[d,h]=$a({controlled:c,default:s,name:"RadioGroup"});As.useImperativeHandle(o,()=>({focus:()=>{let g=p.current.querySelector("input:not(:disabled):checked");g||(g=p.current.querySelector("input:not(:disabled)")),g&&g.focus()}}),[]);let y=Mt(r,p),b=kn(a),m=As.useMemo(()=>({name:b,onChange(g){h(g.target.value),l&&l(g,g.target.value)},value:d}),[b,l,h,d]);return(0,W0.jsx)(Gy.Provider,{value:m,children:(0,W0.jsx)(b0,{role:"radiogroup",ref:y,className:H(f.root,n),...u,children:i})})}),Zy=wj;var du=S(I(),1);var ct=S(I(),1);function Qy(e){return W("MuiSelect",e)}var Rj=j("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","nativeInput","error"]),pu=Rj;var Ln=S(k(),1),o2,Pj=z(z0,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`&.${pu.select}`]:t.select},{[`&.${pu.select}`]:t[r.variant]},{[`&.${pu.error}`]:t.error},{[`&.${pu.multiple}`]:t.multiple}]}})({[`&.${pu.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Ej=z(F0,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.icon,r.open&&t.iconOpen]}})({}),kj=z("input",{shouldForwardProp:e=>Vm(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"}),Oj=e=>{let{classes:t,variant:r,disabled:o,multiple:i,open:n,error:s}=e;return V({select:["select",r,o&&"disabled",i&&"multiple",s&&"error"],icon:["icon",n&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]},Qy,t)},Dj=ct.forwardRef(function(t,r){let{"aria-describedby":o,"aria-label":i,autoFocus:n,autoWidth:s,children:a,className:l,defaultOpen:c,defaultValue:u,disabled:p,displayEmpty:f,error:d=!1,IconComponent:h,inputRef:y,labelId:b,MenuProps:m={},multiple:g,name:v,onBlur:_,onChange:C,onClose:w,onFocus:E,onKeyDown:O,onMouseDown:A,onOpen:B,open:D,readOnly:x,renderValue:R,required:T,SelectDisplayProps:P={},tabIndex:M,type:L,value:N,variant:Y="standard",...ee}=t,[Q,fe]=$a({controlled:N,default:u,name:"Select"}),[ve,he]=$a({controlled:D,default:c,name:"Select"}),ae=ct.useRef(null),re=ct.useRef(null),[pe,te]=ct.useState(null),{current:ie}=ct.useRef(D!=null),[Pe,gt]=ct.useState(),[be,oe]=ct.useState(null),dt=Mt(r,y),xr=ct.useCallback(de=>{re.current=de,de&&te(de)},[]),ft=pe?.parentNode;ct.useImperativeHandle(dt,()=>({focus:()=>{re.current.focus()},node:ae.current,value:Q}),[Q]);let Ze=pe!==null&&ve;ct.useEffect(()=>{if(!Ze||!ft||s||typeof ResizeObserver>"u")return;let de=new ResizeObserver(()=>{gt(ft.clientWidth)});return de.observe(ft),()=>{de.disconnect()}},[Ze,ft,s]),ct.useEffect(()=>{c&&ve&&pe&&!ie&&(gt(s?null:ft.clientWidth),re.current.focus())},[pe,s]),ct.useEffect(()=>{n&&re.current.focus()},[n]),ct.useEffect(()=>{if(!b)return;let de=Xi(re.current).getElementById(b);if(de){let He=()=>{getSelection().isCollapsed&&re.current.focus()};return de.addEventListener("click",He),()=>{de.removeEventListener("click",He)}}},[b]);let vt=(de,He)=>{de?(oe(Iy(He)),B&&B(He)):(oe(null),w&&w(He)),ie||(gt(s?null:ft.clientWidth),he(de))},we=de=>{A?.(de),de.button===0&&(de.preventDefault(),re.current.focus(),vt(!0,de))},Ir=de=>{vt(!1,de)},lr=ct.Children.toArray(a),kt=de=>{let He=lr.find($t=>$t.props.value===de.target.value);He!==void 0&&(fe(He.props.value),C&&C(de,He))},Hi=de=>He=>{let $t;if(He.currentTarget.hasAttribute("tabindex")){if(g){$t=Array.isArray(Q)?Q.slice():[];let ys=Q.indexOf(de.props.value);ys===-1?$t.push(de.props.value):$t.splice(ys,1)}else $t=de.props.value;if(de.props.onClick&&de.props.onClick(He),Q!==$t&&(fe($t),C)){let ys=He.nativeEvent||He,Uh=new ys.constructor(ys.type,ys);Object.defineProperty(Uh,"target",{writable:!0,value:{value:$t,name:v}}),C(Uh,de)}g||vt(!1,He)}},So=de=>{x||([" ","ArrowUp","ArrowDown","Enter"].includes(de.key)&&(de.preventDefault(),vt(!0,de)),O?.(de))},Ti=de=>{!Ze&&_&&(Object.defineProperty(de,"target",{writable:!0,value:{value:Q,name:v}}),_(de))};delete ee["aria-invalid"];let st,Fe,bt=[],Te=!1,Wr=!1;(Ka({value:Q})||f)&&(R?st=R(Q):Te=!0);let Ci=lr.map(de=>{if(!ct.isValidElement(de))return null;let He;if(g){if(!Array.isArray(Q))throw new Error(cr(2));He=Q.some($t=>Ud($t,de.props.value)),He&&Te&&bt.push(de.props.children)}else He=Ud(Q,de.props.value),He&&Te&&(Fe=de.props.children);return He&&(Wr=!0),ct.cloneElement(de,{"aria-selected":He?"true":"false",onClick:Hi(de),onKeyUp:$t=>{$t.key===" "&&$t.preventDefault(),de.props.onKeyUp&&de.props.onKeyUp($t)},role:"option",selected:He,value:void 0,"data-value":de.props.value})});Te&&(g?bt.length===0?st=null:st=bt.reduce((de,He,$t)=>(de.push(He),$t<bt.length-1&&de.push(", "),de),[]):st=Fe);let ms=Pe;!s&&ie&&pe&&(ms=ft.clientWidth);let ba;typeof M<"u"?ba=M:ba=p?null:0;let ht=P.id||(v?`mui-component-select-${v}`:void 0),wi={...t,variant:Y,value:Q,open:Ze,error:d},Dp=Oj(wi),Fh=typeof m.slotProps?.paper=="function"?m.slotProps.paper(wi):m.slotProps?.paper,Hh=typeof m.slotProps?.list=="function"?m.slotProps.list(wi):m.slotProps?.list,Mp=Ro(),Ap=Ro();return(0,Ln.jsxs)(ct.Fragment,{children:[(0,Ln.jsx)(Pj,{as:"div",ref:xr,tabIndex:ba,role:"combobox","aria-controls":Ze?Mp:void 0,"aria-disabled":p?"true":void 0,"aria-expanded":Ze?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[b,ht].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":T?"true":void 0,"aria-invalid":d?"true":void 0,onKeyDown:So,onMouseDown:p||x?null:we,onBlur:Ti,onFocus:E,...P,ownerState:wi,className:H(P.className,Dp.select,l),id:ht,children:zy(st)?o2||(o2=(0,Ln.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"\u200B"})):st}),(0,Ln.jsx)(kj,{"aria-invalid":d,value:Array.isArray(Q)?Q.join(","):Q,name:v,ref:ae,"aria-hidden":!0,onChange:kt,tabIndex:-1,disabled:p,className:Dp.nativeInput,autoFocus:n,required:T,...ee,id:ee.id??Ap,ownerState:wi}),(0,Ln.jsx)(Ej,{as:h,className:Dp.icon,ownerState:wi}),(0,Ln.jsx)(M0,{value:be,children:(0,Ln.jsx)(jk,{id:`menu-${v||""}`,anchorEl:ft,open:Ze,onClose:Ir,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...m,slotProps:{...m.slotProps,list:{"aria-labelledby":b,role:"listbox","aria-multiselectable":g?"true":void 0,disableListWrap:!0,id:Mp,...Hh},paper:{...Fh,style:{minWidth:ms,...Fh?.style}}},children:Ci})})]})}),i2=Dj;var Yd=S(k(),1),Mj=e=>{let{classes:t}=e,o=V({root:["root"]},Qy,t);return{...t,...o}},V0={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Ae(e)&&e!=="variant"},Aj=z(Bd,V0)(""),Bj=z(qd,V0)(""),Nj=z(Md,V0)(""),n2=du.forwardRef(function(t,r){let o=q({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:n,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=oE,id:p,input:f,inputProps:d,label:h,labelId:y,MenuProps:b,multiple:m=!1,native:g=!1,onClose:v,onOpen:_,open:C,renderValue:w,SelectDisplayProps:E,variant:O="outlined",...A}=o,B=g?qk:i2,D=Lt(),x=Er({props:o,muiFormControl:D,states:["variant","error"]}),R=x.variant||O,T={...o,variant:R,classes:s},P=Mj(T),{root:M,...L}=P,N=f||{standard:(0,Yd.jsx)(Aj,{ownerState:T}),outlined:(0,Yd.jsx)(Bj,{label:h,ownerState:T}),filled:(0,Yd.jsx)(Nj,{ownerState:T})}[R],Y=Mt(r,ei(N));return(0,Yd.jsx)(du.Fragment,{children:du.cloneElement(N,{inputComponent:B,inputProps:{children:n,error:x.error,IconComponent:u,variant:R,type:void 0,multiple:m,...g?{id:p}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:y,MenuProps:b,onClose:v,onOpen:_,open:C,renderValue:w,SelectDisplayProps:{id:p,...E}},...d,classes:d?Ke(L,d.classes):L,...f?f.props.inputProps:{}},...(m&&g||c)&&R==="outlined"?{notched:!0}:{},ref:Y,className:H(N.props.className,a,P.root),...!f&&{variant:R},...A})})});n2.muiName="Select";var fu=n2;var Lj=Um({createStyledComponent:z("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>q({props:e,name:"MuiStack"})}),$e=Lj;var a2=S(I(),1);function s2(e){return W("MuiSwitch",e)}var Ij=j("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Hr=Ij;var hu=S(k(),1),zj=e=>{let{classes:t,edge:r,size:o,color:i,checked:n,disabled:s}=e,a={root:["root",r&&`edge${K(r)}`,`size${K(o)}`],switchBase:["switchBase",`color${K(i)}`,n&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=V(a,s2,t);return{...t,...l}},Fj=z("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.edge&&t[`edge${K(r.edge)}`],t[`size${K(r.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Hr.thumb}`]:{width:16,height:16},[`& .${Hr.switchBase}`]:{padding:4,[`&.${Hr.checked}`]:{transform:"translateX(16px)"}}}}]}),Hj=z(Vc,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.switchBase,{[`& .${Hr.input}`]:t.input},r.color!=="default"&&t[`color${K(r.color)}`]]}})(X(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Hr.checked}`]:{transform:"translateX(20px)"},[`&.${Hr.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Hr.checked} + .${Hr.track}`]:{opacity:.5},[`&.${Hr.disabled} + .${Hr.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Hr.input}`]:{left:"-100%",width:"300%"}})),X(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Be(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Hr.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hr.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${Hr.checked} + .${Hr.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),Uj=z("span",{name:"MuiSwitch",slot:"Track"})(X(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,boxSizing:"border-box",border:"1px solid transparent",zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),$j=z("span",{name:"MuiSwitch",slot:"Thumb"})(X(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",boxSizing:"border-box",border:"1px solid transparent",width:20,height:20,borderRadius:"50%"}))),jj=a2.forwardRef(function(t,r){let o=q({props:t,name:"MuiSwitch"}),{className:i,color:n="primary",edge:s=!1,size:a="medium",sx:l,slots:c={},slotProps:u={},...p}=o,f={...o,color:n,edge:s,size:a},d=zj(f),h={slots:c,slotProps:u},[y,b]=ne("root",{className:H(d.root,i),elementType:Fj,externalForwardedProps:h,ownerState:f,additionalProps:{sx:l}}),[m,g]=ne("thumb",{className:d.thumb,elementType:$j,externalForwardedProps:h,ownerState:f}),v=(0,hu.jsx)(m,{...g}),[_,C]=ne("track",{className:d.track,elementType:Uj,externalForwardedProps:h,ownerState:f});return(0,hu.jsxs)(y,{...b,children:[(0,hu.jsx)(Hj,{type:"checkbox",icon:v,checkedIcon:v,ref:r,ownerState:f,...p,classes:{...d,root:d.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...u.switchBase&&{root:typeof u.switchBase=="function"?u.switchBase(f):u.switchBase},input:{role:"switch"},...u.input&&{input:typeof u.input=="function"?u.input(f):u.input}}}),(0,hu.jsx)(_,{...C})]})}),Jy=jj;var In=S(I(),1);function l2(e){return W("MuiTab",e)}var Wj=j("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","icon"]),ri=Wj;var eg=S(k(),1),Vj=e=>{let{classes:t,textColor:r,fullWidth:o,wrapped:i,icon:n,label:s,selected:a,disabled:l}=e,c={root:["root",n&&s&&"labelIcon",`textColor${K(r)}`,o&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],icon:["icon"]};return V(c,l2,t)},qj=z(At,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${K(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${ri.icon}`]:t.icon}]}})(X(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:r})=>t.icon&&t.label&&r==="top",style:{[`& > .${ri.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:r})=>t.icon&&t.label&&r==="bottom",style:{[`& > .${ri.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:r})=>t.icon&&t.label&&r==="start",style:{[`& > .${ri.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:r})=>t.icon&&t.label&&r==="end",style:{[`& > .${ri.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${ri.selected}`]:{opacity:1},[`&.${ri.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${ri.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${ri.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${ri.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${ri.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Kj=In.forwardRef(function(t,r){let o=q({props:t,name:"MuiTab"}),{className:i,disabled:n=!1,disableFocusRipple:s=!1,fullWidth:a,icon:l,iconPosition:c="top",indicator:u,label:p,onChange:f,onClick:d,onFocus:h,selected:y,selectionFollowsFocus:b,textColor:m="inherit",value:g,wrapped:v=!1,..._}=o,C=Id(),w=Fd({id:g,ref:r,disabled:n,selected:y}),O=C.getItemMap().size===0&&y?0:w.tabIndex,A={...o,disabled:n,disableFocusRipple:s,selected:y,icon:!!l,iconPosition:c,label:!!p,fullWidth:a,textColor:m,wrapped:v},B=Vj(A),D=l&&p&&In.isValidElement(l)?In.cloneElement(l,{className:H(B.icon,l.props.className)}):l,x=T=>{!y&&f&&f(T,g),d&&d(T)},R=T=>{b&&!y&&f&&f(T,g),h&&h(T)};return(0,eg.jsxs)(qj,{internalNativeButton:!0,focusRipple:!s,className:H(B.root,i),ref:w.ref,role:"tab","aria-selected":y,disabled:n,onClick:x,onFocus:R,tabIndex:O,ownerState:A,..._,children:[c==="top"||c==="start"?(0,eg.jsxs)(In.Fragment,{children:[D,p]}):(0,eg.jsxs)(In.Fragment,{children:[p,D]}),u]})}),rl=Kj;var u2=S(I(),1);function c2(e){return W("MuiToolbar",e)}var Bwe=j("MuiToolbar",["root","gutters","regular","dense"]);var p2=S(k(),1),Gj=e=>{let{classes:t,disableGutters:r,variant:o}=e;return V({root:["root",!r&&"gutters",o]},c2,t)},Yj=z("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(X(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Xj=u2.forwardRef(function(t,r){let o=q({props:t,name:"MuiToolbar"}),{className:i,component:n="div",disableGutters:s=!1,variant:a="regular",...l}=o,c={...o,component:n,disableGutters:s,variant:a},u=Gj(c);return(0,p2.jsx)(Yj,{as:n,className:H(u.root,i),ref:r,ownerState:c,...l})}),tg=Xj;var d2=S(k(),1),f2=Ie((0,d2.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft");var h2=S(k(),1),m2=Ie((0,h2.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");var et=S(I(),1);function Zj(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function q0(e,t,r,o={},i=()=>{}){let{ease:n=Zj,duration:s=300}=o,a=null,l=t[e],c=!1,u=()=>{c=!0},p=f=>{if(c){i(new Error("Animation cancelled"));return}a===null&&(a=f);let d=Math.min(1,(f-a)/s);if(t[e]=n(d)*(r-l)+l,d>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(p)};return l===r?(i(new Error("Element already at target position")),u):(requestAnimationFrame(p),u)}var Xd=S(I(),1);var y2=S(k(),1),Qj={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function K0(e){let{onChange:t,...r}=e,o=Xd.useRef(),i=Xd.useRef(null),n=()=>{o.current=i.current.offsetHeight-i.current.clientHeight};return En(()=>{let s=Dc(()=>{let l=o.current;n(),l!==o.current&&t(o.current)}),a=Zi(i.current);return a.addEventListener("resize",s),()=>{s.clear(),a.removeEventListener("resize",s)}},[t]),Xd.useEffect(()=>{n(),t(o.current)},[t]),(0,y2.jsx)("div",{style:Qj,...r,ref:i})}var b2=S(I(),1);function g2(e){return W("MuiTabScrollButton",e)}var Jj=j("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),v2=Jj;var rg=S(k(),1),e9=e=>{let{classes:t,orientation:r,disabled:o}=e;return V({root:["root",r,o&&"disabled"]},g2,t)},t9=z(At,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${v2.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),r9=b2.forwardRef(function(t,r){let o=q({props:t,name:"MuiTabScrollButton"}),{className:i,slots:n={},slotProps:s={},direction:a,orientation:l,disabled:c,...u}=o,{nativeButton:p,...f}=u,d=Tc(),h={isRtl:d,...o},y=e9(h),b=n.StartScrollButtonIcon??f2,m=n.EndScrollButtonIcon??m2,g=Mn({elementType:b,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),v=Mn({elementType:m,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return(0,rg.jsx)(t9,{component:"div",className:H(y.root,i),ref:r,role:null,ownerState:h,tabIndex:null,...f,style:{...f.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:a==="left"?(0,rg.jsx)(b,{...g}):(0,rg.jsx)(m,{...v})})}),G0=r9;function _2(e){return W("MuiTabs",e)}var o9=j("MuiTabs",["root","vertical","list","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),og=o9;var tn=S(k(),1),i9=e=>{let{vertical:t,fixed:r,hideScrollbar:o,scrollableX:i,scrollableY:n,centered:s,scrollButtonsHideMobile:a,classes:l}=e;return V({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",o&&"hideScrollbar",i&&"scrollableX",n&&"scrollableY"],list:["list",t&&"vertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]},_2,l)},n9=z("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${og.scrollButtons}`]:t.scrollButtons},{[`& .${og.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(X(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${og.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),s9=z("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),a9=z("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.list,r.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),l9=z("span",{name:"MuiTabs",slot:"Indicator"})(X(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),c9=z(K0)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),S2={};var u9=et.forwardRef(function(t,r){let o=q({props:t,name:"MuiTabs"}),i=so(),n=Tc(),{"aria-label":s,"aria-labelledby":a,action:l,centered:c=!1,children:u,className:p,component:f="div",allowScrollButtonsMobile:d=!1,indicatorColor:h="primary",onChange:y,orientation:b="horizontal",scrollButtons:m="auto",selectionFollowsFocus:g,slots:v={},slotProps:_={},textColor:C="primary",value:w,variant:E="standard",visibleScrollbar:O=!1,...A}=o,B=E==="scrollable",D=b==="vertical",x=D?"scrollTop":"scrollLeft",R=D?"top":"left",T=D?"bottom":"right",P=D?"clientHeight":"clientWidth",M=D?"height":"width",L={...o,component:f,allowScrollButtonsMobile:d,indicatorColor:h,orientation:b,vertical:D,scrollButtons:m,textColor:C,variant:E,visibleScrollbar:O,fixed:!B,hideScrollbar:B&&!O,scrollableX:B&&!D,scrollableY:B&&D,centered:c&&!B,scrollButtonsHideMobile:!d},N=i9(L),Y=Mn({elementType:v.startScrollButtonIcon,externalSlotProps:_.startScrollButtonIcon,ownerState:L}),ee=Mn({elementType:v.endScrollButtonIcon,externalSlotProps:_.endScrollButtonIcon,ownerState:L}),[Q,fe]=et.useState(!1),[ve,he]=et.useState(S2),[ae,re]=et.useState(!1),[pe,te]=et.useState(!1),[ie,Pe]=et.useState(!1),gt=w===!1?null:w,[be,oe]=et.useState(!1),[dt,xr]=et.useState({overflow:"hidden",scrollbarWidth:0}),ft=new Map,Ze=et.useRef(null),vt=et.useRef(null),we={slots:v,slotProps:_},Ir=()=>{let le=Ze.current,ce;if(le){let je=le.getBoundingClientRect();ce={clientWidth:le.clientWidth,scrollLeft:le.scrollLeft,scrollTop:le.scrollTop,scrollWidth:le.scrollWidth,top:je.top,bottom:je.bottom,left:je.left,right:je.right}}let Qe;if(le&&w!==!1){let je=vt.current.children;if(je.length>0){let Tr=je[ft.get(w)];Qe=Tr?Tr.getBoundingClientRect():null}}return{tabsMeta:ce,tabMeta:Qe}},lr=Qo(()=>{let{tabsMeta:le,tabMeta:ce}=Ir(),Qe=0,je;D?(je="top",ce&&le&&(Qe=ce.top-le.top+le.scrollTop)):(je=n?"right":"left",ce&&le&&(Qe=(n?-1:1)*(ce[je]-le[je]+le.scrollLeft)));let Tr={[je]:Qe,[M]:ce?ce[M]:0};if(typeof ve[je]!="number"||typeof ve[M]!="number")he(Tr);else{let _a=Math.abs(ve[je]-Tr[je]),Sa=Math.abs(ve[M]-Tr[M]);(_a>=1||Sa>=1)&&he(Tr)}}),kt=(le,{animation:ce=!0}={})=>{ce?q0(x,Ze.current,le,{duration:i.transitions.duration.standard}):Ze.current[x]=le},Hi=le=>{let ce=Ze.current[x];D?ce+=le:ce+=le*(n?-1:1),kt(ce)},So=()=>{let le=Ze.current[P],ce=0,Qe=Array.from(vt.current.children);for(let je=0;je<Qe.length;je+=1){let Tr=Qe[je];if(ce+Tr[P]>le){je===0&&(ce=le);break}ce+=Tr[P]}return ce},Ti=()=>{Hi(-1*So())},st=()=>{Hi(So())},[Fe,{onChange:bt,...Te}]=ne("scrollbar",{className:H(N.scrollableX,N.hideScrollbar),elementType:c9,shouldForwardComponentProp:!0,externalForwardedProps:we,ownerState:L}),Wr=et.useCallback(le=>{bt?.(le),xr({overflow:null,scrollbarWidth:le})},[bt]),[Ci,ms]=ne("scrollButtons",{className:N.scrollButtons,elementType:G0,externalForwardedProps:we,ownerState:L,additionalProps:{orientation:b,slots:{StartScrollButtonIcon:v.startScrollButtonIcon,EndScrollButtonIcon:v.endScrollButtonIcon},slotProps:{startScrollButtonIcon:Y,endScrollButtonIcon:ee}}}),ba=()=>{let le={};le.scrollbarSizeListener=B?(0,tn.jsx)(Fe,{...Te,onChange:Wr}):null;let Qe=B&&(m==="auto"&&(ae||pe)||m===!0);return le.scrollButtonStart=Qe?(0,tn.jsx)(Ci,{direction:n?"right":"left",onClick:Ti,disabled:!ae,...ms}):null,le.scrollButtonEnd=Qe?(0,tn.jsx)(Ci,{direction:n?"left":"right",onClick:st,disabled:!pe,...ms}):null,le},ht=Qo(le=>{let{tabsMeta:ce,tabMeta:Qe}=Ir();if(!(!Qe||!ce)){if(Qe[R]<ce[R]){let je=ce[x]+(Qe[R]-ce[R]);kt(je,{animation:le})}else if(Qe[T]>ce[T]){let je=ce[x]+(Qe[T]-ce[T]);kt(je,{animation:le})}}}),wi=Qo(()=>{B&&m!==!1&&Pe(!ie)});et.useEffect(()=>{let le=Dc(()=>{Ze.current&&lr()}),ce,Qe=_a=>{_a.forEach(Sa=>{Sa.removedNodes.forEach(Bp=>{ce?.unobserve(Bp)}),Sa.addedNodes.forEach(Bp=>{ce?.observe(Bp)})}),le(),wi()},je=Zi(Ze.current);je.addEventListener("resize",le);let Tr;return typeof ResizeObserver<"u"&&(ce=new ResizeObserver(le),Array.from(vt.current.children).forEach(_a=>{ce.observe(_a)})),typeof MutationObserver<"u"&&(Tr=new MutationObserver(Qe),Tr.observe(vt.current,{childList:!0})),()=>{le.clear(),je.removeEventListener("resize",le),Tr?.disconnect(),ce?.disconnect()}},[lr,wi]),et.useEffect(()=>{let le=Array.from(vt.current.children),ce=le.length;if(typeof IntersectionObserver<"u"&&ce>0&&B&&m!==!1){let Qe=le[0],je=le[ce-1],Tr={root:Ze.current,threshold:.99},_a=Ub=>{re(!Ub[0].isIntersecting)},Sa=new IntersectionObserver(_a,Tr);Sa.observe(Qe);let Bp=Ub=>{te(!Ub[0].isIntersecting)},OC=new IntersectionObserver(Bp,Tr);return OC.observe(je),()=>{Sa.disconnect(),OC.disconnect()}}},[B,m,ie,u?.length]),et.useEffect(()=>{fe(!0)},[]),et.useEffect(()=>{lr()}),et.useEffect(()=>{ht(S2!==ve)},[ht,ve]),et.useImperativeHandle(l,()=>({updateIndicator:lr,updateScrollButtons:wi}),[lr,wi]);let[Dp,Fh]=ne("indicator",{className:N.indicator,elementType:l9,externalForwardedProps:we,ownerState:L,additionalProps:{style:ve}}),Hh=(0,tn.jsx)(Dp,{...Fh}),Mp=zd({activeItemId:be?void 0:gt,orientation:b,isRtl:n}),Ap=Mp.getContainerProps(),He=et.Children.toArray(u).filter(et.isValidElement).map((le,ce)=>{let Qe=le.props.value===void 0?ce:le.props.value;return ft.set(Qe,ce),{child:le,index:ce,childValue:Qe}}).map(({child:le,childValue:ce})=>{let Qe=ce===w;return et.cloneElement(le,{fullWidth:E==="fullWidth",indicator:Qe&&!Q&&Hh,selected:Qe,selectionFollowsFocus:g,onChange:y,textColor:C,value:ce})}),$t=ba(),[ys,Uh]=ne("root",{ref:r,className:H(N.root,p),elementType:n9,externalForwardedProps:{...we,...A,component:f},ownerState:L}),[$I,jI]=ne("scroller",{ref:Ze,className:N.scroller,elementType:s9,externalForwardedProps:we,ownerState:L,additionalProps:{style:{overflow:dt.overflow,[D?`margin${n?"Left":"Right"}`:"marginBottom"]:O?void 0:-dt.scrollbarWidth}}}),WI=Mt(Ap.ref,vt),VI=le=>{let ce=vt.current;Yi(Xi(ce))?.getAttribute("role")==="tab"&&Ap.onKeyDown(le)},[qI,KI]=ne("list",{ref:WI,className:N.list,elementType:a9,externalForwardedProps:we,ownerState:L,getSlotProps:le=>({...le,onBlur:ce=>{ce.currentTarget.contains(ce.relatedTarget)||oe(!1),le.onBlur?.(ce)},onKeyDown:ce=>{VI(ce),le.onKeyDown?.(ce)},onFocus:ce=>{oe(!0),Ap.onFocus(ce),le.onFocus?.(ce)}})});return(0,tn.jsxs)(ys,{...Uh,children:[$t.scrollButtonStart,$t.scrollbarSizeListener,(0,tn.jsxs)($I,{...jI,children:[(0,tn.jsx)(qI,{"aria-label":s,"aria-labelledby":a,"aria-orientation":b==="vertical"?"vertical":null,role:"tablist",...KI,children:(0,tn.jsx)(lu.Provider,{value:Mp,children:He})}),Q&&Hh]}),$t.scrollButtonEnd]})}),Zd=u9;var T2=S(I(),1);function x2(e){return W("MuiTextField",e)}var VRe=j("MuiTextField",["root"]);var ol=S(k(),1),p9={standard:Bd,filled:Md,outlined:qd},d9=e=>{let{classes:t}=e;return V({root:["root"]},x2,t)},f9=z(ru,{name:"MuiTextField",slot:"Root"})({}),h9=T2.forwardRef(function(t,r){let o=q({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:n=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:p=!1,fullWidth:f=!1,helperText:d,id:h,inputRef:y,label:b,maxRows:m,minRows:g,multiline:v=!1,name:_,onBlur:C,onChange:w,onFocus:E,placeholder:O,required:A=!1,rows:B,select:D=!1,slots:x={},slotProps:R={},type:T,value:P,variant:M="outlined",...L}=o,N={...o,autoFocus:n,color:l,disabled:u,error:p,fullWidth:f,multiline:v,required:A,select:D,variant:M},Y=d9(N),ee=Ro(h),Q=d&&ee?`${ee}-helper-text`:void 0,fe=b&&ee?`${ee}-label`:void 0,ve=p9[M],he={slots:x,slotProps:R},[ae,re]=ne("select",{elementType:fu,externalForwardedProps:he,ownerState:N}),pe=D&&re.native,te={},ie=he.slotProps.inputLabel;M==="outlined"&&(ie&&typeof ie.shrink<"u"&&(te.notched=ie.shrink),te.label=b),D&&(pe||(te.id=void 0),te["aria-describedby"]=void 0);let[Pe,gt]=ne("root",{elementType:f9,shouldForwardComponentProp:!0,externalForwardedProps:{...he,...L},ownerState:N,className:H(Y.root,a),ref:r,additionalProps:{disabled:u,error:p,fullWidth:f,required:A,color:l,variant:M}}),[be,oe]=ne("input",{elementType:ve,externalForwardedProps:he,additionalProps:te,ownerState:N}),[dt,xr]=ne("inputLabel",{elementType:R0,externalForwardedProps:he,ownerState:N}),[ft,Ze]=ne("htmlInput",{elementType:"input",externalForwardedProps:he,ownerState:N}),[vt,we]=ne("formHelperText",{elementType:x0,externalForwardedProps:he,ownerState:N}),Ir=(0,ol.jsx)(be,{"aria-describedby":Q,autoComplete:i,autoFocus:n,defaultValue:c,fullWidth:f,multiline:v,name:_,rows:B,maxRows:m,minRows:g,type:T,value:P,id:ee,inputRef:y,onBlur:C,onChange:w,onFocus:E,placeholder:O,inputProps:Ze,slots:{input:x.htmlInput?ft:void 0},...oe});return(0,ol.jsxs)(Pe,{...gt,children:[b!=null&&b!==""&&(0,ol.jsx)(dt,{htmlFor:D&&!pe?void 0:ee,id:fe,...D&&!pe&&{component:"div"},...xr,children:b}),D?(0,ol.jsx)(ae,{"aria-describedby":Q,id:ee,labelId:fe,value:P,input:Ir,...re,children:s}):Ir,d&&(0,ol.jsx)(vt,{id:Q,...we,children:d})]})}),Yt=h9;var HI=S(I(),1),UI=S(XA(),1);var go=S(I(),1),se=S(I(),1),pt=S(I(),1),VT=S(I(),1),PB=S(I(),1),Me=S(I(),1),GV=S(I(),1),YV=S(I(),1),XV=S(I(),1),ue=S(I(),1),HB=S(I(),1),lq={};var ZA="popstate";function QA(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function nB(e={}){function t(o,i){let n=i.state?.masked,{pathname:s,search:a,hash:l}=n||o.location;return OT("",{pathname:s,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default",n?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function r(o,i){return typeof i=="string"?i:np(i)}return $W(t,r,null,e)}function yt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ho(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function UW(){return Math.random().toString(36).substring(2,10)}function JA(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function OT(e,t,r=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Cl(t):t,state:r,key:t&&t.key||o||UW(),unstable_mask:i}}function np({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Cl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function $W(e,t,r,o={}){let{window:i=document.defaultView,v5Compat:n=!1}=o,s=i.history,a="POP",l=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function p(){a="POP";let b=u(),m=b==null?null:b-c;c=b,l&&l({action:a,location:y.location,delta:m})}function f(b,m){a="PUSH";let g=QA(b)?b:OT(y.location,b,m);r&&r(g,b),c=u()+1;let v=JA(g,c),_=y.createHref(g.unstable_mask||g);try{s.pushState(v,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(_)}n&&l&&l({action:a,location:y.location,delta:1})}function d(b,m){a="REPLACE";let g=QA(b)?b:OT(y.location,b,m);r&&r(g,b),c=u();let v=JA(g,c),_=y.createHref(g.unstable_mask||g);s.replaceState(v,"",_),n&&l&&l({action:a,location:y.location,delta:0})}function h(b){return jW(b)}let y={get action(){return a},get location(){return e(i,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(ZA,p),l=b,()=>{i.removeEventListener(ZA,p),l=null}},createHref(b){return t(i,b)},createURL:h,encodeLocation(b){let m=h(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:d,go(b){return s.go(b)}};return y}function jW(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),yt(r,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:np(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=r+o),new URL(o,r)}var WW;WW=new WeakMap;function BT(e,t,r="/"){return VW(e,t,r,!1)}function VW(e,t,r,o){let i=typeof t=="string"?Cl(t):t,n=pn(i.pathname||"/",r);if(n==null)return null;let s=sB(e);KW(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let c=iV(n);a=rV(s[l],c,o)}return a}function qW(e,t){let{route:r,pathname:o,params:i}=e;return{id:r.id,pathname:o,params:i,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function sB(e,t=[],r=[],o="",i=!1){let n=(s,a,l=i,c)=>{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(o)&&l)return;yt(u.relativePath.startsWith(o),`Absolute route path "${u.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(o.length)}let p=un([o,u.relativePath]),f=r.concat(u);s.children&&s.children.length>0&&(yt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),sB(s.children,t,f,p,l)),!(s.path==null&&!s.index)&&t.push({path:p,score:eV(p,s.index),routesMeta:f})};return e.forEach((s,a)=>{if(s.path===""||!s.path?.includes("?"))n(s,a);else for(let l of aB(s.path))n(s,a,!0,l)}),t}function aB(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,i=r.endsWith("?"),n=r.replace(/\?$/,"");if(o.length===0)return i?[n,""]:[n];let s=aB(o.join("/")),a=[];return a.push(...s.map(l=>l===""?n:[n,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function KW(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:tV(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var GW=/^:[\w-]+$/,YW=3,XW=2,ZW=1,QW=10,JW=-2,eB=e=>e==="*";function eV(e,t){let r=e.split("/"),o=r.length;return r.some(eB)&&(o+=JW),t&&(o+=XW),r.filter(i=>!eB(i)).reduce((i,n)=>i+(GW.test(n)?YW:n===""?ZW:QW),o)}function tV(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function rV(e,t,r=!1){let{routesMeta:o}=e,i={},n="/",s=[];for(let a=0;a<o.length;++a){let l=o[a],c=a===o.length-1,u=n==="/"?t:t.slice(n.length)||"/",p=eh({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!p&&c&&r&&!o[o.length-1].route.index&&(p=eh({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!p)return null;Object.assign(i,p.params),s.push({params:i,pathname:un([n,p.pathname]),pathnameBase:aV(un([n,p.pathnameBase])),route:f}),p.pathnameBase!=="/"&&(n=un([n,p.pathnameBase]))}return s}function eh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=oV(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let n=i[0],s=n.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:o.reduce((c,{paramName:u,isOptional:p},f)=>{if(u==="*"){let h=a[f]||"";s=n.slice(0,n.length-h.length).replace(/(.)\/+$/,"$1")}let d=a[f];return p&&!d?c[u]=void 0:c[u]=(d||"").replace(/%2F/g,"/"),c},{}),pathname:n,pathnameBase:s,pattern:e}}function oV(e,t=!1,r=!0){Ho(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l,c,u)=>{if(o.push({paramName:a,isOptional:l!=null}),l){let p=u.charAt(c+s.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function iV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ho(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function pn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}var nV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function lB(e,t="/"){let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?Cl(e):e,n;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?n=tB(r.substring(1),"/"):n=tB(r,t)):n=t,{pathname:n,search:lV(o),hash:cV(i)}}function tB(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function PT(e,t,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sV(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function NT(e){let t=sV(e);return t.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase)}function Iv(e,t,r,o=!1){let i;typeof e=="string"?i=Cl(e):(i={...e},yt(!i.pathname||!i.pathname.includes("?"),PT("?","pathname","search",i)),yt(!i.pathname||!i.pathname.includes("#"),PT("#","pathname","hash",i)),yt(!i.search||!i.search.includes("#"),PT("#","search","hash",i)));let n=e===""||i.pathname==="",s=n?"/":i.pathname,a;if(s==null)a=r;else{let p=t.length-1;if(!o&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),p-=1;i.pathname=f.join("/")}a=p>=0?t[p]:"/"}let l=lB(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(n||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var un=e=>e.join("/").replace(/\/\/+/g,"/"),aV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var cB=class{constructor(e,t,r,o=!1){this.status=e,this.statusText=t||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function uB(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function uV(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var pB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function dB(e,t){let r=e;if(typeof r!="string"||!nV.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,i=!1;if(pB)try{let n=new URL(window.location.href),s=r.startsWith("//")?new URL(n.protocol+r):new URL(r),a=pn(s.pathname,t);s.origin===n.origin&&a!=null?r=a+s.search+s.hash:i=!0}catch{Ho(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:i,to:r}}var y2e=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fB=["POST","PUT","PATCH","DELETE"],g2e=new Set(fB),pV=["GET",...fB],v2e=new Set(pV);var wl=go.createContext(null);wl.displayName="DataRouter";var sp=go.createContext(null);sp.displayName="DataRouterState";var hB=go.createContext(!1);function dV(){return go.useContext(hB)}var LT=go.createContext({isTransitioning:!1});LT.displayName="ViewTransition";var mB=go.createContext(new Map);mB.displayName="Fetchers";var fV=go.createContext(null);fV.displayName="Await";var $r=go.createContext(null);$r.displayName="Navigation";var ap=go.createContext(null);ap.displayName="Location";var hi=go.createContext({outlet:null,matches:[],isDataRoute:!1});hi.displayName="Route";var IT=go.createContext(null);IT.displayName="RouteError";var DT=!0,yB="REACT_ROUTER_ERROR",hV="REDIRECT",mV="ROUTE_ERROR_RESPONSE";function yV(e){if(e.startsWith(`${yB}:${hV}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function gV(e){if(e.startsWith(`${yB}:${mV}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new cB(t.status,t.statusText,t.data)}catch{}}function gB(e,{relative:t}={}){yt(Rl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=se.useContext($r),{hash:i,pathname:n,search:s}=lp(e,{relative:t}),a=n;return r!=="/"&&(a=n==="/"?r:un([r,n])),o.createHref({pathname:a,search:s,hash:i})}function Rl(){return se.useContext(ap)!=null}function Qr(){return yt(Rl(),"useLocation() may be used only in the context of a <Router> component."),se.useContext(ap).location}var vB="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function bB(e){se.useContext($r).static||se.useLayoutEffect(e)}function vo(){let{isDataRoute:e}=se.useContext(hi);return e?PV():vV()}function vV(){yt(Rl(),"useNavigate() may be used only in the context of a <Router> component.");let e=se.useContext(wl),{basename:t,navigator:r}=se.useContext($r),{matches:o}=se.useContext(hi),{pathname:i}=Qr(),n=JSON.stringify(NT(o)),s=se.useRef(!1);return bB(()=>{s.current=!0}),se.useCallback((l,c={})=>{if(Ho(s.current,vB),!s.current)return;if(typeof l=="number"){r.go(l);return}let u=Iv(l,JSON.parse(n),i,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:un([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,n,i,e])}var b2e=se.createContext(null);function zT(){let{matches:e}=se.useContext(hi),t=e[e.length-1];return t?t.params:{}}function lp(e,{relative:t}={}){let{matches:r}=se.useContext(hi),{pathname:o}=Qr(),i=JSON.stringify(NT(r));return se.useMemo(()=>Iv(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function _B(e,t){return SB(e,t)}function SB(e,t,r){yt(Rl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=se.useContext($r),{matches:i}=se.useContext(hi),n=i[i.length-1],s=n?n.params:{},a=n?n.pathname:"/",l=n?n.pathnameBase:"/",c=n&&n.route;if(DT){let b=c&&c.path||"";wB(a,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
147
+
148
+ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let u=Qr(),p;if(t){let b=typeof t=="string"?Cl(t):t;yt(l==="/"||b.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${b.pathname}" was given in the \`location\` prop.`),p=b}else p=u;let f=p.pathname||"/",d=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let h=BT(e,{pathname:d});DT&&(Ho(c||h!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Ho(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let y=TV(h&&h.map(b=>Object.assign({},b,{params:Object.assign({},s,b.params),pathname:un([l,o.encodeLocation?o.encodeLocation(b.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:un([l,o.encodeLocation?o.encodeLocation(b.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),i,r);return t&&y?se.createElement(ap.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...p},navigationType:"POP"}},y):y}function bV(){let e=CB(),t=uB(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},n={padding:"2px 4px",backgroundColor:o},s=null;return DT&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=se.createElement(se.Fragment,null,se.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),se.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",se.createElement("code",{style:n},"ErrorBoundary")," or"," ",se.createElement("code",{style:n},"errorElement")," prop on your route."))),se.createElement(se.Fragment,null,se.createElement("h2",null,"Unexpected Application Error!"),se.createElement("h3",{style:{fontStyle:"italic"}},t),r?se.createElement("pre",{style:i},r):null,s)}var _V=se.createElement(bV,null),xB=class extends se.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=gV(e.digest);r&&(e=r)}let t=e!==void 0?se.createElement(hi.Provider,{value:this.props.routeContext},se.createElement(IT.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?se.createElement(SV,{error:e},t):t}};xB.contextType=hB;var ET=new WeakMap;function SV({children:e,error:t}){let{basename:r}=se.useContext($r);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=yV(t.digest);if(o){let i=ET.get(t);if(i)throw i;let n=dB(o.location,r);if(pB&&!ET.get(t))if(n.isExternal||o.reloadDocument)window.location.href=n.absoluteURL||n.to;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(n.to,{replace:o.replace}));throw ET.set(t,s),s}return se.createElement("meta",{httpEquiv:"refresh",content:`0;url=${n.absoluteURL||n.to}`})}}return e}function xV({routeContext:e,match:t,children:r}){let o=se.useContext(wl);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),se.createElement(hi.Provider,{value:e},r)}function TV(e,t=[],r){let o=r?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,n=o?.errors;if(n!=null){let u=i.findIndex(p=>p.route.id&&n?.[p.route.id]!==void 0);yt(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(n).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let s=!1,a=-1;if(r&&o){s=o.renderFallback;for(let u=0;u<i.length;u++){let p=i[u];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(a=u),p.route.id){let{loaderData:f,errors:d}=o,h=p.route.loader&&!f.hasOwnProperty(p.route.id)&&(!d||d[p.route.id]===void 0);if(p.route.lazy||h){r.isStatic&&(s=!0),a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}}let l=r?.onError,c=o&&l?(u,p)=>{l(u,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:uV(o.matches),errorInfo:p})}:void 0;return i.reduceRight((u,p,f)=>{let d,h=!1,y=null,b=null;o&&(d=n&&p.route.id?n[p.route.id]:void 0,y=p.route.errorElement||_V,s&&(a<0&&f===0?(wB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,b=null):a===f&&(h=!0,b=p.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,f+1)),g=()=>{let v;return d?v=y:h?v=b:p.route.Component?v=se.createElement(p.route.Component,null):p.route.element?v=p.route.element:v=u,se.createElement(xV,{match:p,routeContext:{outlet:u,matches:m,isDataRoute:o!=null},children:v})};return o&&(p.route.ErrorBoundary||p.route.errorElement||f===0)?se.createElement(xB,{location:o.location,revalidation:o.revalidation,component:y,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):g()},null)}function FT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function CV(e){let t=se.useContext(wl);return yt(t,FT(e)),t}function HT(e){let t=se.useContext(sp);return yt(t,FT(e)),t}function wV(e){let t=se.useContext(hi);return yt(t,FT(e)),t}function UT(e){let t=wV(e),r=t.matches[t.matches.length-1];return yt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function RV(){return UT("useRouteId")}function TB(){return HT("useNavigation").navigation}function $T(){let{matches:e,loaderData:t}=HT("useMatches");return se.useMemo(()=>e.map(r=>qW(r,t)),[e,t])}function CB(){let e=se.useContext(IT),t=HT("useRouteError"),r=UT("useRouteError");return e!==void 0?e:t.errors?.[r]}function PV(){let{router:e}=CV("useNavigate"),t=UT("useNavigate"),r=se.useRef(!1);return bB(()=>{r.current=!0}),se.useCallback(async(i,n={})=>{Ho(r.current,vB),r.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...n}))},[e,t])}var rB={};function wB(e,t,r){!t&&!rB[e]&&(rB[e]=!0,Ho(!1,r))}var EV="useOptimistic",_2e=pt[EV];var S2e=pt.memo(kV);function kV({routes:e,future:t,state:r,isStatic:o,onError:i}){return SB(e,void 0,{state:r,isStatic:o,onError:i,future:t})}function jT({to:e,replace:t,state:r,relative:o}){yt(Rl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=pt.useContext($r);Ho(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:n}=pt.useContext(hi),{pathname:s}=Qr(),a=vo(),l=Iv(e,NT(n),s,o==="path"),c=JSON.stringify(l);return pt.useEffect(()=>{a(JSON.parse(c),{replace:t,state:r,relative:o})},[a,c,o,t,r]),null}function Uo(e){yt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function WT({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:i,static:n=!1,unstable_useTransitions:s}){yt(!Rl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=pt.useMemo(()=>({basename:a,navigator:i,static:n,unstable_useTransitions:s,future:{}}),[a,i,n,s]);typeof r=="string"&&(r=Cl(r));let{pathname:c="/",search:u="",hash:p="",state:f=null,key:d="default",unstable_mask:h}=r,y=pt.useMemo(()=>{let b=pn(c,a);return b==null?null:{location:{pathname:b,search:u,hash:p,state:f,key:d,unstable_mask:h},navigationType:o}},[a,c,u,p,f,d,o,h]);return Ho(y!=null,`<Router basename="${a}"> is not able to match the URL "${c}${u}${p}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:pt.createElement($r.Provider,{value:l},pt.createElement(ap.Provider,{children:t,value:y}))}function Pl({children:e,location:t}){return _B(Lv(e),t)}function Lv(e,t=[]){let r=[];return pt.Children.forEach(e,(o,i)=>{if(!pt.isValidElement(o))return;let n=[...t,i];if(o.type===pt.Fragment){r.push.apply(r,Lv(o.props.children,n));return}yt(o.type===Uo,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),yt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let s={id:o.props.id||n.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(s.children=Lv(o.props.children,n)),r.push(s)}),r}var Bv="get",Nv="application/x-www-form-urlencoded";function zv(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function OV(e){return zv(e)&&e.tagName.toLowerCase()==="button"}function DV(e){return zv(e)&&e.tagName.toLowerCase()==="form"}function MV(e){return zv(e)&&e.tagName.toLowerCase()==="input"}function AV(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BV(e,t){return e.button===0&&(!t||t==="_self")&&!AV(e)}var Mv=null;function NV(){if(Mv===null)try{new FormData(document.createElement("form"),0),Mv=!1}catch{Mv=!0}return Mv}var LV=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kT(e){return e!=null&&!LV.has(e)?(Ho(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nv}"`),null):e}function IV(e,t){let r,o,i,n,s;if(DV(e)){let a=e.getAttribute("action");o=a?pn(a,t):null,r=e.getAttribute("method")||Bv,i=kT(e.getAttribute("enctype"))||Nv,n=new FormData(e)}else if(OV(e)||MV(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(o=l?pn(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||Bv,i=kT(e.getAttribute("formenctype"))||kT(a.getAttribute("enctype"))||Nv,n=new FormData(a,e),!NV()){let{name:c,type:u,value:p}=e;if(u==="image"){let f=c?`${c}.`:"";n.append(`${f}x`,"0"),n.append(`${f}y`,"0")}else c&&n.append(c,p)}}else{if(zv(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Bv,o=null,i=Nv,s=e}return n&&i==="text/plain"&&(s=n,n=void 0),{action:o,method:r.toLowerCase(),encType:i,formData:n,body:s}}var x2e=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zV={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},FV=/[&><\u2028\u2029]/g;function oB(e){return e.replace(FV,t=>zV[t])}function qT(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function RB(e,t,r,o){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${o}`:i.pathname=`${i.pathname}.${o}`:i.pathname==="/"?i.pathname=`_root.${o}`:t&&pn(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function HV(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&lq.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function UV(e){return e!=null&&typeof e.page=="string"}function $V(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function jV(e,t,r){let o=await Promise.all(e.map(async i=>{let n=t.routes[i.route.id];if(n){let s=await HV(n,r);return s.links?s.links():[]}return[]}));return KV(o.flat(1).filter($V).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function iB(e,t,r,o,i,n){let s=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,a=(l,c)=>r[c].pathname!==l.pathname||r[c].route.path?.endsWith("*")&&r[c].params["*"]!==l.params["*"];return n==="assets"?t.filter((l,c)=>s(l,c)||a(l,c)):n==="data"?t.filter((l,c)=>{let u=o.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(s(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function WV(e,t,{includeHydrateFallback:r}={}){return VV(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let n=[i.module];return i.clientActionModule&&(n=n.concat(i.clientActionModule)),i.clientLoaderModule&&(n=n.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(n=n.concat(i.hydrateFallbackModule)),i.imports&&(n=n.concat(i.imports)),n}).flat(1))}function VV(e){return[...new Set(e)]}function qV(e){let t={},r=Object.keys(e).sort();for(let o of r)t[o]=e[o];return t}function KV(e,t){let r=new Set,o=new Set(t);return e.reduce((i,n)=>{if(t&&!UV(n)&&n.as==="script"&&n.href&&o.has(n.href))return i;let a=JSON.stringify(qV(n));return r.has(a)||(r.add(a),i.push({key:a,link:n})),i},[])}function KT(){let e=Me.useContext(wl);return qT(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ZV(){let e=Me.useContext(sp);return qT(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var th=Me.createContext(void 0);th.displayName="FrameworkContext";function GT(){let e=Me.useContext(th);return qT(e,"You must render this element inside a <HydratedRouter> element"),e}function QV(e,t){let r=Me.useContext(th),[o,i]=Me.useState(!1),[n,s]=Me.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:p}=t,f=Me.useRef(null);Me.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let y=m=>{m.forEach(g=>{s(g.isIntersecting)})},b=new IntersectionObserver(y,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[e]),Me.useEffect(()=>{if(o){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[o]);let d=()=>{i(!0)},h=()=>{i(!1),s(!1)};return r?e!=="intent"?[n,f,{}]:[n,f,{onFocus:Jf(a,d),onBlur:Jf(l,h),onMouseEnter:Jf(c,d),onMouseLeave:Jf(u,h),onTouchStart:Jf(p,d)}]:[!1,f,{}]}function Jf(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function EB({page:e,...t}){let r=dV(),{router:o}=KT(),i=Me.useMemo(()=>BT(o.routes,e,o.basename),[o.routes,e,o.basename]);return i?r?Me.createElement(eq,{page:e,matches:i,...t}):Me.createElement(tq,{page:e,matches:i,...t}):null}function JV(e){let{manifest:t,routeModules:r}=GT(),[o,i]=Me.useState([]);return Me.useEffect(()=>{let n=!1;return jV(e,t,r).then(s=>{n||i(s)}),()=>{n=!0}},[e,t,r]),o}function eq({page:e,matches:t,...r}){let o=Qr(),{future:i}=GT(),{basename:n}=KT(),s=Me.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let a=RB(e,n,i.unstable_trailingSlashAwareDataRequests,"rsc"),l=!1,c=[];for(let u of t)typeof u.route.shouldRevalidate=="function"?l=!0:c.push(u.route.id);return l&&c.length>0&&a.searchParams.set("_routes",c.join(",")),[a.pathname+a.search]},[n,i.unstable_trailingSlashAwareDataRequests,e,o,t]);return Me.createElement(Me.Fragment,null,s.map(a=>Me.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...r})))}function tq({page:e,matches:t,...r}){let o=Qr(),{future:i,manifest:n,routeModules:s}=GT(),{basename:a}=KT(),{loaderData:l,matches:c}=ZV(),u=Me.useMemo(()=>iB(e,t,c,n,o,"data"),[e,t,c,n,o]),p=Me.useMemo(()=>iB(e,t,c,n,o,"assets"),[e,t,c,n,o]),f=Me.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let y=new Set,b=!1;if(t.forEach(g=>{let v=n.routes[g.route.id];!v||!v.hasLoader||(!u.some(_=>_.route.id===g.route.id)&&g.route.id in l&&s[g.route.id]?.shouldRevalidate||v.hasClientLoader?b=!0:y.add(g.route.id))}),y.size===0)return[];let m=RB(e,a,i.unstable_trailingSlashAwareDataRequests,"data");return b&&y.size>0&&m.searchParams.set("_routes",t.filter(g=>y.has(g.route.id)).map(g=>g.route.id).join(",")),[m.pathname+m.search]},[a,i.unstable_trailingSlashAwareDataRequests,l,o,n,u,t,e,s]),d=Me.useMemo(()=>WV(p,n),[p,n]),h=JV(p);return Me.createElement(Me.Fragment,null,f.map(y=>Me.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),d.map(y=>Me.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),h.map(({key:y,link:b})=>Me.createElement("link",{key:y,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function rq(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var oq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oq&&(window.__reactRouterVersion="7.14.0")}catch{}function YT({basename:e,children:t,unstable_useTransitions:r,window:o}){let i=ue.useRef();i.current==null&&(i.current=nB({window:o,v5Compat:!0}));let n=i.current,[s,a]=ue.useState({action:n.action,location:n.location}),l=ue.useCallback(c=>{r===!1?a(c):ue.startTransition(()=>a(c))},[r]);return ue.useLayoutEffect(()=>n.listen(l),[n,l]),ue.createElement(WT,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:n,unstable_useTransitions:r})}function kB({basename:e,children:t,history:r,unstable_useTransitions:o}){let[i,n]=ue.useState({action:r.action,location:r.location}),s=ue.useCallback(a=>{o===!1?n(a):ue.startTransition(()=>n(a))},[o]);return ue.useLayoutEffect(()=>r.listen(s),[r,s]),ue.createElement(WT,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:r,unstable_useTransitions:o})}kB.displayName="unstable_HistoryRouter";var OB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XT=ue.forwardRef(function({onClick:t,discover:r="render",prefetch:o="none",relative:i,reloadDocument:n,replace:s,unstable_mask:a,state:l,target:c,to:u,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:d,...h},y){let{basename:b,navigator:m,unstable_useTransitions:g}=ue.useContext($r),v=typeof u=="string"&&OB.test(u),_=dB(u,b);u=_.to;let C=gB(u,{relative:i}),w=Qr(),E=null;if(a){let P=Iv(a,[],w.unstable_mask?w.unstable_mask.pathname:"/",!0);b!=="/"&&(P.pathname=P.pathname==="/"?b:un([b,P.pathname])),E=m.createHref(P)}let[O,A,B]=QV(o,h),D=NB(u,{replace:s,unstable_mask:a,state:l,target:c,preventScrollReset:p,relative:i,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:g});function x(P){t&&t(P),P.defaultPrevented||D(P)}let R=!(_.isExternal||n),T=ue.createElement("a",{...h,...B,href:(R?E:void 0)||_.absoluteURL||C,onClick:R?x:t,ref:rq(y,A),target:c,"data-discover":!v&&r==="render"?"true":void 0});return O&&!v?ue.createElement(ue.Fragment,null,T,ue.createElement(EB,{page:C})):T});XT.displayName="Link";var DB=ue.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:o="",end:i=!1,style:n,to:s,viewTransition:a,children:l,...c},u){let p=lp(s,{relative:c.relative}),f=Qr(),d=ue.useContext(sp),{navigator:h,basename:y}=ue.useContext($r),b=d!=null&&FB(p)&&a===!0,m=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,g=f.pathname,v=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;r||(g=g.toLowerCase(),v=v?v.toLowerCase():null,m=m.toLowerCase()),v&&y&&(v=pn(v,y)||v);let _=m!=="/"&&m.endsWith("/")?m.length-1:m.length,C=g===m||!i&&g.startsWith(m)&&g.charAt(_)==="/",w=v!=null&&(v===m||!i&&v.startsWith(m)&&v.charAt(m.length)==="/"),E={isActive:C,isPending:w,isTransitioning:b},O=C?t:void 0,A;typeof o=="function"?A=o(E):A=[o,C?"active":null,w?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let B=typeof n=="function"?n(E):n;return ue.createElement(XT,{...c,"aria-current":O,className:A,ref:u,style:B,to:s,viewTransition:a},typeof l=="function"?l(E):l)});DB.displayName="NavLink";var MB=ue.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:o,replace:i,state:n,method:s=Bv,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:p,unstable_defaultShouldRevalidate:f,...d},h)=>{let{unstable_useTransitions:y}=ue.useContext($r),b=LB(),m=IB(a,{relative:c}),g=s.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&OB.test(a);return ue.createElement("form",{ref:h,method:g,action:m,onSubmit:o?l:C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let w=C.nativeEvent.submitter,E=w?.getAttribute("formmethod")||s,O=()=>b(w||C.currentTarget,{fetcherKey:t,method:E,navigate:r,replace:i,state:n,relative:c,preventScrollReset:u,viewTransition:p,unstable_defaultShouldRevalidate:f});y&&r!==!1?ue.startTransition(()=>O()):O()},...d,"data-discover":!v&&e==="render"?"true":void 0})});MB.displayName="Form";function AB({getKey:e,storageKey:t,...r}){let o=ue.useContext(th),{basename:i}=ue.useContext($r),n=Qr(),s=$T();zB({getKey:e,storageKey:t});let a=ue.useMemo(()=>{if(!o||!e)return null;let c=AT(n,s,i,e);return c!==n.key?c:null},[]);if(!o||o.isSpaMode)return null;let l=((c,u)=>{if(!window.history.state||!window.history.state.key){let p=Math.random().toString(32).slice(2);window.history.replaceState({key:p},"")}try{let f=JSON.parse(sessionStorage.getItem(c)||"{}")[u||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch(p){console.error(p),sessionStorage.removeItem(c)}}).toString();return ue.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${oB(JSON.stringify(t||MT))}, ${oB(JSON.stringify(a))})`}})}AB.displayName="ScrollRestoration";function BB(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ZT(e){let t=ue.useContext(wl);return yt(t,BB(e)),t}function iq(e){let t=ue.useContext(sp);return yt(t,BB(e)),t}function NB(e,{target:t,replace:r,unstable_mask:o,state:i,preventScrollReset:n,relative:s,viewTransition:a,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let u=vo(),p=Qr(),f=lp(e,{relative:s});return ue.useCallback(d=>{if(BV(d,t)){d.preventDefault();let h=r!==void 0?r:np(p)===np(f),y=()=>u(e,{replace:h,unstable_mask:o,state:i,preventScrollReset:n,relative:s,viewTransition:a,unstable_defaultShouldRevalidate:l});c?ue.startTransition(()=>y()):y()}},[p,u,f,r,o,i,t,e,n,s,a,l,c])}var nq=0,sq=()=>`__${String(++nq)}__`;function LB(){let{router:e}=ZT("useSubmit"),{basename:t}=ue.useContext($r),r=RV(),o=e.fetch,i=e.navigate;return ue.useCallback(async(n,s={})=>{let{action:a,method:l,encType:c,formData:u,body:p}=IV(n,t);if(s.navigate===!1){let f=s.fetcherKey||sq();await o(f,r,s.action||a,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:u,body:p,formMethod:s.method||l,formEncType:s.encType||c,flushSync:s.flushSync})}else await i(s.action||a,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:u,body:p,formMethod:s.method||l,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[o,i,t,r])}function IB(e,{relative:t}={}){let{basename:r}=ue.useContext($r),o=ue.useContext(hi);yt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),n={...lp(e||".",{relative:t})},s=Qr();if(e==null){n.search=s.search;let a=new URLSearchParams(n.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(p=>p).forEach(p=>a.append("index",p));let u=a.toString();n.search=u?`?${u}`:""}}return(!e||e===".")&&i.route.index&&(n.search=n.search?n.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(n.pathname=n.pathname==="/"?r:un([r,n.pathname])),np(n)}var MT="react-router-scroll-positions",Av={};function AT(e,t,r,o){let i=null;return o&&(r!=="/"?i=o({...e,pathname:pn(e.pathname,r)||e.pathname},t):i=o(e,t)),i==null&&(i=e.key),i}function zB({getKey:e,storageKey:t}={}){let{router:r}=ZT("useScrollRestoration"),{restoreScrollPosition:o,preventScrollReset:i}=iq("useScrollRestoration"),{basename:n}=ue.useContext($r),s=Qr(),a=$T(),l=TB();ue.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),aq(ue.useCallback(()=>{if(l.state==="idle"){let c=AT(s,a,n,e);Av[c]=window.scrollY}try{sessionStorage.setItem(t||MT,JSON.stringify(Av))}catch(c){Ho(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${c}).`)}window.history.scrollRestoration="auto"},[l.state,e,n,s,a,t])),typeof document<"u"&&(ue.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(t||MT);c&&(Av=JSON.parse(c))}catch{}},[t]),ue.useLayoutEffect(()=>{let c=r?.enableScrollRestoration(Av,()=>window.scrollY,e?(u,p)=>AT(u,p,n,e):void 0);return()=>c&&c()},[r,n,e]),ue.useLayoutEffect(()=>{if(o!==!1){if(typeof o=="number"){window.scrollTo(0,o);return}try{if(s.hash){let c=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(c){c.scrollIntoView();return}}}catch{Ho(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[s,o,i]))}function aq(e,t){let{capture:r}=t||{};ue.useEffect(()=>{let o=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,o),()=>{window.removeEventListener("pagehide",e,o)}},[e,r])}function FB(e,{relative:t}={}){let r=ue.useContext(LT);yt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ZT("useViewTransitionState"),i=lp(e,{relative:t});if(!r.isTransitioning)return!1;let n=pn(r.currentLocation.pathname,o)||r.currentLocation.pathname,s=pn(r.nextLocation.pathname,o)||r.nextLocation.pathname;return eh(i.pathname,s)!=null||eh(i.pathname,n)!=null}var vp=S(I(),1);async function Fv(e){let t=e?`/api/items?q=${encodeURIComponent(e)}`:"/api/items";return(await fetch(t)).json()}async function UB(e){return(await fetch("/api/items",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json()}async function $B(e){await fetch(`/api/items/${e}`,{method:"DELETE"})}async function jB(e,t){return(await fetch(`/api/items/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}async function WB(e,t){return(await fetch(`/api/items/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:t})})).json()}async function VB(e,t,r){return(await fetch(`/api/items/${e}/rewind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phase:t,reason:r})})).json()}var pp=S(I(),1);var qB=S(k(),1);function Hv({to:e}){let t=vo();return(0,qB.jsx)(Ee,{variant:"text",size:"small",onClick:()=>t(e),sx:{mb:2,textTransform:"none"},children:"\u2190 Back"})}async function KB(e,t,r,o,i){let n=t.trim();if(!n)return;let s={type:e,name:n,description:r.trim()||void 0,acceptanceCriteria:o.map(l=>l.trim()).filter(Boolean)};return i?(await jB(i.id,s),i.id):(await UB(s)).id}function GB(e){return{type:e?.type??"story",name:e?.name??"",description:e?.description??"",ac:e?.acceptanceCriteria??[],title:e?"Edit Item":"Add Item",submitLabel:e?"Save":"Add"}}async function YB(e,t,r,o,i,n,s){e.preventDefault();let a=await KB(t,r,o,i,n);a!==void 0&&await s(a)}var Uv=S(I(),1);var cp=S(k(),1);function XB({value:e,isFirst:t,onChange:r,onAdd:o,onRemove:i}){return(0,cp.jsxs)($e,{direction:"row",spacing:1,children:[(0,cp.jsx)(Yt,{fullWidth:!0,size:"small",placeholder:"Criterion",value:e,onChange:n=>r(n.target.value)}),t?(0,cp.jsx)(Ee,{variant:"outlined",onClick:o,sx:{minWidth:40},children:"+"}):(0,cp.jsx)(Ee,{variant:"outlined",color:"error",onClick:i,sx:{minWidth:40},children:"\u2212"})]})}var up=S(k(),1);function cq(e){return e.length===0?[{id:0,value:""}]:e.map((t,r)=>({id:r,value:t}))}function ZB({initial:e,onChange:t}){let r=(0,Uv.useRef)(e.length),[o,i]=(0,Uv.useState)(()=>cq(e));function n(c){i(c),t(c.map(u=>u.value))}function s(){r.current+=1,n([...o,{id:r.current,value:""}])}function a(c){n(o.filter(u=>u.id!==c))}function l(c,u){n(o.map(p=>p.id===c?{...p,value:u}:p))}return(0,up.jsxs)(me,{sx:{mb:2},children:[(0,up.jsx)(Z,{variant:"body2",sx:{fontWeight:"medium",mb:.5},children:"Acceptance Criteria"}),(0,up.jsx)($e,{spacing:1,children:o.map((c,u)=>(0,up.jsx)(XB,{value:c.value,isFirst:u===0,onChange:p=>l(c.id,p),onAdd:s,onRemove:()=>a(c.id)},c.id))})]})}function r1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var kl=r1();function oN(e){kl=e}var ih={exec:()=>null};function Xe(e,t=""){let r=typeof e=="string"?e:e.source,o={replace:(i,n)=>{let s=typeof n=="string"?n:n.source;return s=s.replace(Jr.caret,"$1"),r=r.replace(i,s),o},getRegex:()=>new RegExp(r,t)};return o}var Jr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},uq=/^(?:[ \t]*(?:\n|$))+/,pq=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,dq=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fq=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,o1=/(?:[*+-]|\d{1,9}[.)])/,iN=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,nN=Xe(iN).replace(/bull/g,o1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),hq=Xe(iN).replace(/bull/g,o1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),i1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,mq=/^[^\n]+/,n1=/(?!\s*\])(?:\\.|[^\[\]\\])+/,yq=Xe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",n1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gq=Xe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o1).getRegex(),Kv="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",s1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,vq=Xe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",s1).replace("tag",Kv).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sN=Xe(i1).replace("hr",nh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kv).getRegex(),bq=Xe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sN).getRegex(),a1={blockquote:bq,code:pq,def:yq,fences:dq,heading:fq,hr:nh,html:vq,lheading:nN,list:gq,newline:uq,paragraph:sN,table:ih,text:mq},QB=Xe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",nh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kv).getRegex(),_q={...a1,lheading:hq,table:QB,paragraph:Xe(i1).replace("hr",nh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QB).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kv).getRegex()},Sq={...a1,html:Xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",s1).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ih,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Xe(i1).replace("hr",nh).replace("heading",` *#{1,6} *[^
149
+ ]`).replace("lheading",nN).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xq=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Tq=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aN=/^( {2,}|\\)\n(?!\s*$)/,Cq=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gv=/[\p{P}\p{S}]/u,l1=/[\s\p{P}\p{S}]/u,lN=/[^\s\p{P}\p{S}]/u,wq=Xe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,l1).getRegex(),cN=/(?!~)[\p{P}\p{S}]/u,Rq=/(?!~)[\s\p{P}\p{S}]/u,Pq=/(?:[^\s\p{P}\p{S}]|~)/u,Eq=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,uN=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kq=Xe(uN,"u").replace(/punct/g,Gv).getRegex(),Oq=Xe(uN,"u").replace(/punct/g,cN).getRegex(),pN="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Dq=Xe(pN,"gu").replace(/notPunctSpace/g,lN).replace(/punctSpace/g,l1).replace(/punct/g,Gv).getRegex(),Mq=Xe(pN,"gu").replace(/notPunctSpace/g,Pq).replace(/punctSpace/g,Rq).replace(/punct/g,cN).getRegex(),Aq=Xe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lN).replace(/punctSpace/g,l1).replace(/punct/g,Gv).getRegex(),Bq=Xe(/\\(punct)/,"gu").replace(/punct/g,Gv).getRegex(),Nq=Xe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Lq=Xe(s1).replace("(?:-->|$)","-->").getRegex(),Iq=Xe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Lq).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wv=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,zq=Xe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Wv).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),dN=Xe(/^!?\[(label)\]\[(ref)\]/).replace("label",Wv).replace("ref",n1).getRegex(),fN=Xe(/^!?\[(ref)\](?:\[\])?/).replace("ref",n1).getRegex(),Fq=Xe("reflink|nolink(?!\\()","g").replace("reflink",dN).replace("nolink",fN).getRegex(),c1={_backpedal:ih,anyPunctuation:Bq,autolink:Nq,blockSkip:Eq,br:aN,code:Tq,del:ih,emStrongLDelim:kq,emStrongRDelimAst:Dq,emStrongRDelimUnd:Aq,escape:xq,link:zq,nolink:fN,punctuation:wq,reflink:dN,reflinkSearch:Fq,tag:Iq,text:Cq,url:ih},Hq={...c1,link:Xe(/^!?\[(label)\]\((.*?)\)/).replace("label",Wv).getRegex(),reflink:Xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Wv).getRegex()},JT={...c1,emStrongRDelimAst:Mq,emStrongLDelim:Oq,url:Xe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Uq={...JT,br:Xe(aN).replace("{2,}","*").getRegex(),text:Xe(JT.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$v={normal:a1,gfm:_q,pedantic:Sq},rh={normal:c1,gfm:JT,breaks:Uq,pedantic:Hq},$q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},JB=e=>$q[e];function dn(e,t){if(t){if(Jr.escapeTest.test(e))return e.replace(Jr.escapeReplace,JB)}else if(Jr.escapeTestNoEncode.test(e))return e.replace(Jr.escapeReplaceNoEncode,JB);return e}function eN(e){try{e=encodeURI(e).replace(Jr.percentDecode,"%")}catch{return null}return e}function tN(e,t){let r=e.replace(Jr.findPipe,(n,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),o=r.split(Jr.splitPipe),i=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(Jr.slashPipe,"|");return o}function oh(e,t,r){let o=e.length;if(o===0)return"";let i=0;for(;i<o;){let n=e.charAt(o-i-1);if(n===t&&!r)i++;else if(n!==t&&r)i++;else break}return e.slice(0,o-i)}function jq(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let o=0;o<e.length;o++)if(e[o]==="\\")o++;else if(e[o]===t[0])r++;else if(e[o]===t[1]&&(r--,r<0))return o;return r>0?-2:-1}function rN(e,t,r,o,i){let n=t.href,s=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");o.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:s,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,l}function Wq(e,t,r){let o=e.match(r.other.indentCodeCompensation);if(o===null)return t;let i=o[1];return t.split(`
150
+ `).map(n=>{let s=n.match(r.other.beginningSpace);if(s===null)return n;let[a]=s;return a.length>=i.length?n.slice(i.length):n}).join(`
151
+ `)}var Vv=class{constructor(e){ze(this,"options");ze(this,"rules");ze(this,"lexer");this.options=e||kl}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:oh(r,`
152
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],o=Wq(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:o}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let o=oh(r,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(r=o.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:oh(t[0],`
153
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=oh(t[0],`
154
+ `).split(`
155
+ `),o="",i="",n=[];for(;r.length>0;){let s=!1,a=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))a.push(r[l]),s=!0;else if(!s)a.push(r[l]);else break;r=r.slice(l);let c=a.join(`
156
+ `),u=c.replace(this.rules.other.blockquoteSetextReplace,`
157
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
158
+ ${c}`:c,i=i?`${i}
159
+ ${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=p,r.length===0)break;let f=n.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let d=f,h=d.raw+`
160
+ `+r.join(`
161
+ `),y=this.blockquote(h);n[n.length-1]=y,o=o.substring(0,o.length-d.raw.length)+y.raw,i=i.substring(0,i.length-d.text.length)+y.text;break}else if(f?.type==="list"){let d=f,h=d.raw+`
162
+ `+r.join(`
163
+ `),y=this.list(h);n[n.length-1]=y,o=o.substring(0,o.length-f.raw.length)+y.raw,i=i.substring(0,i.length-d.raw.length)+y.raw,r=h.substring(n.at(-1).raw.length).split(`
164
+ `);continue}}return{type:"blockquote",raw:o,tokens:n,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let n=this.rules.other.listItemRegex(r),s=!1;for(;e;){let l=!1,c="",u="";if(!(t=n.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let p=t[2].split(`
165
+ `,1)[0].replace(this.rules.other.listReplaceTabs,m=>" ".repeat(3*m.length)),f=e.split(`
166
+ `,1)[0],d=!p.trim(),h=0;if(this.options.pedantic?(h=2,u=p.trimStart()):d?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,u=p.slice(h),h+=t[1].length),d&&this.rules.other.blankLine.test(f)&&(c+=f+`
167
+ `,e=e.substring(f.length+1),l=!0),!l){let m=this.rules.other.nextBulletRegex(h),g=this.rules.other.hrRegex(h),v=this.rules.other.fencesBeginRegex(h),_=this.rules.other.headingBeginRegex(h),C=this.rules.other.htmlBeginRegex(h);for(;e;){let w=e.split(`
168
+ `,1)[0],E;if(f=w,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),E=f):E=f.replace(this.rules.other.tabCharGlobal," "),v.test(f)||_.test(f)||C.test(f)||m.test(f)||g.test(f))break;if(E.search(this.rules.other.nonSpaceChar)>=h||!f.trim())u+=`
169
+ `+E.slice(h);else{if(d||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(p)||_.test(p)||g.test(p))break;u+=`
170
+ `+f}!d&&!f.trim()&&(d=!0),c+=w+`
171
+ `,e=e.substring(w.length+1),p=E.slice(h)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let y=null,b;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(b=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!y,checked:b,loose:!1,text:u,tokens:[]}),i.raw+=c}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){let c=i.items[l].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=u}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:o,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=tN(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
172
+ `):[],n={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let s of o)this.rules.other.tableAlignRight.test(s)?n.align.push("right"):this.rules.other.tableAlignCenter.test(s)?n.align.push("center"):this.rules.other.tableAlignLeft.test(s)?n.align.push("left"):n.align.push(null);for(let s=0;s<r.length;s++)n.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:n.align[s]});for(let s of i)n.rows.push(tN(s,n.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:n.align[l]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
173
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let n=oh(r.slice(0,-1),"\\");if((r.length-n.length)%2===0)return}else{let n=jq(t[2],"()");if(n===-2)return;if(n>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let o=t[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(o);n&&(o=n[1],i=n[3])}else i=t[3]?t[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),rN(t,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let o=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[o.toLowerCase()];if(!i){let n=r[0].charAt(0);return{type:"text",raw:n,text:n}}return rN(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let n=[...o[0]].length-1,s,a,l=n,c=0,u=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+n);(o=u.exec(t))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){l+=a;continue}else if((o[5]||o[6])&&n%3&&!((n+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let p=[...o[0]][0].length,f=e.slice(0,n+o.index+p+a);if(Math.min(n,a)%2){let h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,o;return t[2]==="@"?(r=t[1],o="mailto:"+r):(r=t[1],o=r),{type:"link",raw:t[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,o;if(t[2]==="@")r=t[0],o="mailto:"+r;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);r=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},is=class e1{constructor(t){ze(this,"tokens");ze(this,"options");ze(this,"state");ze(this,"tokenizer");ze(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kl,this.options.tokenizer=this.options.tokenizer||new Vv,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Jr,block:$v.normal,inline:rh.normal};this.options.pedantic?(r.block=$v.pedantic,r.inline=rh.pedantic):this.options.gfm&&(r.block=$v.gfm,this.options.breaks?r.inline=rh.breaks:r.inline=rh.gfm),this.tokenizer.rules=r}static get rules(){return{block:$v,inline:rh}}static lex(t,r){return new e1(r).lex(t)}static lexInline(t,r){return new e1(r).inlineTokens(t)}lex(t){t=t.replace(Jr.carriageReturn,`
174
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let o=this.inlineQueue[r];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],o=!1){for(this.options.pedantic&&(t=t.replace(Jr.tabCharGlobal," ").replace(Jr.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
175
+ `:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
176
+ `+i.raw,s.text+=`
177
+ `+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
178
+ `+i.raw,s.text+=`
179
+ `+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let n=t;if(this.options.extensions?.startBlock){let s=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(n=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let s=r.at(-1);o&&s?.type==="paragraph"?(s.raw+=`
180
+ `+i.raw,s.text+=`
181
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),o=n.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=`
182
+ `+i.raw,s.text+=`
183
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let o=t,i=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)a.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,i.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let n=!1,s="";for(;t;){n||(s=""),n=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(t,o,s)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),r.push(a);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,u=t.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},u),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),n=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},qv=class{constructor(e){ze(this,"options");ze(this,"parser");this.options=e||kl}space(e){return""}code({text:e,lang:t,escaped:r}){let o=(t||"").match(Jr.notSpaceStart)?.[0],i=e.replace(Jr.endingNewline,"")+`
184
+ `;return o?'<pre><code class="language-'+dn(o)+'">'+(r?i:dn(i,!0))+`</code></pre>
185
+ `:"<pre><code>"+(r?i:dn(i,!0))+`</code></pre>
186
+ `}blockquote({tokens:e}){return`<blockquote>
187
+ ${this.parser.parse(e)}</blockquote>
188
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
189
+ `}hr(e){return`<hr>
190
+ `}list(e){let t=e.ordered,r=e.start,o="";for(let s=0;s<e.items.length;s++){let a=e.items[s];o+=this.listitem(a)}let i=t?"ol":"ul",n=t&&r!==1?' start="'+r+'"':"";return"<"+i+n+`>
191
+ `+o+"</"+i+`>
192
+ `}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+dn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
193
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
194
+ `}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let o="";for(let i=0;i<e.rows.length;i++){let n=e.rows[i];r="";for(let s=0;s<n.length;s++)r+=this.tablecell(n[s]);o+=this.tablerow({text:r})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
195
+ <thead>
196
+ `+t+`</thead>
197
+ `+o+`</table>
198
+ `}tablerow({text:e}){return`<tr>
199
+ ${e}</tr>
200
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
201
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${dn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let o=this.parser.parseInline(r),i=eN(e);if(i===null)return o;e=i;let n='<a href="'+e+'"';return t&&(n+=' title="'+dn(t)+'"'),n+=">"+o+"</a>",n}image({href:e,title:t,text:r,tokens:o}){o&&(r=this.parser.parseInline(o,this.parser.textRenderer));let i=eN(e);if(i===null)return dn(r);e=i;let n=`<img src="${e}" alt="${r}"`;return t&&(n+=` title="${dn(t)}"`),n+=">",n}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:dn(e.text)}},u1=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ns=class t1{constructor(t){ze(this,"options");ze(this,"renderer");ze(this,"textRenderer");this.options=t||kl,this.options.renderer=this.options.renderer||new qv,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new u1}static parse(t,r){return new t1(r).parse(t)}static parseInline(t,r){return new t1(r).parseInline(t)}parse(t,r=!0){let o="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){o+=l||"";continue}}let s=n;switch(s.type){case"space":{o+=this.renderer.space(s);continue}case"hr":{o+=this.renderer.hr(s);continue}case"heading":{o+=this.renderer.heading(s);continue}case"code":{o+=this.renderer.code(s);continue}case"table":{o+=this.renderer.table(s);continue}case"blockquote":{o+=this.renderer.blockquote(s);continue}case"list":{o+=this.renderer.list(s);continue}case"html":{o+=this.renderer.html(s);continue}case"paragraph":{o+=this.renderer.paragraph(s);continue}case"text":{let a=s,l=this.renderer.text(a);for(;i+1<t.length&&t[i+1].type==="text";)a=t[++i],l+=`
202
+ `+this.renderer.text(a);r?o+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):o+=l;continue}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return o}parseInline(t,r=this.renderer){let o="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){o+=a||"";continue}}let s=n;switch(s.type){case"escape":{o+=r.text(s);break}case"html":{o+=r.html(s);break}case"link":{o+=r.link(s);break}case"image":{o+=r.image(s);break}case"strong":{o+=r.strong(s);break}case"em":{o+=r.em(s);break}case"codespan":{o+=r.codespan(s);break}case"br":{o+=r.br(s);break}case"del":{o+=r.del(s);break}case"text":{o+=r.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return o}},QT,jv=(QT=class{constructor(e){ze(this,"options");ze(this,"block");this.options=e||kl}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?is.lex:is.lexInline}provideParser(){return this.block?ns.parse:ns.parseInline}},ze(QT,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),QT),Vq=class{constructor(...e){ze(this,"defaults",r1());ze(this,"options",this.setOptions);ze(this,"parse",this.parseMarkdown(!0));ze(this,"parseInline",this.parseMarkdown(!1));ze(this,"Parser",ns);ze(this,"Renderer",qv);ze(this,"TextRenderer",u1);ze(this,"Lexer",is);ze(this,"Tokenizer",Vv);ze(this,"Hooks",jv);this.use(...e)}walkTokens(e,t){let r=[];for(let o of e)switch(r=r.concat(t.call(this,o)),o.type){case"table":{let i=o;for(let n of i.header)r=r.concat(this.walkTokens(n.tokens,t));for(let n of i.rows)for(let s of n)r=r.concat(this.walkTokens(s.tokens,t));break}case"list":{let i=o;r=r.concat(this.walkTokens(i.items,t));break}default:{let i=o;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let s=i[n].flat(1/0);r=r.concat(this.walkTokens(s,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=t.renderers[i.name];n?t.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=n.apply(this,s)),a}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=t[i.level];n?n.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),o.extensions=t),r.renderer){let i=this.defaults.renderer||new qv(this.defaults);for(let n in r.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let s=n,a=r.renderer[s],l=i[s];i[s]=(...c)=>{let u=a.apply(i,c);return u===!1&&(u=l.apply(i,c)),u||""}}o.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Vv(this.defaults);for(let n in r.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let s=n,a=r.tokenizer[s],l=i[s];i[s]=(...c)=>{let u=a.apply(i,c);return u===!1&&(u=l.apply(i,c)),u}}o.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new jv;for(let n in r.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let s=n,a=r.hooks[s],l=i[s];jv.passThroughHooks.has(n)?i[s]=c=>{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(p=>l.call(i,p));let u=a.call(i,c);return l.call(i,u)}:i[s]=(...c)=>{let u=a.apply(i,c);return u===!1&&(u=l.apply(i,c)),u}}o.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,n=r.walkTokens;o.walkTokens=function(s){let a=[];return a.push(n.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return is.lex(e,t??this.defaults)}parser(e,t){return ns.parse(e,t??this.defaults)}parseMarkdown(e){return(r,o)=>{let i={...o},n={...this.defaults,...i},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=e);let a=n.hooks?n.hooks.provideLexer():e?is.lex:is.lexInline,l=n.hooks?n.hooks.provideParser():e?ns.parse:ns.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(c=>a(c,n)).then(c=>n.hooks?n.hooks.processAllTokens(c):c).then(c=>n.walkTokens?Promise.all(this.walkTokens(c,n.walkTokens)).then(()=>c):c).then(c=>l(c,n)).then(c=>n.hooks?n.hooks.postprocess(c):c).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));let c=a(r,n);n.hooks&&(c=n.hooks.processAllTokens(c)),n.walkTokens&&this.walkTokens(c,n.walkTokens);let u=l(c,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(c){return s(c)}}}onError(e,t){return r=>{if(r.message+=`
203
+ Please report this to https://github.com/markedjs/marked.`,e){let o="<p>An error occurred:</p><pre>"+dn(r.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(r);throw r}}},El=new Vq;function Re(e,t){return El.parse(e,t)}Re.options=Re.setOptions=function(e){return El.setOptions(e),Re.defaults=El.defaults,oN(Re.defaults),Re};Re.getDefaults=r1;Re.defaults=kl;Re.use=function(...e){return El.use(...e),Re.defaults=El.defaults,oN(Re.defaults),Re};Re.walkTokens=function(e,t){return El.walkTokens(e,t)};Re.parseInline=El.parseInline;Re.Parser=ns;Re.parser=ns.parse;Re.Renderer=qv;Re.TextRenderer=u1;Re.Lexer=is;Re.lexer=is.lex;Re.Tokenizer=Vv;Re.Hooks=jv;Re.parse=Re;var eDe=Re.options,tDe=Re.setOptions,rDe=Re.use,oDe=Re.walkTokens,iDe=Re.parseInline;var nDe=ns.parse,sDe=is.lex;var hN=S(I(),1),aa=S(k(),1);function qq({text:e}){return(0,aa.jsx)(me,{sx:t=>({border:1,borderColor:"divider",borderRadius:1,p:1.5,mt:1,minHeight:60,bgcolor:t.palette.mode==="dark"?"grey.900":"grey.50"}),dangerouslySetInnerHTML:{__html:Re.parse(e||"")}})}function mN({value:e,onChange:t}){let[r,o]=(0,hN.useState)(!1);return(0,aa.jsxs)(me,{sx:{mb:2},children:[(0,aa.jsxs)(Z,{variant:"body2",sx:{fontWeight:"medium",mb:.5},children:["Description"," ",(0,aa.jsx)(Ey,{component:"button",type:"button",variant:"caption",onClick:()=>o(!r),sx:{ml:1},children:"(preview)"})]}),(0,aa.jsx)(Yt,{fullWidth:!0,multiline:!0,minRows:4,size:"small",placeholder:"Markdown supported",value:e,onChange:i=>t(i.target.value)}),r&&(0,aa.jsx)(qq,{text:e})]})}var sh=S(k(),1);function yN({submitLabel:e,onCancel:t}){return(0,sh.jsxs)($e,{direction:"row",spacing:1,sx:{mt:2},children:[(0,sh.jsx)(Ee,{type:"submit",variant:"contained",children:e}),(0,sh.jsx)(Ee,{type:"button",variant:"outlined",onClick:t,children:"Cancel"})]})}var vN=S(k(),1);function gN({value:e,onChange:t}){return(0,vN.jsx)(Yt,{label:"Name",required:!0,fullWidth:!0,size:"small",placeholder:"Item name",value:e,onChange:r=>t(r.target.value),sx:{mb:2}})}var Ol=S(k(),1);function bN({value:e,onChange:t}){return(0,Ol.jsxs)(ru,{sx:{mb:2},children:[(0,Ol.jsx)(su,{children:"Type"}),(0,Ol.jsx)(Zy,{row:!0,name:"type",value:e,onChange:r=>t(r.target.value),children:["story","bug"].map(r=>(0,Ol.jsx)(nu,{value:r,control:(0,Ol.jsx)(Xy,{size:"small"}),label:r.charAt(0).toUpperCase()+r.slice(1)},r))})]})}var Ii=S(k(),1);function _N({title:e,submitLabel:t,type:r,onTypeChange:o,name:i,onNameChange:n,description:s,onDescriptionChange:a,initialAc:l,onAcChange:c,onCancel:u}){return(0,Ii.jsxs)(Ii.Fragment,{children:[(0,Ii.jsx)(Z,{variant:"h6",sx:{mb:2},children:e}),(0,Ii.jsx)(bN,{value:r,onChange:o}),(0,Ii.jsx)(gN,{value:i,onChange:n}),(0,Ii.jsx)(mN,{value:s,onChange:a}),(0,Ii.jsx)(ZB,{initial:l,onChange:c}),(0,Ii.jsx)(yN,{submitLabel:t,onCancel:u})]})}var la=S(k(),1);function Yv({item:e,onReload:t,backTo:r}){let o=vo(),i=GB(e),[n,s]=(0,pp.useState)(i.type),[a,l]=(0,pp.useState)(i.name),[c,u]=(0,pp.useState)(i.description),p=(0,pp.useRef)(i.ac);return(0,la.jsxs)(la.Fragment,{children:[(0,la.jsx)(Hv,{to:r}),(0,la.jsx)(Wt,{component:"form",variant:"outlined",sx:{p:3},onSubmit:f=>YB(f,n,a,c,p.current,e,async d=>{await t(),o(`/backlog/items/${d}`)}),children:(0,la.jsx)(_N,{title:i.title,submitLabel:i.submitLabel,type:n,onTypeChange:s,name:a,onNameChange:l,description:c,onDescriptionChange:u,initialAc:i.ac,onAcChange:f=>{p.current=f},onCancel:()=>o(r)})})]})}var Dl=S(I(),1);function SN(){let[e,t]=(0,Dl.useState)(""),[r,o]=(0,Dl.useState)(null),i=(0,Dl.useRef)(void 0);return(0,Dl.useEffect)(()=>{if(i.current!==void 0&&clearTimeout(i.current),!e.trim()){o(null);return}return i.current=setTimeout(async()=>{o(await Fv(e))},250),()=>{i.current!==void 0&&clearTimeout(i.current)}},[e]),{query:e,setQuery:t,results:r}}var xN=S(I(),1),TN="backlog-show-completed",p1=new Set,CN=Kq();function Kq(){try{return localStorage.getItem(TN)==="true"}catch{return!1}}function Gq(e){return p1.add(e),()=>p1.delete(e)}function Yq(){return CN}function Xq(e){CN=e;try{localStorage.setItem(TN,String(e))}catch{}for(let t of p1)t()}function Xv(){return[(0,xN.useSyncExternalStore)(Gq,Yq),Xq]}var d1=S(k(),1);function wN(){let[e,t]=Xv();return(0,d1.jsx)(nu,{control:(0,d1.jsx)(Jy,{checked:e,onChange:()=>t(!e),size:"small"}),label:"Show completed",slotProps:{typography:{variant:"body2",color:"text.secondary"}}})}var Ml=S(k(),1),Zq={todo:"\u25CB","in-progress":"\u25D4",done:"\u25CF",wontdo:"\u2715"},Qq={todo:"text.disabled","in-progress":"warning.main",done:"success.main",wontdo:"error.main"},Jq={story:{bg:"info.light",text:"info.dark"},bug:{bg:"error.light",text:"error.dark"}},eK={display:"flex",alignItems:"center",gap:1.5,width:"100%",textAlign:"left",p:2,mb:1,borderRadius:2,border:1,borderColor:"divider",bgcolor:"background.paper",transition:"box-shadow 0.2s","&:hover":{boxShadow:3}},tK={color:"text.disabled",flexShrink:0},rK={fontWeight:500,flex:1,textAlign:"left"};function oK(e){return{flexShrink:0,bgcolor:e.bg,color:e.text,fontWeight:500,fontSize:"0.75rem",height:22}}function iK(e){return{fontSize:"1.125rem",flexShrink:0,color:Qq[e]}}function RN({item:e,onSelect:t}){return(0,Ml.jsxs)(At,{onClick:t,sx:eK,children:[(0,Ml.jsx)(Z,{sx:iK(e.status),children:Zq[e.status]}),(0,Ml.jsx)(Qi,{label:e.type,size:"small",sx:oK(Jq[e.type])}),(0,Ml.jsxs)(Z,{variant:"body2",sx:tK,children:["#",e.id]}),(0,Ml.jsx)(Z,{sx:rK,children:e.name})]})}var EN=S(k(),1);function PN({value:e,onChange:t}){return(0,EN.jsx)(Yt,{fullWidth:!0,size:"small",placeholder:"Search backlog\u2026",value:e,onChange:r=>t(r.target.value),sx:{mb:2}})}var eo=S(k(),1),nK={justifyContent:"space-between",alignItems:"center",mb:3},sK={textAlign:"center",color:"text.disabled",py:6,px:2};function aK(e,t){return t?e:e.filter(r=>r.status!=="done"&&r.status!=="wontdo")}var lK={fontWeight:600},cK={alignItems:"center"};function uK({query:e}){let t=e.trim()?"No items match your search.":"No items in the backlog.";return(0,eo.jsx)(me,{sx:sK,children:t})}function pK({onAdd:e}){return(0,eo.jsxs)($e,{direction:"row",sx:nK,children:[(0,eo.jsx)(Z,{variant:"h5",sx:lK,children:"Backlog"}),(0,eo.jsxs)($e,{direction:"row",spacing:2,sx:cK,children:[(0,eo.jsx)(wN,{}),(0,eo.jsx)(Ee,{variant:"contained",size:"small",onClick:e,children:"+ Add Item"})]})]})}function kN({items:e}){let t=vo(),[r]=Xv(),{query:o,setQuery:i,results:n}=SN(),s=aK(n??e,r);return(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsx)(pK,{onAdd:()=>t("/backlog/add")}),(0,eo.jsx)(PN,{value:o,onChange:i}),s.length===0?(0,eo.jsx)(uK,{query:o}):s.map(a=>(0,eo.jsx)(RN,{item:a,onSelect:()=>t(`/backlog/items/${a.id}`)},a.id))]})}var DN=S(I(),1);var ss=S(k(),1);function ON({onConfirm:e,onCancel:t}){return(0,ss.jsxs)(Zc,{open:!0,onClose:t,maxWidth:"xs",fullWidth:!0,children:[(0,ss.jsx)(eu,{children:"Confirm deletion"}),(0,ss.jsx)(Jc,{children:(0,ss.jsx)(Ty,{children:"Are you sure you want to delete this item?"})}),(0,ss.jsxs)(Qc,{children:[(0,ss.jsx)(Ee,{onClick:t,children:"Cancel"}),(0,ss.jsx)(Ee,{variant:"contained",color:"error",onClick:e,children:"Delete"})]})]})}var Al=S(k(),1);function MN({itemId:e,onDeleted:t}){let[r,o]=(0,DN.useState)(!1);return(0,Al.jsxs)(Al.Fragment,{children:[r&&(0,Al.jsx)(ON,{onConfirm:async()=>{await $B(e),await t()},onCancel:()=>o(!1)}),(0,Al.jsx)(Ee,{variant:"contained",color:"error",size:"small",onClick:()=>o(!0),children:"Delete"})]})}var ca=S(k(),1);function AN({criteria:e}){return e.length===0?null:(0,ca.jsxs)(me,{sx:{mb:2},children:[(0,ca.jsx)(Z,{variant:"overline",sx:{color:"text.secondary",mb:1,display:"block",letterSpacing:"0.08em"},children:"Acceptance Criteria"}),(0,ca.jsx)(en,{disablePadding:!0,children:e.map((t,r)=>(0,ca.jsxs)(Ds,{disableGutters:!0,disablePadding:!0,sx:{py:.5,display:"flex",alignItems:"baseline"},children:[(0,ca.jsxs)(Z,{component:"span",sx:{color:"text.secondary",mr:1},children:[r+1,"."]}),(0,ca.jsx)(me,{component:"span",className:"markdown",dangerouslySetInnerHTML:{__html:Re.parseInline(t)}})]},t))})]})}var fn=S(k(),1),dK={summary:{bgcolor:"warning.light",borderColor:"warning.dark"},comment:{bgcolor:"action.selected",borderColor:"divider"}},fK={summary:"Phase summary",comment:"Comment"};function hK(e){return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}var mK={alignItems:"center",fontSize:"0.75rem",color:"text.secondary",mb:.5},yK={color:"text.primary",whiteSpace:"pre-wrap"},gK={color:"text.disabled"},vK={fontWeight:500};function bK(e){return{p:1.5,bgcolor:e.bgcolor,borderColor:e.borderColor}}function _K({comment:e}){return(0,fn.jsxs)($e,{direction:"row",spacing:.5,sx:mK,children:[e.id!==void 0&&(0,fn.jsxs)(Z,{variant:"caption",sx:gK,children:["#",e.id]}),(0,fn.jsx)(Z,{variant:"caption",sx:vK,children:fK[e.type]}),e.phase!==void 0&&(0,fn.jsxs)(Z,{variant:"caption",children:["\xB7 Phase ",e.phase]}),(0,fn.jsxs)(Z,{variant:"caption",children:["\xB7 ",hK(e.timestamp)]})]})}function BN({comment:e}){return(0,fn.jsxs)(Wt,{variant:"outlined",sx:bK(dK[e.type]),children:[(0,fn.jsx)(_K,{comment:e}),(0,fn.jsx)(Z,{variant:"body2",sx:yK,children:e.text})]})}var dp=S(k(),1),SK={color:"text.secondary",mb:1,display:"block",letterSpacing:"0.08em"};function NN({comments:e}){return e.length===0?null:(0,dp.jsxs)(me,{sx:{mb:2},children:[(0,dp.jsx)(Z,{variant:"overline",sx:SK,children:"Comments"}),(0,dp.jsx)($e,{spacing:1,children:e.map((t,r)=>(0,dp.jsx)(BN,{comment:t},`${t.timestamp}-${r}`))})]})}var Qv=S(k(),1),Zv={todo:{bg:"action.selected",text:"text.secondary"},"in-progress":{bg:"warning.light",text:"warning.dark"},done:{bg:"success.light",text:"success.dark"},wontdo:{bg:"error.light",text:"error.dark"}},xK=["todo","in-progress","done","wontdo"];function LN({current:e,onStatusChange:t}){return t?(0,Qv.jsx)(fu,{value:e,onChange:r=>t(r.target.value),size:"small",sx:{fontSize:"0.75rem",fontWeight:500,borderRadius:4,bgcolor:Zv[e].bg,color:Zv[e].text,"& .MuiSelect-select":{py:.5,px:1.5}},children:xK.map(r=>(0,Qv.jsx)(Nn,{value:r,children:r},r))}):(0,Qv.jsx)(Qi,{label:e,size:"small",sx:{bgcolor:Zv[e].bg,color:Zv[e].text,fontWeight:500,fontSize:"0.75rem"}})}var fp=S(k(),1),TK={story:{bg:"info.light",text:"info.dark"},bug:{bg:"error.light",text:"error.dark"}},CK={alignItems:"center",color:"text.disabled",fontSize:"0.875rem",mb:2};function IN({item:e,onStatusChange:t}){let r=TK[e.type];return(0,fp.jsxs)($e,{direction:"row",spacing:1,sx:CK,children:[(0,fp.jsxs)(Z,{variant:"body2",color:"text.disabled",children:["#",e.id]}),r&&(0,fp.jsx)(Qi,{label:e.type,size:"small",sx:wK(r)}),(0,fp.jsx)(LN,{current:e.status,onStatusChange:t})]})}function wK(e){return{bgcolor:e.bg,color:e.text,fontWeight:500,fontSize:"0.75rem"}}var as=S(k(),1);function zN({checks:e}){return(0,as.jsxs)(me,{sx:{mt:1,pt:1},children:[(0,as.jsx)(tu,{sx:{mb:1}}),(0,as.jsx)(Z,{variant:"overline",sx:{color:"text.disabled",letterSpacing:"0.08em"},children:"Manual Checks"}),(0,as.jsx)(en,{disablePadding:!0,sx:{ml:.5,mt:.5},children:e.map(t=>(0,as.jsxs)(Ds,{disableGutters:!0,disablePadding:!0,sx:{py:.25,display:"flex",alignItems:"baseline"},children:[(0,as.jsx)(Z,{component:"span",sx:{mr:1,fontSize:"0.875rem",color:"text.secondary"},children:"\u2610"}),(0,as.jsx)(me,{component:"span",className:"markdown",sx:{fontSize:"0.875rem",color:"text.secondary"},dangerouslySetInnerHTML:{__html:Re.parseInline(t)}})]},t))})]})}var UN=S(I(),1);var FN=S(I(),1),hn=S(k(),1);function HN({phaseName:e,onConfirm:t,onCancel:r}){let[o,i]=(0,FN.useState)("");return(0,hn.jsxs)(Zc,{open:!0,onClose:r,maxWidth:"xs",fullWidth:!0,children:[(0,hn.jsxs)(eu,{children:["Rewind to ",e,"?"]}),(0,hn.jsxs)(Jc,{children:[(0,hn.jsx)(Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"This will mark all later phases as incomplete."}),(0,hn.jsx)(Yt,{fullWidth:!0,multiline:!0,rows:3,size:"small",placeholder:"Reason for rewinding...",value:o,onChange:n=>i(n.target.value)})]}),(0,hn.jsxs)(Qc,{children:[(0,hn.jsx)(Ee,{onClick:r,children:"Cancel"}),(0,hn.jsx)(Ee,{variant:"contained",color:"warning",disabled:o.trim().length===0,onClick:()=>t(o.trim()),children:"Rewind"})]})]})}var Bl=S(k(),1);function $N({itemId:e,phaseNumber:t,phaseName:r,onRewound:o}){let[i,n]=(0,UN.useState)(!1);return(0,Bl.jsxs)(Bl.Fragment,{children:[(0,Bl.jsx)(Ee,{size:"small",color:"warning",variant:"outlined",onClick:()=>n(!0),sx:{ml:"auto",textTransform:"none",fontSize:"0.75rem"},children:"Rewind"}),i&&(0,Bl.jsx)(HN,{phaseName:r,onConfirm:async s=>{await VB(e,t,s),await o()},onCancel:()=>n(!1)})]})}var hp=S(k(),1),RK={done:{label:"Done",bg:"success.light",text:"success.dark"},current:{label:"In Progress",bg:"info.light",text:"info.dark"},upcoming:{label:"Upcoming",bg:"action.selected",text:"text.secondary"}},PK={alignItems:"center",mb:1},EK={fontWeight:500};function jN({phase:e,index:t,status:r,itemId:o,onRewind:i}){let n=RK[r],s=r==="done"&&o!==void 0&&i;return(0,hp.jsxs)($e,{direction:"row",spacing:1,sx:PK,children:[(0,hp.jsxs)(Z,{sx:EK,children:["Phase ",t+1,": ",e.name]}),(0,hp.jsx)(Qi,{label:n.label,size:"small",sx:kK(n)}),s&&(0,hp.jsx)($N,{itemId:o,phaseNumber:t+1,phaseName:e.name,onRewound:i})]})}function kK(e){return{bgcolor:e.bg,color:e.text,fontWeight:500,fontSize:"0.75rem"}}var mp=S(k(),1);function WN({tasks:e,marker:t}){return(0,mp.jsx)(en,{disablePadding:!0,sx:{ml:.5},children:e.map(r=>(0,mp.jsxs)(Ds,{disableGutters:!0,disablePadding:!0,sx:{py:.25,display:"flex",alignItems:"baseline"},children:[(0,mp.jsx)(Z,{component:"span",sx:{color:"text.secondary",mr:1},children:t}),(0,mp.jsx)(me,{component:"span",className:"markdown",dangerouslySetInnerHTML:{__html:Re.parseInline(r.task)}})]},r.task))})}var yp=S(k(),1),OK={done:{borderColor:"success.light",bgcolor:"success.light"},current:{borderColor:"info.main",bgcolor:"info.light",ring:"info.light"},upcoming:{borderColor:"divider",bgcolor:"background.paper"}};function DK(e){return{p:2,borderColor:e.borderColor,bgcolor:e.bgcolor,...e.ring?{boxShadow:"0 0 0 2px",borderColor:"info.main"}:{}}}var MK={done:"\u2713",current:"\u2022",upcoming:"\u2022"};function VN({phase:e,index:t,status:r,itemId:o,onRewind:i}){let n=e.manualChecks??[];return(0,yp.jsxs)(Wt,{variant:"outlined",sx:DK(OK[r]),children:[(0,yp.jsx)(jN,{phase:e,index:t,status:r,itemId:o,onRewind:i}),(0,yp.jsx)(WN,{tasks:e.tasks,marker:MK[r]}),n.length>0&&(0,yp.jsx)(zN,{checks:n})]})}var gp=S(k(),1);function AK(e,t){if(t===void 0)return"upcoming";let r=e+1;return r<t?"done":r===t?"current":"upcoming"}function qN({phases:e,currentPhase:t,itemId:r,onRewind:o}){return e.length===0?null:(0,gp.jsxs)(me,{sx:{mb:2},children:[(0,gp.jsx)(Z,{variant:"overline",sx:{color:"text.secondary",mb:1,display:"block",letterSpacing:"0.08em"},children:"Plan"}),(0,gp.jsx)($e,{spacing:1.5,children:e.map((i,n)=>(0,gp.jsx)(VN,{phase:i,index:n,status:AK(n,t),itemId:r,onRewind:o},i.name))})]})}var mi=S(k(),1),BK={lineHeight:1.7,"& p":{mt:0}},NK={color:"text.secondary",mb:1,display:"block",letterSpacing:"0.08em"};function LK({content:e}){return(0,mi.jsx)(me,{className:"markdown",sx:BK,dangerouslySetInnerHTML:{__html:Re.parse(e)}})}function KN({item:e,onStatusChange:t,onRewind:r}){return(0,mi.jsxs)(Wt,{variant:"outlined",sx:{p:3},children:[(0,mi.jsx)(Z,{variant:"h5",component:"h2",children:e.name}),(0,mi.jsx)(IN,{item:e,onStatusChange:t}),e.description&&(0,mi.jsxs)(me,{sx:{mb:2},children:[(0,mi.jsx)(Z,{variant:"overline",sx:NK,children:"Description"}),(0,mi.jsx)(LK,{content:e.description})]}),(0,mi.jsx)(AN,{criteria:e.acceptanceCriteria}),e.plan&&(0,mi.jsx)(qN,{phases:e.plan,currentPhase:e.currentPhase,itemId:e.id,onRewind:r}),e.comments&&(0,mi.jsx)(NN,{comments:e.comments})]})}var mn=S(k(),1),IK={justifyContent:"space-between",alignItems:"center",mb:2};function zK({itemId:e,onDeleted:t}){let r=vo();return(0,mn.jsxs)($e,{direction:"row",sx:IK,children:[(0,mn.jsx)(Hv,{to:"/backlog"}),(0,mn.jsxs)($e,{direction:"row",spacing:1,children:[(0,mn.jsx)(Ee,{variant:"contained",color:"inherit",size:"small",onClick:()=>r(`/backlog/items/${e}/edit`),children:"Edit"}),(0,mn.jsx)(MN,{itemId:e,onDeleted:t})]})]})}function GN({item:e,onReload:t}){let r=vo(),o=async()=>{await t(),r("/backlog")},i=async n=>{await WB(e.id,n),await t()};return(0,mn.jsxs)(me,{children:[(0,mn.jsx)(zK,{itemId:e.id,onDeleted:o}),(0,mn.jsx)(KN,{item:e,onStatusChange:i,onRewind:t})]})}var f1=S(k(),1);function h1({items:e,mode:t,onReload:r}){let{id:o}=zT(),i=Number(o),n=e.find(s=>s.id===i);return n?t==="edit"?(0,f1.jsx)(Yv,{item:n,onReload:r,backTo:`/backlog/items/${i}`}):(0,f1.jsx)(GN,{item:n,onReload:r}):null}var zi=S(k(),1);function YN({items:e,onReload:t}){return(0,zi.jsxs)(Pl,{children:[(0,zi.jsx)(Uo,{index:!0,element:(0,zi.jsx)(kN,{items:e})}),(0,zi.jsx)(Uo,{path:"items/:id",element:(0,zi.jsx)(h1,{items:e,mode:"detail",onReload:t})}),(0,zi.jsx)(Uo,{path:"items/:id/edit",element:(0,zi.jsx)(h1,{items:e,mode:"edit",onReload:t})}),(0,zi.jsx)(Uo,{path:"add",element:(0,zi.jsx)(Yv,{onReload:t,backTo:"/backlog"})})]})}var Jv=S(k(),1);function XN(){let[e,t]=(0,vp.useState)([]),r=(0,vp.useCallback)(async()=>{t(await Fv())},[]);return(0,vp.useEffect)(()=>{r()},[r]),(0,Jv.jsx)(Pl,{children:(0,Jv.jsx)(Uo,{path:"/*",element:(0,Jv.jsx)(YN,{items:e,onReload:r})})})}var RI=S(I(),1);var cb=S(I(),1);var sL=S(I(),1);var _p=S(I(),1),bp=S(k(),1);function ZN({onConfirm:e,onCancel:t}){let[r,o]=(0,_p.useState)(""),i=(0,_p.useRef)(null);return(0,_p.useEffect)(()=>{i.current?.focus()},[]),(0,bp.jsxs)($e,{component:"form",direction:"row",spacing:.5,onSubmit:n=>{n.preventDefault(),n.stopPropagation();let s=r.trim();s&&e(s)},children:[(0,bp.jsx)(Yt,{inputRef:i,value:r,onChange:n=>o(n.target.value),placeholder:"/path/to/repo",size:"small",sx:{flex:1},slotProps:{input:{sx:{fontSize:12}}},onKeyDown:n=>{n.key==="Escape"&&t()}}),(0,bp.jsx)(Ee,{type:"submit",variant:"contained",size:"small",sx:{minWidth:0},children:"OK"}),(0,bp.jsx)(Ee,{variant:"outlined",size:"small",onClick:t,sx:{minWidth:0},children:"Cancel"})]})}var tb=S(I(),1);var QN=S(k(),1),JN=Ie((0,QN.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");var eL=S(k(),1),tL=Ie((0,eL.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");var eb=S(k(),1);function rL({label:e,open:t,onClick:r}){return(0,eb.jsx)(Ee,{size:"small",variant:"outlined",onClick:r,endIcon:t?(0,eb.jsx)(tL,{}):(0,eb.jsx)(JN,{}),sx:{textTransform:"none",fontSize:11,justifyContent:"space-between",maxWidth:"100%",overflow:"hidden"},fullWidth:!0,children:e})}var ob=S(k(),1),oL={position:"absolute",top:"100%",left:0,right:0,mt:.25,maxHeight:200,overflowY:"auto",zIndex:10},iL={position:"absolute",left:0,right:0,bottom:"100%",mb:.25,maxHeight:200,overflowY:"auto",zIndex:10};function rb({label:e,children:t}){let[r,o]=(0,tb.useState)(!1),i=(0,tb.useRef)(null);return(0,ob.jsxs)(Wt,{component:"fieldset",ref:i,variant:"outlined",sx:{position:"relative",border:"none",m:0,p:0},onBlur:n=>{i.current?.contains(n.relatedTarget)||o(!1)},children:[(0,ob.jsx)(rL,{label:e,open:r,onClick:()=>o(!r)}),r&&t(()=>o(!1))]})}var Nl=S(k(),1);function m1(e){let t=e.includes("\\")?"\\":"/";return e.split(t).filter(Boolean).pop()??e}var FK={...iL};function nL({repos:e,selected:t,onSelect:r,onCustom:o,close:i}){return(0,Nl.jsx)(Wt,{elevation:4,sx:FK,children:(0,Nl.jsxs)(tl,{dense:!0,children:[e.map(n=>(0,Nl.jsx)(Nn,{selected:n===t,title:n,onClick:()=>{r(n),i()},sx:{fontSize:12},children:m1(n)},n)),(0,Nl.jsx)(tu,{}),(0,Nl.jsx)(Nn,{onClick:()=>{i(),o()},sx:{fontSize:12,color:"text.secondary",fontStyle:"italic"},children:"Custom path..."})]})})}var ib=S(k(),1);function aL({repos:e,selected:t,onSelect:r}){let[o,i]=(0,sL.useState)(!1);return o?(0,ib.jsx)(ZN,{onConfirm:n=>{r(n),i(!1)},onCancel:()=>i(!1)}):(0,ib.jsx)(rb,{label:t?m1(t):"Select repo...",children:n=>(0,ib.jsx)(nL,{repos:e,selected:t,onSelect:r,onCustom:()=>i(!0),close:n})})}var Ll=S(k(),1);function lL({repos:e,selectedCwd:t,onSelectCwd:r,runFilter:o,onFilterChange:i,showFilter:n}){return(0,Ll.jsxs)(Ll.Fragment,{children:[(0,Ll.jsx)(aL,{repos:e,selected:t,onSelect:r}),n&&(0,Ll.jsx)(Yt,{value:o,onChange:s=>i(s.target.value),placeholder:"Filter runs...",size:"small",fullWidth:!0,slotProps:{input:{sx:{fontSize:13}}}})]})}var y1={"assist-draft":{label:"\u25B6 /draft",args:["draft"]},"assist-bug":{label:"\u25B6 /bug",args:["bug"]},"assist-next":{label:"\u25B6 /next",args:["next"]}};function HK(e){return e in y1}function UK(e){return[...y1[e].args]}function cL(e,t,r,o){if(HK(e)&&t){r(UK(e),t);return}o(e)}var uL=Object.entries(y1).map(([e,{label:t}])=>({value:e,label:t})),pL="Enter prompt...";var ah=S(k(),1),$K={textTransform:"none",fontSize:13,py:.25,px:1.25};function dL({onSelect:e}){return(0,ah.jsx)(ah.Fragment,{children:uL.map(t=>(0,ah.jsx)(Ee,{size:"small",variant:"outlined",onClick:()=>e(t.value),sx:$K,children:t.label},t.value))})}var hL=S(k(),1);function jK(e){return(e.params?.length??0)>0}function fL({config:e,active:t,onClick:r}){return(0,hL.jsxs)(Ee,{size:"small",variant:t?"contained":"outlined",onClick:r,sx:{textTransform:"none",fontSize:13,py:.25,px:1.25},children:[!jK(e)&&"\u25B6 ",e.name]})}var Il=S(k(),1);function mL({configs:e,selectedRun:t,onSelectRun:r,hiddenCount:o}){return(0,Il.jsxs)(Il.Fragment,{children:[e.map(i=>(0,Il.jsx)(fL,{config:i,active:t===i.name,onClick:()=>r(i.name)},i.name)),o>0&&(0,Il.jsxs)(Z,{variant:"caption",color:"text.disabled",children:["+",o," more"]})]})}var lh=S(k(),1),WK=10;function yL({onSelectMode:e,runConfigs:t,totalRunCount:r,selectedRun:o,onSelectRun:i}){let n=t.slice(0,WK);return(0,lh.jsxs)($e,{direction:"row",spacing:.5,sx:{flexWrap:"wrap",alignItems:"center"},children:[(0,lh.jsx)(dL,{onSelect:a=>{i(null),e(a)}}),(0,lh.jsx)(mL,{configs:n,selectedRun:o,onSelectRun:i,hiddenCount:r-n.length})]})}var ch=S(k(),1);function gL({prompt:e,setPrompt:t}){return(0,ch.jsxs)($e,{direction:"row",spacing:1,children:[(0,ch.jsx)(Yt,{value:e,onChange:r=>t(r.target.value),placeholder:pL,size:"small",fullWidth:!0,slotProps:{input:{sx:{fontSize:13}}}}),(0,ch.jsx)(Ee,{type:"submit",variant:"contained",size:"small",sx:{whiteSpace:"nowrap"},children:"Start"})]})}var uh=S(k(),1);function VK(e){let t=e.description?` \u2014 ${e.description}`:"";return e.required?`${e.name} *${t}`:`${e.name}${t}`}function vL({config:e,values:t,onChange:r}){let o=e.params??[],i=(n,s)=>r({...t,[n]:s});return(0,uh.jsxs)($e,{spacing:.75,children:[o.map(n=>(0,uh.jsx)(Yt,{label:VK(n),value:t[n.name]??n.default??"",onChange:s=>i(n.name,s.target.value),placeholder:n.default??"",size:"small",fullWidth:!0,slotProps:{input:{sx:{fontSize:13}},inputLabel:{sx:{fontSize:11},shrink:!0}}},n.name)),(0,uh.jsxs)(Ee,{type:"submit",variant:"contained",size:"small",children:["Run ",e.name]})]})}var ua=S(k(),1);function bL({form:e,totalRunCount:t}){let r=e.selectedRun?e.filteredRunConfigs.find(o=>o.name===e.selectedRun):null;return(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsx)(yL,{onSelectMode:e.handleSelectMode,runConfigs:e.filteredRunConfigs,totalRunCount:t,selectedRun:e.selectedRun,onSelectRun:e.handleSelectRun}),e.selectedRun&&r?(0,ua.jsx)(vL,{config:r,values:e.runParams,onChange:e.setRunParams}):(0,ua.jsx)(gL,{prompt:e.prompt,setPrompt:e.setPrompt})]})}var zl=S(I(),1);function _L(e,t,r,o){return e&&!t.find(n=>n.name===e)?.params?.length?(o(e,[],r),null):e}function SL(e,t,r){r(e.trim(),t)}function xL(e,t){return(e?.params??[]).map(r=>t[r.name]?.trim()).filter(Boolean)}function TL(e){if(e.selectedRun){let t=e.configs.find(r=>r.name===e.selectedRun);return e.onCreateRun(e.selectedRun,xL(t,e.runParams),e.cwd),"run"}return SL(e.prompt,e.cwd,e.onCreate),"claude"}var nb=S(I(),1);function CL(e,t){if(!t)return!0;let o=(t.includes("*")?t:`*${t}*`).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${o}$`,"i").test(e)}function wL(e){let[t,r]=(0,nb.useState)(""),o=(0,nb.useMemo)(()=>e.filter(i=>CL(i.name,t)),[e,t]);return{runFilter:t,setRunFilter:r,filteredRunConfigs:o}}function RL(e){let{runConfigs:t,selectedCwd:r,onCreateRun:o,onRequestRunConfigs:i}=e,[n,s]=(0,zl.useState)("free"),[a,l]=(0,zl.useState)(""),[c,u]=(0,zl.useState)(null),[p,f]=(0,zl.useState)({}),d=wL(t);return(0,zl.useEffect)(()=>{r&&i(r)},[r,i]),{mode:n,prompt:a,setPrompt:l,selectedRun:c,runParams:p,setRunParams:f,...d,handleSelectRun(h){u(_L(h,t,r,o)),f({})},handleSelectMode(h){u(null),cL(h,r,e.onCreateAssist,s)},handleSubmit(h){if(h.preventDefault(),!r)return;TL({selectedRun:c,runParams:p,prompt:a,cwd:r,configs:t,onCreate:e.onCreate,onCreateRun:e.onCreateRun})==="run"?f({}):l("")}}}var Sp=S(I(),1);function PL(e,t){let r=new Set;e&&r.add(e);for(let o of t)o.cwd&&r.add(o.cwd);return[...r].sort((o,i)=>o.localeCompare(i))}function EL(e,t){let[r,o]=(0,Sp.useState)(e);return(0,Sp.useEffect)(()=>{e&&!r&&o(e)},[e,r]),{repos:(0,Sp.useMemo)(()=>PL(e,t),[e,t]),selectedCwd:r,setSelectedCwd:o}}var xp=S(k(),1);function kL(e){let{currentCwd:t,history:r,runConfigs:o}=e,{repos:i,selectedCwd:n,setSelectedCwd:s}=EL(t,r),a=RL({...e,selectedCwd:n}),l=n!=="";return(0,xp.jsxs)(me,{component:"form",onSubmit:a.handleSubmit,sx:{p:1.5,borderTop:1,borderColor:"divider",display:"flex",flexDirection:"column",gap:1},children:[(0,xp.jsx)(lL,{repos:i,selectedCwd:n,onSelectCwd:s,runFilter:a.runFilter,onFilterChange:a.setRunFilter,showFilter:o.length>0}),l?(0,xp.jsx)(bL,{form:a,totalRunCount:o.length}):(0,xp.jsx)(Z,{variant:"caption",color:"text.disabled",sx:{py:.75},children:"Select a repo above to create a session"})]})}var OL=S(k(),1),DL=Ie((0,OL.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var g1=S(k(),1);function ML({onDismiss:e}){return(0,g1.jsx)(qa,{size:"small",onClick:t=>{t.stopPropagation(),e()},title:"Dismiss",sx:{color:"text.disabled","&:hover":{color:"text.primary"}},children:(0,g1.jsx)(DL,{sx:{fontSize:16}})})}var AL=S(k(),1),BL=Ie((0,AL.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var v1=S(k(),1);function NL({onRetry:e}){return(0,v1.jsx)(qa,{size:"small",onClick:t=>{t.stopPropagation(),e()},title:"Retry",sx:{color:"text.disabled","&:hover":{color:"text.primary"}},children:(0,v1.jsx)(BL,{sx:{fontSize:14}})})}var ls=S(k(),1),qK={running:"success.main",waiting:"warning.main",done:"info.main"};function sb(e){return{display:"block",width:"100%",textAlign:"left",p:"10px 12px",mb:.5,borderRadius:1.5,bgcolor:e?"action.selected":"background.default",border:1,borderColor:e?"primary.main":"transparent",cursor:"pointer",transition:"background 0.15s","&:hover":e?void 0:{bgcolor:"action.hover"}}}function LL({status:e,elapsed:t}){return(0,ls.jsxs)(me,{sx:{display:"flex",justifyContent:"space-between",mt:.5},children:[(0,ls.jsxs)(Z,{variant:"caption",sx:{color:qK[e]},children:["\u25CF ",e]}),(0,ls.jsx)(Z,{variant:"caption",color:"text.disabled",children:t})]})}function IL({name:e,isDone:t,onRetry:r,onDismiss:o}){return(0,ls.jsxs)(me,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,ls.jsx)(Z,{variant:"body2",noWrap:!0,sx:{flex:1,color:"text.primary"},children:e}),t&&r&&(0,ls.jsx)(NL,{onRetry:r}),t&&(0,ls.jsx)(ML,{onDismiss:o})]})}var ab=S(I(),1);function zL(e){let[,t]=(0,ab.useState)(0);(0,ab.useEffect)(()=>{let n=setInterval(()=>t(s=>s+1),1e3);return()=>clearInterval(n)},[]);let r=Math.floor((Date.now()-e)/1e3),o=Math.floor(r/60),i=r%60;return o>=60?`${Math.floor(o/60)}h ${o%60}m`:o>0?`${o}m ${i}s`:`${i}s`}var ph=S(k(),1);function FL({session:e,active:t,onClick:r,onRetry:o,onDismiss:i}){let n=zL(e.startedAt);return(0,ph.jsxs)(At,{onClick:r,sx:sb(t),children:[(0,ph.jsx)(IL,{name:e.name,isDone:e.status==="done",onRetry:o,onDismiss:i}),(0,ph.jsx)(LL,{status:e.status,elapsed:n})]})}var dh=S(k(),1);function HL({sessions:e,activeId:t,onSelect:r,onRetry:o,onDismiss:i}){return(0,dh.jsxs)(me,{sx:{flex:1,overflow:"auto",p:1},children:[e.map(n=>(0,dh.jsx)(FL,{session:n,active:n.id===t,onClick:()=>r(n.id),onRetry:n.commandType==="run"&&n.status==="done"?()=>o(n.id):void 0,onDismiss:()=>i(n.id)},n.id)),e.length===0&&(0,dh.jsx)(Z,{variant:"caption",color:"text.disabled",sx:{display:"block",textAlign:"center",p:2},children:"No sessions yet"})]})}var Fl=S(k(),1);function UL({sessions:e,activeId:t,currentCwd:r,history:o,run:i,onSelect:n,onCreate:s,onCreateAssist:a,onRetry:l,onDismiss:c}){return(0,Fl.jsxs)(Fl.Fragment,{children:[(0,Fl.jsx)(HL,{sessions:e,activeId:t,onSelect:n,onRetry:l,onDismiss:c}),(0,Fl.jsx)(kL,{currentCwd:r,history:o,runConfigs:i.configs,onCreate:s,onCreateRun:i.create,onCreateAssist:a,onRequestRunConfigs:i.requestConfigs})]})}var lb=S(I(),1);function $L(e){let t=Date.now()-new Date(e).getTime(),r=Math.floor(t/1e3);if(r<60)return"just now";let o=Math.floor(r/60);if(o<60)return`${o}m ago`;let i=Math.floor(o/60);if(i<24)return`${i}h ago`;let n=Math.floor(i/24);return n<30?`${n}d ago`:`${Math.floor(n/30)}mo ago`}var Hl=S(k(),1);function jL({session:e,onResume:t}){return(0,Hl.jsxs)(At,{onClick:()=>t(e),sx:sb(!1),children:[(0,Hl.jsx)(Z,{variant:"body2",noWrap:!0,sx:{color:"text.primary"},children:e.name}),(0,Hl.jsxs)(me,{sx:{display:"flex",justifyContent:"space-between",mt:.5},children:[(0,Hl.jsx)(Z,{variant:"caption",color:"info.main",children:e.project}),(0,Hl.jsx)(Z,{variant:"caption",color:"text.disabled",children:$L(e.timestamp)})]})]})}var Tp=S(k(),1);function WL({items:e,selected:t,onToggle:r}){return(0,Tp.jsx)(tl,{dense:!0,sx:oL,children:e.map(o=>(0,Tp.jsxs)(Nn,{onClick:()=>r(o),dense:!0,children:[(0,Tp.jsx)(d0,{size:"small",checked:t.has(o),sx:{p:0,mr:1}}),(0,Tp.jsx)(k0,{primary:o,slotProps:{primary:{variant:"caption"}}})]},o))})}var b1=S(k(),1);function KK(e){return e.size===0?"All projects":e.size===1?[...e][0]:`${e.size} projects`}function VL({projects:e,selected:t,onChange:r}){let o=i=>{let n=new Set(t);n.has(i)?n.delete(i):n.add(i),r(n)};return(0,b1.jsx)(rb,{label:KK(t),children:()=>(0,b1.jsx)(WL,{items:e,selected:t,onToggle:o})})}function qL(e){let t=new Set;for(let r of e)t.add(r.project);return[...t].sort()}function KL(e,t){return t.size===0?e:e.filter(r=>t.has(r.project))}var yn=S(k(),1);function GK({hasAny:e}){return(0,yn.jsx)(Z,{variant:"caption",color:"text.disabled",sx:{display:"block",textAlign:"center",p:2},children:e?"No sessions match filter":"No session history"})}function YK({sessions:e,onResume:t}){return(0,yn.jsxs)(me,{sx:{flex:1,overflow:"auto",p:1},children:[e.map(r=>(0,yn.jsx)(jL,{session:r,onResume:t},r.sessionId)),e.length===0&&(0,yn.jsx)(GK,{hasAny:!1})]})}function GL({sessions:e,onResume:t}){let[r,o]=(0,lb.useState)(new Set),i=(0,lb.useMemo)(()=>qL(e),[e]),n=KL(e,r);return(0,yn.jsxs)(me,{sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[i.length>1&&(0,yn.jsx)(me,{sx:{px:1,pt:1},children:(0,yn.jsx)(VL,{projects:i,selected:r,onChange:o})}),(0,yn.jsx)(YK,{sessions:n,onResume:t})]})}var fh=S(k(),1),YL={minHeight:36,py:0,fontSize:12};function XL({tab:e,activeCount:t,historyCount:r,onChange:o}){return(0,fh.jsxs)(Zd,{value:e==="active"?0:1,onChange:(n,s)=>o(s===0?"active":"history"),variant:"fullWidth",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:[(0,fh.jsx)(rl,{label:`Active ${t}`,sx:YL}),(0,fh.jsx)(rl,{label:`History ${r}`,sx:YL})]})}var Cp=S(k(),1),XK={width:280,minWidth:280,borderRight:1,borderColor:"divider",display:"flex",flexDirection:"column",bgcolor:"background.paper"};function ZL(e){return(0,Cp.jsxs)(me,{sx:XK,children:[(0,Cp.jsx)(XL,{tab:e.tab,activeCount:e.sessions.length,historyCount:e.history.length,onChange:e.onTabChange}),e.tab==="active"?(0,Cp.jsx)(UL,{sessions:e.sessions,activeId:e.activeId,currentCwd:e.currentCwd,history:e.history,run:e.run,onSelect:e.onSelect,onCreate:e.onCreate,onCreateAssist:e.onCreateAssist,onRetry:e.onRetry,onDismiss:e.onDismiss}):(0,Cp.jsx)(GL,{sessions:e.history,onResume:e.onResume})]})}var JL=S(k(),1);function QL({socket:e,tab:t,onTabChange:r}){let o=(0,cb.useCallback)(n=>{e.resumeSession(n.sessionId,n.cwd,n.name),r("active")},[e.resumeSession,r]),i=(0,cb.useMemo)(()=>({configs:e.runConfigs,create:e.createRunSession,requestConfigs:e.requestRunConfigs}),[e.runConfigs,e.createRunSession,e.requestRunConfigs]);return(0,JL.jsx)(ZL,{sessions:e.sessions,history:e.history,run:i,activeId:e.activeId,currentCwd:e.currentCwd,tab:t,onTabChange:r,onSelect:e.setActiveId,onCreate:e.createSession,onCreateAssist:e.createAssistSession,onResume:o,onRetry:e.retrySession,onDismiss:e.dismissSession})}var aI=S(I(),1);var Ih=S(I(),1);var ZK=2,QK=1,e5=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),s={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},a=s.top+s.bottom,l=s.right+s.left,c=o-a,u=i-l-t;return{cols:Math.max(ZK,Math.floor(u/e.css.cell.width)),rows:Math.max(QK,Math.floor(c/e.css.cell.height))}}};var i3=Object.defineProperty,JK=Object.getOwnPropertyDescriptor,eG=(e,t)=>{for(var r in t)i3(e,r,{get:t[r],enumerable:!0})},Ut=(e,t,r,o)=>{for(var i=o>1?void 0:o?JK(t,r):t,n=e.length-1,s;n>=0;n--)(s=e[n])&&(i=(o?s(t,r,i):s(i))||i);return o&&i&&i3(t,r,i),i},J=(e,t)=>(r,o)=>t(r,o,e),t5="Terminal input",L1={get:()=>t5,set:e=>t5=e},r5="Too much output to announce, navigate to rows manually to read",I1={get:()=>r5,set:e=>r5=e};function tG(e){return e.replace(/\r?\n/g,"\r")}function rG(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function oG(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function iG(e,t,r,o){if(e.stopPropagation(),e.clipboardData){let i=e.clipboardData.getData("text/plain");n3(i,t,r,o)}}function n3(e,t,r,o){e=tG(e),e=rG(e,r.decPrivateModes.bracketedPasteMode&&o.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function s3(e,t,r){let o=r.getBoundingClientRect(),i=e.clientX-o.left-10,n=e.clientY-o.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${i}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function o5(e,t,r,o,i){s3(e,t,r),i&&o.rightClickSelect(e),t.value=o.selectionText,t.select()}function ma(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Bb(e,t=0,r=e.length){let o="";for(let i=t;i<r;++i){let n=e[i];n>65535?(n-=65536,o+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):o+=String.fromCharCode(n)}return o}var nG=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let o=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[o++]=(this._interim-55296)*1024+n-56320+65536:(t[o++]=this._interim,t[o++]=n),this._interim=0}for(let n=i;n<r;++n){let s=e.charCodeAt(n);if(55296<=s&&s<=56319){if(++n>=r)return this._interim=s,o;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[o++]=(s-55296)*1024+a-56320+65536:(t[o++]=s,t[o++]=a);continue}s!==65279&&(t[o++]=s)}return o}},sG=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let o=0,i,n,s,a,l=0,c=0;if(this.interim[0]){let f=!1,d=this.interim[0];d&=(d&224)===192?31:(d&240)===224?15:7;let h=0,y;for(;(y=this.interim[++h]&63)&&h<4;)d<<=6,d|=y;let b=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,m=b-h;for(;c<m;){if(c>=r)return 0;if(y=e[c++],(y&192)!==128){c--,f=!0;break}else this.interim[h++]=y,d<<=6,d|=y&63}f||(b===2?d<128?c--:t[o++]=d:b===3?d<2048||d>=55296&&d<=57343||d===65279||(t[o++]=d):d<65536||d>1114111||(t[o++]=d)),this.interim.fill(0)}let u=r-4,p=c;for(;p<r;){for(;p<u&&!((i=e[p])&128)&&!((n=e[p+1])&128)&&!((s=e[p+2])&128)&&!((a=e[p+3])&128);)t[o++]=i,t[o++]=n,t[o++]=s,t[o++]=a,p+=4;if(i=e[p++],i<128)t[o++]=i;else if((i&224)===192){if(p>=r)return this.interim[0]=i,o;if(n=e[p++],(n&192)!==128){p--;continue}if(l=(i&31)<<6|n&63,l<128){p--;continue}t[o++]=l}else if((i&240)===224){if(p>=r)return this.interim[0]=i,o;if(n=e[p++],(n&192)!==128){p--;continue}if(p>=r)return this.interim[0]=i,this.interim[1]=n,o;if(s=e[p++],(s&192)!==128){p--;continue}if(l=(i&15)<<12|(n&63)<<6|s&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[o++]=l}else if((i&248)===240){if(p>=r)return this.interim[0]=i,o;if(n=e[p++],(n&192)!==128){p--;continue}if(p>=r)return this.interim[0]=i,this.interim[1]=n,o;if(s=e[p++],(s&192)!==128){p--;continue}if(p>=r)return this.interim[0]=i,this.interim[1]=n,this.interim[2]=s,o;if(a=e[p++],(a&192)!==128){p--;continue}if(l=(i&7)<<18|(n&63)<<12|(s&63)<<6|a&63,l<65536||l>1114111)continue;t[o++]=l}}return o}},a3="",ya=" ",Ah=class l3{constructor(){this.fg=0,this.bg=0,this.extended=new wb}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new l3;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},wb=class c3{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new c3(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},bi=class u3 extends Ah{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new wb,this.combinedData=""}static fromCharData(t){let r=new u3;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?ma(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let o=t[1].charCodeAt(0);if(55296<=o&&o<=56319){let i=t[1].charCodeAt(1);56320<=i&&i<=57343?this.content=(o-55296)*1024+i-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},i5="di$target",z1="di$dependencies",_1=new Map;function aG(e){return e[z1]||[]}function Sr(e){if(_1.has(e))return _1.get(e);let t=function(r,o,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");lG(t,r,i)};return t._id=e,_1.set(e,t),t}function lG(e,t,r){t[i5]===t?t[z1].push({id:e,index:r}):(t[z1]=[{id:e,index:r}],t[i5]=t)}var ro=Sr("BufferService"),p3=Sr("CoreMouseService"),Gl=Sr("CoreService"),cG=Sr("CharsetService"),_C=Sr("InstantiationService"),d3=Sr("LogService"),oo=Sr("OptionsService"),f3=Sr("OscLinkService"),uG=Sr("UnicodeService"),Bh=Sr("DecorationService"),F1=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let o=[],i=this._optionsService.rawOptions.linkHandler,n=new bi,s=r.getTrimmedLength(),a=-1,l=-1,c=!1;for(let u=0;u<s;u++)if(!(l===-1&&!r.hasContent(u))){if(r.loadCell(u,n),n.hasExtendedAttrs()&&n.extended.urlId)if(l===-1){l=u,a=n.extended.urlId;continue}else c=n.extended.urlId!==a;else l!==-1&&(c=!0);if(c||l!==-1&&u===s-1){let p=this._oscLinkService.getLinkData(a)?.uri;if(p){let f={start:{x:l+1,y:e},end:{x:u+(!c&&u===s-1?1:0),y:e}},d=!1;if(!i?.allowNonHttpProtocols)try{let h=new URL(p);["http:","https:"].includes(h.protocol)||(d=!0)}catch{d=!0}d||o.push({text:p,range:f,activate:(h,y)=>i?i.activate(h,y,f):pG(h,y),hover:(h,y)=>i?.hover?.(h,y,f),leave:(h,y)=>i?.leave?.(h,y,f)})}c=!1,n.hasExtendedAttrs()&&n.extended.urlId?(l=u,a=n.extended.urlId):(l=-1,a=-1)}}t(o)}};F1=Ut([J(0,ro),J(1,oo),J(2,f3)],F1);function pG(e,t){if(confirm(`Do you want to navigate to ${t}?
204
+
205
+ WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var Nb=Sr("CharSizeService"),fs=Sr("CoreBrowserService"),SC=Sr("MouseService"),hs=Sr("RenderService"),dG=Sr("SelectionService"),h3=Sr("CharacterJoinerService"),Ep=Sr("ThemeService"),m3=Sr("LinkProviderService"),fG=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?n5.isErrorNoTelemetry(e)?new n5(e.message+`
12
206
 
13
207
  `+e.stack):new Error(e.message+`
14
208
 
15
- `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},gw=new _w;function Po(e){pw(e)||gw.onUnexpectedError(e)}var xd="Canceled";function pw(e){return e instanceof vw?!0:e instanceof Error&&e.name===xd&&e.message===xd}var vw=class extends Error{constructor(){super(xd),this.name=this.message}};function mw(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var c0=class Dd extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Dd)return t;let i=new Dd;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Rd=class bS extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,bS.prototype)}};function Sw(e,t,i=0,s=e.length){let r=i,n=s;for(;r<n;){let l=Math.floor((r+n)/2);t(e[l])?r=l+1:n=l}return r-1}var yw=class CS{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(CS.assertInvariants){if(this._prevFindLastPredicate){for(let s of this._array)if(this._prevFindLastPredicate(s)&&!t(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let i=Sw(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=i+1,i===-1?void 0:this._array[i]}};yw.assertInvariants=!1;function Rt(e,t=0){return e[e.length-(1+t)]}var wS;(e=>{function t(n){return n<0}e.isLessThan=t;function i(n){return n<=0}e.isLessThanOrEqual=i;function s(n){return n>0}e.isGreaterThan=s;function r(n){return n===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(wS||(wS={}));function bw(e,t){return(i,s)=>t(e(i),e(s))}var Cw=(e,t)=>e-t,u0=class Md{constructor(t){this.iterate=t}forEach(t){this.iterate(i=>(t(i),!0))}toArray(){let t=[];return this.iterate(i=>(t.push(i),!0)),t}filter(t){return new Md(i=>this.iterate(s=>t(s)?i(s):!0))}map(t){return new Md(i=>this.iterate(s=>i(t(s))))}some(t){let i=!1;return this.iterate(s=>(i=t(s),!i)),i}findFirst(t){let i;return this.iterate(s=>t(s)?(i=s,!1):!0),i}findLast(t){let i;return this.iterate(s=>(t(s)&&(i=s),!0)),i}findLastMaxBy(t){let i,s=!0;return this.iterate(r=>((s||wS.isGreaterThan(t(r,i)))&&(s=!1,i=r),!0)),i}};u0.empty=new u0(e=>{});function ww(e,t){let i=Object.create(null);for(let s of e){let r=t(s),n=i[r];n||(n=i[r]=[]),n.push(s)}return i}var d0,f0,T5=class{constructor(e,t){this.toKey=t,this._map=new Map,this[d0]="SetWithKey";for(let i of e)this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[(f0=Symbol.iterator,d0=Symbol.toStringTag,f0)](){return this.values()}},Ew=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}};function xw(e,t){let i=this,s=!1,r;return function(){if(s)return r;if(s=!0,t)try{r=e.apply(i,arguments)}finally{t()}else r=e.apply(i,arguments);return r}}var ES;(e=>{function t(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function s(){return i}e.empty=s;function*r(S){yield S}e.single=r;function n(S){return t(S)?S:r(S)}e.wrap=n;function l(S){return S||i}e.from=l;function*a(S){for(let w=S.length-1;w>=0;w--)yield S[w]}e.reverse=a;function o(S){return!S||S[Symbol.iterator]().next().done===!0}e.isEmpty=o;function h(S){return S[Symbol.iterator]().next().value}e.first=h;function u(S,w){let O=0;for(let D of S)if(w(D,O++))return!0;return!1}e.some=u;function c(S,w){for(let O of S)if(w(O))return O}e.find=c;function*d(S,w){for(let O of S)w(O)&&(yield O)}e.filter=d;function*f(S,w){let O=0;for(let D of S)yield w(D,O++)}e.map=f;function*p(S,w){let O=0;for(let D of S)yield*w(D,O++)}e.flatMap=p;function*m(...S){for(let w of S)yield*w}e.concat=m;function C(S,w,O){let D=O;for(let N of S)D=w(D,N);return D}e.reduce=C;function*_(S,w,O=S.length){for(w<0&&(w+=S.length),O<0?O+=S.length:O>S.length&&(O=S.length);w<O;w++)yield S[w]}e.slice=_;function g(S,w=Number.POSITIVE_INFINITY){let O=[];if(w===0)return[O,S];let D=S[Symbol.iterator]();for(let N=0;N<w;N++){let U=D.next();if(U.done)return[O,e.empty()];O.push(U.value)}return[O,{[Symbol.iterator](){return D}}]}e.consume=g;async function v(S){let w=[];for await(let O of S)w.push(O);return Promise.resolve(w)}e.asyncToArray=v})(ES||(ES={}));var Dw=!1,sr=null,Rw=class xS{constructor(){this.livingDisposables=new Map}getDisposableData(t){let i=this.livingDisposables.get(t);return i||(i={parent:null,source:null,isSingleton:!1,value:t,idx:xS.idx++},this.livingDisposables.set(t,i)),i}trackDisposable(t){let i=this.getDisposableData(t);i.source||(i.source=new Error().stack)}setParent(t,i){let s=this.getDisposableData(t);s.parent=i}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,i){let s=i.get(t);if(s)return s;let r=t.parent?this.getRootParent(this.getDisposableData(t.parent),i):t;return i.set(t,r),r}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,i])=>i.source!==null&&!this.getRootParent(i,t).isSingleton).flatMap(([i])=>i)}computeLeakingDisposables(t=10,i){let s;if(i)s=i;else{let o=new Map,h=[...this.livingDisposables.values()].filter(c=>c.source!==null&&!this.getRootParent(c,o).isSingleton);if(h.length===0)return;let u=new Set(h.map(c=>c.value));if(s=h.filter(c=>!(c.parent&&u.has(c.parent))),s.length===0)throw new Error("There are cyclic diposable chains!")}if(!s)return;function r(o){function h(c,d){for(;c.length>0&&d.some(f=>typeof f=="string"?f===c[0]:c[0].match(f));)c.shift()}let u=o.source.split(`
16
- `).map(c=>c.trim().replace("at ","")).filter(c=>c!=="");return h(u,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),u.reverse()}let n=new Ew;for(let o of s){let h=r(o);for(let u=0;u<=h.length;u++)n.add(h.slice(0,u).join(`
17
- `),o)}s.sort(bw(o=>o.idx,Cw));let l="",a=0;for(let o of s.slice(0,t)){a++;let h=r(o),u=[];for(let c=0;c<h.length;c++){let d=h[c];d=`(shared with ${n.get(h.slice(0,c+1).join(`
18
- `)).size}/${s.length} leaks) at ${d}`;let f=n.get(h.slice(0,c).join(`
19
- `)),p=ww([...f].map(m=>r(m)[c]),m=>m);delete p[h[c]];for(let[m,C]of Object.entries(p))u.unshift(` - stacktraces of ${C.length} other leaks continue with ${m}`);u.unshift(d)}l+=`
209
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},hG=new fG;function mb(e){mG(e)||hG.onUnexpectedError(e)}var H1="Canceled";function mG(e){return e instanceof yG?!0:e instanceof Error&&e.name===H1&&e.message===H1}var yG=class extends Error{constructor(){super(H1),this.name=this.message}};function gG(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var n5=class U1 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof U1)return t;let r=new U1;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},$1=class y3 extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,y3.prototype)}};function vG(e,t,r=0,o=e.length){let i=r,n=o;for(;i<n;){let s=Math.floor((i+n)/2);t(e[s])?i=s+1:n=s}return i-1}var bG=class g3{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(g3.assertInvariants){if(this._prevFindLastPredicate){for(let o of this._array)if(this._prevFindLastPredicate(o)&&!t(o))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=vG(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};bG.assertInvariants=!1;function $o(e,t=0){return e[e.length-(1+t)]}var v3;(e=>{function t(n){return n<0}e.isLessThan=t;function r(n){return n<=0}e.isLessThanOrEqual=r;function o(n){return n>0}e.isGreaterThan=o;function i(n){return n===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(v3||(v3={}));function _G(e,t){return(r,o)=>t(e(r),e(o))}var SG=(e,t)=>e-t,s5=class j1{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new j1(r=>this.iterate(o=>t(o)?r(o):!0))}map(t){return new j1(r=>this.iterate(o=>r(t(o))))}some(t){let r=!1;return this.iterate(o=>(r=t(o),!r)),r}findFirst(t){let r;return this.iterate(o=>t(o)?(r=o,!1):!0),r}findLast(t){let r;return this.iterate(o=>(t(o)&&(r=o),!0)),r}findLastMaxBy(t){let r,o=!0;return this.iterate(i=>((o||v3.isGreaterThan(t(i,r)))&&(o=!1,r=i),!0)),r}};s5.empty=new s5(e=>{});function xG(e,t){let r=Object.create(null);for(let o of e){let i=t(o),n=r[i];n||(n=r[i]=[]),n.push(o)}return r}var a5,l5,KNe=class{constructor(e,t){this.toKey=t,this._map=new Map,this[a5]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(l5=Symbol.iterator,a5=Symbol.toStringTag,l5)](){return this.values()}},TG=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function CG(e,t){let r=this,o=!1,i;return function(){if(o)return i;if(o=!0,t)try{i=e.apply(r,arguments)}finally{t()}else i=e.apply(r,arguments);return i}}var b3;(e=>{function t(_){return _&&typeof _=="object"&&typeof _[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function o(){return r}e.empty=o;function*i(_){yield _}e.single=i;function n(_){return t(_)?_:i(_)}e.wrap=n;function s(_){return _||r}e.from=s;function*a(_){for(let C=_.length-1;C>=0;C--)yield _[C]}e.reverse=a;function l(_){return!_||_[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(_){return _[Symbol.iterator]().next().value}e.first=c;function u(_,C){let w=0;for(let E of _)if(C(E,w++))return!0;return!1}e.some=u;function p(_,C){for(let w of _)if(C(w))return w}e.find=p;function*f(_,C){for(let w of _)C(w)&&(yield w)}e.filter=f;function*d(_,C){let w=0;for(let E of _)yield C(E,w++)}e.map=d;function*h(_,C){let w=0;for(let E of _)yield*C(E,w++)}e.flatMap=h;function*y(..._){for(let C of _)yield*C}e.concat=y;function b(_,C,w){let E=w;for(let O of _)E=C(E,O);return E}e.reduce=b;function*m(_,C,w=_.length){for(C<0&&(C+=_.length),w<0?w+=_.length:w>_.length&&(w=_.length);C<w;C++)yield _[C]}e.slice=m;function g(_,C=Number.POSITIVE_INFINITY){let w=[];if(C===0)return[w,_];let E=_[Symbol.iterator]();for(let O=0;O<C;O++){let A=E.next();if(A.done)return[w,e.empty()];w.push(A.value)}return[w,{[Symbol.iterator](){return E}}]}e.consume=g;async function v(_){let C=[];for await(let w of _)C.push(w);return Promise.resolve(C)}e.asyncToArray=v})(b3||(b3={}));var wG=!1,Vl=null,RG=class _3{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:_3.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let o=this.getDisposableData(t);o.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let o=r.get(t);if(o)return o;let i=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,i),i}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let o;if(r)o=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(p=>p.source!==null&&!this.getRootParent(p,l).isSingleton);if(c.length===0)return;let u=new Set(c.map(p=>p.value));if(o=c.filter(p=>!(p.parent&&u.has(p.parent))),o.length===0)throw new Error("There are cyclic diposable chains!")}if(!o)return;function i(l){function c(p,f){for(;p.length>0&&f.some(d=>typeof d=="string"?d===p[0]:p[0].match(d));)p.shift()}let u=l.source.split(`
210
+ `).map(p=>p.trim().replace("at ","")).filter(p=>p!=="");return c(u,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),u.reverse()}let n=new TG;for(let l of o){let c=i(l);for(let u=0;u<=c.length;u++)n.add(c.slice(0,u).join(`
211
+ `),l)}o.sort(_G(l=>l.idx,SG));let s="",a=0;for(let l of o.slice(0,t)){a++;let c=i(l),u=[];for(let p=0;p<c.length;p++){let f=c[p];f=`(shared with ${n.get(c.slice(0,p+1).join(`
212
+ `)).size}/${o.length} leaks) at ${f}`;let d=n.get(c.slice(0,p).join(`
213
+ `)),h=xG([...d].map(y=>i(y)[p]),y=>y);delete h[c[p]];for(let[y,b]of Object.entries(h))u.unshift(` - stacktraces of ${b.length} other leaks continue with ${y}`);u.unshift(f)}s+=`
20
214
 
21
215
 
22
- ==================== Leaking disposable ${a}/${s.length}: ${o.value.constructor.name} ====================
216
+ ==================== Leaking disposable ${a}/${o.length}: ${l.value.constructor.name} ====================
23
217
  ${u.join(`
24
218
  `)}
25
219
  ============================================================
26
220
 
27
- `}return s.length>t&&(l+=`
221
+ `}return o.length>t&&(s+=`
28
222
 
29
223
 
30
- ... and ${s.length-t} more leaking disposables
224
+ ... and ${o.length-t} more leaking disposables
31
225
 
32
- `),{leaks:s,details:l}}};Rw.idx=0;function Mw(e){sr=e}if(Dw){let e="__is_disposable_tracked__";Mw(new class{trackDisposable(t){let i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}setParent(t,i){if(t&&t!==W.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==W.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function ch(e){return sr?.trackDisposable(e),e}function uh(e){sr?.markAsDisposed(e)}function Kl(e,t){sr?.setParent(e,t)}function Tw(e,t){if(sr)for(let i of e)sr.setParent(i,t)}function _0(e){return sr?.markAsSingleton(e),e}function rr(e){if(ES.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Aw(...e){let t=de(()=>rr(e));return Tw(e,t),t}function de(e){let t=ch({dispose:xw(()=>{uh(t),e()})});return t}var DS=class RS{constructor(){this._toDispose=new Set,this._isDisposed=!1,ch(this)}dispose(){this._isDisposed||(uh(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{rr(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Kl(t,this),this._isDisposed?RS.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Kl(t,null))}};DS.DISABLE_DISPOSED_WARNING=!1;var Ds=DS,W=class{constructor(){this._store=new Ds,ch(this),Kl(this._store,this)}dispose(){uh(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};W.None=Object.freeze({dispose(){}});var cn=class{constructor(){this._isDisposed=!1,ch(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Kl(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,uh(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Kl(e,null),e}},At=typeof window=="object"?window:globalThis,Td=class Ad{constructor(t){this.element=t,this.next=Ad.Undefined,this.prev=Ad.Undefined}};Td.Undefined=new Td(void 0);var pe=Td,g0=class{constructor(){this._first=pe.Undefined,this._last=pe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===pe.Undefined}clear(){let e=this._first;for(;e!==pe.Undefined;){let t=e.next;e.prev=pe.Undefined,e.next=pe.Undefined,e=t}this._first=pe.Undefined,this._last=pe.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new pe(e);if(this._first===pe.Undefined)this._first=i,this._last=i;else if(t){let r=this._last;this._last=i,i.prev=r,r.next=i}else{let r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==pe.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==pe.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==pe.Undefined&&e.next!==pe.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===pe.Undefined&&e.next===pe.Undefined?(this._first=pe.Undefined,this._last=pe.Undefined):e.next===pe.Undefined?(this._last=this._last.prev,this._last.next=pe.Undefined):e.prev===pe.Undefined&&(this._first=this._first.next,this._first.prev=pe.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==pe.Undefined;)yield e.element,e=e.next}},Bw=globalThis.performance&&typeof globalThis.performance.now=="function",kw=class MS{static create(t){return new MS(t)}constructor(t){this._now=Bw&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Ow=!1,p0=!1,zw=!1,$e;(e=>{e.None=()=>W.None;function t(M){if(zw){let{onDidAddListener:x}=M,k=Od.create(),T=0;M.onDidAddListener=()=>{++T===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),k.print()),x?.()}}}function i(M,x){return d(M,()=>{},0,void 0,!0,void 0,x)}e.defer=i;function s(M){return(x,k=null,T)=>{let L=!1,R;return R=M(G=>{if(!L)return R?R.dispose():L=!0,x.call(k,G)},null,T),L&&R.dispose(),R}}e.once=s;function r(M,x,k){return u((T,L=null,R)=>M(G=>T.call(L,x(G)),null,R),k)}e.map=r;function n(M,x,k){return u((T,L=null,R)=>M(G=>{x(G),T.call(L,G)},null,R),k)}e.forEach=n;function l(M,x,k){return u((T,L=null,R)=>M(G=>x(G)&&T.call(L,G),null,R),k)}e.filter=l;function a(M){return M}e.signal=a;function o(...M){return(x,k=null,T)=>{let L=Aw(...M.map(R=>R(G=>x.call(k,G))));return c(L,T)}}e.any=o;function h(M,x,k,T){let L=k;return r(M,R=>(L=x(L,R),L),T)}e.reduce=h;function u(M,x){let k,T={onWillAddFirstListener(){k=M(L.fire,L)},onDidRemoveLastListener(){k?.dispose()}};x||t(T);let L=new E(T);return x?.add(L),L.event}function c(M,x){return x instanceof Array?x.push(M):x&&x.add(M),M}function d(M,x,k=100,T=!1,L=!1,R,G){let ge,Fe,Qt,ui=0,Ne,Yi={leakWarningThreshold:R,onWillAddFirstListener(){ge=M(Rs=>{ui++,Fe=x(Fe,Rs),T&&!Qt&&(tt.fire(Fe),Fe=void 0),Ne=()=>{let pn=Fe;Fe=void 0,Qt=void 0,(!T||ui>1)&&tt.fire(pn),ui=0},typeof k=="number"?(clearTimeout(Qt),Qt=setTimeout(Ne,k)):Qt===void 0&&(Qt=0,queueMicrotask(Ne))})},onWillRemoveListener(){L&&ui>0&&Ne?.()},onDidRemoveLastListener(){Ne=void 0,ge.dispose()}};G||t(Yi);let tt=new E(Yi);return G?.add(tt),tt.event}e.debounce=d;function f(M,x=0,k){return e.debounce(M,(T,L)=>T?(T.push(L),T):[L],x,void 0,!0,void 0,k)}e.accumulate=f;function p(M,x=(T,L)=>T===L,k){let T=!0,L;return l(M,R=>{let G=T||!x(R,L);return T=!1,L=R,G},k)}e.latch=p;function m(M,x,k){return[e.filter(M,x,k),e.filter(M,T=>!x(T),k)]}e.split=m;function C(M,x=!1,k=[],T){let L=k.slice(),R=M(Fe=>{L?L.push(Fe):ge.fire(Fe)});T&&T.add(R);let G=()=>{L?.forEach(Fe=>ge.fire(Fe)),L=null},ge=new E({onWillAddFirstListener(){R||(R=M(Fe=>ge.fire(Fe)),T&&T.add(R))},onDidAddFirstListener(){L&&(x?setTimeout(G):G())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return T&&T.add(ge),ge.event}e.buffer=C;function _(M,x){return(k,T,L)=>{let R=x(new v);return M(function(G){let ge=R.evaluate(G);ge!==g&&k.call(T,ge)},void 0,L)}}e.chain=_;let g=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(x){return this.steps.push(x),this}forEach(x){return this.steps.push(k=>(x(k),k)),this}filter(x){return this.steps.push(k=>x(k)?k:g),this}reduce(x,k){let T=k;return this.steps.push(L=>(T=x(T,L),T)),this}latch(x=(k,T)=>k===T){let k=!0,T;return this.steps.push(L=>{let R=k||!x(L,T);return k=!1,T=L,R?L:g}),this}evaluate(x){for(let k of this.steps)if(x=k(x),x===g)break;return x}}function S(M,x,k=T=>T){let T=(...ge)=>G.fire(k(...ge)),L=()=>M.on(x,T),R=()=>M.removeListener(x,T),G=new E({onWillAddFirstListener:L,onDidRemoveLastListener:R});return G.event}e.fromNodeEventEmitter=S;function w(M,x,k=T=>T){let T=(...ge)=>G.fire(k(...ge)),L=()=>M.addEventListener(x,T),R=()=>M.removeEventListener(x,T),G=new E({onWillAddFirstListener:L,onDidRemoveLastListener:R});return G.event}e.fromDOMEventEmitter=w;function O(M){return new Promise(x=>s(M)(x))}e.toPromise=O;function D(M){let x=new E;return M.then(k=>{x.fire(k)},()=>{x.fire(void 0)}).finally(()=>{x.dispose()}),x.event}e.fromPromise=D;function N(M,x){return M(k=>x.fire(k))}e.forward=N;function U(M,x,k){return x(k),M(T=>x(T))}e.runAndSubscribe=U;class V{constructor(x,k){this._observable=x,this._counter=0,this._hasChanged=!1;let T={onWillAddFirstListener:()=>{x.addObserver(this)},onDidRemoveLastListener:()=>{x.removeObserver(this)}};k||t(T),this.emitter=new E(T),k&&k.add(this.emitter)}beginUpdate(x){this._counter++}handlePossibleChange(x){}handleChange(x,k){this._hasChanged=!0}endUpdate(x){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(M,x){return new V(M,x).emitter.event}e.fromObservable=Z;function gn(M){return(x,k,T)=>{let L=0,R=!1,G={beginUpdate(){L++},endUpdate(){L--,L===0&&(M.reportChanges(),R&&(R=!1,x.call(k)))},handlePossibleChange(){},handleChange(){R=!0}};M.addObserver(G),M.reportChanges();let ge={dispose(){M.removeObserver(G)}};return T instanceof Ds?T.add(ge):Array.isArray(T)&&T.push(ge),ge}}e.fromObservableLight=gn})($e||($e={}));var Bd=class kd{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${kd._idPool++}`,kd.all.add(this)}start(t){this._stopWatch=new kw,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Bd.all=new Set,Bd._idPool=0;var Lw=Bd,v0=-1,TS=class AS{constructor(t,i,s=(AS._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,i){let s=this.threshold;if(s<=0||i<s)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let[n,l]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${l}):`;console.warn(a),console.warn(n);let o=new Hw(a,n);this._errorHandler(o)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[s,r]of this._stacks)(!t||i<r)&&(t=[s,r],i=r);return t}};TS._idPool=1;var Nw=TS,Od=class BS{constructor(t){this.value=t}static create(){let t=new Error;return new BS(t.stack??"")}print(){console.warn(this.value.split(`
226
+ `),{leaks:o,details:s}}};RG.idx=0;function PG(e){Vl=e}if(wG){let e="__is_disposable_tracked__";PG(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==xe.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==xe.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function Lb(e){return Vl?.trackDisposable(e),e}function Ib(e){Vl?.markAsDisposed(e)}function kh(e,t){Vl?.setParent(e,t)}function EG(e,t){if(Vl)for(let r of e)Vl.setParent(r,t)}function c5(e){return Vl?.markAsSingleton(e),e}function ql(e){if(b3.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(o){t.push(o)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function kG(...e){let t=wt(()=>ql(e));return EG(e,t),t}function wt(e){let t=Lb({dispose:CG(()=>{Ib(t),e()})});return t}var S3=class x3{constructor(){this._toDispose=new Set,this._isDisposed=!1,Lb(this)}dispose(){this._isDisposed||(Ib(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ql(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return kh(t,this),this._isDisposed?x3.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),kh(t,null))}};S3.DISABLE_DISPOSED_WARNING=!1;var ga=S3,xe=class{constructor(){this._store=new ga,Lb(this),kh(this._store,this)}dispose(){Ib(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};xe.None=Object.freeze({dispose(){}});var Pp=class{constructor(){this._isDisposed=!1,Lb(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&kh(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,Ib(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&kh(e,null),e}},Vo=typeof window=="object"?window:globalThis,W1=class V1{constructor(t){this.element=t,this.next=V1.Undefined,this.prev=V1.Undefined}};W1.Undefined=new W1(void 0);var Bt=W1,u5=class{constructor(){this._first=Bt.Undefined,this._last=Bt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Bt.Undefined}clear(){let e=this._first;for(;e!==Bt.Undefined;){let t=e.next;e.prev=Bt.Undefined,e.next=Bt.Undefined,e=t}this._first=Bt.Undefined,this._last=Bt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new Bt(e);if(this._first===Bt.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(r))}}shift(){if(this._first!==Bt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Bt.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Bt.Undefined&&e.next!==Bt.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Bt.Undefined&&e.next===Bt.Undefined?(this._first=Bt.Undefined,this._last=Bt.Undefined):e.next===Bt.Undefined?(this._last=this._last.prev,this._last.next=Bt.Undefined):e.prev===Bt.Undefined&&(this._first=this._first.next,this._first.prev=Bt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Bt.Undefined;)yield e.element,e=e.next}},OG=globalThis.performance&&typeof globalThis.performance.now=="function",DG=class T3{static create(t){return new T3(t)}constructor(t){this._now=OG&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},MG=!1,p5=!1,AG=!1,Lr;(e=>{e.None=()=>xe.None;function t(R){if(AG){let{onDidAddListener:T}=R,P=G1.create(),M=0;R.onDidAddListener=()=>{++M===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),P.print()),T?.()}}}function r(R,T){return f(R,()=>{},0,void 0,!0,void 0,T)}e.defer=r;function o(R){return(T,P=null,M)=>{let L=!1,N;return N=R(Y=>{if(!L)return N?N.dispose():L=!0,T.call(P,Y)},null,M),L&&N.dispose(),N}}e.once=o;function i(R,T,P){return u((M,L=null,N)=>R(Y=>M.call(L,T(Y)),null,N),P)}e.map=i;function n(R,T,P){return u((M,L=null,N)=>R(Y=>{T(Y),M.call(L,Y)},null,N),P)}e.forEach=n;function s(R,T,P){return u((M,L=null,N)=>R(Y=>T(Y)&&M.call(L,Y),null,N),P)}e.filter=s;function a(R){return R}e.signal=a;function l(...R){return(T,P=null,M)=>{let L=kG(...R.map(N=>N(Y=>T.call(P,Y))));return p(L,M)}}e.any=l;function c(R,T,P,M){let L=P;return i(R,N=>(L=T(L,N),L),M)}e.reduce=c;function u(R,T){let P,M={onWillAddFirstListener(){P=R(L.fire,L)},onDidRemoveLastListener(){P?.dispose()}};T||t(M);let L=new G(M);return T?.add(L),L.event}function p(R,T){return T instanceof Array?T.push(R):T&&T.add(R),R}function f(R,T,P=100,M=!1,L=!1,N,Y){let ee,Q,fe,ve=0,he,ae={leakWarningThreshold:N,onWillAddFirstListener(){ee=R(pe=>{ve++,Q=T(Q,pe),M&&!fe&&(re.fire(Q),Q=void 0),he=()=>{let te=Q;Q=void 0,fe=void 0,(!M||ve>1)&&re.fire(te),ve=0},typeof P=="number"?(clearTimeout(fe),fe=setTimeout(he,P)):fe===void 0&&(fe=0,queueMicrotask(he))})},onWillRemoveListener(){L&&ve>0&&he?.()},onDidRemoveLastListener(){he=void 0,ee.dispose()}};Y||t(ae);let re=new G(ae);return Y?.add(re),re.event}e.debounce=f;function d(R,T=0,P){return e.debounce(R,(M,L)=>M?(M.push(L),M):[L],T,void 0,!0,void 0,P)}e.accumulate=d;function h(R,T=(M,L)=>M===L,P){let M=!0,L;return s(R,N=>{let Y=M||!T(N,L);return M=!1,L=N,Y},P)}e.latch=h;function y(R,T,P){return[e.filter(R,T,P),e.filter(R,M=>!T(M),P)]}e.split=y;function b(R,T=!1,P=[],M){let L=P.slice(),N=R(Q=>{L?L.push(Q):ee.fire(Q)});M&&M.add(N);let Y=()=>{L?.forEach(Q=>ee.fire(Q)),L=null},ee=new G({onWillAddFirstListener(){N||(N=R(Q=>ee.fire(Q)),M&&M.add(N))},onDidAddFirstListener(){L&&(T?setTimeout(Y):Y())},onDidRemoveLastListener(){N&&N.dispose(),N=null}});return M&&M.add(ee),ee.event}e.buffer=b;function m(R,T){return(P,M,L)=>{let N=T(new v);return R(function(Y){let ee=N.evaluate(Y);ee!==g&&P.call(M,ee)},void 0,L)}}e.chain=m;let g=Symbol("HaltChainable");class v{constructor(){this.steps=[]}map(T){return this.steps.push(T),this}forEach(T){return this.steps.push(P=>(T(P),P)),this}filter(T){return this.steps.push(P=>T(P)?P:g),this}reduce(T,P){let M=P;return this.steps.push(L=>(M=T(M,L),M)),this}latch(T=(P,M)=>P===M){let P=!0,M;return this.steps.push(L=>{let N=P||!T(L,M);return P=!1,M=L,N?L:g}),this}evaluate(T){for(let P of this.steps)if(T=P(T),T===g)break;return T}}function _(R,T,P=M=>M){let M=(...ee)=>Y.fire(P(...ee)),L=()=>R.on(T,M),N=()=>R.removeListener(T,M),Y=new G({onWillAddFirstListener:L,onDidRemoveLastListener:N});return Y.event}e.fromNodeEventEmitter=_;function C(R,T,P=M=>M){let M=(...ee)=>Y.fire(P(...ee)),L=()=>R.addEventListener(T,M),N=()=>R.removeEventListener(T,M),Y=new G({onWillAddFirstListener:L,onDidRemoveLastListener:N});return Y.event}e.fromDOMEventEmitter=C;function w(R){return new Promise(T=>o(R)(T))}e.toPromise=w;function E(R){let T=new G;return R.then(P=>{T.fire(P)},()=>{T.fire(void 0)}).finally(()=>{T.dispose()}),T.event}e.fromPromise=E;function O(R,T){return R(P=>T.fire(P))}e.forward=O;function A(R,T,P){return T(P),R(M=>T(M))}e.runAndSubscribe=A;class B{constructor(T,P){this._observable=T,this._counter=0,this._hasChanged=!1;let M={onWillAddFirstListener:()=>{T.addObserver(this)},onDidRemoveLastListener:()=>{T.removeObserver(this)}};P||t(M),this.emitter=new G(M),P&&P.add(this.emitter)}beginUpdate(T){this._counter++}handlePossibleChange(T){}handleChange(T,P){this._hasChanged=!0}endUpdate(T){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function D(R,T){return new B(R,T).emitter.event}e.fromObservable=D;function x(R){return(T,P,M)=>{let L=0,N=!1,Y={beginUpdate(){L++},endUpdate(){L--,L===0&&(R.reportChanges(),N&&(N=!1,T.call(P)))},handlePossibleChange(){},handleChange(){N=!0}};R.addObserver(Y),R.reportChanges();let ee={dispose(){R.removeObserver(Y)}};return M instanceof ga?M.add(ee):Array.isArray(M)&&M.push(ee),ee}}e.fromObservableLight=x})(Lr||(Lr={}));var q1=class K1{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${K1._idPool++}`,K1.all.add(this)}start(t){this._stopWatch=new DG,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};q1.all=new Set,q1._idPool=0;var BG=q1,d5=-1,C3=class w3{constructor(t,r,o=(w3._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=o,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let o=this.threshold;if(o<=0||r<o)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let[n,s]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${s}):`;console.warn(a),console.warn(n);let l=new LG(a,n);this._errorHandler(l)}return()=>{let n=this._stacks.get(t.value)||0;this._stacks.set(t.value,n-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[o,i]of this._stacks)(!t||r<i)&&(t=[o,i],r=i);return t}};C3._idPool=1;var NG=C3,G1=class R3{constructor(t){this.value=t}static create(){let t=new Error;return new R3(t.stack??"")}print(){console.warn(this.value.split(`
33
227
  `).slice(2).join(`
34
- `))}},Hw=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Uw=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},qw=0,Vo=class{constructor(e){this.value=e,this.id=qw++}},Kw=2,Yw=(e,t)=>{if(e instanceof Vo)t(e);else for(let i=0;i<e.length;i++){let s=e[i];s&&t(s)}},Fo;if(Ow){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
35
- `)),e.length=0)},3e3),Fo=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var E=class{constructor(e){this._size=0,this._options=e,this._leakageMon=v0>0||this._options?.leakWarningThreshold?new Nw(e?.onListenerError??Po,this._options?.leakWarningThreshold??v0):void 0,this._perfMon=this._options?._profName?new Lw(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(p0){let e=this._listeners;queueMicrotask(()=>{Yw(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let o=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],h=new Uw(`${a}. HINT: Stack shows most frequent listener (${o[1]}-times)`,o[0]);return(this._options?.onListenerError||Po)(h),W.None}if(this._disposed)return W.None;t&&(e=e.bind(t));let s=new Vo(e),r,n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=Od.create(),r=this._leakageMon.check(s.stack,this._size+1)),p0&&(s.stack=n??Od.create()),this._listeners?this._listeners instanceof Vo?(this._deliveryQueue??(this._deliveryQueue=new Ww),this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let l=de(()=>{Fo?.unregister(l),r?.(),this._removeListener(s)});if(i instanceof Ds?i.add(l):Array.isArray(i)&&i.push(l),Fo){let a=new Error().stack.split(`
228
+ `))}},LG=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},IG=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},zG=0,yb=class{constructor(e){this.value=e,this.id=zG++}},FG=2,HG=(e,t)=>{if(e instanceof yb)t(e);else for(let r=0;r<e.length;r++){let o=e[r];o&&t(o)}},gb;if(MG){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
229
+ `)),e.length=0)},3e3),gb=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var G=class{constructor(e){this._size=0,this._options=e,this._leakageMon=d5>0||this._options?.leakWarningThreshold?new NG(e?.onListenerError??mb,this._options?.leakWarningThreshold??d5):void 0,this._perfMon=this._options?._profName?new BG(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(p5){let e=this._listeners;queueMicrotask(()=>{HG(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new IG(`${a}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||mb)(c),xe.None}if(this._disposed)return xe.None;t&&(e=e.bind(t));let o=new yb(e),i,n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(o.stack=G1.create(),i=this._leakageMon.check(o.stack,this._size+1)),p5&&(o.stack=n??G1.create()),this._listeners?this._listeners instanceof yb?(this._deliveryQueue??(this._deliveryQueue=new UG),this._listeners=[this._listeners,o]):this._listeners.push(o):(this._options?.onWillAddFirstListener?.(this),this._listeners=o,this._options?.onDidAddFirstListener?.(this)),this._size++;let s=wt(()=>{gb?.unregister(s),i?.(),this._removeListener(o)});if(r instanceof ga?r.add(s):Array.isArray(r)&&r.push(s),gb){let a=new Error().stack.split(`
36
230
  `).slice(2,3).join(`
37
- `).trim(),o=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);Fo.register(l,o?.[2]??a,l)}return l}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*Kw<=t.length){let r=0;for(let n=0;n<t.length;n++)t[n]?t[r++]=t[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=r}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||Po;if(!i){e.value(t);return}try{e.value(t)}catch(s){i(s)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Vo)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},Ww=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},zd=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new E,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new E,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(s,t),this._onDidChangeZoomLevel.fire(s)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let s=this.getWindowId(i);this.mapWindowIdToFullScreen.set(s,t),this._onDidChangeFullscreen.fire(s)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};zd.INSTANCE=new zd;var of=zd;function Pw(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}var B5=of.INSTANCE.onDidChangeZoomLevel;function Vw(e){return of.INSTANCE.getZoomFactor(e)}var k5=of.INSTANCE.onDidChangeFullscreen,dn=typeof navigator=="object"?navigator.userAgent:"",Ld=dn.indexOf("Firefox")>=0,Xo=dn.indexOf("AppleWebKit")>=0,hf=dn.indexOf("Chrome")>=0,kS=!hf&&dn.indexOf("Safari")>=0,O5=dn.indexOf("Electron/")>=0,z5=dn.indexOf("Android")>=0,Go=!1;if(typeof At.matchMedia=="function"){let e=At.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=At.matchMedia("(display-mode: fullscreen)");Go=e.matches,Pw(At,e,({matches:i})=>{Go&&t.matches||(Go=i)})}function Fw(){return Go}var hn="en",eh=!1,th=!1,Ul=!1,Xw=!1,OS=!1,zS=!1,Gw=!1,jw=!1,Iw=!1,Zw=!1,Uo,jo=hn,m0=hn,Qw,Ni,Ui=globalThis,Tt;typeof Ui.vscode<"u"&&typeof Ui.vscode.process<"u"?Tt=Ui.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Tt=process);var LS=typeof Tt?.versions?.electron=="string",$w=LS&&Tt?.type==="renderer";if(typeof Tt=="object"){eh=Tt.platform==="win32",th=Tt.platform==="darwin",Ul=Tt.platform==="linux",Xw=Ul&&!!Tt.env.SNAP&&!!Tt.env.SNAP_REVISION,Gw=LS,Iw=!!Tt.env.CI||!!Tt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Uo=hn,jo=hn;let e=Tt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Uo=t.userLocale,m0=t.osLocale,jo=t.resolvedLanguage||hn,Qw=t.languagePack?.translationsConfigFile}catch{}OS=!0}else typeof navigator=="object"&&!$w?(Ni=navigator.userAgent,eh=Ni.indexOf("Windows")>=0,th=Ni.indexOf("Macintosh")>=0,jw=(Ni.indexOf("Macintosh")>=0||Ni.indexOf("iPad")>=0||Ni.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ul=Ni.indexOf("Linux")>=0,Zw=Ni?.indexOf("Mobi")>=0,zS=!0,jo=globalThis._VSCODE_NLS_LANGUAGE||hn,Uo=navigator.language.toLowerCase(),m0=Uo):console.error("Unable to resolve platform.");var ld=0;th?ld=1:eh?ld=3:Ul&&(ld=2);var NS=eh,hi=th,Jw=Ul,ad=OS,e2=zS&&typeof Ui.importScripts=="function",L5=e2?Ui.origin:void 0,ci=Ni,ys=jo,t2;(e=>{function t(){return ys}e.value=t;function i(){return ys.length===2?ys==="en":ys.length>=3?ys[0]==="e"&&ys[1]==="n"&&ys[2]==="-":!1}e.isDefaultVariant=i;function s(){return ys==="en"}e.isDefault=s})(t2||(t2={}));var i2=typeof Ui.postMessage=="function"&&!Ui.importScripts,s2=(()=>{if(i2){let e=[];Ui.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=e.length;s<r;s++){let n=e[s];if(n.id===i.data.vscodeScheduleAsyncWork){e.splice(s,1),n.callback();return}}});let t=0;return i=>{let s=++t;e.push({id:s,callback:i}),Ui.postMessage({vscodeScheduleAsyncWork:s},"*")}}return e=>setTimeout(e)})(),r2=!!(ci&&ci.indexOf("Chrome")>=0),N5=!!(ci&&ci.indexOf("Firefox")>=0),H5=!!(!r2&&ci&&ci.indexOf("Safari")>=0),U5=!!(ci&&ci.indexOf("Edg/")>=0),q5=!!(ci&&ci.indexOf("Android")>=0),bs=typeof navigator=="object"?navigator:{},K5={clipboard:{writeText:ad||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(bs&&bs.clipboard&&bs.clipboard.writeText),readText:ad||!!(bs&&bs.clipboard&&bs.clipboard.readText)},keyboard:ad||Fw()?0:bs.keyboard||kS?1:2,touch:"ontouchstart"in At||bs.maxTouchPoints>0,pointerEvents:At.PointerEvent&&("ontouchstart"in At||navigator.maxTouchPoints>0)},cf=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},od=new cf,S0=new cf,y0=new cf,n2=new Array(230),HS;(e=>{function t(a){return od.keyCodeToStr(a)}e.toString=t;function i(a){return od.strToKeyCode(a)}e.fromString=i;function s(a){return S0.keyCodeToStr(a)}e.toUserSettingsUS=s;function r(a){return y0.keyCodeToStr(a)}e.toUserSettingsGeneral=r;function n(a){return S0.strToKeyCode(a)||y0.strToKeyCode(a)}e.fromUserSettings=n;function l(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return od.keyCodeToStr(a)}e.toElectronAccelerator=l})(HS||(HS={}));var l2=class US{constructor(t,i,s,r,n){this.ctrlKey=t,this.shiftKey=i,this.altKey=s,this.metaKey=r,this.keyCode=n}equals(t){return t instanceof US&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",s=this.altKey?"1":"0",r=this.metaKey?"1":"0";return`K${t}${i}${s}${r}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new a2([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},a2=class{constructor(e){if(e.length===0)throw mw("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function o2(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return HS.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(Ld)switch(t){case 59:return 85;case 60:if(Jw)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(hi)return 57;break}else if(Xo&&(hi&&t===93||!hi&&t===92))return 57;return n2[t]||0}var h2=hi?256:2048,c2=512,u2=1024,d2=hi?2048:256,Nd=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=o2(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=h2),this.altKey&&(t|=c2),this.shiftKey&&(t|=u2),this.metaKey&&(t|=d2),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new l2(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},b0=new WeakMap;function f2(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var _2=class{static getSameOriginWindowChain(e){let t=b0.get(e);if(!t){t=[],b0.set(e,t);let i=e,s;do s=f2(i),s?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=s;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,s=0,r=this.getSameOriginWindowChain(e);for(let n of r){let l=n.window.deref();if(i+=l?.scrollY??0,s+=l?.scrollX??0,l===t||!n.iframeElement)break;let a=n.iframeElement.getBoundingClientRect();i+=a.top,s+=a.left}return{top:i,left:s}}},kl=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=_2.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},C0=class{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(hf){let r=navigator.userAgent.match(/Chrome\/(\d+)/);s=(r?parseInt(r[1]):123)<=122}if(e){let r=e,n=e,l=e.view?.devicePixelRatio||1;if(typeof r.wheelDeltaY<"u")s?this.deltaY=r.wheelDeltaY/(120*l):this.deltaY=r.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<"u"&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?Ld&&!hi?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof r.wheelDeltaX<"u")kS&&NS?this.deltaX=-(r.wheelDeltaX/120):s?this.deltaX=r.wheelDeltaX/(120*l):this.deltaX=r.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<"u"&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?Ld&&!hi?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*l):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},qS=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),g2;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof p2?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:$e.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:qS})})(g2||(g2={}));var p2=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?qS:(this._emitter||(this._emitter=new E),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var uf=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Rd("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Rd("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},v2=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new Rd("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let s=i.setInterval(()=>{e()},t);this.disposable=de(()=>{i.clearInterval(s),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},m2,hd;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?hd=(e,t)=>{s2(()=>{if(i)return;let s=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,s-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:hd=(e,t,i)=>{let s=e.requestIdleCallback(t,typeof i=="number"?{timeout:i}:void 0),r=!1;return{dispose(){r||(r=!0,e.cancelIdleCallback(s))}}},m2=e=>hd(globalThis,e)})();var S2;(e=>{async function t(s){let r,n=await Promise.all(s.map(l=>l.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}e.settled=t;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(l){n(l)}})}e.withAsyncBody=i})(S2||(S2={}));var w0=class Pt{static fromArray(t){return new Pt(i=>{i.emitMany(t)})}static fromPromise(t){return new Pt(async i=>{i.emitMany(await t)})}static fromPromises(t){return new Pt(async i=>{await Promise.all(t.map(async s=>i.emitOne(await s)))})}static merge(t){return new Pt(async i=>{await Promise.all(t.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new E,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await $e.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new Pt(async s=>{for await(let r of t)s.emitOne(i(r))})}map(t){return Pt.map(this,t)}static filter(t,i){return new Pt(async s=>{for await(let r of t)i(r)&&s.emitOne(r)})}filter(t){return Pt.filter(this,t)}static coalesce(t){return Pt.filter(t,i=>!!i)}coalesce(){return Pt.coalesce(this)}static async toPromise(t){let i=[];for await(let s of t)i.push(s);return i}toPromise(){return Pt.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};w0.EMPTY=w0.fromArray([]);function y2(e){return 55296<=e&&e<=56319}function E0(e){return 56320<=e&&e<=57343}function b2(e,t){return(e-55296<<10)+(t-56320)+65536}function C2(e){return df(e,0)}function df(e,t){switch(typeof e){case"object":return e===null?Hi(349,t):Array.isArray(e)?E2(e,t):x2(e,t);case"string":return KS(e,t);case"boolean":return w2(e,t);case"number":return Hi(e,t);case"undefined":return Hi(937,t);default:return Hi(617,t)}}function Hi(e,t){return(t<<5)-t+e|0}function w2(e,t){return Hi(e?433:863,t)}function KS(e,t){t=Hi(149417,t);for(let i=0,s=e.length;i<s;i++)t=Hi(e.charCodeAt(i),t);return t}function E2(e,t){return t=Hi(104579,t),e.reduce((i,s)=>df(s,i),t)}function x2(e,t){return t=Hi(181387,t),Object.keys(e).sort().reduce((i,s)=>(i=KS(s,i),df(e[s],i)),t)}function cd(e,t,i=32){let s=i-t,r=~((1<<s)-1);return(e<<t|(r&e)>>>s)>>>0}function x0(e,t=0,i=e.byteLength,s=0){for(let r=0;r<i;r++)e[t+r]=s}function D2(e,t,i="0"){for(;e.length<t;)e=i+e;return e}function xl(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(i=>i.toString(16).padStart(2,"0")).join(""):D2((e>>>0).toString(16),t/4)}var R2=class YS{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let i=t.length;if(i===0)return;let s=this._buff,r=this._buffLen,n=this._leftoverHighSurrogate,l,a;for(n!==0?(l=n,a=-1,n=0):(l=t.charCodeAt(0),a=0);;){let o=l;if(y2(l))if(a+1<i){let h=t.charCodeAt(a+1);E0(h)?(a++,o=b2(l,h)):o=65533}else{n=l;break}else E0(l)&&(o=65533);if(r=this._push(s,r,o),a++,a<i)l=t.charCodeAt(a);else break}this._buffLen=r,this._leftoverHighSurrogate=n}_push(t,i,s){return s<128?t[i++]=s:s<2048?(t[i++]=192|(s&1984)>>>6,t[i++]=128|(s&63)>>>0):s<65536?(t[i++]=224|(s&61440)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0):(t[i++]=240|(s&1835008)>>>18,t[i++]=128|(s&258048)>>>12,t[i++]=128|(s&4032)>>>6,t[i++]=128|(s&63)>>>0),i>=64&&(this._step(),i-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),i}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),xl(this._h0)+xl(this._h1)+xl(this._h2)+xl(this._h3)+xl(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,x0(this._buff,this._buffLen),this._buffLen>56&&(this._step(),x0(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=YS._bigBlock32,i=this._buffDV;for(let c=0;c<64;c+=4)t.setUint32(c,i.getUint32(c,!1),!1);for(let c=64;c<320;c+=4)t.setUint32(c,cd(t.getUint32(c-12,!1)^t.getUint32(c-32,!1)^t.getUint32(c-56,!1)^t.getUint32(c-64,!1),1),!1);let s=this._h0,r=this._h1,n=this._h2,l=this._h3,a=this._h4,o,h,u;for(let c=0;c<80;c++)c<20?(o=r&n|~r&l,h=1518500249):c<40?(o=r^n^l,h=1859775393):c<60?(o=r&n|r&l|n&l,h=2400959708):(o=r^n^l,h=3395469782),u=cd(s,5)+o+a+h+t.getUint32(c*4,!1)&4294967295,a=l,l=n,n=cd(r,30),r=s,s=u;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+a&4294967295}};R2._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:Y5,getWindow:Zt,getDocument:W5,getWindows:P5,getWindowsCount:V5,getWindowId:D0,getWindowById:F5,hasWindow:X5,onDidRegisterWindow:M2,onWillUnregisterWindow:G5,onDidUnregisterWindow:j5}=(function(){let e=new Map,t={window:At,disposables:new Ds};e.set(At.vscodeWindowId,t);let i=new E,s=new E,r=new E;function n(l,a){return(typeof l=="number"?e.get(l):void 0)??(a?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:s.event,registerWindow(l){if(e.has(l.vscodeWindowId))return W.None;let a=new Ds,o={window:l,disposables:a.add(new Ds)};return e.set(l.vscodeWindowId,o),a.add(de(()=>{e.delete(l.vscodeWindowId),s.fire(l)})),a.add(q(l,Ke.BEFORE_UNLOAD,()=>{r.fire(l)})),i.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(l){return l.vscodeWindowId},hasWindow(l){return e.has(l)},getWindowById:n,getWindow(l){let a=l;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let o=l;return o?.view?o.view.window:At},getDocument(l){return Zt(l).document}}})(),T2=class{constructor(e,t,i,s){this._node=e,this._type=t,this._handler=i,this._options=s||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function q(e,t,i,s){return new T2(e,t,i,s)}function A2(e,t){return function(i){return t(new kl(e,i))}}function B2(e){return function(t){return e(new Nd(t))}}var R0=function(e,t,i,s){let r=i;return t==="click"||t==="mousedown"||t==="contextmenu"?r=A2(Zt(e),i):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=B2(i)),q(e,t,r,s)},k2,ih,O2=class extends v2{constructor(e){super(),this.defaultTarget=e&&Zt(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},ud=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Po(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,s=new Map,r=n=>{i.set(n,!1);let l=e.get(n)??[];for(t.set(n,l),e.set(n,[]),s.set(n,!0);l.length>0;)l.sort(ud.sort),l.shift().execute();s.set(n,!1)};ih=(n,l,a=0)=>{let o=D0(n),h=new ud(l,a),u=e.get(o);return u||(u=[],e.set(o,u)),u.push(h),i.get(o)||(i.set(o,!0),n.requestAnimationFrame(()=>r(o))),h},k2=(n,l,a)=>{let o=D0(n);if(s.get(o)){let h=new ud(l,a),u=t.get(o);return u||(u=[],t.set(o,u)),u.push(h),h}else return ih(n,l,a)}})();var M0=class Io{constructor(t,i){this.width=t,this.height=i}with(t=this.width,i=this.height){return t!==this.width||i!==this.height?new Io(t,i):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof Io?t:new Io(t.width,t.height)}static equals(t,i){return t===i?!0:!t||!i?!1:t.width===i.width&&t.height===i.height}};M0.None=new M0(0,0);function z2(e){let t=e.getBoundingClientRect(),i=Zt(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var I5=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let s=this.mutationObservers.get(e);s||(s=new Map,this.mutationObservers.set(e,s));let r=C2(i),n=s.get(r);if(n)n.users+=1;else{let l=new E,a=new MutationObserver(h=>l.fire(h));a.observe(e,i);let o=n={users:1,observer:a,onDidMutate:l.event};t.add(de(()=>{o.users-=1,o.users===0&&(l.dispose(),a.disconnect(),s?.delete(r),s?.size===0&&this.mutationObservers.delete(e))})),s.set(r,n)}return n.onDidMutate}},Ke={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:Xo?"webkitAnimationStart":"animationstart",ANIMATION_END:Xo?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Xo?"webkitAnimationIteration":"animationiteration"},L2=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function WS(e,t,i,...s){let r=L2.exec(t);if(!r)throw new Error("Bad use of emmet");let n=r[1]||"div",l;return e!=="http://www.w3.org/1999/xhtml"?l=document.createElementNS(e,n):l=document.createElement(n),r[3]&&(l.id=r[3]),r[4]&&(l.className=r[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach(([a,o])=>{typeof o>"u"||(/^on\w+$/.test(a)?l[a]=o:a==="selected"?o&&l.setAttribute(a,"true"):l.setAttribute(a,o))}),l.append(...s),l}function N2(e,t,...i){return WS("http://www.w3.org/1999/xhtml",e,t,...i)}N2.SVG=function(e,t,...i){return WS("http://www.w3.org/2000/svg",e,t,...i)};var H2=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=gt(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=gt(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=gt(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=gt(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=gt(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=gt(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=gt(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=gt(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=gt(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=gt(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=gt(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=gt(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=gt(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=gt(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function gt(e){return typeof e=="number"?`${e}px`:e}function ql(e){return new H2(e)}var PS=class{constructor(){this._hooks=new Ds,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,s,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=s,this._onStopCallback=r;let n=e;try{e.setPointerCapture(t),this._hooks.add(de(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{n=Zt(e)}this._hooks.add(q(n,Ke.POINTER_MOVE,l=>{if(l.buttons!==i){this.stopMonitoring(!0);return}l.preventDefault(),this._pointerMoveCallback(l)})),this._hooks.add(q(n,Ke.POINTER_UP,l=>this.stopMonitoring(!0)))}};function U2(e,t,i){let s=null,r=null;if(typeof i.value=="function"?(s="value",r=i.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(s="get",r=i.get),!r)throw new Error("not supported");let n=`$memoize$${t}`;i[s]=function(...l){return this.hasOwnProperty(n)||Object.defineProperty(this,n,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,l)}),this[n]}}var oi;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(oi||(oi={}));var Ol=class et extends W{constructor(){super(),this.dispatched=!1,this.targets=new g0,this.ignoreTargets=new g0,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register($e.runAndSubscribe(M2,({window:t,disposables:i})=>{i.add(q(t.document,"touchstart",s=>this.onTouchStart(s),{passive:!1})),i.add(q(t.document,"touchend",s=>this.onTouchEnd(t,s))),i.add(q(t.document,"touchmove",s=>this.onTouchMove(s),{passive:!1}))},{window:At,disposables:this._store}))}static addTarget(t){if(!et.isTouchDevice())return W.None;et.INSTANCE||(et.INSTANCE=_0(new et));let i=et.INSTANCE.targets.push(t);return de(i)}static ignoreTarget(t){if(!et.isTouchDevice())return W.None;et.INSTANCE||(et.INSTANCE=_0(new et));let i=et.INSTANCE.ignoreTargets.push(t);return de(i)}static isTouchDevice(){return"ontouchstart"in At||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let s=0,r=t.targetTouches.length;s<r;s++){let n=t.targetTouches.item(s);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:i,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[i],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let l=this.newGestureEvent(oi.Start,n.target);l.pageX=n.pageX,l.pageY=n.pageY,this.dispatchEvent(l)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let s=Date.now(),r=Object.keys(this.activeTouches).length;for(let n=0,l=i.changedTouches.length;n<l;n++){let a=i.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("move of an UNKNOWN touch",a);continue}let o=this.activeTouches[a.identifier],h=Date.now()-o.initialTimeStamp;if(h<et.HOLD_DELAY&&Math.abs(o.initialPageX-Rt(o.rollingPageX))<30&&Math.abs(o.initialPageY-Rt(o.rollingPageY))<30){let u=this.newGestureEvent(oi.Tap,o.initialTarget);u.pageX=Rt(o.rollingPageX),u.pageY=Rt(o.rollingPageY),this.dispatchEvent(u)}else if(h>=et.HOLD_DELAY&&Math.abs(o.initialPageX-Rt(o.rollingPageX))<30&&Math.abs(o.initialPageY-Rt(o.rollingPageY))<30){let u=this.newGestureEvent(oi.Contextmenu,o.initialTarget);u.pageX=Rt(o.rollingPageX),u.pageY=Rt(o.rollingPageY),this.dispatchEvent(u)}else if(r===1){let u=Rt(o.rollingPageX),c=Rt(o.rollingPageY),d=Rt(o.rollingTimestamps)-o.rollingTimestamps[0],f=u-o.rollingPageX[0],p=c-o.rollingPageY[0],m=[...this.targets].filter(C=>o.initialTarget instanceof Node&&C.contains(o.initialTarget));this.inertia(t,m,s,Math.abs(f)/d,f>0?1:-1,u,Math.abs(p)/d,p>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(oi.End,o.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let s=document.createEvent("CustomEvent");return s.initEvent(t,!1,!0),s.initialTarget=i,s.tapCount=0,s}dispatchEvent(t){if(t.type===oi.Tap){let i=new Date().getTime(),s=0;i-this._lastSetTapCountTime>et.CLEAR_TAP_COUNT_TIME?s=1:s=2,this._lastSetTapCountTime=i,t.tapCount=s}else(t.type===oi.Change||t.type===oi.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let s of this.ignoreTargets)if(s.contains(t.initialTarget))return;let i=[];for(let s of this.targets)if(s.contains(t.initialTarget)){let r=0,n=t.initialTarget;for(;n&&n!==s;)r++,n=n.parentElement;i.push([r,s])}i.sort((s,r)=>s[0]-r[0]);for(let[s,r]of i)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,s,r,n,l,a,o,h){this.handle=ih(t,()=>{let u=Date.now(),c=u-s,d=0,f=0,p=!0;r+=et.SCROLL_FRICTION*c,a+=et.SCROLL_FRICTION*c,r>0&&(p=!1,d=n*r*c),a>0&&(p=!1,f=o*a*c);let m=this.newGestureEvent(oi.Change);m.translationX=d,m.translationY=f,i.forEach(C=>C.dispatchEvent(m)),p||this.inertia(t,i,u,r,n,l+d,a,o,h+f)})}onTouchMove(t){let i=Date.now();for(let s=0,r=t.changedTouches.length;s<r;s++){let n=t.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let l=this.activeTouches[n.identifier],a=this.newGestureEvent(oi.Change,l.initialTarget);a.translationX=n.pageX-Rt(l.rollingPageX),a.translationY=n.pageY-Rt(l.rollingPageY),a.pageX=n.pageX,a.pageY=n.pageY,this.dispatchEvent(a),l.rollingPageX.length>3&&(l.rollingPageX.shift(),l.rollingPageY.shift(),l.rollingTimestamps.shift()),l.rollingPageX.push(n.pageX),l.rollingPageY.push(n.pageY),l.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Ol.SCROLL_FRICTION=-.005,Ol.HOLD_DELAY=700,Ol.CLEAR_TAP_COUNT_TIME=400,be([U2],Ol,"isTouchDevice",1);var q2=Ol,ff=class extends W{onclick(e,t){this._register(q(e,Ke.CLICK,i=>t(new kl(Zt(e),i))))}onmousedown(e,t){this._register(q(e,Ke.MOUSE_DOWN,i=>t(new kl(Zt(e),i))))}onmouseover(e,t){this._register(q(e,Ke.MOUSE_OVER,i=>t(new kl(Zt(e),i))))}onmouseleave(e,t){this._register(q(e,Ke.MOUSE_LEAVE,i=>t(new kl(Zt(e),i))))}onkeydown(e,t){this._register(q(e,Ke.KEY_DOWN,i=>t(new Nd(i))))}onkeyup(e,t){this._register(q(e,Ke.KEY_UP,i=>t(new Nd(i))))}oninput(e,t){this._register(q(e,Ke.INPUT,t))}onblur(e,t){this._register(q(e,Ke.BLUR,t))}onfocus(e,t){this._register(q(e,Ke.FOCUS,t))}onchange(e,t){this._register(q(e,Ke.CHANGE,t))}ignoreGesture(e){return q2.ignoreTarget(e)}},T0=11,K2=class extends ff{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=T0+"px",this.domNode.style.height=T0+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new PS),this._register(R0(this.bgDomNode,Ke.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(R0(this.domNode,Ke.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new O2),this._pointerdownScheduleRepeatTimer=this._register(new uf)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Zt(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},Y2=class Hd{constructor(t,i,s,r,n,l,a){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,s=s|0,r=r|0,n=n|0,l=l|0,a=a|0),this.rawScrollLeft=r,this.rawScrollTop=a,i<0&&(i=0),r+i>s&&(r=s-i),r<0&&(r=0),n<0&&(n=0),a+n>l&&(a=l-n),a<0&&(a=0),this.width=i,this.scrollWidth=s,this.scrollLeft=r,this.height=n,this.scrollHeight=l,this.scrollTop=a}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new Hd(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Hd(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let s=this.width!==t.width,r=this.scrollWidth!==t.scrollWidth,n=this.scrollLeft!==t.scrollLeft,l=this.height!==t.height,a=this.scrollHeight!==t.scrollHeight,o=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:s,scrollWidthChanged:r,scrollLeftChanged:n,heightChanged:l,scrollHeightChanged:a,scrollTopChanged:o}}},W2=class extends W{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new E),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Y2(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let s;t?s=new B0(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):s=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=s}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=B0.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},A0=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function dd(e,t){let i=t-e;return function(s){return e+i*F2(s)}}function P2(e,t,i){return function(s){return s<i?e(s/i):t((s-i)/(1-i))}}var B0=class Ud{constructor(t,i,s,r){this.from=t,this.to=i,this.duration=r,this.startTime=s,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,s){if(Math.abs(t-i)>2.5*s){let r,n;return t<i?(r=t+.75*s,n=i-.75*s):(r=t-.75*s,n=i+.75*s),P2(dd(t,r),dd(n,i),.33)}return dd(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let s=this.scrollLeft(i),r=this.scrollTop(i);return new A0(s,r,!1)}return new A0(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,s){return Ud.start(t,i,s)}static start(t,i,s){s=s+10;let r=Date.now()-10;return new Ud(t,i,r,s)}};function V2(e){return Math.pow(e,3)}function F2(e){return 1-V2(1-e)}var X2=class extends W{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new uf)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},G2=140,VS=class extends ff{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new X2(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new PS),this._shouldRender=!0,this.domNode=ql(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(q(this.domNode.domNode,Ke.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new K2(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,s){this.slider=ql(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof s=="number"&&this.slider.setHeight(s),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(q(this.slider.domNode,Ke.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),s=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);i<=r&&r<=s?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let r=z2(this.domNode.domNode);t=e.pageX-r.left,i=e.pageY-r.top}let s=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let n=this._sliderOrthogonalPointerPosition(r),l=Math.abs(n-i);if(NS&&l>G2){this._setDesiredScrollPositionNow(s.getScrollPosition());return}let a=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},FS=class qd{constructor(t,i,s,r,n,l){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(s),this._arrowSize=Math.round(t),this._visibleSize=r,this._scrollSize=n,this._scrollPosition=l,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new qd(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,s,r,n){let l=Math.max(0,s-t),a=Math.max(0,l-2*i),o=r>0&&r>s;if(!o)return{computedAvailableSize:Math.round(l),computedIsNeeded:o,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let h=Math.round(Math.max(20,Math.floor(s*a/r))),u=(a-h)/(r-s),c=n*u;return{computedAvailableSize:Math.round(l),computedIsNeeded:o,computedSliderSize:Math.round(h),computedSliderRatio:u,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){let t=qd._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,s=this._scrollPosition;return i<this._computedSliderPosition?s-=this._visibleSize:s+=this._visibleSize,s}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},j2=class extends VS{constructor(e,t,i){let s=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new FS(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,s.width,s.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},I2=class extends VS{constructor(e,t,i){let s=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new FS(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,s.height,s.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},Z2=500,k0=50,O0=!0,Q2=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},Kd=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,s=1,r=this._rear;do{let n=r===this._front?t:Math.pow(2,-s);if(t-=n,i+=this._memory[r].score*n,r===this._front)break;r=(this._capacity+r-1)%this._capacity,s++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(hf){let i=Zt(t.browserEvent),s=Vw(i);this.accept(Date.now(),t.deltaX*s,t.deltaY*s)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,s){let r=null,n=new Q2(t,i,s);this._front===-1&&this._rear===-1?(this._memory[0]=n,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n),n.score=this._computeScore(n,r)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let s=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(s+=.25),i){let r=Math.abs(t.deltaX),n=Math.abs(t.deltaY),l=Math.abs(i.deltaX),a=Math.abs(i.deltaY),o=Math.max(Math.min(r,l),1),h=Math.max(Math.min(n,a),1),u=Math.max(r,l),c=Math.max(n,a);u%o===0&&c%h===0&&(s-=.5)}return Math.min(Math.max(s,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};Kd.INSTANCE=new Kd;var $2=Kd,J2=class extends ff{constructor(e,t,i){super(),this._onScroll=this._register(new E),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new E),this.onWillScroll=this._onWillScroll.event,this._options=tE(t),this._scrollable=i,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let s={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new I2(this._scrollable,this._options,s)),this._horizontalScrollbar=this._register(new j2(this._scrollable,this._options,s)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=ql(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=ql(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=ql(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new uf),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=rr(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,hi&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new C0(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=rr(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new C0(i))};this._mouseWheelToDispose.push(q(this._listenOnDomNode,Ke.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=$2.INSTANCE;O0&&t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,n=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&n+r===0?n=r=0:Math.abs(r)>=Math.abs(n)?n=0:r=0),this._options.flipAxes&&([r,n]=[n,r]);let l=!hi&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!n&&(n=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(n=n*this._options.fastScrollSensitivity,r=r*this._options.fastScrollSensitivity);let a=this._scrollable.getFutureScrollPosition(),o={};if(r){let h=k0*r,u=a.scrollTop-(h<0?Math.floor(h):Math.ceil(h));this._verticalScrollbar.writeScrollPosition(o,u)}if(n){let h=k0*n,u=a.scrollLeft-(h<0?Math.floor(h):Math.ceil(h));this._horizontalScrollbar.writeScrollPosition(o,u)}o=this._scrollable.validateScrollPosition(o),(a.scrollLeft!==o.scrollLeft||a.scrollTop!==o.scrollTop)&&(O0&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(o):this._scrollable.setScrollPositionNow(o),i=!0)}let s=i;!s&&this._options.alwaysConsumeMouseWheel&&(s=!0),!s&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(s=!0),s&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,s=i?" left":"",r=t?" top":"",n=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${s}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${n}${r}${s}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Z2)}},eE=class extends J2{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function tE(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,hi&&(t.className+=" mac"),t}var Yd=class extends W{constructor(e,t,i,s,r,n,l,a){super(),this._bufferService=i,this._optionsService=l,this._renderService=a,this._onRequestScrollLines=this._register(new E),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let o=this._register(new W2({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:h=>ih(s.window,h)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{o.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new eE(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},o)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(r.onProtocolChange(h=>{this._scrollableElement.updateOptions({handleMouseWheel:!(h&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register($e.runAndSubscribe(n.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=n.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(de(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=s.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(de(()=>this._styleElement.remove())),this._register($e.runAndSubscribe(n.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${n.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${n.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${n.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
38
- `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(h=>this._handleScroll(h)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),i=t-this._bufferService.buffer.ydisp;i!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(i)),this._isHandlingScroll=!1}};Yd=be([B(2,lt),B(3,qi),B(4,pS),B(5,un),B(6,at),B(7,Ki)],Yd);var Wd=class extends W{constructor(e,t,i,s,r){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=s,this._renderService=r,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(n=>this._removeDecoration(n))),this._register(de(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose(()=>{this._decorationElements.delete(e),i.remove()})),i.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;let i=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=i?`${i*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=i?`${i*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};Wd=be([B(1,lt),B(2,qi),B(3,Fl),B(4,Ki)],Wd);var iE=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(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},li={full:0,left:0,center:0,right:0},Cs={full:0,left:0,center:0,right:0},Dl={full:0,left:0,center:0,right:0},sh=class extends W{constructor(e,t,i,s,r,n,l,a){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=s,this._renderService=r,this._optionsService=n,this._themeService=l,this._coreBrowserService=a,this._colorZoneStore=new iE,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),this._register(de(()=>this._canvas?.remove()));let o=this._canvas.getContext("2d");if(o)this._ctx=o;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),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())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Cs.full=this._canvas.width,Cs.left=e,Cs.center=t,Cs.right=e,this._refreshDrawHeightConstants(),Dl.full=1,Dl.left=1,Dl.center=1+Cs.left,Dl.right=1+Cs.left+Cs.center}_refreshDrawHeightConstants(){li.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);li.left=t,li.center=t,li.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*li.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*li.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*li.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*li.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(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Dl[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-li[e.position||"full"]/2),Cs[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+li[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};sh=be([B(2,lt),B(3,Fl),B(4,Ki),B(5,at),B(6,un),B(7,qi)],sh);var b;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
39
- `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL="\x7F"))(b||(b={}));var Zo;(e=>(e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8A",e.PLD="\x8B",e.PLU="\x8C",e.RI="\x8D",e.SS2="\x8E",e.SS3="\x8F",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9A",e.CSI="\x9B",e.ST="\x9C",e.OSC="\x9D",e.PM="\x9E",e.APC="\x9F"))(Zo||(Zo={}));var XS;(e=>e.ST=`${b.ESC}\\`)(XS||(XS={}));var Pd=class{constructor(e,t,i,s,r,n){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=s,this._coreService=r,this._renderService=n,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${b.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let n=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(n.width,1)+"px",this._textarea.style.height=Math.max(n.height,1)+"px",this._textarea.style.lineHeight=n.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Pd=be([B(2,lt),B(3,at),B(4,lr),B(5,Ki)],Pd);var Ye=0,We=0,Pe=0,ye=0,z0={css:"#00000000",rgba:0},Ae;(e=>{function t(r,n,l,a){return a!==void 0?`#${Js(r)}${Js(n)}${Js(l)}${Js(a)}`:`#${Js(r)}${Js(n)}${Js(l)}`}e.toCss=t;function i(r,n,l,a=255){return(r<<24|n<<16|l<<8|a)>>>0}e.toRgba=i;function s(r,n,l,a){return{css:e.toCss(r,n,l,a),rgba:e.toRgba(r,n,l,a)}}e.toColor=s})(Ae||(Ae={}));var ue;(e=>{function t(o,h){if(ye=(h.rgba&255)/255,ye===1)return{css:h.css,rgba:h.rgba};let u=h.rgba>>24&255,c=h.rgba>>16&255,d=h.rgba>>8&255,f=o.rgba>>24&255,p=o.rgba>>16&255,m=o.rgba>>8&255;Ye=f+Math.round((u-f)*ye),We=p+Math.round((c-p)*ye),Pe=m+Math.round((d-m)*ye);let C=Ae.toCss(Ye,We,Pe),_=Ae.toRgba(Ye,We,Pe);return{css:C,rgba:_}}e.blend=t;function i(o){return(o.rgba&255)===255}e.isOpaque=i;function s(o,h,u){let c=Qo.ensureContrastRatio(o.rgba,h.rgba,u);if(c)return Ae.toColor(c>>24&255,c>>16&255,c>>8&255)}e.ensureContrastRatio=s;function r(o){let h=(o.rgba|255)>>>0;return[Ye,We,Pe]=Qo.toChannels(h),{css:Ae.toCss(Ye,We,Pe),rgba:h}}e.opaque=r;function n(o,h){return ye=Math.round(h*255),[Ye,We,Pe]=Qo.toChannels(o.rgba),{css:Ae.toCss(Ye,We,Pe,ye),rgba:Ae.toRgba(Ye,We,Pe,ye)}}e.opacity=n;function l(o,h){return ye=o.rgba&255,n(o,ye*h/255)}e.multiplyOpacity=l;function a(o){return[o.rgba>>24&255,o.rgba>>16&255,o.rgba>>8&255]}e.toColorRGB=a})(ue||(ue={}));var ve;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let n=r.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function s(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return Ye=parseInt(r.slice(1,2).repeat(2),16),We=parseInt(r.slice(2,3).repeat(2),16),Pe=parseInt(r.slice(3,4).repeat(2),16),Ae.toColor(Ye,We,Pe);case 5:return Ye=parseInt(r.slice(1,2).repeat(2),16),We=parseInt(r.slice(2,3).repeat(2),16),Pe=parseInt(r.slice(3,4).repeat(2),16),ye=parseInt(r.slice(4,5).repeat(2),16),Ae.toColor(Ye,We,Pe,ye);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let n=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(n)return Ye=parseInt(n[1]),We=parseInt(n[2]),Pe=parseInt(n[3]),ye=Math.round((n[5]===void 0?1:parseFloat(n[5]))*255),Ae.toColor(Ye,We,Pe,ye);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Ye,We,Pe,ye]=t.getImageData(0,0,1,1).data,ye!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Ae.toRgba(Ye,We,Pe,ye),css:r}}e.toColor=s})(ve||(ve={}));var nt;(e=>{function t(s){return i(s>>16&255,s>>8&255,s&255)}e.relativeLuminance=t;function i(s,r,n){let l=s/255,a=r/255,o=n/255,h=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4),u=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),c=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return h*.2126+u*.7152+c*.0722}e.relativeLuminance2=i})(nt||(nt={}));var Qo;(e=>{function t(l,a){if(ye=(a&255)/255,ye===1)return a;let o=a>>24&255,h=a>>16&255,u=a>>8&255,c=l>>24&255,d=l>>16&255,f=l>>8&255;return Ye=c+Math.round((o-c)*ye),We=d+Math.round((h-d)*ye),Pe=f+Math.round((u-f)*ye),Ae.toRgba(Ye,We,Pe)}e.blend=t;function i(l,a,o){let h=nt.relativeLuminance(l>>8),u=nt.relativeLuminance(a>>8);if(Li(h,u)<o){if(u<h){let f=s(l,a,o),p=Li(h,nt.relativeLuminance(f>>8));if(p<o){let m=r(l,a,o),C=Li(h,nt.relativeLuminance(m>>8));return p>C?f:m}return f}let c=r(l,a,o),d=Li(h,nt.relativeLuminance(c>>8));if(d<o){let f=s(l,a,o),p=Li(h,nt.relativeLuminance(f>>8));return d>p?c:f}return c}}e.ensureContrastRatio=i;function s(l,a,o){let h=l>>24&255,u=l>>16&255,c=l>>8&255,d=a>>24&255,f=a>>16&255,p=a>>8&255,m=Li(nt.relativeLuminance2(d,f,p),nt.relativeLuminance2(h,u,c));for(;m<o&&(d>0||f>0||p>0);)d-=Math.max(0,Math.ceil(d*.1)),f-=Math.max(0,Math.ceil(f*.1)),p-=Math.max(0,Math.ceil(p*.1)),m=Li(nt.relativeLuminance2(d,f,p),nt.relativeLuminance2(h,u,c));return(d<<24|f<<16|p<<8|255)>>>0}e.reduceLuminance=s;function r(l,a,o){let h=l>>24&255,u=l>>16&255,c=l>>8&255,d=a>>24&255,f=a>>16&255,p=a>>8&255,m=Li(nt.relativeLuminance2(d,f,p),nt.relativeLuminance2(h,u,c));for(;m<o&&(d<255||f<255||p<255);)d=Math.min(255,d+Math.ceil((255-d)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),m=Li(nt.relativeLuminance2(d,f,p),nt.relativeLuminance2(h,u,c));return(d<<24|f<<16|p<<8|255)>>>0}e.increaseLuminance=r;function n(l){return[l>>24&255,l>>16&255,l>>8&255,l&255]}e.toChannels=n})(Qo||(Qo={}));function Js(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Li(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var sE=class extends Vl{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},rh=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Ft}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],s=t.translateToString(!0),r=0,n=0,l=0,a=t.getFg(0),o=t.getBg(0);for(let h=0;h<t.getTrimmedLength();h++)if(t.loadCell(h,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==a||this._workCell.bg!==o){if(h-r>1){let u=this._getJoinedRanges(s,l,n,t,r);for(let c=0;c<u.length;c++)i.push(u[c])}r=h,l=n,a=this._workCell.fg,o=this._workCell.bg}n+=this._workCell.getChars().length||xs.length}if(this._bufferService.cols-r>1){let h=this._getJoinedRanges(s,l,n,t,r);for(let u=0;u<h.length;u++)i.push(h[u])}return i}_getJoinedRanges(e,t,i,s,r){let n=e.substring(t,i),l=[];try{l=this._characterJoiners[0].handler(n)}catch(a){console.error(a)}for(let a=1;a<this._characterJoiners.length;a++)try{let o=this._characterJoiners[a].handler(n);for(let h=0;h<o.length;h++)rh._mergeRanges(l,o[h])}catch(o){console.error(o)}return this._stringRangesToCellRanges(l,s,r),l}_stringRangesToCellRanges(e,t,i){let s=0,r=!1,n=0,l=e[s];if(l){for(let a=i;a<this._bufferService.cols;a++){let o=t.getWidth(a),h=t.getString(a).length||xs.length;if(o!==0){if(!r&&l[0]<=n&&(l[0]=a,r=!0),l[1]<=n){if(l[1]=a,l=e[++s],!l)break;l[0]<=n?(l[0]=a,r=!0):r=!1}n+=h}}l&&(l[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let s=0;s<e.length;s++){let r=e[s];if(i){if(t[1]<=r[0])return e[s-1][1]=t[1],e;if(t[1]<=r[1])return e[s-1][1]=Math.max(t[1],r[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=r[0])return e.splice(s,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};rh=be([B(0,lt)],rh);function rE(e){return 57508<=e&&e<=57558}function nE(e){return 9472<=e&&e<=9631}function lE(e){return rE(e)||nE(e)}function aE(){return{css:{canvas:qo(),cell:qo()},device:{canvas:qo(),cell:qo(),char:{width:0,height:0,left:0,top:0}}}}function qo(){return{width:0,height:0}}var Vd=class{constructor(e,t,i,s,r,n,l){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._themeService=l,this._workCell=new Ft,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,s,r,n,l,a,o,h,u){let c=[],d=this._characterJoinerService.getJoinedCharacters(t),f=this._themeService.colors,p=e.getNoBgTrimmedLength();i&&p<n+1&&(p=n+1);let m,C=0,_="",g=0,v=0,S=0,w=0,O=!1,D=0,N=!1,U=0,V=0,Z=[],gn=h!==-1&&u!==-1;for(let M=0;M<p;M++){e.loadCell(M,this._workCell);let x=this._workCell.getWidth();if(x===0)continue;let k=!1,T=M>=V,L=M,R=this._workCell;if(d.length>0&&M===d[0][0]&&T){let J=d.shift(),_h=this._isCellInSelection(J[0],t);for(g=J[0]+1;g<J[1];g++)T&&(T=_h===this._isCellInSelection(g,t));T&&(T=!i||n<J[0]||n>=J[1]),T?(k=!0,R=new sE(this._workCell,e.translateToString(!0,J[0],J[1]),J[1]-J[0]),L=J[1]-1,x=R.getWidth()):V=J[1]}let G=this._isCellInSelection(M,t),ge=i&&M===n,Fe=gn&&M>=h&&M<=u,Qt=!1;this._decorationService.forEachDecorationAtCell(M,t,void 0,J=>{Qt=!0});let ui=R.getChars()||xs;if(ui===" "&&(R.isUnderline()||R.isOverline())&&(ui="\xA0"),U=x*a-o.get(ui,R.isBold(),R.isItalic()),!m)m=this._document.createElement("span");else if(C&&(G&&N||!G&&!N&&R.bg===v)&&(G&&N&&f.selectionForeground||R.fg===S)&&R.extended.ext===w&&Fe===O&&U===D&&!ge&&!k&&!Qt&&T){R.isInvisible()?_+=xs:_+=ui,C++;continue}else C&&(m.textContent=_),m=this._document.createElement("span"),C=0,_="";if(v=R.bg,S=R.fg,w=R.extended.ext,O=Fe,D=U,N=G,k&&n>=M&&n<=L&&(n=M),!this._coreService.isCursorHidden&&ge&&this._coreService.isCursorInitialized){if(Z.push("xterm-cursor"),this._coreBrowserService.isFocused)l&&Z.push("xterm-cursor-blink"),Z.push(s==="bar"?"xterm-cursor-bar":s==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(r)switch(r){case"outline":Z.push("xterm-cursor-outline");break;case"block":Z.push("xterm-cursor-block");break;case"bar":Z.push("xterm-cursor-bar");break;case"underline":Z.push("xterm-cursor-underline");break;default:break}}if(R.isBold()&&Z.push("xterm-bold"),R.isItalic()&&Z.push("xterm-italic"),R.isDim()&&Z.push("xterm-dim"),R.isInvisible()?_=xs:_=R.getChars()||xs,R.isUnderline()&&(Z.push(`xterm-underline-${R.extended.underlineStyle}`),_===" "&&(_="\xA0"),!R.isUnderlineColorDefault()))if(R.isUnderlineColorRGB())m.style.textDecorationColor=`rgb(${Vl.toColorRGB(R.getUnderlineColor()).join(",")})`;else{let J=R.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&R.isBold()&&J<8&&(J+=8),m.style.textDecorationColor=f.ansi[J].css}R.isOverline()&&(Z.push("xterm-overline"),_===" "&&(_="\xA0")),R.isStrikethrough()&&Z.push("xterm-strikethrough"),Fe&&(m.style.textDecoration="underline");let Ne=R.getFgColor(),Yi=R.getFgColorMode(),tt=R.getBgColor(),Rs=R.getBgColorMode(),pn=!!R.isInverse();if(pn){let J=Ne;Ne=tt,tt=J;let _h=Yi;Yi=Rs,Rs=_h}let Wi,Il,vn=!1;this._decorationService.forEachDecorationAtCell(M,t,void 0,J=>{J.options.layer!=="top"&&vn||(J.backgroundColorRGB&&(Rs=50331648,tt=J.backgroundColorRGB.rgba>>8&16777215,Wi=J.backgroundColorRGB),J.foregroundColorRGB&&(Yi=50331648,Ne=J.foregroundColorRGB.rgba>>8&16777215,Il=J.foregroundColorRGB),vn=J.options.layer==="top")}),!vn&&G&&(Wi=this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque,tt=Wi.rgba>>8&16777215,Rs=50331648,vn=!0,f.selectionForeground&&(Yi=50331648,Ne=f.selectionForeground.rgba>>8&16777215,Il=f.selectionForeground)),vn&&Z.push("xterm-decoration-top");let Pi;switch(Rs){case 16777216:case 33554432:Pi=f.ansi[tt],Z.push(`xterm-bg-${tt}`);break;case 50331648:Pi=Ae.toColor(tt>>16,tt>>8&255,tt&255),this._addStyle(m,`background-color:#${L0((tt>>>0).toString(16),"0",6)}`);break;default:pn?(Pi=f.foreground,Z.push("xterm-bg-257")):Pi=f.background}switch(Wi||R.isDim()&&(Wi=ue.multiplyOpacity(Pi,.5)),Yi){case 16777216:case 33554432:R.isBold()&&Ne<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ne+=8),this._applyMinimumContrast(m,Pi,f.ansi[Ne],R,Wi,void 0)||Z.push(`xterm-fg-${Ne}`);break;case 50331648:let J=Ae.toColor(Ne>>16&255,Ne>>8&255,Ne&255);this._applyMinimumContrast(m,Pi,J,R,Wi,Il)||this._addStyle(m,`color:#${L0(Ne.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(m,Pi,f.foreground,R,Wi,Il)||pn&&Z.push("xterm-fg-257")}Z.length&&(m.className=Z.join(" "),Z.length=0),!ge&&!k&&!Qt&&T?C++:m.textContent=_,U!==this.defaultSpacing&&(m.style.letterSpacing=`${U}px`),c.push(m),M=L}return m&&C&&(m.textContent=_),c}_applyMinimumContrast(e,t,i,s,r,n){if(this._optionsService.rawOptions.minimumContrastRatio===1||lE(s.getCode()))return!1;let l=this._getContrastCache(s),a;if(!r&&!n&&(a=l.getColor(t.rgba,i.rgba)),a===void 0){let o=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);a=ue.ensureContrastRatio(r||t,n||i,o),l.setColor((r||t).rgba,(n||i).rgba,a??null)}return a?(this._addStyle(e,`color:${a.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,s=this._selectionEnd;return!i||!s?!1:this._columnSelectMode?i[0]<=s[0]?e>=i[0]&&t>=i[1]&&e<s[0]&&t<=s[1]:e<i[0]&&t>=i[1]&&e>=s[0]&&t<=s[1]:t>i[1]&&t<s[1]||i[1]===s[1]&&t===i[1]&&e>=i[0]&&e<s[0]||i[1]<s[1]&&t===s[1]&&e<s[0]||i[1]<s[1]&&t===i[1]&&e>=i[0]}};Vd=be([B(1,SS),B(2,at),B(3,qi),B(4,lr),B(5,Fl),B(6,un)],Vd);function L0(e,t,i){for(;e.length<i;)e=t+e;return e}var oE=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.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";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold";let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontStyle="italic";let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold",n.style.fontStyle="italic",this._measureElements=[i,s,r,n],this._container.appendChild(i),this._container.appendChild(s),this._container.appendChild(r),this._container.appendChild(n),t.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(e,t,i,s){e===this._font&&t===this._fontSize&&i===this._weight&&s===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=s,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${s}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${s}`,this.clear())}get(e,t,i){let s=0;if(!t&&!i&&e.length===1&&(s=e.charCodeAt(0))<256){if(this._flat[s]!==-9999)return this._flat[s];let l=this._measure(e,0);return l>0&&(this._flat[s]=l),l}let r=e;t&&(r+="B"),i&&(r+="I");let n=this._holey.get(r);if(n===void 0){let l=0;t&&(l|=1),i&&(l|=2),n=this._measure(e,l),n>0&&this._holey.set(r,n)}return n}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},hE=class{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(e,t,i,s=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let r=e.buffers.active.ydisp,n=t[1]-r,l=i[1]-r,a=Math.max(n,0),o=Math.min(l,e.rows-1);if(a>=e.rows||o<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=n,this.viewportEndRow=l,this.viewportCappedStartRow=a,this.viewportCappedEndRow=o,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function cE(){return new hE}var fd="xterm-dom-renderer-owner-",Wt="xterm-rows",Ko="xterm-fg-",N0="xterm-bg-",Rl="xterm-focus",Yo="xterm-selection",uE=1,Fd=class extends W{constructor(e,t,i,s,r,n,l,a,o,h,u,c,d,f){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=s,this._viewportElement=r,this._helperContainer=n,this._linkifier2=l,this._charSizeService=o,this._optionsService=h,this._bufferService=u,this._coreService=c,this._coreBrowserService=d,this._themeService=f,this._terminalClass=uE++,this._rowElements=[],this._selectionRenderModel=cE(),this.onRequestRedraw=this._register(new E).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Wt),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(Yo),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=aE(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(p=>this._injectCss(p))),this._injectCss(this._themeService.colors),this._rowFactory=a.createInstance(Vd,document),this._element.classList.add(fd+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(p=>this._handleLinkHover(p))),this._register(this._linkifier2.onHideLinkUnderline(p=>this._handleLinkLeave(p))),this._register(de(()=>{this._element.classList.remove(fd+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new oE(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(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),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/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),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(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Wt} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,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(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Wt} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Wt} .xterm-dim { color: ${ue.multiplyOpacity(e.foreground,.5).css};}`,t+=`${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;}`;let i=`blink_underline_${this._terminalClass}`,s=`blink_bar_${this._terminalClass}`,r=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Wt}.${Rl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${Wt}.${Rl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${Wt}.${Rl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Wt} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Wt} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Wt} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Wt} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Wt} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Yo} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Yo} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Yo} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,l]of e.ansi.entries())t+=`${this._terminalSelector} .${Ko}${n} { color: ${l.css}; }${this._terminalSelector} .${Ko}${n}.xterm-dim { color: ${ue.multiplyOpacity(l,.5).css}; }${this._terminalSelector} .${N0}${n} { background-color: ${l.css}; }`;t+=`${this._terminalSelector} .${Ko}257 { color: ${ue.opaque(e.background).css}; }${this._terminalSelector} .${Ko}257.xterm-dim { color: ${ue.multiplyOpacity(ue.opaque(e.background),.5).css}; }${this._terminalSelector} .${N0}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let s=this._document.createElement("div");this._rowContainer.appendChild(s),this._rowElements.push(s)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),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(Rl),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Rl),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let s=this._selectionRenderModel.viewportStartRow,r=this._selectionRenderModel.viewportEndRow,n=this._selectionRenderModel.viewportCappedStartRow,l=this._selectionRenderModel.viewportCappedEndRow,a=this._document.createDocumentFragment();if(i){let o=e[0]>t[0];a.appendChild(this._createSelectionElement(n,o?t[0]:e[0],o?e[0]:t[0],l-n+1))}else{let o=s===n?e[0]:0,h=n===r?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(n,o,h));let u=l-n-1;if(a.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,u)),n!==l){let c=r===l?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(l,0,c))}}this._selectionContainer.appendChild(a)}_createSelectionElement(e,t,i,s=1){let r=this._document.createElement("div"),n=t*this.dimensions.css.cell.width,l=this.dimensions.css.cell.width*(i-t);return n+l>this.dimensions.css.canvas.width&&(l=this.dimensions.css.canvas.width-n),r.style.height=`${s*this.dimensions.css.cell.height}px`,r.style.top=`${e*this.dimensions.css.cell.height}px`,r.style.left=`${n}px`,r.style.width=`${l}px`,r}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(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,s=i.ybase+i.y,r=Math.min(i.x,this._bufferService.cols-1),n=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,l=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,a=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=e;o<=t;o++){let h=o+i.ydisp,u=this._rowElements[o],c=i.lines.get(h);if(!u||!c)break;u.replaceChildren(...this._rowFactory.createRow(c,h,h===s,l,a,r,n,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${fd}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,s,r,n){i<0&&(e=0),s<0&&(t=0);let l=this._bufferService.rows-1;i=Math.max(Math.min(i,l),0),s=Math.max(Math.min(s,l),0),r=Math.min(r,this._bufferService.cols);let a=this._bufferService.buffer,o=a.ybase+a.y,h=Math.min(a.x,r-1),u=this._optionsService.rawOptions.cursorBlink,c=this._optionsService.rawOptions.cursorStyle,d=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=i;f<=s;++f){let p=f+a.ydisp,m=this._rowElements[f],C=a.lines.get(p);if(!m||!C)break;m.replaceChildren(...this._rowFactory.createRow(C,p,p===o,c,d,h,u,this.dimensions.css.cell.width,this._widthCache,n?f===i?e:0:-1,n?(f===s?t:r)-1:-1))}}};Fd=be([B(7,lf),B(8,hh),B(9,at),B(10,lt),B(11,lr),B(12,qi),B(13,un)],Fd);var Xd=class extends W{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new E),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new fE(this._optionsService))}catch{this._measureStrategy=this._register(new dE(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Xd=be([B(2,at)],Xd);var GS=class extends W{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},dE=class extends GS{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,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}},fE=class extends GS{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},_E=class extends W{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new gE(this._window)),this._onDprChange=this._register(new E),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new E),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this._register($e.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(q(this._textarea,"focus",()=>this._isFocused=!0)),this._register(q(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,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}},gE=class extends W{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new cn),this._onDprChange=this._register(new E),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(de(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=q(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)}},pE=class extends W{constructor(){super(),this.linkProviders=[],this._register(de(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function _f(e,t,i){let s=i.getBoundingClientRect(),r=e.getComputedStyle(i),n=parseInt(r.getPropertyValue("padding-left")),l=parseInt(r.getPropertyValue("padding-top"));return[t.clientX-s.left-n,t.clientY-s.top-l]}function vE(e,t,i,s,r,n,l,a,o){if(!n)return;let h=_f(e,t,i);if(h)return h[0]=Math.ceil((h[0]+(o?l/2:0))/l),h[1]=Math.ceil(h[1]/a),h[0]=Math.min(Math.max(h[0],1),s+(o?1:0)),h[1]=Math.min(Math.max(h[1],1),r),h}var Gd=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,s,r){return vE(window,e,t,i,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,r)}getMouseReportCoords(e,t){let i=_f(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};Gd=be([B(0,Ki),B(1,hh)],Gd);var mE=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!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){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},jS={};tw(jS,{getSafariVersion:()=>yE,isChromeOS:()=>$S,isFirefox:()=>IS,isIpad:()=>bE,isIphone:()=>CE,isLegacyEdge:()=>SE,isLinux:()=>gf,isMac:()=>nh,isNode:()=>dh,isSafari:()=>ZS,isWindows:()=>QS});var dh=typeof process<"u"&&"title"in process,Xl=dh?"node":navigator.userAgent,Gl=dh?"node":navigator.platform,IS=Xl.includes("Firefox"),SE=Xl.includes("Edge"),ZS=/^((?!chrome|android).)*safari/i.test(Xl);function yE(){if(!ZS)return 0;let e=Xl.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var nh=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Gl),bE=Gl==="iPad",CE=Gl==="iPhone",QS=["Windows","Win16","Win32","WinCE"].includes(Gl),gf=Gl.indexOf("Linux")>=0,$S=/\bCrOS\b/.test(Xl),JS=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),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(e){this._idleCallback=void 0;let t=0,i=0,s=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=r}this.clear()}},wE=class extends JS{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},EE=class extends JS{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},lh=!dh&&"requestIdleCallback"in window?EE:wE,xE=class{constructor(){this._queue=new lh}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},jd=class extends W{constructor(e,t,i,s,r,n,l,a,o){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=s,this._coreService=r,this._coreBrowserService=a,this._renderer=this._register(new cn),this._pausedResizeTask=new xE,this._observerDisposable=this._register(new cn),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 E),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new E),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new E),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new E),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new mE((h,u)=>this._renderRows(h,u),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new DE(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(de(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(l.onResize(()=>this._fullRefresh())),this._register(l.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(n.onDecorationRegistered(()=>this._fullRefresh())),this._register(n.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(l.cols,l.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(l.buffer.y,l.buffer.y,!0))),this._register(o.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(h=>this._registerIntersectionObserver(h,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(s=>this._handleIntersectionChange(s[s.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=de(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.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(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let s=this._syncOutputHandler.flush();s&&(e=Math.min(e,s.start),t=Math.max(t,s.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,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(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_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(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,i){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,this._renderer.value?.handleSelectionChanged(e,t,i)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};jd=be([B(2,at),B(3,hh),B(4,lr),B(5,Fl),B(6,lt),B(7,qi),B(8,un)],jd);var DE=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function RE(e,t,i,s){let r=i.buffer.x,n=i.buffer.y;if(!i.buffer.hasScrollback)return AE(r,n,e,t,i,s)+fh(n,t,i,s)+BE(r,n,e,t,i,s);let l;if(n===t)return l=r>e?"D":"C",Wl(Math.abs(r-e),Yl(l,s));l=n>t?"D":"C";let a=Math.abs(n-t),o=TE(n>t?e:r,i)+(a-1)*i.cols+1+ME(n>t?r:e,i);return Wl(o,Yl(l,s))}function ME(e,t){return e-1}function TE(e,t){return t.cols-e}function AE(e,t,i,s,r,n){return fh(t,s,r,n).length===0?"":Wl(t1(e,t,e,t-nr(t,r),!1,r).length,Yl("D",n))}function fh(e,t,i,s){let r=e-nr(e,i),n=t-nr(t,i),l=Math.abs(r-n)-kE(e,t,i);return Wl(l,Yl(e1(e,t),s))}function BE(e,t,i,s,r,n){let l;fh(t,s,r,n).length>0?l=s-nr(s,r):l=t;let a=s,o=OE(e,t,i,s,r,n);return Wl(t1(e,l,i,a,o==="C",r).length,Yl(o,n))}function kE(e,t,i){let s=0,r=e-nr(e,i),n=t-nr(t,i);for(let l=0;l<Math.abs(r-n);l++){let a=e1(e,t)==="A"?-1:1;i.buffer.lines.get(r+a*l)?.isWrapped&&s++}return s}function nr(e,t){let i=0,s=t.buffer.lines.get(e),r=s?.isWrapped;for(;r&&e>=0&&e<t.rows;)i++,s=t.buffer.lines.get(--e),r=s?.isWrapped;return i}function OE(e,t,i,s,r,n){let l;return fh(i,s,r,n).length>0?l=s-nr(s,r):l=t,e<i&&l<=s||e>=i&&l<s?"C":"D"}function e1(e,t){return e>t?"A":"B"}function t1(e,t,i,s,r,n){let l=e,a=t,o="";for(;(l!==i||a!==s)&&a>=0&&a<n.buffer.lines.length;)l+=r?1:-1,r&&l>n.cols-1?(o+=n.buffer.translateBufferLineToString(a,!1,e,l),l=0,e=0,a++):!r&&l<0&&(o+=n.buffer.translateBufferLineToString(a,!1,0,e+1),l=n.cols-1,e=l,a--);return o+n.buffer.translateBufferLineToString(a,!1,e,l)}function Yl(e,t){let i=t?"O":"[";return b.ESC+i+e}function Wl(e,t){e=Math.floor(e);let i="";for(let s=0;s<e;s++)i+=t;return i}var zE=class{constructor(e){this._bufferService=e,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.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()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function H0(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var _d=50,LE=15,NE=50,HE=500,UE="\xA0",qE=new RegExp(UE,"g"),Id=class extends W{constructor(e,t,i,s,r,n,l,a,o){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=s,this._coreService=r,this._mouseService=n,this._optionsService=l,this._renderService=a,this._coreBrowserService=o,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Ft,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new E),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new E),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new E),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new E),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=h=>this._handleMouseMove(h),this._mouseUpListener=h=>this._handleMouseUp(h),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(h=>this._handleTrim(h)),this._register(this._bufferService.buffers.onBufferActivate(h=>this._handleBufferActivate(h))),this.enable(),this._model=new zE(this._bufferService),this._activeSelectionMode=0,this._register(de(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(h=>{h.rowsChanged&&this.clearSelection()}))}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(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,s=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let r=e[0]<t[0]?e[0]:t[0],n=e[0]<t[0]?t[0]:e[0];for(let l=e[1];l<=t[1];l++){let a=i.translateBufferLineToString(l,!0,r,n);s.push(a)}}else{let r=e[1]===t[1]?t[0]:void 0;s.push(i.translateBufferLineToString(e[1],!0,e[0],r));for(let n=e[1]+1;n<=t[1]-1;n++){let l=i.lines.get(n),a=i.translateBufferLineToString(n,!0);l?.isWrapped?s[s.length-1]+=a:s.push(a)}if(e[1]!==t[1]){let n=i.lines.get(t[1]),l=i.translateBufferLineToString(t[1],!0,0,t[0]);n&&n.isWrapped?s[s.length-1]+=l:s.push(l)}}return s.map(r=>r.replace(qE," ")).join(QS?`\r
231
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(a);gb.register(s,l?.[2]??a,s)}return s}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let o=this._deliveryQueue.current===this;if(this._size*FG<=t.length){let i=0;for(let n=0;n<t.length;n++)t[n]?t[i++]=t[n]:o&&(this._deliveryQueue.end--,i<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=i}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||mb;if(!r){e.value(t);return}try{e.value(t)}catch(o){r(o)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof yb)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},UG=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Y1=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new G,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new G,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let o=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(o,t),this._onDidChangeZoomLevel.fire(o)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let o=this.getWindowId(r);this.mapWindowIdToFullScreen.set(o,t),this._onDidChangeFullscreen.fire(o)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Y1.INSTANCE=new Y1;var xC=Y1;function $G(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}var YNe=xC.INSTANCE.onDidChangeZoomLevel;function jG(e){return xC.INSTANCE.getZoomFactor(e)}var XNe=xC.INSTANCE.onDidChangeFullscreen,kp=typeof navigator=="object"?navigator.userAgent:"",X1=kp.indexOf("Firefox")>=0,vb=kp.indexOf("AppleWebKit")>=0,TC=kp.indexOf("Chrome")>=0,P3=!TC&&kp.indexOf("Safari")>=0,ZNe=kp.indexOf("Electron/")>=0,QNe=kp.indexOf("Android")>=0,bb=!1;if(typeof Vo.matchMedia=="function"){let e=Vo.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=Vo.matchMedia("(display-mode: fullscreen)");bb=e.matches,$G(Vo,e,({matches:r})=>{bb&&t.matches||(bb=r)})}function WG(){return bb}var Rp="en",Rb=!1,Pb=!1,Ph=!1,VG=!1,E3=!1,k3=!1,qG=!1,KG=!1,GG=!1,YG=!1,ub,_b=Rp,f5=Rp,XG,us,ds=globalThis,Wo;typeof ds.vscode<"u"&&typeof ds.vscode.process<"u"?Wo=ds.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Wo=process);var O3=typeof Wo?.versions?.electron=="string",ZG=O3&&Wo?.type==="renderer";if(typeof Wo=="object"){Rb=Wo.platform==="win32",Pb=Wo.platform==="darwin",Ph=Wo.platform==="linux",VG=Ph&&!!Wo.env.SNAP&&!!Wo.env.SNAP_REVISION,qG=O3,GG=!!Wo.env.CI||!!Wo.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ub=Rp,_b=Rp;let e=Wo.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);ub=t.userLocale,f5=t.osLocale,_b=t.resolvedLanguage||Rp,XG=t.languagePack?.translationsConfigFile}catch{}E3=!0}else typeof navigator=="object"&&!ZG?(us=navigator.userAgent,Rb=us.indexOf("Windows")>=0,Pb=us.indexOf("Macintosh")>=0,KG=(us.indexOf("Macintosh")>=0||us.indexOf("iPad")>=0||us.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ph=us.indexOf("Linux")>=0,YG=us?.indexOf("Mobi")>=0,k3=!0,_b=globalThis._VSCODE_NLS_LANGUAGE||Rp,ub=navigator.language.toLowerCase(),f5=ub):console.error("Unable to resolve platform.");var S1=0;Pb?S1=1:Rb?S1=3:Ph&&(S1=2);var D3=Rb,_n=Pb,QG=Ph,x1=E3,JG=k3&&typeof ds.importScripts=="function",JNe=JG?ds.origin:void 0,Sn=us,pa=_b,eY;(e=>{function t(){return pa}e.value=t;function r(){return pa.length===2?pa==="en":pa.length>=3?pa[0]==="e"&&pa[1]==="n"&&pa[2]==="-":!1}e.isDefaultVariant=r;function o(){return pa==="en"}e.isDefault=o})(eY||(eY={}));var tY=typeof ds.postMessage=="function"&&!ds.importScripts,rY=(()=>{if(tY){let e=[];ds.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let o=0,i=e.length;o<i;o++){let n=e[o];if(n.id===r.data.vscodeScheduleAsyncWork){e.splice(o,1),n.callback();return}}});let t=0;return r=>{let o=++t;e.push({id:o,callback:r}),ds.postMessage({vscodeScheduleAsyncWork:o},"*")}}return e=>setTimeout(e)})(),oY=!!(Sn&&Sn.indexOf("Chrome")>=0),eLe=!!(Sn&&Sn.indexOf("Firefox")>=0),tLe=!!(!oY&&Sn&&Sn.indexOf("Safari")>=0),rLe=!!(Sn&&Sn.indexOf("Edg/")>=0),oLe=!!(Sn&&Sn.indexOf("Android")>=0),da=typeof navigator=="object"?navigator:{},iLe={clipboard:{writeText:x1||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(da&&da.clipboard&&da.clipboard.writeText),readText:x1||!!(da&&da.clipboard&&da.clipboard.readText)},keyboard:x1||WG()?0:da.keyboard||P3?1:2,touch:"ontouchstart"in Vo||da.maxTouchPoints>0,pointerEvents:Vo.PointerEvent&&("ontouchstart"in Vo||navigator.maxTouchPoints>0)},CC=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},T1=new CC,h5=new CC,m5=new CC,iY=new Array(230),M3;(e=>{function t(a){return T1.keyCodeToStr(a)}e.toString=t;function r(a){return T1.strToKeyCode(a)}e.fromString=r;function o(a){return h5.keyCodeToStr(a)}e.toUserSettingsUS=o;function i(a){return m5.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function n(a){return h5.strToKeyCode(a)||m5.strToKeyCode(a)}e.fromUserSettings=n;function s(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return T1.keyCodeToStr(a)}e.toElectronAccelerator=s})(M3||(M3={}));var nY=class A3{constructor(t,r,o,i,n){this.ctrlKey=t,this.shiftKey=r,this.altKey=o,this.metaKey=i,this.keyCode=n}equals(t){return t instanceof A3&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",o=this.altKey?"1":"0",i=this.metaKey?"1":"0";return`K${t}${r}${o}${i}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new sY([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},sY=class{constructor(e){if(e.length===0)throw gG("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function aY(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return M3.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(X1)switch(t){case 59:return 85;case 60:if(QG)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(_n)return 57;break}else if(vb&&(_n&&t===93||!_n&&t===92))return 57;return iY[t]||0}var lY=_n?256:2048,cY=512,uY=1024,pY=_n?2048:256,Z1=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=aY(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=lY),this.altKey&&(t|=cY),this.shiftKey&&(t|=uY),this.metaKey&&(t|=pY),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new nY(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},y5=new WeakMap;function dY(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var fY=class{static getSameOriginWindowChain(e){let t=y5.get(e);if(!t){t=[],y5.set(e,t);let r=e,o;do o=dY(r),o?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=o;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,o=0,i=this.getSameOriginWindowChain(e);for(let n of i){let s=n.window.deref();if(r+=s?.scrollY??0,o+=s?.scrollX??0,s===t||!n.iframeElement)break;let a=n.iframeElement.getBoundingClientRect();r+=a.top,o+=a.left}return{top:r,left:o}}},Sh=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=fY.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},g5=class{constructor(e,t=0,r=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let o=!1;if(TC){let i=navigator.userAgent.match(/Chrome\/(\d+)/);o=(i?parseInt(i[1]):123)<=122}if(e){let i=e,n=e,s=e.view?.devicePixelRatio||1;if(typeof i.wheelDeltaY<"u")o?this.deltaY=i.wheelDeltaY/(120*s):this.deltaY=i.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<"u"&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?X1&&!_n?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof i.wheelDeltaX<"u")P3&&D3?this.deltaX=-(i.wheelDeltaX/120):o?this.deltaX=i.wheelDeltaX/(120*s):this.deltaX=i.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<"u"&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let a=e;a.deltaMode===a.DOM_DELTA_LINE?X1&&!_n?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(o?this.deltaY=e.wheelDelta/(120*s):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},B3=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),hY;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof mY?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Lr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:B3})})(hY||(hY={}));var mY=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?B3:(this._emitter||(this._emitter=new G),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var wC=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new $1("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new $1("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},yY=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new $1("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let o=r.setInterval(()=>{e()},t);this.disposable=wt(()=>{r.clearInterval(o),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},gY,C1;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?C1=(e,t)=>{rY(()=>{if(r)return;let o=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,o-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:C1=(e,t,r)=>{let o=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),i=!1;return{dispose(){i||(i=!0,e.cancelIdleCallback(o))}}},gY=e=>C1(globalThis,e)})();var vY;(e=>{async function t(o){let i,n=await Promise.all(o.map(s=>s.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return n}e.settled=t;function r(o){return new Promise(async(i,n)=>{try{await o(i,n)}catch(s){n(s)}})}e.withAsyncBody=r})(vY||(vY={}));var v5=class gi{static fromArray(t){return new gi(r=>{r.emitMany(t)})}static fromPromise(t){return new gi(async r=>{r.emitMany(await t)})}static fromPromises(t){return new gi(async r=>{await Promise.all(t.map(async o=>r.emitOne(await o)))})}static merge(t){return new gi(async r=>{await Promise.all(t.map(async o=>{for await(let i of o)r.emitOne(i)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new G,queueMicrotask(async()=>{let o={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(o)),this.resolve()}catch(i){this.reject(i)}finally{o.emitOne=void 0,o.emitMany=void 0,o.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Lr.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new gi(async o=>{for await(let i of t)o.emitOne(r(i))})}map(t){return gi.map(this,t)}static filter(t,r){return new gi(async o=>{for await(let i of t)r(i)&&o.emitOne(i)})}filter(t){return gi.filter(this,t)}static coalesce(t){return gi.filter(t,r=>!!r)}coalesce(){return gi.coalesce(this)}static async toPromise(t){let r=[];for await(let o of t)r.push(o);return r}toPromise(){return gi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};v5.EMPTY=v5.fromArray([]);function bY(e){return 55296<=e&&e<=56319}function b5(e){return 56320<=e&&e<=57343}function _Y(e,t){return(e-55296<<10)+(t-56320)+65536}function SY(e){return RC(e,0)}function RC(e,t){switch(typeof e){case"object":return e===null?ps(349,t):Array.isArray(e)?TY(e,t):CY(e,t);case"string":return N3(e,t);case"boolean":return xY(e,t);case"number":return ps(e,t);case"undefined":return ps(937,t);default:return ps(617,t)}}function ps(e,t){return(t<<5)-t+e|0}function xY(e,t){return ps(e?433:863,t)}function N3(e,t){t=ps(149417,t);for(let r=0,o=e.length;r<o;r++)t=ps(e.charCodeAt(r),t);return t}function TY(e,t){return t=ps(104579,t),e.reduce((r,o)=>RC(o,r),t)}function CY(e,t){return t=ps(181387,t),Object.keys(e).sort().reduce((r,o)=>(r=N3(o,r),RC(e[o],r)),t)}function w1(e,t,r=32){let o=r-t,i=~((1<<o)-1);return(e<<t|(i&e)>>>o)>>>0}function _5(e,t=0,r=e.byteLength,o=0){for(let i=0;i<r;i++)e[t+i]=o}function wY(e,t,r="0"){for(;e.length<t;)e=r+e;return e}function hh(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""):wY((e>>>0).toString(16),t/4)}var RY=class L3{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let r=t.length;if(r===0)return;let o=this._buff,i=this._buffLen,n=this._leftoverHighSurrogate,s,a;for(n!==0?(s=n,a=-1,n=0):(s=t.charCodeAt(0),a=0);;){let l=s;if(bY(s))if(a+1<r){let c=t.charCodeAt(a+1);b5(c)?(a++,l=_Y(s,c)):l=65533}else{n=s;break}else b5(s)&&(l=65533);if(i=this._push(o,i,l),a++,a<r)s=t.charCodeAt(a);else break}this._buffLen=i,this._leftoverHighSurrogate=n}_push(t,r,o){return o<128?t[r++]=o:o<2048?(t[r++]=192|(o&1984)>>>6,t[r++]=128|(o&63)>>>0):o<65536?(t[r++]=224|(o&61440)>>>12,t[r++]=128|(o&4032)>>>6,t[r++]=128|(o&63)>>>0):(t[r++]=240|(o&1835008)>>>18,t[r++]=128|(o&258048)>>>12,t[r++]=128|(o&4032)>>>6,t[r++]=128|(o&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),hh(this._h0)+hh(this._h1)+hh(this._h2)+hh(this._h3)+hh(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,_5(this._buff,this._buffLen),this._buffLen>56&&(this._step(),_5(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=L3._bigBlock32,r=this._buffDV;for(let p=0;p<64;p+=4)t.setUint32(p,r.getUint32(p,!1),!1);for(let p=64;p<320;p+=4)t.setUint32(p,w1(t.getUint32(p-12,!1)^t.getUint32(p-32,!1)^t.getUint32(p-56,!1)^t.getUint32(p-64,!1),1),!1);let o=this._h0,i=this._h1,n=this._h2,s=this._h3,a=this._h4,l,c,u;for(let p=0;p<80;p++)p<20?(l=i&n|~i&s,c=1518500249):p<40?(l=i^n^s,c=1859775393):p<60?(l=i&n|i&s|n&s,c=2400959708):(l=i^n^s,c=3395469782),u=w1(o,5)+l+a+c+t.getUint32(p*4,!1)&4294967295,a=s,s=n,n=w1(i,30),i=o,o=u;this._h0=this._h0+o&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+n&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};RY._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:nLe,getWindow:Fi,getDocument:sLe,getWindows:aLe,getWindowsCount:lLe,getWindowId:S5,getWindowById:cLe,hasWindow:uLe,onDidRegisterWindow:PY,onWillUnregisterWindow:pLe,onDidUnregisterWindow:dLe}=(function(){let e=new Map,t={window:Vo,disposables:new ga};e.set(Vo.vscodeWindowId,t);let r=new G,o=new G,i=new G;function n(s,a){return(typeof s=="number"?e.get(s):void 0)??(a?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:o.event,registerWindow(s){if(e.has(s.vscodeWindowId))return xe.None;let a=new ga,l={window:s,disposables:a.add(new ga)};return e.set(s.vscodeWindowId,l),a.add(wt(()=>{e.delete(s.vscodeWindowId),o.fire(s)})),a.add(ge(s,gr.BEFORE_UNLOAD,()=>{i.fire(s)})),r.fire(l),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(s){return s.vscodeWindowId},hasWindow(s){return e.has(s)},getWindowById:n,getWindow(s){let a=s;if(a?.ownerDocument?.defaultView)return a.ownerDocument.defaultView.window;let l=s;return l?.view?l.view.window:Vo},getDocument(s){return Fi(s).document}}})(),EY=class{constructor(e,t,r,o){this._node=e,this._type=t,this._handler=r,this._options=o||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function ge(e,t,r,o){return new EY(e,t,r,o)}function kY(e,t){return function(r){return t(new Sh(e,r))}}function OY(e){return function(t){return e(new Z1(t))}}var x5=function(e,t,r,o){let i=r;return t==="click"||t==="mousedown"||t==="contextmenu"?i=kY(Fi(e),r):(t==="keydown"||t==="keypress"||t==="keyup")&&(i=OY(r)),ge(e,t,i,o)},DY,Eb,MY=class extends yY{constructor(e){super(),this.defaultTarget=e&&Fi(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},R1=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){mb(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,o=new Map,i=n=>{r.set(n,!1);let s=e.get(n)??[];for(t.set(n,s),e.set(n,[]),o.set(n,!0);s.length>0;)s.sort(R1.sort),s.shift().execute();o.set(n,!1)};Eb=(n,s,a=0)=>{let l=S5(n),c=new R1(s,a),u=e.get(l);return u||(u=[],e.set(l,u)),u.push(c),r.get(l)||(r.set(l,!0),n.requestAnimationFrame(()=>i(l))),c},DY=(n,s,a)=>{let l=S5(n);if(o.get(l)){let c=new R1(s,a),u=t.get(l);return u||(u=[],t.set(l,u)),u.push(c),c}else return Eb(n,s,a)}})();var T5=class Sb{constructor(t,r){this.width=t,this.height=r}with(t=this.width,r=this.height){return t!==this.width||r!==this.height?new Sb(t,r):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof Sb?t:new Sb(t.width,t.height)}static equals(t,r){return t===r?!0:!t||!r?!1:t.width===r.width&&t.height===r.height}};T5.None=new T5(0,0);function AY(e){let t=e.getBoundingClientRect(),r=Fi(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var fLe=new class{constructor(){this.mutationObservers=new Map}observe(e,t,r){let o=this.mutationObservers.get(e);o||(o=new Map,this.mutationObservers.set(e,o));let i=SY(r),n=o.get(i);if(n)n.users+=1;else{let s=new G,a=new MutationObserver(c=>s.fire(c));a.observe(e,r);let l=n={users:1,observer:a,onDidMutate:s.event};t.add(wt(()=>{l.users-=1,l.users===0&&(s.dispose(),a.disconnect(),o?.delete(i),o?.size===0&&this.mutationObservers.delete(e))})),o.set(i,n)}return n.onDidMutate}},gr={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:vb?"webkitAnimationStart":"animationstart",ANIMATION_END:vb?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:vb?"webkitAnimationIteration":"animationiteration"},BY=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function I3(e,t,r,...o){let i=BY.exec(t);if(!i)throw new Error("Bad use of emmet");let n=i[1]||"div",s;return e!=="http://www.w3.org/1999/xhtml"?s=document.createElementNS(e,n):s=document.createElement(n),i[3]&&(s.id=i[3]),i[4]&&(s.className=i[4].replace(/\./g," ").trim()),r&&Object.entries(r).forEach(([a,l])=>{typeof l>"u"||(/^on\w+$/.test(a)?s[a]=l:a==="selected"?l&&s.setAttribute(a,"true"):s.setAttribute(a,l))}),s.append(...o),s}function NY(e,t,...r){return I3("http://www.w3.org/1999/xhtml",e,t,...r)}NY.SVG=function(e,t,...r){return I3("http://www.w3.org/2000/svg",e,t,...r)};var LY=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=bo(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=bo(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=bo(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=bo(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=bo(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=bo(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=bo(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=bo(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=bo(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=bo(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=bo(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=bo(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=bo(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=bo(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function bo(e){return typeof e=="number"?`${e}px`:e}function Eh(e){return new LY(e)}var z3=class{constructor(){this._hooks=new ga,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,o,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=i;let n=e;try{e.setPointerCapture(t),this._hooks.add(wt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{n=Fi(e)}this._hooks.add(ge(n,gr.POINTER_MOVE,s=>{if(s.buttons!==r){this.stopMonitoring(!0);return}s.preventDefault(),this._pointerMoveCallback(s)})),this._hooks.add(ge(n,gr.POINTER_UP,s=>this.stopMonitoring(!0)))}};function IY(e,t,r){let o=null,i=null;if(typeof r.value=="function"?(o="value",i=r.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(o="get",i=r.get),!i)throw new Error("not supported");let n=`$memoize$${t}`;r[o]=function(...s){return this.hasOwnProperty(n)||Object.defineProperty(this,n,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,s)}),this[n]}}var bn;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(bn||(bn={}));var xh=class jr extends xe{constructor(){super(),this.dispatched=!1,this.targets=new u5,this.ignoreTargets=new u5,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Lr.runAndSubscribe(PY,({window:t,disposables:r})=>{r.add(ge(t.document,"touchstart",o=>this.onTouchStart(o),{passive:!1})),r.add(ge(t.document,"touchend",o=>this.onTouchEnd(t,o))),r.add(ge(t.document,"touchmove",o=>this.onTouchMove(o),{passive:!1}))},{window:Vo,disposables:this._store}))}static addTarget(t){if(!jr.isTouchDevice())return xe.None;jr.INSTANCE||(jr.INSTANCE=c5(new jr));let r=jr.INSTANCE.targets.push(t);return wt(r)}static ignoreTarget(t){if(!jr.isTouchDevice())return xe.None;jr.INSTANCE||(jr.INSTANCE=c5(new jr));let r=jr.INSTANCE.ignoreTargets.push(t);return wt(r)}static isTouchDevice(){return"ontouchstart"in Vo||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let o=0,i=t.targetTouches.length;o<i;o++){let n=t.targetTouches.item(o);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:r,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[r],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let s=this.newGestureEvent(bn.Start,n.target);s.pageX=n.pageX,s.pageY=n.pageY,this.dispatchEvent(s)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let o=Date.now(),i=Object.keys(this.activeTouches).length;for(let n=0,s=r.changedTouches.length;n<s;n++){let a=r.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("move of an UNKNOWN touch",a);continue}let l=this.activeTouches[a.identifier],c=Date.now()-l.initialTimeStamp;if(c<jr.HOLD_DELAY&&Math.abs(l.initialPageX-$o(l.rollingPageX))<30&&Math.abs(l.initialPageY-$o(l.rollingPageY))<30){let u=this.newGestureEvent(bn.Tap,l.initialTarget);u.pageX=$o(l.rollingPageX),u.pageY=$o(l.rollingPageY),this.dispatchEvent(u)}else if(c>=jr.HOLD_DELAY&&Math.abs(l.initialPageX-$o(l.rollingPageX))<30&&Math.abs(l.initialPageY-$o(l.rollingPageY))<30){let u=this.newGestureEvent(bn.Contextmenu,l.initialTarget);u.pageX=$o(l.rollingPageX),u.pageY=$o(l.rollingPageY),this.dispatchEvent(u)}else if(i===1){let u=$o(l.rollingPageX),p=$o(l.rollingPageY),f=$o(l.rollingTimestamps)-l.rollingTimestamps[0],d=u-l.rollingPageX[0],h=p-l.rollingPageY[0],y=[...this.targets].filter(b=>l.initialTarget instanceof Node&&b.contains(l.initialTarget));this.inertia(t,y,o,Math.abs(d)/f,d>0?1:-1,u,Math.abs(h)/f,h>0?1:-1,p)}this.dispatchEvent(this.newGestureEvent(bn.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let o=document.createEvent("CustomEvent");return o.initEvent(t,!1,!0),o.initialTarget=r,o.tapCount=0,o}dispatchEvent(t){if(t.type===bn.Tap){let r=new Date().getTime(),o=0;r-this._lastSetTapCountTime>jr.CLEAR_TAP_COUNT_TIME?o=1:o=2,this._lastSetTapCountTime=r,t.tapCount=o}else(t.type===bn.Change||t.type===bn.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let o of this.ignoreTargets)if(o.contains(t.initialTarget))return;let r=[];for(let o of this.targets)if(o.contains(t.initialTarget)){let i=0,n=t.initialTarget;for(;n&&n!==o;)i++,n=n.parentElement;r.push([i,o])}r.sort((o,i)=>o[0]-i[0]);for(let[o,i]of r)i.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,o,i,n,s,a,l,c){this.handle=Eb(t,()=>{let u=Date.now(),p=u-o,f=0,d=0,h=!0;i+=jr.SCROLL_FRICTION*p,a+=jr.SCROLL_FRICTION*p,i>0&&(h=!1,f=n*i*p),a>0&&(h=!1,d=l*a*p);let y=this.newGestureEvent(bn.Change);y.translationX=f,y.translationY=d,r.forEach(b=>b.dispatchEvent(y)),h||this.inertia(t,r,u,i,n,s+f,a,l,c+d)})}onTouchMove(t){let r=Date.now();for(let o=0,i=t.changedTouches.length;o<i;o++){let n=t.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let s=this.activeTouches[n.identifier],a=this.newGestureEvent(bn.Change,s.initialTarget);a.translationX=n.pageX-$o(s.rollingPageX),a.translationY=n.pageY-$o(s.rollingPageY),a.pageX=n.pageX,a.pageY=n.pageY,this.dispatchEvent(a),s.rollingPageX.length>3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(n.pageX),s.rollingPageY.push(n.pageY),s.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};xh.SCROLL_FRICTION=-.005,xh.HOLD_DELAY=700,xh.CLEAR_TAP_COUNT_TIME=400,Ut([IY],xh,"isTouchDevice",1);var zY=xh,PC=class extends xe{onclick(e,t){this._register(ge(e,gr.CLICK,r=>t(new Sh(Fi(e),r))))}onmousedown(e,t){this._register(ge(e,gr.MOUSE_DOWN,r=>t(new Sh(Fi(e),r))))}onmouseover(e,t){this._register(ge(e,gr.MOUSE_OVER,r=>t(new Sh(Fi(e),r))))}onmouseleave(e,t){this._register(ge(e,gr.MOUSE_LEAVE,r=>t(new Sh(Fi(e),r))))}onkeydown(e,t){this._register(ge(e,gr.KEY_DOWN,r=>t(new Z1(r))))}onkeyup(e,t){this._register(ge(e,gr.KEY_UP,r=>t(new Z1(r))))}oninput(e,t){this._register(ge(e,gr.INPUT,t))}onblur(e,t){this._register(ge(e,gr.BLUR,t))}onfocus(e,t){this._register(ge(e,gr.FOCUS,t))}onchange(e,t){this._register(ge(e,gr.CHANGE,t))}ignoreGesture(e){return zY.ignoreTarget(e)}},C5=11,FY=class extends PC{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=C5+"px",this.domNode.style.height=C5+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new z3),this._register(x5(this.bgDomNode,gr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(x5(this.domNode,gr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new MY),this._pointerdownScheduleRepeatTimer=this._register(new wC)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Fi(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},HY=class Q1{constructor(t,r,o,i,n,s,a){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,o=o|0,i=i|0,n=n|0,s=s|0,a=a|0),this.rawScrollLeft=i,this.rawScrollTop=a,r<0&&(r=0),i+r>o&&(i=o-r),i<0&&(i=0),n<0&&(n=0),a+n>s&&(a=s-n),a<0&&(a=0),this.width=r,this.scrollWidth=o,this.scrollLeft=i,this.height=n,this.scrollHeight=s,this.scrollTop=a}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new Q1(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Q1(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let o=this.width!==t.width,i=this.scrollWidth!==t.scrollWidth,n=this.scrollLeft!==t.scrollLeft,s=this.height!==t.height,a=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:o,scrollWidthChanged:i,scrollLeftChanged:n,heightChanged:s,scrollHeightChanged:a,scrollTopChanged:l}}},UY=class extends xe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new G),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new HY(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let o;t?o=new R5(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):o=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=o}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=R5.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},w5=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function P1(e,t){let r=t-e;return function(o){return e+r*WY(o)}}function $Y(e,t,r){return function(o){return o<r?e(o/r):t((o-r)/(1-r))}}var R5=class J1{constructor(t,r,o,i){this.from=t,this.to=r,this.duration=i,this.startTime=o,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,o){if(Math.abs(t-r)>2.5*o){let i,n;return t<r?(i=t+.75*o,n=r-.75*o):(i=t-.75*o,n=r+.75*o),$Y(P1(t,i),P1(n,r),.33)}return P1(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let o=this.scrollLeft(r),i=this.scrollTop(r);return new w5(o,i,!1)}return new w5(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,o){return J1.start(t,r,o)}static start(t,r,o){o=o+10;let i=Date.now()-10;return new J1(t,r,i,o)}};function jY(e){return Math.pow(e,3)}function WY(e){return 1-jY(1-e)}var VY=class extends xe{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new wC)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},qY=140,F3=class extends PC{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new VY(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new z3),this._shouldRender=!0,this.domNode=Eh(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(ge(this.domNode.domNode,gr.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new FY(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,o){this.slider=Eh(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof o=="number"&&this.slider.setHeight(o),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(ge(this.slider.domNode,gr.POINTER_DOWN,i=>{i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))})),this.onclick(this.slider.domNode,i=>{i.leftButton&&i.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),o=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);r<=i&&i<=o?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let i=AY(this.domNode.domNode);t=e.pageX-i.left,r=e.pageY-i.top}let o=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(o):this._scrollbarState.getDesiredScrollPositionFromOffset(o)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{let n=this._sliderOrthogonalPointerPosition(i),s=Math.abs(n-r);if(D3&&s>qY){this._setDesiredScrollPositionNow(o.getScrollPosition());return}let a=this._sliderPointerPosition(i)-t;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},H3=class eC{constructor(t,r,o,i,n,s){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(o),this._arrowSize=Math.round(t),this._visibleSize=i,this._scrollSize=n,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new eC(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,o,i,n){let s=Math.max(0,o-t),a=Math.max(0,s-2*r),l=i>0&&i>o;if(!l)return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(o*a/i))),u=(a-c)/(i-o),p=n*u;return{computedAvailableSize:Math.round(s),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(p)}}_refreshComputedValues(){let t=eC._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,o=this._scrollPosition;return r<this._computedSliderPosition?o-=this._visibleSize:o+=this._visibleSize,o}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},KY=class extends F3{constructor(e,t,r){let o=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new H3(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,o.width,o.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},GY=class extends F3{constructor(e,t,r){let o=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new H3(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,o.height,o.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},YY=500,P5=50,E5=!0,XY=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},tC=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,o=1,i=this._rear;do{let n=i===this._front?t:Math.pow(2,-o);if(t-=n,r+=this._memory[i].score*n,i===this._front)break;i=(this._capacity+i-1)%this._capacity,o++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(TC){let r=Fi(t.browserEvent),o=jG(r);this.accept(Date.now(),t.deltaX*o,t.deltaY*o)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,o){let i=null,n=new XY(t,r,o);this._front===-1&&this._rear===-1?(this._memory[0]=n,this._front=0,this._rear=0):(i=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n),n.score=this._computeScore(n,i)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let o=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(o+=.25),r){let i=Math.abs(t.deltaX),n=Math.abs(t.deltaY),s=Math.abs(r.deltaX),a=Math.abs(r.deltaY),l=Math.max(Math.min(i,s),1),c=Math.max(Math.min(n,a),1),u=Math.max(i,s),p=Math.max(n,a);u%l===0&&p%c===0&&(o-=.5)}return Math.min(Math.max(o,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};tC.INSTANCE=new tC;var ZY=tC,QY=class extends PC{constructor(e,t,r){super(),this._onScroll=this._register(new G),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new G),this.onWillScroll=this._onWillScroll.event,this._options=eX(t),this._scrollable=r,this._register(this._scrollable.onScroll(i=>{this._onWillScroll.fire(i),this._onDidScroll(i),this._onScroll.fire(i)}));let o={onMouseWheel:i=>this._onMouseWheel(i),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new GY(this._scrollable,this._options,o)),this._horizontalScrollbar=this._register(new KY(this._scrollable,this._options,o)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Eh(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Eh(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Eh(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,i=>this._onMouseOver(i)),this.onmouseleave(this._listenOnDomNode,i=>this._onMouseLeave(i)),this._hideTimeout=this._register(new wC),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=ql(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,_n&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new g5(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=ql(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new g5(r))};this._mouseWheelToDispose.push(ge(this._listenOnDomNode,gr.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=ZY.INSTANCE;E5&&t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let i=e.deltaY*this._options.mouseWheelScrollSensitivity,n=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&n+i===0?n=i=0:Math.abs(i)>=Math.abs(n)?n=0:i=0),this._options.flipAxes&&([i,n]=[n,i]);let s=!_n&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||s)&&!n&&(n=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(n=n*this._options.fastScrollSensitivity,i=i*this._options.fastScrollSensitivity);let a=this._scrollable.getFutureScrollPosition(),l={};if(i){let c=P5*i,u=a.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,u)}if(n){let c=P5*n,u=a.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,u)}l=this._scrollable.validateScrollPosition(l),(a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop)&&(E5&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),r=!0)}let o=r;!o&&this._options.alwaysConsumeMouseWheel&&(o=!0),!o&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(o=!0),o&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,o=r?" left":"",i=t?" top":"",n=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${o}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${n}${i}${o}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),YY)}},JY=class extends QY{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function eX(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,_n&&(t.className+=" mac"),t}var rC=class extends xe{constructor(e,t,r,o,i,n,s,a){super(),this._bufferService=r,this._optionsService=s,this._renderService=a,this._onRequestScrollLines=this._register(new G),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new UY({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>Eb(o.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new JY(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Lr.runAndSubscribe(n.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=n.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(wt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=o.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(wt(()=>this._styleElement.remove())),this._register(Lr.runAndSubscribe(n.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${n.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${n.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${n.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
232
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};rC=Ut([J(2,ro),J(3,fs),J(4,p3),J(5,Ep),J(6,oo),J(7,hs)],rC);var oC=class extends xe{constructor(e,t,r,o,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=o,this._renderService=i,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(n=>this._removeDecoration(n))),this._register(wt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};oC=Ut([J(1,ro),J(2,fs),J(3,Bh),J(4,hs)],oC);var tX=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(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},gn={full:0,left:0,center:0,right:0},fa={full:0,left:0,center:0,right:0},mh={full:0,left:0,center:0,right:0},kb=class extends xe{constructor(e,t,r,o,i,n,s,a){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=o,this._renderService=i,this._optionsService=n,this._themeService=s,this._coreBrowserService=a,this._colorZoneStore=new tX,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),this._register(wt(()=>this._canvas?.remove()));let l=this._canvas.getContext("2d");if(l)this._ctx=l;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),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())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);fa.full=this._canvas.width,fa.left=e,fa.center=t,fa.right=e,this._refreshDrawHeightConstants(),mh.full=1,mh.left=1,mh.center=1+fa.left,mh.right=1+fa.left+fa.center}_refreshDrawHeightConstants(){gn.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);gn.left=t,gn.center=t,gn.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gn.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gn.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gn.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gn.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(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(mh[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-gn[e.position||"full"]/2),fa[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+gn[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};kb=Ut([J(2,ro),J(3,Bh),J(4,hs),J(5,oo),J(6,Ep),J(7,fs)],kb);var $;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
233
+ `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL="\x7F"))($||($={}));var xb;(e=>(e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8A",e.PLD="\x8B",e.PLU="\x8C",e.RI="\x8D",e.SS2="\x8E",e.SS3="\x8F",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9A",e.CSI="\x9B",e.ST="\x9C",e.OSC="\x9D",e.PM="\x9E",e.APC="\x9F"))(xb||(xb={}));var U3;(e=>e.ST=`${$.ESC}\\`)(U3||(U3={}));var iC=class{constructor(e,t,r,o,i,n){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=o,this._coreService=i,this._renderService=n,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${$.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,i=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let n=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(n.width,1)+"px",this._textarea.style.height=Math.max(n.height,1)+"px",this._textarea.style.lineHeight=n.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};iC=Ut([J(2,ro),J(3,oo),J(4,Gl),J(5,hs)],iC);var vr=0,br=0,_r=0,Ht=0,k5={css:"#00000000",rgba:0},tr;(e=>{function t(i,n,s,a){return a!==void 0?`#${Ul(i)}${Ul(n)}${Ul(s)}${Ul(a)}`:`#${Ul(i)}${Ul(n)}${Ul(s)}`}e.toCss=t;function r(i,n,s,a=255){return(i<<24|n<<16|s<<8|a)>>>0}e.toRgba=r;function o(i,n,s,a){return{css:e.toCss(i,n,s,a),rgba:e.toRgba(i,n,s,a)}}e.toColor=o})(tr||(tr={}));var Ct;(e=>{function t(l,c){if(Ht=(c.rgba&255)/255,Ht===1)return{css:c.css,rgba:c.rgba};let u=c.rgba>>24&255,p=c.rgba>>16&255,f=c.rgba>>8&255,d=l.rgba>>24&255,h=l.rgba>>16&255,y=l.rgba>>8&255;vr=d+Math.round((u-d)*Ht),br=h+Math.round((p-h)*Ht),_r=y+Math.round((f-y)*Ht);let b=tr.toCss(vr,br,_r),m=tr.toRgba(vr,br,_r);return{css:b,rgba:m}}e.blend=t;function r(l){return(l.rgba&255)===255}e.isOpaque=r;function o(l,c,u){let p=Tb.ensureContrastRatio(l.rgba,c.rgba,u);if(p)return tr.toColor(p>>24&255,p>>16&255,p>>8&255)}e.ensureContrastRatio=o;function i(l){let c=(l.rgba|255)>>>0;return[vr,br,_r]=Tb.toChannels(c),{css:tr.toCss(vr,br,_r),rgba:c}}e.opaque=i;function n(l,c){return Ht=Math.round(c*255),[vr,br,_r]=Tb.toChannels(l.rgba),{css:tr.toCss(vr,br,_r,Ht),rgba:tr.toRgba(vr,br,_r,Ht)}}e.opacity=n;function s(l,c){return Ht=l.rgba&255,n(l,Ht*c/255)}e.multiplyOpacity=s;function a(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=a})(Ct||(Ct={}));var Nt;(e=>{let t,r;try{let i=document.createElement("canvas");i.width=1,i.height=1;let n=i.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function o(i){if(i.match(/#[\da-f]{3,8}/i))switch(i.length){case 4:return vr=parseInt(i.slice(1,2).repeat(2),16),br=parseInt(i.slice(2,3).repeat(2),16),_r=parseInt(i.slice(3,4).repeat(2),16),tr.toColor(vr,br,_r);case 5:return vr=parseInt(i.slice(1,2).repeat(2),16),br=parseInt(i.slice(2,3).repeat(2),16),_r=parseInt(i.slice(3,4).repeat(2),16),Ht=parseInt(i.slice(4,5).repeat(2),16),tr.toColor(vr,br,_r,Ht);case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}let n=i.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(n)return vr=parseInt(n[1]),br=parseInt(n[2]),_r=parseInt(n[3]),Ht=Math.round((n[5]===void 0?1:parseFloat(n[5]))*255),tr.toColor(vr,br,_r,Ht);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=i,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[vr,br,_r,Ht]=t.getImageData(0,0,1,1).data,Ht!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:tr.toRgba(vr,br,_r,Ht),css:i}}e.toColor=o})(Nt||(Nt={}));var to;(e=>{function t(o){return r(o>>16&255,o>>8&255,o&255)}e.relativeLuminance=t;function r(o,i,n){let s=o/255,a=i/255,l=n/255,c=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),u=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),p=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+u*.7152+p*.0722}e.relativeLuminance2=r})(to||(to={}));var Tb;(e=>{function t(s,a){if(Ht=(a&255)/255,Ht===1)return a;let l=a>>24&255,c=a>>16&255,u=a>>8&255,p=s>>24&255,f=s>>16&255,d=s>>8&255;return vr=p+Math.round((l-p)*Ht),br=f+Math.round((c-f)*Ht),_r=d+Math.round((u-d)*Ht),tr.toRgba(vr,br,_r)}e.blend=t;function r(s,a,l){let c=to.relativeLuminance(s>>8),u=to.relativeLuminance(a>>8);if(cs(c,u)<l){if(u<c){let d=o(s,a,l),h=cs(c,to.relativeLuminance(d>>8));if(h<l){let y=i(s,a,l),b=cs(c,to.relativeLuminance(y>>8));return h>b?d:y}return d}let p=i(s,a,l),f=cs(c,to.relativeLuminance(p>>8));if(f<l){let d=o(s,a,l),h=cs(c,to.relativeLuminance(d>>8));return f>h?p:d}return p}}e.ensureContrastRatio=r;function o(s,a,l){let c=s>>24&255,u=s>>16&255,p=s>>8&255,f=a>>24&255,d=a>>16&255,h=a>>8&255,y=cs(to.relativeLuminance2(f,d,h),to.relativeLuminance2(c,u,p));for(;y<l&&(f>0||d>0||h>0);)f-=Math.max(0,Math.ceil(f*.1)),d-=Math.max(0,Math.ceil(d*.1)),h-=Math.max(0,Math.ceil(h*.1)),y=cs(to.relativeLuminance2(f,d,h),to.relativeLuminance2(c,u,p));return(f<<24|d<<16|h<<8|255)>>>0}e.reduceLuminance=o;function i(s,a,l){let c=s>>24&255,u=s>>16&255,p=s>>8&255,f=a>>24&255,d=a>>16&255,h=a>>8&255,y=cs(to.relativeLuminance2(f,d,h),to.relativeLuminance2(c,u,p));for(;y<l&&(f<255||d<255||h<255);)f=Math.min(255,f+Math.ceil((255-f)*.1)),d=Math.min(255,d+Math.ceil((255-d)*.1)),h=Math.min(255,h+Math.ceil((255-h)*.1)),y=cs(to.relativeLuminance2(f,d,h),to.relativeLuminance2(c,u,p));return(f<<24|d<<16|h<<8|255)>>>0}e.increaseLuminance=i;function n(s){return[s>>24&255,s>>16&255,s>>8&255,s&255]}e.toChannels=n})(Tb||(Tb={}));function Ul(e){let t=e.toString(16);return t.length<2?"0"+t:t}function cs(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var rX=class extends Ah{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Ob=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new bi}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],o=t.translateToString(!0),i=0,n=0,s=0,a=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==a||this._workCell.bg!==l){if(c-i>1){let u=this._getJoinedRanges(o,s,n,t,i);for(let p=0;p<u.length;p++)r.push(u[p])}i=c,s=n,a=this._workCell.fg,l=this._workCell.bg}n+=this._workCell.getChars().length||ya.length}if(this._bufferService.cols-i>1){let c=this._getJoinedRanges(o,s,n,t,i);for(let u=0;u<c.length;u++)r.push(c[u])}return r}_getJoinedRanges(e,t,r,o,i){let n=e.substring(t,r),s=[];try{s=this._characterJoiners[0].handler(n)}catch(a){console.error(a)}for(let a=1;a<this._characterJoiners.length;a++)try{let l=this._characterJoiners[a].handler(n);for(let c=0;c<l.length;c++)Ob._mergeRanges(s,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(s,o,i),s}_stringRangesToCellRanges(e,t,r){let o=0,i=!1,n=0,s=e[o];if(s){for(let a=r;a<this._bufferService.cols;a++){let l=t.getWidth(a),c=t.getString(a).length||ya.length;if(l!==0){if(!i&&s[0]<=n&&(s[0]=a,i=!0),s[1]<=n){if(s[1]=a,s=e[++o],!s)break;s[0]<=n?(s[0]=a,i=!0):i=!1}n+=c}}s&&(s[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(r){if(t[1]<=i[0])return e[o-1][1]=t[1],e;if(t[1]<=i[1])return e[o-1][1]=Math.max(t[1],i[1]),e.splice(o,1),e;e.splice(o,1),o--}else{if(t[1]<=i[0])return e.splice(o,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};Ob=Ut([J(0,ro)],Ob);function oX(e){return 57508<=e&&e<=57558}function iX(e){return 9472<=e&&e<=9631}function nX(e){return oX(e)||iX(e)}function sX(){return{css:{canvas:pb(),cell:pb()},device:{canvas:pb(),cell:pb(),char:{width:0,height:0,left:0,top:0}}}}function pb(){return{width:0,height:0}}var nC=class{constructor(e,t,r,o,i,n,s){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=o,this._coreService=i,this._decorationService=n,this._themeService=s,this._workCell=new bi,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,o,i,n,s,a,l,c,u){let p=[],f=this._characterJoinerService.getJoinedCharacters(t),d=this._themeService.colors,h=e.getNoBgTrimmedLength();r&&h<n+1&&(h=n+1);let y,b=0,m="",g=0,v=0,_=0,C=0,w=!1,E=0,O=!1,A=0,B=0,D=[],x=c!==-1&&u!==-1;for(let R=0;R<h;R++){e.loadCell(R,this._workCell);let T=this._workCell.getWidth();if(T===0)continue;let P=!1,M=R>=B,L=R,N=this._workCell;if(f.length>0&&R===f[0][0]&&M){let oe=f.shift(),dt=this._isCellInSelection(oe[0],t);for(g=oe[0]+1;g<oe[1];g++)M&&(M=dt===this._isCellInSelection(g,t));M&&(M=!r||n<oe[0]||n>=oe[1]),M?(P=!0,N=new rX(this._workCell,e.translateToString(!0,oe[0],oe[1]),oe[1]-oe[0]),L=oe[1]-1,T=N.getWidth()):B=oe[1]}let Y=this._isCellInSelection(R,t),ee=r&&R===n,Q=x&&R>=c&&R<=u,fe=!1;this._decorationService.forEachDecorationAtCell(R,t,void 0,oe=>{fe=!0});let ve=N.getChars()||ya;if(ve===" "&&(N.isUnderline()||N.isOverline())&&(ve="\xA0"),A=T*a-l.get(ve,N.isBold(),N.isItalic()),!y)y=this._document.createElement("span");else if(b&&(Y&&O||!Y&&!O&&N.bg===v)&&(Y&&O&&d.selectionForeground||N.fg===_)&&N.extended.ext===C&&Q===w&&A===E&&!ee&&!P&&!fe&&M){N.isInvisible()?m+=ya:m+=ve,b++;continue}else b&&(y.textContent=m),y=this._document.createElement("span"),b=0,m="";if(v=N.bg,_=N.fg,C=N.extended.ext,w=Q,E=A,O=Y,P&&n>=R&&n<=L&&(n=R),!this._coreService.isCursorHidden&&ee&&this._coreService.isCursorInitialized){if(D.push("xterm-cursor"),this._coreBrowserService.isFocused)s&&D.push("xterm-cursor-blink"),D.push(o==="bar"?"xterm-cursor-bar":o==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":D.push("xterm-cursor-outline");break;case"block":D.push("xterm-cursor-block");break;case"bar":D.push("xterm-cursor-bar");break;case"underline":D.push("xterm-cursor-underline");break;default:break}}if(N.isBold()&&D.push("xterm-bold"),N.isItalic()&&D.push("xterm-italic"),N.isDim()&&D.push("xterm-dim"),N.isInvisible()?m=ya:m=N.getChars()||ya,N.isUnderline()&&(D.push(`xterm-underline-${N.extended.underlineStyle}`),m===" "&&(m="\xA0"),!N.isUnderlineColorDefault()))if(N.isUnderlineColorRGB())y.style.textDecorationColor=`rgb(${Ah.toColorRGB(N.getUnderlineColor()).join(",")})`;else{let oe=N.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&N.isBold()&&oe<8&&(oe+=8),y.style.textDecorationColor=d.ansi[oe].css}N.isOverline()&&(D.push("xterm-overline"),m===" "&&(m="\xA0")),N.isStrikethrough()&&D.push("xterm-strikethrough"),Q&&(y.style.textDecoration="underline");let he=N.getFgColor(),ae=N.getFgColorMode(),re=N.getBgColor(),pe=N.getBgColorMode(),te=!!N.isInverse();if(te){let oe=he;he=re,re=oe;let dt=ae;ae=pe,pe=dt}let ie,Pe,gt=!1;this._decorationService.forEachDecorationAtCell(R,t,void 0,oe=>{oe.options.layer!=="top"&&gt||(oe.backgroundColorRGB&&(pe=50331648,re=oe.backgroundColorRGB.rgba>>8&16777215,ie=oe.backgroundColorRGB),oe.foregroundColorRGB&&(ae=50331648,he=oe.foregroundColorRGB.rgba>>8&16777215,Pe=oe.foregroundColorRGB),gt=oe.options.layer==="top")}),!gt&&Y&&(ie=this._coreBrowserService.isFocused?d.selectionBackgroundOpaque:d.selectionInactiveBackgroundOpaque,re=ie.rgba>>8&16777215,pe=50331648,gt=!0,d.selectionForeground&&(ae=50331648,he=d.selectionForeground.rgba>>8&16777215,Pe=d.selectionForeground)),gt&&D.push("xterm-decoration-top");let be;switch(pe){case 16777216:case 33554432:be=d.ansi[re],D.push(`xterm-bg-${re}`);break;case 50331648:be=tr.toColor(re>>16,re>>8&255,re&255),this._addStyle(y,`background-color:#${O5((re>>>0).toString(16),"0",6)}`);break;default:te?(be=d.foreground,D.push("xterm-bg-257")):be=d.background}switch(ie||N.isDim()&&(ie=Ct.multiplyOpacity(be,.5)),ae){case 16777216:case 33554432:N.isBold()&&he<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(he+=8),this._applyMinimumContrast(y,be,d.ansi[he],N,ie,void 0)||D.push(`xterm-fg-${he}`);break;case 50331648:let oe=tr.toColor(he>>16&255,he>>8&255,he&255);this._applyMinimumContrast(y,be,oe,N,ie,Pe)||this._addStyle(y,`color:#${O5(he.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(y,be,d.foreground,N,ie,Pe)||te&&D.push("xterm-fg-257")}D.length&&(y.className=D.join(" "),D.length=0),!ee&&!P&&!fe&&M?b++:y.textContent=m,A!==this.defaultSpacing&&(y.style.letterSpacing=`${A}px`),p.push(y),R=L}return y&&b&&(y.textContent=m),p}_applyMinimumContrast(e,t,r,o,i,n){if(this._optionsService.rawOptions.minimumContrastRatio===1||nX(o.getCode()))return!1;let s=this._getContrastCache(o),a;if(!i&&!n&&(a=s.getColor(t.rgba,r.rgba)),a===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(o.isDim()?2:1);a=Ct.ensureContrastRatio(i||t,n||r,l),s.setColor((i||t).rgba,(n||r).rgba,a??null)}return a?(this._addStyle(e,`color:${a.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,o=this._selectionEnd;return!r||!o?!1:this._columnSelectMode?r[0]<=o[0]?e>=r[0]&&t>=r[1]&&e<o[0]&&t<=o[1]:e<r[0]&&t>=r[1]&&e>=o[0]&&t<=o[1]:t>r[1]&&t<o[1]||r[1]===o[1]&&t===r[1]&&e>=r[0]&&e<o[0]||r[1]<o[1]&&t===o[1]&&e<o[0]||r[1]<o[1]&&t===r[1]&&e>=r[0]}};nC=Ut([J(1,h3),J(2,oo),J(3,fs),J(4,Gl),J(5,Bh),J(6,Ep)],nC);function O5(e,t,r){for(;e.length<r;)e=t+e;return e}var aX=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.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";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold",n.style.fontStyle="italic",this._measureElements=[r,o,i,n],this._container.appendChild(r),this._container.appendChild(o),this._container.appendChild(i),this._container.appendChild(n),t.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(e,t,r,o){e===this._font&&t===this._fontSize&&r===this._weight&&o===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=o,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${o}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${o}`,this.clear())}get(e,t,r){let o=0;if(!t&&!r&&e.length===1&&(o=e.charCodeAt(0))<256){if(this._flat[o]!==-9999)return this._flat[o];let s=this._measure(e,0);return s>0&&(this._flat[o]=s),s}let i=e;t&&(i+="B"),r&&(i+="I");let n=this._holey.get(i);if(n===void 0){let s=0;t&&(s|=1),r&&(s|=2),n=this._measure(e,s),n>0&&this._holey.set(i,n)}return n}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},lX=class{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(e,t,r,o=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let i=e.buffers.active.ydisp,n=t[1]-i,s=r[1]-i,a=Math.max(n,0),l=Math.min(s,e.rows-1);if(a>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=o,this.viewportStartRow=n,this.viewportEndRow=s,this.viewportCappedStartRow=a,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function cX(){return new lX}var E1="xterm-dom-renderer-owner-",yi="xterm-rows",db="xterm-fg-",D5="xterm-bg-",yh="xterm-focus",fb="xterm-selection",uX=1,sC=class extends xe{constructor(e,t,r,o,i,n,s,a,l,c,u,p,f,d){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=o,this._viewportElement=i,this._helperContainer=n,this._linkifier2=s,this._charSizeService=l,this._optionsService=c,this._bufferService=u,this._coreService=p,this._coreBrowserService=f,this._themeService=d,this._terminalClass=uX++,this._rowElements=[],this._selectionRenderModel=cX(),this.onRequestRedraw=this._register(new G).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(yi),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(fb),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=sX(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(h=>this._injectCss(h))),this._injectCss(this._themeService.colors),this._rowFactory=a.createInstance(nC,document),this._element.classList.add(E1+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(h=>this._handleLinkHover(h))),this._register(this._linkifier2.onHideLinkUnderline(h=>this._handleLinkLeave(h))),this._register(wt(()=>{this._element.classList.remove(E1+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new aX(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(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),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/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),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(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${yi} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,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(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${yi} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${yi} .xterm-dim { color: ${Ct.multiplyOpacity(e.foreground,.5).css};}`,t+=`${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;}`;let r=`blink_underline_${this._terminalClass}`,o=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${o} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${yi}.${yh} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${yi}.${yh} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${o} 1s step-end infinite;}${this._terminalSelector} .${yi}.${yh} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${yi} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${yi} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${yi} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${yi} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${yi} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${fb} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${fb} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${fb} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,s]of e.ansi.entries())t+=`${this._terminalSelector} .${db}${n} { color: ${s.css}; }${this._terminalSelector} .${db}${n}.xterm-dim { color: ${Ct.multiplyOpacity(s,.5).css}; }${this._terminalSelector} .${D5}${n} { background-color: ${s.css}; }`;t+=`${this._terminalSelector} .${db}257 { color: ${Ct.opaque(e.background).css}; }${this._terminalSelector} .${db}257.xterm-dim { color: ${Ct.multiplyOpacity(Ct.opaque(e.background),.5).css}; }${this._terminalSelector} .${D5}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let o=this._document.createElement("div");this._rowContainer.appendChild(o),this._rowElements.push(o)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),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(yh),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(yh),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let o=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,n=this._selectionRenderModel.viewportCappedStartRow,s=this._selectionRenderModel.viewportCappedEndRow,a=this._document.createDocumentFragment();if(r){let l=e[0]>t[0];a.appendChild(this._createSelectionElement(n,l?t[0]:e[0],l?e[0]:t[0],s-n+1))}else{let l=o===n?e[0]:0,c=n===i?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(n,l,c));let u=s-n-1;if(a.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,u)),n!==s){let p=i===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(s,0,p))}}this._selectionContainer.appendChild(a)}_createSelectionElement(e,t,r,o=1){let i=this._document.createElement("div"),n=t*this.dimensions.css.cell.width,s=this.dimensions.css.cell.width*(r-t);return n+s>this.dimensions.css.canvas.width&&(s=this.dimensions.css.canvas.width-n),i.style.height=`${o*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${n}px`,i.style.width=`${s}px`,i}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(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,o=r.ybase+r.y,i=Math.min(r.x,this._bufferService.cols-1),n=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,s=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,a=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+r.ydisp,u=this._rowElements[l],p=r.lines.get(c);if(!u||!p)break;u.replaceChildren(...this._rowFactory.createRow(p,c,c===o,s,a,i,n,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E1}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,o,i,n){r<0&&(e=0),o<0&&(t=0);let s=this._bufferService.rows-1;r=Math.max(Math.min(r,s),0),o=Math.max(Math.min(o,s),0),i=Math.min(i,this._bufferService.cols);let a=this._bufferService.buffer,l=a.ybase+a.y,c=Math.min(a.x,i-1),u=this._optionsService.rawOptions.cursorBlink,p=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let d=r;d<=o;++d){let h=d+a.ydisp,y=this._rowElements[d],b=a.lines.get(h);if(!y||!b)break;y.replaceChildren(...this._rowFactory.createRow(b,h,h===l,p,f,c,u,this.dimensions.css.cell.width,this._widthCache,n?d===r?e:0:-1,n?(d===o?t:i)-1:-1))}}};sC=Ut([J(7,_C),J(8,Nb),J(9,oo),J(10,ro),J(11,Gl),J(12,fs),J(13,Ep)],sC);var aC=class extends xe{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new G),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new dX(this._optionsService))}catch{this._measureStrategy=this._register(new pX(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};aC=Ut([J(2,oo)],aC);var $3=class extends xe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},pX=class extends $3{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},dX=class extends $3{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},fX=class extends xe{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new hX(this._window)),this._onDprChange=this._register(new G),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new G),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(o=>this._screenDprMonitor.setWindow(o))),this._register(Lr.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(ge(this._textarea,"focus",()=>this._isFocused=!0)),this._register(ge(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,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}},hX=class extends xe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Pp),this._onDprChange=this._register(new G),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(wt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=ge(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)}},mX=class extends xe{constructor(){super(),this.linkProviders=[],this._register(wt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function EC(e,t,r){let o=r.getBoundingClientRect(),i=e.getComputedStyle(r),n=parseInt(i.getPropertyValue("padding-left")),s=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-o.left-n,t.clientY-o.top-s]}function yX(e,t,r,o,i,n,s,a,l){if(!n)return;let c=EC(e,t,r);if(c)return c[0]=Math.ceil((c[0]+(l?s/2:0))/s),c[1]=Math.ceil(c[1]/a),c[0]=Math.min(Math.max(c[0],1),o+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),i),c}var lC=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,o,i){return yX(window,e,t,r,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let r=EC(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};lC=Ut([J(0,hs),J(1,Nb)],lC);var gX=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!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){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},j3={};eG(j3,{getSafariVersion:()=>bX,isChromeOS:()=>K3,isFirefox:()=>W3,isIpad:()=>_X,isIphone:()=>SX,isLegacyEdge:()=>vX,isLinux:()=>kC,isMac:()=>Db,isNode:()=>zb,isSafari:()=>V3,isWindows:()=>q3});var zb=typeof process<"u"&&"title"in process,Nh=zb?"node":navigator.userAgent,Lh=zb?"node":navigator.platform,W3=Nh.includes("Firefox"),vX=Nh.includes("Edge"),V3=/^((?!chrome|android).)*safari/i.test(Nh);function bX(){if(!V3)return 0;let e=Nh.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Db=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Lh),_X=Lh==="iPad",SX=Lh==="iPhone",q3=["Windows","Win16","Win32","WinCE"].includes(Lh),kC=Lh.indexOf("Linux")>=0,K3=/\bCrOS\b/.test(Nh),G3=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),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(e){this._idleCallback=void 0;let t=0,r=0,o=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),i=e.timeRemaining(),r*1.5>i){o-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-t))}ms`),this._start();return}o=i}this.clear()}},xX=class extends G3{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},TX=class extends G3{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Mb=!zb&&"requestIdleCallback"in window?TX:xX,CX=class{constructor(){this._queue=new Mb}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},cC=class extends xe{constructor(e,t,r,o,i,n,s,a,l){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=o,this._coreService=i,this._coreBrowserService=a,this._renderer=this._register(new Pp),this._pausedResizeTask=new CX,this._observerDisposable=this._register(new Pp),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 G),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new G),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new G),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new G),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new gX((c,u)=>this._renderRows(c,u),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new wX(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(wt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(s.onResize(()=>this._fullRefresh())),this._register(s.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(n.onDecorationRegistered(()=>this._fullRefresh())),this._register(n.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(s.cols,s.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(s.buffer.y,s.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(o=>this._handleIntersectionChange(o[o.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=wt(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.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(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let o=this._syncOutputHandler.flush();o&&(e=Math.min(e,o.start),t=Math.max(t,o.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,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(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_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(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.value?.handleSelectionChanged(e,t,r)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};cC=Ut([J(2,oo),J(3,Nb),J(4,Gl),J(5,Bh),J(6,ro),J(7,fs),J(8,Ep)],cC);var wX=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function RX(e,t,r,o){let i=r.buffer.x,n=r.buffer.y;if(!r.buffer.hasScrollback)return kX(i,n,e,t,r,o)+Fb(n,t,r,o)+OX(i,n,e,t,r,o);let s;if(n===t)return s=i>e?"D":"C",Dh(Math.abs(i-e),Oh(s,o));s=n>t?"D":"C";let a=Math.abs(n-t),l=EX(n>t?e:i,r)+(a-1)*r.cols+1+PX(n>t?i:e,r);return Dh(l,Oh(s,o))}function PX(e,t){return e-1}function EX(e,t){return t.cols-e}function kX(e,t,r,o,i,n){return Fb(t,o,i,n).length===0?"":Dh(X3(e,t,e,t-Kl(t,i),!1,i).length,Oh("D",n))}function Fb(e,t,r,o){let i=e-Kl(e,r),n=t-Kl(t,r),s=Math.abs(i-n)-DX(e,t,r);return Dh(s,Oh(Y3(e,t),o))}function OX(e,t,r,o,i,n){let s;Fb(t,o,i,n).length>0?s=o-Kl(o,i):s=t;let a=o,l=MX(e,t,r,o,i,n);return Dh(X3(e,s,r,a,l==="C",i).length,Oh(l,n))}function DX(e,t,r){let o=0,i=e-Kl(e,r),n=t-Kl(t,r);for(let s=0;s<Math.abs(i-n);s++){let a=Y3(e,t)==="A"?-1:1;r.buffer.lines.get(i+a*s)?.isWrapped&&o++}return o}function Kl(e,t){let r=0,o=t.buffer.lines.get(e),i=o?.isWrapped;for(;i&&e>=0&&e<t.rows;)r++,o=t.buffer.lines.get(--e),i=o?.isWrapped;return r}function MX(e,t,r,o,i,n){let s;return Fb(r,o,i,n).length>0?s=o-Kl(o,i):s=t,e<r&&s<=o||e>=r&&s<o?"C":"D"}function Y3(e,t){return e>t?"A":"B"}function X3(e,t,r,o,i,n){let s=e,a=t,l="";for(;(s!==r||a!==o)&&a>=0&&a<n.buffer.lines.length;)s+=i?1:-1,i&&s>n.cols-1?(l+=n.buffer.translateBufferLineToString(a,!1,e,s),s=0,e=0,a++):!i&&s<0&&(l+=n.buffer.translateBufferLineToString(a,!1,0,e+1),s=n.cols-1,e=s,a--);return l+n.buffer.translateBufferLineToString(a,!1,e,s)}function Oh(e,t){let r=t?"O":"[";return $.ESC+r+e}function Dh(e,t){e=Math.floor(e);let r="";for(let o=0;o<e;o++)r+=t;return r}var AX=class{constructor(e){this._bufferService=e,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.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()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function M5(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var k1=50,BX=15,NX=50,LX=500,IX="\xA0",zX=new RegExp(IX,"g"),uC=class extends xe{constructor(e,t,r,o,i,n,s,a,l){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=o,this._coreService=i,this._mouseService=n,this._optionsService=s,this._renderService=a,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new bi,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new G),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new G),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new G),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new G),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new AX(this._bufferService),this._activeSelectionMode=0,this._register(wt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}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(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,o=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let i=e[0]<t[0]?e[0]:t[0],n=e[0]<t[0]?t[0]:e[0];for(let s=e[1];s<=t[1];s++){let a=r.translateBufferLineToString(s,!0,i,n);o.push(a)}}else{let i=e[1]===t[1]?t[0]:void 0;o.push(r.translateBufferLineToString(e[1],!0,e[0],i));for(let n=e[1]+1;n<=t[1]-1;n++){let s=r.lines.get(n),a=r.translateBufferLineToString(n,!0);s?.isWrapped?o[o.length-1]+=a:o.push(a)}if(e[1]!==t[1]){let n=r.lines.get(t[1]),s=r.translateBufferLineToString(t[1],!0,0,t[0]);n&&n.isWrapped?o[o.length-1]+=s:o.push(s)}}return o.map(i=>i.replace(zX," ")).join(q3?`\r
40
234
  `:`
41
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),gf&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!i||!s||!t?!1:this._areCoordsInSelection(t,i,s)}isCellInSelection(e,t){let i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!i||!s?!1:this._areCoordsInSelection([e,t],i,s)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let i=this._linkifier.currentLink?.link?.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=H0(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let s=this._getMouseBufferCoords(e);return s?(this._selectWordAt(s,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=_f(this._coreBrowserService.window,e,this._screenElement)[1],i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-_d),_d),t/=_d,t/Math.abs(t)+Math.round(t*(LE-1)))}shouldForceSelection(e){return nh?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),NE)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(nh&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){let s=i.lines.get(this._model.selectionEnd[1]);s&&s.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[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});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<HE&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let i=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(i&&i[0]!==void 0&&i[1]!==void 0){let s=RE(i[0]-1,i[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(s,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!i){this._oldHasSelection&&this._fireOnSelectionChange(e,t,i);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let s=0;t>=s;s++){let r=e.loadCell(s,this._workCell).getChars().length;this._workCell.getWidth()===0?i--:r>1&&t!==s&&(i+=r-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,s=!0){if(e[0]>=this._bufferService.cols)return;let r=this._bufferService.buffer,n=r.lines.get(e[1]);if(!n)return;let l=r.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(n,e[0]),o=a,h=e[0]-a,u=0,c=0,d=0,f=0;if(l.charAt(a)===" "){for(;a>0&&l.charAt(a-1)===" ";)a--;for(;o<l.length&&l.charAt(o+1)===" ";)o++}else{let C=e[0],_=e[0];n.getWidth(C)===0&&(u++,C--),n.getWidth(_)===2&&(c++,_++);let g=n.getString(_).length;for(g>1&&(f+=g-1,o+=g-1);C>0&&a>0&&!this._isCharWordSeparator(n.loadCell(C-1,this._workCell));){n.loadCell(C-1,this._workCell);let v=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,C--):v>1&&(d+=v-1,a-=v-1),a--,C--}for(;_<n.length&&o+1<l.length&&!this._isCharWordSeparator(n.loadCell(_+1,this._workCell));){n.loadCell(_+1,this._workCell);let v=this._workCell.getChars().length;this._workCell.getWidth()===2?(c++,_++):v>1&&(f+=v-1,o+=v-1),o++,_++}}o++;let p=a+h-u+d,m=Math.min(this._bufferService.cols,o-a+u+c-d-f);if(!(!t&&l.slice(a,o).trim()==="")){if(i&&p===0&&n.getCodePoint(0)!==32){let C=r.lines.get(e[1]-1);if(C&&n.isWrapped&&C.getCodePoint(this._bufferService.cols-1)!==32){let _=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(_){let g=this._bufferService.cols-_.start;p-=g,m+=g}}}if(s&&p+m===this._bufferService.cols&&n.getCodePoint(this._bufferService.cols-1)!==32){let C=r.lines.get(e[1]+1);if(C?.isWrapped&&C.getCodePoint(0)!==32){let _=this._getWordAt([0,e[1]+1],!1,!1,!0);_&&(m+=_.length)}}return{start:p,length:m}}}_selectWordAt(e,t){let i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=H0(i,this._bufferService.cols)}};Id=be([B(3,lt),B(4,lr),B(5,af),B(6,at),B(7,Ki),B(8,qi)],Id);var U0=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},q0=class{constructor(){this._color=new U0,this._css=new U0}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Oe=Object.freeze((()=>{let e=[ve.toColor("#2e3436"),ve.toColor("#cc0000"),ve.toColor("#4e9a06"),ve.toColor("#c4a000"),ve.toColor("#3465a4"),ve.toColor("#75507b"),ve.toColor("#06989a"),ve.toColor("#d3d7cf"),ve.toColor("#555753"),ve.toColor("#ef2929"),ve.toColor("#8ae234"),ve.toColor("#fce94f"),ve.toColor("#729fcf"),ve.toColor("#ad7fa8"),ve.toColor("#34e2e2"),ve.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){let s=t[i/36%6|0],r=t[i/6%6|0],n=t[i%6];e.push({css:Ae.toCss(s,r,n),rgba:Ae.toRgba(s,r,n)})}for(let i=0;i<24;i++){let s=8+i*10;e.push({css:Ae.toCss(s,s,s),rgba:Ae.toRgba(s,s,s)})}return e})()),er=ve.toColor("#ffffff"),zl=ve.toColor("#000000"),K0=ve.toColor("#ffffff"),Y0=zl,Ml={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},KE=er,Zd=class extends W{constructor(e){super(),this._optionsService=e,this._contrastCache=new q0,this._halfContrastCache=new q0,this._onChangeColors=this._register(new E),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:er,background:zl,cursor:K0,cursorAccent:Y0,selectionForeground:void 0,selectionBackgroundTransparent:Ml,selectionBackgroundOpaque:ue.blend(zl,Ml),selectionInactiveBackgroundTransparent:Ml,selectionInactiveBackgroundOpaque:ue.blend(zl,Ml),scrollbarSliderBackground:ue.opacity(er,.2),scrollbarSliderHoverBackground:ue.opacity(er,.4),scrollbarSliderActiveBackground:ue.opacity(er,.5),overviewRulerBorder:er,ansi:Oe.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)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=re(e.foreground,er),t.background=re(e.background,zl),t.cursor=ue.blend(t.background,re(e.cursor,K0)),t.cursorAccent=ue.blend(t.background,re(e.cursorAccent,Y0)),t.selectionBackgroundTransparent=re(e.selectionBackground,Ml),t.selectionBackgroundOpaque=ue.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=re(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=ue.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?re(e.selectionForeground,z0):void 0,t.selectionForeground===z0&&(t.selectionForeground=void 0),ue.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=ue.opacity(t.selectionBackgroundTransparent,.3)),ue.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=ue.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=re(e.scrollbarSliderBackground,ue.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=re(e.scrollbarSliderHoverBackground,ue.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=re(e.scrollbarSliderActiveBackground,ue.opacity(t.foreground,.5)),t.overviewRulerBorder=re(e.overviewRulerBorder,KE),t.ansi=Oe.slice(),t.ansi[0]=re(e.black,Oe[0]),t.ansi[1]=re(e.red,Oe[1]),t.ansi[2]=re(e.green,Oe[2]),t.ansi[3]=re(e.yellow,Oe[3]),t.ansi[4]=re(e.blue,Oe[4]),t.ansi[5]=re(e.magenta,Oe[5]),t.ansi[6]=re(e.cyan,Oe[6]),t.ansi[7]=re(e.white,Oe[7]),t.ansi[8]=re(e.brightBlack,Oe[8]),t.ansi[9]=re(e.brightRed,Oe[9]),t.ansi[10]=re(e.brightGreen,Oe[10]),t.ansi[11]=re(e.brightYellow,Oe[11]),t.ansi[12]=re(e.brightBlue,Oe[12]),t.ansi[13]=re(e.brightMagenta,Oe[13]),t.ansi[14]=re(e.brightCyan,Oe[14]),t.ansi[15]=re(e.brightWhite,Oe[15]),e.extendedAnsi){let i=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let s=0;s<i;s++)t.ansi[s+16]=re(e.extendedAnsi[s],Oe[s+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){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[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(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()}}};Zd=be([B(0,at)],Zd);function re(e,t){if(e!==void 0)try{return ve.toColor(e)}catch{}return t}var YE=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(let[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},WE=class{constructor(){this._services=new YE,this._services.set(lf,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let i=ow(e).sort((n,l)=>n.index-l.index),s=[];for(let n of i){let l=this._services.get(n.id);if(!l)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${n.id._id}.`);s.push(l)}let r=i.length>0?i[0].index:t.length;if(t.length!==r)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);return new e(...t,...s)}},PE={trace:0,debug:1,info:2,warn:3,error:4,off:5},VE="xterm.js: ",Qd=class extends W{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),FE=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=PE[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":VE)+t,...i)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Qd=be([B(0,at)],Qd);var FE,W0=class extends W{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new E),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new E),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new E),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,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(e,t,...i){if(t){for(let s=e;s<this._length-t;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let s=this._length-1;s>=e;s--)this._array[this._getCyclicIndex(s+i.length)]=this._array[this._getCyclicIndex(s)];for(let s=0;s<i.length;s++)this._array[this._getCyclicIndex(e+s)]=i[s];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){let s=this._length+i.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let r=t-1;r>=0;r--)this.set(e+r+i,this.get(e+r));let s=e+t+i-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<t;s++)this.set(e+s+i,this.get(e+s))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},P=3,Te=Object.freeze(new Vl),Wo=0,gd=2,Ll=class i1{constructor(t,i,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*P);let r=i||Ft.fromCharData([0,dS,1,0]);for(let n=0;n<t;++n)this.setCell(n,r);this.length=t}get(t){let i=this._data[t*P+0],s=i&2097151;return[this._data[t*P+1],i&2097152?this._combined[t]:s?Es(s):"",i>>22,i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):s]}set(t,i){this._data[t*P+1]=i[0],i[1].length>1?(this._combined[t]=i[1],this._data[t*P+0]=t|2097152|i[2]<<22):this._data[t*P+0]=i[1].charCodeAt(0)|i[2]<<22}getWidth(t){return this._data[t*P+0]>>22}hasWidth(t){return this._data[t*P+0]&12582912}getFg(t){return this._data[t*P+1]}getBg(t){return this._data[t*P+2]}hasContent(t){return this._data[t*P+0]&4194303}getCodePoint(t){let i=this._data[t*P+0];return i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):i&2097151}isCombined(t){return this._data[t*P+0]&2097152}getString(t){let i=this._data[t*P+0];return i&2097152?this._combined[t]:i&2097151?Es(i&2097151):""}isProtected(t){return this._data[t*P+2]&536870912}loadCell(t,i){return Wo=t*P,i.content=this._data[Wo+0],i.fg=this._data[Wo+1],i.bg=this._data[Wo+2],i.content&2097152&&(i.combinedData=this._combined[t]),i.bg&268435456&&(i.extended=this._extendedAttrs[t]),i}setCell(t,i){i.content&2097152&&(this._combined[t]=i.combinedData),i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*P+0]=i.content,this._data[t*P+1]=i.fg,this._data[t*P+2]=i.bg}setCellFromCodepoint(t,i,s,r){r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*P+0]=i|s<<22,this._data[t*P+1]=r.fg,this._data[t*P+2]=r.bg}addCodepointToCell(t,i,s){let r=this._data[t*P+0];r&2097152?this._combined[t]+=Es(i):r&2097151?(this._combined[t]=Es(r&2097151)+Es(i),r&=-2097152,r|=2097152):r=i|1<<22,s&&(r&=-12582913,r|=s<<22),this._data[t*P+0]=r}insertCells(t,i,s){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),i<this.length-t){let r=new Ft;for(let n=this.length-t-i-1;n>=0;--n)this.setCell(t+i+n,this.loadCell(t+n,r));for(let n=0;n<i;++n)this.setCell(t+n,s)}else for(let r=t;r<this.length;++r)this.setCell(r,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(t,i,s){if(t%=this.length,i<this.length-t){let r=new Ft;for(let n=0;n<this.length-t-i;++n)this.setCell(t+n,this.loadCell(t+i+n,r));for(let n=this.length-i;n<this.length;++n)this.setCell(n,s)}else for(let r=t;r<this.length;++r)this.setCell(r,s);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,s)}replaceCells(t,i,s,r=!1){if(r){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,s),i<this.length&&this.getWidth(i-1)===2&&!this.isProtected(i)&&this.setCellFromCodepoint(i,0,1,s);t<i&&t<this.length;)this.isProtected(t)||this.setCell(t,s),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,s),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodepoint(i,0,1,s);t<i&&t<this.length;)this.setCell(t++,s)}resize(t,i){if(t===this.length)return this._data.length*4*gd<this._data.buffer.byteLength;let s=t*P;if(t>this.length){if(this._data.buffer.byteLength>=s*4)this._data=new Uint32Array(this._data.buffer,0,s);else{let r=new Uint32Array(s);r.set(this._data),this._data=r}for(let r=this.length;r<t;++r)this.setCell(r,i)}else{this._data=this._data.subarray(0,s);let r=Object.keys(this._combined);for(let l=0;l<r.length;l++){let a=parseInt(r[l],10);a>=t&&delete this._combined[a]}let n=Object.keys(this._extendedAttrs);for(let l=0;l<n.length;l++){let a=parseInt(n[l],10);a>=t&&delete this._extendedAttrs[a]}}return this.length=t,s*4*gd<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*gd<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,i=!1){if(i){for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,t);return}this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let i in t._combined)this._combined[i]=t._combined[i];this._extendedAttrs={};for(let i in t._extendedAttrs)this._extendedAttrs[i]=t._extendedAttrs[i];this.isWrapped=t.isWrapped}clone(){let t=new i1(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let i in this._combined)t._combined[i]=this._combined[i];for(let i in this._extendedAttrs)t._extendedAttrs[i]=this._extendedAttrs[i];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*P+0]&4194303)return t+(this._data[t*P+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*P+0]&4194303||this._data[t*P+2]&50331648)return t+(this._data[t*P+0]>>22);return 0}copyCellsFrom(t,i,s,r,n){let l=t._data;if(n)for(let o=r-1;o>=0;o--){for(let h=0;h<P;h++)this._data[(s+o)*P+h]=l[(i+o)*P+h];l[(i+o)*P+2]&268435456&&(this._extendedAttrs[s+o]=t._extendedAttrs[i+o])}else for(let o=0;o<r;o++){for(let h=0;h<P;h++)this._data[(s+o)*P+h]=l[(i+o)*P+h];l[(i+o)*P+2]&268435456&&(this._extendedAttrs[s+o]=t._extendedAttrs[i+o])}let a=Object.keys(t._combined);for(let o=0;o<a.length;o++){let h=parseInt(a[o],10);h>=i&&(this._combined[h-i+s]=t._combined[h])}}translateToString(t,i,s,r){i=i??0,s=s??this.length,t&&(s=Math.min(s,this.getTrimmedLength())),r&&(r.length=0);let n="";for(;i<s;){let l=this._data[i*P+0],a=l&2097151,o=l&2097152?this._combined[i]:a?Es(a):xs;if(n+=o,r)for(let h=0;h<o.length;++h)r.push(i);i+=l>>22||1}return r&&r.push(i),n}};function XE(e,t,i,s,r,n){let l=[];for(let a=0;a<e.length-1;a++){let o=a,h=e.get(++o);if(!h.isWrapped)continue;let u=[e.get(a)];for(;o<e.length&&h.isWrapped;)u.push(h),h=e.get(++o);if(!n&&s>=a&&s<o){a+=u.length-1;continue}let c=0,d=Pl(u,c,t),f=1,p=0;for(;f<u.length;){let C=Pl(u,f,t),_=C-p,g=i-d,v=Math.min(_,g);u[c].copyCellsFrom(u[f],p,d,v,!1),d+=v,d===i&&(c++,d=0),p+=v,p===C&&(f++,p=0),d===0&&c!==0&&u[c-1].getWidth(i-1)===2&&(u[c].copyCellsFrom(u[c-1],i-1,d++,1,!1),u[c-1].setCell(i-1,r))}u[c].replaceCells(d,i,r);let m=0;for(let C=u.length-1;C>0&&(C>c||u[C].getTrimmedLength()===0);C--)m++;m>0&&(l.push(a+u.length-m),l.push(m)),a+=u.length-1}return l}function GE(e,t){let i=[],s=0,r=t[s],n=0;for(let l=0;l<e.length;l++)if(r===l){let a=t[++s];e.onDeleteEmitter.fire({index:l-n,amount:a}),l+=a-1,n+=a,r=t[++s]}else i.push(l);return{layout:i,countRemoved:n}}function jE(e,t){let i=[];for(let s=0;s<t.length;s++)i.push(e.get(t[s]));for(let s=0;s<i.length;s++)e.set(s,i[s]);e.length=t.length}function IE(e,t,i){let s=[],r=e.map((o,h)=>Pl(e,h,t)).reduce((o,h)=>o+h),n=0,l=0,a=0;for(;a<r;){if(r-a<i){s.push(r-a);break}n+=i;let o=Pl(e,l,t);n>o&&(n-=o,l++);let h=e[l].getWidth(n-1)===2;h&&n--;let u=h?i-1:i;s.push(u),a+=u}return s}function Pl(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();let s=!e[t].hasContent(i-1)&&e[t].getWidth(i-1)===1,r=e[t+1].getWidth(0)===2;return s&&r?i-1:i}var s1=class r1{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=r1._nextId++,this._onDispose=this.register(new E),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),rr(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};s1._nextId=1;var ZE=s1,Le={},tr=Le.B;Le[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"};Le.A={"#":"\xA3"};Le.B=void 0;Le[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"};Le.C=Le[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};Le.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"};Le.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"};Le.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"};Le.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"};Le.E=Le[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"};Le.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"};Le.H=Le[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};Le["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"};var P0=4294967295,V0=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Te.clone(),this.savedCharset=tr,this.markers=[],this._nullCell=Ft.fromCharData([0,dS,1,0]),this._whitespaceCell=Ft.fromCharData([0,xs,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new lh,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new W0(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Jo),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Jo),this._whitespaceCell}getBlankLine(e,t){return new Ll(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>P0?P0:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Te);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new W0(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let i=this.getNullCell(Te),s=0,r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),this.lines.length>0){if(this._cols<e)for(let l=0;l<this.lines.length;l++)s+=+this.lines.get(l).resize(e,i);let n=0;if(this._rows<t)for(let l=this._rows;l<t;l++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Ll(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+n+1?(this.ybase--,n++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ll(e,i)));else for(let l=this._rows;l>t;l--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(r<this.lines.maxLength){let l=this.lines.length-r;l>0&&(this.lines.trimStart(l),this.ybase=Math.max(this.ybase-l,0),this.ydisp=Math.max(this.ydisp-l,0),this.savedY=Math.max(this.savedY-l,0)),this.lines.maxLength=r}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),n&&(this.y+=n),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let n=0;n<this.lines.length;n++)s+=+this.lines.get(n).resize(e,i);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),s>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,s=XE(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Te),i);if(s.length>0){let r=GE(this.lines,s);jE(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){let s=this.getNullCell(Te),r=i;for(;r-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Ll(e,s))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,s=this.getNullCell(Te),r=[],n=0;for(let l=this.lines.length-1;l>=0;l--){let a=this.lines.get(l);if(!a||!a.isWrapped&&a.getTrimmedLength()<=e)continue;let o=[a];for(;a.isWrapped&&l>0;)a=this.lines.get(--l),o.unshift(a);if(!i){let v=this.ybase+this.y;if(v>=l&&v<l+o.length)continue}let h=o[o.length-1].getTrimmedLength(),u=IE(o,this._cols,e),c=u.length-o.length,d;this.ybase===0&&this.y!==this.lines.length-1?d=Math.max(0,this.y-this.lines.maxLength+c):d=Math.max(0,this.lines.length-this.lines.maxLength+c);let f=[];for(let v=0;v<c;v++){let S=this.getBlankLine(Te,!0);f.push(S)}f.length>0&&(r.push({start:l+o.length+n,newLines:f}),n+=f.length),o.push(...f);let p=u.length-1,m=u[p];m===0&&(p--,m=u[p]);let C=o.length-c-1,_=h;for(;C>=0;){let v=Math.min(_,m);if(o[p]===void 0)break;if(o[p].copyCellsFrom(o[C],_-v,m-v,v,!0),m-=v,m===0&&(p--,m=u[p]),_-=v,_===0){C--;let S=Math.max(C,0);_=Pl(o,S,this._cols)}}for(let v=0;v<o.length;v++)u[v]<e&&o[v].setCell(u[v],s);let g=c-d;for(;g-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+n)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+c,this.ybase+t-1)}if(r.length>0){let l=[],a=[];for(let m=0;m<this.lines.length;m++)a.push(this.lines.get(m));let o=this.lines.length,h=o-1,u=0,c=r[u];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+n);let d=0;for(let m=Math.min(this.lines.maxLength-1,o+n-1);m>=0;m--)if(c&&c.start>h+d){for(let C=c.newLines.length-1;C>=0;C--)this.lines.set(m--,c.newLines[C]);m++,l.push({index:h+1,amount:c.newLines.length}),d+=c.newLines.length,c=r[++u]}else this.lines.set(m,a[h--]);let f=0;for(let m=l.length-1;m>=0;m--)l[m].index+=f,this.lines.onInsertEmitter.fire(l[m]),f+=l[m].amount;let p=Math.max(0,o+n-this.lines.maxLength);p>0&&this.lines.onTrimEmitter.fire(p)}}translateBufferLineToString(e,t,i=0,s){let r=this.lines.get(e);return r?r.translateToString(t,i,s):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new ZE(e);return this.markers.push(t),t.register(this.lines.onTrim(i=>{t.line-=i,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(i=>{t.line>=i.index&&(t.line+=i.amount)})),t.register(this.lines.onDelete(i=>{t.line>=i.index&&t.line<i.index+i.amount&&t.dispose(),t.line>i.index&&(t.line-=i.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},QE=class extends W{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new E),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 V0(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new V0(!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(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},n1=2,l1=1,$d=class extends W{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new E),this.onResize=this._onResize.event,this._onScroll=this._register(new E),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,n1),this.rows=Math.max(e.rawOptions.rows||0,l1),this.buffers=this._register(new QE(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let i=this.cols!==e,s=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:i,rowsChanged:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let i=this.buffer,s;s=this._cachedBlankLine,(!s||s.length!==this.cols||s.getFg(0)!==e.fg||s.getBg(0)!==e.bg)&&(s=i.getBlankLine(e,t),this._cachedBlankLine=s),s.isWrapped=t;let r=i.ybase+i.scrollTop,n=i.ybase+i.scrollBottom;if(i.scrollTop===0){let l=i.lines.isFull;n===i.lines.length-1?l?i.lines.recycle().copyFrom(s):i.lines.push(s.clone()):i.lines.splice(n+1,0,s.clone()),l?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{let l=n-r+1;i.lines.shiftElements(r+1,l-1,-1),i.lines.set(n,s.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t){let i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);let s=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),s!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))}};$d=be([B(0,at)],$d);var on={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:nh,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},$E=["normal","bold","100","200","300","400","500","600","700","800","900"],JE=class extends W{constructor(e){super(),this._onOptionChange=this._register(new E),this.onOptionChange=this._onOptionChange.event;let t={...on};for(let i in e)if(i in t)try{let s=e[i];t[i]=this._sanitizeAndValidateOption(i,s)}catch(s){console.error(s)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(de(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(i=>{i===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(i=>{e.indexOf(i)!==-1&&t()})}_setupOptions(){let e=i=>{if(!(i in on))throw new Error(`No option with key "${i}"`);return this.rawOptions[i]},t=(i,s)=>{if(!(i in on))throw new Error(`No option with key "${i}"`);s=this._sanitizeAndValidateOption(i,s),this.rawOptions[i]!==s&&(this.rawOptions[i]=s,this._onOptionChange.fire(i))};for(let i in this.rawOptions){let s={get:e.bind(this,i),set:t.bind(this,i)};Object.defineProperty(this.options,i,s)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=on[e]),!ex(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=on[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=$E.includes(t)?t:on[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function ex(e){return e==="block"||e==="underline"||e==="bar"}function Nl(e,t=5){if(typeof e!="object")return e;let i=Array.isArray(e)?[]:{};for(let s in e)i[s]=t<=1?e[s]:e[s]&&Nl(e[s],t-1);return i}var F0=Object.freeze({insertMode:!1}),X0=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),Jd=class extends W{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new E),this.onData=this._onData.event,this._onUserInput=this._register(new E),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new E),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new E),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Nl(F0),this.decPrivateModes=Nl(X0)}reset(){this.modes=Nl(F0),this.decPrivateModes=Nl(X0)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(s=>s.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};Jd=be([B(0,lt),B(1,vS),B(2,at)],Jd);var G0={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function pd(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(i|=64,i|=e.action):(i|=e.button&3,e.button&4&&(i|=64),e.button&8&&(i|=128),e.action===32?i|=32:e.action===0&&!t&&(i|=3)),i}var vd=String.fromCharCode,j0={DEFAULT:e=>{let t=[pd(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${vd(t[0])}${vd(t[1])}${vd(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${pd(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${pd(e,!0)};${e.x};${e.y}${t}`}},ef=class extends W{constructor(e,t,i){super(),this._bufferService=e,this._coreService=t,this._optionsService=i,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new E),this.onProtocolChange=this._onProtocolChange.event;for(let s of Object.keys(G0))this.addProtocol(s,G0[s]);for(let s of Object.keys(j0))this.addEncoding(s,j0[s]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,i){if(e.deltaY===0||e.shiftKey||t===void 0||i===void 0)return 0;let s=t/i,r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=s+0,Math.abs(e.deltaY)<50&&(r*=.3),this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};ef=be([B(0,lt),B(1,lr),B(2,at)],ef);var md=[[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]],tx=[[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]],ze;function ix(e,t){let i=0,s=t.length-1,r;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=i;)if(r=i+s>>1,e>t[r][1])i=r+1;else if(e<t[r][0])s=r-1;else return!0;return!1}var sx=class{constructor(){if(this.version="6",!ze){ze=new Uint8Array(65536),ze.fill(1),ze[0]=0,ze.fill(0,1,32),ze.fill(0,127,160),ze.fill(2,4352,4448),ze[9001]=2,ze[9002]=2,ze.fill(2,11904,42192),ze[12351]=1,ze.fill(2,44032,55204),ze.fill(2,63744,64256),ze.fill(2,65040,65050),ze.fill(2,65072,65136),ze.fill(2,65280,65377),ze.fill(2,65504,65511);for(let e=0;e<md.length;++e)ze.fill(0,md[e][0],md[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?ze[e]:ix(e,tx)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),s=i===0&&t!==0;if(s){let r=ir.extractWidth(t);r===0?s=!1:r>i&&(i=r)}return ir.createPropertyValue(0,i,s)}},ir=class $o{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new E,this.onChange=this._onChange.event;let t=new sx;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,i,s=!1){return(t&16777215)<<3|(i&3)<<1|(s?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let i=0,s=0,r=t.length;for(let n=0;n<r;++n){let l=t.charCodeAt(n);if(55296<=l&&l<=56319){if(++n>=r)return i+this.wcwidth(l);let h=t.charCodeAt(n);56320<=h&&h<=57343?l=(l-55296)*1024+h-56320+65536:i+=this.wcwidth(h)}let a=this.charProperties(l,s),o=$o.extractWidth(a);$o.extractShouldJoin(a)&&(o-=$o.extractWidth(s)),i+=o,s=a}return i}charProperties(t,i){return this._activeProvider.charProperties(t,i)}},rx=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function I0(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&t&&(i.isWrapped=t[3]!==0&&t[3]!==32)}var Tl=2147483647,nx=256,a1=class tf{constructor(t=32,i=32){if(this.maxLength=t,this.maxSubParamsLength=i,i>nx)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(i),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let i=new tf;if(!t.length)return i;for(let s=Array.isArray(t[0])?1:0;s<t.length;++s){let r=t[s];if(Array.isArray(r))for(let n=0;n<r.length;++n)i.addSubParam(r[n]);else i.addParam(r)}return i}clone(){let t=new tf(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let i=0;i<this.length;++i){t.push(this.params[i]);let s=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-s>0&&t.push(Array.prototype.slice.call(this._subParams,s,r))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Tl?Tl:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Tl?Tl:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let i=this._subParamsIdx[t]>>8,s=this._subParamsIdx[t]&255;return s-i>0?this._subParams.subarray(i,s):null}getSubParamsAll(){let t={};for(let i=0;i<this.length;++i){let s=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-s>0&&(t[i]=this._subParams.slice(s,r))}return t}addDigit(t){let i;if(this._rejectDigits||!(i=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let s=this._digitIsSub?this._subParams:this.params,r=s[i-1];s[i-1]=~r?Math.min(r*10+t,Tl):t}},Al=[],lx=class{constructor(){this._state=0,this._active=Al,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let s=i.indexOf(t);s!==-1&&i.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Al}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Al,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Al,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,i){if(!this._active.length)this._handlerFb(this._id,"PUT",oh(e,t,i));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i)}start(){this.reset(),this._state=1}put(e,t,i){if(this._state!==3){if(this._state===1)for(;t<i;){let s=e[t++];if(s===59){this._state=2,this._start();break}if(s<48||57<s){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+s-48}this._state===2&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;s>=0&&(i=this._active[s].end(e),i!==!0);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}this._active=Al,this._id=-1,this._state=0}}},Mt=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=oh(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(i=>(this._data="",this._hitLimit=!1,i));return this._data="",this._hitLimit=!1,t}},Bl=[],ax=class{constructor(){this._handlers=Object.create(null),this._active=Bl,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Bl}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let s=i.indexOf(t);s!==-1&&i.splice(s,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Bl,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Bl,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let i=this._active.length-1;i>=0;i--)this._active[i].hook(t)}put(e,t,i){if(!this._active.length)this._handlerFb(this._ident,"PUT",oh(e,t,i));else for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;s>=0&&(i=this._active[s].unhook(e),i!==!0);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}this._active=Bl,this._ident=0}},Hl=new a1;Hl.addParam(0);var Z0=class{constructor(e){this._handler=e,this._data="",this._params=Hl,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Hl,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=oh(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(i=>(this._params=Hl,this._data="",this._hitLimit=!1,i));return this._params=Hl,this._data="",this._hitLimit=!1,t}},ox=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,s){this.table[t<<8|e]=i<<4|s}addMany(e,t,i,s){for(let r=0;r<e.length;r++)this.table[t<<8|e[r]]=i<<4|s}},Vt=160,hx=(function(){let e=new ox(4095),t=Array.apply(null,Array(256)).map((a,o)=>o),i=(a,o)=>t.slice(a,o),s=i(32,127),r=i(0,24);r.push(25),r.push.apply(r,i(28,32));let n=i(0,14),l;e.setDefault(1,0),e.addMany(s,0,2,0);for(l in n)e.addMany([24,26,153,154],l,3,0),e.addMany(i(128,144),l,3,0),e.addMany(i(144,152),l,3,0),e.add(156,l,0,0),e.add(27,l,11,1),e.add(157,l,4,8),e.addMany([152,158,159],l,0,7),e.add(155,l,11,3),e.add(144,l,11,9);return e.addMany(r,0,3,0),e.addMany(r,1,3,1),e.add(127,1,0,1),e.addMany(r,8,0,8),e.addMany(r,3,3,3),e.add(127,3,0,3),e.addMany(r,4,3,4),e.add(127,4,0,4),e.addMany(r,6,3,6),e.addMany(r,5,3,5),e.add(127,5,0,5),e.addMany(r,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(r,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(r,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(r,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(r,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(r,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(r,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Vt,0,2,0),e.add(Vt,8,5,8),e.add(Vt,6,0,6),e.add(Vt,11,0,11),e.add(Vt,13,13,13),e})(),cx=class extends W{constructor(e=hx){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new a1,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,i,s)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(de(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new lx),this._dcsParser=this._register(new ax),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let r=0;r<e.intermediates.length;++r){let n=e.intermediates.charCodeAt(r);if(32>n||n>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=n}}if(e.final.length!==1)throw new Error("final must be a single byte");let s=e.final.charCodeAt(0);if(t[0]>s||s>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=s,i}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let i=this._identifier(e,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);let s=this._escHandlers[i];return s.push(t),{dispose:()=>{let r=s.indexOf(t);r!==-1&&s.splice(r,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let i=this._identifier(e);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);let s=this._csiHandlers[i];return s.push(t),{dispose:()=>{let r=s.indexOf(t);r!==-1&&s.splice(r,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}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(e,t,i,s,r){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=s,this._parseStack.chunkPos=r}parse(e,t,i){let s=0,r=0,n=0,l;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,n=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let a=this._parseStack.handlers,o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&o>-1){for(;o>=0&&(l=a[o](this._params),l!==!0);o--)if(l instanceof Promise)return this._parseStack.handlerPos=o,l}this._parseStack.handlers=[];break;case 4:if(i===!1&&o>-1){for(;o>=0&&(l=a[o](),l!==!0);o--)if(l instanceof Promise)return this._parseStack.handlerPos=o,l}this._parseStack.handlers=[];break;case 6:if(s=e[this._parseStack.chunkPos],l=this._dcsParser.unhook(s!==24&&s!==26,i),l)return l;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(s=e[this._parseStack.chunkPos],l=this._oscParser.end(s!==24&&s!==26,i),l)return l;s===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,n=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let a=n;a<t;++a){switch(s=e[a],r=this._transitions.table[this.currentState<<8|(s<160?s:Vt)],r>>4){case 2:for(let d=a+1;;++d){if(d>=t||(s=e[d])<32||s>126&&s<Vt){this._printHandler(e,a,d),a=d-1;break}if(++d>=t||(s=e[d])<32||s>126&&s<Vt){this._printHandler(e,a,d),a=d-1;break}if(++d>=t||(s=e[d])<32||s>126&&s<Vt){this._printHandler(e,a,d),a=d-1;break}if(++d>=t||(s=e[d])<32||s>126&&s<Vt){this._printHandler(e,a,d),a=d-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:a,code:s,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let o=this._csiHandlers[this._collect<<8|s],h=o?o.length-1:-1;for(;h>=0&&(l=o[h](this._params),l!==!0);h--)if(l instanceof Promise)return this._preserveStack(3,o,h,r,a),l;h<0&&this._csiHandlerFb(this._collect<<8|s,this._params),this.precedingJoinState=0;break;case 8:do switch(s){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(s-48)}while(++a<t&&(s=e[a])>47&&s<60);a--;break;case 9:this._collect<<=8,this._collect|=s;break;case 10:let u=this._escHandlers[this._collect<<8|s],c=u?u.length-1:-1;for(;c>=0&&(l=u[c](),l!==!0);c--)if(l instanceof Promise)return this._preserveStack(4,u,c,r,a),l;c<0&&this._escHandlerFb(this._collect<<8|s),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|s,this._params);break;case 13:for(let d=a+1;;++d)if(d>=t||(s=e[d])===24||s===26||s===27||s>127&&s<Vt){this._dcsParser.put(e,a,d),a=d-1;break}break;case 14:if(l=this._dcsParser.unhook(s!==24&&s!==26),l)return this._preserveStack(6,[],0,r,a),l;s===27&&(r|=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 d=a+1;;d++)if(d>=t||(s=e[d])<32||s>127&&s<Vt){this._oscParser.put(e,a,d),a=d-1;break}break;case 6:if(l=this._oscParser.end(s!==24&&s!==26),l)return this._preserveStack(5,[],0,r,a),l;s===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=r&15}}},ux=/^([\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})$/,dx=/^[\da-f]+$/;function Q0(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let i=ux.exec(t);if(i){let s=i[1]?15:i[4]?255:i[7]?4095:65535;return[Math.round(parseInt(i[1]||i[4]||i[7]||i[10],16)/s*255),Math.round(parseInt(i[2]||i[5]||i[8]||i[11],16)/s*255),Math.round(parseInt(i[3]||i[6]||i[9]||i[12],16)/s*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),dx.exec(t)&&[3,6,9,12].includes(t.length))){let i=t.length/3,s=[0,0,0];for(let r=0;r<3;++r){let n=parseInt(t.slice(i*r,i*r+i),16);s[r]=i===1?n<<4:i===2?n:i===3?n>>4:n>>8}return s}}function Sd(e,t){let i=e.toString(16),s=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}function fx(e,t=16){let[i,s,r]=e;return`rgb:${Sd(i,t)}/${Sd(s,t)}/${Sd(r,t)}`}var _x={"(":0,")":1,"*":2,"+":3,"-":1,".":2},ws=131072,$0=10;function J0(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var eS=5e3,tS=0,gx=class extends W{constructor(e,t,i,s,r,n,l,a,o=new cx){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=s,this._optionsService=r,this._oscLinkService=n,this._coreMouseService=l,this._unicodeService=a,this._parser=o,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new lw,this._utf8Decoder=new aw,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Te.clone(),this._eraseAttrDataInternal=Te.clone(),this._onRequestBell=this._register(new E),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new E),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new E),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new E),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new E),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new E),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new E),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new E),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new E),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new E),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new E),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new E),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new E),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 sf(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(h=>this._activeBuffer=h.activeBuffer)),this._parser.setCsiHandlerFallback((h,u)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(h),params:u.toArray()})}),this._parser.setEscHandlerFallback(h=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(h)})}),this._parser.setExecuteHandlerFallback(h=>{this._logService.debug("Unknown EXECUTE code: ",{code:h})}),this._parser.setOscHandlerFallback((h,u,c)=>{this._logService.debug("Unknown OSC code: ",{identifier:h,action:u,data:c})}),this._parser.setDcsHandlerFallback((h,u,c)=>{u==="HOOK"&&(c=c.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(h),action:u,payload:c})}),this._parser.setPrintHandler((h,u,c)=>this.print(h,u,c)),this._parser.registerCsiHandler({final:"@"},h=>this.insertChars(h)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},h=>this.scrollLeft(h)),this._parser.registerCsiHandler({final:"A"},h=>this.cursorUp(h)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},h=>this.scrollRight(h)),this._parser.registerCsiHandler({final:"B"},h=>this.cursorDown(h)),this._parser.registerCsiHandler({final:"C"},h=>this.cursorForward(h)),this._parser.registerCsiHandler({final:"D"},h=>this.cursorBackward(h)),this._parser.registerCsiHandler({final:"E"},h=>this.cursorNextLine(h)),this._parser.registerCsiHandler({final:"F"},h=>this.cursorPrecedingLine(h)),this._parser.registerCsiHandler({final:"G"},h=>this.cursorCharAbsolute(h)),this._parser.registerCsiHandler({final:"H"},h=>this.cursorPosition(h)),this._parser.registerCsiHandler({final:"I"},h=>this.cursorForwardTab(h)),this._parser.registerCsiHandler({final:"J"},h=>this.eraseInDisplay(h,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},h=>this.eraseInDisplay(h,!0)),this._parser.registerCsiHandler({final:"K"},h=>this.eraseInLine(h,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},h=>this.eraseInLine(h,!0)),this._parser.registerCsiHandler({final:"L"},h=>this.insertLines(h)),this._parser.registerCsiHandler({final:"M"},h=>this.deleteLines(h)),this._parser.registerCsiHandler({final:"P"},h=>this.deleteChars(h)),this._parser.registerCsiHandler({final:"S"},h=>this.scrollUp(h)),this._parser.registerCsiHandler({final:"T"},h=>this.scrollDown(h)),this._parser.registerCsiHandler({final:"X"},h=>this.eraseChars(h)),this._parser.registerCsiHandler({final:"Z"},h=>this.cursorBackwardTab(h)),this._parser.registerCsiHandler({final:"`"},h=>this.charPosAbsolute(h)),this._parser.registerCsiHandler({final:"a"},h=>this.hPositionRelative(h)),this._parser.registerCsiHandler({final:"b"},h=>this.repeatPrecedingCharacter(h)),this._parser.registerCsiHandler({final:"c"},h=>this.sendDeviceAttributesPrimary(h)),this._parser.registerCsiHandler({prefix:">",final:"c"},h=>this.sendDeviceAttributesSecondary(h)),this._parser.registerCsiHandler({final:"d"},h=>this.linePosAbsolute(h)),this._parser.registerCsiHandler({final:"e"},h=>this.vPositionRelative(h)),this._parser.registerCsiHandler({final:"f"},h=>this.hVPosition(h)),this._parser.registerCsiHandler({final:"g"},h=>this.tabClear(h)),this._parser.registerCsiHandler({final:"h"},h=>this.setMode(h)),this._parser.registerCsiHandler({prefix:"?",final:"h"},h=>this.setModePrivate(h)),this._parser.registerCsiHandler({final:"l"},h=>this.resetMode(h)),this._parser.registerCsiHandler({prefix:"?",final:"l"},h=>this.resetModePrivate(h)),this._parser.registerCsiHandler({final:"m"},h=>this.charAttributes(h)),this._parser.registerCsiHandler({final:"n"},h=>this.deviceStatus(h)),this._parser.registerCsiHandler({prefix:"?",final:"n"},h=>this.deviceStatusPrivate(h)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},h=>this.softReset(h)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},h=>this.setCursorStyle(h)),this._parser.registerCsiHandler({final:"r"},h=>this.setScrollRegion(h)),this._parser.registerCsiHandler({final:"s"},h=>this.saveCursor(h)),this._parser.registerCsiHandler({final:"t"},h=>this.windowOptions(h)),this._parser.registerCsiHandler({final:"u"},h=>this.restoreCursor(h)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},h=>this.insertColumns(h)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},h=>this.deleteColumns(h)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},h=>this.selectProtected(h)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},h=>this.requestMode(h,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},h=>this.requestMode(h,!1)),this._parser.setExecuteHandler(b.BEL,()=>this.bell()),this._parser.setExecuteHandler(b.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(b.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(b.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(b.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(b.BS,()=>this.backspace()),this._parser.setExecuteHandler(b.HT,()=>this.tab()),this._parser.setExecuteHandler(b.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(b.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Zo.IND,()=>this.index()),this._parser.setExecuteHandler(Zo.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Zo.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Mt(h=>(this.setTitle(h),this.setIconName(h),!0))),this._parser.registerOscHandler(1,new Mt(h=>this.setIconName(h))),this._parser.registerOscHandler(2,new Mt(h=>this.setTitle(h))),this._parser.registerOscHandler(4,new Mt(h=>this.setOrReportIndexedColor(h))),this._parser.registerOscHandler(8,new Mt(h=>this.setHyperlink(h))),this._parser.registerOscHandler(10,new Mt(h=>this.setOrReportFgColor(h))),this._parser.registerOscHandler(11,new Mt(h=>this.setOrReportBgColor(h))),this._parser.registerOscHandler(12,new Mt(h=>this.setOrReportCursorColor(h))),this._parser.registerOscHandler(104,new Mt(h=>this.restoreIndexedColor(h))),this._parser.registerOscHandler(110,new Mt(h=>this.restoreFgColor(h))),this._parser.registerOscHandler(111,new Mt(h=>this.restoreBgColor(h))),this._parser.registerOscHandler(112,new Mt(h=>this.restoreCursorColor(h))),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(let h in Le)this._parser.registerEscHandler({intermediates:"(",final:h},()=>this.selectCharset("("+h)),this._parser.registerEscHandler({intermediates:")",final:h},()=>this.selectCharset(")"+h)),this._parser.registerEscHandler({intermediates:"*",final:h},()=>this.selectCharset("*"+h)),this._parser.registerEscHandler({intermediates:"+",final:h},()=>this.selectCharset("+"+h)),this._parser.registerEscHandler({intermediates:"-",final:h},()=>this.selectCharset("-"+h)),this._parser.registerEscHandler({intermediates:".",final:h},()=>this.selectCharset("."+h)),this._parser.registerEscHandler({intermediates:"/",final:h},()=>this.selectCharset("/"+h));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(h=>(this._logService.error("Parsing error: ",h),h)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new Z0((h,u)=>this.requestStatusString(h,u)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,i,s){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=s}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,i)=>setTimeout(()=>i("#SLOW_TIMEOUT"),eS))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${eS} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,s=this._activeBuffer.x,r=this._activeBuffer.y,n=0,l=this._parseStack.paused;if(l){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;s=this._parseStack.cursorStartX,r=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>ws&&(n=this._parseStack.position+ws)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,h=>String.fromCharCode(h)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(h=>h.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<ws&&(this._parseBuffer=new Uint32Array(Math.min(e.length,ws))),l||this._dirtyRowTracker.clearRange(),e.length>ws)for(let h=n;h<e.length;h+=ws){let u=h+ws<e.length?h+ws:e.length,c=typeof e=="string"?this._stringDecoder.decode(e.substring(h,u),this._parseBuffer):this._utf8Decoder.decode(e.subarray(h,u),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,c))return this._preserveStack(s,r,c,h),this._logSlowResolvingAsync(i),i}else if(!l){let h=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,h))return this._preserveStack(s,r,h,0),this._logSlowResolvingAsync(i),i}(this._activeBuffer.x!==s||this._activeBuffer.y!==r)&&this._onCursorMove.fire();let a=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),o=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);o<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(o,this._bufferService.rows-1),end:Math.min(a,this._bufferService.rows-1)})}print(e,t,i){let s,r,n=this._charsetService.charset,l=this._optionsService.rawOptions.screenReaderMode,a=this._bufferService.cols,o=this._coreService.decPrivateModes.wraparound,h=this._coreService.modes.insertMode,u=this._curAttrData,c=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&c.getWidth(this._activeBuffer.x-1)===2&&c.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let d=this._parser.precedingJoinState;for(let f=t;f<i;++f){if(s=e[f],s<127&&n){let _=n[String.fromCharCode(s)];_&&(s=_.charCodeAt(0))}let p=this._unicodeService.charProperties(s,d);r=ir.extractWidth(p);let m=ir.extractShouldJoin(p),C=m?ir.extractWidth(d):0;if(d=p,l&&this._onA11yChar.fire(Es(s)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+r-C>a){if(o){let _=c,g=this._activeBuffer.x-C;for(this._activeBuffer.x=C,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),c=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),C>0&&c instanceof Ll&&c.copyCellsFrom(_,g,0,C,!1);g<a;)_.setCellFromCodepoint(g++,0,1,u)}else if(this._activeBuffer.x=a-1,r===2)continue}if(m&&this._activeBuffer.x){let _=c.getWidth(this._activeBuffer.x-1)?1:2;c.addCodepointToCell(this._activeBuffer.x-_,s,r);for(let g=r-C;--g>=0;)c.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(h&&(c.insertCells(this._activeBuffer.x,r-C,this._activeBuffer.getNullCell(u)),c.getWidth(a-1)===2&&c.setCellFromCodepoint(a-1,0,1,u)),c.setCellFromCodepoint(this._activeBuffer.x++,s,r,u),r>0)for(;--r;)c.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=d,this._activeBuffer.x<a&&i-t>0&&c.getWidth(this._activeBuffer.x)===0&&!c.hasContent(this._activeBuffer.x)&&c.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,i=>J0(i.params[0],this._optionsService.rawOptions.windowOptions)?t(i):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Z0(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Mt(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;let 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;let 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){let 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){let 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){let 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){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,s=!1,r=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),r),s&&(n.isWrapped=!1)}_resetBufferLine(e,t=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let i;switch(e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(i=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,i-1);i--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+i)?.getTrimmedLength(););for(;i>=0;i--)this._bufferService.scroll(this._eraseAttrData())}else{for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let s=this._activeBuffer.lines.length-this._bufferService.rows;s>0&&(this._activeBuffer.lines.trimStart(s),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-s,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-s,0),this._onScroll.fire(0));break}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);break}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;let i=this._activeBuffer.ybase+this._activeBuffer.y,s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-s+1;for(;t--;)this._activeBuffer.lines.splice(r-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}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;let i=this._activeBuffer.ybase+this._activeBuffer.y,s;for(s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,s=this._bufferService.rows-1+this._activeBuffer.ybase-s;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(s,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();let 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();let 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(Te));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;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.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;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.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;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.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;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);s.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),s.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let 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){let t=this._parser.precedingJoinState;if(!t)return!0;let i=e.params[0]||1,s=ir.extractWidth(t),r=this._activeBuffer.x-s,n=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(r),l=new Uint32Array(n.length*i),a=0;for(let h=0;h<n.length;){let u=n.codePointAt(h)||0;l[a++]=u,h+=u>65535?2:1}let o=a;for(let h=1;h<i;++h)l.copyWithin(o,0,a),o+=a;return this.print(l,0,o),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(b.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(b.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(b.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(b.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(b.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;break}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,tr),this._charsetService.setgCharset(1,tr),this._charsetService.setgCharset(2,tr),this._charsetService.setgCharset(3,tr);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(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}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;break}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:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";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(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(m=>(m[m.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",m[m.SET=1]="SET",m[m.RESET=2]="RESET",m[m.PERMANENTLY_SET=3]="PERMANENTLY_SET",m[m.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(i={}));let s=this._coreService.decPrivateModes,{activeProtocol:r,activeEncoding:n}=this._coreMouseService,l=this._coreService,{buffers:a,cols:o}=this._bufferService,{active:h,alt:u}=a,c=this._optionsService.rawOptions,d=(m,C)=>(l.triggerDataEvent(`${b.ESC}[${t?"":"?"}${m};${C}$y`),!0),f=m=>m?1:2,p=e.params[0];return t?p===2?d(p,4):p===4?d(p,f(l.modes.insertMode)):p===12?d(p,3):p===20?d(p,f(c.convertEol)):d(p,0):p===1?d(p,f(s.applicationCursorKeys)):p===3?d(p,c.windowOptions.setWinLines?o===80?2:o===132?1:0:0):p===6?d(p,f(s.origin)):p===7?d(p,f(s.wraparound)):p===8?d(p,3):p===9?d(p,f(r==="X10")):p===12?d(p,f(c.cursorBlink)):p===25?d(p,f(!l.isCursorHidden)):p===45?d(p,f(s.reverseWraparound)):p===66?d(p,f(s.applicationKeypad)):p===67?d(p,4):p===1e3?d(p,f(r==="VT200")):p===1002?d(p,f(r==="DRAG")):p===1003?d(p,f(r==="ANY")):p===1004?d(p,f(s.sendFocus)):p===1005?d(p,4):p===1006?d(p,f(n==="SGR")):p===1015?d(p,4):p===1016?d(p,f(n==="SGR_PIXELS")):p===1048?d(p,1):p===47||p===1047||p===1049?d(p,f(h===u)):p===2004?d(p,f(s.bracketedPasteMode)):p===2026?d(p,f(s.synchronizedOutput)):d(p,0)}_updateAttrColor(e,t,i,s,r){return t===2?(e|=50331648,e&=-16777216,e|=Vl.fromColorRGB([i,s,r])):t===5&&(e&=-50331904,e|=33554432|i&255),e}_extractColor(e,t,i){let s=[0,0,-1,0,0,0],r=0,n=0;do{if(s[n+r]=e.params[t+n],e.hasSubParams(t+n)){let l=e.getSubParams(t+n),a=0;do s[1]===5&&(r=1),s[n+a+1+r]=l[a];while(++a<l.length&&a+n+1+r<s.length);break}if(s[1]===5&&n+r>=2||s[1]===2&&n+r>=5)break;s[1]&&(r=1)}while(++n+t<e.length&&n+r<s.length);for(let l=2;l<s.length;++l)s[l]===-1&&(s[l]=0);switch(s[0]){case 38:i.fg=this._updateAttrColor(i.fg,s[1],s[3],s[4],s[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,s[1],s[3],s[4],s[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,s[1],s[3],s[4],s[5])}return n}_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=Te.fg,e.bg=Te.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;let t=e.length,i,s=this._curAttrData;for(let r=0;r<t;r++)i=e.params[r],i>=30&&i<=37?(s.fg&=-50331904,s.fg|=16777216|i-30):i>=40&&i<=47?(s.bg&=-50331904,s.bg|=16777216|i-40):i>=90&&i<=97?(s.fg&=-50331904,s.fg|=16777216|i-90|8):i>=100&&i<=107?(s.bg&=-50331904,s.bg|=16777216|i-100|8):i===0?this._processSGR0(s):i===1?s.fg|=134217728:i===3?s.bg|=67108864:i===4?(s.fg|=268435456,this._processUnderline(e.hasSubParams(r)?e.getSubParams(r)[0]:1,s)):i===5?s.fg|=536870912:i===7?s.fg|=67108864:i===8?s.fg|=1073741824:i===9?s.fg|=2147483648:i===2?s.bg|=134217728:i===21?this._processUnderline(2,s):i===22?(s.fg&=-134217729,s.bg&=-134217729):i===23?s.bg&=-67108865:i===24?(s.fg&=-268435457,this._processUnderline(0,s)):i===25?s.fg&=-536870913:i===27?s.fg&=-67108865:i===28?s.fg&=-1073741825:i===29?s.fg&=2147483647:i===39?(s.fg&=-67108864,s.fg|=Te.fg&16777215):i===49?(s.bg&=-67108864,s.bg|=Te.bg&16777215):i===38||i===48||i===58?r+=this._extractColor(e,r,s):i===53?s.bg|=1073741824:i===55?s.bg&=-1073741825:i===59?(s.extended=s.extended.clone(),s.extended.underlineColor=-1,s.updateExtended()):i===100?(s.fg&=-67108864,s.fg|=Te.fg&16777215,s.bg&=-67108864,s.bg|=Te.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${b.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${b.ESC}[${t};${i}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${b.ESC}[?${t};${i}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}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=Te.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){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let i=t%2===1;this._coreService.decPrivateModes.cursorBlink=i}return!0}setScrollRegion(e){let t=e.params[0]||1,i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||i===0)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!J0(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${b.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>$0&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>$0&&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());break}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){let t=[],i=e.split(";");for(;i.length>1;){let s=i.shift(),r=i.shift();if(/^\d+$/.exec(s)){let n=parseInt(s);if(iS(n))if(r==="?")t.push({type:0,index:n});else{let l=Q0(r);l&&t.push({type:1,index:n,color:l})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let i=e.slice(0,t).trim(),s=e.slice(t+1);return s?this._createHyperlink(i,s):i.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let i=e.split(":"),s,r=i.findIndex(n=>n.startsWith("id="));return r!==-1&&(s=i[r].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:s,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){let i=e.split(";");for(let s=0;s<i.length&&!(t>=this._specialColors.length);++s,++t)if(i[s]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=Q0(i[s]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}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;let t=[],i=e.split(";");for(let s=0;s<i.length;++s)if(/^\d+$/.exec(i[s])){let r=parseInt(i[s]);iS(r)&&t.push({type:2,index:r})}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,tr),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(_x[e[0]],Le[e[1]]||tr),!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){let 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=Te.clone(),this._eraseAttrDataInternal=Te.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Ft;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let i=this._activeBuffer.ybase+this._activeBuffer.y+t,s=this._activeBuffer.lines.get(i);s&&(s.fill(e),s.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let i=l=>(this._coreService.triggerDataEvent(`${b.ESC}${l}${b.ESC}\\`),!0),s=this._bufferService.buffer,r=this._optionsService.rawOptions;return i(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${s.scrollTop+1};${s.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},sf=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(tS=e,e=t,t=tS),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};sf=be([B(0,lt)],sf);function iS(e){return 0<=e&&e<256}var px=5e7,sS=12,vx=50,mx=class extends W{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new E),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let i;for(;i=this._writeBuffer.shift();){this._action(i);let s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>px)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let i=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let s=this._writeBuffer[this._bufferOffset],r=this._action(s,t);if(r){let l=a=>performance.now()-i>=sS?setTimeout(()=>this._innerWrite(0,a)):this._innerWrite(i,a);r.catch(a=>(queueMicrotask(()=>{throw a}),Promise.resolve(!1))).then(l);return}let n=this._callbacks[this._bufferOffset];if(n&&n(),this._bufferOffset++,this._pendingData-=s.length,performance.now()-i>=sS)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>vx&&(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()}},rf=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let a=t.addMarker(t.ybase+t.y),o={data:e,id:this._nextId++,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(o,a)),this._dataByLinkId.set(o.id,o),o.id}let i=e,s=this._getEntryIdKey(i),r=this._entriesWithId.get(s);if(r)return this.addLineToLink(r.id,t.ybase+t.y),r.id;let n=t.addMarker(t.ybase+t.y),l={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(l,n)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(e,t){let i=this._dataByLinkId.get(e);if(i&&i.lines.every(s=>s.line!==t)){let s=this._bufferService.buffer.addMarker(t);i.lines.push(s),s.onDispose(()=>this._removeMarkerFromLink(i,s))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let i=e.lines.indexOf(t);i!==-1&&(e.lines.splice(i,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};rf=be([B(0,lt)],rf);var rS=!1,Sx=class extends W{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new cn),this._onBinary=this._register(new E),this.onBinary=this._onBinary.event,this._onData=this._register(new E),this.onData=this._onData.event,this._onLineFeed=this._register(new E),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new E),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new E),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new E),this._instantiationService=new WE,this.optionsService=this._register(new JE(e)),this._instantiationService.setService(at,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance($d)),this._instantiationService.setService(lt,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Qd)),this._instantiationService.setService(vS,this._logService),this.coreService=this._register(this._instantiationService.createInstance(Jd)),this._instantiationService.setService(lr,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(ef)),this._instantiationService.setService(pS,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(ir)),this._instantiationService.setService(uw,this.unicodeService),this._charsetService=this._instantiationService.createInstance(rx),this._instantiationService.setService(cw,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(rf),this._instantiationService.setService(mS,this._oscLinkService),this._inputHandler=this._register(new gx(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register($e.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register($e.forward(this._bufferService.onResize,this._onResize)),this._register($e.forward(this.coreService.onData,this._onData)),this._register($e.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new mx((t,i)=>this._inputHandler.parse(t,i))),this._register($e.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new E),this._onScroll.event(e=>{this._onScrollApi?.fire(e.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(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!rS&&(this._logService.warn("writeSync is unreliable and will be removed soon."),rS=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,n1),t=Math.max(t,l1),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(I0.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(I0(this._bufferService),!1))),this._windowsWrappingHeuristics.value=de(()=>{for(let t of e)t.dispose()})}}},yx={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:["'",'"']};function bx(e,t,i,s){let r={type:0,cancel:!1,key:void 0},n=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?r.key=b.ESC+"OA":r.key=b.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?r.key=b.ESC+"OD":r.key=b.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?r.key=b.ESC+"OC":r.key=b.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?r.key=b.ESC+"OB":r.key=b.ESC+"[B");break;case 8:r.key=e.ctrlKey?"\b":b.DEL,e.altKey&&(r.key=b.ESC+r.key);break;case 9:if(e.shiftKey){r.key=b.ESC+"[Z";break}r.key=b.HT,r.cancel=!0;break;case 13:r.key=e.altKey?b.ESC+b.CR:b.CR,r.cancel=!0;break;case 27:r.key=b.ESC,e.altKey&&(r.key=b.ESC+b.ESC),r.cancel=!0;break;case 37:if(e.metaKey)break;n?r.key=b.ESC+"[1;"+(n+1)+"D":t?r.key=b.ESC+"OD":r.key=b.ESC+"[D";break;case 39:if(e.metaKey)break;n?r.key=b.ESC+"[1;"+(n+1)+"C":t?r.key=b.ESC+"OC":r.key=b.ESC+"[C";break;case 38:if(e.metaKey)break;n?r.key=b.ESC+"[1;"+(n+1)+"A":t?r.key=b.ESC+"OA":r.key=b.ESC+"[A";break;case 40:if(e.metaKey)break;n?r.key=b.ESC+"[1;"+(n+1)+"B":t?r.key=b.ESC+"OB":r.key=b.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(r.key=b.ESC+"[2~");break;case 46:n?r.key=b.ESC+"[3;"+(n+1)+"~":r.key=b.ESC+"[3~";break;case 36:n?r.key=b.ESC+"[1;"+(n+1)+"H":t?r.key=b.ESC+"OH":r.key=b.ESC+"[H";break;case 35:n?r.key=b.ESC+"[1;"+(n+1)+"F":t?r.key=b.ESC+"OF":r.key=b.ESC+"[F";break;case 33:e.shiftKey?r.type=2:e.ctrlKey?r.key=b.ESC+"[5;"+(n+1)+"~":r.key=b.ESC+"[5~";break;case 34:e.shiftKey?r.type=3:e.ctrlKey?r.key=b.ESC+"[6;"+(n+1)+"~":r.key=b.ESC+"[6~";break;case 112:n?r.key=b.ESC+"[1;"+(n+1)+"P":r.key=b.ESC+"OP";break;case 113:n?r.key=b.ESC+"[1;"+(n+1)+"Q":r.key=b.ESC+"OQ";break;case 114:n?r.key=b.ESC+"[1;"+(n+1)+"R":r.key=b.ESC+"OR";break;case 115:n?r.key=b.ESC+"[1;"+(n+1)+"S":r.key=b.ESC+"OS";break;case 116:n?r.key=b.ESC+"[15;"+(n+1)+"~":r.key=b.ESC+"[15~";break;case 117:n?r.key=b.ESC+"[17;"+(n+1)+"~":r.key=b.ESC+"[17~";break;case 118:n?r.key=b.ESC+"[18;"+(n+1)+"~":r.key=b.ESC+"[18~";break;case 119:n?r.key=b.ESC+"[19;"+(n+1)+"~":r.key=b.ESC+"[19~";break;case 120:n?r.key=b.ESC+"[20;"+(n+1)+"~":r.key=b.ESC+"[20~";break;case 121:n?r.key=b.ESC+"[21;"+(n+1)+"~":r.key=b.ESC+"[21~";break;case 122:n?r.key=b.ESC+"[23;"+(n+1)+"~":r.key=b.ESC+"[23~";break;case 123:n?r.key=b.ESC+"[24;"+(n+1)+"~":r.key=b.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?r.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?r.key=b.NUL:e.keyCode>=51&&e.keyCode<=55?r.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?r.key=b.DEL:e.keyCode===219?r.key=b.ESC:e.keyCode===220?r.key=b.FS:e.keyCode===221&&(r.key=b.GS);else if((!i||s)&&e.altKey&&!e.metaKey){let l=yx[e.keyCode]?.[e.shiftKey?1:0];if(l)r.key=b.ESC+l;else if(e.keyCode>=65&&e.keyCode<=90){let a=e.ctrlKey?e.keyCode-64:e.keyCode+32,o=String.fromCharCode(a);e.shiftKey&&(o=o.toUpperCase()),r.key=b.ESC+o}else if(e.keyCode===32)r.key=b.ESC+(e.ctrlKey?b.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let a=e.code.slice(3,4);e.shiftKey||(a=a.toLowerCase()),r.key=b.ESC+a,r.cancel=!0}}else i&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(r.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?r.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(r.key=b.US),e.key==="@"&&(r.key=b.NUL));break}return r}var Ee=0,Cx=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new lh,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new lh,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((r,n)=>this._getKey(r)-this._getKey(n)),t=0,i=0,s=new Array(this._array.length+this._insertedValues.length);for(let r=0;r<s.length;r++)i>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[i])?(s[r]=e[t],t++):s[r]=this._array[i++];this._array=s,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Ee=this._search(t),Ee===-1)||this._getKey(this._array[Ee])!==t)return!1;do if(this._array[Ee]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Ee),!0;while(++Ee<this._array.length&&this._getKey(this._array[Ee])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((r,n)=>r-n),t=0,i=new Array(this._array.length-e.length),s=0;for(let r=0;r<this._array.length;r++)e[t]===r?t++:i[s++]=this._array[r];this._array=i,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ee=this._search(e),!(Ee<0||Ee>=this._array.length)&&this._getKey(this._array[Ee])===e))do yield this._array[Ee];while(++Ee<this._array.length&&this._getKey(this._array[Ee])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ee=this._search(e),!(Ee<0||Ee>=this._array.length)&&this._getKey(this._array[Ee])===e))do t(this._array[Ee]);while(++Ee<this._array.length&&this._getKey(this._array[Ee])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,i=this._array.length-1;for(;i>=t;){let s=t+i>>1,r=this._getKey(this._array[s]);if(r>e)i=s-1;else if(r<e)t=s+1;else{for(;s>0&&this._getKey(this._array[s-1])===e;)s--;return s}}return t}},yd=0,nS=0,wx=class extends W{constructor(){super(),this._decorations=new Cx(e=>e?.marker.line),this._onDecorationRegistered=this._register(new E),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new E),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(de(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new Ex(e);if(t){let i=t.marker.onDispose(()=>t.dispose()),s=t.onDispose(()=>{s.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),i.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let s=0,r=0;for(let n of this._decorations.getKeyIterator(t))s=n.options.x??0,r=s+(n.options.width??1),e>=s&&e<r&&(!i||(n.options.layer??"bottom")===i)&&(yield n)}forEachDecorationAtCell(e,t,i,s){this._decorations.forEachByKey(t,r=>{yd=r.options.x??0,nS=yd+(r.options.width??1),e>=yd&&e<nS&&(!i||(r.options.layer??"bottom")===i)&&s(r)})}},Ex=class extends Ds{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new E),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new E),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=ve.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=ve.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},xx=1e3,Dx=class{constructor(e,t=xx){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let s=performance.now();if(s-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=s,this._innerRefresh();else if(!this._additionalRefreshRequested){let r=s-this._lastRefreshMs,n=this._debounceThresholdMS-r;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},n)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},lS=20,aS=!1,ah=class extends W{constructor(e,t,i,s){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=s,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let r=this._coreBrowserService.mainDocument;this._accessibilityContainer=r.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=r.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let n=0;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);if(this._topBoundaryFocusListener=n=>this._handleBoundaryFocus(n,0),this._bottomBoundaryFocusListener=n=>this._handleBoundaryFocus(n,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=r.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new Dx(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");aS?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=r.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(r.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(r.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(n=>this._handleResize(n.rows))),this._register(this._terminal.onRender(n=>this._refreshRows(n.start,n.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(n=>this._handleChar(n))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
42
- `))),this._register(this._terminal.onA11yTab(n=>this._handleTab(n))),this._register(this._terminal.onKey(n=>this._handleKey(n.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(q(r,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(de(()=>{aS?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<lS+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
43
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===lS+1&&(this._liveRegion.textContent+=Cd.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,s=i.lines.length.toString();for(let r=e;r<=t;r++){let n=i.lines.get(i.ydisp+r),l=[],a=n?.translateToString(!0,void 0,void 0,l)||"",o=(i.ydisp+r+1).toString(),h=this._rowElements[r];h&&(a.length===0?(h.textContent="\xA0",this._rowColumns.set(h,[0,1])):(h.textContent=a,this._rowColumns.set(h,l)),h.setAttribute("aria-posinset",o),h.setAttribute("aria-setsize",s),this._alignRowWidth(h))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,s=this._rowElements[t===0?1:this._rowElements.length-2],r=i.getAttribute("aria-posinset"),n=t===0?"1":`${this._terminal.buffer.lines.length}`;if(r===n||e.relatedTarget!==s)return;let l,a;if(t===0?(l=i,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(l=this._rowElements.shift(),a=i,this._rowContainer.removeChild(l)),l.removeEventListener("focus",this._topBoundaryFocusListener),a.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let o=this._createAccessibilityTreeNode();this._rowElements.unshift(o),this._rowContainer.insertAdjacentElement("afterbegin",o)}else{let o=this._createAccessibilityTreeNode();this._rowElements.push(o),this._rowContainer.appendChild(o)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let s=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:s,offset:s.textContent?.length??0}),!this._rowContainer.contains(i.node))return;let r=({node:a,offset:o})=>{let h=a instanceof Text?a.parentNode:a,u=parseInt(h?.getAttribute("aria-posinset"),10)-1;if(isNaN(u))return console.warn("row is invalid. Race condition?"),null;let c=this._rowColumns.get(h);if(!c)return console.warn("columns is null. Race condition?"),null;let d=o<c.length?c[o]:c.slice(-1)[0]+1;return d>=this._terminal.cols&&(++u,d=0),{row:u,column:d}},n=r(t),l=r(i);if(!(!n||!l)){if(n.row>l.row||n.row===l.row&&n.column>=l.column)throw new Error("invalid range");this._terminal.select(n.column,n.row,(l.row-n.row)*this._terminal.cols-n.column+l.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,i=this._rowColumns.get(e)?.slice(-1)?.[0];if(!i)return;let s=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${s/t})`}};ah=be([B(1,lf),B(2,qi),B(3,Ki)],ah);var nf=class extends W{constructor(e,t,i,s,r){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=s,this._linkProviderService=r,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new E),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new E),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(de(()=>{rr(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(q(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(q(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(q(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(q(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let s=0;s<i.length;s++){let r=i[s];if(r.classList.contains("xterm"))break;if(r.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(s=>{s?.forEach(r=>{r.link.dispose&&r.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[s,r]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(s)&&(i=this._checkLinkProviderResult(s,e,i)):r.provideLinks(e.y,n=>{if(this._isMouseOut)return;let l=n?.map(a=>({link:a}));this._activeProviderReplies?.set(s,l),i=this._checkLinkProviderResult(s,e,i),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let s=0;s<t.size;s++){let r=t.get(s);if(r)for(let n=0;n<r.length;n++){let l=r[n],a=l.link.range.start.y<e?0:l.link.range.start.x,o=l.link.range.end.y>e?this._bufferService.cols:l.link.range.end.x;for(let h=a;h<=o;h++){if(i.has(h)){r.splice(n--,1);break}i.add(h)}}}}_checkLinkProviderResult(e,t,i){if(!this._activeProviderReplies)return i;let s=this._activeProviderReplies.get(e),r=!1;for(let n=0;n<e;n++)(!this._activeProviderReplies.has(n)||this._activeProviderReplies.get(n))&&(r=!0);if(!r&&s){let n=s.find(l=>this._linkAtPosition(l.link,t));n&&(i=!0,this._handleNewLink(n))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let n=0;n<this._activeProviderReplies.size;n++){let l=this._activeProviderReplies.get(n)?.find(a=>this._linkAtPosition(a.link,t));if(l){i=!0,this._handleNewLink(l);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&Rx(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,rr(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:i=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:i=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let s=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,r=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=r&&(this._clearCurrentLink(s,r),this._lastMouseEvent)){let n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._askForLink(n,!1)}})))}_linkHover(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,s=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-s-1,i.end.x,i.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,s=e.range.end.y*this._bufferService.cols+e.range.end.x,r=t.y*this._bufferService.cols+t.x;return i<=r&&r<=s}_positionFromMouseEvent(e,t,i){let s=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,s,r){return{x1:e,y1:t,x2:i,y2:s,cols:this._bufferService.cols,fg:r}}};nf=be([B(1,af),B(2,Ki),B(3,lt),B(4,yS)],nf);function Rx(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var Mx=class extends Sx{constructor(e={}){super(e),this._linkifier=this._register(new cn),this.browser=jS,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new cn),this._onCursorMove=this._register(new E),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new E),this.onKey=this._onKey.event,this._onRender=this._register(new E),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new E),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new E),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new E),this.onBell=this._onBell.event,this._onFocus=this._register(new E),this._onBlur=this._register(new E),this._onA11yCharEmitter=this._register(new E),this._onA11yTabEmitter=this._register(new E),this._onWillOpen=this._register(new E),this._setup(),this._decorationService=this._instantiationService.createInstance(wx),this._instantiationService.setService(Fl,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(pE),this._instantiationService.setService(yS,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Ed)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register($e.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register($e.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register($e.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register($e.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(de(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}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}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,s="";switch(t.index){case 256:i="foreground",s="10";break;case 257:i="background",s="11";break;case 258:i="cursor",s="12";break;default:i="ansi",s="4;"+t.index}switch(t.type){case 0:let r=ue.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${b.ESC}]${s};${fx(r)}${XS.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(n=>n.ansi[t.index]=Ae.toColor(...t.color));else{let n=i;this._themeService.modifyColors(l=>l[n]=Ae.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ah,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(b.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(b.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.css.cell.height,r=t.getWidth(i),n=this._renderService.dimensions.css.cell.width*r,l=this.buffer.y*this._renderService.dimensions.css.cell.height,a=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=a+"px",this.textarea.style.top=l+"px",this.textarea.style.width=n+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(q(this.element,"copy",t=>{this.hasSelection()&&rw(t,this._selectionService)}));let e=t=>nw(t,this.textarea,this.coreService,this.optionsService);this._register(q(this.textarea,"paste",e)),this._register(q(this.element,"paste",e)),IS?this._register(q(this.element,"mousedown",t=>{t.button===2&&o0(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(q(this.element,"contextmenu",t=>{o0(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),gf&&this._register(q(this.element,"auxclick",t=>{t.button===1&&uS(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(q(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(q(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(q(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(q(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(q(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(q(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(q(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.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"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(q(this.screenElement,"mousemove",r=>this.updateCursorStyle(r))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",bd.get()),$S||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._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(_E,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(qi,this._coreBrowserService),this._register(q(this.textarea,"focus",r=>this._handleTextAreaFocus(r))),this._register(q(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Xd,this._document,this._helperContainer),this._instantiationService.setService(hh,this._charSizeService),this._themeService=this._instantiationService.createInstance(Zd),this._instantiationService.setService(un,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(rh),this._instantiationService.setService(SS,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(jd,this.rows,this.screenElement)),this._instantiationService.setService(Ki,this._renderService),this._register(this._renderService.onRenderedViewportChange(r=>this._onRender.fire(r))),this.onResize(r=>this._renderService.resize(r.cols,r.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Pd,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Gd),this._instantiationService.setService(af,this._mouseService);let s=this._linkifier.value=this._register(this._instantiationService.createInstance(nf,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),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._viewport=this._register(this._instantiationService.createInstance(Yd,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(r=>{super.scrollLines(r,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Id,this.element,this.screenElement,s)),this._instantiationService.setService(fw,this._selectionService),this._register(this._selectionService.onRequestScrollLines(r=>this.scrollLines(r.amount,r.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(r=>this._renderService.handleSelectionChanged(r.start,r.end,r.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(r=>{this.textarea.value=r,this.textarea.focus(),this.textarea.select()})),this._register($e.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(Wd,this.screenElement)),this._register(q(this.element,"mousedown",r=>this._selectionService.handleMouseDown(r))),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(ah,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",r=>this._handleScreenReaderModeOptionChange(r))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(sh,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",r=>{!this._overviewRulerRenderer&&r&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(sh,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Fd,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(n){let l=e._mouseService.getMouseReportCoords(n,e.screenElement);if(!l)return!1;let a,o;switch(n.overrideType||n.type){case"mousemove":o=32,n.buttons===void 0?(a=3,n.button!==void 0&&(a=n.button<3?n.button:3)):a=n.buttons&1?0:n.buttons&4?1:n.buttons&2?2:3;break;case"mouseup":o=0,a=n.button<3?n.button:3;break;case"mousedown":o=1,a=n.button<3?n.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(n)===!1)return!1;let h=n.deltaY;if(h===0||e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;o=h<0?0:1,a=4;break;default:return!1}return o===void 0||a===void 0||a>4?!1:e.coreMouseService.triggerMouseEvent({col:l.col,row:l.row,x:l.x,y:l.y,button:a,action:o,ctrl:n.ctrlKey,alt:n.altKey,shift:n.shiftKey})}let s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},r={mouseup:n=>(i(n),n.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(n)),wheel:n=>(i(n),this.cancel(n,!0)),mousedrag:n=>{n.buttons&&i(n)},mousemove:n=>{n.buttons||i(n)}};this._register(this.coreMouseService.onProtocolChange(n=>{n?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(n)),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()),n&8?s.mousemove||(t.addEventListener("mousemove",r.mousemove),s.mousemove=r.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),n&16?s.wheel||(t.addEventListener("wheel",r.wheel,{passive:!1}),s.wheel=r.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),n&2?s.mouseup||(s.mouseup=r.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),n&4?s.mousedrag||(s.mousedrag=r.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(q(t,"mousedown",n=>{if(n.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(n)))return i(n),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(n)})),this._register(q(t,"wheel",n=>{if(!s.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(n)===!1)return!1;if(!this.buffer.hasScrollback){if(n.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(n,!0);let l=b.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(n.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(l,!0),this.cancel(n,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?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(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){cS(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}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(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=bx(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let s=this.rows-1;return this.scrollLines(i.type===2?-s:s),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===b.ETX||i.key===b.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Tx(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}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 e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Te));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(b.ESC+"[I"):this.coreService.triggerDataEvent(b.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${b.ESC}[4;${i};${t}t`);break;case 1:let s=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${b.ESC}[6;${r};${s}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function Tx(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var Ax=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},Bx=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Ft)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},oS=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,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(e){let t=this._buffer.lines.get(e);if(t)return new Bx(t)}getNullCell(){return new Ft}},kx=class extends W{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new E),this.onBufferChange=this._onBufferChange.event,this._normal=new oS(this._core.buffers.normal,"normal"),this._alternate=new oS(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)}},Ox=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,s)=>t(i,s.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},zx=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Lx=["cols","rows"],ai=0,o1=class extends W{constructor(e){super(),this._core=this._register(new Mx(e)),this._addonManager=this._register(new Ax),this._publicOptions={...this._core.options};let t=s=>this._core.options[s],i=(s,r)=>{this._checkReadonlyOptions(s),this._core.options[s]=r};for(let s in this._core.options){let r={get:t.bind(this,s),set:i.bind(this,s)};Object.defineProperty(this._publicOptions,s,r)}}_checkReadonlyOptions(e){if(Lx.includes(e))throw new Error(`Option "${e}" 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 Ox(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new zx(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 kx(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
44
- `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return bd.get()},set promptLabel(e){bd.set(e)},get tooMuchOutput(){return Cd.get()},set tooMuchOutput(e){Cd.set(e)}}}_verifyIntegers(...e){for(ai of e)if(ai===1/0||isNaN(ai)||ai%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(ai of e)if(ai&&(ai===1/0||isNaN(ai)||ai%1!==0||ai<0))throw new Error("This API only accepts positive integers")}};function h1(e){let t=new o1({cursorBlink:!0,fontSize:14,fontFamily:"'Cascadia Code', 'Fira Code', Consolas, monospace",theme:{background:"#1e1e1e",foreground:"#d4d4d4"}}),i=new n0;return t.loadAddon(i),t.open(e),i.fit(),{term:t,fitAddon:i,dispose:()=>t.dispose()}}function c1(e,t,i,s,r){let n=h1(e);n.term.onData(h=>i(t,h));let l=s(t,h=>n.term.write(h)),a=new ResizeObserver(()=>{n.fitAddon.fit(),r(t,n.term.cols,n.term.rows)});return a.observe(e),{handle:n,cleanup:()=>{a.disconnect(),l(),n.dispose()}}}var d1=A(z(),1);function Nx(e){return{position:"absolute",inset:0,visibility:e?"visible":"hidden",pointerEvents:e?"auto":"none"}}function u1({sessionId:e,visible:t,onOutput:i,sendInput:s,sendResize:r}){let n=(0,fn.useRef)(null),l=(0,fn.useRef)(null);return(0,fn.useEffect)(()=>{let a=n.current;if(!a)return;let{handle:o,cleanup:h}=c1(a,e,s,i,r);return l.current=o,()=>{h(),l.current=null}},[e,i,s,r]),(0,fn.useEffect)(()=>{let a=l.current;if(!t||!a)return;let o=setTimeout(()=>{a.fitAddon.fit(),a.term.focus(),r(e,a.term.cols,a.term.rows)},50);return()=>clearTimeout(o)},[t,e,r]),(0,d1.jsx)("div",{ref:n,style:Nx(t)})}var jl=A(z(),1),Hx={flex:1,position:"relative",background:"#1e1e1e"},Ux={display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#666",fontSize:14};function f1({sessions:e,activeId:t,onOutput:i,sendInput:s,sendResize:r}){return(0,jl.jsxs)("div",{style:Hx,children:[e.map(n=>(0,jl.jsx)(u1,{sessionId:n.id,visible:n.id===t,onOutput:i,sendInput:s,sendResize:r},n.id)),e.length===0&&(0,jl.jsx)("div",{style:Ux,children:"Create a session to get started"})]})}var R1=A(Xe(),1);var Xt=A(Xe(),1);function _1(e){return(t,i)=>e({type:"create",prompt:t||void 0,cwd:i})}function g1(e){return(t,i,s)=>e({type:"create-run",runName:t,runArgs:i,cwd:s})}function p1(e){return(t,i)=>e({type:"create-assist",assistArgs:t,cwd:i})}function v1(e){return t=>e({type:"run-configs",cwd:t})}function m1(e){return(t,i,s)=>e({type:"resume",sessionId:t,cwd:i,name:s})}function S1(e,t,i){return s=>{t.delete(s),i.delete(s),e({type:"retry",sessionId:s})}}function y1(e,t,i){return s=>{e({type:"dismiss",sessionId:s}),t.delete(s),i.delete(s)}}function b1(e){return(t,i)=>e({type:"input",sessionId:t,data:i})}function C1(e){return(t,i,s)=>e({type:"resize",sessionId:t,cols:i,rows:s})}function w1(e,t){return(i,s)=>{let r=e.get(i);return r&&s(r),t.set(i,s),()=>t.delete(i)}}function E1(e,t,i,s){let r={createSession:(0,Xt.useMemo)(()=>_1(e),[e]),createRunSession:(0,Xt.useMemo)(()=>g1(e),[e]),createAssistSession:(0,Xt.useMemo)(()=>p1(e),[e]),requestRunConfigs:(0,Xt.useMemo)(()=>v1(e),[e]),resumeSession:(0,Xt.useMemo)(()=>m1(e),[e]),sendInput:(0,Xt.useMemo)(()=>b1(e),[e]),sendResize:(0,Xt.useMemo)(()=>C1(e),[e])},n=(0,Xt.useMemo)(()=>w1(t.current,i.current),[t,i]),l=(0,Xt.useCallback)(o=>{S1(e,t.current,i.current)(o)},[e,t,i]),a=(0,Xt.useCallback)(o=>{y1(e,t.current,i.current)(o),s(null)},[e,t,i,s]);return{...r,onOutput:n,retrySession:l,dismissSession:a}}var pt=A(Xe(),1);function x1(e,t){switch(e.type){case"sessions":t.setSessions(e.sessions),e.cwd&&t.setCurrentCwd(e.cwd);break;case"created":t.setActiveId(e.sessionId);break;case"history":t.setHistory(e.sessions);break;case"run-configs":t.setRunConfigs(e.configs);break;case"clear":{let i=e.sessionId;t.buffers.current?.delete(i),t.handlers.current?.get(i)?.("\x1Bc");break}case"output":{let i=e.sessionId,s=t.buffers.current?.get(i)??"";t.buffers.current?.set(i,s+e.data),t.handlers.current?.get(i)?.(e.data);break}}}function D1(){let[e,t]=(0,pt.useState)([]),[i,s]=(0,pt.useState)([]),[r,n]=(0,pt.useState)([]),[l,a]=(0,pt.useState)(null),[o,h]=(0,pt.useState)(""),u=(0,pt.useRef)(null),c=(0,pt.useRef)(new Map),d=(0,pt.useRef)(new Map);(0,pt.useEffect)(()=>{let p=location.protocol==="https:"?"wss:":"ws:",m=new WebSocket(`${p}//${location.host}/ws`);u.current=m;let C={setSessions:t,setHistory:s,setRunConfigs:n,setActiveId:a,setCurrentCwd:h,buffers:c,handlers:d};return m.onopen=()=>{m.send(JSON.stringify({type:"history"}))},m.onmessage=_=>{x1(JSON.parse(_.data),C)},()=>m.close()},[]);let f=(0,pt.useCallback)(()=>{let p=u.current;p?.readyState===WebSocket.OPEN&&p.send(JSON.stringify({type:"history"}))},[]);return{sessions:e,history:i,runConfigs:r,activeId:l,setActiveId:a,currentCwd:o,wsRef:u,buffers:c,handlers:d,requestHistory:f}}function M1(){let{sessions:e,history:t,runConfigs:i,activeId:s,setActiveId:r,currentCwd:n,wsRef:l,buffers:a,handlers:o,requestHistory:h}=D1(),u=(0,R1.useCallback)(d=>{let f=l.current;f?.readyState===WebSocket.OPEN&&f.send(JSON.stringify(d))},[l]),c=E1(u,a,o,r);return{sessions:e,history:t,runConfigs:i,activeId:s,setActiveId:r,currentCwd:n,...c,requestHistory:h}}var _n=A(z(),1);function qx(){let e=M1(),[t,i]=(0,A1.useState)("active");return(0,_n.jsxs)("div",{style:{display:"flex",width:"100%",height:"100%"},children:[(0,_n.jsx)(s0,{socket:e,tab:t,onTabChange:i}),(0,_n.jsx)(f1,{sessions:e.sessions,activeId:e.activeId,onOutput:e.onOutput,sendInput:e.sendInput,sendResize:e.sendResize})]})}var T1=document.getElementById("app");T1&&(0,B1.createRoot)(T1).render((0,_n.jsx)(qx,{}));})();
235
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),kC&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,o=this._model.finalSelectionEnd;return!r||!o||!t?!1:this._areCoordsInSelection(t,r,o)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,o=this._model.finalSelectionEnd;return!r||!o?!1:this._areCoordsInSelection([e,t],r,o)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let r=this._linkifier.currentLink?.link?.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=M5(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let o=this._getMouseBufferCoords(e);return o?(this._selectWordAt(o,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=EC(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-k1),k1),t/=k1,t/Math.abs(t)+Math.round(t*(BX-1)))}shouldForceSelection(e){return Db?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),NX)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Db&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let o=r.lines.get(this._model.selectionEnd[1]);o&&o.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[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});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<LX&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let o=RX(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(o,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let o=0;t>=o;o++){let i=e.loadCell(o,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:i>1&&t!==o&&(r+=i-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,o=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,n=i.lines.get(e[1]);if(!n)return;let s=i.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(n,e[0]),l=a,c=e[0]-a,u=0,p=0,f=0,d=0;if(s.charAt(a)===" "){for(;a>0&&s.charAt(a-1)===" ";)a--;for(;l<s.length&&s.charAt(l+1)===" ";)l++}else{let b=e[0],m=e[0];n.getWidth(b)===0&&(u++,b--),n.getWidth(m)===2&&(p++,m++);let g=n.getString(m).length;for(g>1&&(d+=g-1,l+=g-1);b>0&&a>0&&!this._isCharWordSeparator(n.loadCell(b-1,this._workCell));){n.loadCell(b-1,this._workCell);let v=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,b--):v>1&&(f+=v-1,a-=v-1),a--,b--}for(;m<n.length&&l+1<s.length&&!this._isCharWordSeparator(n.loadCell(m+1,this._workCell));){n.loadCell(m+1,this._workCell);let v=this._workCell.getChars().length;this._workCell.getWidth()===2?(p++,m++):v>1&&(d+=v-1,l+=v-1),l++,m++}}l++;let h=a+c-u+f,y=Math.min(this._bufferService.cols,l-a+u+p-f-d);if(!(!t&&s.slice(a,l).trim()==="")){if(r&&h===0&&n.getCodePoint(0)!==32){let b=i.lines.get(e[1]-1);if(b&&n.isWrapped&&b.getCodePoint(this._bufferService.cols-1)!==32){let m=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(m){let g=this._bufferService.cols-m.start;h-=g,y+=g}}}if(o&&h+y===this._bufferService.cols&&n.getCodePoint(this._bufferService.cols-1)!==32){let b=i.lines.get(e[1]+1);if(b?.isWrapped&&b.getCodePoint(0)!==32){let m=this._getWordAt([0,e[1]+1],!1,!1,!0);m&&(y+=m.length)}}return{start:h,length:y}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=M5(r,this._bufferService.cols)}};uC=Ut([J(3,ro),J(4,Gl),J(5,SC),J(6,oo),J(7,hs),J(8,fs)],uC);var A5=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},B5=class{constructor(){this._color=new A5,this._css=new A5}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},nr=Object.freeze((()=>{let e=[Nt.toColor("#2e3436"),Nt.toColor("#cc0000"),Nt.toColor("#4e9a06"),Nt.toColor("#c4a000"),Nt.toColor("#3465a4"),Nt.toColor("#75507b"),Nt.toColor("#06989a"),Nt.toColor("#d3d7cf"),Nt.toColor("#555753"),Nt.toColor("#ef2929"),Nt.toColor("#8ae234"),Nt.toColor("#fce94f"),Nt.toColor("#729fcf"),Nt.toColor("#ad7fa8"),Nt.toColor("#34e2e2"),Nt.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let o=t[r/36%6|0],i=t[r/6%6|0],n=t[r%6];e.push({css:tr.toCss(o,i,n),rgba:tr.toRgba(o,i,n)})}for(let r=0;r<24;r++){let o=8+r*10;e.push({css:tr.toCss(o,o,o),rgba:tr.toRgba(o,o,o)})}return e})()),$l=Nt.toColor("#ffffff"),Th=Nt.toColor("#000000"),N5=Nt.toColor("#ffffff"),L5=Th,gh={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},FX=$l,pC=class extends xe{constructor(e){super(),this._optionsService=e,this._contrastCache=new B5,this._halfContrastCache=new B5,this._onChangeColors=this._register(new G),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:$l,background:Th,cursor:N5,cursorAccent:L5,selectionForeground:void 0,selectionBackgroundTransparent:gh,selectionBackgroundOpaque:Ct.blend(Th,gh),selectionInactiveBackgroundTransparent:gh,selectionInactiveBackgroundOpaque:Ct.blend(Th,gh),scrollbarSliderBackground:Ct.opacity($l,.2),scrollbarSliderHoverBackground:Ct.opacity($l,.4),scrollbarSliderActiveBackground:Ct.opacity($l,.5),overviewRulerBorder:$l,ansi:nr.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)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=nt(e.foreground,$l),t.background=nt(e.background,Th),t.cursor=Ct.blend(t.background,nt(e.cursor,N5)),t.cursorAccent=Ct.blend(t.background,nt(e.cursorAccent,L5)),t.selectionBackgroundTransparent=nt(e.selectionBackground,gh),t.selectionBackgroundOpaque=Ct.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=nt(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Ct.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?nt(e.selectionForeground,k5):void 0,t.selectionForeground===k5&&(t.selectionForeground=void 0),Ct.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Ct.opacity(t.selectionBackgroundTransparent,.3)),Ct.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Ct.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=nt(e.scrollbarSliderBackground,Ct.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=nt(e.scrollbarSliderHoverBackground,Ct.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=nt(e.scrollbarSliderActiveBackground,Ct.opacity(t.foreground,.5)),t.overviewRulerBorder=nt(e.overviewRulerBorder,FX),t.ansi=nr.slice(),t.ansi[0]=nt(e.black,nr[0]),t.ansi[1]=nt(e.red,nr[1]),t.ansi[2]=nt(e.green,nr[2]),t.ansi[3]=nt(e.yellow,nr[3]),t.ansi[4]=nt(e.blue,nr[4]),t.ansi[5]=nt(e.magenta,nr[5]),t.ansi[6]=nt(e.cyan,nr[6]),t.ansi[7]=nt(e.white,nr[7]),t.ansi[8]=nt(e.brightBlack,nr[8]),t.ansi[9]=nt(e.brightRed,nr[9]),t.ansi[10]=nt(e.brightGreen,nr[10]),t.ansi[11]=nt(e.brightYellow,nr[11]),t.ansi[12]=nt(e.brightBlue,nr[12]),t.ansi[13]=nt(e.brightMagenta,nr[13]),t.ansi[14]=nt(e.brightCyan,nr[14]),t.ansi[15]=nt(e.brightWhite,nr[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let o=0;o<r;o++)t.ansi[o+16]=nt(e.extendedAnsi[o],nr[o+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){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[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(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()}}};pC=Ut([J(0,oo)],pC);function nt(e,t){if(e!==void 0)try{return Nt.toColor(e)}catch{}return t}var HX=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},UX=class{constructor(){this._services=new HX,this._services.set(_C,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=aG(e).sort((n,s)=>n.index-s.index),o=[];for(let n of r){let s=this._services.get(n.id);if(!s)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${n.id._id}.`);o.push(s)}let i=r.length>0?r[0].index:t.length;if(t.length!==i)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...o)}},$X={trace:0,debug:1,info:2,warn:3,error:4,off:5},jX="xterm.js: ",dC=class extends xe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),WX=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=$X[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":jX)+t,...r)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};dC=Ut([J(0,oo)],dC);var WX,I5=class extends xe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new G),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new G),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new G),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,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(e,t,...r){if(t){for(let o=e;o<this._length-t;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let o=this._length-1;o>=e;o--)this._array[this._getCyclicIndex(o+r.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<r.length;o++)this._array[this._getCyclicIndex(e+o)]=r[o];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let o=this._length+r.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let i=t-1;i>=0;i--)this.set(e+i+r,this.get(e+i));let o=e+t+r-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<t;o++)this.set(e+o+r,this.get(e+o))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Ce=3,er=Object.freeze(new Ah),hb=0,O1=2,Ch=class Z3{constructor(t,r,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Ce);let i=r||bi.fromCharData([0,a3,1,0]);for(let n=0;n<t;++n)this.setCell(n,i);this.length=t}get(t){let r=this._data[t*Ce+0],o=r&2097151;return[this._data[t*Ce+1],r&2097152?this._combined[t]:o?ma(o):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):o]}set(t,r){this._data[t*Ce+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Ce+0]=t|2097152|r[2]<<22):this._data[t*Ce+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Ce+0]>>22}hasWidth(t){return this._data[t*Ce+0]&12582912}getFg(t){return this._data[t*Ce+1]}getBg(t){return this._data[t*Ce+2]}hasContent(t){return this._data[t*Ce+0]&4194303}getCodePoint(t){let r=this._data[t*Ce+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Ce+0]&2097152}getString(t){let r=this._data[t*Ce+0];return r&2097152?this._combined[t]:r&2097151?ma(r&2097151):""}isProtected(t){return this._data[t*Ce+2]&536870912}loadCell(t,r){return hb=t*Ce,r.content=this._data[hb+0],r.fg=this._data[hb+1],r.bg=this._data[hb+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Ce+0]=r.content,this._data[t*Ce+1]=r.fg,this._data[t*Ce+2]=r.bg}setCellFromCodepoint(t,r,o,i){i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Ce+0]=r|o<<22,this._data[t*Ce+1]=i.fg,this._data[t*Ce+2]=i.bg}addCodepointToCell(t,r,o){let i=this._data[t*Ce+0];i&2097152?this._combined[t]+=ma(r):i&2097151?(this._combined[t]=ma(i&2097151)+ma(r),i&=-2097152,i|=2097152):i=r|1<<22,o&&(i&=-12582913,i|=o<<22),this._data[t*Ce+0]=i}insertCells(t,r,o){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,o),r<this.length-t){let i=new bi;for(let n=this.length-t-r-1;n>=0;--n)this.setCell(t+r+n,this.loadCell(t+n,i));for(let n=0;n<r;++n)this.setCell(t+n,o)}else for(let i=t;i<this.length;++i)this.setCell(i,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(t,r,o){if(t%=this.length,r<this.length-t){let i=new bi;for(let n=0;n<this.length-t-r;++n)this.setCell(t+n,this.loadCell(t+r+n,i));for(let n=this.length-r;n<this.length;++n)this.setCell(n,o)}else for(let i=t;i<this.length;++i)this.setCell(i,o);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,o),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,o)}replaceCells(t,r,o,i=!1){if(i){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,o),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,o);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,o),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,o),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,o);t<r&&t<this.length;)this.setCell(t++,o)}resize(t,r){if(t===this.length)return this._data.length*4*O1<this._data.buffer.byteLength;let o=t*Ce;if(t>this.length){if(this._data.buffer.byteLength>=o*4)this._data=new Uint32Array(this._data.buffer,0,o);else{let i=new Uint32Array(o);i.set(this._data),this._data=i}for(let i=this.length;i<t;++i)this.setCell(i,r)}else{this._data=this._data.subarray(0,o);let i=Object.keys(this._combined);for(let s=0;s<i.length;s++){let a=parseInt(i[s],10);a>=t&&delete this._combined[a]}let n=Object.keys(this._extendedAttrs);for(let s=0;s<n.length;s++){let a=parseInt(n[s],10);a>=t&&delete this._extendedAttrs[a]}}return this.length=t,o*4*O1<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*O1<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,t);return}this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new Z3(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ce+0]&4194303)return t+(this._data[t*Ce+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ce+0]&4194303||this._data[t*Ce+2]&50331648)return t+(this._data[t*Ce+0]>>22);return 0}copyCellsFrom(t,r,o,i,n){let s=t._data;if(n)for(let l=i-1;l>=0;l--){for(let c=0;c<Ce;c++)this._data[(o+l)*Ce+c]=s[(r+l)*Ce+c];s[(r+l)*Ce+2]&268435456&&(this._extendedAttrs[o+l]=t._extendedAttrs[r+l])}else for(let l=0;l<i;l++){for(let c=0;c<Ce;c++)this._data[(o+l)*Ce+c]=s[(r+l)*Ce+c];s[(r+l)*Ce+2]&268435456&&(this._extendedAttrs[o+l]=t._extendedAttrs[r+l])}let a=Object.keys(t._combined);for(let l=0;l<a.length;l++){let c=parseInt(a[l],10);c>=r&&(this._combined[c-r+o]=t._combined[c])}}translateToString(t,r,o,i){r=r??0,o=o??this.length,t&&(o=Math.min(o,this.getTrimmedLength())),i&&(i.length=0);let n="";for(;r<o;){let s=this._data[r*Ce+0],a=s&2097151,l=s&2097152?this._combined[r]:a?ma(a):ya;if(n+=l,i)for(let c=0;c<l.length;++c)i.push(r);r+=s>>22||1}return i&&i.push(r),n}};function VX(e,t,r,o,i,n){let s=[];for(let a=0;a<e.length-1;a++){let l=a,c=e.get(++l);if(!c.isWrapped)continue;let u=[e.get(a)];for(;l<e.length&&c.isWrapped;)u.push(c),c=e.get(++l);if(!n&&o>=a&&o<l){a+=u.length-1;continue}let p=0,f=Mh(u,p,t),d=1,h=0;for(;d<u.length;){let b=Mh(u,d,t),m=b-h,g=r-f,v=Math.min(m,g);u[p].copyCellsFrom(u[d],h,f,v,!1),f+=v,f===r&&(p++,f=0),h+=v,h===b&&(d++,h=0),f===0&&p!==0&&u[p-1].getWidth(r-1)===2&&(u[p].copyCellsFrom(u[p-1],r-1,f++,1,!1),u[p-1].setCell(r-1,i))}u[p].replaceCells(f,r,i);let y=0;for(let b=u.length-1;b>0&&(b>p||u[b].getTrimmedLength()===0);b--)y++;y>0&&(s.push(a+u.length-y),s.push(y)),a+=u.length-1}return s}function qX(e,t){let r=[],o=0,i=t[o],n=0;for(let s=0;s<e.length;s++)if(i===s){let a=t[++o];e.onDeleteEmitter.fire({index:s-n,amount:a}),s+=a-1,n+=a,i=t[++o]}else r.push(s);return{layout:r,countRemoved:n}}function KX(e,t){let r=[];for(let o=0;o<t.length;o++)r.push(e.get(t[o]));for(let o=0;o<r.length;o++)e.set(o,r[o]);e.length=t.length}function GX(e,t,r){let o=[],i=e.map((l,c)=>Mh(e,c,t)).reduce((l,c)=>l+c),n=0,s=0,a=0;for(;a<i;){if(i-a<r){o.push(i-a);break}n+=r;let l=Mh(e,s,t);n>l&&(n-=l,s++);let c=e[s].getWidth(n-1)===2;c&&n--;let u=c?r-1:r;o.push(u),a+=u}return o}function Mh(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let o=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,i=e[t+1].getWidth(0)===2;return o&&i?r-1:r}var Q3=class J3{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=J3._nextId++,this._onDispose=this.register(new G),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),ql(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};Q3._nextId=1;var YX=Q3,ar={},jl=ar.B;ar[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"};ar.A={"#":"\xA3"};ar.B=void 0;ar[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"};ar.C=ar[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};ar.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"};ar.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"};ar.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"};ar.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"};ar.E=ar[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"};ar.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"};ar.H=ar[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};ar["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"};var z5=4294967295,F5=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=er.clone(),this.savedCharset=jl,this.markers=[],this._nullCell=bi.fromCharData([0,a3,1,0]),this._whitespaceCell=bi.fromCharData([0,ya,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Mb,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new I5(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new wb),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new wb),this._whitespaceCell}getBlankLine(e,t){return new Ch(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>z5?z5:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=er);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new I5(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(er),o=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let s=0;s<this.lines.length;s++)o+=+this.lines.get(s).resize(e,r);let n=0;if(this._rows<t)for(let s=this._rows;s<t;s++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Ch(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+n+1?(this.ybase--,n++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ch(e,r)));else for(let s=this._rows;s>t;s--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let s=this.lines.length-i;s>0&&(this.lines.trimStart(s),this.ybase=Math.max(this.ybase-s,0),this.ydisp=Math.max(this.ydisp-s,0),this.savedY=Math.max(this.savedY-s,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),n&&(this.y+=n),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let n=0;n<this.lines.length;n++)o+=+this.lines.get(n).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),o>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,o=VX(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(er),r);if(o.length>0){let i=qX(this.lines,o);KX(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let o=this.getNullCell(er),i=r;for(;i-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Ch(e,o))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,o=this.getNullCell(er),i=[],n=0;for(let s=this.lines.length-1;s>=0;s--){let a=this.lines.get(s);if(!a||!a.isWrapped&&a.getTrimmedLength()<=e)continue;let l=[a];for(;a.isWrapped&&s>0;)a=this.lines.get(--s),l.unshift(a);if(!r){let v=this.ybase+this.y;if(v>=s&&v<s+l.length)continue}let c=l[l.length-1].getTrimmedLength(),u=GX(l,this._cols,e),p=u.length-l.length,f;this.ybase===0&&this.y!==this.lines.length-1?f=Math.max(0,this.y-this.lines.maxLength+p):f=Math.max(0,this.lines.length-this.lines.maxLength+p);let d=[];for(let v=0;v<p;v++){let _=this.getBlankLine(er,!0);d.push(_)}d.length>0&&(i.push({start:s+l.length+n,newLines:d}),n+=d.length),l.push(...d);let h=u.length-1,y=u[h];y===0&&(h--,y=u[h]);let b=l.length-p-1,m=c;for(;b>=0;){let v=Math.min(m,y);if(l[h]===void 0)break;if(l[h].copyCellsFrom(l[b],m-v,y-v,v,!0),y-=v,y===0&&(h--,y=u[h]),m-=v,m===0){b--;let _=Math.max(b,0);m=Mh(l,_,this._cols)}}for(let v=0;v<l.length;v++)u[v]<e&&l[v].setCell(u[v],o);let g=p-f;for(;g-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+n)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+p,this.ybase+t-1)}if(i.length>0){let s=[],a=[];for(let y=0;y<this.lines.length;y++)a.push(this.lines.get(y));let l=this.lines.length,c=l-1,u=0,p=i[u];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+n);let f=0;for(let y=Math.min(this.lines.maxLength-1,l+n-1);y>=0;y--)if(p&&p.start>c+f){for(let b=p.newLines.length-1;b>=0;b--)this.lines.set(y--,p.newLines[b]);y++,s.push({index:c+1,amount:p.newLines.length}),f+=p.newLines.length,p=i[++u]}else this.lines.set(y,a[c--]);let d=0;for(let y=s.length-1;y>=0;y--)s[y].index+=d,this.lines.onInsertEmitter.fire(s[y]),d+=s[y].amount;let h=Math.max(0,l+n-this.lines.maxLength);h>0&&this.lines.onTrimEmitter.fire(h)}}translateBufferLineToString(e,t,r=0,o){let i=this.lines.get(e);return i?i.translateToString(t,r,o):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new YX(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},XX=class extends xe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new G),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 F5(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new F5(!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(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},eI=2,tI=1,fC=class extends xe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new G),this.onResize=this._onResize.event,this._onScroll=this._register(new G),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,eI),this.rows=Math.max(e.rawOptions.rows||0,tI),this.buffers=this._register(new XX(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,o=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:o})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,o;o=this._cachedBlankLine,(!o||o.length!==this.cols||o.getFg(0)!==e.fg||o.getBg(0)!==e.bg)&&(o=r.getBlankLine(e,t),this._cachedBlankLine=o),o.isWrapped=t;let i=r.ybase+r.scrollTop,n=r.ybase+r.scrollBottom;if(r.scrollTop===0){let s=r.lines.isFull;n===r.lines.length-1?s?r.lines.recycle().copyFrom(o):r.lines.push(o.clone()):r.lines.splice(n+1,0,o.clone()),s?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let s=n-i+1;r.lines.shiftElements(i+1,s-1,-1),r.lines.set(n,o.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let o=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),o!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};fC=Ut([J(0,oo)],fC);var wp={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Db,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},ZX=["normal","bold","100","200","300","400","500","600","700","800","900"],QX=class extends xe{constructor(e){super(),this._onOptionChange=this._register(new G),this.onOptionChange=this._onOptionChange.event;let t={...wp};for(let r in e)if(r in t)try{let o=e[r];t[r]=this._sanitizeAndValidateOption(r,o)}catch(o){console.error(o)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(wt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in wp))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,o)=>{if(!(r in wp))throw new Error(`No option with key "${r}"`);o=this._sanitizeAndValidateOption(r,o),this.rawOptions[r]!==o&&(this.rawOptions[r]=o,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let o={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,o)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=wp[e]),!JX(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=wp[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=ZX.includes(t)?t:wp[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function JX(e){return e==="block"||e==="underline"||e==="bar"}function wh(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let o in e)r[o]=t<=1?e[o]:e[o]&&wh(e[o],t-1);return r}var H5=Object.freeze({insertMode:!1}),U5=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),hC=class extends xe{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new G),this.onData=this._onData.event,this._onUserInput=this._register(new G),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new G),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new G),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=wh(H5),this.decPrivateModes=wh(U5)}reset(){this.modes=wh(H5),this.decPrivateModes=wh(U5)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(o=>o.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};hC=Ut([J(0,ro),J(1,d3),J(2,oo)],hC);var $5={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function D1(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var M1=String.fromCharCode,j5={DEFAULT:e=>{let t=[D1(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${M1(t[0])}${M1(t[1])}${M1(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${D1(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${D1(e,!0)};${e.x};${e.y}${t}`}},mC=class extends xe{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new G),this.onProtocolChange=this._onProtocolChange.event;for(let o of Object.keys($5))this.addProtocol(o,$5[o]);for(let o of Object.keys(j5))this.addEncoding(o,j5[o]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let o=t/r,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=o+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};mC=Ut([J(0,ro),J(1,Gl),J(2,oo)],mC);var A1=[[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]],eZ=[[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]],sr;function tZ(e,t){let r=0,o=t.length-1,i;if(e<t[0][0]||e>t[o][1])return!1;for(;o>=r;)if(i=r+o>>1,e>t[i][1])r=i+1;else if(e<t[i][0])o=i-1;else return!0;return!1}var rZ=class{constructor(){if(this.version="6",!sr){sr=new Uint8Array(65536),sr.fill(1),sr[0]=0,sr.fill(0,1,32),sr.fill(0,127,160),sr.fill(2,4352,4448),sr[9001]=2,sr[9002]=2,sr.fill(2,11904,42192),sr[12351]=1,sr.fill(2,44032,55204),sr.fill(2,63744,64256),sr.fill(2,65040,65050),sr.fill(2,65072,65136),sr.fill(2,65280,65377),sr.fill(2,65504,65511);for(let e=0;e<A1.length;++e)sr.fill(0,A1[e][0],A1[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?sr[e]:tZ(e,eZ)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),o=r===0&&t!==0;if(o){let i=Wl.extractWidth(t);i===0?o=!1:i>r&&(r=i)}return Wl.createPropertyValue(0,r,o)}},Wl=class Cb{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new G,this.onChange=this._onChange.event;let t=new rZ;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,o=!1){return(t&16777215)<<3|(r&3)<<1|(o?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,o=0,i=t.length;for(let n=0;n<i;++n){let s=t.charCodeAt(n);if(55296<=s&&s<=56319){if(++n>=i)return r+this.wcwidth(s);let c=t.charCodeAt(n);56320<=c&&c<=57343?s=(s-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let a=this.charProperties(s,o),l=Cb.extractWidth(a);Cb.extractShouldJoin(a)&&(l-=Cb.extractWidth(o)),r+=l,o=a}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},oZ=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function W5(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var vh=2147483647,iZ=256,rI=class yC{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>iZ)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new yC;if(!t.length)return r;for(let o=Array.isArray(t[0])?1:0;o<t.length;++o){let i=t[o];if(Array.isArray(i))for(let n=0;n<i.length;++n)r.addSubParam(i[n]);else r.addParam(i)}return r}clone(){let t=new yC(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let o=this._subParamsIdx[r]>>8,i=this._subParamsIdx[r]&255;i-o>0&&t.push(Array.prototype.slice.call(this._subParams,o,i))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>vh?vh:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>vh?vh:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,o=this._subParamsIdx[t]&255;return o-r>0?this._subParams.subarray(r,o):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let o=this._subParamsIdx[r]>>8,i=this._subParamsIdx[r]&255;i-o>0&&(t[r]=this._subParams.slice(o,i))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let o=this._digitIsSub?this._subParams:this.params,i=o[r-1];o[r-1]=~i?Math.min(i*10+t,vh):t}},bh=[],nZ=class{constructor(){this._state=0,this._active=bh,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=bh}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=bh,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||bh,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",Bb(e,t,r));else for(let o=this._active.length-1;o>=0;o--)this._active[o].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let o=e[t++];if(o===59){this._state=2,this._start();break}if(o<48||57<o){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+o-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,o=this._active.length-1,i=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,r=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&r===!1){for(;o>=0&&(r=this._active[o].end(e),r!==!0);o--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,r;o--}for(;o>=0;o--)if(r=this._active[o].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,r}this._active=bh,this._id=-1,this._state=0}}},jo=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=Bb(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},_h=[],sZ=class{constructor(){this._handlers=Object.create(null),this._active=_h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_h}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=_h,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||_h,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",Bb(e,t,r));else for(let o=this._active.length-1;o>=0;o--)this._active[o].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,o=this._active.length-1,i=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,r=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&r===!1){for(;o>=0&&(r=this._active[o].unhook(e),r!==!0);o--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,r;o--}for(;o>=0;o--)if(r=this._active[o].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,r}this._active=_h,this._ident=0}},Rh=new rI;Rh.addParam(0);var V5=class{constructor(e){this._handler=e,this._data="",this._params=Rh,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Rh,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=Bb(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=Rh,this._data="",this._hitLimit=!1,r));return this._params=Rh,this._data="",this._hitLimit=!1,t}},aZ=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,o){this.table[t<<8|e]=r<<4|o}addMany(e,t,r,o){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=r<<4|o}},vi=160,lZ=(function(){let e=new aZ(4095),t=Array.apply(null,Array(256)).map((a,l)=>l),r=(a,l)=>t.slice(a,l),o=r(32,127),i=r(0,24);i.push(25),i.push.apply(i,r(28,32));let n=r(0,14),s;e.setDefault(1,0),e.addMany(o,0,2,0);for(s in n)e.addMany([24,26,153,154],s,3,0),e.addMany(r(128,144),s,3,0),e.addMany(r(144,152),s,3,0),e.add(156,s,0,0),e.add(27,s,11,1),e.add(157,s,4,8),e.addMany([152,158,159],s,0,7),e.add(155,s,11,3),e.add(144,s,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(o,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(o,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(o,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(vi,0,2,0),e.add(vi,8,5,8),e.add(vi,6,0,6),e.add(vi,11,0,11),e.add(vi,13,13,13),e})(),cZ=class extends xe{constructor(e=lZ){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new rI,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,o)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(wt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new nZ),this._dcsParser=this._register(new sZ),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let i=0;i<e.intermediates.length;++i){let n=e.intermediates.charCodeAt(i);if(32>n||n>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=n}}if(e.final.length!==1)throw new Error("final must be a single byte");let o=e.final.charCodeAt(0);if(t[0]>o||o>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=o,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let o=this._escHandlers[r];return o.push(t),{dispose:()=>{let i=o.indexOf(t);i!==-1&&o.splice(i,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let o=this._csiHandlers[r];return o.push(t),{dispose:()=>{let i=o.indexOf(t);i!==-1&&o.splice(i,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}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(e,t,r,o,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=o,this._parseStack.chunkPos=i}parse(e,t,r){let o=0,i=0,n=0,s;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,n=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let a=this._parseStack.handlers,l=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&l>-1){for(;l>=0&&(s=a[l](this._params),s!==!0);l--)if(s instanceof Promise)return this._parseStack.handlerPos=l,s}this._parseStack.handlers=[];break;case 4:if(r===!1&&l>-1){for(;l>=0&&(s=a[l](),s!==!0);l--)if(s instanceof Promise)return this._parseStack.handlerPos=l,s}this._parseStack.handlers=[];break;case 6:if(o=e[this._parseStack.chunkPos],s=this._dcsParser.unhook(o!==24&&o!==26,r),s)return s;o===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(o=e[this._parseStack.chunkPos],s=this._oscParser.end(o!==24&&o!==26,r),s)return s;o===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,n=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let a=n;a<t;++a){switch(o=e[a],i=this._transitions.table[this.currentState<<8|(o<160?o:vi)],i>>4){case 2:for(let f=a+1;;++f){if(f>=t||(o=e[f])<32||o>126&&o<vi){this._printHandler(e,a,f),a=f-1;break}if(++f>=t||(o=e[f])<32||o>126&&o<vi){this._printHandler(e,a,f),a=f-1;break}if(++f>=t||(o=e[f])<32||o>126&&o<vi){this._printHandler(e,a,f),a=f-1;break}if(++f>=t||(o=e[f])<32||o>126&&o<vi){this._printHandler(e,a,f),a=f-1;break}}break;case 3:this._executeHandlers[o]?this._executeHandlers[o]():this._executeHandlerFb(o),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:a,code:o,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let l=this._csiHandlers[this._collect<<8|o],c=l?l.length-1:-1;for(;c>=0&&(s=l[c](this._params),s!==!0);c--)if(s instanceof Promise)return this._preserveStack(3,l,c,i,a),s;c<0&&this._csiHandlerFb(this._collect<<8|o,this._params),this.precedingJoinState=0;break;case 8:do switch(o){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(o-48)}while(++a<t&&(o=e[a])>47&&o<60);a--;break;case 9:this._collect<<=8,this._collect|=o;break;case 10:let u=this._escHandlers[this._collect<<8|o],p=u?u.length-1:-1;for(;p>=0&&(s=u[p](),s!==!0);p--)if(s instanceof Promise)return this._preserveStack(4,u,p,i,a),s;p<0&&this._escHandlerFb(this._collect<<8|o),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|o,this._params);break;case 13:for(let f=a+1;;++f)if(f>=t||(o=e[f])===24||o===26||o===27||o>127&&o<vi){this._dcsParser.put(e,a,f),a=f-1;break}break;case 14:if(s=this._dcsParser.unhook(o!==24&&o!==26),s)return this._preserveStack(6,[],0,i,a),s;o===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let f=a+1;;f++)if(f>=t||(o=e[f])<32||o>127&&o<vi){this._oscParser.put(e,a,f),a=f-1;break}break;case 6:if(s=this._oscParser.end(o!==24&&o!==26),s)return this._preserveStack(5,[],0,i,a),s;o===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&15}}},uZ=/^([\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})$/,pZ=/^[\da-f]+$/;function q5(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=uZ.exec(t);if(r){let o=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/o*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/o*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/o*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),pZ.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,o=[0,0,0];for(let i=0;i<3;++i){let n=parseInt(t.slice(r*i,r*i+r),16);o[i]=r===1?n<<4:r===2?n:r===3?n>>4:n>>8}return o}}function B1(e,t){let r=e.toString(16),o=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return o;case 12:return(o+o).slice(0,3);default:return o+o}}function dZ(e,t=16){let[r,o,i]=e;return`rgb:${B1(r,t)}/${B1(o,t)}/${B1(i,t)}`}var fZ={"(":0,")":1,"*":2,"+":3,"-":1,".":2},ha=131072,K5=10;function G5(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Y5=5e3,X5=0,hZ=class extends xe{constructor(e,t,r,o,i,n,s,a,l=new cZ){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=o,this._optionsService=i,this._oscLinkService=n,this._coreMouseService=s,this._unicodeService=a,this._parser=l,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new nG,this._utf8Decoder=new sG,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=er.clone(),this._eraseAttrDataInternal=er.clone(),this._onRequestBell=this._register(new G),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new G),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new G),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new G),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new G),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new G),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new G),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new G),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new G),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new G),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new G),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new G),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new G),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 gC(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,u)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:u.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,u,p)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:u,data:p})}),this._parser.setDcsHandlerFallback((c,u,p)=>{u==="HOOK"&&(p=p.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:u,payload:p})}),this._parser.setPrintHandler((c,u,p)=>this.print(c,u,p)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler($.BEL,()=>this.bell()),this._parser.setExecuteHandler($.LF,()=>this.lineFeed()),this._parser.setExecuteHandler($.VT,()=>this.lineFeed()),this._parser.setExecuteHandler($.FF,()=>this.lineFeed()),this._parser.setExecuteHandler($.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler($.BS,()=>this.backspace()),this._parser.setExecuteHandler($.HT,()=>this.tab()),this._parser.setExecuteHandler($.SO,()=>this.shiftOut()),this._parser.setExecuteHandler($.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(xb.IND,()=>this.index()),this._parser.setExecuteHandler(xb.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(xb.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new jo(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new jo(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new jo(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new jo(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new jo(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new jo(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new jo(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new jo(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new jo(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new jo(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new jo(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new jo(c=>this.restoreCursorColor(c))),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(let c in ar)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new V5((c,u)=>this.requestStatusString(c,u)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,o){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=o}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),Y5))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Y5} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,o=this._activeBuffer.x,i=this._activeBuffer.y,n=0,s=this._parseStack.paused;if(s){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;o=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>ha&&(n=this._parseStack.position+ha)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<ha&&(this._parseBuffer=new Uint32Array(Math.min(e.length,ha))),s||this._dirtyRowTracker.clearRange(),e.length>ha)for(let c=n;c<e.length;c+=ha){let u=c+ha<e.length?c+ha:e.length,p=typeof e=="string"?this._stringDecoder.decode(e.substring(c,u),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,u),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,p))return this._preserveStack(o,i,p,c),this._logSlowResolvingAsync(r),r}else if(!s){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,c))return this._preserveStack(o,i,c,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==o||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let a=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(l,this._bufferService.rows-1),end:Math.min(a,this._bufferService.rows-1)})}print(e,t,r){let o,i,n=this._charsetService.charset,s=this._optionsService.rawOptions.screenReaderMode,a=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,u=this._curAttrData,p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&p.getWidth(this._activeBuffer.x-1)===2&&p.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let f=this._parser.precedingJoinState;for(let d=t;d<r;++d){if(o=e[d],o<127&&n){let m=n[String.fromCharCode(o)];m&&(o=m.charCodeAt(0))}let h=this._unicodeService.charProperties(o,f);i=Wl.extractWidth(h);let y=Wl.extractShouldJoin(h),b=y?Wl.extractWidth(f):0;if(f=h,s&&this._onA11yChar.fire(ma(o)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-b>a){if(l){let m=p,g=this._activeBuffer.x-b;for(this._activeBuffer.x=b,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),p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),b>0&&p instanceof Ch&&p.copyCellsFrom(m,g,0,b,!1);g<a;)m.setCellFromCodepoint(g++,0,1,u)}else if(this._activeBuffer.x=a-1,i===2)continue}if(y&&this._activeBuffer.x){let m=p.getWidth(this._activeBuffer.x-1)?1:2;p.addCodepointToCell(this._activeBuffer.x-m,o,i);for(let g=i-b;--g>=0;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(c&&(p.insertCells(this._activeBuffer.x,i-b,this._activeBuffer.getNullCell(u)),p.getWidth(a-1)===2&&p.setCellFromCodepoint(a-1,0,1,u)),p.setCellFromCodepoint(this._activeBuffer.x++,o,i,u),i>0)for(;--i;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=f,this._activeBuffer.x<a&&r-t>0&&p.getWidth(this._activeBuffer.x)===0&&!p.hasContent(this._activeBuffer.x)&&p.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>G5(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new V5(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new jo(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;let 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;let 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){let 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){let 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){let 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){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,o=!1,i=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),i),o&&(n.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+r)?.getTrimmedLength(););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let o=this._activeBuffer.lines.length-this._bufferService.rows;o>0&&(this._activeBuffer.lines.trimStart(o),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-o,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-o,0),this._onScroll.fire(0));break}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);break}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;let r=this._activeBuffer.ybase+this._activeBuffer.y,o=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-o+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(r,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;let r=this._activeBuffer.ybase+this._activeBuffer.y,o;for(o=this._bufferService.rows-1-this._activeBuffer.scrollBottom,o=this._bufferService.rows-1+this._activeBuffer.ybase-o;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(o,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let 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();let 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(er));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;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);o.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),o.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;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);o.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),o.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;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);o.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),o.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;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);o.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),o.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let 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){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,o=Wl.extractWidth(t),i=this._activeBuffer.x-o,n=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),s=new Uint32Array(n.length*r),a=0;for(let c=0;c<n.length;){let u=n.codePointAt(c)||0;s[a++]=u,c+=u>65535?2:1}let l=a;for(let c=1;c<r;++c)s.copyWithin(l,0,a),l+=a;return this.print(s,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent($.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent($.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent($.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent($.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent($.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;break}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,jl),this._charsetService.setgCharset(1,jl),this._charsetService.setgCharset(2,jl),this._charsetService.setgCharset(3,jl);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(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}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;break}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:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";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(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(y=>(y[y.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",y[y.SET=1]="SET",y[y.RESET=2]="RESET",y[y.PERMANENTLY_SET=3]="PERMANENTLY_SET",y[y.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(r={}));let o=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:n}=this._coreMouseService,s=this._coreService,{buffers:a,cols:l}=this._bufferService,{active:c,alt:u}=a,p=this._optionsService.rawOptions,f=(y,b)=>(s.triggerDataEvent(`${$.ESC}[${t?"":"?"}${y};${b}$y`),!0),d=y=>y?1:2,h=e.params[0];return t?h===2?f(h,4):h===4?f(h,d(s.modes.insertMode)):h===12?f(h,3):h===20?f(h,d(p.convertEol)):f(h,0):h===1?f(h,d(o.applicationCursorKeys)):h===3?f(h,p.windowOptions.setWinLines?l===80?2:l===132?1:0:0):h===6?f(h,d(o.origin)):h===7?f(h,d(o.wraparound)):h===8?f(h,3):h===9?f(h,d(i==="X10")):h===12?f(h,d(p.cursorBlink)):h===25?f(h,d(!s.isCursorHidden)):h===45?f(h,d(o.reverseWraparound)):h===66?f(h,d(o.applicationKeypad)):h===67?f(h,4):h===1e3?f(h,d(i==="VT200")):h===1002?f(h,d(i==="DRAG")):h===1003?f(h,d(i==="ANY")):h===1004?f(h,d(o.sendFocus)):h===1005?f(h,4):h===1006?f(h,d(n==="SGR")):h===1015?f(h,4):h===1016?f(h,d(n==="SGR_PIXELS")):h===1048?f(h,1):h===47||h===1047||h===1049?f(h,d(c===u)):h===2004?f(h,d(o.bracketedPasteMode)):h===2026?f(h,d(o.synchronizedOutput)):f(h,0)}_updateAttrColor(e,t,r,o,i){return t===2?(e|=50331648,e&=-16777216,e|=Ah.fromColorRGB([r,o,i])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let o=[0,0,-1,0,0,0],i=0,n=0;do{if(o[n+i]=e.params[t+n],e.hasSubParams(t+n)){let s=e.getSubParams(t+n),a=0;do o[1]===5&&(i=1),o[n+a+1+i]=s[a];while(++a<s.length&&a+n+1+i<o.length);break}if(o[1]===5&&n+i>=2||o[1]===2&&n+i>=5)break;o[1]&&(i=1)}while(++n+t<e.length&&n+i<o.length);for(let s=2;s<o.length;++s)o[s]===-1&&(o[s]=0);switch(o[0]){case 38:r.fg=this._updateAttrColor(r.fg,o[1],o[3],o[4],o[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,o[1],o[3],o[4],o[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,o[1],o[3],o[4],o[5])}return n}_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=er.fg,e.bg=er.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;let t=e.length,r,o=this._curAttrData;for(let i=0;i<t;i++)r=e.params[i],r>=30&&r<=37?(o.fg&=-50331904,o.fg|=16777216|r-30):r>=40&&r<=47?(o.bg&=-50331904,o.bg|=16777216|r-40):r>=90&&r<=97?(o.fg&=-50331904,o.fg|=16777216|r-90|8):r>=100&&r<=107?(o.bg&=-50331904,o.bg|=16777216|r-100|8):r===0?this._processSGR0(o):r===1?o.fg|=134217728:r===3?o.bg|=67108864:r===4?(o.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,o)):r===5?o.fg|=536870912:r===7?o.fg|=67108864:r===8?o.fg|=1073741824:r===9?o.fg|=2147483648:r===2?o.bg|=134217728:r===21?this._processUnderline(2,o):r===22?(o.fg&=-134217729,o.bg&=-134217729):r===23?o.bg&=-67108865:r===24?(o.fg&=-268435457,this._processUnderline(0,o)):r===25?o.fg&=-536870913:r===27?o.fg&=-67108865:r===28?o.fg&=-1073741825:r===29?o.fg&=2147483647:r===39?(o.fg&=-67108864,o.fg|=er.fg&16777215):r===49?(o.bg&=-67108864,o.bg|=er.bg&16777215):r===38||r===48||r===58?i+=this._extractColor(e,i,o):r===53?o.bg|=1073741824:r===55?o.bg&=-1073741825:r===59?(o.extended=o.extended.clone(),o.extended.underlineColor=-1,o.updateExtended()):r===100?(o.fg&=-67108864,o.fg|=er.fg&16777215,o.bg&=-67108864,o.bg|=er.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${$.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${$.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${$.ESC}[?${t};${r}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}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=er.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){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!G5(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${$.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>K5&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>K5&&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());break}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){let t=[],r=e.split(";");for(;r.length>1;){let o=r.shift(),i=r.shift();if(/^\d+$/.exec(o)){let n=parseInt(o);if(Z5(n))if(i==="?")t.push({type:0,index:n});else{let s=q5(i);s&&t.push({type:1,index:n,color:s})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),o=e.slice(t+1);return o?this._createHyperlink(r,o):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),o,i=r.findIndex(n=>n.startsWith("id="));return i!==-1&&(o=r[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:o,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){let r=e.split(";");for(let o=0;o<r.length&&!(t>=this._specialColors.length);++o,++t)if(r[o]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let i=q5(r[o]);i&&this._onColor.fire([{type:1,index:this._specialColors[t],color:i}])}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;let t=[],r=e.split(";");for(let o=0;o<r.length;++o)if(/^\d+$/.exec(r[o])){let i=parseInt(r[o]);Z5(i)&&t.push({type:2,index:i})}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,jl),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(fZ[e[0]],ar[e[1]]||jl),!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){let 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=er.clone(),this._eraseAttrDataInternal=er.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new bi;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,o=this._activeBuffer.lines.get(r);o&&(o.fill(e),o.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=s=>(this._coreService.triggerDataEvent(`${$.ESC}${s}${$.ESC}\\`),!0),o=this._bufferService.buffer,i=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${o.scrollTop+1};${o.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-(i.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},gC=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(X5=e,e=t,t=X5),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};gC=Ut([J(0,ro)],gC);function Z5(e){return 0<=e&&e<256}var mZ=5e7,Q5=12,yZ=50,gZ=class extends xe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new G),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>mZ)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let o=this._writeBuffer[this._bufferOffset],i=this._action(o,t);if(i){let s=a=>performance.now()-r>=Q5?setTimeout(()=>this._innerWrite(0,a)):this._innerWrite(r,a);i.catch(a=>(queueMicrotask(()=>{throw a}),Promise.resolve(!1))).then(s);return}let n=this._callbacks[this._bufferOffset];if(n&&n(),this._bufferOffset++,this._pendingData-=o.length,performance.now()-r>=Q5)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>yZ&&(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()}},vC=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let a=t.addMarker(t.ybase+t.y),l={data:e,id:this._nextId++,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(l,a)),this._dataByLinkId.set(l.id,l),l.id}let r=e,o=this._getEntryIdKey(r),i=this._entriesWithId.get(o);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let n=t.addMarker(t.ybase+t.y),s={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(s,n)),this._entriesWithId.set(s.key,s),this._dataByLinkId.set(s.id,s),s.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(o=>o.line!==t)){let o=this._bufferService.buffer.addMarker(t);r.lines.push(o),o.onDispose(()=>this._removeMarkerFromLink(r,o))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};vC=Ut([J(0,ro)],vC);var J5=!1,vZ=class extends xe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Pp),this._onBinary=this._register(new G),this.onBinary=this._onBinary.event,this._onData=this._register(new G),this.onData=this._onData.event,this._onLineFeed=this._register(new G),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new G),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new G),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new G),this._instantiationService=new UX,this.optionsService=this._register(new QX(e)),this._instantiationService.setService(oo,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(fC)),this._instantiationService.setService(ro,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(dC)),this._instantiationService.setService(d3,this._logService),this.coreService=this._register(this._instantiationService.createInstance(hC)),this._instantiationService.setService(Gl,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(mC)),this._instantiationService.setService(p3,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Wl)),this._instantiationService.setService(uG,this.unicodeService),this._charsetService=this._instantiationService.createInstance(oZ),this._instantiationService.setService(cG,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(vC),this._instantiationService.setService(f3,this._oscLinkService),this._inputHandler=this._register(new hZ(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(Lr.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(Lr.forward(this._bufferService.onResize,this._onResize)),this._register(Lr.forward(this.coreService.onData,this._onData)),this._register(Lr.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new gZ((t,r)=>this._inputHandler.parse(t,r))),this._register(Lr.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new G),this._onScroll.event(e=>{this._onScrollApi?.fire(e.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(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!J5&&(this._logService.warn("writeSync is unreliable and will be removed soon."),J5=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,eI),t=Math.max(t,tI),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(W5.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(W5(this._bufferService),!1))),this._windowsWrappingHeuristics.value=wt(()=>{for(let t of e)t.dispose()})}}},bZ={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:["'",'"']};function _Z(e,t,r,o){let i={type:0,cancel:!1,key:void 0},n=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?i.key=$.ESC+"OA":i.key=$.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?i.key=$.ESC+"OD":i.key=$.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?i.key=$.ESC+"OC":i.key=$.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?i.key=$.ESC+"OB":i.key=$.ESC+"[B");break;case 8:i.key=e.ctrlKey?"\b":$.DEL,e.altKey&&(i.key=$.ESC+i.key);break;case 9:if(e.shiftKey){i.key=$.ESC+"[Z";break}i.key=$.HT,i.cancel=!0;break;case 13:i.key=e.altKey?$.ESC+$.CR:$.CR,i.cancel=!0;break;case 27:i.key=$.ESC,e.altKey&&(i.key=$.ESC+$.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;n?i.key=$.ESC+"[1;"+(n+1)+"D":t?i.key=$.ESC+"OD":i.key=$.ESC+"[D";break;case 39:if(e.metaKey)break;n?i.key=$.ESC+"[1;"+(n+1)+"C":t?i.key=$.ESC+"OC":i.key=$.ESC+"[C";break;case 38:if(e.metaKey)break;n?i.key=$.ESC+"[1;"+(n+1)+"A":t?i.key=$.ESC+"OA":i.key=$.ESC+"[A";break;case 40:if(e.metaKey)break;n?i.key=$.ESC+"[1;"+(n+1)+"B":t?i.key=$.ESC+"OB":i.key=$.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=$.ESC+"[2~");break;case 46:n?i.key=$.ESC+"[3;"+(n+1)+"~":i.key=$.ESC+"[3~";break;case 36:n?i.key=$.ESC+"[1;"+(n+1)+"H":t?i.key=$.ESC+"OH":i.key=$.ESC+"[H";break;case 35:n?i.key=$.ESC+"[1;"+(n+1)+"F":t?i.key=$.ESC+"OF":i.key=$.ESC+"[F";break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=$.ESC+"[5;"+(n+1)+"~":i.key=$.ESC+"[5~";break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=$.ESC+"[6;"+(n+1)+"~":i.key=$.ESC+"[6~";break;case 112:n?i.key=$.ESC+"[1;"+(n+1)+"P":i.key=$.ESC+"OP";break;case 113:n?i.key=$.ESC+"[1;"+(n+1)+"Q":i.key=$.ESC+"OQ";break;case 114:n?i.key=$.ESC+"[1;"+(n+1)+"R":i.key=$.ESC+"OR";break;case 115:n?i.key=$.ESC+"[1;"+(n+1)+"S":i.key=$.ESC+"OS";break;case 116:n?i.key=$.ESC+"[15;"+(n+1)+"~":i.key=$.ESC+"[15~";break;case 117:n?i.key=$.ESC+"[17;"+(n+1)+"~":i.key=$.ESC+"[17~";break;case 118:n?i.key=$.ESC+"[18;"+(n+1)+"~":i.key=$.ESC+"[18~";break;case 119:n?i.key=$.ESC+"[19;"+(n+1)+"~":i.key=$.ESC+"[19~";break;case 120:n?i.key=$.ESC+"[20;"+(n+1)+"~":i.key=$.ESC+"[20~";break;case 121:n?i.key=$.ESC+"[21;"+(n+1)+"~":i.key=$.ESC+"[21~";break;case 122:n?i.key=$.ESC+"[23;"+(n+1)+"~":i.key=$.ESC+"[23~";break;case 123:n?i.key=$.ESC+"[24;"+(n+1)+"~":i.key=$.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=$.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=$.DEL:e.keyCode===219?i.key=$.ESC:e.keyCode===220?i.key=$.FS:e.keyCode===221&&(i.key=$.GS);else if((!r||o)&&e.altKey&&!e.metaKey){let s=bZ[e.keyCode]?.[e.shiftKey?1:0];if(s)i.key=$.ESC+s;else if(e.keyCode>=65&&e.keyCode<=90){let a=e.ctrlKey?e.keyCode-64:e.keyCode+32,l=String.fromCharCode(a);e.shiftKey&&(l=l.toUpperCase()),i.key=$.ESC+l}else if(e.keyCode===32)i.key=$.ESC+(e.ctrlKey?$.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let a=e.code.slice(3,4);e.shiftKey||(a=a.toLowerCase()),i.key=$.ESC+a,i.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(i.key=$.US),e.key==="@"&&(i.key=$.NUL));break}return i}var Kt=0,SZ=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Mb,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Mb,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((i,n)=>this._getKey(i)-this._getKey(n)),t=0,r=0,o=new Array(this._array.length+this._insertedValues.length);for(let i=0;i<o.length;i++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(o[i]=e[t],t++):o[i]=this._array[r++];this._array=o,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Kt=this._search(t),Kt===-1)||this._getKey(this._array[Kt])!==t)return!1;do if(this._array[Kt]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Kt),!0;while(++Kt<this._array.length&&this._getKey(this._array[Kt])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((i,n)=>i-n),t=0,r=new Array(this._array.length-e.length),o=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:r[o++]=this._array[i];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Kt=this._search(e),!(Kt<0||Kt>=this._array.length)&&this._getKey(this._array[Kt])===e))do yield this._array[Kt];while(++Kt<this._array.length&&this._getKey(this._array[Kt])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Kt=this._search(e),!(Kt<0||Kt>=this._array.length)&&this._getKey(this._array[Kt])===e))do t(this._array[Kt]);while(++Kt<this._array.length&&this._getKey(this._array[Kt])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let o=t+r>>1,i=this._getKey(this._array[o]);if(i>e)r=o-1;else if(i<e)t=o+1;else{for(;o>0&&this._getKey(this._array[o-1])===e;)o--;return o}}return t}},N1=0,e3=0,xZ=class extends xe{constructor(){super(),this._decorations=new SZ(e=>e?.marker.line),this._onDecorationRegistered=this._register(new G),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new G),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(wt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new TZ(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),o=t.onDispose(()=>{o.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let o=0,i=0;for(let n of this._decorations.getKeyIterator(t))o=n.options.x??0,i=o+(n.options.width??1),e>=o&&e<i&&(!r||(n.options.layer??"bottom")===r)&&(yield n)}forEachDecorationAtCell(e,t,r,o){this._decorations.forEachByKey(t,i=>{N1=i.options.x??0,e3=N1+(i.options.width??1),e>=N1&&e<e3&&(!r||(i.options.layer??"bottom")===r)&&o(i)})}},TZ=class extends ga{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new G),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new G),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Nt.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Nt.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},CZ=1e3,wZ=class{constructor(e,t=CZ){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let o=performance.now();if(o-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=o,this._innerRefresh();else if(!this._additionalRefreshRequested){let i=o-this._lastRefreshMs,n=this._debounceThresholdMS-i;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},n)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},t3=20,r3=!1,Ab=class extends xe{constructor(e,t,r,o){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=o,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=i.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let n=0;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);if(this._topBoundaryFocusListener=n=>this._handleBoundaryFocus(n,0),this._bottomBoundaryFocusListener=n=>this._handleBoundaryFocus(n,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new wZ(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");r3?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=i.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(i.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(i.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(n=>this._handleResize(n.rows))),this._register(this._terminal.onRender(n=>this._refreshRows(n.start,n.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(n=>this._handleChar(n))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
236
+ `))),this._register(this._terminal.onA11yTab(n=>this._handleTab(n))),this._register(this._terminal.onKey(n=>this._handleKey(n.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(ge(i,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(wt(()=>{r3?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<t3+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
237
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===t3+1&&(this._liveRegion.textContent+=I1.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,o=r.lines.length.toString();for(let i=e;i<=t;i++){let n=r.lines.get(r.ydisp+i),s=[],a=n?.translateToString(!0,void 0,void 0,s)||"",l=(r.ydisp+i+1).toString(),c=this._rowElements[i];c&&(a.length===0?(c.textContent="\xA0",this._rowColumns.set(c,[0,1])):(c.textContent=a,this._rowColumns.set(c,s)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",o),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,o=this._rowElements[t===0?1:this._rowElements.length-2],i=r.getAttribute("aria-posinset"),n=t===0?"1":`${this._terminal.buffer.lines.length}`;if(i===n||e.relatedTarget!==o)return;let s,a;if(t===0?(s=r,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(s=this._rowElements.shift(),a=r,this._rowContainer.removeChild(s)),s.removeEventListener("focus",this._topBoundaryFocusListener),a.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let o=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(o)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:o,offset:o.textContent?.length??0}),!this._rowContainer.contains(r.node))return;let i=({node:a,offset:l})=>{let c=a instanceof Text?a.parentNode:a,u=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(u))return console.warn("row is invalid. Race condition?"),null;let p=this._rowColumns.get(c);if(!p)return console.warn("columns is null. Race condition?"),null;let f=l<p.length?p[l]:p.slice(-1)[0]+1;return f>=this._terminal.cols&&(++u,f=0),{row:u,column:f}},n=i(t),s=i(r);if(!(!n||!s)){if(n.row>s.row||n.row===s.row&&n.column>=s.column)throw new Error("invalid range");this._terminal.select(n.column,n.row,(s.row-n.row)*this._terminal.cols-n.column+s.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,r=this._rowColumns.get(e)?.slice(-1)?.[0];if(!r)return;let o=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${o/t})`}};Ab=Ut([J(1,_C),J(2,fs),J(3,hs)],Ab);var bC=class extends xe{constructor(e,t,r,o,i){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=o,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new G),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new G),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(wt(()=>{ql(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(ge(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(ge(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(ge(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(ge(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let o=0;o<r.length;o++){let i=r[o];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(o=>{o?.forEach(i=>{i.link.dispose&&i.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[o,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(o)&&(r=this._checkLinkProviderResult(o,e,r)):i.provideLinks(e.y,n=>{if(this._isMouseOut)return;let s=n?.map(a=>({link:a}));this._activeProviderReplies?.set(o,s),r=this._checkLinkProviderResult(o,e,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let o=0;o<t.size;o++){let i=t.get(o);if(i)for(let n=0;n<i.length;n++){let s=i[n],a=s.link.range.start.y<e?0:s.link.range.start.x,l=s.link.range.end.y>e?this._bufferService.cols:s.link.range.end.x;for(let c=a;c<=l;c++){if(r.has(c)){i.splice(n--,1);break}r.add(c)}}}}_checkLinkProviderResult(e,t,r){if(!this._activeProviderReplies)return r;let o=this._activeProviderReplies.get(e),i=!1;for(let n=0;n<e;n++)(!this._activeProviderReplies.has(n)||this._activeProviderReplies.get(n))&&(i=!0);if(!i&&o){let n=o.find(s=>this._linkAtPosition(s.link,t));n&&(r=!0,this._handleNewLink(n))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let n=0;n<this._activeProviderReplies.size;n++){let s=this._activeProviderReplies.get(n)?.find(a=>this._linkAtPosition(a.link,t));if(s){r=!0,this._handleNewLink(s);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&RZ(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ql(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let o=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,i=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=o&&this._currentLink.link.range.end.y<=i&&(this._clearCurrentLink(o,i),this._lastMouseEvent)){let n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._askForLink(n,!1)}})))}_linkHover(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,o=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-o-1,r.end.x,r.end.y-o-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,o=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return r<=i&&i<=o}_positionFromMouseEvent(e,t,r){let o=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(o)return{x:o[0],y:o[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,o,i){return{x1:e,y1:t,x2:r,y2:o,cols:this._bufferService.cols,fg:i}}};bC=Ut([J(1,SC),J(2,hs),J(3,ro),J(4,m3)],bC);function RZ(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var PZ=class extends vZ{constructor(e={}){super(e),this._linkifier=this._register(new Pp),this.browser=j3,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Pp),this._onCursorMove=this._register(new G),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new G),this.onKey=this._onKey.event,this._onRender=this._register(new G),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new G),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new G),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new G),this.onBell=this._onBell.event,this._onFocus=this._register(new G),this._onBlur=this._register(new G),this._onA11yCharEmitter=this._register(new G),this._onA11yTabEmitter=this._register(new G),this._onWillOpen=this._register(new G),this._setup(),this._decorationService=this._instantiationService.createInstance(xZ),this._instantiationService.setService(Bh,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(mX),this._instantiationService.setService(m3,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(F1)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Lr.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Lr.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Lr.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Lr.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(wt(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}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}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,o="";switch(t.index){case 256:r="foreground",o="10";break;case 257:r="background",o="11";break;case 258:r="cursor",o="12";break;default:r="ansi",o="4;"+t.index}switch(t.type){case 0:let i=Ct.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${$.ESC}]${o};${dZ(i)}${U3.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(n=>n.ansi[t.index]=tr.toColor(...t.color));else{let n=r;this._themeService.modifyColors(s=>s[n]=tr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Ab,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.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($.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),o=this._renderService.dimensions.css.cell.height,i=t.getWidth(r),n=this._renderService.dimensions.css.cell.width*i,s=this.buffer.y*this._renderService.dimensions.css.cell.height,a=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=a+"px",this.textarea.style.top=s+"px",this.textarea.style.width=n+"px",this.textarea.style.height=o+"px",this.textarea.style.lineHeight=o+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(ge(this.element,"copy",t=>{this.hasSelection()&&oG(t,this._selectionService)}));let e=t=>iG(t,this.textarea,this.coreService,this.optionsService);this._register(ge(this.textarea,"paste",e)),this._register(ge(this.element,"paste",e)),W3?this._register(ge(this.element,"mousedown",t=>{t.button===2&&o5(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(ge(this.element,"contextmenu",t=>{o5(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),kC&&this._register(ge(this.element,"auxclick",t=>{t.button===1&&s3(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(ge(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(ge(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(ge(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(ge(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(ge(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(ge(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(ge(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.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"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(ge(this.screenElement,"mousemove",i=>this.updateCursorStyle(i))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",L1.get()),K3||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._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(fX,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(fs,this._coreBrowserService),this._register(ge(this.textarea,"focus",i=>this._handleTextAreaFocus(i))),this._register(ge(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(aC,this._document,this._helperContainer),this._instantiationService.setService(Nb,this._charSizeService),this._themeService=this._instantiationService.createInstance(pC),this._instantiationService.setService(Ep,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Ob),this._instantiationService.setService(h3,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(cC,this.rows,this.screenElement)),this._instantiationService.setService(hs,this._renderService),this._register(this._renderService.onRenderedViewportChange(i=>this._onRender.fire(i))),this.onResize(i=>this._renderService.resize(i.cols,i.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(iC,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(lC),this._instantiationService.setService(SC,this._mouseService);let o=this._linkifier.value=this._register(this._instantiationService.createInstance(bC,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),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._viewport=this._register(this._instantiationService.createInstance(rC,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(i=>{super.scrollLines(i,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(uC,this.element,this.screenElement,o)),this._instantiationService.setService(dG,this._selectionService),this._register(this._selectionService.onRequestScrollLines(i=>this.scrollLines(i.amount,i.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(i=>this._renderService.handleSelectionChanged(i.start,i.end,i.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(i=>{this.textarea.value=i,this.textarea.focus(),this.textarea.select()})),this._register(Lr.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(oC,this.screenElement)),this._register(ge(this.element,"mousedown",i=>this._selectionService.handleMouseDown(i))),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(Ab,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",i=>this._handleScreenReaderModeOptionChange(i))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(kb,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",i=>{!this._overviewRulerRenderer&&i&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(kb,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(sC,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(n){let s=e._mouseService.getMouseReportCoords(n,e.screenElement);if(!s)return!1;let a,l;switch(n.overrideType||n.type){case"mousemove":l=32,n.buttons===void 0?(a=3,n.button!==void 0&&(a=n.button<3?n.button:3)):a=n.buttons&1?0:n.buttons&4?1:n.buttons&2?2:3;break;case"mouseup":l=0,a=n.button<3?n.button:3;break;case"mousedown":l=1,a=n.button<3?n.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(n)===!1)return!1;let c=n.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,a=4;break;default:return!1}return l===void 0||a===void 0||a>4?!1:e.coreMouseService.triggerMouseEvent({col:s.col,row:s.row,x:s.x,y:s.y,button:a,action:l,ctrl:n.ctrlKey,alt:n.altKey,shift:n.shiftKey})}let o={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:n=>(r(n),n.buttons||(this._document.removeEventListener("mouseup",o.mouseup),o.mousedrag&&this._document.removeEventListener("mousemove",o.mousedrag)),this.cancel(n)),wheel:n=>(r(n),this.cancel(n,!0)),mousedrag:n=>{n.buttons&&r(n)},mousemove:n=>{n.buttons||r(n)}};this._register(this.coreMouseService.onProtocolChange(n=>{n?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(n)),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()),n&8?o.mousemove||(t.addEventListener("mousemove",i.mousemove),o.mousemove=i.mousemove):(t.removeEventListener("mousemove",o.mousemove),o.mousemove=null),n&16?o.wheel||(t.addEventListener("wheel",i.wheel,{passive:!1}),o.wheel=i.wheel):(t.removeEventListener("wheel",o.wheel),o.wheel=null),n&2?o.mouseup||(o.mouseup=i.mouseup):(this._document.removeEventListener("mouseup",o.mouseup),o.mouseup=null),n&4?o.mousedrag||(o.mousedrag=i.mousedrag):(this._document.removeEventListener("mousemove",o.mousedrag),o.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(ge(t,"mousedown",n=>{if(n.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(n)))return r(n),o.mouseup&&this._document.addEventListener("mouseup",o.mouseup),o.mousedrag&&this._document.addEventListener("mousemove",o.mousedrag),this.cancel(n)})),this._register(ge(t,"wheel",n=>{if(!o.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(n)===!1)return!1;if(!this.buffer.hasScrollback){if(n.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(n,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(n,!0);let s=$.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(n.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(s,!0),this.cancel(n,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?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(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){n3(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}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(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=_Z(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let o=this.rows-1;return this.scrollLines(r.type===2?-o:o),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===$.ETX||r.key===$.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(EZ(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}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 e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(er));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent($.ESC+"[I"):this.coreService.triggerDataEvent($.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.ESC}[4;${r};${t}t`);break;case 1:let o=this._renderService.dimensions.css.cell.width.toFixed(0),i=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.ESC}[6;${i};${o}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function EZ(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var kZ=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},OZ=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new bi)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},o3=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,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(e){let t=this._buffer.lines.get(e);if(t)return new OZ(t)}getNullCell(){return new bi}},DZ=class extends xe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new G),this.onBufferChange=this._onBufferChange.event,this._normal=new o3(this._core.buffers.normal,"normal"),this._alternate=new o3(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)}},MZ=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,o)=>t(r,o.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},AZ=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},BZ=["cols","rows"],vn=0,oI=class extends xe{constructor(e){super(),this._core=this._register(new PZ(e)),this._addonManager=this._register(new kZ),this._publicOptions={...this._core.options};let t=o=>this._core.options[o],r=(o,i)=>{this._checkReadonlyOptions(o),this._core.options[o]=i};for(let o in this._core.options){let i={get:t.bind(this,o),set:r.bind(this,o)};Object.defineProperty(this._publicOptions,o,i)}}_checkReadonlyOptions(e){if(BZ.includes(e))throw new Error(`Option "${e}" 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 MZ(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new AZ(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 DZ(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
238
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return L1.get()},set promptLabel(e){L1.set(e)},get tooMuchOutput(){return I1.get()},set tooMuchOutput(e){I1.set(e)}}}_verifyIntegers(...e){for(vn of e)if(vn===1/0||isNaN(vn)||vn%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(vn of e)if(vn&&(vn===1/0||isNaN(vn)||vn%1!==0||vn<0))throw new Error("This API only accepts positive integers")}};function iI(e){let t=new oI({cursorBlink:!0,fontSize:14,fontFamily:"'Cascadia Code', 'Fira Code', Consolas, monospace",theme:{background:"#1e1e1e",foreground:"#d4d4d4"}}),r=new e5;return t.loadAddon(r),t.open(e),r.fit(),{term:t,fitAddon:r,dispose:()=>t.dispose()}}function nI(e,t,r,o,i){let n=iI(e);n.term.onData(c=>r(t,c));let s=o(t,c=>n.term.write(c)),a=new ResizeObserver(()=>{n.fitAddon.fit(),i(t,n.term.cols,n.term.rows)});return a.observe(e),{handle:n,cleanup:()=>{a.disconnect(),s(),n.dispose()}}}function sI(e,t,r,o,i,n){let s=(0,Ih.useRef)(null);(0,Ih.useEffect)(()=>{let a=e.current;if(!a)return;let{handle:l,cleanup:c}=nI(a,t,o,i,n);return s.current=l,()=>{c(),s.current=null}},[e,t,i,o,n]),(0,Ih.useEffect)(()=>{let a=s.current;if(!r||!a)return;let l=setTimeout(()=>{a.fitAddon.fit(),a.term.focus(),n(t,a.term.cols,a.term.rows)},50);return()=>clearTimeout(l)},[r,t,n])}var cI=S(k(),1);function lI({sessionId:e,visible:t,onOutput:r,sendInput:o,sendResize:i}){let n=(0,aI.useRef)(null);return sI(n,e,t,o,r,i),(0,cI.jsx)(me,{ref:n,sx:{position:"absolute",inset:0,visibility:t?"visible":"hidden",pointerEvents:t?"auto":"none"}})}var Op=S(k(),1);function uI({sessions:e,activeId:t,onOutput:r,sendInput:o,sendResize:i}){return(0,Op.jsxs)(me,{sx:{flex:1,position:"relative",bgcolor:"background.default"},children:[e.map(n=>(0,Op.jsx)(lI,{sessionId:n.id,visible:n.id===t,onOutput:r,sendInput:o,sendResize:i},n.id)),e.length===0&&(0,Op.jsx)(me,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,Op.jsx)(Z,{variant:"body2",color:"text.disabled",children:"Create a session to get started"})})]})}var CI=S(I(),1);var _i=S(I(),1);function pI(e){return(t,r)=>e({type:"create",prompt:t||void 0,cwd:r})}function dI(e){return(t,r,o)=>e({type:"create-run",runName:t,runArgs:r,cwd:o})}function fI(e){return(t,r)=>e({type:"create-assist",assistArgs:t,cwd:r})}function hI(e){return t=>e({type:"run-configs",cwd:t})}function mI(e){return(t,r,o)=>e({type:"resume",sessionId:t,cwd:r,name:o})}function yI(e,t,r){return o=>{t.delete(o),r.delete(o),e({type:"retry",sessionId:o})}}function gI(e,t,r){return o=>{e({type:"dismiss",sessionId:o}),t.delete(o),r.delete(o)}}function vI(e){return(t,r)=>e({type:"input",sessionId:t,data:r})}function bI(e){return(t,r,o)=>e({type:"resize",sessionId:t,cols:r,rows:o})}function _I(e,t){return(r,o)=>{let i=e.get(r);return i&&o(i),t.set(r,o),()=>t.delete(r)}}function SI(e,t,r,o){let i={createSession:(0,_i.useMemo)(()=>pI(e),[e]),createRunSession:(0,_i.useMemo)(()=>dI(e),[e]),createAssistSession:(0,_i.useMemo)(()=>fI(e),[e]),requestRunConfigs:(0,_i.useMemo)(()=>hI(e),[e]),resumeSession:(0,_i.useMemo)(()=>mI(e),[e]),sendInput:(0,_i.useMemo)(()=>vI(e),[e]),sendResize:(0,_i.useMemo)(()=>bI(e),[e])},n=(0,_i.useMemo)(()=>_I(t.current,r.current),[t,r]),s=(0,_i.useCallback)(l=>{yI(e,t.current,r.current)(l)},[e,t,r]),a=(0,_i.useCallback)(l=>{gI(e,t.current,r.current)(l),o(null)},[e,t,r,o]);return{...i,onOutput:n,retrySession:s,dismissSession:a}}var _o=S(I(),1);function xI(e,t){switch(e.type){case"sessions":t.setSessions(e.sessions),e.cwd&&t.setCurrentCwd(e.cwd);break;case"created":t.setActiveId(e.sessionId);break;case"history":t.setHistory(e.sessions);break;case"run-configs":t.setRunConfigs(e.configs);break;case"clear":{let r=e.sessionId;t.buffers.current?.delete(r),t.handlers.current?.get(r)?.("\x1Bc");break}case"output":{let r=e.sessionId,o=t.buffers.current?.get(r)??"";t.buffers.current?.set(r,o+e.data),t.handlers.current?.get(r)?.(e.data);break}}}function TI(){let[e,t]=(0,_o.useState)([]),[r,o]=(0,_o.useState)([]),[i,n]=(0,_o.useState)([]),[s,a]=(0,_o.useState)(null),[l,c]=(0,_o.useState)(""),u=(0,_o.useRef)(null),p=(0,_o.useRef)(new Map),f=(0,_o.useRef)(new Map);(0,_o.useEffect)(()=>{let h=location.protocol==="https:"?"wss:":"ws:",y=new WebSocket(`${h}//${location.host}/ws`);u.current=y;let b={setSessions:t,setHistory:o,setRunConfigs:n,setActiveId:a,setCurrentCwd:c,buffers:p,handlers:f};return y.onopen=()=>{y.send(JSON.stringify({type:"history"}))},y.onmessage=m=>{xI(JSON.parse(m.data),b)},()=>y.close()},[]);let d=(0,_o.useCallback)(()=>{let h=u.current;h?.readyState===WebSocket.OPEN&&h.send(JSON.stringify({type:"history"}))},[]);return{sessions:e,history:r,runConfigs:i,activeId:s,setActiveId:a,currentCwd:l,wsRef:u,buffers:p,handlers:f,requestHistory:d}}function wI(){let{sessions:e,history:t,runConfigs:r,activeId:o,setActiveId:i,currentCwd:n,wsRef:s,buffers:a,handlers:l,requestHistory:c}=TI(),u=(0,CI.useCallback)(f=>{let d=s.current;d?.readyState===WebSocket.OPEN&&d.send(JSON.stringify(f))},[s]),p=SI(u,a,l,i);return{sessions:e,history:t,runConfigs:r,activeId:o,setActiveId:i,currentCwd:n,...p,requestHistory:c}}var zh=S(k(),1);function PI(){let e=wI(),[t,r]=(0,RI.useState)("active");return(0,zh.jsxs)(me,{sx:{display:"flex",width:"100%",height:"100%"},children:[(0,zh.jsx)(QL,{socket:e,tab:t,onTabChange:r}),(0,zh.jsx)(uI,{sessions:e.sessions,activeId:e.activeId,onOutput:e.onOutput,sendInput:e.sendInput,sendResize:e.sendResize})]})}var Si=S(k(),1);function NZ(){return(0,Si.jsx)(f0,{maxWidth:"md",sx:{py:3,px:2},children:(0,Si.jsx)(XN,{})})}function EI(){return(0,Si.jsxs)(Pl,{children:[(0,Si.jsx)(Uo,{path:"sessions",element:(0,Si.jsx)(me,{sx:{display:"flex",width:"100%",height:"calc(100vh - 48px)"},children:(0,Si.jsx)(PI,{})})}),(0,Si.jsx)(Uo,{path:"backlog/*",element:(0,Si.jsx)(NZ,{})}),(0,Si.jsx)(Uo,{path:"*",element:(0,Si.jsx)(jT,{to:"/sessions",replace:!0})})]})}var xi=S(k(),1),kI=["/sessions","/backlog"],LZ={zIndex:e=>e.zIndex.drawer+1},OI={minHeight:48};function DI(){let e=Qr(),t=vo(),r=kI.findIndex(o=>e.pathname.startsWith(o));return(0,xi.jsxs)(xi.Fragment,{children:[(0,xi.jsx)(l0,{position:"fixed",elevation:1,sx:LZ,children:(0,xi.jsx)(tg,{variant:"dense",sx:OI,children:(0,xi.jsxs)(Zd,{value:r===-1?0:r,onChange:(o,i)=>t(kI[i]),textColor:"inherit",indicatorColor:"secondary",sx:{flexGrow:1},children:[(0,xi.jsx)(rl,{label:"Sessions"}),(0,xi.jsx)(rl,{label:"Backlog"})]})})}),(0,xi.jsx)(tg,{variant:"dense",sx:OI}),(0,xi.jsx)(EI,{})]})}var MI=S(k(),1),AI=Ie((0,MI.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness4");var BI=S(k(),1),NI=Ie((0,BI.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"Brightness7");var Hb=S(k(),1);function LI({mode:e,toggle:t}){return(0,Hb.jsx)(qa,{onClick:t,size:"small",sx:{position:"fixed",top:8,right:16,zIndex:r=>r.zIndex.drawer+2,color:"inherit"},"aria-label":"Toggle light/dark mode",children:e==="dark"?(0,Hb.jsx)(NI,{fontSize:"small"}):(0,Hb.jsx)(AI,{fontSize:"small"})})}var II=S(I(),1);function zI(){let[e,t]=(0,II.useState)(()=>{try{return localStorage.getItem("theme-mode")??"dark"}catch{return"dark"}});return{mode:e,toggle:()=>t(o=>{let i=o==="dark"?"light":"dark";try{localStorage.setItem("theme-mode",i)}catch{}return i})}}var va=S(k(),1);function IZ(){let{mode:e,toggle:t}=zI(),r=(0,HI.useMemo)(()=>Gi({palette:{mode:e,...e==="dark"&&{background:{default:"#1e1e1e",paper:"#252526"}}}}),[e]);return(0,va.jsxs)(qm,{theme:r,children:[(0,va.jsx)(vy,{}),(0,va.jsxs)(YT,{children:[(0,va.jsx)(LI,{mode:e,toggle:t}),(0,va.jsx)(DI,{})]})]})}var FI=document.getElementById("app");FI&&(0,UI.createRoot)(FI).render((0,va.jsx)(IZ,{}));})();
45
239
  /*! Bundled license information:
46
240
 
47
241
  react/cjs/react.production.js:
@@ -55,10 +249,31 @@ react/cjs/react.production.js:
55
249
  * LICENSE file in the root directory of this source tree.
56
250
  *)
57
251
 
58
- scheduler/cjs/scheduler.production.js:
252
+ react-is/cjs/react-is.production.min.js:
253
+ (** @license React v16.13.1
254
+ * react-is.production.min.js
255
+ *
256
+ * Copyright (c) Facebook, Inc. and its affiliates.
257
+ *
258
+ * This source code is licensed under the MIT license found in the
259
+ * LICENSE file in the root directory of this source tree.
260
+ *)
261
+
262
+ react/cjs/react-jsx-runtime.production.js:
59
263
  (**
60
264
  * @license React
61
- * scheduler.production.js
265
+ * react-jsx-runtime.production.js
266
+ *
267
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
268
+ *
269
+ * This source code is licensed under the MIT license found in the
270
+ * LICENSE file in the root directory of this source tree.
271
+ *)
272
+
273
+ react-is/cjs/react-is.production.js:
274
+ (**
275
+ * @license React
276
+ * react-is.production.js
62
277
  *
63
278
  * Copyright (c) Meta Platforms, Inc. and affiliates.
64
279
  *
@@ -77,10 +292,10 @@ react-dom/cjs/react-dom.production.js:
77
292
  * LICENSE file in the root directory of this source tree.
78
293
  *)
79
294
 
80
- react-dom/cjs/react-dom-client.production.js:
295
+ scheduler/cjs/scheduler.production.js:
81
296
  (**
82
297
  * @license React
83
- * react-dom-client.production.js
298
+ * scheduler.production.js
84
299
  *
85
300
  * Copyright (c) Meta Platforms, Inc. and affiliates.
86
301
  *
@@ -88,10 +303,10 @@ react-dom/cjs/react-dom-client.production.js:
88
303
  * LICENSE file in the root directory of this source tree.
89
304
  *)
90
305
 
91
- react/cjs/react-jsx-runtime.production.js:
306
+ react-dom/cjs/react-dom-client.production.js:
92
307
  (**
93
308
  * @license React
94
- * react-jsx-runtime.production.js
309
+ * react-dom-client.production.js
95
310
  *
96
311
  * Copyright (c) Meta Platforms, Inc. and affiliates.
97
312
  *
@@ -99,6 +314,55 @@ react/cjs/react-jsx-runtime.production.js:
99
314
  * LICENSE file in the root directory of this source tree.
100
315
  *)
101
316
 
317
+ @mui/styled-engine/index.mjs:
318
+ (**
319
+ * @mui/styled-engine v9.0.0
320
+ *
321
+ * @license MIT
322
+ * This source code is licensed under the MIT license found in the
323
+ * LICENSE file in the root directory of this source tree.
324
+ *)
325
+
326
+ @mui/private-theming/index.mjs:
327
+ (**
328
+ * @mui/private-theming v9.0.0
329
+ *
330
+ * @license MIT
331
+ * This source code is licensed under the MIT license found in the
332
+ * LICENSE file in the root directory of this source tree.
333
+ *)
334
+
335
+ @mui/system/index.mjs:
336
+ (**
337
+ * @mui/system v9.0.0
338
+ *
339
+ * @license MIT
340
+ * This source code is licensed under the MIT license found in the
341
+ * LICENSE file in the root directory of this source tree.
342
+ *)
343
+
344
+ @mui/material/index.mjs:
345
+ (**
346
+ * @mui/material v9.0.0
347
+ *
348
+ * @license MIT
349
+ * This source code is licensed under the MIT license found in the
350
+ * LICENSE file in the root directory of this source tree.
351
+ *)
352
+
353
+ react-router/dist/development/chunk-QFMPRPBF.mjs:
354
+ react-router/dist/development/index.mjs:
355
+ (**
356
+ * react-router v7.14.0
357
+ *
358
+ * Copyright (c) Remix Software Inc.
359
+ *
360
+ * This source code is licensed under the MIT license found in the
361
+ * LICENSE.md file in the root directory of this source tree.
362
+ *
363
+ * @license MIT
364
+ *)
365
+
102
366
  @xterm/addon-fit/lib/addon-fit.mjs:
103
367
  @xterm/xterm/lib/xterm.mjs:
104
368
  (**