kalong 0.5.4__py3-none-any.whl → 0.5.5__py3-none-any.whl
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.
- kalong/__init__.py +1 -1
- kalong/config.py +47 -6
- kalong/server.py +20 -1
- kalong/static/assets/index-ByEA1zci.js +166 -0
- kalong/static/index.html +1 -1
- kalong/utils/__init__.py +3 -3
- kalong/websockets.py +10 -1
- {kalong-0.5.4.dist-info → kalong-0.5.5.dist-info}/METADATA +1 -1
- {kalong-0.5.4.dist-info → kalong-0.5.5.dist-info}/RECORD +12 -12
- {kalong-0.5.4.dist-info → kalong-0.5.5.dist-info}/WHEEL +1 -1
- kalong/static/assets/index-DPZ8eRPa.js +0 -229
- {kalong-0.5.4.dist-info → kalong-0.5.5.dist-info}/entry_points.txt +0 -0
- {kalong-0.5.4.dist-info → kalong-0.5.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
function P$(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function jb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var W0={exports:{}},su={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var uC;function z$(){if(uC)return su;uC=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:t,type:i,key:a,ref:r!==void 0?r:null,props:s}}return su.Fragment=e,su.jsx=n,su.jsxs=n,su}var fC;function $$(){return fC||(fC=1,W0.exports=z$()),W0.exports}var S=$$(),X0={exports:{}},Be={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var hC;function B$(){if(hC)return Be;hC=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function b(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function k(_,G,se){this.props=_,this.context=G,this.refs=C,this.updater=se||O}k.prototype.isReactComponent={},k.prototype.setState=function(_,G){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,G,"setState")},k.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function $(){}$.prototype=k.prototype;function z(_,G,se){this.props=_,this.context=G,this.refs=C,this.updater=se||O}var D=z.prototype=new $;D.constructor=z,x(D,k.prototype),D.isPureReactComponent=!0;var R=Array.isArray;function B(){}var M={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function N(_,G,se){var W=se.ref;return{$$typeof:t,type:_,key:G,ref:W!==void 0?W:null,props:se}}function A(_,G){return N(_.type,G,_.props)}function Q(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function T(_){var G={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(se){return G[se]})}var U=/\/+/g;function q(_,G){return typeof _=="object"&&_!==null&&_.key!=null?T(""+_.key):G.toString(36)}function V(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(B,B):(_.status="pending",_.then(function(G){_.status==="pending"&&(_.status="fulfilled",_.value=G)},function(G){_.status==="pending"&&(_.status="rejected",_.reason=G)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function L(_,G,se,W,ce){var ne=typeof _;(ne==="undefined"||ne==="boolean")&&(_=null);var he=!1;if(_===null)he=!0;else switch(ne){case"bigint":case"string":case"number":he=!0;break;case"object":switch(_.$$typeof){case t:case e:he=!0;break;case p:return he=_._init,L(he(_._payload),G,se,W,ce)}}if(he)return ce=ce(_),he=W===""?"."+q(_,0):W,R(ce)?(se="",he!=null&&(se=he.replace(U,"$&/")+"/"),L(ce,G,se,"",function(xe){return xe})):ce!=null&&(Q(ce)&&(ce=A(ce,se+(ce.key==null||_&&_.key===ce.key?"":(""+ce.key).replace(U,"$&/")+"/")+he)),G.push(ce)),1;he=0;var Se=W===""?".":W+":";if(R(_))for(var ke=0;ke<_.length;ke++)W=_[ke],ne=Se+q(W,ke),he+=L(W,G,se,ne,ce);else if(ke=b(_),typeof ke=="function")for(_=ke.call(_),ke=0;!(W=_.next()).done;)W=W.value,ne=Se+q(W,ke++),he+=L(W,G,se,ne,ce);else if(ne==="object"){if(typeof _.then=="function")return L(V(_),G,se,W,ce);throw G=String(_),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return he}function X(_,G,se){if(_==null)return _;var W=[],ce=0;return L(_,W,"","",function(ne){return G.call(se,ne,ce++)}),W}function Y(_){if(_._status===-1){var G=_._result;G=G(),G.then(function(se){(_._status===0||_._status===-1)&&(_._status=1,_._result=se)},function(se){(_._status===0||_._status===-1)&&(_._status=2,_._result=se)}),_._status===-1&&(_._status=0,_._result=G)}if(_._status===1)return _._result.default;throw _._result}var K=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},le={map:X,forEach:function(_,G,se){X(_,function(){G.apply(this,arguments)},se)},count:function(_){var G=0;return X(_,function(){G++}),G},toArray:function(_){return X(_,function(G){return G})||[]},only:function(_){if(!Q(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Be.Activity=m,Be.Children=le,Be.Component=k,Be.Fragment=n,Be.Profiler=r,Be.PureComponent=z,Be.StrictMode=i,Be.Suspense=f,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Be.__COMPILER_RUNTIME={__proto__:null,c:function(_){return M.H.useMemoCache(_)}},Be.cache=function(_){return function(){return _.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(_,G,se){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var W=x({},_.props),ce=_.key;if(G!=null)for(ne in G.key!==void 0&&(ce=""+G.key),G)!j.call(G,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&G.ref===void 0||(W[ne]=G[ne]);var ne=arguments.length-2;if(ne===1)W.children=se;else if(1<ne){for(var he=Array(ne),Se=0;Se<ne;Se++)he[Se]=arguments[Se+2];W.children=he}return N(_.type,ce,W)},Be.createContext=function(_){return _={$$typeof:a,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:s,_context:_},_},Be.createElement=function(_,G,se){var W,ce={},ne=null;if(G!=null)for(W in G.key!==void 0&&(ne=""+G.key),G)j.call(G,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ce[W]=G[W]);var he=arguments.length-2;if(he===1)ce.children=se;else if(1<he){for(var Se=Array(he),ke=0;ke<he;ke++)Se[ke]=arguments[ke+2];ce.children=Se}if(_&&_.defaultProps)for(W in he=_.defaultProps,he)ce[W]===void 0&&(ce[W]=he[W]);return N(_,ne,ce)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(_){return{$$typeof:c,render:_}},Be.isValidElement=Q,Be.lazy=function(_){return{$$typeof:p,_payload:{_status:-1,_result:_},_init:Y}},Be.memo=function(_,G){return{$$typeof:d,type:_,compare:G===void 0?null:G}},Be.startTransition=function(_){var G=M.T,se={};M.T=se;try{var W=_(),ce=M.S;ce!==null&&ce(se,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(B,K)}catch(ne){K(ne)}finally{G!==null&&se.types!==null&&(G.types=se.types),M.T=G}},Be.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Be.use=function(_){return M.H.use(_)},Be.useActionState=function(_,G,se){return M.H.useActionState(_,G,se)},Be.useCallback=function(_,G){return M.H.useCallback(_,G)},Be.useContext=function(_){return M.H.useContext(_)},Be.useDebugValue=function(){},Be.useDeferredValue=function(_,G){return M.H.useDeferredValue(_,G)},Be.useEffect=function(_,G){return M.H.useEffect(_,G)},Be.useEffectEvent=function(_){return M.H.useEffectEvent(_)},Be.useId=function(){return M.H.useId()},Be.useImperativeHandle=function(_,G,se){return M.H.useImperativeHandle(_,G,se)},Be.useInsertionEffect=function(_,G){return M.H.useInsertionEffect(_,G)},Be.useLayoutEffect=function(_,G){return M.H.useLayoutEffect(_,G)},Be.useMemo=function(_,G){return M.H.useMemo(_,G)},Be.useOptimistic=function(_,G){return M.H.useOptimistic(_,G)},Be.useReducer=function(_,G,se){return M.H.useReducer(_,G,se)},Be.useRef=function(_){return M.H.useRef(_)},Be.useState=function(_){return M.H.useState(_)},Be.useSyncExternalStore=function(_,G,se){return M.H.useSyncExternalStore(_,G,se)},Be.useTransition=function(){return M.H.useTransition()},Be.version="19.2.0",Be}var dC;function Qs(){return dC||(dC=1,X0.exports=B$()),X0.exports}var E=Qs();const Ei=jb(E),mp=P$({__proto__:null,default:Ei},[E]);var G0={exports:{}},lu={},F0={exports:{}},Y0={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var pC;function j$(){return pC||(pC=1,(function(t){function e(L,X){var Y=L.length;L.push(X);e:for(;0<Y;){var K=Y-1>>>1,le=L[K];if(0<r(le,X))L[K]=X,L[Y]=le,Y=K;else break e}}function n(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var X=L[0],Y=L.pop();if(Y!==X){L[0]=Y;e:for(var K=0,le=L.length,_=le>>>1;K<_;){var G=2*(K+1)-1,se=L[G],W=G+1,ce=L[W];if(0>r(se,Y))W<le&&0>r(ce,se)?(L[K]=ce,L[W]=Y,K=W):(L[K]=se,L[G]=Y,K=G);else if(W<le&&0>r(ce,Y))L[K]=ce,L[W]=Y,K=W;else break e}}return X}function r(L,X){var Y=L.sortIndex-X.sortIndex;return Y!==0?Y:L.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var f=[],d=[],p=1,m=null,v=3,b=!1,O=!1,x=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function D(L){for(var X=n(d);X!==null;){if(X.callback===null)i(d);else if(X.startTime<=L)i(d),X.sortIndex=X.expirationTime,e(f,X);else break;X=n(d)}}function R(L){if(x=!1,D(L),!O)if(n(f)!==null)O=!0,B||(B=!0,T());else{var X=n(d);X!==null&&V(R,X.startTime-L)}}var B=!1,M=-1,j=5,N=-1;function A(){return C?!0:!(t.unstable_now()-N<j)}function Q(){if(C=!1,B){var L=t.unstable_now();N=L;var X=!0;try{e:{O=!1,x&&(x=!1,$(M),M=-1),b=!0;var Y=v;try{t:{for(D(L),m=n(f);m!==null&&!(m.expirationTime>L&&A());){var K=m.callback;if(typeof K=="function"){m.callback=null,v=m.priorityLevel;var le=K(m.expirationTime<=L);if(L=t.unstable_now(),typeof le=="function"){m.callback=le,D(L),X=!0;break t}m===n(f)&&i(f),D(L)}else i(f);m=n(f)}if(m!==null)X=!0;else{var _=n(d);_!==null&&V(R,_.startTime-L),X=!1}}break e}finally{m=null,v=Y,b=!1}X=void 0}}finally{X?T():B=!1}}}var T;if(typeof z=="function")T=function(){z(Q)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,q=U.port2;U.port1.onmessage=Q,T=function(){q.postMessage(null)}}else T=function(){k(Q,0)};function V(L,X){M=k(function(){L(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(L){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var Y=v;v=X;try{return L()}finally{v=Y}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(L,X){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var Y=v;v=L;try{return X()}finally{v=Y}},t.unstable_scheduleCallback=function(L,X,Y){var K=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?K+Y:K):Y=K,L){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=Y+le,L={id:p++,callback:X,priorityLevel:L,startTime:Y,expirationTime:le,sortIndex:-1},Y>K?(L.sortIndex=Y,e(d,L),n(f)===null&&L===n(d)&&(x?($(M),M=-1):x=!0,V(R,Y-K))):(L.sortIndex=le,e(f,L),O||b||(O=!0,B||(B=!0,T()))),L},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(L){var X=v;return function(){var Y=v;v=X;try{return L.apply(this,arguments)}finally{v=Y}}}})(Y0)),Y0}var mC;function Q$(){return mC||(mC=1,F0.exports=j$()),F0.exports}var K0={exports:{}},Nn={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var gC;function L$(){if(gC)return Nn;gC=1;var t=Qs();function e(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function s(f,d,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:m==null?null:""+m,children:f,containerInfo:d,implementation:p}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Nn.createPortal=function(f,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return s(f,d,null,p)},Nn.flushSync=function(f){var d=a.T,p=i.p;try{if(a.T=null,i.p=2,f)return f()}finally{a.T=d,i.p=p,i.d.f()}},Nn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,i.d.C(f,d))},Nn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},Nn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var p=d.as,m=c(p,d.crossOrigin),v=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?i.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:v,fetchPriority:b}):p==="script"&&i.d.X(f,{crossOrigin:m,integrity:v,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Nn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=c(d.as,d.crossOrigin);i.d.M(f,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&i.d.M(f)},Nn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,m=c(p,d.crossOrigin);i.d.L(f,p,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Nn.preloadModule=function(f,d){if(typeof f=="string")if(d){var p=c(d.as,d.crossOrigin);i.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else i.d.m(f)},Nn.requestFormReset=function(f){i.d.r(f)},Nn.unstable_batchedUpdates=function(f,d){return f(d)},Nn.useFormState=function(f,d,p){return a.H.useFormState(f,d,p)},Nn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Nn.version="19.2.0",Nn}var yC;function _E(){if(yC)return K0.exports;yC=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),K0.exports=L$(),K0.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var vC;function N$(){if(vC)return lu;vC=1;var t=Q$(),e=Qs(),n=_E();function i(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)l+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var l=o,u=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(u=l.return),o=l.return;while(o)}return l.tag===3?u:null}function a(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function f(o){if(s(o)!==o)throw Error(i(188))}function d(o){var l=o.alternate;if(!l){if(l=s(o),l===null)throw Error(i(188));return l!==o?null:o}for(var u=o,h=l;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(h=g.return,h!==null){u=h;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return f(g),o;if(y===h)return f(g),l;y=y.sibling}throw Error(i(188))}if(u.return!==h.return)u=g,h=y;else{for(var w=!1,P=g.child;P;){if(P===u){w=!0,u=g,h=y;break}if(P===h){w=!0,h=g,u=y;break}P=P.sibling}if(!w){for(P=y.child;P;){if(P===u){w=!0,u=y,h=g;break}if(P===h){w=!0,h=y,u=g;break}P=P.sibling}if(!w)throw Error(i(189))}}if(u.alternate!==h)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?o:l}function p(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=p(o),l!==null)return l;o=o.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),z=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function T(o){return o===null||typeof o!="object"?null:(o=Q&&o[Q]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function q(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case x:return"Fragment";case k:return"Profiler";case C:return"StrictMode";case R:return"Suspense";case B:return"SuspenseList";case N:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case O:return"Portal";case z:return o.displayName||"Context";case $:return(o._context.displayName||"Context")+".Consumer";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return l=o.displayName||null,l!==null?l:q(o.type)||"Memo";case j:l=o._payload,o=o._init;try{return q(o(l))}catch{}}return null}var V=Array.isArray,L=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},K=[],le=-1;function _(o){return{current:o}}function G(o){0>le||(o.current=K[le],K[le]=null,le--)}function se(o,l){le++,K[le]=o.current,o.current=l}var W=_(null),ce=_(null),ne=_(null),he=_(null);function Se(o,l){switch(se(ne,l),se(ce,o),se(W,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?zw(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=zw(l),o=$w(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}G(W),se(W,o)}function ke(){G(W),G(ce),G(ne)}function xe(o){o.memoizedState!==null&&se(he,o);var l=W.current,u=$w(l,o.type);l!==u&&(se(ce,o),se(W,u))}function Re(o){ce.current===o&&(G(W),G(ce)),he.current===o&&(G(he),nu._currentValue=Y)}var Pe,at;function qe(o){if(Pe===void 0)try{throw Error()}catch(u){var l=u.stack.trim().match(/\n( *(at )?)/);Pe=l&&l[1]||"",at=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Pe+o+at}var ct=!1;function At(o,l){if(!o||ct)return"";ct=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(l){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ie){var te=ie}Reflect.construct(o,[],fe)}else{try{fe.call()}catch(ie){te=ie}o.call(fe.prototype)}}else{try{throw Error()}catch(ie){te=ie}(fe=o())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ie){if(ie&&te&&typeof ie.stack=="string")return[ie.stack,te.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=h.DetermineComponentFrameRoot(),w=y[0],P=y[1];if(w&&P){var I=w.split(`
|
|
44
|
-
`),ee=P.split(`
|
|
45
|
-
`);for(g=h=0;h<I.length&&!I[h].includes("DetermineComponentFrameRoot");)h++;for(;g<ee.length&&!ee[g].includes("DetermineComponentFrameRoot");)g++;if(h===I.length||g===ee.length)for(h=I.length-1,g=ee.length-1;1<=h&&0<=g&&I[h]!==ee[g];)g--;for(;1<=h&&0<=g;h--,g--)if(I[h]!==ee[g]){if(h!==1||g!==1)do if(h--,g--,0>g||I[h]!==ee[g]){var re=`
|
|
46
|
-
`+I[h].replace(" at new "," at ");return o.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",o.displayName)),re}while(1<=h&&0<=g);break}}}finally{ct=!1,Error.prepareStackTrace=u}return(u=o?o.displayName||o.name:"")?qe(u):""}function Ke(o,l){switch(o.tag){case 26:case 27:case 5:return qe(o.type);case 16:return qe("Lazy");case 13:return o.child!==l&&l!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return At(o.type,!1);case 11:return At(o.type.render,!1);case 1:return At(o.type,!0);case 31:return qe("Activity");default:return""}}function nt(o){try{var l="",u=null;do l+=Ke(o,u),u=o,o=o.return;while(o);return l}catch(h){return`
|
|
47
|
-
Error generating stack: `+h.message+`
|
|
48
|
-
`+h.stack}}var Ze=Object.prototype.hasOwnProperty,dt=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,Pi=t.unstable_requestPaint,$t=t.unstable_now,cr=t.unstable_getCurrentPriorityLevel,Vt=t.unstable_ImmediatePriority,st=t.unstable_UserBlockingPriority,Bt=t.unstable_NormalPriority,on=t.unstable_LowPriority,zi=t.unstable_IdlePriority,Sn=t.log,kr=t.unstable_setDisableYieldValue,Vn=null,Wt=null;function Wn(o){if(typeof Sn=="function"&&kr(o),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(Vn,o)}catch{}}var mn=Math.clz32?Math.clz32:Uo,pc=Math.log,ro=Math.LN2;function Uo(o){return o>>>=0,o===0?32:31-(pc(o)/ro|0)|0}var Io=256,Ho=262144,Er=4194304;function ur(o){var l=o&42;if(l!==0)return l;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Vo(o,l,u){var h=o.pendingLanes;if(h===0)return 0;var g=0,y=o.suspendedLanes,w=o.pingedLanes;o=o.warmLanes;var P=h&134217727;return P!==0?(h=P&~y,h!==0?g=ur(h):(w&=P,w!==0?g=ur(w):u||(u=P&~o,u!==0&&(g=ur(u))))):(P=h&~y,P!==0?g=ur(P):w!==0?g=ur(w):u||(u=h&~o,u!==0&&(g=ur(u)))),g===0?0:l!==0&&l!==g&&(l&y)===0&&(y=g&-g,u=l&-l,y>=u||y===32&&(u&4194048)!==0)?l:g}function oo(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function mc(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 $e(){var o=Er;return Er<<=1,(Er&62914560)===0&&(Er=4194304),o}function Jn(o){for(var l=[],u=0;31>u;u++)l.push(o);return l}function Oe(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Me(o,l,u,h,g,y){var w=o.pendingLanes;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=u,o.entangledLanes&=u,o.errorRecoveryDisabledLanes&=u,o.shellSuspendCounter=0;var P=o.entanglements,I=o.expirationTimes,ee=o.hiddenUpdates;for(u=w&~u;0<u;){var re=31-mn(u),fe=1<<re;P[re]=0,I[re]=-1;var te=ee[re];if(te!==null)for(ee[re]=null,re=0;re<te.length;re++){var ie=te[re];ie!==null&&(ie.lane&=-536870913)}u&=~fe}h!==0&&ut(o,h,0),y!==0&&g===0&&o.tag!==0&&(o.suspendedLanes|=y&~(w&~l))}function ut(o,l,u){o.pendingLanes|=l,o.suspendedLanes&=~l;var h=31-mn(l);o.entangledLanes|=l,o.entanglements[h]=o.entanglements[h]|1073741824|u&261930}function it(o,l){var u=o.entangledLanes|=l;for(o=o.entanglements;u;){var h=31-mn(u),g=1<<h;g&l|o[h]&l&&(o[h]|=l),u&=~g}}function Ht(o,l){var u=l&-l;return u=(u&42)!==0?1:ei(u),(u&(o.suspendedLanes|l))!==0?0:u}function ei(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function fr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Wo(){var o=X.p;return o!==0?o:(o=window.event,o===void 0?32:iC(o.type))}function gc(o,l){var u=X.p;try{return X.p=o,l()}finally{X.p=u}}var $i=Math.random().toString(36).slice(2),En="__reactFiber$"+$i,ti="__reactProps$"+$i,$l="__reactContainer$"+$i,Qm="__reactEvents$"+$i,SP="__reactListeners$"+$i,xP="__reactHandles$"+$i,O1="__reactResources$"+$i,yc="__reactMarker$"+$i;function Lm(o){delete o[En],delete o[ti],delete o[Qm],delete o[SP],delete o[xP]}function Bl(o){var l=o[En];if(l)return l;for(var u=o.parentNode;u;){if(l=u[$l]||u[En]){if(u=l.alternate,l.child!==null||u!==null&&u.child!==null)for(o=qw(o);o!==null;){if(u=o[En])return u;o=qw(o)}return l}o=u,u=o.parentNode}return null}function jl(o){if(o=o[En]||o[$l]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function vc(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(i(33))}function Ql(o){var l=o[O1];return l||(l=o[O1]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function xn(o){o[yc]=!0}var S1=new Set,x1={};function qs(o,l){Ll(o,l),Ll(o+"Capture",l)}function Ll(o,l){for(x1[o]=l,o=0;o<l.length;o++)S1.add(l[o])}var wP=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]*$"),w1={},C1={};function CP(o){return Ze.call(C1,o)?!0:Ze.call(w1,o)?!1:wP.test(o)?C1[o]=!0:(w1[o]=!0,!1)}function Hf(o,l,u){if(CP(l))if(u===null)o.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var h=l.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+u)}}function Vf(o,l,u){if(u===null)o.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+u)}}function so(o,l,u,h){if(h===null)o.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttributeNS(l,u,""+h)}}function Bi(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function T1(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function TP(o,l,u){var h=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var g=h.get,y=h.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return g.call(this)},set:function(w){u=""+w,y.call(this,w)}}),Object.defineProperty(o,l,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(w){u=""+w},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Nm(o){if(!o._valueTracker){var l=T1(o)?"checked":"value";o._valueTracker=TP(o,l,""+o[l])}}function k1(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var u=l.getValue(),h="";return o&&(h=T1(o)?o.checked?"true":"false":o.value),o=h,o!==u?(l.setValue(o),!0):!1}function Wf(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var kP=/[\n"\\]/g;function ji(o){return o.replace(kP,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function _m(o,l,u,h,g,y,w,P){o.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?o.type=w:o.removeAttribute("type"),l!=null?w==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Bi(l)):o.value!==""+Bi(l)&&(o.value=""+Bi(l)):w!=="submit"&&w!=="reset"||o.removeAttribute("value"),l!=null?qm(o,w,Bi(l)):u!=null?qm(o,w,Bi(u)):h!=null&&o.removeAttribute("value"),g==null&&y!=null&&(o.defaultChecked=!!y),g!=null&&(o.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?o.name=""+Bi(P):o.removeAttribute("name")}function E1(o,l,u,h,g,y,w,P){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(o.type=y),l!=null||u!=null){if(!(y!=="submit"&&y!=="reset"||l!=null)){Nm(o);return}u=u!=null?""+Bi(u):"",l=l!=null?""+Bi(l):u,P||l===o.value||(o.value=l),o.defaultValue=l}h=h??g,h=typeof h!="function"&&typeof h!="symbol"&&!!h,o.checked=P?o.checked:!!h,o.defaultChecked=!!h,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(o.name=w),Nm(o)}function qm(o,l,u){l==="number"&&Wf(o.ownerDocument)===o||o.defaultValue===""+u||(o.defaultValue=""+u)}function Nl(o,l,u,h){if(o=o.options,l){l={};for(var g=0;g<u.length;g++)l["$"+u[g]]=!0;for(u=0;u<o.length;u++)g=l.hasOwnProperty("$"+o[u].value),o[u].selected!==g&&(o[u].selected=g),g&&h&&(o[u].defaultSelected=!0)}else{for(u=""+Bi(u),l=null,g=0;g<o.length;g++){if(o[g].value===u){o[g].selected=!0,h&&(o[g].defaultSelected=!0);return}l!==null||o[g].disabled||(l=o[g])}l!==null&&(l.selected=!0)}}function A1(o,l,u){if(l!=null&&(l=""+Bi(l),l!==o.value&&(o.value=l),u==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=u!=null?""+Bi(u):""}function R1(o,l,u,h){if(l==null){if(h!=null){if(u!=null)throw Error(i(92));if(V(h)){if(1<h.length)throw Error(i(93));h=h[0]}u=h}u==null&&(u=""),l=u}u=Bi(l),o.defaultValue=u,h=o.textContent,h===u&&h!==""&&h!==null&&(o.value=h),Nm(o)}function _l(o,l){if(l){var u=o.firstChild;if(u&&u===o.lastChild&&u.nodeType===3){u.nodeValue=l;return}}o.textContent=l}var EP=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 M1(o,l,u){var h=l.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":h?o.setProperty(l,u):typeof u!="number"||u===0||EP.has(l)?l==="float"?o.cssFloat=u:o[l]=(""+u).trim():o[l]=u+"px"}function D1(o,l,u){if(l!=null&&typeof l!="object")throw Error(i(62));if(o=o.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||l!=null&&l.hasOwnProperty(h)||(h.indexOf("--")===0?o.setProperty(h,""):h==="float"?o.cssFloat="":o[h]="");for(var g in l)h=l[g],l.hasOwnProperty(g)&&u[g]!==h&&M1(o,g,h)}else for(var y in l)l.hasOwnProperty(y)&&M1(o,y,l[y])}function Um(o){if(o.indexOf("-")===-1)return!1;switch(o){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 AP=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"]]),RP=/^[\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 Xf(o){return RP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function lo(){}var Im=null;function Hm(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ql=null,Ul=null;function P1(o){var l=jl(o);if(l&&(o=l.stateNode)){var u=o[ti]||null;e:switch(o=l.stateNode,l.type){case"input":if(_m(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),l=u.name,u.type==="radio"&&l!=null){for(u=o;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+ji(""+l)+'"][type="radio"]'),l=0;l<u.length;l++){var h=u[l];if(h!==o&&h.form===o.form){var g=h[ti]||null;if(!g)throw Error(i(90));_m(h,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(l=0;l<u.length;l++)h=u[l],h.form===o.form&&k1(h)}break e;case"textarea":A1(o,u.value,u.defaultValue);break e;case"select":l=u.value,l!=null&&Nl(o,!!u.multiple,l,!1)}}}var Vm=!1;function z1(o,l,u){if(Vm)return o(l,u);Vm=!0;try{var h=o(l);return h}finally{if(Vm=!1,(ql!==null||Ul!==null)&&($h(),ql&&(l=ql,o=Ul,Ul=ql=null,P1(l),o)))for(l=0;l<o.length;l++)P1(o[l])}}function bc(o,l){var u=o.stateNode;if(u===null)return null;var h=u[ti]||null;if(h===null)return null;u=h[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(o=o.type,h=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!h;break e;default:o=!1}if(o)return null;if(u&&typeof u!="function")throw Error(i(231,l,typeof u));return u}var ao=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wm=!1;if(ao)try{var Oc={};Object.defineProperty(Oc,"passive",{get:function(){Wm=!0}}),window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{Wm=!1}var Xo=null,Xm=null,Gf=null;function $1(){if(Gf)return Gf;var o,l=Xm,u=l.length,h,g="value"in Xo?Xo.value:Xo.textContent,y=g.length;for(o=0;o<u&&l[o]===g[o];o++);var w=u-o;for(h=1;h<=w&&l[u-h]===g[y-h];h++);return Gf=g.slice(o,1<h?1-h:void 0)}function Ff(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function Yf(){return!0}function B1(){return!1}function ni(o){function l(u,h,g,y,w){this._reactName=u,this._targetInst=g,this.type=h,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var P in o)o.hasOwnProperty(P)&&(u=o[P],this[P]=u?u(y):y[P]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Yf:B1,this.isPropagationStopped=B1,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Yf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Yf)},persist:function(){},isPersistent:Yf}),l}var Us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kf=ni(Us),Sc=m({},Us,{view:0,detail:0}),MP=ni(Sc),Gm,Fm,xc,Zf=m({},Sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Km,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==xc&&(xc&&o.type==="mousemove"?(Gm=o.screenX-xc.screenX,Fm=o.screenY-xc.screenY):Fm=Gm=0,xc=o),Gm)},movementY:function(o){return"movementY"in o?o.movementY:Fm}}),j1=ni(Zf),DP=m({},Zf,{dataTransfer:0}),PP=ni(DP),zP=m({},Sc,{relatedTarget:0}),Ym=ni(zP),$P=m({},Us,{animationName:0,elapsedTime:0,pseudoElement:0}),BP=ni($P),jP=m({},Us,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),QP=ni(jP),LP=m({},Us,{data:0}),Q1=ni(LP),NP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_P={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"},qP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UP(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=qP[o])?!!l[o]:!1}function Km(){return UP}var IP=m({},Sc,{key:function(o){if(o.key){var l=NP[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Ff(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?_P[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Km,charCode:function(o){return o.type==="keypress"?Ff(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Ff(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),HP=ni(IP),VP=m({},Zf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),L1=ni(VP),WP=m({},Sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Km}),XP=ni(WP),GP=m({},Us,{propertyName:0,elapsedTime:0,pseudoElement:0}),FP=ni(GP),YP=m({},Zf,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),KP=ni(YP),ZP=m({},Us,{newState:0,oldState:0}),JP=ni(ZP),ez=[9,13,27,32],Zm=ao&&"CompositionEvent"in window,wc=null;ao&&"documentMode"in document&&(wc=document.documentMode);var tz=ao&&"TextEvent"in window&&!wc,N1=ao&&(!Zm||wc&&8<wc&&11>=wc),_1=" ",q1=!1;function U1(o,l){switch(o){case"keyup":return ez.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Il=!1;function nz(o,l){switch(o){case"compositionend":return I1(l);case"keypress":return l.which!==32?null:(q1=!0,_1);case"textInput":return o=l.data,o===_1&&q1?null:o;default:return null}}function iz(o,l){if(Il)return o==="compositionend"||!Zm&&U1(o,l)?(o=$1(),Gf=Xm=Xo=null,Il=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return N1&&l.locale!=="ko"?null:l.data;default:return null}}var rz={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 H1(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!rz[o.type]:l==="textarea"}function V1(o,l,u,h){ql?Ul?Ul.push(h):Ul=[h]:ql=h,l=qh(l,"onChange"),0<l.length&&(u=new Kf("onChange","change",null,u,h),o.push({event:u,listeners:l}))}var Cc=null,Tc=null;function oz(o){Ew(o,0)}function Jf(o){var l=vc(o);if(k1(l))return o}function W1(o,l){if(o==="change")return l}var X1=!1;if(ao){var Jm;if(ao){var eg="oninput"in document;if(!eg){var G1=document.createElement("div");G1.setAttribute("oninput","return;"),eg=typeof G1.oninput=="function"}Jm=eg}else Jm=!1;X1=Jm&&(!document.documentMode||9<document.documentMode)}function F1(){Cc&&(Cc.detachEvent("onpropertychange",Y1),Tc=Cc=null)}function Y1(o){if(o.propertyName==="value"&&Jf(Tc)){var l=[];V1(l,Tc,o,Hm(o)),z1(oz,l)}}function sz(o,l,u){o==="focusin"?(F1(),Cc=l,Tc=u,Cc.attachEvent("onpropertychange",Y1)):o==="focusout"&&F1()}function lz(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Jf(Tc)}function az(o,l){if(o==="click")return Jf(l)}function cz(o,l){if(o==="input"||o==="change")return Jf(l)}function uz(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var gi=typeof Object.is=="function"?Object.is:uz;function kc(o,l){if(gi(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var u=Object.keys(o),h=Object.keys(l);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var g=u[h];if(!Ze.call(l,g)||!gi(o[g],l[g]))return!1}return!0}function K1(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Z1(o,l){var u=K1(o);o=0;for(var h;u;){if(u.nodeType===3){if(h=o+u.textContent.length,o<=l&&h>=l)return{node:u,offset:l-o};o=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=K1(u)}}function J1(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?J1(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function eS(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=Wf(o.document);l instanceof o.HTMLIFrameElement;){try{var u=typeof l.contentWindow.location.href=="string"}catch{u=!1}if(u)o=l.contentWindow;else break;l=Wf(o.document)}return l}function tg(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var fz=ao&&"documentMode"in document&&11>=document.documentMode,Hl=null,ng=null,Ec=null,ig=!1;function tS(o,l,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;ig||Hl==null||Hl!==Wf(h)||(h=Hl,"selectionStart"in h&&tg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ec&&kc(Ec,h)||(Ec=h,h=qh(ng,"onSelect"),0<h.length&&(l=new Kf("onSelect","select",null,l,u),o.push({event:l,listeners:h}),l.target=Hl)))}function Is(o,l){var u={};return u[o.toLowerCase()]=l.toLowerCase(),u["Webkit"+o]="webkit"+l,u["Moz"+o]="moz"+l,u}var Vl={animationend:Is("Animation","AnimationEnd"),animationiteration:Is("Animation","AnimationIteration"),animationstart:Is("Animation","AnimationStart"),transitionrun:Is("Transition","TransitionRun"),transitionstart:Is("Transition","TransitionStart"),transitioncancel:Is("Transition","TransitionCancel"),transitionend:Is("Transition","TransitionEnd")},rg={},nS={};ao&&(nS=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function Hs(o){if(rg[o])return rg[o];if(!Vl[o])return o;var l=Vl[o],u;for(u in l)if(l.hasOwnProperty(u)&&u in nS)return rg[o]=l[u];return o}var iS=Hs("animationend"),rS=Hs("animationiteration"),oS=Hs("animationstart"),hz=Hs("transitionrun"),dz=Hs("transitionstart"),pz=Hs("transitioncancel"),sS=Hs("transitionend"),lS=new Map,og="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(" ");og.push("scrollEnd");function hr(o,l){lS.set(o,l),qs(l,[o])}var eh=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Qi=[],Wl=0,sg=0;function th(){for(var o=Wl,l=sg=Wl=0;l<o;){var u=Qi[l];Qi[l++]=null;var h=Qi[l];Qi[l++]=null;var g=Qi[l];Qi[l++]=null;var y=Qi[l];if(Qi[l++]=null,h!==null&&g!==null){var w=h.pending;w===null?g.next=g:(g.next=w.next,w.next=g),h.pending=g}y!==0&&aS(u,g,y)}}function nh(o,l,u,h){Qi[Wl++]=o,Qi[Wl++]=l,Qi[Wl++]=u,Qi[Wl++]=h,sg|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function lg(o,l,u,h){return nh(o,l,u,h),ih(o)}function Vs(o,l){return nh(o,null,null,l),ih(o)}function aS(o,l,u){o.lanes|=u;var h=o.alternate;h!==null&&(h.lanes|=u);for(var g=!1,y=o.return;y!==null;)y.childLanes|=u,h=y.alternate,h!==null&&(h.childLanes|=u),y.tag===22&&(o=y.stateNode,o===null||o._visibility&1||(g=!0)),o=y,y=y.return;return o.tag===3?(y=o.stateNode,g&&l!==null&&(g=31-mn(u),o=y.hiddenUpdates,h=o[g],h===null?o[g]=[l]:h.push(l),l.lane=u|536870912),y):null}function ih(o){if(50<Fc)throw Fc=0,g0=null,Error(i(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var Xl={};function mz(o,l,u,h){this.tag=o,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yi(o,l,u,h){return new mz(o,l,u,h)}function ag(o){return o=o.prototype,!(!o||!o.isReactComponent)}function co(o,l){var u=o.alternate;return u===null?(u=yi(o.tag,l,o.key,o.mode),u.elementType=o.elementType,u.type=o.type,u.stateNode=o.stateNode,u.alternate=o,o.alternate=u):(u.pendingProps=l,u.type=o.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=o.flags&65011712,u.childLanes=o.childLanes,u.lanes=o.lanes,u.child=o.child,u.memoizedProps=o.memoizedProps,u.memoizedState=o.memoizedState,u.updateQueue=o.updateQueue,l=o.dependencies,u.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},u.sibling=o.sibling,u.index=o.index,u.ref=o.ref,u.refCleanup=o.refCleanup,u}function cS(o,l){o.flags&=65011714;var u=o.alternate;return u===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,l=u.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function rh(o,l,u,h,g,y){var w=0;if(h=o,typeof o=="function")ag(o)&&(w=1);else if(typeof o=="string")w=O$(o,u,W.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case N:return o=yi(31,u,l,g),o.elementType=N,o.lanes=y,o;case x:return Ws(u.children,g,y,l);case C:w=8,g|=24;break;case k:return o=yi(12,u,l,g|2),o.elementType=k,o.lanes=y,o;case R:return o=yi(13,u,l,g),o.elementType=R,o.lanes=y,o;case B:return o=yi(19,u,l,g),o.elementType=B,o.lanes=y,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case z:w=10;break e;case $:w=9;break e;case D:w=11;break e;case M:w=14;break e;case j:w=16,h=null;break e}w=29,u=Error(i(130,o===null?"null":typeof o,"")),h=null}return l=yi(w,u,l,g),l.elementType=o,l.type=h,l.lanes=y,l}function Ws(o,l,u,h){return o=yi(7,o,h,l),o.lanes=u,o}function cg(o,l,u){return o=yi(6,o,null,l),o.lanes=u,o}function uS(o){var l=yi(18,null,null,0);return l.stateNode=o,l}function ug(o,l,u){return l=yi(4,o.children!==null?o.children:[],o.key,l),l.lanes=u,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var fS=new WeakMap;function Li(o,l){if(typeof o=="object"&&o!==null){var u=fS.get(o);return u!==void 0?u:(l={value:o,source:l,stack:nt(l)},fS.set(o,l),l)}return{value:o,source:l,stack:nt(l)}}var Gl=[],Fl=0,oh=null,Ac=0,Ni=[],_i=0,Go=null,Ar=1,Rr="";function uo(o,l){Gl[Fl++]=Ac,Gl[Fl++]=oh,oh=o,Ac=l}function hS(o,l,u){Ni[_i++]=Ar,Ni[_i++]=Rr,Ni[_i++]=Go,Go=o;var h=Ar;o=Rr;var g=32-mn(h)-1;h&=~(1<<g),u+=1;var y=32-mn(l)+g;if(30<y){var w=g-g%5;y=(h&(1<<w)-1).toString(32),h>>=w,g-=w,Ar=1<<32-mn(l)+g|u<<g|h,Rr=y+o}else Ar=1<<y|u<<g|h,Rr=o}function fg(o){o.return!==null&&(uo(o,1),hS(o,1,0))}function hg(o){for(;o===oh;)oh=Gl[--Fl],Gl[Fl]=null,Ac=Gl[--Fl],Gl[Fl]=null;for(;o===Go;)Go=Ni[--_i],Ni[_i]=null,Rr=Ni[--_i],Ni[_i]=null,Ar=Ni[--_i],Ni[_i]=null}function dS(o,l){Ni[_i++]=Ar,Ni[_i++]=Rr,Ni[_i++]=Go,Ar=l.id,Rr=l.overflow,Go=o}var An=null,jt=null,tt=!1,Fo=null,qi=!1,dg=Error(i(519));function Yo(o){var l=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Rc(Li(l,o)),dg}function pS(o){var l=o.stateNode,u=o.type,h=o.memoizedProps;switch(l[En]=o,l[ti]=h,u){case"dialog":Ge("cancel",l),Ge("close",l);break;case"iframe":case"object":case"embed":Ge("load",l);break;case"video":case"audio":for(u=0;u<Kc.length;u++)Ge(Kc[u],l);break;case"source":Ge("error",l);break;case"img":case"image":case"link":Ge("error",l),Ge("load",l);break;case"details":Ge("toggle",l);break;case"input":Ge("invalid",l),E1(l,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":Ge("invalid",l);break;case"textarea":Ge("invalid",l),R1(l,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||l.textContent===""+u||h.suppressHydrationWarning===!0||Dw(l.textContent,u)?(h.popover!=null&&(Ge("beforetoggle",l),Ge("toggle",l)),h.onScroll!=null&&Ge("scroll",l),h.onScrollEnd!=null&&Ge("scrollend",l),h.onClick!=null&&(l.onclick=lo),l=!0):l=!1,l||Yo(o,!0)}function mS(o){for(An=o.return;An;)switch(An.tag){case 5:case 31:case 13:qi=!1;return;case 27:case 3:qi=!0;return;default:An=An.return}}function Yl(o){if(o!==An)return!1;if(!tt)return mS(o),tt=!0,!1;var l=o.tag,u;if((u=l!==3&&l!==27)&&((u=l===5)&&(u=o.type,u=!(u!=="form"&&u!=="button")||D0(o.type,o.memoizedProps)),u=!u),u&&jt&&Yo(o),mS(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));jt=_w(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));jt=_w(o)}else l===27?(l=jt,us(o.type)?(o=j0,j0=null,jt=o):jt=l):jt=An?Ii(o.stateNode.nextSibling):null;return!0}function Xs(){jt=An=null,tt=!1}function pg(){var o=Fo;return o!==null&&(si===null?si=o:si.push.apply(si,o),Fo=null),o}function Rc(o){Fo===null?Fo=[o]:Fo.push(o)}var mg=_(null),Gs=null,fo=null;function Ko(o,l,u){se(mg,l._currentValue),l._currentValue=u}function ho(o){o._currentValue=mg.current,G(mg)}function gg(o,l,u){for(;o!==null;){var h=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,h!==null&&(h.childLanes|=l)):h!==null&&(h.childLanes&l)!==l&&(h.childLanes|=l),o===u)break;o=o.return}}function yg(o,l,u,h){var g=o.child;for(g!==null&&(g.return=o);g!==null;){var y=g.dependencies;if(y!==null){var w=g.child;y=y.firstContext;e:for(;y!==null;){var P=y;y=g;for(var I=0;I<l.length;I++)if(P.context===l[I]){y.lanes|=u,P=y.alternate,P!==null&&(P.lanes|=u),gg(y.return,u,o),h||(w=null);break e}y=P.next}}else if(g.tag===18){if(w=g.return,w===null)throw Error(i(341));w.lanes|=u,y=w.alternate,y!==null&&(y.lanes|=u),gg(w,u,o),w=null}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===o){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}}function Kl(o,l,u,h){o=null;for(var g=l,y=!1;g!==null;){if(!y){if((g.flags&524288)!==0)y=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var w=g.alternate;if(w===null)throw Error(i(387));if(w=w.memoizedProps,w!==null){var P=g.type;gi(g.pendingProps.value,w.value)||(o!==null?o.push(P):o=[P])}}else if(g===he.current){if(w=g.alternate,w===null)throw Error(i(387));w.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(o!==null?o.push(nu):o=[nu])}g=g.return}o!==null&&yg(l,o,u,h),l.flags|=262144}function sh(o){for(o=o.firstContext;o!==null;){if(!gi(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Fs(o){Gs=o,fo=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Rn(o){return gS(Gs,o)}function lh(o,l){return Gs===null&&Fs(o),gS(o,l)}function gS(o,l){var u=l._currentValue;if(l={context:l,memoizedValue:u,next:null},fo===null){if(o===null)throw Error(i(308));fo=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else fo=fo.next=l;return u}var gz=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(u,h){o.push(h)}};this.abort=function(){l.aborted=!0,o.forEach(function(u){return u()})}},yz=t.unstable_scheduleCallback,vz=t.unstable_NormalPriority,sn={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vg(){return{controller:new gz,data:new Map,refCount:0}}function Mc(o){o.refCount--,o.refCount===0&&yz(vz,function(){o.controller.abort()})}var Dc=null,bg=0,Zl=0,Jl=null;function bz(o,l){if(Dc===null){var u=Dc=[];bg=0,Zl=x0(),Jl={status:"pending",value:void 0,then:function(h){u.push(h)}}}return bg++,l.then(yS,yS),l}function yS(){if(--bg===0&&Dc!==null){Jl!==null&&(Jl.status="fulfilled");var o=Dc;Dc=null,Zl=0,Jl=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function Oz(o,l){var u=[],h={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return o.then(function(){h.status="fulfilled",h.value=l;for(var g=0;g<u.length;g++)(0,u[g])(l)},function(g){for(h.status="rejected",h.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),h}var vS=L.S;L.S=function(o,l){tw=$t(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&bz(o,l),vS!==null&&vS(o,l)};var Ys=_(null);function Og(){var o=Ys.current;return o!==null?o:Rt.pooledCache}function ah(o,l){l===null?se(Ys,Ys.current):se(Ys,l.pool)}function bS(){var o=Og();return o===null?null:{parent:sn._currentValue,pool:o}}var ea=Error(i(460)),Sg=Error(i(474)),ch=Error(i(542)),uh={then:function(){}};function OS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function SS(o,l,u){switch(u=o[u],u===void 0?o.push(l):u!==l&&(l.then(lo,lo),l=u),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,wS(o),o;default:if(typeof l.status=="string")l.then(lo,lo);else{if(o=Rt,o!==null&&100<o.shellSuspendCounter)throw Error(i(482));o=l,o.status="pending",o.then(function(h){if(l.status==="pending"){var g=l;g.status="fulfilled",g.value=h}},function(h){if(l.status==="pending"){var g=l;g.status="rejected",g.reason=h}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,wS(o),o}throw Zs=l,ea}}function Ks(o){try{var l=o._init;return l(o._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Zs=u,ea):u}}var Zs=null;function xS(){if(Zs===null)throw Error(i(459));var o=Zs;return Zs=null,o}function wS(o){if(o===ea||o===ch)throw Error(i(483))}var ta=null,Pc=0;function fh(o){var l=Pc;return Pc+=1,ta===null&&(ta=[]),SS(ta,o,l)}function zc(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function hh(o,l){throw l.$$typeof===v?Error(i(525)):(o=Object.prototype.toString.call(l),Error(i(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function CS(o){function l(F,H){if(o){var Z=F.deletions;Z===null?(F.deletions=[H],F.flags|=16):Z.push(H)}}function u(F,H){if(!o)return null;for(;H!==null;)l(F,H),H=H.sibling;return null}function h(F){for(var H=new Map;F!==null;)F.key!==null?H.set(F.key,F):H.set(F.index,F),F=F.sibling;return H}function g(F,H){return F=co(F,H),F.index=0,F.sibling=null,F}function y(F,H,Z){return F.index=Z,o?(Z=F.alternate,Z!==null?(Z=Z.index,Z<H?(F.flags|=67108866,H):Z):(F.flags|=67108866,H)):(F.flags|=1048576,H)}function w(F){return o&&F.alternate===null&&(F.flags|=67108866),F}function P(F,H,Z,ae){return H===null||H.tag!==6?(H=cg(Z,F.mode,ae),H.return=F,H):(H=g(H,Z),H.return=F,H)}function I(F,H,Z,ae){var Ae=Z.type;return Ae===x?re(F,H,Z.props.children,ae,Z.key):H!==null&&(H.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===j&&Ks(Ae)===H.type)?(H=g(H,Z.props),zc(H,Z),H.return=F,H):(H=rh(Z.type,Z.key,Z.props,null,F.mode,ae),zc(H,Z),H.return=F,H)}function ee(F,H,Z,ae){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=ug(Z,F.mode,ae),H.return=F,H):(H=g(H,Z.children||[]),H.return=F,H)}function re(F,H,Z,ae,Ae){return H===null||H.tag!==7?(H=Ws(Z,F.mode,ae,Ae),H.return=F,H):(H=g(H,Z),H.return=F,H)}function fe(F,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=cg(""+H,F.mode,Z),H.return=F,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return Z=rh(H.type,H.key,H.props,null,F.mode,Z),zc(Z,H),Z.return=F,Z;case O:return H=ug(H,F.mode,Z),H.return=F,H;case j:return H=Ks(H),fe(F,H,Z)}if(V(H)||T(H))return H=Ws(H,F.mode,Z,null),H.return=F,H;if(typeof H.then=="function")return fe(F,fh(H),Z);if(H.$$typeof===z)return fe(F,lh(F,H),Z);hh(F,H)}return null}function te(F,H,Z,ae){var Ae=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ae!==null?null:P(F,H,""+Z,ae);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return Z.key===Ae?I(F,H,Z,ae):null;case O:return Z.key===Ae?ee(F,H,Z,ae):null;case j:return Z=Ks(Z),te(F,H,Z,ae)}if(V(Z)||T(Z))return Ae!==null?null:re(F,H,Z,ae,null);if(typeof Z.then=="function")return te(F,H,fh(Z),ae);if(Z.$$typeof===z)return te(F,H,lh(F,Z),ae);hh(F,Z)}return null}function ie(F,H,Z,ae,Ae){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return F=F.get(Z)||null,P(H,F,""+ae,Ae);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return F=F.get(ae.key===null?Z:ae.key)||null,I(H,F,ae,Ae);case O:return F=F.get(ae.key===null?Z:ae.key)||null,ee(H,F,ae,Ae);case j:return ae=Ks(ae),ie(F,H,Z,ae,Ae)}if(V(ae)||T(ae))return F=F.get(Z)||null,re(H,F,ae,Ae,null);if(typeof ae.then=="function")return ie(F,H,Z,fh(ae),Ae);if(ae.$$typeof===z)return ie(F,H,Z,lh(H,ae),Ae);hh(H,ae)}return null}function we(F,H,Z,ae){for(var Ae=null,ft=null,Ce=H,Ue=H=0,et=null;Ce!==null&&Ue<Z.length;Ue++){Ce.index>Ue?(et=Ce,Ce=null):et=Ce.sibling;var ht=te(F,Ce,Z[Ue],ae);if(ht===null){Ce===null&&(Ce=et);break}o&&Ce&&ht.alternate===null&&l(F,Ce),H=y(ht,H,Ue),ft===null?Ae=ht:ft.sibling=ht,ft=ht,Ce=et}if(Ue===Z.length)return u(F,Ce),tt&&uo(F,Ue),Ae;if(Ce===null){for(;Ue<Z.length;Ue++)Ce=fe(F,Z[Ue],ae),Ce!==null&&(H=y(Ce,H,Ue),ft===null?Ae=Ce:ft.sibling=Ce,ft=Ce);return tt&&uo(F,Ue),Ae}for(Ce=h(Ce);Ue<Z.length;Ue++)et=ie(Ce,F,Ue,Z[Ue],ae),et!==null&&(o&&et.alternate!==null&&Ce.delete(et.key===null?Ue:et.key),H=y(et,H,Ue),ft===null?Ae=et:ft.sibling=et,ft=et);return o&&Ce.forEach(function(ms){return l(F,ms)}),tt&&uo(F,Ue),Ae}function De(F,H,Z,ae){if(Z==null)throw Error(i(151));for(var Ae=null,ft=null,Ce=H,Ue=H=0,et=null,ht=Z.next();Ce!==null&&!ht.done;Ue++,ht=Z.next()){Ce.index>Ue?(et=Ce,Ce=null):et=Ce.sibling;var ms=te(F,Ce,ht.value,ae);if(ms===null){Ce===null&&(Ce=et);break}o&&Ce&&ms.alternate===null&&l(F,Ce),H=y(ms,H,Ue),ft===null?Ae=ms:ft.sibling=ms,ft=ms,Ce=et}if(ht.done)return u(F,Ce),tt&&uo(F,Ue),Ae;if(Ce===null){for(;!ht.done;Ue++,ht=Z.next())ht=fe(F,ht.value,ae),ht!==null&&(H=y(ht,H,Ue),ft===null?Ae=ht:ft.sibling=ht,ft=ht);return tt&&uo(F,Ue),Ae}for(Ce=h(Ce);!ht.done;Ue++,ht=Z.next())ht=ie(Ce,F,Ue,ht.value,ae),ht!==null&&(o&&ht.alternate!==null&&Ce.delete(ht.key===null?Ue:ht.key),H=y(ht,H,Ue),ft===null?Ae=ht:ft.sibling=ht,ft=ht);return o&&Ce.forEach(function(D$){return l(F,D$)}),tt&&uo(F,Ue),Ae}function Tt(F,H,Z,ae){if(typeof Z=="object"&&Z!==null&&Z.type===x&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:e:{for(var Ae=Z.key;H!==null;){if(H.key===Ae){if(Ae=Z.type,Ae===x){if(H.tag===7){u(F,H.sibling),ae=g(H,Z.props.children),ae.return=F,F=ae;break e}}else if(H.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===j&&Ks(Ae)===H.type){u(F,H.sibling),ae=g(H,Z.props),zc(ae,Z),ae.return=F,F=ae;break e}u(F,H);break}else l(F,H);H=H.sibling}Z.type===x?(ae=Ws(Z.props.children,F.mode,ae,Z.key),ae.return=F,F=ae):(ae=rh(Z.type,Z.key,Z.props,null,F.mode,ae),zc(ae,Z),ae.return=F,F=ae)}return w(F);case O:e:{for(Ae=Z.key;H!==null;){if(H.key===Ae)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){u(F,H.sibling),ae=g(H,Z.children||[]),ae.return=F,F=ae;break e}else{u(F,H);break}else l(F,H);H=H.sibling}ae=ug(Z,F.mode,ae),ae.return=F,F=ae}return w(F);case j:return Z=Ks(Z),Tt(F,H,Z,ae)}if(V(Z))return we(F,H,Z,ae);if(T(Z)){if(Ae=T(Z),typeof Ae!="function")throw Error(i(150));return Z=Ae.call(Z),De(F,H,Z,ae)}if(typeof Z.then=="function")return Tt(F,H,fh(Z),ae);if(Z.$$typeof===z)return Tt(F,H,lh(F,Z),ae);hh(F,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(u(F,H.sibling),ae=g(H,Z),ae.return=F,F=ae):(u(F,H),ae=cg(Z,F.mode,ae),ae.return=F,F=ae),w(F)):u(F,H)}return function(F,H,Z,ae){try{Pc=0;var Ae=Tt(F,H,Z,ae);return ta=null,Ae}catch(Ce){if(Ce===ea||Ce===ch)throw Ce;var ft=yi(29,Ce,null,F.mode);return ft.lanes=ae,ft.return=F,ft}finally{}}}var Js=CS(!0),TS=CS(!1),Zo=!1;function xg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wg(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Jo(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function es(o,l,u){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(pt&2)!==0){var g=h.pending;return g===null?l.next=l:(l.next=g.next,g.next=l),h.pending=l,l=ih(o),aS(o,null,u),l}return nh(o,h,l,u),ih(o)}function $c(o,l,u){if(l=l.updateQueue,l!==null&&(l=l.shared,(u&4194048)!==0)){var h=l.lanes;h&=o.pendingLanes,u|=h,l.lanes=u,it(o,u)}}function Cg(o,l){var u=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var w={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};y===null?g=y=w:y=y.next=w,u=u.next}while(u!==null);y===null?g=y=l:y=y.next=l}else g=y=l;u={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:h.shared,callbacks:h.callbacks},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=l:o.next=l,u.lastBaseUpdate=l}var Tg=!1;function Bc(){if(Tg){var o=Jl;if(o!==null)throw o}}function jc(o,l,u,h){Tg=!1;var g=o.updateQueue;Zo=!1;var y=g.firstBaseUpdate,w=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var I=P,ee=I.next;I.next=null,w===null?y=ee:w.next=ee,w=I;var re=o.alternate;re!==null&&(re=re.updateQueue,P=re.lastBaseUpdate,P!==w&&(P===null?re.firstBaseUpdate=ee:P.next=ee,re.lastBaseUpdate=I))}if(y!==null){var fe=g.baseState;w=0,re=ee=I=null,P=y;do{var te=P.lane&-536870913,ie=te!==P.lane;if(ie?(Je&te)===te:(h&te)===te){te!==0&&te===Zl&&(Tg=!0),re!==null&&(re=re.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var we=o,De=P;te=l;var Tt=u;switch(De.tag){case 1:if(we=De.payload,typeof we=="function"){fe=we.call(Tt,fe,te);break e}fe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=De.payload,te=typeof we=="function"?we.call(Tt,fe,te):we,te==null)break e;fe=m({},fe,te);break e;case 2:Zo=!0}}te=P.callback,te!==null&&(o.flags|=64,ie&&(o.flags|=8192),ie=g.callbacks,ie===null?g.callbacks=[te]:ie.push(te))}else ie={lane:te,tag:P.tag,payload:P.payload,callback:P.callback,next:null},re===null?(ee=re=ie,I=fe):re=re.next=ie,w|=te;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;ie=P,P=ie.next,ie.next=null,g.lastBaseUpdate=ie,g.shared.pending=null}}while(!0);re===null&&(I=fe),g.baseState=I,g.firstBaseUpdate=ee,g.lastBaseUpdate=re,y===null&&(g.shared.lanes=0),os|=w,o.lanes=w,o.memoizedState=fe}}function kS(o,l){if(typeof o!="function")throw Error(i(191,o));o.call(l)}function ES(o,l){var u=o.callbacks;if(u!==null)for(o.callbacks=null,o=0;o<u.length;o++)kS(u[o],l)}var na=_(null),dh=_(0);function AS(o,l){o=xo,se(dh,o),se(na,l),xo=o|l.baseLanes}function kg(){se(dh,xo),se(na,na.current)}function Eg(){xo=dh.current,G(na),G(dh)}var vi=_(null),Ui=null;function ts(o){var l=o.alternate;se(en,en.current&1),se(vi,o),Ui===null&&(l===null||na.current!==null||l.memoizedState!==null)&&(Ui=o)}function Ag(o){se(en,en.current),se(vi,o),Ui===null&&(Ui=o)}function RS(o){o.tag===22?(se(en,en.current),se(vi,o),Ui===null&&(Ui=o)):ns()}function ns(){se(en,en.current),se(vi,vi.current)}function bi(o){G(vi),Ui===o&&(Ui=null),G(en)}var en=_(0);function ph(o){for(var l=o;l!==null;){if(l.tag===13){var u=l.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||$0(u)||B0(u)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var po=0,Ne=null,wt=null,ln=null,mh=!1,ia=!1,el=!1,gh=0,Qc=0,ra=null,Sz=0;function Xt(){throw Error(i(321))}function Rg(o,l){if(l===null)return!1;for(var u=0;u<l.length&&u<o.length;u++)if(!gi(o[u],l[u]))return!1;return!0}function Mg(o,l,u,h,g,y){return po=y,Ne=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,L.H=o===null||o.memoizedState===null?hx:Vg,el=!1,y=u(h,g),el=!1,ia&&(y=DS(l,u,h,g)),MS(o),y}function MS(o){L.H=_c;var l=wt!==null&&wt.next!==null;if(po=0,ln=wt=Ne=null,mh=!1,Qc=0,ra=null,l)throw Error(i(300));o===null||an||(o=o.dependencies,o!==null&&sh(o)&&(an=!0))}function DS(o,l,u,h){Ne=o;var g=0;do{if(ia&&(ra=null),Qc=0,ia=!1,25<=g)throw Error(i(301));if(g+=1,ln=wt=null,o.updateQueue!=null){var y=o.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}L.H=dx,y=l(u,h)}while(ia);return y}function xz(){var o=L.H,l=o.useState()[0];return l=typeof l.then=="function"?Lc(l):l,o=o.useState()[0],(wt!==null?wt.memoizedState:null)!==o&&(Ne.flags|=1024),l}function Dg(){var o=gh!==0;return gh=0,o}function Pg(o,l,u){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~u}function zg(o){if(mh){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}mh=!1}po=0,ln=wt=Ne=null,ia=!1,Qc=gh=0,ra=null}function Xn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?Ne.memoizedState=ln=o:ln=ln.next=o,ln}function tn(){if(wt===null){var o=Ne.alternate;o=o!==null?o.memoizedState:null}else o=wt.next;var l=ln===null?Ne.memoizedState:ln.next;if(l!==null)ln=l,wt=o;else{if(o===null)throw Ne.alternate===null?Error(i(467)):Error(i(310));wt=o,o={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},ln===null?Ne.memoizedState=ln=o:ln=ln.next=o}return ln}function yh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lc(o){var l=Qc;return Qc+=1,ra===null&&(ra=[]),o=SS(ra,o,l),l=Ne,(ln===null?l.memoizedState:ln.next)===null&&(l=l.alternate,L.H=l===null||l.memoizedState===null?hx:Vg),o}function vh(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Lc(o);if(o.$$typeof===z)return Rn(o)}throw Error(i(438,String(o)))}function $g(o){var l=null,u=Ne.updateQueue;if(u!==null&&(l=u.memoCache),l==null){var h=Ne.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(l={data:h.data.map(function(g){return g.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),u===null&&(u=yh(),Ne.updateQueue=u),u.memoCache=l,u=l.data[l.index],u===void 0)for(u=l.data[l.index]=Array(o),h=0;h<o;h++)u[h]=A;return l.index++,u}function mo(o,l){return typeof l=="function"?l(o):l}function bh(o){var l=tn();return Bg(l,wt,o)}function Bg(o,l,u){var h=o.queue;if(h===null)throw Error(i(311));h.lastRenderedReducer=u;var g=o.baseQueue,y=h.pending;if(y!==null){if(g!==null){var w=g.next;g.next=y.next,y.next=w}l.baseQueue=g=y,h.pending=null}if(y=o.baseState,g===null)o.memoizedState=y;else{l=g.next;var P=w=null,I=null,ee=l,re=!1;do{var fe=ee.lane&-536870913;if(fe!==ee.lane?(Je&fe)===fe:(po&fe)===fe){var te=ee.revertLane;if(te===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),fe===Zl&&(re=!0);else if((po&te)===te){ee=ee.next,te===Zl&&(re=!0);continue}else fe={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},I===null?(P=I=fe,w=y):I=I.next=fe,Ne.lanes|=te,os|=te;fe=ee.action,el&&u(y,fe),y=ee.hasEagerState?ee.eagerState:u(y,fe)}else te={lane:fe,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},I===null?(P=I=te,w=y):I=I.next=te,Ne.lanes|=fe,os|=fe;ee=ee.next}while(ee!==null&&ee!==l);if(I===null?w=y:I.next=P,!gi(y,o.memoizedState)&&(an=!0,re&&(u=Jl,u!==null)))throw u;o.memoizedState=y,o.baseState=w,o.baseQueue=I,h.lastRenderedState=y}return g===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function jg(o){var l=tn(),u=l.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var h=u.dispatch,g=u.pending,y=l.memoizedState;if(g!==null){u.pending=null;var w=g=g.next;do y=o(y,w.action),w=w.next;while(w!==g);gi(y,l.memoizedState)||(an=!0),l.memoizedState=y,l.baseQueue===null&&(l.baseState=y),u.lastRenderedState=y}return[y,h]}function PS(o,l,u){var h=Ne,g=tn(),y=tt;if(y){if(u===void 0)throw Error(i(407));u=u()}else u=l();var w=!gi((wt||g).memoizedState,u);if(w&&(g.memoizedState=u,an=!0),g=g.queue,Ng(BS.bind(null,h,g,o),[o]),g.getSnapshot!==l||w||ln!==null&&ln.memoizedState.tag&1){if(h.flags|=2048,oa(9,{destroy:void 0},$S.bind(null,h,g,u,l),null),Rt===null)throw Error(i(349));y||(po&127)!==0||zS(h,l,u)}return u}function zS(o,l,u){o.flags|=16384,o={getSnapshot:l,value:u},l=Ne.updateQueue,l===null?(l=yh(),Ne.updateQueue=l,l.stores=[o]):(u=l.stores,u===null?l.stores=[o]:u.push(o))}function $S(o,l,u,h){l.value=u,l.getSnapshot=h,jS(l)&&QS(o)}function BS(o,l,u){return u(function(){jS(l)&&QS(o)})}function jS(o){var l=o.getSnapshot;o=o.value;try{var u=l();return!gi(o,u)}catch{return!0}}function QS(o){var l=Vs(o,2);l!==null&&li(l,o,2)}function Qg(o){var l=Xn();if(typeof o=="function"){var u=o;if(o=u(),el){Wn(!0);try{u()}finally{Wn(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:o},l}function LS(o,l,u,h){return o.baseState=u,Bg(o,wt,typeof h=="function"?h:mo)}function wz(o,l,u,h,g){if(xh(o))throw Error(i(485));if(o=l.action,o!==null){var y={payload:g,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){y.listeners.push(w)}};L.T!==null?u(!0):y.isTransition=!1,h(y),u=l.pending,u===null?(y.next=l.pending=y,NS(l,y)):(y.next=u.next,l.pending=u.next=y)}}function NS(o,l){var u=l.action,h=l.payload,g=o.state;if(l.isTransition){var y=L.T,w={};L.T=w;try{var P=u(g,h),I=L.S;I!==null&&I(w,P),_S(o,l,P)}catch(ee){Lg(o,l,ee)}finally{y!==null&&w.types!==null&&(y.types=w.types),L.T=y}}else try{y=u(g,h),_S(o,l,y)}catch(ee){Lg(o,l,ee)}}function _S(o,l,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){qS(o,l,h)},function(h){return Lg(o,l,h)}):qS(o,l,u)}function qS(o,l,u){l.status="fulfilled",l.value=u,US(l),o.state=u,l=o.pending,l!==null&&(u=l.next,u===l?o.pending=null:(u=u.next,l.next=u,NS(o,u)))}function Lg(o,l,u){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do l.status="rejected",l.reason=u,US(l),l=l.next;while(l!==h)}o.action=null}function US(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function IS(o,l){return l}function HS(o,l){if(tt){var u=Rt.formState;if(u!==null){e:{var h=Ne;if(tt){if(jt){t:{for(var g=jt,y=qi;g.nodeType!==8;){if(!y){g=null;break t}if(g=Ii(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){jt=Ii(g.nextSibling),h=g.data==="F!";break e}}Yo(h)}h=!1}h&&(l=u[0])}}return u=Xn(),u.memoizedState=u.baseState=l,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:IS,lastRenderedState:l},u.queue=h,u=cx.bind(null,Ne,h),h.dispatch=u,h=Qg(!1),y=Hg.bind(null,Ne,!1,h.queue),h=Xn(),g={state:l,dispatch:null,action:o,pending:null},h.queue=g,u=wz.bind(null,Ne,g,y,u),g.dispatch=u,h.memoizedState=o,[l,u,!1]}function VS(o){var l=tn();return WS(l,wt,o)}function WS(o,l,u){if(l=Bg(o,l,IS)[0],o=bh(mo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var h=Lc(l)}catch(w){throw w===ea?ch:w}else h=l;l=tn();var g=l.queue,y=g.dispatch;return u!==l.memoizedState&&(Ne.flags|=2048,oa(9,{destroy:void 0},Cz.bind(null,g,u),null)),[h,y,o]}function Cz(o,l){o.action=l}function XS(o){var l=tn(),u=wt;if(u!==null)return WS(l,u,o);tn(),l=l.memoizedState,u=tn();var h=u.queue.dispatch;return u.memoizedState=o,[l,h,!1]}function oa(o,l,u,h){return o={tag:o,create:u,deps:h,inst:l,next:null},l=Ne.updateQueue,l===null&&(l=yh(),Ne.updateQueue=l),u=l.lastEffect,u===null?l.lastEffect=o.next=o:(h=u.next,u.next=o,o.next=h,l.lastEffect=o),o}function GS(){return tn().memoizedState}function Oh(o,l,u,h){var g=Xn();Ne.flags|=o,g.memoizedState=oa(1|l,{destroy:void 0},u,h===void 0?null:h)}function Sh(o,l,u,h){var g=tn();h=h===void 0?null:h;var y=g.memoizedState.inst;wt!==null&&h!==null&&Rg(h,wt.memoizedState.deps)?g.memoizedState=oa(l,y,u,h):(Ne.flags|=o,g.memoizedState=oa(1|l,y,u,h))}function FS(o,l){Oh(8390656,8,o,l)}function Ng(o,l){Sh(2048,8,o,l)}function Tz(o){Ne.flags|=4;var l=Ne.updateQueue;if(l===null)l=yh(),Ne.updateQueue=l,l.events=[o];else{var u=l.events;u===null?l.events=[o]:u.push(o)}}function YS(o){var l=tn().memoizedState;return Tz({ref:l,nextImpl:o}),function(){if((pt&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}function KS(o,l){return Sh(4,2,o,l)}function ZS(o,l){return Sh(4,4,o,l)}function JS(o,l){if(typeof l=="function"){o=o();var u=l(o);return function(){typeof u=="function"?u():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function ex(o,l,u){u=u!=null?u.concat([o]):null,Sh(4,4,JS.bind(null,l,o),u)}function _g(){}function tx(o,l){var u=tn();l=l===void 0?null:l;var h=u.memoizedState;return l!==null&&Rg(l,h[1])?h[0]:(u.memoizedState=[o,l],o)}function nx(o,l){var u=tn();l=l===void 0?null:l;var h=u.memoizedState;if(l!==null&&Rg(l,h[1]))return h[0];if(h=o(),el){Wn(!0);try{o()}finally{Wn(!1)}}return u.memoizedState=[h,l],h}function qg(o,l,u){return u===void 0||(po&1073741824)!==0&&(Je&261930)===0?o.memoizedState=l:(o.memoizedState=u,o=iw(),Ne.lanes|=o,os|=o,u)}function ix(o,l,u,h){return gi(u,l)?u:na.current!==null?(o=qg(o,u,h),gi(o,l)||(an=!0),o):(po&42)===0||(po&1073741824)!==0&&(Je&261930)===0?(an=!0,o.memoizedState=u):(o=iw(),Ne.lanes|=o,os|=o,l)}function rx(o,l,u,h,g){var y=X.p;X.p=y!==0&&8>y?y:8;var w=L.T,P={};L.T=P,Hg(o,!1,l,u);try{var I=g(),ee=L.S;if(ee!==null&&ee(P,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var re=Oz(I,h);Nc(o,l,re,xi(o))}else Nc(o,l,h,xi(o))}catch(fe){Nc(o,l,{then:function(){},status:"rejected",reason:fe},xi())}finally{X.p=y,w!==null&&P.types!==null&&(w.types=P.types),L.T=w}}function kz(){}function Ug(o,l,u,h){if(o.tag!==5)throw Error(i(476));var g=ox(o).queue;rx(o,g,l,Y,u===null?kz:function(){return sx(o),u(h)})}function ox(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:Y},next:null};var u={};return l.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:u},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function sx(o){var l=ox(o);l.next===null&&(l=o.alternate.memoizedState),Nc(o,l.next.queue,{},xi())}function Ig(){return Rn(nu)}function lx(){return tn().memoizedState}function ax(){return tn().memoizedState}function Ez(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var u=xi();o=Jo(u);var h=es(l,o,u);h!==null&&(li(h,l,u),$c(h,l,u)),l={cache:vg()},o.payload=l;return}l=l.return}}function Az(o,l,u){var h=xi();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},xh(o)?ux(l,u):(u=lg(o,l,u,h),u!==null&&(li(u,o,h),fx(u,l,h)))}function cx(o,l,u){var h=xi();Nc(o,l,u,h)}function Nc(o,l,u,h){var g={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(xh(o))ux(l,g);else{var y=o.alternate;if(o.lanes===0&&(y===null||y.lanes===0)&&(y=l.lastRenderedReducer,y!==null))try{var w=l.lastRenderedState,P=y(w,u);if(g.hasEagerState=!0,g.eagerState=P,gi(P,w))return nh(o,l,g,0),Rt===null&&th(),!1}catch{}finally{}if(u=lg(o,l,g,h),u!==null)return li(u,o,h),fx(u,l,h),!0}return!1}function Hg(o,l,u,h){if(h={lane:2,revertLane:x0(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},xh(o)){if(l)throw Error(i(479))}else l=lg(o,u,h,2),l!==null&&li(l,o,2)}function xh(o){var l=o.alternate;return o===Ne||l!==null&&l===Ne}function ux(o,l){ia=mh=!0;var u=o.pending;u===null?l.next=l:(l.next=u.next,u.next=l),o.pending=l}function fx(o,l,u){if((u&4194048)!==0){var h=l.lanes;h&=o.pendingLanes,u|=h,l.lanes=u,it(o,u)}}var _c={readContext:Rn,use:vh,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};_c.useEffectEvent=Xt;var hx={readContext:Rn,use:vh,useCallback:function(o,l){return Xn().memoizedState=[o,l===void 0?null:l],o},useContext:Rn,useEffect:FS,useImperativeHandle:function(o,l,u){u=u!=null?u.concat([o]):null,Oh(4194308,4,JS.bind(null,l,o),u)},useLayoutEffect:function(o,l){return Oh(4194308,4,o,l)},useInsertionEffect:function(o,l){Oh(4,2,o,l)},useMemo:function(o,l){var u=Xn();l=l===void 0?null:l;var h=o();if(el){Wn(!0);try{o()}finally{Wn(!1)}}return u.memoizedState=[h,l],h},useReducer:function(o,l,u){var h=Xn();if(u!==void 0){var g=u(l);if(el){Wn(!0);try{u(l)}finally{Wn(!1)}}}else g=l;return h.memoizedState=h.baseState=g,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:g},h.queue=o,o=o.dispatch=Az.bind(null,Ne,o),[h.memoizedState,o]},useRef:function(o){var l=Xn();return o={current:o},l.memoizedState=o},useState:function(o){o=Qg(o);var l=o.queue,u=cx.bind(null,Ne,l);return l.dispatch=u,[o.memoizedState,u]},useDebugValue:_g,useDeferredValue:function(o,l){var u=Xn();return qg(u,o,l)},useTransition:function(){var o=Qg(!1);return o=rx.bind(null,Ne,o.queue,!0,!1),Xn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,u){var h=Ne,g=Xn();if(tt){if(u===void 0)throw Error(i(407));u=u()}else{if(u=l(),Rt===null)throw Error(i(349));(Je&127)!==0||zS(h,l,u)}g.memoizedState=u;var y={value:u,getSnapshot:l};return g.queue=y,FS(BS.bind(null,h,y,o),[o]),h.flags|=2048,oa(9,{destroy:void 0},$S.bind(null,h,y,u,l),null),u},useId:function(){var o=Xn(),l=Rt.identifierPrefix;if(tt){var u=Rr,h=Ar;u=(h&~(1<<32-mn(h)-1)).toString(32)+u,l="_"+l+"R_"+u,u=gh++,0<u&&(l+="H"+u.toString(32)),l+="_"}else u=Sz++,l="_"+l+"r_"+u.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:Ig,useFormState:HS,useActionState:HS,useOptimistic:function(o){var l=Xn();l.memoizedState=l.baseState=o;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=u,l=Hg.bind(null,Ne,!0,u),u.dispatch=l,[o,l]},useMemoCache:$g,useCacheRefresh:function(){return Xn().memoizedState=Ez.bind(null,Ne)},useEffectEvent:function(o){var l=Xn(),u={impl:o};return l.memoizedState=u,function(){if((pt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},Vg={readContext:Rn,use:vh,useCallback:tx,useContext:Rn,useEffect:Ng,useImperativeHandle:ex,useInsertionEffect:KS,useLayoutEffect:ZS,useMemo:nx,useReducer:bh,useRef:GS,useState:function(){return bh(mo)},useDebugValue:_g,useDeferredValue:function(o,l){var u=tn();return ix(u,wt.memoizedState,o,l)},useTransition:function(){var o=bh(mo)[0],l=tn().memoizedState;return[typeof o=="boolean"?o:Lc(o),l]},useSyncExternalStore:PS,useId:lx,useHostTransitionStatus:Ig,useFormState:VS,useActionState:VS,useOptimistic:function(o,l){var u=tn();return LS(u,wt,o,l)},useMemoCache:$g,useCacheRefresh:ax};Vg.useEffectEvent=YS;var dx={readContext:Rn,use:vh,useCallback:tx,useContext:Rn,useEffect:Ng,useImperativeHandle:ex,useInsertionEffect:KS,useLayoutEffect:ZS,useMemo:nx,useReducer:jg,useRef:GS,useState:function(){return jg(mo)},useDebugValue:_g,useDeferredValue:function(o,l){var u=tn();return wt===null?qg(u,o,l):ix(u,wt.memoizedState,o,l)},useTransition:function(){var o=jg(mo)[0],l=tn().memoizedState;return[typeof o=="boolean"?o:Lc(o),l]},useSyncExternalStore:PS,useId:lx,useHostTransitionStatus:Ig,useFormState:XS,useActionState:XS,useOptimistic:function(o,l){var u=tn();return wt!==null?LS(u,wt,o,l):(u.baseState=o,[o,u.queue.dispatch])},useMemoCache:$g,useCacheRefresh:ax};dx.useEffectEvent=YS;function Wg(o,l,u,h){l=o.memoizedState,u=u(h,l),u=u==null?l:m({},l,u),o.memoizedState=u,o.lanes===0&&(o.updateQueue.baseState=u)}var Xg={enqueueSetState:function(o,l,u){o=o._reactInternals;var h=xi(),g=Jo(h);g.payload=l,u!=null&&(g.callback=u),l=es(o,g,h),l!==null&&(li(l,o,h),$c(l,o,h))},enqueueReplaceState:function(o,l,u){o=o._reactInternals;var h=xi(),g=Jo(h);g.tag=1,g.payload=l,u!=null&&(g.callback=u),l=es(o,g,h),l!==null&&(li(l,o,h),$c(l,o,h))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var u=xi(),h=Jo(u);h.tag=2,l!=null&&(h.callback=l),l=es(o,h,u),l!==null&&(li(l,o,u),$c(l,o,u))}};function px(o,l,u,h,g,y,w){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,y,w):l.prototype&&l.prototype.isPureReactComponent?!kc(u,h)||!kc(g,y):!0}function mx(o,l,u,h){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(u,h),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(u,h),l.state!==o&&Xg.enqueueReplaceState(l,l.state,null)}function tl(o,l){var u=l;if("ref"in l){u={};for(var h in l)h!=="ref"&&(u[h]=l[h])}if(o=o.defaultProps){u===l&&(u=m({},u));for(var g in o)u[g]===void 0&&(u[g]=o[g])}return u}function gx(o){eh(o)}function yx(o){console.error(o)}function vx(o){eh(o)}function wh(o,l){try{var u=o.onUncaughtError;u(l.value,{componentStack:l.stack})}catch(h){setTimeout(function(){throw h})}}function bx(o,l,u){try{var h=o.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Gg(o,l,u){return u=Jo(u),u.tag=3,u.payload={element:null},u.callback=function(){wh(o,l)},u}function Ox(o){return o=Jo(o),o.tag=3,o}function Sx(o,l,u,h){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var y=h.value;o.payload=function(){return g(y)},o.callback=function(){bx(l,u,h)}}var w=u.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(o.callback=function(){bx(l,u,h),typeof g!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var P=h.stack;this.componentDidCatch(h.value,{componentStack:P!==null?P:""})})}function Rz(o,l,u,h,g){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(l=u.alternate,l!==null&&Kl(l,u,g,!0),u=vi.current,u!==null){switch(u.tag){case 31:case 13:return Ui===null?Bh():u.alternate===null&&Gt===0&&(Gt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,h===uh?u.flags|=16384:(l=u.updateQueue,l===null?u.updateQueue=new Set([h]):l.add(h),b0(o,h,g)),!1;case 22:return u.flags|=65536,h===uh?u.flags|=16384:(l=u.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=l):(u=l.retryQueue,u===null?l.retryQueue=new Set([h]):u.add(h)),b0(o,h,g)),!1}throw Error(i(435,u.tag))}return b0(o,h,g),Bh(),!1}if(tt)return l=vi.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=g,h!==dg&&(o=Error(i(422),{cause:h}),Rc(Li(o,u)))):(h!==dg&&(l=Error(i(423),{cause:h}),Rc(Li(l,u))),o=o.current.alternate,o.flags|=65536,g&=-g,o.lanes|=g,h=Li(h,u),g=Gg(o.stateNode,h,g),Cg(o,g),Gt!==4&&(Gt=2)),!1;var y=Error(i(520),{cause:h});if(y=Li(y,u),Gc===null?Gc=[y]:Gc.push(y),Gt!==4&&(Gt=2),l===null)return!0;h=Li(h,u),u=l;do{switch(u.tag){case 3:return u.flags|=65536,o=g&-g,u.lanes|=o,o=Gg(u.stateNode,h,o),Cg(u,o),!1;case 1:if(l=u.type,y=u.stateNode,(u.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ss===null||!ss.has(y))))return u.flags|=65536,g&=-g,u.lanes|=g,g=Ox(g),Sx(g,o,u,h),Cg(u,g),!1}u=u.return}while(u!==null);return!1}var Fg=Error(i(461)),an=!1;function Mn(o,l,u,h){l.child=o===null?TS(l,null,u,h):Js(l,o.child,u,h)}function xx(o,l,u,h,g){u=u.render;var y=l.ref;if("ref"in h){var w={};for(var P in h)P!=="ref"&&(w[P]=h[P])}else w=h;return Fs(l),h=Mg(o,l,u,w,y,g),P=Dg(),o!==null&&!an?(Pg(o,l,g),go(o,l,g)):(tt&&P&&fg(l),l.flags|=1,Mn(o,l,h,g),l.child)}function wx(o,l,u,h,g){if(o===null){var y=u.type;return typeof y=="function"&&!ag(y)&&y.defaultProps===void 0&&u.compare===null?(l.tag=15,l.type=y,Cx(o,l,y,h,g)):(o=rh(u.type,null,h,l,l.mode,g),o.ref=l.ref,o.return=l,l.child=o)}if(y=o.child,!i0(o,g)){var w=y.memoizedProps;if(u=u.compare,u=u!==null?u:kc,u(w,h)&&o.ref===l.ref)return go(o,l,g)}return l.flags|=1,o=co(y,h),o.ref=l.ref,o.return=l,l.child=o}function Cx(o,l,u,h,g){if(o!==null){var y=o.memoizedProps;if(kc(y,h)&&o.ref===l.ref)if(an=!1,l.pendingProps=h=y,i0(o,g))(o.flags&131072)!==0&&(an=!0);else return l.lanes=o.lanes,go(o,l,g)}return Yg(o,l,u,h,g)}function Tx(o,l,u,h){var g=h.children,y=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((l.flags&128)!==0){if(y=y!==null?y.baseLanes|u:u,o!==null){for(h=l.child=o.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;h=g&~y}else h=0,l.child=null;return kx(o,l,y,u,h)}if((u&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&ah(l,y!==null?y.cachePool:null),y!==null?AS(l,y):kg(),RS(l);else return h=l.lanes=536870912,kx(o,l,y!==null?y.baseLanes|u:u,u,h)}else y!==null?(ah(l,y.cachePool),AS(l,y),ns(),l.memoizedState=null):(o!==null&&ah(l,null),kg(),ns());return Mn(o,l,g,u),l.child}function qc(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function kx(o,l,u,h,g){var y=Og();return y=y===null?null:{parent:sn._currentValue,pool:y},l.memoizedState={baseLanes:u,cachePool:y},o!==null&&ah(l,null),kg(),RS(l),o!==null&&Kl(o,l,h,!0),l.childLanes=g,null}function Ch(o,l){return l=kh({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function Ex(o,l,u){return Js(l,o.child,null,u),o=Ch(l,l.pendingProps),o.flags|=2,bi(l),l.memoizedState=null,o}function Mz(o,l,u){var h=l.pendingProps,g=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(tt){if(h.mode==="hidden")return o=Ch(l,h),l.lanes=536870912,qc(null,o);if(Ag(l),(o=jt)?(o=Nw(o,qi),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Go!==null?{id:Ar,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},u=uS(o),u.return=l,l.child=u,An=l,jt=null)):o=null,o===null)throw Yo(l);return l.lanes=536870912,null}return Ch(l,h)}var y=o.memoizedState;if(y!==null){var w=y.dehydrated;if(Ag(l),g)if(l.flags&256)l.flags&=-257,l=Ex(o,l,u);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(i(558));else if(an||Kl(o,l,u,!1),g=(u&o.childLanes)!==0,an||g){if(h=Rt,h!==null&&(w=Ht(h,u),w!==0&&w!==y.retryLane))throw y.retryLane=w,Vs(o,w),li(h,o,w),Fg;Bh(),l=Ex(o,l,u)}else o=y.treeContext,jt=Ii(w.nextSibling),An=l,tt=!0,Fo=null,qi=!1,o!==null&&dS(l,o),l=Ch(l,h),l.flags|=4096;return l}return o=co(o.child,{mode:h.mode,children:h.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Th(o,l){var u=l.ref;if(u===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(o===null||o.ref!==u)&&(l.flags|=4194816)}}function Yg(o,l,u,h,g){return Fs(l),u=Mg(o,l,u,h,void 0,g),h=Dg(),o!==null&&!an?(Pg(o,l,g),go(o,l,g)):(tt&&h&&fg(l),l.flags|=1,Mn(o,l,u,g),l.child)}function Ax(o,l,u,h,g,y){return Fs(l),l.updateQueue=null,u=DS(l,h,u,g),MS(o),h=Dg(),o!==null&&!an?(Pg(o,l,y),go(o,l,y)):(tt&&h&&fg(l),l.flags|=1,Mn(o,l,u,y),l.child)}function Rx(o,l,u,h,g){if(Fs(l),l.stateNode===null){var y=Xl,w=u.contextType;typeof w=="object"&&w!==null&&(y=Rn(w)),y=new u(h,y),l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Xg,l.stateNode=y,y._reactInternals=l,y=l.stateNode,y.props=h,y.state=l.memoizedState,y.refs={},xg(l),w=u.contextType,y.context=typeof w=="object"&&w!==null?Rn(w):Xl,y.state=l.memoizedState,w=u.getDerivedStateFromProps,typeof w=="function"&&(Wg(l,u,w,h),y.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(w=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),w!==y.state&&Xg.enqueueReplaceState(y,y.state,null),jc(l,h,y,g),Bc(),y.state=l.memoizedState),typeof y.componentDidMount=="function"&&(l.flags|=4194308),h=!0}else if(o===null){y=l.stateNode;var P=l.memoizedProps,I=tl(u,P);y.props=I;var ee=y.context,re=u.contextType;w=Xl,typeof re=="object"&&re!==null&&(w=Rn(re));var fe=u.getDerivedStateFromProps;re=typeof fe=="function"||typeof y.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,re||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(P||ee!==w)&&mx(l,y,h,w),Zo=!1;var te=l.memoizedState;y.state=te,jc(l,h,y,g),Bc(),ee=l.memoizedState,P||te!==ee||Zo?(typeof fe=="function"&&(Wg(l,u,fe,h),ee=l.memoizedState),(I=Zo||px(l,u,I,h,te,ee,w))?(re||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(l.flags|=4194308)):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=h,l.memoizedState=ee),y.props=h,y.state=ee,y.context=w,h=I):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),h=!1)}else{y=l.stateNode,wg(o,l),w=l.memoizedProps,re=tl(u,w),y.props=re,fe=l.pendingProps,te=y.context,ee=u.contextType,I=Xl,typeof ee=="object"&&ee!==null&&(I=Rn(ee)),P=u.getDerivedStateFromProps,(ee=typeof P=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(w!==fe||te!==I)&&mx(l,y,h,I),Zo=!1,te=l.memoizedState,y.state=te,jc(l,h,y,g),Bc();var ie=l.memoizedState;w!==fe||te!==ie||Zo||o!==null&&o.dependencies!==null&&sh(o.dependencies)?(typeof P=="function"&&(Wg(l,u,P,h),ie=l.memoizedState),(re=Zo||px(l,u,re,h,te,ie,I)||o!==null&&o.dependencies!==null&&sh(o.dependencies))?(ee||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(h,ie,I),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(h,ie,I)),typeof y.componentDidUpdate=="function"&&(l.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof y.componentDidUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=1024),l.memoizedProps=h,l.memoizedState=ie),y.props=h,y.state=ie,y.context=I,h=re):(typeof y.componentDidUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=1024),h=!1)}return y=h,Th(o,l),h=(l.flags&128)!==0,y||h?(y=l.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:y.render(),l.flags|=1,o!==null&&h?(l.child=Js(l,o.child,null,g),l.child=Js(l,null,u,g)):Mn(o,l,u,g),l.memoizedState=y.state,o=l.child):o=go(o,l,g),o}function Mx(o,l,u,h){return Xs(),l.flags|=256,Mn(o,l,u,h),l.child}var Kg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zg(o){return{baseLanes:o,cachePool:bS()}}function Jg(o,l,u){return o=o!==null?o.childLanes&~u:0,l&&(o|=Si),o}function Dx(o,l,u){var h=l.pendingProps,g=!1,y=(l.flags&128)!==0,w;if((w=y)||(w=o!==null&&o.memoizedState===null?!1:(en.current&2)!==0),w&&(g=!0,l.flags&=-129),w=(l.flags&32)!==0,l.flags&=-33,o===null){if(tt){if(g?ts(l):ns(),(o=jt)?(o=Nw(o,qi),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Go!==null?{id:Ar,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},u=uS(o),u.return=l,l.child=u,An=l,jt=null)):o=null,o===null)throw Yo(l);return B0(o)?l.lanes=32:l.lanes=536870912,null}var P=h.children;return h=h.fallback,g?(ns(),g=l.mode,P=kh({mode:"hidden",children:P},g),h=Ws(h,g,u,null),P.return=l,h.return=l,P.sibling=h,l.child=P,h=l.child,h.memoizedState=Zg(u),h.childLanes=Jg(o,w,u),l.memoizedState=Kg,qc(null,h)):(ts(l),e0(l,P))}var I=o.memoizedState;if(I!==null&&(P=I.dehydrated,P!==null)){if(y)l.flags&256?(ts(l),l.flags&=-257,l=t0(o,l,u)):l.memoizedState!==null?(ns(),l.child=o.child,l.flags|=128,l=null):(ns(),P=h.fallback,g=l.mode,h=kh({mode:"visible",children:h.children},g),P=Ws(P,g,u,null),P.flags|=2,h.return=l,P.return=l,h.sibling=P,l.child=h,Js(l,o.child,null,u),h=l.child,h.memoizedState=Zg(u),h.childLanes=Jg(o,w,u),l.memoizedState=Kg,l=qc(null,h));else if(ts(l),B0(P)){if(w=P.nextSibling&&P.nextSibling.dataset,w)var ee=w.dgst;w=ee,h=Error(i(419)),h.stack="",h.digest=w,Rc({value:h,source:null,stack:null}),l=t0(o,l,u)}else if(an||Kl(o,l,u,!1),w=(u&o.childLanes)!==0,an||w){if(w=Rt,w!==null&&(h=Ht(w,u),h!==0&&h!==I.retryLane))throw I.retryLane=h,Vs(o,h),li(w,o,h),Fg;$0(P)||Bh(),l=t0(o,l,u)}else $0(P)?(l.flags|=192,l.child=o.child,l=null):(o=I.treeContext,jt=Ii(P.nextSibling),An=l,tt=!0,Fo=null,qi=!1,o!==null&&dS(l,o),l=e0(l,h.children),l.flags|=4096);return l}return g?(ns(),P=h.fallback,g=l.mode,I=o.child,ee=I.sibling,h=co(I,{mode:"hidden",children:h.children}),h.subtreeFlags=I.subtreeFlags&65011712,ee!==null?P=co(ee,P):(P=Ws(P,g,u,null),P.flags|=2),P.return=l,h.return=l,h.sibling=P,l.child=h,qc(null,h),h=l.child,P=o.child.memoizedState,P===null?P=Zg(u):(g=P.cachePool,g!==null?(I=sn._currentValue,g=g.parent!==I?{parent:I,pool:I}:g):g=bS(),P={baseLanes:P.baseLanes|u,cachePool:g}),h.memoizedState=P,h.childLanes=Jg(o,w,u),l.memoizedState=Kg,qc(o.child,h)):(ts(l),u=o.child,o=u.sibling,u=co(u,{mode:"visible",children:h.children}),u.return=l,u.sibling=null,o!==null&&(w=l.deletions,w===null?(l.deletions=[o],l.flags|=16):w.push(o)),l.child=u,l.memoizedState=null,u)}function e0(o,l){return l=kh({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function kh(o,l){return o=yi(22,o,null,l),o.lanes=0,o}function t0(o,l,u){return Js(l,o.child,null,u),o=e0(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Px(o,l,u){o.lanes|=l;var h=o.alternate;h!==null&&(h.lanes|=l),gg(o.return,l,u)}function n0(o,l,u,h,g,y){var w=o.memoizedState;w===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:g,treeForkCount:y}:(w.isBackwards=l,w.rendering=null,w.renderingStartTime=0,w.last=h,w.tail=u,w.tailMode=g,w.treeForkCount=y)}function zx(o,l,u){var h=l.pendingProps,g=h.revealOrder,y=h.tail;h=h.children;var w=en.current,P=(w&2)!==0;if(P?(w=w&1|2,l.flags|=128):w&=1,se(en,w),Mn(o,l,h,u),h=tt?Ac:0,!P&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Px(o,u,l);else if(o.tag===19)Px(o,u,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(g){case"forwards":for(u=l.child,g=null;u!==null;)o=u.alternate,o!==null&&ph(o)===null&&(g=u),u=u.sibling;u=g,u===null?(g=l.child,l.child=null):(g=u.sibling,u.sibling=null),n0(l,!1,g,u,y,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=l.child,l.child=null;g!==null;){if(o=g.alternate,o!==null&&ph(o)===null){l.child=g;break}o=g.sibling,g.sibling=u,u=g,g=o}n0(l,!0,u,null,y,h);break;case"together":n0(l,!1,null,null,void 0,h);break;default:l.memoizedState=null}return l.child}function go(o,l,u){if(o!==null&&(l.dependencies=o.dependencies),os|=l.lanes,(u&l.childLanes)===0)if(o!==null){if(Kl(o,l,u,!1),(u&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(i(153));if(l.child!==null){for(o=l.child,u=co(o,o.pendingProps),l.child=u,u.return=l;o.sibling!==null;)o=o.sibling,u=u.sibling=co(o,o.pendingProps),u.return=l;u.sibling=null}return l.child}function i0(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&sh(o)))}function Dz(o,l,u){switch(l.tag){case 3:Se(l,l.stateNode.containerInfo),Ko(l,sn,o.memoizedState.cache),Xs();break;case 27:case 5:xe(l);break;case 4:Se(l,l.stateNode.containerInfo);break;case 10:Ko(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Ag(l),null;break;case 13:var h=l.memoizedState;if(h!==null)return h.dehydrated!==null?(ts(l),l.flags|=128,null):(u&l.child.childLanes)!==0?Dx(o,l,u):(ts(l),o=go(o,l,u),o!==null?o.sibling:null);ts(l);break;case 19:var g=(o.flags&128)!==0;if(h=(u&l.childLanes)!==0,h||(Kl(o,l,u,!1),h=(u&l.childLanes)!==0),g){if(h)return zx(o,l,u);l.flags|=128}if(g=l.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),se(en,en.current),h)break;return null;case 22:return l.lanes=0,Tx(o,l,u,l.pendingProps);case 24:Ko(l,sn,o.memoizedState.cache)}return go(o,l,u)}function $x(o,l,u){if(o!==null)if(o.memoizedProps!==l.pendingProps)an=!0;else{if(!i0(o,u)&&(l.flags&128)===0)return an=!1,Dz(o,l,u);an=(o.flags&131072)!==0}else an=!1,tt&&(l.flags&1048576)!==0&&hS(l,Ac,l.index);switch(l.lanes=0,l.tag){case 16:e:{var h=l.pendingProps;if(o=Ks(l.elementType),l.type=o,typeof o=="function")ag(o)?(h=tl(o,h),l.tag=1,l=Rx(null,l,o,h,u)):(l.tag=0,l=Yg(null,l,o,h,u));else{if(o!=null){var g=o.$$typeof;if(g===D){l.tag=11,l=xx(null,l,o,h,u);break e}else if(g===M){l.tag=14,l=wx(null,l,o,h,u);break e}}throw l=q(o)||o,Error(i(306,l,""))}}return l;case 0:return Yg(o,l,l.type,l.pendingProps,u);case 1:return h=l.type,g=tl(h,l.pendingProps),Rx(o,l,h,g,u);case 3:e:{if(Se(l,l.stateNode.containerInfo),o===null)throw Error(i(387));h=l.pendingProps;var y=l.memoizedState;g=y.element,wg(o,l),jc(l,h,null,u);var w=l.memoizedState;if(h=w.cache,Ko(l,sn,h),h!==y.cache&&yg(l,[sn],u,!0),Bc(),h=w.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:w.cache},l.updateQueue.baseState=y,l.memoizedState=y,l.flags&256){l=Mx(o,l,h,u);break e}else if(h!==g){g=Li(Error(i(424)),l),Rc(g),l=Mx(o,l,h,u);break e}else{switch(o=l.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(jt=Ii(o.firstChild),An=l,tt=!0,Fo=null,qi=!0,u=TS(l,null,h,u),l.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Xs(),h===g){l=go(o,l,u);break e}Mn(o,l,h,u)}l=l.child}return l;case 26:return Th(o,l),o===null?(u=Vw(l.type,null,l.pendingProps,null))?l.memoizedState=u:tt||(u=l.type,o=l.pendingProps,h=Uh(ne.current).createElement(u),h[En]=l,h[ti]=o,Dn(h,u,o),xn(h),l.stateNode=h):l.memoizedState=Vw(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return xe(l),o===null&&tt&&(h=l.stateNode=Uw(l.type,l.pendingProps,ne.current),An=l,qi=!0,g=jt,us(l.type)?(j0=g,jt=Ii(h.firstChild)):jt=g),Mn(o,l,l.pendingProps.children,u),Th(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&tt&&((g=h=jt)&&(h=l$(h,l.type,l.pendingProps,qi),h!==null?(l.stateNode=h,An=l,jt=Ii(h.firstChild),qi=!1,g=!0):g=!1),g||Yo(l)),xe(l),g=l.type,y=l.pendingProps,w=o!==null?o.memoizedProps:null,h=y.children,D0(g,y)?h=null:w!==null&&D0(g,w)&&(l.flags|=32),l.memoizedState!==null&&(g=Mg(o,l,xz,null,null,u),nu._currentValue=g),Th(o,l),Mn(o,l,h,u),l.child;case 6:return o===null&&tt&&((o=u=jt)&&(u=a$(u,l.pendingProps,qi),u!==null?(l.stateNode=u,An=l,jt=null,o=!0):o=!1),o||Yo(l)),null;case 13:return Dx(o,l,u);case 4:return Se(l,l.stateNode.containerInfo),h=l.pendingProps,o===null?l.child=Js(l,null,h,u):Mn(o,l,h,u),l.child;case 11:return xx(o,l,l.type,l.pendingProps,u);case 7:return Mn(o,l,l.pendingProps,u),l.child;case 8:return Mn(o,l,l.pendingProps.children,u),l.child;case 12:return Mn(o,l,l.pendingProps.children,u),l.child;case 10:return h=l.pendingProps,Ko(l,l.type,h.value),Mn(o,l,h.children,u),l.child;case 9:return g=l.type._context,h=l.pendingProps.children,Fs(l),g=Rn(g),h=h(g),l.flags|=1,Mn(o,l,h,u),l.child;case 14:return wx(o,l,l.type,l.pendingProps,u);case 15:return Cx(o,l,l.type,l.pendingProps,u);case 19:return zx(o,l,u);case 31:return Mz(o,l,u);case 22:return Tx(o,l,u,l.pendingProps);case 24:return Fs(l),h=Rn(sn),o===null?(g=Og(),g===null&&(g=Rt,y=vg(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=u),g=y),l.memoizedState={parent:h,cache:g},xg(l),Ko(l,sn,g)):((o.lanes&u)!==0&&(wg(o,l),jc(l,null,null,u),Bc()),g=o.memoizedState,y=l.memoizedState,g.parent!==h?(g={parent:h,cache:h},l.memoizedState=g,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=g),Ko(l,sn,h)):(h=y.cache,Ko(l,sn,h),h!==g.cache&&yg(l,[sn],u,!0))),Mn(o,l,l.pendingProps.children,u),l.child;case 29:throw l.pendingProps}throw Error(i(156,l.tag))}function yo(o){o.flags|=4}function r0(o,l,u,h,g){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(g&335544128)===g)if(o.stateNode.complete)o.flags|=8192;else if(lw())o.flags|=8192;else throw Zs=uh,Sg}else o.flags&=-16777217}function Bx(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!Yw(l))if(lw())o.flags|=8192;else throw Zs=uh,Sg}function Eh(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?$e():536870912,o.lanes|=l,ca|=l)}function Uc(o,l){if(!tt)switch(o.tailMode){case"hidden":l=o.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?o.tail=null:u.sibling=null;break;case"collapsed":u=o.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function Qt(o){var l=o.alternate!==null&&o.alternate.child===o.child,u=0,h=0;if(l)for(var g=o.child;g!==null;)u|=g.lanes|g.childLanes,h|=g.subtreeFlags&65011712,h|=g.flags&65011712,g.return=o,g=g.sibling;else for(g=o.child;g!==null;)u|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=o,g=g.sibling;return o.subtreeFlags|=h,o.childLanes=u,l}function Pz(o,l,u){var h=l.pendingProps;switch(hg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(l),null;case 1:return Qt(l),null;case 3:return u=l.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),ho(sn),ke(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(o===null||o.child===null)&&(Yl(l)?yo(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,pg())),Qt(l),null;case 26:var g=l.type,y=l.memoizedState;return o===null?(yo(l),y!==null?(Qt(l),Bx(l,y)):(Qt(l),r0(l,g,null,h,u))):y?y!==o.memoizedState?(yo(l),Qt(l),Bx(l,y)):(Qt(l),l.flags&=-16777217):(o=o.memoizedProps,o!==h&&yo(l),Qt(l),r0(l,g,o,h,u)),null;case 27:if(Re(l),u=ne.current,g=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==h&&yo(l);else{if(!h){if(l.stateNode===null)throw Error(i(166));return Qt(l),null}o=W.current,Yl(l)?pS(l):(o=Uw(g,h,u),l.stateNode=o,yo(l))}return Qt(l),null;case 5:if(Re(l),g=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==h&&yo(l);else{if(!h){if(l.stateNode===null)throw Error(i(166));return Qt(l),null}if(y=W.current,Yl(l))pS(l);else{var w=Uh(ne.current);switch(y){case 1:y=w.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:y=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":y=w.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":y=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":y=w.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof h.is=="string"?w.createElement("select",{is:h.is}):w.createElement("select"),h.multiple?y.multiple=!0:h.size&&(y.size=h.size);break;default:y=typeof h.is=="string"?w.createElement(g,{is:h.is}):w.createElement(g)}}y[En]=l,y[ti]=h;e:for(w=l.child;w!==null;){if(w.tag===5||w.tag===6)y.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===l)break e;for(;w.sibling===null;){if(w.return===null||w.return===l)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}l.stateNode=y;e:switch(Dn(y,g,h),g){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&yo(l)}}return Qt(l),r0(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,u),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==h&&yo(l);else{if(typeof h!="string"&&l.stateNode===null)throw Error(i(166));if(o=ne.current,Yl(l)){if(o=l.stateNode,u=l.memoizedProps,h=null,g=An,g!==null)switch(g.tag){case 27:case 5:h=g.memoizedProps}o[En]=l,o=!!(o.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||Dw(o.nodeValue,u)),o||Yo(l,!0)}else o=Uh(o).createTextNode(h),o[En]=l,l.stateNode=o}return Qt(l),null;case 31:if(u=l.memoizedState,o===null||o.memoizedState!==null){if(h=Yl(l),u!==null){if(o===null){if(!h)throw Error(i(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(557));o[En]=l}else Xs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),o=!1}else u=pg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=u),o=!0;if(!o)return l.flags&256?(bi(l),l):(bi(l),null);if((l.flags&128)!==0)throw Error(i(558))}return Qt(l),null;case 13:if(h=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(g=Yl(l),h!==null&&h.dehydrated!==null){if(o===null){if(!g)throw Error(i(318));if(g=l.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(i(317));g[En]=l}else Xs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),g=!1}else g=pg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=g),g=!0;if(!g)return l.flags&256?(bi(l),l):(bi(l),null)}return bi(l),(l.flags&128)!==0?(l.lanes=u,l):(u=h!==null,o=o!==null&&o.memoizedState!==null,u&&(h=l.child,g=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(g=h.alternate.memoizedState.cachePool.pool),y=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(y=h.memoizedState.cachePool.pool),y!==g&&(h.flags|=2048)),u!==o&&u&&(l.child.flags|=8192),Eh(l,l.updateQueue),Qt(l),null);case 4:return ke(),o===null&&k0(l.stateNode.containerInfo),Qt(l),null;case 10:return ho(l.type),Qt(l),null;case 19:if(G(en),h=l.memoizedState,h===null)return Qt(l),null;if(g=(l.flags&128)!==0,y=h.rendering,y===null)if(g)Uc(h,!1);else{if(Gt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(y=ph(o),y!==null){for(l.flags|=128,Uc(h,!1),o=y.updateQueue,l.updateQueue=o,Eh(l,o),l.subtreeFlags=0,o=u,u=l.child;u!==null;)cS(u,o),u=u.sibling;return se(en,en.current&1|2),tt&&uo(l,h.treeForkCount),l.child}o=o.sibling}h.tail!==null&&$t()>Ph&&(l.flags|=128,g=!0,Uc(h,!1),l.lanes=4194304)}else{if(!g)if(o=ph(y),o!==null){if(l.flags|=128,g=!0,o=o.updateQueue,l.updateQueue=o,Eh(l,o),Uc(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!tt)return Qt(l),null}else 2*$t()-h.renderingStartTime>Ph&&u!==536870912&&(l.flags|=128,g=!0,Uc(h,!1),l.lanes=4194304);h.isBackwards?(y.sibling=l.child,l.child=y):(o=h.last,o!==null?o.sibling=y:l.child=y,h.last=y)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=$t(),o.sibling=null,u=en.current,se(en,g?u&1|2:u&1),tt&&uo(l,h.treeForkCount),o):(Qt(l),null);case 22:case 23:return bi(l),Eg(),h=l.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(l.flags|=8192):h&&(l.flags|=8192),h?(u&536870912)!==0&&(l.flags&128)===0&&(Qt(l),l.subtreeFlags&6&&(l.flags|=8192)):Qt(l),u=l.updateQueue,u!==null&&Eh(l,u.retryQueue),u=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==u&&(l.flags|=2048),o!==null&&G(Ys),null;case 24:return u=null,o!==null&&(u=o.memoizedState.cache),l.memoizedState.cache!==u&&(l.flags|=2048),ho(sn),Qt(l),null;case 25:return null;case 30:return null}throw Error(i(156,l.tag))}function zz(o,l){switch(hg(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return ho(sn),ke(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return Re(l),null;case 31:if(l.memoizedState!==null){if(bi(l),l.alternate===null)throw Error(i(340));Xs()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(bi(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(i(340));Xs()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return G(en),null;case 4:return ke(),null;case 10:return ho(l.type),null;case 22:case 23:return bi(l),Eg(),o!==null&&G(Ys),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return ho(sn),null;case 25:return null;default:return null}}function jx(o,l){switch(hg(l),l.tag){case 3:ho(sn),ke();break;case 26:case 27:case 5:Re(l);break;case 4:ke();break;case 31:l.memoizedState!==null&&bi(l);break;case 13:bi(l);break;case 19:G(en);break;case 10:ho(l.type);break;case 22:case 23:bi(l),Eg(),o!==null&&G(Ys);break;case 24:ho(sn)}}function Ic(o,l){try{var u=l.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var g=h.next;u=g;do{if((u.tag&o)===o){h=void 0;var y=u.create,w=u.inst;h=y(),w.destroy=h}u=u.next}while(u!==g)}}catch(P){Ot(l,l.return,P)}}function is(o,l,u){try{var h=l.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var y=g.next;h=y;do{if((h.tag&o)===o){var w=h.inst,P=w.destroy;if(P!==void 0){w.destroy=void 0,g=l;var I=u,ee=P;try{ee()}catch(re){Ot(g,I,re)}}}h=h.next}while(h!==y)}}catch(re){Ot(l,l.return,re)}}function Qx(o){var l=o.updateQueue;if(l!==null){var u=o.stateNode;try{ES(l,u)}catch(h){Ot(o,o.return,h)}}}function Lx(o,l,u){u.props=tl(o.type,o.memoizedProps),u.state=o.memoizedState;try{u.componentWillUnmount()}catch(h){Ot(o,l,h)}}function Hc(o,l){try{var u=o.ref;if(u!==null){switch(o.tag){case 26:case 27:case 5:var h=o.stateNode;break;case 30:h=o.stateNode;break;default:h=o.stateNode}typeof u=="function"?o.refCleanup=u(h):u.current=h}}catch(g){Ot(o,l,g)}}function Mr(o,l){var u=o.ref,h=o.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(g){Ot(o,l,g)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){Ot(o,l,g)}else u.current=null}function Nx(o){var l=o.type,u=o.memoizedProps,h=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(g){Ot(o,o.return,g)}}function o0(o,l,u){try{var h=o.stateNode;t$(h,o.type,u,l),h[ti]=l}catch(g){Ot(o,o.return,g)}}function _x(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&us(o.type)||o.tag===4}function s0(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||_x(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&us(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function l0(o,l,u){var h=o.tag;if(h===5||h===6)o=o.stateNode,l?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(o,l):(l=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,l.appendChild(o),u=u._reactRootContainer,u!=null||l.onclick!==null||(l.onclick=lo));else if(h!==4&&(h===27&&us(o.type)&&(u=o.stateNode,l=null),o=o.child,o!==null))for(l0(o,l,u),o=o.sibling;o!==null;)l0(o,l,u),o=o.sibling}function Ah(o,l,u){var h=o.tag;if(h===5||h===6)o=o.stateNode,l?u.insertBefore(o,l):u.appendChild(o);else if(h!==4&&(h===27&&us(o.type)&&(u=o.stateNode),o=o.child,o!==null))for(Ah(o,l,u),o=o.sibling;o!==null;)Ah(o,l,u),o=o.sibling}function qx(o){var l=o.stateNode,u=o.memoizedProps;try{for(var h=o.type,g=l.attributes;g.length;)l.removeAttributeNode(g[0]);Dn(l,h,u),l[En]=o,l[ti]=u}catch(y){Ot(o,o.return,y)}}var vo=!1,cn=!1,a0=!1,Ux=typeof WeakSet=="function"?WeakSet:Set,wn=null;function $z(o,l){if(o=o.containerInfo,R0=Fh,o=eS(o),tg(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var g=h.anchorOffset,y=h.focusNode;h=h.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var w=0,P=-1,I=-1,ee=0,re=0,fe=o,te=null;t:for(;;){for(var ie;fe!==u||g!==0&&fe.nodeType!==3||(P=w+g),fe!==y||h!==0&&fe.nodeType!==3||(I=w+h),fe.nodeType===3&&(w+=fe.nodeValue.length),(ie=fe.firstChild)!==null;)te=fe,fe=ie;for(;;){if(fe===o)break t;if(te===u&&++ee===g&&(P=w),te===y&&++re===h&&(I=w),(ie=fe.nextSibling)!==null)break;fe=te,te=fe.parentNode}fe=ie}u=P===-1||I===-1?null:{start:P,end:I}}else u=null}u=u||{start:0,end:0}}else u=null;for(M0={focusedElem:o,selectionRange:u},Fh=!1,wn=l;wn!==null;)if(l=wn,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,wn=o;else for(;wn!==null;){switch(l=wn,y=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(u=0;u<o.length;u++)g=o[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&y!==null){o=void 0,u=l,g=y.memoizedProps,y=y.memoizedState,h=u.stateNode;try{var we=tl(u.type,g);o=h.getSnapshotBeforeUpdate(we,y),h.__reactInternalSnapshotBeforeUpdate=o}catch(De){Ot(u,u.return,De)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,u=o.nodeType,u===9)z0(o);else if(u===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":z0(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(i(163))}if(o=l.sibling,o!==null){o.return=l.return,wn=o;break}wn=l.return}}function Ix(o,l,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:Oo(o,u),h&4&&Ic(5,u);break;case 1:if(Oo(o,u),h&4)if(o=u.stateNode,l===null)try{o.componentDidMount()}catch(w){Ot(u,u.return,w)}else{var g=tl(u.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(g,l,o.__reactInternalSnapshotBeforeUpdate)}catch(w){Ot(u,u.return,w)}}h&64&&Qx(u),h&512&&Hc(u,u.return);break;case 3:if(Oo(o,u),h&64&&(o=u.updateQueue,o!==null)){if(l=null,u.child!==null)switch(u.child.tag){case 27:case 5:l=u.child.stateNode;break;case 1:l=u.child.stateNode}try{ES(o,l)}catch(w){Ot(u,u.return,w)}}break;case 27:l===null&&h&4&&qx(u);case 26:case 5:Oo(o,u),l===null&&h&4&&Nx(u),h&512&&Hc(u,u.return);break;case 12:Oo(o,u);break;case 31:Oo(o,u),h&4&&Wx(o,u);break;case 13:Oo(o,u),h&4&&Xx(o,u),h&64&&(o=u.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(u=Iz.bind(null,u),c$(o,u))));break;case 22:if(h=u.memoizedState!==null||vo,!h){l=l!==null&&l.memoizedState!==null||cn,g=vo;var y=cn;vo=h,(cn=l)&&!y?So(o,u,(u.subtreeFlags&8772)!==0):Oo(o,u),vo=g,cn=y}break;case 30:break;default:Oo(o,u)}}function Hx(o){var l=o.alternate;l!==null&&(o.alternate=null,Hx(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&Lm(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var _t=null,ii=!1;function bo(o,l,u){for(u=u.child;u!==null;)Vx(o,l,u),u=u.sibling}function Vx(o,l,u){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(Vn,u)}catch{}switch(u.tag){case 26:cn||Mr(u,l),bo(o,l,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:cn||Mr(u,l);var h=_t,g=ii;us(u.type)&&(_t=u.stateNode,ii=!1),bo(o,l,u),Jc(u.stateNode),_t=h,ii=g;break;case 5:cn||Mr(u,l);case 6:if(h=_t,g=ii,_t=null,bo(o,l,u),_t=h,ii=g,_t!==null)if(ii)try{(_t.nodeType===9?_t.body:_t.nodeName==="HTML"?_t.ownerDocument.body:_t).removeChild(u.stateNode)}catch(y){Ot(u,l,y)}else try{_t.removeChild(u.stateNode)}catch(y){Ot(u,l,y)}break;case 18:_t!==null&&(ii?(o=_t,Qw(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,u.stateNode),ya(o)):Qw(_t,u.stateNode));break;case 4:h=_t,g=ii,_t=u.stateNode.containerInfo,ii=!0,bo(o,l,u),_t=h,ii=g;break;case 0:case 11:case 14:case 15:is(2,u,l),cn||is(4,u,l),bo(o,l,u);break;case 1:cn||(Mr(u,l),h=u.stateNode,typeof h.componentWillUnmount=="function"&&Lx(u,l,h)),bo(o,l,u);break;case 21:bo(o,l,u);break;case 22:cn=(h=cn)||u.memoizedState!==null,bo(o,l,u),cn=h;break;default:bo(o,l,u)}}function Wx(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{ya(o)}catch(u){Ot(l,l.return,u)}}}function Xx(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{ya(o)}catch(u){Ot(l,l.return,u)}}function Bz(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new Ux),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new Ux),l;default:throw Error(i(435,o.tag))}}function Rh(o,l){var u=Bz(o);l.forEach(function(h){if(!u.has(h)){u.add(h);var g=Hz.bind(null,o,h);h.then(g,g)}})}function ri(o,l){var u=l.deletions;if(u!==null)for(var h=0;h<u.length;h++){var g=u[h],y=o,w=l,P=w;e:for(;P!==null;){switch(P.tag){case 27:if(us(P.type)){_t=P.stateNode,ii=!1;break e}break;case 5:_t=P.stateNode,ii=!1;break e;case 3:case 4:_t=P.stateNode.containerInfo,ii=!0;break e}P=P.return}if(_t===null)throw Error(i(160));Vx(y,w,g),_t=null,ii=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Gx(l,o),l=l.sibling}var dr=null;function Gx(o,l){var u=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:ri(l,o),oi(o),h&4&&(is(3,o,o.return),Ic(3,o),is(5,o,o.return));break;case 1:ri(l,o),oi(o),h&512&&(cn||u===null||Mr(u,u.return)),h&64&&vo&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(u=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var g=dr;if(ri(l,o),oi(o),h&512&&(cn||u===null||Mr(u,u.return)),h&4){var y=u!==null?u.memoizedState:null;if(h=o.memoizedState,u===null)if(h===null)if(o.stateNode===null){e:{h=o.type,u=o.memoizedProps,g=g.ownerDocument||g;t:switch(h){case"title":y=g.getElementsByTagName("title")[0],(!y||y[yc]||y[En]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(h),g.head.insertBefore(y,g.querySelector("head > title"))),Dn(y,h,u),y[En]=o,xn(y),h=y;break e;case"link":var w=Gw("link","href",g).get(h+(u.href||""));if(w){for(var P=0;P<w.length;P++)if(y=w[P],y.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&y.getAttribute("rel")===(u.rel==null?null:u.rel)&&y.getAttribute("title")===(u.title==null?null:u.title)&&y.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){w.splice(P,1);break t}}y=g.createElement(h),Dn(y,h,u),g.head.appendChild(y);break;case"meta":if(w=Gw("meta","content",g).get(h+(u.content||""))){for(P=0;P<w.length;P++)if(y=w[P],y.getAttribute("content")===(u.content==null?null:""+u.content)&&y.getAttribute("name")===(u.name==null?null:u.name)&&y.getAttribute("property")===(u.property==null?null:u.property)&&y.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&y.getAttribute("charset")===(u.charSet==null?null:u.charSet)){w.splice(P,1);break t}}y=g.createElement(h),Dn(y,h,u),g.head.appendChild(y);break;default:throw Error(i(468,h))}y[En]=o,xn(y),h=y}o.stateNode=h}else Fw(g,o.type,o.stateNode);else o.stateNode=Xw(g,h,o.memoizedProps);else y!==h?(y===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):y.count--,h===null?Fw(g,o.type,o.stateNode):Xw(g,h,o.memoizedProps)):h===null&&o.stateNode!==null&&o0(o,o.memoizedProps,u.memoizedProps)}break;case 27:ri(l,o),oi(o),h&512&&(cn||u===null||Mr(u,u.return)),u!==null&&h&4&&o0(o,o.memoizedProps,u.memoizedProps);break;case 5:if(ri(l,o),oi(o),h&512&&(cn||u===null||Mr(u,u.return)),o.flags&32){g=o.stateNode;try{_l(g,"")}catch(we){Ot(o,o.return,we)}}h&4&&o.stateNode!=null&&(g=o.memoizedProps,o0(o,g,u!==null?u.memoizedProps:g)),h&1024&&(a0=!0);break;case 6:if(ri(l,o),oi(o),h&4){if(o.stateNode===null)throw Error(i(162));h=o.memoizedProps,u=o.stateNode;try{u.nodeValue=h}catch(we){Ot(o,o.return,we)}}break;case 3:if(Vh=null,g=dr,dr=Ih(l.containerInfo),ri(l,o),dr=g,oi(o),h&4&&u!==null&&u.memoizedState.isDehydrated)try{ya(l.containerInfo)}catch(we){Ot(o,o.return,we)}a0&&(a0=!1,Fx(o));break;case 4:h=dr,dr=Ih(o.stateNode.containerInfo),ri(l,o),oi(o),dr=h;break;case 12:ri(l,o),oi(o);break;case 31:ri(l,o),oi(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Rh(o,h)));break;case 13:ri(l,o),oi(o),o.child.flags&8192&&o.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Dh=$t()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Rh(o,h)));break;case 22:g=o.memoizedState!==null;var I=u!==null&&u.memoizedState!==null,ee=vo,re=cn;if(vo=ee||g,cn=re||I,ri(l,o),cn=re,vo=ee,oi(o),h&8192)e:for(l=o.stateNode,l._visibility=g?l._visibility&-2:l._visibility|1,g&&(u===null||I||vo||cn||nl(o)),u=null,l=o;;){if(l.tag===5||l.tag===26){if(u===null){I=u=l;try{if(y=I.stateNode,g)w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{P=I.stateNode;var fe=I.memoizedProps.style,te=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;P.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(we){Ot(I,I.return,we)}}}else if(l.tag===6){if(u===null){I=l;try{I.stateNode.nodeValue=g?"":I.memoizedProps}catch(we){Ot(I,I.return,we)}}}else if(l.tag===18){if(u===null){I=l;try{var ie=I.stateNode;g?Lw(ie,!0):Lw(I.stateNode,!1)}catch(we){Ot(I,I.return,we)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;u===l&&(u=null),l=l.return}u===l&&(u=null),l.sibling.return=l.return,l=l.sibling}h&4&&(h=o.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Rh(o,u))));break;case 19:ri(l,o),oi(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Rh(o,h)));break;case 30:break;case 21:break;default:ri(l,o),oi(o)}}function oi(o){var l=o.flags;if(l&2){try{for(var u,h=o.return;h!==null;){if(_x(h)){u=h;break}h=h.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var g=u.stateNode,y=s0(o);Ah(o,y,g);break;case 5:var w=u.stateNode;u.flags&32&&(_l(w,""),u.flags&=-33);var P=s0(o);Ah(o,P,w);break;case 3:case 4:var I=u.stateNode.containerInfo,ee=s0(o);l0(o,ee,I);break;default:throw Error(i(161))}}catch(re){Ot(o,o.return,re)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function Fx(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;Fx(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function Oo(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Ix(o,l.alternate,l),l=l.sibling}function nl(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:is(4,l,l.return),nl(l);break;case 1:Mr(l,l.return);var u=l.stateNode;typeof u.componentWillUnmount=="function"&&Lx(l,l.return,u),nl(l);break;case 27:Jc(l.stateNode);case 26:case 5:Mr(l,l.return),nl(l);break;case 22:l.memoizedState===null&&nl(l);break;case 30:nl(l);break;default:nl(l)}o=o.sibling}}function So(o,l,u){for(u=u&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var h=l.alternate,g=o,y=l,w=y.flags;switch(y.tag){case 0:case 11:case 15:So(g,y,u),Ic(4,y);break;case 1:if(So(g,y,u),h=y,g=h.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(ee){Ot(h,h.return,ee)}if(h=y,g=h.updateQueue,g!==null){var P=h.stateNode;try{var I=g.shared.hiddenCallbacks;if(I!==null)for(g.shared.hiddenCallbacks=null,g=0;g<I.length;g++)kS(I[g],P)}catch(ee){Ot(h,h.return,ee)}}u&&w&64&&Qx(y),Hc(y,y.return);break;case 27:qx(y);case 26:case 5:So(g,y,u),u&&h===null&&w&4&&Nx(y),Hc(y,y.return);break;case 12:So(g,y,u);break;case 31:So(g,y,u),u&&w&4&&Wx(g,y);break;case 13:So(g,y,u),u&&w&4&&Xx(g,y);break;case 22:y.memoizedState===null&&So(g,y,u),Hc(y,y.return);break;case 30:break;default:So(g,y,u)}l=l.sibling}}function c0(o,l){var u=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==u&&(o!=null&&o.refCount++,u!=null&&Mc(u))}function u0(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Mc(o))}function pr(o,l,u,h){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Yx(o,l,u,h),l=l.sibling}function Yx(o,l,u,h){var g=l.flags;switch(l.tag){case 0:case 11:case 15:pr(o,l,u,h),g&2048&&Ic(9,l);break;case 1:pr(o,l,u,h);break;case 3:pr(o,l,u,h),g&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Mc(o)));break;case 12:if(g&2048){pr(o,l,u,h),o=l.stateNode;try{var y=l.memoizedProps,w=y.id,P=y.onPostCommit;typeof P=="function"&&P(w,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(I){Ot(l,l.return,I)}}else pr(o,l,u,h);break;case 31:pr(o,l,u,h);break;case 13:pr(o,l,u,h);break;case 23:break;case 22:y=l.stateNode,w=l.alternate,l.memoizedState!==null?y._visibility&2?pr(o,l,u,h):Vc(o,l):y._visibility&2?pr(o,l,u,h):(y._visibility|=2,sa(o,l,u,h,(l.subtreeFlags&10256)!==0||!1)),g&2048&&c0(w,l);break;case 24:pr(o,l,u,h),g&2048&&u0(l.alternate,l);break;default:pr(o,l,u,h)}}function sa(o,l,u,h,g){for(g=g&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var y=o,w=l,P=u,I=h,ee=w.flags;switch(w.tag){case 0:case 11:case 15:sa(y,w,P,I,g),Ic(8,w);break;case 23:break;case 22:var re=w.stateNode;w.memoizedState!==null?re._visibility&2?sa(y,w,P,I,g):Vc(y,w):(re._visibility|=2,sa(y,w,P,I,g)),g&&ee&2048&&c0(w.alternate,w);break;case 24:sa(y,w,P,I,g),g&&ee&2048&&u0(w.alternate,w);break;default:sa(y,w,P,I,g)}l=l.sibling}}function Vc(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var u=o,h=l,g=h.flags;switch(h.tag){case 22:Vc(u,h),g&2048&&c0(h.alternate,h);break;case 24:Vc(u,h),g&2048&&u0(h.alternate,h);break;default:Vc(u,h)}l=l.sibling}}var Wc=8192;function la(o,l,u){if(o.subtreeFlags&Wc)for(o=o.child;o!==null;)Kx(o,l,u),o=o.sibling}function Kx(o,l,u){switch(o.tag){case 26:la(o,l,u),o.flags&Wc&&o.memoizedState!==null&&S$(u,dr,o.memoizedState,o.memoizedProps);break;case 5:la(o,l,u);break;case 3:case 4:var h=dr;dr=Ih(o.stateNode.containerInfo),la(o,l,u),dr=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=Wc,Wc=16777216,la(o,l,u),Wc=h):la(o,l,u));break;default:la(o,l,u)}}function Zx(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function Xc(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var h=l[u];wn=h,ew(h,o)}Zx(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Jx(o),o=o.sibling}function Jx(o){switch(o.tag){case 0:case 11:case 15:Xc(o),o.flags&2048&&is(9,o,o.return);break;case 3:Xc(o);break;case 12:Xc(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Mh(o)):Xc(o);break;default:Xc(o)}}function Mh(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var h=l[u];wn=h,ew(h,o)}Zx(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:is(8,l,l.return),Mh(l);break;case 22:u=l.stateNode,u._visibility&2&&(u._visibility&=-3,Mh(l));break;default:Mh(l)}o=o.sibling}}function ew(o,l){for(;wn!==null;){var u=wn;switch(u.tag){case 0:case 11:case 15:is(8,u,l);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Mc(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,wn=h;else e:for(u=o;wn!==null;){h=wn;var g=h.sibling,y=h.return;if(Hx(h),h===u){wn=null;break e}if(g!==null){g.return=y,wn=g;break e}wn=y}}}var jz={getCacheForType:function(o){var l=Rn(sn),u=l.data.get(o);return u===void 0&&(u=o(),l.data.set(o,u)),u},cacheSignal:function(){return Rn(sn).controller.signal}},Qz=typeof WeakMap=="function"?WeakMap:Map,pt=0,Rt=null,Xe=null,Je=0,bt=0,Oi=null,rs=!1,aa=!1,f0=!1,xo=0,Gt=0,os=0,il=0,h0=0,Si=0,ca=0,Gc=null,si=null,d0=!1,Dh=0,tw=0,Ph=1/0,zh=null,ss=null,gn=0,ls=null,ua=null,wo=0,p0=0,m0=null,nw=null,Fc=0,g0=null;function xi(){return(pt&2)!==0&&Je!==0?Je&-Je:L.T!==null?x0():Wo()}function iw(){if(Si===0)if((Je&536870912)===0||tt){var o=Ho;Ho<<=1,(Ho&3932160)===0&&(Ho=262144),Si=o}else Si=536870912;return o=vi.current,o!==null&&(o.flags|=32),Si}function li(o,l,u){(o===Rt&&(bt===2||bt===9)||o.cancelPendingCommit!==null)&&(fa(o,0),as(o,Je,Si,!1)),Oe(o,u),((pt&2)===0||o!==Rt)&&(o===Rt&&((pt&2)===0&&(il|=u),Gt===4&&as(o,Je,Si,!1)),Dr(o))}function rw(o,l,u){if((pt&6)!==0)throw Error(i(327));var h=!u&&(l&127)===0&&(l&o.expiredLanes)===0||oo(o,l),g=h?_z(o,l):v0(o,l,!0),y=h;do{if(g===0){aa&&!h&&as(o,l,0,!1);break}else{if(u=o.current.alternate,y&&!Lz(u)){g=v0(o,l,!1),y=!1;continue}if(g===2){if(y=l,o.errorRecoveryDisabledLanes&y)var w=0;else w=o.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){l=w;e:{var P=o;g=Gc;var I=P.current.memoizedState.isDehydrated;if(I&&(fa(P,w).flags|=256),w=v0(P,w,!1),w!==2){if(f0&&!I){P.errorRecoveryDisabledLanes|=y,il|=y,g=4;break e}y=si,si=g,y!==null&&(si===null?si=y:si.push.apply(si,y))}g=w}if(y=!1,g!==2)continue}}if(g===1){fa(o,0),as(o,l,0,!0);break}e:{switch(h=o,y=g,y){case 0:case 1:throw Error(i(345));case 4:if((l&4194048)!==l)break;case 6:as(h,l,Si,!rs);break e;case 2:si=null;break;case 3:case 5:break;default:throw Error(i(329))}if((l&62914560)===l&&(g=Dh+300-$t(),10<g)){if(as(h,l,Si,!rs),Vo(h,0,!0)!==0)break e;wo=l,h.timeoutHandle=Bw(ow.bind(null,h,u,si,zh,d0,l,Si,il,ca,rs,y,"Throttled",-0,0),g);break e}ow(h,u,si,zh,d0,l,Si,il,ca,rs,y,null,-0,0)}}break}while(!0);Dr(o)}function ow(o,l,u,h,g,y,w,P,I,ee,re,fe,te,ie){if(o.timeoutHandle=-1,fe=l.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:lo},Kx(l,y,fe);var we=(y&62914560)===y?Dh-$t():(y&4194048)===y?tw-$t():0;if(we=x$(fe,we),we!==null){wo=y,o.cancelPendingCommit=we(dw.bind(null,o,l,y,u,h,g,w,P,I,re,fe,null,te,ie)),as(o,y,w,!ee);return}}dw(o,l,y,u,h,g,w,P,I)}function Lz(o){for(var l=o;;){var u=l.tag;if((u===0||u===11||u===15)&&l.flags&16384&&(u=l.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var g=u[h],y=g.getSnapshot;g=g.value;try{if(!gi(y(),g))return!1}catch{return!1}}if(u=l.child,l.subtreeFlags&16384&&u!==null)u.return=l,l=u;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function as(o,l,u,h){l&=~h0,l&=~il,o.suspendedLanes|=l,o.pingedLanes&=~l,h&&(o.warmLanes|=l),h=o.expirationTimes;for(var g=l;0<g;){var y=31-mn(g),w=1<<y;h[y]=-1,g&=~w}u!==0&&ut(o,u,l)}function $h(){return(pt&6)===0?(Yc(0),!1):!0}function y0(){if(Xe!==null){if(bt===0)var o=Xe.return;else o=Xe,fo=Gs=null,zg(o),ta=null,Pc=0,o=Xe;for(;o!==null;)jx(o.alternate,o),o=o.return;Xe=null}}function fa(o,l){var u=o.timeoutHandle;u!==-1&&(o.timeoutHandle=-1,r$(u)),u=o.cancelPendingCommit,u!==null&&(o.cancelPendingCommit=null,u()),wo=0,y0(),Rt=o,Xe=u=co(o.current,null),Je=l,bt=0,Oi=null,rs=!1,aa=oo(o,l),f0=!1,ca=Si=h0=il=os=Gt=0,si=Gc=null,d0=!1,(l&8)!==0&&(l|=l&32);var h=o.entangledLanes;if(h!==0)for(o=o.entanglements,h&=l;0<h;){var g=31-mn(h),y=1<<g;l|=o[g],h&=~y}return xo=l,th(),u}function sw(o,l){Ne=null,L.H=_c,l===ea||l===ch?(l=xS(),bt=3):l===Sg?(l=xS(),bt=4):bt=l===Fg?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Oi=l,Xe===null&&(Gt=1,wh(o,Li(l,o.current)))}function lw(){var o=vi.current;return o===null?!0:(Je&4194048)===Je?Ui===null:(Je&62914560)===Je||(Je&536870912)!==0?o===Ui:!1}function aw(){var o=L.H;return L.H=_c,o===null?_c:o}function cw(){var o=L.A;return L.A=jz,o}function Bh(){Gt=4,rs||(Je&4194048)!==Je&&vi.current!==null||(aa=!0),(os&134217727)===0&&(il&134217727)===0||Rt===null||as(Rt,Je,Si,!1)}function v0(o,l,u){var h=pt;pt|=2;var g=aw(),y=cw();(Rt!==o||Je!==l)&&(zh=null,fa(o,l)),l=!1;var w=Gt;e:do try{if(bt!==0&&Xe!==null){var P=Xe,I=Oi;switch(bt){case 8:y0(),w=6;break e;case 3:case 2:case 9:case 6:vi.current===null&&(l=!0);var ee=bt;if(bt=0,Oi=null,ha(o,P,I,ee),u&&aa){w=0;break e}break;default:ee=bt,bt=0,Oi=null,ha(o,P,I,ee)}}Nz(),w=Gt;break}catch(re){sw(o,re)}while(!0);return l&&o.shellSuspendCounter++,fo=Gs=null,pt=h,L.H=g,L.A=y,Xe===null&&(Rt=null,Je=0,th()),w}function Nz(){for(;Xe!==null;)uw(Xe)}function _z(o,l){var u=pt;pt|=2;var h=aw(),g=cw();Rt!==o||Je!==l?(zh=null,Ph=$t()+500,fa(o,l)):aa=oo(o,l);e:do try{if(bt!==0&&Xe!==null){l=Xe;var y=Oi;t:switch(bt){case 1:bt=0,Oi=null,ha(o,l,y,1);break;case 2:case 9:if(OS(y)){bt=0,Oi=null,fw(l);break}l=function(){bt!==2&&bt!==9||Rt!==o||(bt=7),Dr(o)},y.then(l,l);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:OS(y)?(bt=0,Oi=null,fw(l)):(bt=0,Oi=null,ha(o,l,y,7));break;case 5:var w=null;switch(Xe.tag){case 26:w=Xe.memoizedState;case 5:case 27:var P=Xe;if(w?Yw(w):P.stateNode.complete){bt=0,Oi=null;var I=P.sibling;if(I!==null)Xe=I;else{var ee=P.return;ee!==null?(Xe=ee,jh(ee)):Xe=null}break t}}bt=0,Oi=null,ha(o,l,y,5);break;case 6:bt=0,Oi=null,ha(o,l,y,6);break;case 8:y0(),Gt=6;break e;default:throw Error(i(462))}}qz();break}catch(re){sw(o,re)}while(!0);return fo=Gs=null,L.H=h,L.A=g,pt=u,Xe!==null?0:(Rt=null,Je=0,th(),Gt)}function qz(){for(;Xe!==null&&!Ee();)uw(Xe)}function uw(o){var l=$x(o.alternate,o,xo);o.memoizedProps=o.pendingProps,l===null?jh(o):Xe=l}function fw(o){var l=o,u=l.alternate;switch(l.tag){case 15:case 0:l=Ax(u,l,l.pendingProps,l.type,void 0,Je);break;case 11:l=Ax(u,l,l.pendingProps,l.type.render,l.ref,Je);break;case 5:zg(l);default:jx(u,l),l=Xe=cS(l,xo),l=$x(u,l,xo)}o.memoizedProps=o.pendingProps,l===null?jh(o):Xe=l}function ha(o,l,u,h){fo=Gs=null,zg(l),ta=null,Pc=0;var g=l.return;try{if(Rz(o,g,l,u,Je)){Gt=1,wh(o,Li(u,o.current)),Xe=null;return}}catch(y){if(g!==null)throw Xe=g,y;Gt=1,wh(o,Li(u,o.current)),Xe=null;return}l.flags&32768?(tt||h===1?o=!0:aa||(Je&536870912)!==0?o=!1:(rs=o=!0,(h===2||h===9||h===3||h===6)&&(h=vi.current,h!==null&&h.tag===13&&(h.flags|=16384))),hw(l,o)):jh(l)}function jh(o){var l=o;do{if((l.flags&32768)!==0){hw(l,rs);return}o=l.return;var u=Pz(l.alternate,l,xo);if(u!==null){Xe=u;return}if(l=l.sibling,l!==null){Xe=l;return}Xe=l=o}while(l!==null);Gt===0&&(Gt=5)}function hw(o,l){do{var u=zz(o.alternate,o);if(u!==null){u.flags&=32767,Xe=u;return}if(u=o.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!l&&(o=o.sibling,o!==null)){Xe=o;return}Xe=o=u}while(o!==null);Gt=6,Xe=null}function dw(o,l,u,h,g,y,w,P,I){o.cancelPendingCommit=null;do Qh();while(gn!==0);if((pt&6)!==0)throw Error(i(327));if(l!==null){if(l===o.current)throw Error(i(177));if(y=l.lanes|l.childLanes,y|=sg,Me(o,u,y,w,P,I),o===Rt&&(Xe=Rt=null,Je=0),ua=l,ls=o,wo=u,p0=y,m0=g,nw=h,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,Vz(Bt,function(){return vw(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||h){h=L.T,L.T=null,g=X.p,X.p=2,w=pt,pt|=4;try{$z(o,l,u)}finally{pt=w,X.p=g,L.T=h}}gn=1,pw(),mw(),gw()}}function pw(){if(gn===1){gn=0;var o=ls,l=ua,u=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||u){u=L.T,L.T=null;var h=X.p;X.p=2;var g=pt;pt|=4;try{Gx(l,o);var y=M0,w=eS(o.containerInfo),P=y.focusedElem,I=y.selectionRange;if(w!==P&&P&&P.ownerDocument&&J1(P.ownerDocument.documentElement,P)){if(I!==null&&tg(P)){var ee=I.start,re=I.end;if(re===void 0&&(re=ee),"selectionStart"in P)P.selectionStart=ee,P.selectionEnd=Math.min(re,P.value.length);else{var fe=P.ownerDocument||document,te=fe&&fe.defaultView||window;if(te.getSelection){var ie=te.getSelection(),we=P.textContent.length,De=Math.min(I.start,we),Tt=I.end===void 0?De:Math.min(I.end,we);!ie.extend&&De>Tt&&(w=Tt,Tt=De,De=w);var F=Z1(P,De),H=Z1(P,Tt);if(F&&H&&(ie.rangeCount!==1||ie.anchorNode!==F.node||ie.anchorOffset!==F.offset||ie.focusNode!==H.node||ie.focusOffset!==H.offset)){var Z=fe.createRange();Z.setStart(F.node,F.offset),ie.removeAllRanges(),De>Tt?(ie.addRange(Z),ie.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),ie.addRange(Z))}}}}for(fe=[],ie=P;ie=ie.parentNode;)ie.nodeType===1&&fe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<fe.length;P++){var ae=fe[P];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Fh=!!R0,M0=R0=null}finally{pt=g,X.p=h,L.T=u}}o.current=l,gn=2}}function mw(){if(gn===2){gn=0;var o=ls,l=ua,u=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||u){u=L.T,L.T=null;var h=X.p;X.p=2;var g=pt;pt|=4;try{Ix(o,l.alternate,l)}finally{pt=g,X.p=h,L.T=u}}gn=3}}function gw(){if(gn===4||gn===3){gn=0,Pi();var o=ls,l=ua,u=wo,h=nw;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?gn=5:(gn=0,ua=ls=null,yw(o,o.pendingLanes));var g=o.pendingLanes;if(g===0&&(ss=null),fr(u),l=l.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(Vn,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=L.T,g=X.p,X.p=2,L.T=null;try{for(var y=o.onRecoverableError,w=0;w<h.length;w++){var P=h[w];y(P.value,{componentStack:P.stack})}}finally{L.T=l,X.p=g}}(wo&3)!==0&&Qh(),Dr(o),g=o.pendingLanes,(u&261930)!==0&&(g&42)!==0?o===g0?Fc++:(Fc=0,g0=o):Fc=0,Yc(0)}}function yw(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Mc(l)))}function Qh(){return pw(),mw(),gw(),vw()}function vw(){if(gn!==5)return!1;var o=ls,l=p0;p0=0;var u=fr(wo),h=L.T,g=X.p;try{X.p=32>u?32:u,L.T=null,u=m0,m0=null;var y=ls,w=wo;if(gn=0,ua=ls=null,wo=0,(pt&6)!==0)throw Error(i(331));var P=pt;if(pt|=4,Jx(y.current),Yx(y,y.current,w,u),pt=P,Yc(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(Vn,y)}catch{}return!0}finally{X.p=g,L.T=h,yw(o,l)}}function bw(o,l,u){l=Li(u,l),l=Gg(o.stateNode,l,2),o=es(o,l,2),o!==null&&(Oe(o,2),Dr(o))}function Ot(o,l,u){if(o.tag===3)bw(o,o,u);else for(;l!==null;){if(l.tag===3){bw(l,o,u);break}else if(l.tag===1){var h=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ss===null||!ss.has(h))){o=Li(u,o),u=Ox(2),h=es(l,u,2),h!==null&&(Sx(u,h,l,o),Oe(h,2),Dr(h));break}}l=l.return}}function b0(o,l,u){var h=o.pingCache;if(h===null){h=o.pingCache=new Qz;var g=new Set;h.set(l,g)}else g=h.get(l),g===void 0&&(g=new Set,h.set(l,g));g.has(u)||(f0=!0,g.add(u),o=Uz.bind(null,o,l,u),l.then(o,o))}function Uz(o,l,u){var h=o.pingCache;h!==null&&h.delete(l),o.pingedLanes|=o.suspendedLanes&u,o.warmLanes&=~u,Rt===o&&(Je&u)===u&&(Gt===4||Gt===3&&(Je&62914560)===Je&&300>$t()-Dh?(pt&2)===0&&fa(o,0):h0|=u,ca===Je&&(ca=0)),Dr(o)}function Ow(o,l){l===0&&(l=$e()),o=Vs(o,l),o!==null&&(Oe(o,l),Dr(o))}function Iz(o){var l=o.memoizedState,u=0;l!==null&&(u=l.retryLane),Ow(o,u)}function Hz(o,l){var u=0;switch(o.tag){case 31:case 13:var h=o.stateNode,g=o.memoizedState;g!==null&&(u=g.retryLane);break;case 19:h=o.stateNode;break;case 22:h=o.stateNode._retryCache;break;default:throw Error(i(314))}h!==null&&h.delete(l),Ow(o,u)}function Vz(o,l){return dt(o,l)}var Lh=null,da=null,O0=!1,Nh=!1,S0=!1,cs=0;function Dr(o){o!==da&&o.next===null&&(da===null?Lh=da=o:da=da.next=o),Nh=!0,O0||(O0=!0,Xz())}function Yc(o,l){if(!S0&&Nh){S0=!0;do for(var u=!1,h=Lh;h!==null;){if(o!==0){var g=h.pendingLanes;if(g===0)var y=0;else{var w=h.suspendedLanes,P=h.pingedLanes;y=(1<<31-mn(42|o)+1)-1,y&=g&~(w&~P),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,Cw(h,y))}else y=Je,y=Vo(h,h===Rt?y:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(y&3)===0||oo(h,y)||(u=!0,Cw(h,y));h=h.next}while(u);S0=!1}}function Wz(){Sw()}function Sw(){Nh=O0=!1;var o=0;cs!==0&&i$()&&(o=cs);for(var l=$t(),u=null,h=Lh;h!==null;){var g=h.next,y=xw(h,l);y===0?(h.next=null,u===null?Lh=g:u.next=g,g===null&&(da=u)):(u=h,(o!==0||(y&3)!==0)&&(Nh=!0)),h=g}gn!==0&&gn!==5||Yc(o),cs!==0&&(cs=0)}function xw(o,l){for(var u=o.suspendedLanes,h=o.pingedLanes,g=o.expirationTimes,y=o.pendingLanes&-62914561;0<y;){var w=31-mn(y),P=1<<w,I=g[w];I===-1?((P&u)===0||(P&h)!==0)&&(g[w]=mc(P,l)):I<=l&&(o.expiredLanes|=P),y&=~P}if(l=Rt,u=Je,u=Vo(o,o===l?u:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,u===0||o===l&&(bt===2||bt===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Ve(h),o.callbackNode=null,o.callbackPriority=0;if((u&3)===0||oo(o,u)){if(l=u&-u,l===o.callbackPriority)return l;switch(h!==null&&Ve(h),fr(u)){case 2:case 8:u=st;break;case 32:u=Bt;break;case 268435456:u=zi;break;default:u=Bt}return h=ww.bind(null,o),u=dt(u,h),o.callbackPriority=l,o.callbackNode=u,l}return h!==null&&h!==null&&Ve(h),o.callbackPriority=2,o.callbackNode=null,2}function ww(o,l){if(gn!==0&&gn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var u=o.callbackNode;if(Qh()&&o.callbackNode!==u)return null;var h=Je;return h=Vo(o,o===Rt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(rw(o,h,l),xw(o,$t()),o.callbackNode!=null&&o.callbackNode===u?ww.bind(null,o):null)}function Cw(o,l){if(Qh())return null;rw(o,l,!0)}function Xz(){o$(function(){(pt&6)!==0?dt(Vt,Wz):Sw()})}function x0(){if(cs===0){var o=Zl;o===0&&(o=Io,Io<<=1,(Io&261888)===0&&(Io=256)),cs=o}return cs}function Tw(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Xf(""+o)}function kw(o,l){var u=l.ownerDocument.createElement("input");return u.name=l.name,u.value=l.value,o.id&&u.setAttribute("form",o.id),l.parentNode.insertBefore(u,l),o=new FormData(o),u.parentNode.removeChild(u),o}function Gz(o,l,u,h,g){if(l==="submit"&&u&&u.stateNode===g){var y=Tw((g[ti]||null).action),w=h.submitter;w&&(l=(l=w[ti]||null)?Tw(l.formAction):w.getAttribute("formAction"),l!==null&&(y=l,w=null));var P=new Kf("action","action",null,h,g);o.push({event:P,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(cs!==0){var I=w?kw(g,w):new FormData(g);Ug(u,{pending:!0,data:I,method:g.method,action:y},null,I)}}else typeof y=="function"&&(P.preventDefault(),I=w?kw(g,w):new FormData(g),Ug(u,{pending:!0,data:I,method:g.method,action:y},y,I))},currentTarget:g}]})}}for(var w0=0;w0<og.length;w0++){var C0=og[w0],Fz=C0.toLowerCase(),Yz=C0[0].toUpperCase()+C0.slice(1);hr(Fz,"on"+Yz)}hr(iS,"onAnimationEnd"),hr(rS,"onAnimationIteration"),hr(oS,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(hz,"onTransitionRun"),hr(dz,"onTransitionStart"),hr(pz,"onTransitionCancel"),hr(sS,"onTransitionEnd"),Ll("onMouseEnter",["mouseout","mouseover"]),Ll("onMouseLeave",["mouseout","mouseover"]),Ll("onPointerEnter",["pointerout","pointerover"]),Ll("onPointerLeave",["pointerout","pointerover"]),qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qs("onBeforeInput",["compositionend","keypress","textInput","paste"]),qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kc="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(" "),Kz=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kc));function Ew(o,l){l=(l&4)!==0;for(var u=0;u<o.length;u++){var h=o[u],g=h.event;h=h.listeners;e:{var y=void 0;if(l)for(var w=h.length-1;0<=w;w--){var P=h[w],I=P.instance,ee=P.currentTarget;if(P=P.listener,I!==y&&g.isPropagationStopped())break e;y=P,g.currentTarget=ee;try{y(g)}catch(re){eh(re)}g.currentTarget=null,y=I}else for(w=0;w<h.length;w++){if(P=h[w],I=P.instance,ee=P.currentTarget,P=P.listener,I!==y&&g.isPropagationStopped())break e;y=P,g.currentTarget=ee;try{y(g)}catch(re){eh(re)}g.currentTarget=null,y=I}}}}function Ge(o,l){var u=l[Qm];u===void 0&&(u=l[Qm]=new Set);var h=o+"__bubble";u.has(h)||(Aw(l,o,2,!1),u.add(h))}function T0(o,l,u){var h=0;l&&(h|=4),Aw(u,o,h,l)}var _h="_reactListening"+Math.random().toString(36).slice(2);function k0(o){if(!o[_h]){o[_h]=!0,S1.forEach(function(u){u!=="selectionchange"&&(Kz.has(u)||T0(u,!1,o),T0(u,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[_h]||(l[_h]=!0,T0("selectionchange",!1,l))}}function Aw(o,l,u,h){switch(iC(l)){case 2:var g=T$;break;case 8:g=k$;break;default:g=q0}u=g.bind(null,l,u,o),g=void 0,!Wm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(g=!0),h?g!==void 0?o.addEventListener(l,u,{capture:!0,passive:g}):o.addEventListener(l,u,!0):g!==void 0?o.addEventListener(l,u,{passive:g}):o.addEventListener(l,u,!1)}function E0(o,l,u,h,g){var y=h;if((l&1)===0&&(l&2)===0&&h!==null)e:for(;;){if(h===null)return;var w=h.tag;if(w===3||w===4){var P=h.stateNode.containerInfo;if(P===g)break;if(w===4)for(w=h.return;w!==null;){var I=w.tag;if((I===3||I===4)&&w.stateNode.containerInfo===g)return;w=w.return}for(;P!==null;){if(w=Bl(P),w===null)return;if(I=w.tag,I===5||I===6||I===26||I===27){h=y=w;continue e}P=P.parentNode}}h=h.return}z1(function(){var ee=y,re=Hm(u),fe=[];e:{var te=lS.get(o);if(te!==void 0){var ie=Kf,we=o;switch(o){case"keypress":if(Ff(u)===0)break e;case"keydown":case"keyup":ie=HP;break;case"focusin":we="focus",ie=Ym;break;case"focusout":we="blur",ie=Ym;break;case"beforeblur":case"afterblur":ie=Ym;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=j1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=PP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=XP;break;case iS:case rS:case oS:ie=BP;break;case sS:ie=FP;break;case"scroll":case"scrollend":ie=MP;break;case"wheel":ie=KP;break;case"copy":case"cut":case"paste":ie=QP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=L1;break;case"toggle":case"beforetoggle":ie=JP}var De=(l&4)!==0,Tt=!De&&(o==="scroll"||o==="scrollend"),F=De?te!==null?te+"Capture":null:te;De=[];for(var H=ee,Z;H!==null;){var ae=H;if(Z=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||Z===null||F===null||(ae=bc(H,F),ae!=null&&De.push(Zc(H,ae,Z))),Tt)break;H=H.return}0<De.length&&(te=new ie(te,we,null,u,re),fe.push({event:te,listeners:De}))}}if((l&7)===0){e:{if(te=o==="mouseover"||o==="pointerover",ie=o==="mouseout"||o==="pointerout",te&&u!==Im&&(we=u.relatedTarget||u.fromElement)&&(Bl(we)||we[$l]))break e;if((ie||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,ie?(we=u.relatedTarget||u.toElement,ie=ee,we=we?Bl(we):null,we!==null&&(Tt=s(we),De=we.tag,we!==Tt||De!==5&&De!==27&&De!==6)&&(we=null)):(ie=null,we=ee),ie!==we)){if(De=j1,ae="onMouseLeave",F="onMouseEnter",H="mouse",(o==="pointerout"||o==="pointerover")&&(De=L1,ae="onPointerLeave",F="onPointerEnter",H="pointer"),Tt=ie==null?te:vc(ie),Z=we==null?te:vc(we),te=new De(ae,H+"leave",ie,u,re),te.target=Tt,te.relatedTarget=Z,ae=null,Bl(re)===ee&&(De=new De(F,H+"enter",we,u,re),De.target=Z,De.relatedTarget=Tt,ae=De),Tt=ae,ie&&we)t:{for(De=Zz,F=ie,H=we,Z=0,ae=F;ae;ae=De(ae))Z++;ae=0;for(var Ae=H;Ae;Ae=De(Ae))ae++;for(;0<Z-ae;)F=De(F),Z--;for(;0<ae-Z;)H=De(H),ae--;for(;Z--;){if(F===H||H!==null&&F===H.alternate){De=F;break t}F=De(F),H=De(H)}De=null}else De=null;ie!==null&&Rw(fe,te,ie,De,!1),we!==null&&Tt!==null&&Rw(fe,Tt,we,De,!0)}}e:{if(te=ee?vc(ee):window,ie=te.nodeName&&te.nodeName.toLowerCase(),ie==="select"||ie==="input"&&te.type==="file")var ft=W1;else if(H1(te))if(X1)ft=cz;else{ft=lz;var Ce=sz}else ie=te.nodeName,!ie||ie.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Um(ee.elementType)&&(ft=W1):ft=az;if(ft&&(ft=ft(o,ee))){V1(fe,ft,u,re);break e}Ce&&Ce(o,te,ee),o==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&qm(te,"number",te.value)}switch(Ce=ee?vc(ee):window,o){case"focusin":(H1(Ce)||Ce.contentEditable==="true")&&(Hl=Ce,ng=ee,Ec=null);break;case"focusout":Ec=ng=Hl=null;break;case"mousedown":ig=!0;break;case"contextmenu":case"mouseup":case"dragend":ig=!1,tS(fe,u,re);break;case"selectionchange":if(fz)break;case"keydown":case"keyup":tS(fe,u,re)}var Ue;if(Zm)e:{switch(o){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else Il?U1(o,u)&&(et="onCompositionEnd"):o==="keydown"&&u.keyCode===229&&(et="onCompositionStart");et&&(N1&&u.locale!=="ko"&&(Il||et!=="onCompositionStart"?et==="onCompositionEnd"&&Il&&(Ue=$1()):(Xo=re,Xm="value"in Xo?Xo.value:Xo.textContent,Il=!0)),Ce=qh(ee,et),0<Ce.length&&(et=new Q1(et,o,null,u,re),fe.push({event:et,listeners:Ce}),Ue?et.data=Ue:(Ue=I1(u),Ue!==null&&(et.data=Ue)))),(Ue=tz?nz(o,u):iz(o,u))&&(et=qh(ee,"onBeforeInput"),0<et.length&&(Ce=new Q1("onBeforeInput","beforeinput",null,u,re),fe.push({event:Ce,listeners:et}),Ce.data=Ue)),Gz(fe,o,ee,u,re)}Ew(fe,l)})}function Zc(o,l,u){return{instance:o,listener:l,currentTarget:u}}function qh(o,l){for(var u=l+"Capture",h=[];o!==null;){var g=o,y=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||y===null||(g=bc(o,u),g!=null&&h.unshift(Zc(o,g,y)),g=bc(o,l),g!=null&&h.push(Zc(o,g,y))),o.tag===3)return h;o=o.return}return[]}function Zz(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function Rw(o,l,u,h,g){for(var y=l._reactName,w=[];u!==null&&u!==h;){var P=u,I=P.alternate,ee=P.stateNode;if(P=P.tag,I!==null&&I===h)break;P!==5&&P!==26&&P!==27||ee===null||(I=ee,g?(ee=bc(u,y),ee!=null&&w.unshift(Zc(u,ee,I))):g||(ee=bc(u,y),ee!=null&&w.push(Zc(u,ee,I)))),u=u.return}w.length!==0&&o.push({event:l,listeners:w})}var Jz=/\r\n?/g,e$=/\u0000|\uFFFD/g;function Mw(o){return(typeof o=="string"?o:""+o).replace(Jz,`
|
|
49
|
-
`).replace(e$,"")}function Dw(o,l){return l=Mw(l),Mw(o)===l}function Ct(o,l,u,h,g,y){switch(u){case"children":typeof h=="string"?l==="body"||l==="textarea"&&h===""||_l(o,h):(typeof h=="number"||typeof h=="bigint")&&l!=="body"&&_l(o,""+h);break;case"className":Vf(o,"class",h);break;case"tabIndex":Vf(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Vf(o,u,h);break;case"style":D1(o,h,y);break;case"data":if(l!=="object"){Vf(o,"data",h);break}case"src":case"href":if(h===""&&(l!=="a"||u!=="href")){o.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(u);break}h=Xf(""+h),o.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(u==="formAction"?(l!=="input"&&Ct(o,l,"name",g.name,g,null),Ct(o,l,"formEncType",g.formEncType,g,null),Ct(o,l,"formMethod",g.formMethod,g,null),Ct(o,l,"formTarget",g.formTarget,g,null)):(Ct(o,l,"encType",g.encType,g,null),Ct(o,l,"method",g.method,g,null),Ct(o,l,"target",g.target,g,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(u);break}h=Xf(""+h),o.setAttribute(u,h);break;case"onClick":h!=null&&(o.onclick=lo);break;case"onScroll":h!=null&&Ge("scroll",o);break;case"onScrollEnd":h!=null&&Ge("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(u=h.__html,u!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=u}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}u=Xf(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(u,""+h):o.removeAttribute(u);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":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(u,""):o.removeAttribute(u);break;case"capture":case"download":h===!0?o.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(u,h):o.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(u,h):o.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(u):o.setAttribute(u,h);break;case"popover":Ge("beforetoggle",o),Ge("toggle",o),Hf(o,"popover",h);break;case"xlinkActuate":so(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":so(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":so(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":so(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":so(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":so(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":so(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":so(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":so(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Hf(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=AP.get(u)||u,Hf(o,u,h))}}function A0(o,l,u,h,g,y){switch(u){case"style":D1(o,h,y);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(i(61));if(u=h.__html,u!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=u}}break;case"children":typeof h=="string"?_l(o,h):(typeof h=="number"||typeof h=="bigint")&&_l(o,""+h);break;case"onScroll":h!=null&&Ge("scroll",o);break;case"onScrollEnd":h!=null&&Ge("scrollend",o);break;case"onClick":h!=null&&(o.onclick=lo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!x1.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),l=u.slice(2,g?u.length-7:void 0),y=o[ti]||null,y=y!=null?y[u]:null,typeof y=="function"&&o.removeEventListener(l,y,g),typeof h=="function")){typeof y!="function"&&y!==null&&(u in o?o[u]=null:o.hasAttribute(u)&&o.removeAttribute(u)),o.addEventListener(l,h,g);break e}u in o?o[u]=h:h===!0?o.setAttribute(u,""):Hf(o,u,h)}}}function Dn(o,l,u){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",o),Ge("load",o);var h=!1,g=!1,y;for(y in u)if(u.hasOwnProperty(y)){var w=u[y];if(w!=null)switch(y){case"src":h=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:Ct(o,l,y,w,u,null)}}g&&Ct(o,l,"srcSet",u.srcSet,u,null),h&&Ct(o,l,"src",u.src,u,null);return;case"input":Ge("invalid",o);var P=y=w=g=null,I=null,ee=null;for(h in u)if(u.hasOwnProperty(h)){var re=u[h];if(re!=null)switch(h){case"name":g=re;break;case"type":w=re;break;case"checked":I=re;break;case"defaultChecked":ee=re;break;case"value":y=re;break;case"defaultValue":P=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,l));break;default:Ct(o,l,h,re,u,null)}}E1(o,y,P,I,ee,w,g,!1);return;case"select":Ge("invalid",o),h=w=y=null;for(g in u)if(u.hasOwnProperty(g)&&(P=u[g],P!=null))switch(g){case"value":y=P;break;case"defaultValue":w=P;break;case"multiple":h=P;default:Ct(o,l,g,P,u,null)}l=y,u=w,o.multiple=!!h,l!=null?Nl(o,!!h,l,!1):u!=null&&Nl(o,!!h,u,!0);return;case"textarea":Ge("invalid",o),y=g=h=null;for(w in u)if(u.hasOwnProperty(w)&&(P=u[w],P!=null))switch(w){case"value":h=P;break;case"defaultValue":g=P;break;case"children":y=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(91));break;default:Ct(o,l,w,P,u,null)}R1(o,h,g,y);return;case"option":for(I in u)if(u.hasOwnProperty(I)&&(h=u[I],h!=null))switch(I){case"selected":o.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Ct(o,l,I,h,u,null)}return;case"dialog":Ge("beforetoggle",o),Ge("toggle",o),Ge("cancel",o),Ge("close",o);break;case"iframe":case"object":Ge("load",o);break;case"video":case"audio":for(h=0;h<Kc.length;h++)Ge(Kc[h],o);break;case"image":Ge("error",o),Ge("load",o);break;case"details":Ge("toggle",o);break;case"embed":case"source":case"link":Ge("error",o),Ge("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in u)if(u.hasOwnProperty(ee)&&(h=u[ee],h!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:Ct(o,l,ee,h,u,null)}return;default:if(Um(l)){for(re in u)u.hasOwnProperty(re)&&(h=u[re],h!==void 0&&A0(o,l,re,h,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(h=u[P],h!=null&&Ct(o,l,P,h,u,null))}function t$(o,l,u,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,w=null,P=null,I=null,ee=null,re=null;for(ie in u){var fe=u[ie];if(u.hasOwnProperty(ie)&&fe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":I=fe;default:h.hasOwnProperty(ie)||Ct(o,l,ie,null,h,fe)}}for(var te in h){var ie=h[te];if(fe=u[te],h.hasOwnProperty(te)&&(ie!=null||fe!=null))switch(te){case"type":y=ie;break;case"name":g=ie;break;case"checked":ee=ie;break;case"defaultChecked":re=ie;break;case"value":w=ie;break;case"defaultValue":P=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,l));break;default:ie!==fe&&Ct(o,l,te,ie,h,fe)}}_m(o,w,P,I,ee,re,y,g);return;case"select":ie=w=P=te=null;for(y in u)if(I=u[y],u.hasOwnProperty(y)&&I!=null)switch(y){case"value":break;case"multiple":ie=I;default:h.hasOwnProperty(y)||Ct(o,l,y,null,h,I)}for(g in h)if(y=h[g],I=u[g],h.hasOwnProperty(g)&&(y!=null||I!=null))switch(g){case"value":te=y;break;case"defaultValue":P=y;break;case"multiple":w=y;default:y!==I&&Ct(o,l,g,y,h,I)}l=P,u=w,h=ie,te!=null?Nl(o,!!u,te,!1):!!h!=!!u&&(l!=null?Nl(o,!!u,l,!0):Nl(o,!!u,u?[]:"",!1));return;case"textarea":ie=te=null;for(P in u)if(g=u[P],u.hasOwnProperty(P)&&g!=null&&!h.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:Ct(o,l,P,null,h,g)}for(w in h)if(g=h[w],y=u[w],h.hasOwnProperty(w)&&(g!=null||y!=null))switch(w){case"value":te=g;break;case"defaultValue":ie=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(i(91));break;default:g!==y&&Ct(o,l,w,g,h,y)}A1(o,te,ie);return;case"option":for(var we in u)if(te=u[we],u.hasOwnProperty(we)&&te!=null&&!h.hasOwnProperty(we))switch(we){case"selected":o.selected=!1;break;default:Ct(o,l,we,null,h,te)}for(I in h)if(te=h[I],ie=u[I],h.hasOwnProperty(I)&&te!==ie&&(te!=null||ie!=null))switch(I){case"selected":o.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Ct(o,l,I,te,h,ie)}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 De in u)te=u[De],u.hasOwnProperty(De)&&te!=null&&!h.hasOwnProperty(De)&&Ct(o,l,De,null,h,te);for(ee in h)if(te=h[ee],ie=u[ee],h.hasOwnProperty(ee)&&te!==ie&&(te!=null||ie!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,l));break;default:Ct(o,l,ee,te,h,ie)}return;default:if(Um(l)){for(var Tt in u)te=u[Tt],u.hasOwnProperty(Tt)&&te!==void 0&&!h.hasOwnProperty(Tt)&&A0(o,l,Tt,void 0,h,te);for(re in h)te=h[re],ie=u[re],!h.hasOwnProperty(re)||te===ie||te===void 0&&ie===void 0||A0(o,l,re,te,h,ie);return}}for(var F in u)te=u[F],u.hasOwnProperty(F)&&te!=null&&!h.hasOwnProperty(F)&&Ct(o,l,F,null,h,te);for(fe in h)te=h[fe],ie=u[fe],!h.hasOwnProperty(fe)||te===ie||te==null&&ie==null||Ct(o,l,fe,te,h,ie)}function Pw(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function n$(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var g=u[h],y=g.transferSize,w=g.initiatorType,P=g.duration;if(y&&P&&Pw(w)){for(w=0,P=g.responseEnd,h+=1;h<u.length;h++){var I=u[h],ee=I.startTime;if(ee>P)break;var re=I.transferSize,fe=I.initiatorType;re&&Pw(fe)&&(I=I.responseEnd,w+=re*(I<P?1:(P-ee)/(I-ee)))}if(--h,l+=8*(y+w)/(g.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var R0=null,M0=null;function Uh(o){return o.nodeType===9?o:o.ownerDocument}function zw(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $w(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function D0(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var P0=null;function i$(){var o=window.event;return o&&o.type==="popstate"?o===P0?!1:(P0=o,!0):(P0=null,!1)}var Bw=typeof setTimeout=="function"?setTimeout:void 0,r$=typeof clearTimeout=="function"?clearTimeout:void 0,jw=typeof Promise=="function"?Promise:void 0,o$=typeof queueMicrotask=="function"?queueMicrotask:typeof jw<"u"?function(o){return jw.resolve(null).then(o).catch(s$)}:Bw;function s$(o){setTimeout(function(){throw o})}function us(o){return o==="head"}function Qw(o,l){var u=l,h=0;do{var g=u.nextSibling;if(o.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(h===0){o.removeChild(g),ya(l);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")Jc(o.ownerDocument.documentElement);else if(u==="head"){u=o.ownerDocument.head,Jc(u);for(var y=u.firstChild;y;){var w=y.nextSibling,P=y.nodeName;y[yc]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&y.rel.toLowerCase()==="stylesheet"||u.removeChild(y),y=w}}else u==="body"&&Jc(o.ownerDocument.body);u=g}while(u);ya(l)}function Lw(o,l){var u=o;o=0;do{var h=u.nextSibling;if(u.nodeType===1?l?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(l?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(o===0)break;o--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||o++;u=h}while(u)}function z0(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var u=l;switch(l=l.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":z0(u),Lm(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}o.removeChild(u)}}function l$(o,l,u,h){for(;o.nodeType===1;){var g=u;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[yc])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(y=o.getAttribute("rel"),y==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(y!==g.rel||o.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||o.getAttribute("title")!==(g.title==null?null:g.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(y=o.getAttribute("src"),(y!==(g.src==null?null:g.src)||o.getAttribute("type")!==(g.type==null?null:g.type)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&o.getAttribute("name")===y)return o}else return o;if(o=Ii(o.nextSibling),o===null)break}return null}function a$(o,l,u){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=Ii(o.nextSibling),o===null))return null;return o}function Nw(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=Ii(o.nextSibling),o===null))return null;return o}function $0(o){return o.data==="$?"||o.data==="$~"}function B0(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function c$(o,l){var u=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||u.readyState!=="loading")l();else{var h=function(){l(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function Ii(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var j0=null;function _w(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var u=o.data;if(u==="/$"||u==="/&"){if(l===0)return Ii(o.nextSibling);l--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||l++}o=o.nextSibling}return null}function qw(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var u=o.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(l===0)return o;l--}else u!=="/$"&&u!=="/&"||l++}o=o.previousSibling}return null}function Uw(o,l,u){switch(l=Uh(u),o){case"html":if(o=l.documentElement,!o)throw Error(i(452));return o;case"head":if(o=l.head,!o)throw Error(i(453));return o;case"body":if(o=l.body,!o)throw Error(i(454));return o;default:throw Error(i(451))}}function Jc(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);Lm(o)}var Hi=new Map,Iw=new Set;function Ih(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Co=X.d;X.d={f:u$,r:f$,D:h$,C:d$,L:p$,m:m$,X:y$,S:g$,M:v$};function u$(){var o=Co.f(),l=$h();return o||l}function f$(o){var l=jl(o);l!==null&&l.tag===5&&l.type==="form"?sx(l):Co.r(o)}var pa=typeof document>"u"?null:document;function Hw(o,l,u){var h=pa;if(h&&typeof l=="string"&&l){var g=ji(l);g='link[rel="'+o+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),Iw.has(g)||(Iw.add(g),o={rel:o,crossOrigin:u,href:l},h.querySelector(g)===null&&(l=h.createElement("link"),Dn(l,"link",o),xn(l),h.head.appendChild(l)))}}function h$(o){Co.D(o),Hw("dns-prefetch",o,null)}function d$(o,l){Co.C(o,l),Hw("preconnect",o,l)}function p$(o,l,u){Co.L(o,l,u);var h=pa;if(h&&o&&l){var g='link[rel="preload"][as="'+ji(l)+'"]';l==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+ji(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+ji(u.imageSizes)+'"]')):g+='[href="'+ji(o)+'"]';var y=g;switch(l){case"style":y=ma(o);break;case"script":y=ga(o)}Hi.has(y)||(o=m({rel:"preload",href:l==="image"&&u&&u.imageSrcSet?void 0:o,as:l},u),Hi.set(y,o),h.querySelector(g)!==null||l==="style"&&h.querySelector(eu(y))||l==="script"&&h.querySelector(tu(y))||(l=h.createElement("link"),Dn(l,"link",o),xn(l),h.head.appendChild(l)))}}function m$(o,l){Co.m(o,l);var u=pa;if(u&&o){var h=l&&typeof l.as=="string"?l.as:"script",g='link[rel="modulepreload"][as="'+ji(h)+'"][href="'+ji(o)+'"]',y=g;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=ga(o)}if(!Hi.has(y)&&(o=m({rel:"modulepreload",href:o},l),Hi.set(y,o),u.querySelector(g)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(tu(y)))return}h=u.createElement("link"),Dn(h,"link",o),xn(h),u.head.appendChild(h)}}}function g$(o,l,u){Co.S(o,l,u);var h=pa;if(h&&o){var g=Ql(h).hoistableStyles,y=ma(o);l=l||"default";var w=g.get(y);if(!w){var P={loading:0,preload:null};if(w=h.querySelector(eu(y)))P.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":l},u),(u=Hi.get(y))&&Q0(o,u);var I=w=h.createElement("link");xn(I),Dn(I,"link",o),I._p=new Promise(function(ee,re){I.onload=ee,I.onerror=re}),I.addEventListener("load",function(){P.loading|=1}),I.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Hh(w,l,h)}w={type:"stylesheet",instance:w,count:1,state:P},g.set(y,w)}}}function y$(o,l){Co.X(o,l);var u=pa;if(u&&o){var h=Ql(u).hoistableScripts,g=ga(o),y=h.get(g);y||(y=u.querySelector(tu(g)),y||(o=m({src:o,async:!0},l),(l=Hi.get(g))&&L0(o,l),y=u.createElement("script"),xn(y),Dn(y,"link",o),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},h.set(g,y))}}function v$(o,l){Co.M(o,l);var u=pa;if(u&&o){var h=Ql(u).hoistableScripts,g=ga(o),y=h.get(g);y||(y=u.querySelector(tu(g)),y||(o=m({src:o,async:!0,type:"module"},l),(l=Hi.get(g))&&L0(o,l),y=u.createElement("script"),xn(y),Dn(y,"link",o),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},h.set(g,y))}}function Vw(o,l,u,h){var g=(g=ne.current)?Ih(g):null;if(!g)throw Error(i(446));switch(o){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(l=ma(u.href),u=Ql(g).hoistableStyles,h=u.get(l),h||(h={type:"style",instance:null,count:0,state:null},u.set(l,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){o=ma(u.href);var y=Ql(g).hoistableStyles,w=y.get(o);if(w||(g=g.ownerDocument||g,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(o,w),(y=g.querySelector(eu(o)))&&!y._p&&(w.instance=y,w.state.loading=5),Hi.has(o)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Hi.set(o,u),y||b$(g,o,u,w.state))),l&&h===null)throw Error(i(528,""));return w}if(l&&h!==null)throw Error(i(529,""));return null;case"script":return l=u.async,u=u.src,typeof u=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=ga(u),u=Ql(g).hoistableScripts,h=u.get(l),h||(h={type:"script",instance:null,count:0,state:null},u.set(l,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,o))}}function ma(o){return'href="'+ji(o)+'"'}function eu(o){return'link[rel="stylesheet"]['+o+"]"}function Ww(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function b$(o,l,u,h){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?h.loading=1:(l=o.createElement("link"),h.preload=l,l.addEventListener("load",function(){return h.loading|=1}),l.addEventListener("error",function(){return h.loading|=2}),Dn(l,"link",u),xn(l),o.head.appendChild(l))}function ga(o){return'[src="'+ji(o)+'"]'}function tu(o){return"script[async]"+o}function Xw(o,l,u){if(l.count++,l.instance===null)switch(l.type){case"style":var h=o.querySelector('style[data-href~="'+ji(u.href)+'"]');if(h)return l.instance=h,xn(h),h;var g=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),xn(h),Dn(h,"style",g),Hh(h,u.precedence,o),l.instance=h;case"stylesheet":g=ma(u.href);var y=o.querySelector(eu(g));if(y)return l.state.loading|=4,l.instance=y,xn(y),y;h=Ww(u),(g=Hi.get(g))&&Q0(h,g),y=(o.ownerDocument||o).createElement("link"),xn(y);var w=y;return w._p=new Promise(function(P,I){w.onload=P,w.onerror=I}),Dn(y,"link",h),l.state.loading|=4,Hh(y,u.precedence,o),l.instance=y;case"script":return y=ga(u.src),(g=o.querySelector(tu(y)))?(l.instance=g,xn(g),g):(h=u,(g=Hi.get(y))&&(h=m({},u),L0(h,g)),o=o.ownerDocument||o,g=o.createElement("script"),xn(g),Dn(g,"link",h),o.head.appendChild(g),l.instance=g);case"void":return null;default:throw Error(i(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(h=l.instance,l.state.loading|=4,Hh(h,u.precedence,o));return l.instance}function Hh(o,l,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=h.length?h[h.length-1]:null,y=g,w=0;w<h.length;w++){var P=h[w];if(P.dataset.precedence===l)y=P;else if(y!==g)break}y?y.parentNode.insertBefore(o,y.nextSibling):(l=u.nodeType===9?u.head:u,l.insertBefore(o,l.firstChild))}function Q0(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function L0(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var Vh=null;function Gw(o,l,u){if(Vh===null){var h=new Map,g=Vh=new Map;g.set(u,h)}else g=Vh,h=g.get(u),h||(h=new Map,g.set(u,h));if(h.has(o))return h;for(h.set(o,null),u=u.getElementsByTagName(o),g=0;g<u.length;g++){var y=u[g];if(!(y[yc]||y[En]||o==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var w=y.getAttribute(l)||"";w=o+w;var P=h.get(w);P?P.push(y):h.set(w,[y])}}return h}function Fw(o,l,u){o=o.ownerDocument||o,o.head.insertBefore(u,l==="title"?o.querySelector("head > title"):null)}function O$(o,l,u){if(u===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function Yw(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function S$(o,l,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=ma(h.href),y=l.querySelector(eu(g));if(y){l=y._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=Wh.bind(o),l.then(o,o)),u.state.loading|=4,u.instance=y,xn(y);return}y=l.ownerDocument||l,h=Ww(h),(g=Hi.get(g))&&Q0(h,g),y=y.createElement("link"),xn(y);var w=y;w._p=new Promise(function(P,I){w.onload=P,w.onerror=I}),Dn(y,"link",h),u.instance=y}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(u,l),(l=u.state.preload)&&(u.state.loading&3)===0&&(o.count++,u=Wh.bind(o),l.addEventListener("load",u),l.addEventListener("error",u))}}var N0=0;function x$(o,l){return o.stylesheets&&o.count===0&&Gh(o,o.stylesheets),0<o.count||0<o.imgCount?function(u){var h=setTimeout(function(){if(o.stylesheets&&Gh(o,o.stylesheets),o.unsuspend){var y=o.unsuspend;o.unsuspend=null,y()}},6e4+l);0<o.imgBytes&&N0===0&&(N0=62500*n$());var g=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Gh(o,o.stylesheets),o.unsuspend)){var y=o.unsuspend;o.unsuspend=null,y()}},(o.imgBytes>N0?50:800)+l);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(g)}}:null}function Wh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gh(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Xh=null;function Gh(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Xh=new Map,l.forEach(w$,o),Xh=null,Wh.call(o))}function w$(o,l){if(!(l.state.loading&4)){var u=Xh.get(o);if(u)var h=u.get(null);else{u=new Map,Xh.set(o,u);for(var g=o.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var w=g[y];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(u.set(w.dataset.precedence,w),h=w)}h&&u.set(null,h)}g=l.instance,w=g.getAttribute("data-precedence"),y=u.get(w)||h,y===h&&u.set(null,g),u.set(w,g),this.count++,h=Wh.bind(this),g.addEventListener("load",h),g.addEventListener("error",h),y?y.parentNode.insertBefore(g,y.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(g,o.firstChild)),l.state.loading|=4}}var nu={$$typeof:z,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function C$(o,l,u,h,g,y,w,P,I){this.tag=1,this.containerInfo=o,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=Jn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jn(0),this.hiddenUpdates=Jn(null),this.identifierPrefix=h,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function Kw(o,l,u,h,g,y,w,P,I,ee,re,fe){return o=new C$(o,l,u,w,I,ee,re,fe,P),l=1,y===!0&&(l|=24),y=yi(3,null,null,l),o.current=y,y.stateNode=o,l=vg(),l.refCount++,o.pooledCache=l,l.refCount++,y.memoizedState={element:h,isDehydrated:u,cache:l},xg(y),o}function Zw(o){return o?(o=Xl,o):Xl}function Jw(o,l,u,h,g,y){g=Zw(g),h.context===null?h.context=g:h.pendingContext=g,h=Jo(l),h.payload={element:u},y=y===void 0?null:y,y!==null&&(h.callback=y),u=es(o,h,l),u!==null&&(li(u,o,l),$c(u,o,l))}function eC(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var u=o.retryLane;o.retryLane=u!==0&&u<l?u:l}}function _0(o,l){eC(o,l),(o=o.alternate)&&eC(o,l)}function tC(o){if(o.tag===13||o.tag===31){var l=Vs(o,67108864);l!==null&&li(l,o,67108864),_0(o,67108864)}}function nC(o){if(o.tag===13||o.tag===31){var l=xi();l=ei(l);var u=Vs(o,l);u!==null&&li(u,o,l),_0(o,l)}}var Fh=!0;function T$(o,l,u,h){var g=L.T;L.T=null;var y=X.p;try{X.p=2,q0(o,l,u,h)}finally{X.p=y,L.T=g}}function k$(o,l,u,h){var g=L.T;L.T=null;var y=X.p;try{X.p=8,q0(o,l,u,h)}finally{X.p=y,L.T=g}}function q0(o,l,u,h){if(Fh){var g=U0(h);if(g===null)E0(o,l,h,Yh,u),rC(o,h);else if(A$(g,o,l,u,h))h.stopPropagation();else if(rC(o,h),l&4&&-1<E$.indexOf(o)){for(;g!==null;){var y=jl(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var w=ur(y.pendingLanes);if(w!==0){var P=y;for(P.pendingLanes|=2,P.entangledLanes|=2;w;){var I=1<<31-mn(w);P.entanglements[1]|=I,w&=~I}Dr(y),(pt&6)===0&&(Ph=$t()+500,Yc(0))}}break;case 31:case 13:P=Vs(y,2),P!==null&&li(P,y,2),$h(),_0(y,2)}if(y=U0(h),y===null&&E0(o,l,h,Yh,u),y===g)break;g=y}g!==null&&h.stopPropagation()}else E0(o,l,h,null,u)}}function U0(o){return o=Hm(o),I0(o)}var Yh=null;function I0(o){if(Yh=null,o=Bl(o),o!==null){var l=s(o);if(l===null)o=null;else{var u=l.tag;if(u===13){if(o=a(l),o!==null)return o;o=null}else if(u===31){if(o=c(l),o!==null)return o;o=null}else if(u===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return Yh=o,null}function iC(o){switch(o){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(cr()){case Vt:return 2;case st:return 8;case Bt:case on:return 32;case zi:return 268435456;default:return 32}default:return 32}}var H0=!1,fs=null,hs=null,ds=null,iu=new Map,ru=new Map,ps=[],E$="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 rC(o,l){switch(o){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":hs=null;break;case"mouseover":case"mouseout":ds=null;break;case"pointerover":case"pointerout":iu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ru.delete(l.pointerId)}}function ou(o,l,u,h,g,y){return o===null||o.nativeEvent!==y?(o={blockedOn:l,domEventName:u,eventSystemFlags:h,nativeEvent:y,targetContainers:[g]},l!==null&&(l=jl(l),l!==null&&tC(l)),o):(o.eventSystemFlags|=h,l=o.targetContainers,g!==null&&l.indexOf(g)===-1&&l.push(g),o)}function A$(o,l,u,h,g){switch(l){case"focusin":return fs=ou(fs,o,l,u,h,g),!0;case"dragenter":return hs=ou(hs,o,l,u,h,g),!0;case"mouseover":return ds=ou(ds,o,l,u,h,g),!0;case"pointerover":var y=g.pointerId;return iu.set(y,ou(iu.get(y)||null,o,l,u,h,g)),!0;case"gotpointercapture":return y=g.pointerId,ru.set(y,ou(ru.get(y)||null,o,l,u,h,g)),!0}return!1}function oC(o){var l=Bl(o.target);if(l!==null){var u=s(l);if(u!==null){if(l=u.tag,l===13){if(l=a(u),l!==null){o.blockedOn=l,gc(o.priority,function(){nC(u)});return}}else if(l===31){if(l=c(u),l!==null){o.blockedOn=l,gc(o.priority,function(){nC(u)});return}}else if(l===3&&u.stateNode.current.memoizedState.isDehydrated){o.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Kh(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var u=U0(o.nativeEvent);if(u===null){u=o.nativeEvent;var h=new u.constructor(u.type,u);Im=h,u.target.dispatchEvent(h),Im=null}else return l=jl(u),l!==null&&tC(l),o.blockedOn=u,!1;l.shift()}return!0}function sC(o,l,u){Kh(o)&&u.delete(l)}function R$(){H0=!1,fs!==null&&Kh(fs)&&(fs=null),hs!==null&&Kh(hs)&&(hs=null),ds!==null&&Kh(ds)&&(ds=null),iu.forEach(sC),ru.forEach(sC)}function Zh(o,l){o.blockedOn===l&&(o.blockedOn=null,H0||(H0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R$)))}var Jh=null;function lC(o){Jh!==o&&(Jh=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Jh===o&&(Jh=null);for(var l=0;l<o.length;l+=3){var u=o[l],h=o[l+1],g=o[l+2];if(typeof h!="function"){if(I0(h||u)===null)continue;break}var y=jl(u);y!==null&&(o.splice(l,3),l-=3,Ug(y,{pending:!0,data:g,method:u.method,action:h},h,g))}}))}function ya(o){function l(I){return Zh(I,o)}fs!==null&&Zh(fs,o),hs!==null&&Zh(hs,o),ds!==null&&Zh(ds,o),iu.forEach(l),ru.forEach(l);for(var u=0;u<ps.length;u++){var h=ps[u];h.blockedOn===o&&(h.blockedOn=null)}for(;0<ps.length&&(u=ps[0],u.blockedOn===null);)oC(u),u.blockedOn===null&&ps.shift();if(u=(o.ownerDocument||o).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var g=u[h],y=u[h+1],w=g[ti]||null;if(typeof y=="function")w||lC(u);else if(w){var P=null;if(y&&y.hasAttribute("formAction")){if(g=y,w=y[ti]||null)P=w.formAction;else if(I0(g)!==null)continue}else P=w.action;typeof P=="function"?u[h+1]=P:(u.splice(h,3),h-=3),lC(u)}}}function aC(){function o(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(w){return g=w})},focusReset:"manual",scroll:"manual"})}function l(){g!==null&&(g(),g=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,g=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),g!==null&&(g(),g=null)}}}function V0(o){this._internalRoot=o}ed.prototype.render=V0.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(i(409));var u=l.current,h=xi();Jw(u,h,o,l,null,null)},ed.prototype.unmount=V0.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;Jw(o.current,2,null,o,null,null),$h(),l[$l]=null}};function ed(o){this._internalRoot=o}ed.prototype.unstable_scheduleHydration=function(o){if(o){var l=Wo();o={blockedOn:null,target:o,priority:l};for(var u=0;u<ps.length&&l!==0&&l<ps[u].priority;u++);ps.splice(u,0,o),u===0&&oC(o)}};var cC=e.version;if(cC!=="19.2.0")throw Error(i(527,cC,"19.2.0"));X.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(i(188)):(o=Object.keys(o).join(","),Error(i(268,o)));return o=d(l),o=o!==null?p(o):null,o=o===null?null:o.stateNode,o};var M$={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!td.isDisabled&&td.supportsFiber)try{Vn=td.inject(M$),Wt=td}catch{}}return lu.createRoot=function(o,l){if(!r(o))throw Error(i(299));var u=!1,h="",g=gx,y=yx,w=vx;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=Kw(o,1,!1,null,null,u,h,null,g,y,w,aC),o[$l]=l.current,k0(o),new V0(l)},lu.hydrateRoot=function(o,l,u){if(!r(o))throw Error(i(299));var h=!1,g="",y=gx,w=yx,P=vx,I=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(w=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(I=u.formState)),l=Kw(o,1,!0,l,u??null,h,g,I,y,w,P,aC),l.context=Zw(null),u=l.current,h=xi(),h=ei(h),g=Jo(h),g.callback=null,es(u,g,h),u=h,l.current.lanes=u,Oe(l,u),Dr(l),o[$l]=l.current,k0(o),new ed(l)},lu.version="19.2.0",lu}var bC;function _$(){if(bC)return G0.exports;bC=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),G0.exports=N$(),G0.exports}var q$=_$(),Z0={exports:{}},J0={};/**
|
|
50
|
-
* @license React
|
|
51
|
-
* use-sync-external-store-with-selector.production.js
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var OC;function U$(){if(OC)return J0;OC=1;var t=Qs();function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:e,i=t.useSyncExternalStore,r=t.useRef,s=t.useEffect,a=t.useMemo,c=t.useDebugValue;return J0.useSyncExternalStoreWithSelector=function(f,d,p,m,v){var b=r(null);if(b.current===null){var O={hasValue:!1,value:null};b.current=O}else O=b.current;b=a(function(){function C(R){if(!k){if(k=!0,$=R,R=m(R),v!==void 0&&O.hasValue){var B=O.value;if(v(B,R))return z=B}return z=R}if(B=z,n($,R))return B;var M=m(R);return v!==void 0&&v(B,M)?($=R,B):($=R,z=M)}var k=!1,$,z,D=p===void 0?null:p;return[function(){return C(d())},D===null?void 0:function(){return C(D())}]},[d,p,m,v]);var x=i(f,b[0],b[1]);return s(function(){O.hasValue=!0,O.value=x},[x]),c(x),x},J0}var SC;function I$(){return SC||(SC=1,Z0.exports=U$()),Z0.exports}var H$=I$();function V$(t){t()}function W$(){let t=null,e=null;return{clear(){t=null,e=null},notify(){V$(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let i=t;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0;const r=e={callback:n,next:null,prev:e};return r.prev?r.prev.next=r:t=r,function(){!i||t===null||(i=!1,r.next?r.next.prev=r.prev:e=r.prev,r.prev?r.prev.next=r.next:t=r.next)}}}}var xC={notify(){},get:()=>[]};function X$(t,e){let n,i=xC,r=0,s=!1;function a(x){p();const C=i.subscribe(x);let k=!1;return()=>{k||(k=!0,C(),m())}}function c(){i.notify()}function f(){O.onStateChange&&O.onStateChange()}function d(){return s}function p(){r++,n||(n=t.subscribe(f),i=W$())}function m(){r--,n&&r===0&&(n(),n=void 0,i.clear(),i=xC)}function v(){s||(s=!0,p())}function b(){s&&(s=!1,m())}const O={addNestedSub:a,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:d,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>i};return O}var G$=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F$=G$(),Y$=()=>typeof navigator<"u"&&navigator.product==="ReactNative",K$=Y$(),Z$=()=>F$||K$?E.useLayoutEffect:E.useEffect,J$=Z$(),eB=Symbol.for("react-redux-context"),tB=typeof globalThis<"u"?globalThis:{};function nB(){if(!E.createContext)return{};const t=tB[eB]??=new Map;let e=t.get(E.createContext);return e||(e=E.createContext(null),t.set(E.createContext,e)),e}var Es=nB();function iB(t){const{children:e,context:n,serverState:i,store:r}=t,s=E.useMemo(()=>{const f=X$(r);return{store:r,subscription:f,getServerState:i?()=>i:void 0}},[r,i]),a=E.useMemo(()=>r.getState(),[r]);J$(()=>{const{subscription:f}=s;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),a!==r.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[s,a]);const c=n||Es;return E.createElement(c.Provider,{value:s},e)}var rB=iB;function Qb(t=Es){return function(){return E.useContext(t)}}var qE=Qb();function UE(t=Es){const e=t===Es?qE:Qb(t),n=()=>{const{store:i}=e();return i};return Object.assign(n,{withTypes:()=>n}),n}var oB=UE();function sB(t=Es){const e=t===Es?oB:UE(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Ls=sB(),lB=(t,e)=>t===e;function aB(t=Es){const e=t===Es?qE:Qb(t),n=(i,r={})=>{const{equalityFn:s=lB}=typeof r=="function"?{equalityFn:r}:r,a=e(),{store:c,subscription:f,getServerState:d}=a;E.useRef(!0);const p=E.useCallback({[i.name](v){return i(v)}}[i.name],[i]),m=H$.useSyncExternalStoreWithSelector(f.addNestedSub,c.getState,d||c.getState,p,s);return E.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var Ut=aB();function Pn(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var cB=typeof Symbol=="function"&&Symbol.observable||"@@observable",wC=cB,ey=()=>Math.random().toString(36).substring(7).split("").join("."),uB={INIT:`@@redux/INIT${ey()}`,REPLACE:`@@redux/REPLACE${ey()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ey()}`},gp=uB;function fB(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function IE(t,e,n){if(typeof t!="function")throw new Error(Pn(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Pn(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Pn(1));return n(IE)(t,e)}let i=t,r=e,s=new Map,a=s,c=0,f=!1;function d(){a===s&&(a=new Map,s.forEach((C,k)=>{a.set(k,C)}))}function p(){if(f)throw new Error(Pn(3));return r}function m(C){if(typeof C!="function")throw new Error(Pn(4));if(f)throw new Error(Pn(5));let k=!0;d();const $=c++;return a.set($,C),function(){if(k){if(f)throw new Error(Pn(6));k=!1,d(),a.delete($),s=null}}}function v(C){if(!fB(C))throw new Error(Pn(7));if(typeof C.type>"u")throw new Error(Pn(8));if(typeof C.type!="string")throw new Error(Pn(17));if(f)throw new Error(Pn(9));try{f=!0,r=i(r,C)}finally{f=!1}return(s=a).forEach($=>{$()}),C}function b(C){if(typeof C!="function")throw new Error(Pn(10));i=C,v({type:gp.REPLACE})}function O(){const C=m;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(Pn(11));function $(){const D=k;D.next&&D.next(p())}return $(),{unsubscribe:C($)}},[wC](){return this}}}return v({type:gp.INIT}),{dispatch:v,subscribe:m,getState:p,replaceReducer:b,[wC]:O}}function hB(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:gp.INIT})>"u")throw new Error(Pn(12));if(typeof n(void 0,{type:gp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pn(13))})}function dB(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const a=e[s];typeof t[a]=="function"&&(n[a]=t[a])}const i=Object.keys(n);let r;try{hB(n)}catch(s){r=s}return function(a={},c){if(r)throw r;let f=!1;const d={};for(let p=0;p<i.length;p++){const m=i[p],v=n[m],b=a[m],O=v(b,c);if(typeof O>"u")throw c&&c.type,new Error(Pn(14));d[m]=O,f=f||O!==b}return f=f||i.length!==Object.keys(a).length,f?d:a}}function HE(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function pB(...t){return e=>(n,i)=>{const r=e(n,i);let s=()=>{throw new Error(Pn(15))};const a={getState:r.getState,dispatch:(f,...d)=>s(f,...d)},c=t.map(f=>f(a));return s=HE(...c)(r.dispatch),{...r,dispatch:s}}}const mB="HELLO",gB=()=>({type:mB,remote:!0}),VE="SET_INFO",WE="PAUSE",yB="SET_TITLE",vB="SET_THEME",Lb="SET_FRAMES",bB="GET_FILE",OB=t=>({type:bB,filename:t,remote:!0}),XE="DO_COMMAND",pv=(t,e)=>({type:XE,command:t,frame:e,remote:!0}),SB="SET_FILE",GE="SET_ACTIVE_FRAME",Nb=t=>({type:GE,key:t}),Zp="SET_PROMPT",ty=(t,e,n,i,r=0)=>({type:Zp,key:t,prompt:e,command:n,frame:i,level:r,remote:!0}),FE="REFRESH_PROMPT",YE=(t,e,n,i)=>({type:FE,key:t,prompt:e,command:n,frame:i,remote:!0}),KE="REMOVE_PROMPT_ANSWER",ZE=t=>({type:KE,key:t}),JE="SET_CONNECTION_STATE",CC=t=>({type:JE,state:t}),eA="REQUEST_INSPECT",xB=(t,e)=>({type:eA,key:t,id:e,remote:!0}),wB="SET_ANSWER",tA="SET_WATCHING",CB=(t,e)=>({type:tA,key:t,watching:e}),nA="CLEAR_SCROLLBACK",TB=()=>({type:nA}),kB="REQUEST_SUGGESTION",EB=(t,e,n,i,r)=>({type:kB,prompt:t,from:e,to:n,cursor:i,frame:r,remote:!0}),AB="SET_SUGGESTION",RB="CLEAR_SUGGESTION",MB=(t={},e)=>{switch(e.type){case VE:return e.config;default:return t}},DB=(t="Initializing",e)=>{switch(e.type){case yB:return e.title;default:return t}},PB=(t=[],e)=>{switch(e.type){case Lb:return e.frames;default:return t}},zB=(t={},e)=>{switch(e.type){case SB:return{...t,[e.filename]:e.source};default:return t}},$B=(t=null,e)=>{let n;switch(e.type){case Lb:return n=e.frames.find(({active:i})=>i),n?n.key:t;case GE:return e.key;default:return t}},BB=(t=[],e)=>{switch(e.type){case Zp:return[...t,{key:e.key,prompt:`${e.prompt}…`,command:e.command,frame:e.frame,level:e.level,answer:null}];case FE:return t.map(n=>e.key===n.key?{...n,prompt:`${e.prompt}…`,frame:e.frame||n.frame}:n);case KE:return t.filter(n=>e.key!==n.key);case eA:return[...t,{key:e.key,prompt:`${e.id}…`,answer:null}];case wB:return t.map(n=>e.key===n.key?{...n,key:e.key,prompt:e.prompt,command:e.command,answer:e.answer,frame:e.frame,duration:e.duration}:n);case tA:return t.map(n=>e.key===n.key?{...n,watching:e.watching}:n);case nA:return[];default:return t}},jB=(t={state:"connecting"},e)=>{switch(e.type){case JE:return{...t,state:e.state};default:return t}},QB=(t=0,e)=>e.remote?t+1:e.local?t-1:t,LB=(t=0,e)=>{switch(e.type){case Zp:return e.command==="recursive_debug"?t+1:t;case WE:return e.recursive?t-1:t;default:return t}},NB=(t=!1,e)=>e.type===XE?!0:e.type===WE?!1:t,_B=(t=[],e)=>{switch(e.type){case Zp:{if(e.command==="help")return t;const n=e.command&&e.command!=="condition"?`?${e.command} ${e.prompt}`:e.prompt;return[n,...t.filter(i=>i!==n)]}default:return t}},qB=(t={},e)=>{switch(e.type){case AB:return{prompt:e.prompt,from:e.from,to:e.to,suggestion:e.suggestion};case RB:return{};default:return t}},UB=(t="init",e)=>{switch(e.type){case vB:return e.theme;default:return t}},IB=(t=!0,e)=>{switch(e.type){case VE:return e.main;default:return t}},HB=dB({config:MB,title:DB,frames:PB,files:zB,activeFrame:$B,scrollback:BB,history:_B,suggestions:qB,theme:UB,connection:jB,loadingLevel:QB,recursionLevel:LB,running:NB,main:IB});function VB(t){let e=!1;const n=["debug","info"].includes(t.getState().config.log),i=[],r=()=>new WebSocket(`${window.location.protocol.replace("http","ws")}//${window.location.host.replace(59998,59999)}${window.location.pathname}`);let s=window.ws=r();return s.onopen=()=>{for(t.dispatch(CC("open"));i.length;)s.send(i.shift())},s.onmessage=({data:a})=>{const c=JSON.parse(a);if(n){const{type:f,...d}=c;console&&console.log("->",f,d)}t.dispatch(c)},s.onclose=()=>{t.dispatch(CC("closed")),setTimeout(()=>e||window.close(),10)},window.addEventListener("beforeunload",function(a){if(delete a.returnValue,s.readyState===WebSocket.OPEN)try{e=!0,s.close()}catch(c){console.error(c)}}),a=>c=>{if(c.remote){const f=JSON.stringify(c);if(s.readyState===1){if(n){const{type:d,...p}=c;console&&console.log("<-",d,p)}s.send(f)}else{if(n){const{type:d,...p}=c;console&&console.log("><",d,p)}i.push(f),s.readyState===3&&(s=window.ws=r())}}return a(c)}}function WB(t){return e=>n=>{const i=e(n);if(n.type===Lb){const{scrollback:r,activeFrame:s}=t.getState();r.forEach(({key:a,prompt:c,command:f,frame:d,watching:p})=>{(p==="all"||p==="frame"&&s===d)&&t.dispatch(YE(a,c,f,d))})}return i}}const Vu=IE(HB,{history:JSON.parse(localStorage.getItem("history")||"[]")},(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||HE)(pB(VB,WB)));function Cl(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(i=>n.searchParams.append("args[]",i)),`Minified MUI error #${t}; visit ${n} for the full message.`}const yr="$$material";function Wu(){return Wu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Wu.apply(null,arguments)}function XB(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function GB(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var iA=(function(){function t(n){var i=this;this._insertTag=function(r){var s;i.tags.length===0?i.insertionPoint?s=i.insertionPoint.nextSibling:i.prepend?s=i.container.firstChild:s=i.before:s=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,s),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(GB(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=XB(r);try{s.insertRule(i,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t})(),_n="-ms-",yp="-moz-",mt="-webkit-",rA="comm",_b="rule",qb="decl",FB="@import",oA="@keyframes",YB="@layer",KB=Math.abs,Jp=String.fromCharCode,ZB=Object.assign;function JB(t,e){return $n(t,0)^45?(((e<<2^$n(t,0))<<2^$n(t,1))<<2^$n(t,2))<<2^$n(t,3):0}function sA(t){return t.trim()}function e4(t,e){return(t=e.exec(t))?t[0]:t}function gt(t,e,n){return t.replace(e,n)}function mv(t,e){return t.indexOf(e)}function $n(t,e){return t.charCodeAt(e)|0}function Xu(t,e,n){return t.slice(e,n)}function Lr(t){return t.length}function Ub(t){return t.length}function nd(t,e){return e.push(t),t}function t4(t,e){return t.map(e).join("")}var em=1,Ua=1,lA=0,mi=0,fn=0,oc="";function tm(t,e,n,i,r,s,a){return{value:t,root:e,parent:n,type:i,props:r,children:s,line:em,column:Ua,length:a,return:""}}function au(t,e){return ZB(tm("",null,null,"",null,null,0),t,{length:-t.length},e)}function n4(){return fn}function i4(){return fn=mi>0?$n(oc,--mi):0,Ua--,fn===10&&(Ua=1,em--),fn}function Ri(){return fn=mi<lA?$n(oc,mi++):0,Ua++,fn===10&&(Ua=1,em++),fn}function Gr(){return $n(oc,mi)}function Gd(){return mi}function wf(t,e){return Xu(oc,t,e)}function Gu(t){switch(t){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 aA(t){return em=Ua=1,lA=Lr(oc=t),mi=0,[]}function cA(t){return oc="",t}function Fd(t){return sA(wf(mi-1,gv(t===91?t+2:t===40?t+1:t)))}function r4(t){for(;(fn=Gr())&&fn<33;)Ri();return Gu(t)>2||Gu(fn)>3?"":" "}function o4(t,e){for(;--e&&Ri()&&!(fn<48||fn>102||fn>57&&fn<65||fn>70&&fn<97););return wf(t,Gd()+(e<6&&Gr()==32&&Ri()==32))}function gv(t){for(;Ri();)switch(fn){case t:return mi;case 34:case 39:t!==34&&t!==39&&gv(fn);break;case 40:t===41&&gv(t);break;case 92:Ri();break}return mi}function s4(t,e){for(;Ri()&&t+fn!==57;)if(t+fn===84&&Gr()===47)break;return"/*"+wf(e,mi-1)+"*"+Jp(t===47?t:Ri())}function l4(t){for(;!Gu(Gr());)Ri();return wf(t,mi)}function a4(t){return cA(Yd("",null,null,null,[""],t=aA(t),0,[0],t))}function Yd(t,e,n,i,r,s,a,c,f){for(var d=0,p=0,m=a,v=0,b=0,O=0,x=1,C=1,k=1,$=0,z="",D=r,R=s,B=i,M=z;C;)switch(O=$,$=Ri()){case 40:if(O!=108&&$n(M,m-1)==58){mv(M+=gt(Fd($),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:M+=Fd($);break;case 9:case 10:case 13:case 32:M+=r4(O);break;case 92:M+=o4(Gd()-1,7);continue;case 47:switch(Gr()){case 42:case 47:nd(c4(s4(Ri(),Gd()),e,n),f);break;default:M+="/"}break;case 123*x:c[d++]=Lr(M)*k;case 125*x:case 59:case 0:switch($){case 0:case 125:C=0;case 59+p:k==-1&&(M=gt(M,/\f/g,"")),b>0&&Lr(M)-m&&nd(b>32?kC(M+";",i,n,m-1):kC(gt(M," ","")+";",i,n,m-2),f);break;case 59:M+=";";default:if(nd(B=TC(M,e,n,d,p,r,c,z,D=[],R=[],m),s),$===123)if(p===0)Yd(M,e,B,B,D,s,m,c,R);else switch(v===99&&$n(M,3)===110?100:v){case 100:case 108:case 109:case 115:Yd(t,B,B,i&&nd(TC(t,B,B,0,0,r,c,z,r,D=[],m),R),r,R,m,c,i?D:R);break;default:Yd(M,B,B,B,[""],R,0,c,R)}}d=p=b=0,x=k=1,z=M="",m=a;break;case 58:m=1+Lr(M),b=O;default:if(x<1){if($==123)--x;else if($==125&&x++==0&&i4()==125)continue}switch(M+=Jp($),$*x){case 38:k=p>0?1:(M+="\f",-1);break;case 44:c[d++]=(Lr(M)-1)*k,k=1;break;case 64:Gr()===45&&(M+=Fd(Ri())),v=Gr(),p=m=Lr(z=M+=l4(Gd())),$++;break;case 45:O===45&&Lr(M)==2&&(x=0)}}return s}function TC(t,e,n,i,r,s,a,c,f,d,p){for(var m=r-1,v=r===0?s:[""],b=Ub(v),O=0,x=0,C=0;O<i;++O)for(var k=0,$=Xu(t,m+1,m=KB(x=a[O])),z=t;k<b;++k)(z=sA(x>0?v[k]+" "+$:gt($,/&\f/g,v[k])))&&(f[C++]=z);return tm(t,e,n,r===0?_b:c,f,d,p)}function c4(t,e,n){return tm(t,e,n,rA,Jp(n4()),Xu(t,2,-2),0)}function kC(t,e,n,i){return tm(t,e,n,qb,Xu(t,0,i),Xu(t,i+1,-1),i)}function Pa(t,e){for(var n="",i=Ub(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function u4(t,e,n,i){switch(t.type){case YB:if(t.children.length)break;case FB:case qb:return t.return=t.return||t.value;case rA:return"";case oA:return t.return=t.value+"{"+Pa(t.children,i)+"}";case _b:t.value=t.props.join(",")}return Lr(n=Pa(t.children,i))?t.return=t.value+"{"+n+"}":""}function f4(t){var e=Ub(t);return function(n,i,r,s){for(var a="",c=0;c<e;c++)a+=t[c](n,i,r,s)||"";return a}}function h4(t){return function(e){e.root||(e=e.return)&&t(e)}}function uA(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var d4=function(e,n,i){for(var r=0,s=0;r=s,s=Gr(),r===38&&s===12&&(n[i]=1),!Gu(s);)Ri();return wf(e,mi)},p4=function(e,n){var i=-1,r=44;do switch(Gu(r)){case 0:r===38&&Gr()===12&&(n[i]=1),e[i]+=d4(mi-1,n,i);break;case 2:e[i]+=Fd(r);break;case 4:if(r===44){e[++i]=Gr()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=Jp(r)}while(r=Ri());return e},m4=function(e,n){return cA(p4(aA(e),n))},EC=new WeakMap,g4=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!EC.get(i))&&!r){EC.set(e,!0);for(var s=[],a=m4(n,s),c=i.props,f=0,d=0;f<a.length;f++)for(var p=0;p<c.length;p++,d++)e.props[d]=s[f]?a[f].replace(/&\f/g,c[p]):c[p]+" "+a[f]}}},y4=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function fA(t,e){switch(JB(t,e)){case 5103:return mt+"print-"+t+t;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 mt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return mt+t+yp+t+_n+t+t;case 6828:case 4268:return mt+t+_n+t+t;case 6165:return mt+t+_n+"flex-"+t+t;case 5187:return mt+t+gt(t,/(\w+).+(:[^]+)/,mt+"box-$1$2"+_n+"flex-$1$2")+t;case 5443:return mt+t+_n+"flex-item-"+gt(t,/flex-|-self/,"")+t;case 4675:return mt+t+_n+"flex-line-pack"+gt(t,/align-content|flex-|-self/,"")+t;case 5548:return mt+t+_n+gt(t,"shrink","negative")+t;case 5292:return mt+t+_n+gt(t,"basis","preferred-size")+t;case 6060:return mt+"box-"+gt(t,"-grow","")+mt+t+_n+gt(t,"grow","positive")+t;case 4554:return mt+gt(t,/([^-])(transform)/g,"$1"+mt+"$2")+t;case 6187:return gt(gt(gt(t,/(zoom-|grab)/,mt+"$1"),/(image-set)/,mt+"$1"),t,"")+t;case 5495:case 3959:return gt(t,/(image-set\([^]*)/,mt+"$1$`$1");case 4968:return gt(gt(t,/(.+:)(flex-)?(.*)/,mt+"box-pack:$3"+_n+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+mt+t+t;case 4095:case 3583:case 4068:case 2532:return gt(t,/(.+)-inline(.+)/,mt+"$1$2")+t;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(Lr(t)-1-e>6)switch($n(t,e+1)){case 109:if($n(t,e+4)!==45)break;case 102:return gt(t,/(.+:)(.+)-([^]+)/,"$1"+mt+"$2-$3$1"+yp+($n(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~mv(t,"stretch")?fA(gt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if($n(t,e+1)!==115)break;case 6444:switch($n(t,Lr(t)-3-(~mv(t,"!important")&&10))){case 107:return gt(t,":",":"+mt)+t;case 101:return gt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mt+($n(t,14)===45?"inline-":"")+"box$3$1"+mt+"$2$3$1"+_n+"$2box$3")+t}break;case 5936:switch($n(t,e+11)){case 114:return mt+t+_n+gt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return mt+t+_n+gt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return mt+t+_n+gt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return mt+t+_n+t+t}return t}var v4=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case qb:e.return=fA(e.value,e.length);break;case oA:return Pa([au(e,{value:gt(e.value,"@","@"+mt)})],r);case _b:if(e.length)return t4(e.props,function(s){switch(e4(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pa([au(e,{props:[gt(s,/:(read-\w+)/,":"+yp+"$1")]})],r);case"::placeholder":return Pa([au(e,{props:[gt(s,/:(plac\w+)/,":"+mt+"input-$1")]}),au(e,{props:[gt(s,/:(plac\w+)/,":"+yp+"$1")]}),au(e,{props:[gt(s,/:(plac\w+)/,_n+"input-$1")]})],r)}return""})}},b4=[v4],hA=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(x){var C=x.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var r=e.stylisPlugins||b4,s={},a,c=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var C=x.getAttribute("data-emotion").split(" "),k=1;k<C.length;k++)s[C[k]]=!0;c.push(x)});var f,d=[g4,y4];{var p,m=[u4,h4(function(x){p.insert(x)})],v=f4(d.concat(r,m)),b=function(C){return Pa(a4(C),v)};f=function(C,k,$,z){p=$,b(C?C+"{"+k.styles+"}":k.styles),z&&(O.inserted[k.name]=!0)}}var O={key:n,sheet:new iA({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:f};return O.sheet.hydrate(c),O},ny={exports:{}},vt={};/** @license React v16.13.1
|
|
58
|
-
* react-is.production.min.js
|
|
59
|
-
*
|
|
60
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
61
|
-
*
|
|
62
|
-
* This source code is licensed under the MIT license found in the
|
|
63
|
-
* LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/var AC;function O4(){if(AC)return vt;AC=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,f=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,m=t?Symbol.for("react.suspense"):60113,v=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,O=t?Symbol.for("react.lazy"):60116,x=t?Symbol.for("react.block"):60121,C=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,$=t?Symbol.for("react.scope"):60119;function z(R){if(typeof R=="object"&&R!==null){var B=R.$$typeof;switch(B){case e:switch(R=R.type,R){case f:case d:case i:case s:case r:case m:return R;default:switch(R=R&&R.$$typeof,R){case c:case p:case O:case b:case a:return R;default:return B}}case n:return B}}}function D(R){return z(R)===d}return vt.AsyncMode=f,vt.ConcurrentMode=d,vt.ContextConsumer=c,vt.ContextProvider=a,vt.Element=e,vt.ForwardRef=p,vt.Fragment=i,vt.Lazy=O,vt.Memo=b,vt.Portal=n,vt.Profiler=s,vt.StrictMode=r,vt.Suspense=m,vt.isAsyncMode=function(R){return D(R)||z(R)===f},vt.isConcurrentMode=D,vt.isContextConsumer=function(R){return z(R)===c},vt.isContextProvider=function(R){return z(R)===a},vt.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===e},vt.isForwardRef=function(R){return z(R)===p},vt.isFragment=function(R){return z(R)===i},vt.isLazy=function(R){return z(R)===O},vt.isMemo=function(R){return z(R)===b},vt.isPortal=function(R){return z(R)===n},vt.isProfiler=function(R){return z(R)===s},vt.isStrictMode=function(R){return z(R)===r},vt.isSuspense=function(R){return z(R)===m},vt.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===i||R===d||R===s||R===r||R===m||R===v||typeof R=="object"&&R!==null&&(R.$$typeof===O||R.$$typeof===b||R.$$typeof===a||R.$$typeof===c||R.$$typeof===p||R.$$typeof===C||R.$$typeof===k||R.$$typeof===$||R.$$typeof===x)},vt.typeOf=z,vt}var RC;function S4(){return RC||(RC=1,ny.exports=O4()),ny.exports}var iy,MC;function x4(){if(MC)return iy;MC=1;var t=S4(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[t.ForwardRef]=i,s[t.Memo]=r;function a(O){return t.isMemo(O)?r:s[O.$$typeof]||e}var c=Object.defineProperty,f=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,v=Object.prototype;function b(O,x,C){if(typeof x!="string"){if(v){var k=m(x);k&&k!==v&&b(O,k,C)}var $=f(x);d&&($=$.concat(d(x)));for(var z=a(O),D=a(x),R=0;R<$.length;++R){var B=$[R];if(!n[B]&&!(C&&C[B])&&!(D&&D[B])&&!(z&&z[B])){var M=p(x,B);try{c(O,B,M)}catch{}}}}return O}return iy=b,iy}x4();var w4=!0;function dA(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var Ib=function(e,n,i){var r=e.key+"-"+n.name;(i===!1||w4===!1)&&e.registered[r]===void 0&&(e.registered[r]=n.styles)},Hb=function(e,n,i){Ib(e,n,i);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function C4(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var T4={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},k4=/[A-Z]|^ms/g,E4=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pA=function(e){return e.charCodeAt(1)===45},DC=function(e){return e!=null&&typeof e!="boolean"},ry=uA(function(t){return pA(t)?t:t.replace(k4,"-$&").toLowerCase()}),PC=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(E4,function(i,r,s){return Nr={name:r,styles:s,next:Nr},r})}return T4[e]!==1&&!pA(e)&&typeof n=="number"&&n!==0?n+"px":n};function Fu(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Nr={name:r.name,styles:r.styles,next:Nr},r.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Nr={name:a.name,styles:a.styles,next:Nr},a=a.next;var c=s.styles+";";return c}return A4(t,e,n)}case"function":{if(t!==void 0){var f=Nr,d=n(t);return Nr=f,Fu(t,e,d)}break}}var p=n;if(e==null)return p;var m=e[p];return m!==void 0?m:p}function A4(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=Fu(t,e,n[r])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var c=a;e!=null&&e[c]!==void 0?i+=s+"{"+e[c]+"}":DC(c)&&(i+=ry(s)+":"+PC(s,c)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var f=0;f<a.length;f++)DC(a[f])&&(i+=ry(s)+":"+PC(s,a[f])+";");else{var d=Fu(t,e,a);switch(s){case"animation":case"animationName":{i+=ry(s)+":"+d+";";break}default:i+=s+"{"+d+"}"}}}return i}var zC=/label:\s*([^\s;{]+)\s*(;|$)/g,Nr;function Cf(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";Nr=void 0;var s=t[0];if(s==null||s.raw===void 0)i=!1,r+=Fu(n,e,s);else{var a=s;r+=a[0]}for(var c=1;c<t.length;c++)if(r+=Fu(n,e,t[c]),i){var f=s;r+=f[c]}zC.lastIndex=0;for(var d="",p;(p=zC.exec(r))!==null;)d+="-"+p[1];var m=C4(r)+d;return{name:m,styles:r,next:Nr}}var R4=function(e){return e()},mA=mp.useInsertionEffect?mp.useInsertionEffect:!1,gA=mA||R4,$C=mA||E.useLayoutEffect,yA=E.createContext(typeof HTMLElement<"u"?hA({key:"css"}):null),M4=yA.Provider,Vb=function(e){return E.forwardRef(function(n,i){var r=E.useContext(yA);return e(n,r,i)})},Tf=E.createContext({}),Wb={}.hasOwnProperty,yv="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",D4=function(e,n){var i={};for(var r in n)Wb.call(n,r)&&(i[r]=n[r]);return i[yv]=e,i},P4=function(e){var n=e.cache,i=e.serialized,r=e.isStringTag;return Ib(n,i,r),gA(function(){return Hb(n,i,r)}),null},z4=Vb(function(t,e,n){var i=t.css;typeof i=="string"&&e.registered[i]!==void 0&&(i=e.registered[i]);var r=t[yv],s=[i],a="";typeof t.className=="string"?a=dA(e.registered,s,t.className):t.className!=null&&(a=t.className+" ");var c=Cf(s,void 0,E.useContext(Tf));a+=e.key+"-"+c.name;var f={};for(var d in t)Wb.call(t,d)&&d!=="css"&&d!==yv&&(f[d]=t[d]);return f.className=a,n&&(f.ref=n),E.createElement(E.Fragment,null,E.createElement(P4,{cache:e,serialized:c,isStringTag:typeof r=="string"}),E.createElement(r,f))}),$4=z4,BC=function(e,n){var i=arguments;if(n==null||!Wb.call(n,"css"))return E.createElement.apply(void 0,i);var r=i.length,s=new Array(r);s[0]=$4,s[1]=D4(e,n);for(var a=2;a<r;a++)s[a]=i[a];return E.createElement.apply(null,s)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(BC||(BC={}));var B4=Vb(function(t,e){var n=t.styles,i=Cf([n],void 0,E.useContext(Tf)),r=E.useRef();return $C(function(){var s=e.key+"-global",a=new e.sheet.constructor({key:s,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),c=!1,f=document.querySelector('style[data-emotion="'+s+" "+i.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),f!==null&&(c=!0,f.setAttribute("data-emotion",s),a.hydrate([f])),r.current=[a,c],function(){a.flush()}},[e]),$C(function(){var s=r.current,a=s[0],c=s[1];if(c){s[1]=!1;return}if(i.next!==void 0&&Hb(e,i.next,!0),a.tags.length){var f=a.tags[a.tags.length-1].nextElementSibling;a.before=f,a.flush()}e.insert("",i,a,!1)},[e,i.name]),null});function Xb(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cf(e)}function kf(){var t=Xb.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var j4=/^((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)-.*))$/,Q4=uA(function(t){return j4.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),L4=Q4,N4=function(e){return e!=="theme"},jC=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?L4:N4},QC=function(e,n,i){var r;if(n){var s=n.shouldForwardProp;r=e.__emotion_forwardProp&&s?function(a){return e.__emotion_forwardProp(a)&&s(a)}:s}return typeof r!="function"&&i&&(r=e.__emotion_forwardProp),r},_4=function(e){var n=e.cache,i=e.serialized,r=e.isStringTag;return Ib(n,i,r),gA(function(){return Hb(n,i,r)}),null},q4=function t(e,n){var i=e.__emotion_real===e,r=i&&e.__emotion_base||e,s,a;n!==void 0&&(s=n.label,a=n.target);var c=QC(e,n,i),f=c||jC(r),d=!f("as");return function(){var p=arguments,m=i&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&m.push("label:"+s+";"),p[0]==null||p[0].raw===void 0)m.push.apply(m,p);else{var v=p[0];m.push(v[0]);for(var b=p.length,O=1;O<b;O++)m.push(p[O],v[O])}var x=Vb(function(C,k,$){var z=d&&C.as||r,D="",R=[],B=C;if(C.theme==null){B={};for(var M in C)B[M]=C[M];B.theme=E.useContext(Tf)}typeof C.className=="string"?D=dA(k.registered,R,C.className):C.className!=null&&(D=C.className+" ");var j=Cf(m.concat(R),k.registered,B);D+=k.key+"-"+j.name,a!==void 0&&(D+=" "+a);var N=d&&c===void 0?jC(z):f,A={};for(var Q in C)d&&Q==="as"||N(Q)&&(A[Q]=C[Q]);return A.className=D,$&&(A.ref=$),E.createElement(E.Fragment,null,E.createElement(_4,{cache:k,serialized:j,isStringTag:typeof z=="string"}),E.createElement(z,A))});return x.displayName=s!==void 0?s:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",x.defaultProps=e.defaultProps,x.__emotion_real=x,x.__emotion_base=r,x.__emotion_styles=m,x.__emotion_forwardProp=c,Object.defineProperty(x,"toString",{value:function(){return"."+a}}),x.withComponent=function(C,k){var $=t(C,Wu({},n,k,{shouldForwardProp:QC(x,k,!0)}));return $.apply(void 0,m)},x}},U4=["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"],vv=q4.bind(null);U4.forEach(function(t){vv[t]=vv(t)});var oy={exports:{}},sy,LC;function I4(){if(LC)return sy;LC=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return sy=t,sy}var ly,NC;function H4(){if(NC)return ly;NC=1;var t=I4();function e(){}function n(){}return n.resetWarningCache=e,ly=function(){function i(a,c,f,d,p,m){if(m!==t){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}i.isRequired=i;function r(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},ly}var _C;function V4(){return _C||(_C=1,oy.exports=H4()()),oy.exports}const ay=new Map,W4=(t,e)=>{const n=hA(t);return n.sheet=new e({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n};let gs;if(typeof document=="object"&&(gs=document.querySelector('[name="emotion-insertion-point"]'),!gs)){gs=document.createElement("meta"),gs.setAttribute("name","emotion-insertion-point"),gs.setAttribute("content","");const t=document.querySelector("head");t&&t.prepend(gs)}function X4(t,e){if(t||e){class n extends iA{insert(s,a){return this.key&&this.key.endsWith("global")&&(this.before=gs),super.insert(s,a)}}const i=W4({key:"css",insertionPoint:t?gs:void 0},n);if(e){const r=i.insert;i.insert=(...s)=>(s[1].styles.match(/^@layer\s+[^{]*$/)||(s[1].styles=`@layer mui {${s[1].styles}}`),r(...s))}return i}}function G4(t){const{injectFirst:e,enableCssLayer:n,children:i}=t,r=E.useMemo(()=>{const s=`${e}-${n}`;if(typeof document=="object"&&ay.has(s))return ay.get(s);const a=X4(e,n);return ay.set(s,a),a},[e,n]);return r?S.jsx(M4,{value:r,children:i}):i}function F4(t){return t==null||Object.keys(t).length===0}function vA(t){const{styles:e,defaultTheme:n={}}=t,i=typeof e=="function"?r=>e(F4(r)?n:r):e;return S.jsx(B4,{styles:i})}function bA(t,e){return vv(t,e)}function Y4(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const qC=[];function Ts(t){return qC[0]=t,Cf(qC)}var cy={exports:{}},kt={};/**
|
|
65
|
-
* @license React
|
|
66
|
-
* react-is.production.js
|
|
67
|
-
*
|
|
68
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the MIT license found in the
|
|
71
|
-
* LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var UC;function K4(){if(UC)return kt;UC=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function O(x){if(typeof x=="object"&&x!==null){var C=x.$$typeof;switch(C){case t:switch(x=x.type,x){case n:case r:case i:case f:case d:case v:return x;default:switch(x=x&&x.$$typeof,x){case a:case c:case m:case p:return x;case s:return x;default:return C}}case e:return C}}}return kt.ContextConsumer=s,kt.ContextProvider=a,kt.Element=t,kt.ForwardRef=c,kt.Fragment=n,kt.Lazy=m,kt.Memo=p,kt.Portal=e,kt.Profiler=r,kt.StrictMode=i,kt.Suspense=f,kt.SuspenseList=d,kt.isContextConsumer=function(x){return O(x)===s},kt.isContextProvider=function(x){return O(x)===a},kt.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},kt.isForwardRef=function(x){return O(x)===c},kt.isFragment=function(x){return O(x)===n},kt.isLazy=function(x){return O(x)===m},kt.isMemo=function(x){return O(x)===p},kt.isPortal=function(x){return O(x)===e},kt.isProfiler=function(x){return O(x)===r},kt.isStrictMode=function(x){return O(x)===i},kt.isSuspense=function(x){return O(x)===f},kt.isSuspenseList=function(x){return O(x)===d},kt.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===r||x===i||x===f||x===d||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===p||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===b||x.getModuleId!==void 0)},kt.typeOf=O,kt}var IC;function Z4(){return IC||(IC=1,cy.exports=K4()),cy.exports}var OA=Z4();function qr(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function SA(t){if(E.isValidElement(t)||OA.isValidElementType(t)||!qr(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=SA(t[n])}),e}function Mi(t,e,n={clone:!0}){const i=n.clone?{...t}:t;return qr(t)&&qr(e)&&Object.keys(e).forEach(r=>{E.isValidElement(e[r])||OA.isValidElementType(e[r])?i[r]=e[r]:qr(e[r])&&Object.prototype.hasOwnProperty.call(t,r)&&qr(t[r])?i[r]=Mi(t[r],e[r],n):n.clone?i[r]=qr(e[r])?SA(e[r]):e[r]:i[r]=e[r]}),i}const J4=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,i)=>n.val-i.val),e.reduce((n,i)=>({...n,[i.key]:i.val}),{})};function e3(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:i=5,...r}=t,s=J4(e),a=Object.keys(s);function c(v){return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${n})`}function f(v){return`@media (max-width:${(typeof e[v]=="number"?e[v]:v)-i/100}${n})`}function d(v,b){const O=a.indexOf(b);return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${n}) and (max-width:${(O!==-1&&typeof e[a[O]]=="number"?e[a[O]]:b)-i/100}${n})`}function p(v){return a.indexOf(v)+1<a.length?d(v,a[a.indexOf(v)+1]):c(v)}function m(v){const b=a.indexOf(v);return b===0?c(a[1]):b===a.length-1?f(a[b]):d(v,a[a.indexOf(v)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:c,down:f,between:d,only:p,not:m,unit:n,...r}}function HC(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(i=>i.startsWith("@container")).sort((i,r)=>{const s=/min-width:\s*([0-9.]+)/;return+(i.match(s)?.[1]||0)-+(r.match(s)?.[1]||0)});return n.length?n.reduce((i,r)=>{const s=e[r];return delete i[r],i[r]=s,i},{...e}):e}function t3(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function n3(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,i,r]=n,s=Number.isNaN(+i)?i||0:+i;return t.containerQueries(r).up(s)}function i3(t){const e=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...c)=>e(t.breakpoints.up(...c),a),s.down=(...c)=>e(t.breakpoints.down(...c),a),s.between=(...c)=>e(t.breakpoints.between(...c),a),s.only=(...c)=>e(t.breakpoints.only(...c),a),s.not=(...c)=>{const f=e(t.breakpoints.not(...c),a);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const i={},r=s=>(n(i,s),i);return n(r),{...t,containerQueries:r}}const r3={borderRadius:4};function $u(t,e){return e?Mi(t,e,{clone:!1}):t}const nm={xs:0,sm:600,md:900,lg:1200,xl:1536},VC={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${nm[t]}px)`},o3={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:nm[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function jo(t,e,n){const i=t.theme||{};if(Array.isArray(e)){const s=i.breakpoints||VC;return e.reduce((a,c,f)=>(a[s.up(s.keys[f])]=n(e[f]),a),{})}if(typeof e=="object"){const s=i.breakpoints||VC;return Object.keys(e).reduce((a,c)=>{if(t3(s.keys,c)){const f=n3(i.containerQueries?i:o3,c);f&&(a[f]=n(e[c],c))}else if(Object.keys(s.values||nm).includes(c)){const f=s.up(c);a[f]=n(e[c],c)}else{const f=c;a[f]=e[f]}return a},{})}return n(e)}function s3(t={}){return t.keys?.reduce((n,i)=>{const r=t.up(i);return n[r]={},n},{})||{}}function WC(t,e){return t.reduce((n,i)=>{const r=n[i];return(!r||Object.keys(r).length===0)&&delete n[i],n},e)}function pe(t){if(typeof t!="string")throw new Error(Cl(7));return t.charAt(0).toUpperCase()+t.slice(1)}function _r(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const i=`vars.${e}`.split(".").reduce((r,s)=>r&&r[s]?r[s]:null,t);if(i!=null)return i}return e.split(".").reduce((i,r)=>i&&i[r]!=null?i[r]:null,t)}function vp(t,e,n,i=n){let r;return typeof t=="function"?r=t(n):Array.isArray(t)?r=t[n]||i:r=_r(t,n)||i,e&&(r=e(r,i,t)),r}function rn(t){const{prop:e,cssProperty:n=t.prop,themeKey:i,transform:r}=t,s=a=>{if(a[e]==null)return null;const c=a[e],f=a.theme,d=_r(f,i)||{};return jo(a,c,m=>{let v=vp(d,r,m);return m===v&&typeof m=="string"&&(v=vp(d,r,`${e}${m==="default"?"":pe(m)}`,m)),n===!1?v:{[n]:v}})};return s.propTypes={},s.filterProps=[e],s}function l3(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const a3={m:"margin",p:"padding"},c3={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},XC={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u3=l3(t=>{if(t.length>2)if(XC[t])t=XC[t];else return[t];const[e,n]=t.split(""),i=a3[e],r=c3[n]||"";return Array.isArray(r)?r.map(s=>i+s):[i+r]}),Gb=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Fb=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Gb,...Fb];function Ef(t,e,n,i){const r=_r(t,e,!0)??n;return typeof r=="number"||typeof r=="string"?s=>typeof s=="string"?s:typeof r=="string"?r.startsWith("var(")&&s===0?0:r.startsWith("var(")&&s===1?r:`calc(${s} * ${r})`:r*s:Array.isArray(r)?s=>{if(typeof s=="string")return s;const a=Math.abs(s),c=r[a];return s>=0?c:typeof c=="number"?-c:typeof c=="string"&&c.startsWith("var(")?`calc(-1 * ${c})`:`-${c}`}:typeof r=="function"?r:()=>{}}function Yb(t){return Ef(t,"spacing",8)}function Af(t,e){return typeof e=="string"||e==null?e:t(e)}function f3(t,e){return n=>t.reduce((i,r)=>(i[r]=Af(e,n),i),{})}function h3(t,e,n,i){if(!e.includes(n))return null;const r=u3(n),s=f3(r,i),a=t[n];return jo(t,a,s)}function xA(t,e){const n=Yb(t.theme);return Object.keys(t).map(i=>h3(t,e,i,n)).reduce($u,{})}function Ft(t){return xA(t,Gb)}Ft.propTypes={};Ft.filterProps=Gb;function Yt(t){return xA(t,Fb)}Yt.propTypes={};Yt.filterProps=Fb;function wA(t=8,e=Yb({spacing:t})){if(t.mui)return t;const n=(...i)=>(i.length===0?[1]:i).map(s=>{const a=e(s);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function im(...t){const e=t.reduce((i,r)=>(r.filterProps.forEach(s=>{i[s]=r}),i),{}),n=i=>Object.keys(i).reduce((r,s)=>e[s]?$u(r,e[s](i)):r,{});return n.propTypes={},n.filterProps=t.reduce((i,r)=>i.concat(r.filterProps),[]),n}function Gi(t){return typeof t!="number"?t:`${t}px solid`}function sr(t,e){return rn({prop:t,themeKey:"borders",transform:e})}const d3=sr("border",Gi),p3=sr("borderTop",Gi),m3=sr("borderRight",Gi),g3=sr("borderBottom",Gi),y3=sr("borderLeft",Gi),v3=sr("borderColor"),b3=sr("borderTopColor"),O3=sr("borderRightColor"),S3=sr("borderBottomColor"),x3=sr("borderLeftColor"),w3=sr("outline",Gi),C3=sr("outlineColor"),rm=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Ef(t.theme,"shape.borderRadius",4),n=i=>({borderRadius:Af(e,i)});return jo(t,t.borderRadius,n)}return null};rm.propTypes={};rm.filterProps=["borderRadius"];im(d3,p3,m3,g3,y3,v3,b3,O3,S3,x3,rm,w3,C3);const om=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Ef(t.theme,"spacing",8),n=i=>({gap:Af(e,i)});return jo(t,t.gap,n)}return null};om.propTypes={};om.filterProps=["gap"];const sm=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Ef(t.theme,"spacing",8),n=i=>({columnGap:Af(e,i)});return jo(t,t.columnGap,n)}return null};sm.propTypes={};sm.filterProps=["columnGap"];const lm=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Ef(t.theme,"spacing",8),n=i=>({rowGap:Af(e,i)});return jo(t,t.rowGap,n)}return null};lm.propTypes={};lm.filterProps=["rowGap"];const T3=rn({prop:"gridColumn"}),k3=rn({prop:"gridRow"}),E3=rn({prop:"gridAutoFlow"}),A3=rn({prop:"gridAutoColumns"}),R3=rn({prop:"gridAutoRows"}),M3=rn({prop:"gridTemplateColumns"}),D3=rn({prop:"gridTemplateRows"}),P3=rn({prop:"gridTemplateAreas"}),z3=rn({prop:"gridArea"});im(om,sm,lm,T3,k3,E3,A3,R3,M3,D3,P3,z3);function za(t,e){return e==="grey"?e:t}const $3=rn({prop:"color",themeKey:"palette",transform:za}),B3=rn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:za}),j3=rn({prop:"backgroundColor",themeKey:"palette",transform:za});im($3,B3,j3);function ki(t){return t<=1&&t!==0?`${t*100}%`:t}const Q3=rn({prop:"width",transform:ki}),Kb=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{const i=t.theme?.breakpoints?.values?.[n]||nm[n];return i?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:ki(n)}};return jo(t,t.maxWidth,e)}return null};Kb.filterProps=["maxWidth"];const L3=rn({prop:"minWidth",transform:ki}),N3=rn({prop:"height",transform:ki}),_3=rn({prop:"maxHeight",transform:ki}),q3=rn({prop:"minHeight",transform:ki});rn({prop:"size",cssProperty:"width",transform:ki});rn({prop:"size",cssProperty:"height",transform:ki});const U3=rn({prop:"boxSizing"});im(Q3,Kb,L3,N3,_3,q3,U3);const Rf={border:{themeKey:"borders",transform:Gi},borderTop:{themeKey:"borders",transform:Gi},borderRight:{themeKey:"borders",transform:Gi},borderBottom:{themeKey:"borders",transform:Gi},borderLeft:{themeKey:"borders",transform:Gi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Gi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:rm},color:{themeKey:"palette",transform:za},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:za},backgroundColor:{themeKey:"palette",transform:za},p:{style:Yt},pt:{style:Yt},pr:{style:Yt},pb:{style:Yt},pl:{style:Yt},px:{style:Yt},py:{style:Yt},padding:{style:Yt},paddingTop:{style:Yt},paddingRight:{style:Yt},paddingBottom:{style:Yt},paddingLeft:{style:Yt},paddingX:{style:Yt},paddingY:{style:Yt},paddingInline:{style:Yt},paddingInlineStart:{style:Yt},paddingInlineEnd:{style:Yt},paddingBlock:{style:Yt},paddingBlockStart:{style:Yt},paddingBlockEnd:{style:Yt},m:{style:Ft},mt:{style:Ft},mr:{style:Ft},mb:{style:Ft},ml:{style:Ft},mx:{style:Ft},my:{style:Ft},margin:{style:Ft},marginTop:{style:Ft},marginRight:{style:Ft},marginBottom:{style:Ft},marginLeft:{style:Ft},marginX:{style:Ft},marginY:{style:Ft},marginInline:{style:Ft},marginInlineStart:{style:Ft},marginInlineEnd:{style:Ft},marginBlock:{style:Ft},marginBlockStart:{style:Ft},marginBlockEnd:{style:Ft},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:om},rowGap:{style:lm},columnGap:{style:sm},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ki},maxWidth:{style:Kb},minWidth:{transform:ki},height:{transform:ki},maxHeight:{transform:ki},minHeight:{transform:ki},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"}};function I3(...t){const e=t.reduce((i,r)=>i.concat(Object.keys(r)),[]),n=new Set(e);return t.every(i=>n.size===Object.keys(i).length)}function H3(t,e){return typeof t=="function"?t(e):t}function V3(){function t(n,i,r,s){const a={[n]:i,theme:r},c=s[n];if(!c)return{[n]:i};const{cssProperty:f=n,themeKey:d,transform:p,style:m}=c;if(i==null)return null;if(d==="typography"&&i==="inherit")return{[n]:i};const v=_r(r,d)||{};return m?m(a):jo(a,i,O=>{let x=vp(v,p,O);return O===x&&typeof O=="string"&&(x=vp(v,p,`${n}${O==="default"?"":pe(O)}`,O)),f===!1?x:{[f]:x}})}function e(n){const{sx:i,theme:r={},nested:s}=n||{};if(!i)return null;const a=r.unstable_sxConfig??Rf;function c(f){let d=f;if(typeof f=="function")d=f(r);else if(typeof f!="object")return f;if(!d)return null;const p=s3(r.breakpoints),m=Object.keys(p);let v=p;return Object.keys(d).forEach(b=>{const O=H3(d[b],r);if(O!=null)if(typeof O=="object")if(a[b])v=$u(v,t(b,O,r,a));else{const x=jo({theme:r},O,C=>({[b]:C}));I3(x,O)?v[b]=e({sx:O,theme:r,nested:!0}):v=$u(v,x)}else v=$u(v,t(b,O,r,a))}),!s&&r.modularCssLayers?{"@layer sx":HC(r,WC(m,v))}:HC(r,WC(m,v))}return Array.isArray(i)?i.map(c):c(i)}return e}const As=V3();As.filterProps=["sx"];function W3(t,e){const n=this;if(n.vars){if(!n.colorSchemes?.[t]||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(t);return i==="&"?e:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:e})}return n.palette.mode===t?e:{}}function am(t={},...e){const{breakpoints:n={},palette:i={},spacing:r,shape:s={},...a}=t,c=e3(n),f=wA(r);let d=Mi({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...i},spacing:f,shape:{...r3,...s}},a);return d=i3(d),d.applyStyles=W3,d=e.reduce((p,m)=>Mi(p,m),d),d.unstable_sxConfig={...Rf,...a?.unstable_sxConfig},d.unstable_sx=function(m){return As({sx:m,theme:this})},d}function X3(t){return Object.keys(t).length===0}function cm(t=null){const e=E.useContext(Tf);return!e||X3(e)?t:e}const G3=am();function Mf(t=G3){return cm(t)}function uy(t){const e=Ts(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function CA({styles:t,themeId:e,defaultTheme:n={}}){const i=Mf(n),r=e&&i[e]||i;let s=typeof t=="function"?t(r):t;return r.modularCssLayers&&(Array.isArray(s)?s=s.map(a=>uy(typeof a=="function"?a(r):a)):s=uy(s)),S.jsx(vA,{styles:s})}const F3=t=>{const e={systemProps:{},otherProps:{}},n=t?.theme?.unstable_sxConfig??Rf;return Object.keys(t).forEach(i=>{n[i]?e.systemProps[i]=t[i]:e.otherProps[i]=t[i]}),e};function Zb(t){const{sx:e,...n}=t,{systemProps:i,otherProps:r}=F3(n);let s;return Array.isArray(e)?s=[i,...e]:typeof e=="function"?s=(...a)=>{const c=e(...a);return qr(c)?{...i,...c}:i}:s={...i,...e},{...r,sx:s}}const GC=t=>t,Y3=()=>{let t=GC;return{configure(e){t=e},generate(e){return t(e)},reset(){t=GC}}},TA=Y3();function kA(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=kA(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ye(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=kA(t))&&(i&&(i+=" "),i+=e);return i}function K3(t={}){const{themeId:e,defaultTheme:n,defaultClassName:i="MuiBox-root",generateClassName:r}=t,s=bA("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(As);return E.forwardRef(function(f,d){const p=Mf(n),{className:m,component:v="div",...b}=Zb(f);return S.jsx(s,{as:v,ref:d,className:ye(m,r?r(i):i),theme:e&&p[e]||p,...b})})}const Z3={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 Qe(t,e,n="Mui"){const i=Z3[e];return i?`${n}-${i}`:`${TA.generate(t)}-${e}`}function Le(t,e,n="Mui"){const i={};return e.forEach(r=>{i[r]=Qe(t,r,n)}),i}function EA(t){const{variants:e,...n}=t,i={variants:e,style:Ts(n),isProcessed:!0};return i.style===n||e&&e.forEach(r=>{typeof r.style!="function"&&(r.style=Ts(r.style))}),i}const J3=am();function fy(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function ml(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function ej(t){return t?(e,n)=>n[t]:null}function tj(t,e,n){t.theme=ij(t.theme)?n:t.theme[e]||t.theme}function Kd(t,e,n){const i=typeof e=="function"?e(t):e;if(Array.isArray(i))return i.flatMap(r=>Kd(t,r,n));if(Array.isArray(i?.variants)){let r;if(i.isProcessed)r=n?ml(i.style,n):i.style;else{const{variants:s,...a}=i;r=n?ml(Ts(a),n):a}return AA(t,i.variants,[r],n)}return i?.isProcessed?n?ml(Ts(i.style),n):i.style:n?ml(Ts(i),n):i}function AA(t,e,n=[],i=void 0){let r;e:for(let s=0;s<e.length;s+=1){const a=e[s];if(typeof a.props=="function"){if(r??={...t,...t.ownerState,ownerState:t.ownerState},!a.props(r))continue}else for(const c in a.props)if(t[c]!==a.props[c]&&t.ownerState?.[c]!==a.props[c])continue e;typeof a.style=="function"?(r??={...t,...t.ownerState,ownerState:t.ownerState},n.push(i?ml(Ts(a.style(r)),i):a.style(r))):n.push(i?ml(Ts(a.style),i):a.style)}return n}function RA(t={}){const{themeId:e,defaultTheme:n=J3,rootShouldForwardProp:i=fy,slotShouldForwardProp:r=fy}=t;function s(c){tj(c,e,n)}return(c,f={})=>{Y4(c,B=>B.filter(M=>M!==As));const{name:d,slot:p,skipVariantsResolver:m,skipSx:v,overridesResolver:b=ej(oj(p)),...O}=f,x=d&&d.startsWith("Mui")||p?"components":"custom",C=m!==void 0?m:p&&p!=="Root"&&p!=="root"||!1,k=v||!1;let $=fy;p==="Root"||p==="root"?$=i:p?$=r:rj(c)&&($=void 0);const z=bA(c,{shouldForwardProp:$,label:nj(),...O}),D=B=>{if(B.__emotion_real===B)return B;if(typeof B=="function")return function(j){return Kd(j,B,j.theme.modularCssLayers?x:void 0)};if(qr(B)){const M=EA(B);return function(N){return M.variants?Kd(N,M,N.theme.modularCssLayers?x:void 0):N.theme.modularCssLayers?ml(M.style,x):M.style}}return B},R=(...B)=>{const M=[],j=B.map(D),N=[];if(M.push(s),d&&b&&N.push(function(U){const V=U.theme.components?.[d]?.styleOverrides;if(!V)return null;const L={};for(const X in V)L[X]=Kd(U,V[X],U.theme.modularCssLayers?"theme":void 0);return b(U,L)}),d&&!C&&N.push(function(U){const V=U.theme?.components?.[d]?.variants;return V?AA(U,V,[],U.theme.modularCssLayers?"theme":void 0):null}),k||N.push(As),Array.isArray(j[0])){const T=j.shift(),U=new Array(M.length).fill(""),q=new Array(N.length).fill("");let V;V=[...U,...T,...q],V.raw=[...U,...T.raw,...q],M.unshift(V)}const A=[...M,...j,...N],Q=z(...A);return c.muiName&&(Q.muiName=c.muiName),Q};return z.withConfig&&(R.withConfig=z.withConfig),R}}function nj(t,e){return void 0}function ij(t){for(const e in t)return!1;return!0}function rj(t){return typeof t=="string"&&t.charCodeAt(0)>96}function oj(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const sj=RA();function Yu(t,e,n=!1){const i={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=r;if(s==="components"||s==="slots")i[s]={...t[s],...i[s]};else if(s==="componentsProps"||s==="slotProps"){const a=t[s],c=e[s];if(!c)i[s]=a||{};else if(!a)i[s]=c;else{i[s]={...c};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const d=f;i[s][d]=Yu(a[d],c[d],n)}}}else s==="className"&&n&&e.className?i.className=ye(t?.className,e?.className):s==="style"&&n&&e.style?i.style={...t?.style,...e?.style}:i[s]===void 0&&(i[s]=t[s])}return i}function MA(t){const{theme:e,name:n,props:i}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?i:Yu(e.components[n].defaultProps,i)}function lj({props:t,name:e,defaultTheme:n,themeId:i}){let r=Mf(n);return i&&(r=r[i]||r),MA({theme:r,name:e,props:t})}const nr=typeof window<"u"?E.useLayoutEffect:E.useEffect;function aj(t,e,n,i,r){const[s,a]=E.useState(()=>r&&n?n(t).matches:i?i(t).matches:e);return nr(()=>{if(!n)return;const c=n(t),f=()=>{a(c.matches)};return f(),c.addEventListener("change",f),()=>{c.removeEventListener("change",f)}},[t,n]),s}const cj={...mp},DA=cj.useSyncExternalStore;function uj(t,e,n,i,r){const s=E.useCallback(()=>e,[e]),a=E.useMemo(()=>{if(r&&n)return()=>n(t).matches;if(i!==null){const{matches:p}=i(t);return()=>p}return s},[s,t,i,r,n]),[c,f]=E.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const p=n(t);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[s,n,t]);return DA(f,c,a)}function PA(t={}){const{themeId:e}=t;return function(i,r={}){let s=cm();s&&e&&(s=s[e]||s);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:f=a?window.matchMedia:null,ssrMatchMedia:d=null,noSsr:p=!1}=MA({name:"MuiUseMediaQuery",props:r,theme:s});let m=typeof i=="function"?i(s):i;return m=m.replace(/^@media( ?)/m,""),m.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
73
|
-
`)),(DA!==void 0?uj:aj)(m,c,f,d,p)}}PA();function fj(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function Jb(t,e=0,n=1){return fj(t,e,n)}function hj(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(i=>i+i)),n?`rgb${n.length===4?"a":""}(${n.map((i,r)=>r<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Rs(t){if(t.type)return t;if(t.charAt(0)==="#")return Rs(hj(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Cl(9,t));let i=t.substring(e+1,t.length-1),r;if(n==="color"){if(i=i.split(" "),r=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(Cl(10,r))}else i=i.split(",");return i=i.map(s=>parseFloat(s)),{type:n,values:i,colorSpace:r}}const dj=t=>{const e=Rs(t);return e.values.slice(0,3).map((n,i)=>e.type.includes("hsl")&&i!==0?`${n}%`:n).join(" ")},ku=(t,e)=>{try{return dj(t)}catch{return t}};function um(t){const{type:e,colorSpace:n}=t;let{values:i}=t;return e.includes("rgb")?i=i.map((r,s)=>s<3?parseInt(r,10):r):e.includes("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),e.includes("color")?i=`${n} ${i.join(" ")}`:i=`${i.join(", ")}`,`${e}(${i})`}function zA(t){t=Rs(t);const{values:e}=t,n=e[0],i=e[1]/100,r=e[2]/100,s=i*Math.min(r,1-r),a=(d,p=(d+n/30)%12)=>r-s*Math.max(Math.min(p-3,9-p,1),-1);let c="rgb";const f=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(c+="a",f.push(e[3])),um({type:c,values:f})}function bv(t){t=Rs(t);let e=t.type==="hsl"||t.type==="hsla"?Rs(zA(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function pj(t,e){const n=bv(t),i=bv(e);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}function Ku(t,e){return t=Rs(t),e=Jb(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,um(t)}function rl(t,e,n){try{return Ku(t,e)}catch{return t}}function fm(t,e){if(t=Rs(t),e=Jb(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return um(t)}function St(t,e,n){try{return fm(t,e)}catch{return t}}function hm(t,e){if(t=Rs(t),e=Jb(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return um(t)}function xt(t,e,n){try{return hm(t,e)}catch{return t}}function mj(t,e=.15){return bv(t)>.5?fm(t,e):hm(t,e)}function id(t,e,n){try{return mj(t,e)}catch{return t}}const $A=E.createContext(null);function eO(){return E.useContext($A)}const gj=typeof Symbol=="function"&&Symbol.for,yj=gj?Symbol.for("mui.nested"):"__THEME_NESTED__";function vj(t,e){return typeof e=="function"?e(t):{...t,...e}}function bj(t){const{children:e,theme:n}=t,i=eO(),r=E.useMemo(()=>{const s=i===null?{...n}:vj(i,n);return s!=null&&(s[yj]=i!==null),s},[n,i]);return S.jsx($A.Provider,{value:r,children:e})}const BA=E.createContext();function Oj({value:t,...e}){return S.jsx(BA.Provider,{value:t??!0,...e})}const sc=()=>E.useContext(BA)??!1,jA=E.createContext(void 0);function Sj({value:t,children:e}){return S.jsx(jA.Provider,{value:t,children:e})}function xj(t){const{theme:e,name:n,props:i}=t;if(!e||!e.components||!e.components[n])return i;const r=e.components[n];return r.defaultProps?Yu(r.defaultProps,i,e.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?Yu(r,i,e.components.mergeClassNameAndStyle):i}function wj({props:t,name:e}){const n=E.useContext(jA);return xj({props:t,name:e,theme:{components:n}})}let FC=0;function Cj(t){const[e,n]=E.useState(t),i=t||e;return E.useEffect(()=>{e==null&&(FC+=1,n(`mui-${FC}`))},[e]),i}const Tj={...mp},YC=Tj.useId;function dm(t){if(YC!==void 0){const e=YC();return t??e}return Cj(t)}function kj(t){const e=cm(),n=dm()||"",{modularCssLayers:i}=t;let r="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!i||e!==null?r="":typeof i=="string"?r=i.replace(/mui(?!\.)/g,r):r=`@layer ${r};`,nr(()=>{const s=document.querySelector("head");if(!s)return;const a=s.firstChild;if(r){if(a&&a.hasAttribute?.("data-mui-layer-order")&&a.getAttribute("data-mui-layer-order")===n)return;const c=document.createElement("style");c.setAttribute("data-mui-layer-order",n),c.textContent=r,s.prepend(c)}else s.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[r,n]),r?S.jsx(CA,{styles:r}):null}const KC={};function ZC(t,e,n,i=!1){return E.useMemo(()=>{const r=t&&e[t]||e;if(typeof n=="function"){const s=n(r),a=t?{...e,[t]:s}:s;return i?()=>a:a}return t?{...e,[t]:n}:{...e,...n}},[t,e,n,i])}function QA(t){const{children:e,theme:n,themeId:i}=t,r=cm(KC),s=eO()||KC,a=ZC(i,r,n),c=ZC(i,s,n,!0),f=(i?a[i]:a).direction==="rtl",d=kj(a);return S.jsx(bj,{theme:c,children:S.jsx(Tf.Provider,{value:a,children:S.jsx(Oj,{value:f,children:S.jsxs(Sj,{value:i?a[i].components:a.components,children:[d,e]})})})})}const JC={theme:void 0};function Ej(t){let e,n;return function(r){let s=e;return(s===void 0||r.theme!==n)&&(JC.theme=r.theme,s=EA(t(JC)),e=s,n=r.theme),s}}const tO="mode",nO="color-scheme",Aj="data-color-scheme";function Rj(t){const{defaultMode:e="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:i="dark",modeStorageKey:r=tO,colorSchemeStorageKey:s=nO,attribute:a=Aj,colorSchemeNode:c="document.documentElement",nonce:f}=t||{};let d="",p=a;if(a==="class"&&(p=".%s"),a==="data"&&(p="[data-%s]"),p.startsWith(".")){const v=p.substring(1);d+=`${c}.classList.remove('${v}'.replace('%s', light), '${v}'.replace('%s', dark));
|
|
74
|
-
${c}.classList.add('${v}'.replace('%s', colorScheme));`}const m=p.match(/\[([^[\]]+)\]/);if(m){const[v,b]=m[1].split("=");b||(d+=`${c}.removeAttribute('${v}'.replace('%s', light));
|
|
75
|
-
${c}.removeAttribute('${v}'.replace('%s', dark));`),d+=`
|
|
76
|
-
${c}.setAttribute('${v}'.replace('%s', colorScheme), ${b?`${b}.replace('%s', colorScheme)`:'""'});`}else d+=`${c}.setAttribute('${p}', colorScheme);`;return S.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(function() {
|
|
77
|
-
try {
|
|
78
|
-
let colorScheme = '';
|
|
79
|
-
const mode = localStorage.getItem('${r}') || '${e}';
|
|
80
|
-
const dark = localStorage.getItem('${s}-dark') || '${i}';
|
|
81
|
-
const light = localStorage.getItem('${s}-light') || '${n}';
|
|
82
|
-
if (mode === 'system') {
|
|
83
|
-
// handle system mode
|
|
84
|
-
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
85
|
-
if (mql.matches) {
|
|
86
|
-
colorScheme = dark
|
|
87
|
-
} else {
|
|
88
|
-
colorScheme = light
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (mode === 'light') {
|
|
92
|
-
colorScheme = light;
|
|
93
|
-
}
|
|
94
|
-
if (mode === 'dark') {
|
|
95
|
-
colorScheme = dark;
|
|
96
|
-
}
|
|
97
|
-
if (colorScheme) {
|
|
98
|
-
${d}
|
|
99
|
-
}
|
|
100
|
-
} catch(e){}})();`}},"mui-color-scheme-init")}function Mj(){}const Dj=({key:t,storageWindow:e})=>(!e&&typeof window<"u"&&(e=window),{get(n){if(typeof window>"u")return;if(!e)return n;let i;try{i=e.localStorage.getItem(t)}catch{}return i||n},set:n=>{if(e)try{e.localStorage.setItem(t,n)}catch{}},subscribe:n=>{if(!e)return Mj;const i=r=>{const s=r.newValue;r.key===t&&n(s)};return e.addEventListener("storage",i),()=>{e.removeEventListener("storage",i)}}});function hy(){}function eT(t){if(typeof window<"u"&&typeof window.matchMedia=="function"&&t==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function LA(t,e){if(t.mode==="light"||t.mode==="system"&&t.systemMode==="light")return e("light");if(t.mode==="dark"||t.mode==="system"&&t.systemMode==="dark")return e("dark")}function Pj(t){return LA(t,e=>{if(e==="light")return t.lightColorScheme;if(e==="dark")return t.darkColorScheme})}function zj(t){const{defaultMode:e="light",defaultLightColorScheme:n,defaultDarkColorScheme:i,supportedColorSchemes:r=[],modeStorageKey:s=tO,colorSchemeStorageKey:a=nO,storageWindow:c=typeof window>"u"?void 0:window,storageManager:f=Dj,noSsr:d=!1}=t,p=r.join(","),m=r.length>1,v=E.useMemo(()=>f?.({key:s,storageWindow:c}),[f,s,c]),b=E.useMemo(()=>f?.({key:`${a}-light`,storageWindow:c}),[f,a,c]),O=E.useMemo(()=>f?.({key:`${a}-dark`,storageWindow:c}),[f,a,c]),[x,C]=E.useState(()=>{const j=v?.get(e)||e,N=b?.get(n)||n,A=O?.get(i)||i;return{mode:j,systemMode:eT(j),lightColorScheme:N,darkColorScheme:A}}),[k,$]=E.useState(d||!m);E.useEffect(()=>{$(!0)},[]);const z=Pj(x),D=E.useCallback(j=>{C(N=>{if(j===N.mode)return N;const A=j??e;return v?.set(A),{...N,mode:A,systemMode:eT(A)}})},[v,e]),R=E.useCallback(j=>{j?typeof j=="string"?j&&!p.includes(j)?console.error(`\`${j}\` does not exist in \`theme.colorSchemes\`.`):C(N=>{const A={...N};return LA(N,Q=>{Q==="light"&&(b?.set(j),A.lightColorScheme=j),Q==="dark"&&(O?.set(j),A.darkColorScheme=j)}),A}):C(N=>{const A={...N},Q=j.light===null?n:j.light,T=j.dark===null?i:j.dark;return Q&&(p.includes(Q)?(A.lightColorScheme=Q,b?.set(Q)):console.error(`\`${Q}\` does not exist in \`theme.colorSchemes\`.`)),T&&(p.includes(T)?(A.darkColorScheme=T,O?.set(T)):console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`)),A}):C(N=>(b?.set(n),O?.set(i),{...N,lightColorScheme:n,darkColorScheme:i}))},[p,b,O,n,i]),B=E.useCallback(j=>{x.mode==="system"&&C(N=>{const A=j?.matches?"dark":"light";return N.systemMode===A?N:{...N,systemMode:A}})},[x.mode]),M=E.useRef(B);return M.current=B,E.useEffect(()=>{if(typeof window.matchMedia!="function"||!m)return;const j=(...A)=>M.current(...A),N=window.matchMedia("(prefers-color-scheme: dark)");return N.addListener(j),j(N),()=>{N.removeListener(j)}},[m]),E.useEffect(()=>{if(m){const j=v?.subscribe(Q=>{(!Q||["light","dark","system"].includes(Q))&&D(Q||e)})||hy,N=b?.subscribe(Q=>{(!Q||p.match(Q))&&R({light:Q})})||hy,A=O?.subscribe(Q=>{(!Q||p.match(Q))&&R({dark:Q})})||hy;return()=>{j(),N(),A()}}},[R,D,p,e,c,m,v,b,O]),{...x,mode:k?x.mode:void 0,systemMode:k?x.systemMode:void 0,colorScheme:k?z:void 0,setMode:D,setColorScheme:R}}const $j="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Bj(t){const{themeId:e,theme:n={},modeStorageKey:i=tO,colorSchemeStorageKey:r=nO,disableTransitionOnChange:s=!1,defaultColorScheme:a,resolveTheme:c}=t,f={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},d=E.createContext(void 0),p=()=>E.useContext(d)||f,m={},v={};function b(k){const{children:$,theme:z,modeStorageKey:D=i,colorSchemeStorageKey:R=r,disableTransitionOnChange:B=s,storageManager:M,storageWindow:j=typeof window>"u"?void 0:window,documentNode:N=typeof document>"u"?void 0:document,colorSchemeNode:A=typeof document>"u"?void 0:document.documentElement,disableNestedContext:Q=!1,disableStyleSheetGeneration:T=!1,defaultMode:U="system",forceThemeRerender:q=!1,noSsr:V}=k,L=E.useRef(!1),X=eO(),Y=E.useContext(d),K=!!Y&&!Q,le=E.useMemo(()=>z||(typeof n=="function"?n():n),[z]),_=le[e],G=_||le,{colorSchemes:se=m,components:W=v,cssVarPrefix:ce}=G,ne=Object.keys(se).filter(Vt=>!!se[Vt]).join(","),he=E.useMemo(()=>ne.split(","),[ne]),Se=typeof a=="string"?a:a.light,ke=typeof a=="string"?a:a.dark,xe=se[Se]&&se[ke]?U:se[G.defaultColorScheme]?.palette?.mode||G.palette?.mode,{mode:Re,setMode:Pe,systemMode:at,lightColorScheme:qe,darkColorScheme:ct,colorScheme:At,setColorScheme:Ke}=zj({supportedColorSchemes:he,defaultLightColorScheme:Se,defaultDarkColorScheme:ke,modeStorageKey:D,colorSchemeStorageKey:R,defaultMode:xe,storageManager:M,storageWindow:j,noSsr:V});let nt=Re,Ze=At;K&&(nt=Y.mode,Ze=Y.colorScheme);let dt=Ze||G.defaultColorScheme;G.vars&&!q&&(dt=G.defaultColorScheme);const Ve=E.useMemo(()=>{const Vt=G.generateThemeVars?.()||G.vars,st={...G,components:W,colorSchemes:se,cssVarPrefix:ce,vars:Vt};if(typeof st.generateSpacing=="function"&&(st.spacing=st.generateSpacing()),dt){const Bt=se[dt];Bt&&typeof Bt=="object"&&Object.keys(Bt).forEach(on=>{Bt[on]&&typeof Bt[on]=="object"?st[on]={...st[on],...Bt[on]}:st[on]=Bt[on]})}return c?c(st):st},[G,dt,W,se,ce]),Ee=G.colorSchemeSelector;nr(()=>{if(Ze&&A&&Ee&&Ee!=="media"){const Vt=Ee;let st=Ee;if(Vt==="class"&&(st=".%s"),Vt==="data"&&(st="[data-%s]"),Vt?.startsWith("data-")&&!Vt.includes("%s")&&(st=`[${Vt}="%s"]`),st.startsWith("."))A.classList.remove(...he.map(Bt=>st.substring(1).replace("%s",Bt))),A.classList.add(st.substring(1).replace("%s",Ze));else{const Bt=st.replace("%s",Ze).match(/\[([^\]]+)\]/);if(Bt){const[on,zi]=Bt[1].split("=");zi||he.forEach(Sn=>{A.removeAttribute(on.replace(Ze,Sn))}),A.setAttribute(on,zi?zi.replace(/"|'/g,""):"")}else A.setAttribute(st,Ze)}}},[Ze,Ee,A,he]),E.useEffect(()=>{let Vt;if(B&&L.current&&N){const st=N.createElement("style");st.appendChild(N.createTextNode($j)),N.head.appendChild(st),window.getComputedStyle(N.body),Vt=setTimeout(()=>{N.head.removeChild(st)},1)}return()=>{clearTimeout(Vt)}},[Ze,B,N]),E.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Pi=E.useMemo(()=>({allColorSchemes:he,colorScheme:Ze,darkColorScheme:ct,lightColorScheme:qe,mode:nt,setColorScheme:Ke,setMode:Pe,systemMode:at}),[he,Ze,ct,qe,nt,Ke,Pe,at,Ve.colorSchemeSelector]);let $t=!0;(T||G.cssVariables===!1||K&&X?.cssVarPrefix===ce)&&($t=!1);const cr=S.jsxs(E.Fragment,{children:[S.jsx(QA,{themeId:_?e:void 0,theme:Ve,children:$}),$t&&S.jsx(vA,{styles:Ve.generateStyleSheets?.()||[]})]});return K?cr:S.jsx(d.Provider,{value:Pi,children:cr})}const O=typeof a=="string"?a:a.light,x=typeof a=="string"?a:a.dark;return{CssVarsProvider:b,useColorScheme:p,getInitColorSchemeScript:k=>Rj({colorSchemeStorageKey:r,defaultLightColorScheme:O,defaultDarkColorScheme:x,modeStorageKey:i,...k})}}function jj(t=""){function e(...i){if(!i.length)return"";const r=i[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${r}${e(...i.slice(1))})`:`, ${r}`}return(i,...r)=>`var(--${t?`${t}-`:""}${i}${e(...r)})`}const tT=(t,e,n,i=[])=>{let r=t;e.forEach((s,a)=>{a===e.length-1?Array.isArray(r)?r[Number(s)]=n:r&&typeof r=="object"&&(r[s]=n):r&&typeof r=="object"&&(r[s]||(r[s]=i.includes(s)?[]:{}),r=r[s])})},Qj=(t,e,n)=>{function i(r,s=[],a=[]){Object.entries(r).forEach(([c,f])=>{(!n||n&&!n([...s,c]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?i(f,[...s,c],Array.isArray(f)?[...a,c]:a):e([...s,c],f,a))})}i(t)},Lj=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(i=>t.includes(i))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function dy(t,e){const{prefix:n,shouldSkipGeneratingVar:i}=e||{},r={},s={},a={};return Qj(t,(c,f,d)=>{if((typeof f=="string"||typeof f=="number")&&(!i||!i(c,f))){const p=`--${n?`${n}-`:""}${c.join("-")}`,m=Lj(c,f);Object.assign(r,{[p]:m}),tT(s,c,`var(${p})`,d),tT(a,c,`var(${p}, ${m})`,d)}},c=>c[0]==="vars"),{css:r,vars:s,varsWithDefaults:a}}function Nj(t,e={}){const{getSelector:n=k,disableCssColorScheme:i,colorSchemeSelector:r,enableContrastVars:s}=e,{colorSchemes:a={},components:c,defaultColorScheme:f="light",...d}=t,{vars:p,css:m,varsWithDefaults:v}=dy(d,e);let b=v;const O={},{[f]:x,...C}=a;if(Object.entries(C||{}).forEach(([D,R])=>{const{vars:B,css:M,varsWithDefaults:j}=dy(R,e);b=Mi(b,j),O[D]={css:M,vars:B}}),x){const{css:D,vars:R,varsWithDefaults:B}=dy(x,e);b=Mi(b,B),O[f]={css:D,vars:R}}function k(D,R){let B=r;if(r==="class"&&(B=".%s"),r==="data"&&(B="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(B=`[${r}="%s"]`),D){if(B==="media")return t.defaultColorScheme===D?":root":{[`@media (prefers-color-scheme: ${a[D]?.palette?.mode||D})`]:{":root":R}};if(B)return t.defaultColorScheme===D?`:root, ${B.replace("%s",String(D))}`:B.replace("%s",String(D))}return":root"}return{vars:b,generateThemeVars:()=>{let D={...p};return Object.entries(O).forEach(([,{vars:R}])=>{D=Mi(D,R)}),D},generateStyleSheets:()=>{const D=[],R=t.defaultColorScheme||"light";function B(N,A){Object.keys(A).length&&D.push(typeof N=="string"?{[N]:{...A}}:N)}B(n(void 0,{...m}),m);const{[R]:M,...j}=O;if(M){const{css:N}=M,A=a[R]?.palette?.mode,Q=!i&&A?{colorScheme:A,...N}:{...N};B(n(R,{...Q}),Q)}return Object.entries(j).forEach(([N,{css:A}])=>{const Q=a[N]?.palette?.mode,T=!i&&Q?{colorScheme:Q,...A}:{...A};B(n(N,{...T}),T)}),s&&D.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)"}}),D}}}function _j(t){return function(n){return t==="media"?`@media (prefers-color-scheme: ${n})`:t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}function _e(t,e,n=void 0){const i={};for(const r in t){const s=t[r];let a="",c=!0;for(let f=0;f<s.length;f+=1){const d=s[f];d&&(a+=(c===!0?"":" ")+e(d),c=!1,n&&n[d]&&(a+=" "+n[d]))}i[r]=a}return i}function NA(t,e){return E.isValidElement(t)&&e.indexOf(t.type.muiName??t.type?._payload?.value?.muiName)!==-1}const qj=(t,e)=>t.filter(n=>e.includes(n)),lc=(t,e,n)=>{const i=t.keys[0];Array.isArray(e)?e.forEach((r,s)=>{n((a,c)=>{s<=t.keys.length-1&&(s===0?Object.assign(a,c):a[t.up(t.keys[s])]=c)},r)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:qj(t.keys,Object.keys(e))).forEach(s=>{if(t.keys.includes(s)){const a=e[s];a!==void 0&&n((c,f)=>{i===s?Object.assign(c,f):c[t.up(s)]=f},a)}}):(typeof e=="number"||typeof e=="string")&&n((r,s)=>{Object.assign(r,s)},e)};function bp(t){return`--Grid-${t}Spacing`}function pm(t){return`--Grid-parent-${t}Spacing`}const nT="--Grid-columns",$a="--Grid-parent-columns",Uj=({theme:t,ownerState:e})=>{const n={};return lc(t.breakpoints,e.size,(i,r)=>{let s={};r==="grow"&&(s={flexBasis:0,flexGrow:1,maxWidth:"100%"}),r==="auto"&&(s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof r=="number"&&(s={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${r} / var(${$a}) - (var(${$a}) - ${r}) * (var(${pm("column")}) / var(${$a})))`}),i(n,s)}),n},Ij=({theme:t,ownerState:e})=>{const n={};return lc(t.breakpoints,e.offset,(i,r)=>{let s={};r==="auto"&&(s={marginLeft:"auto"}),typeof r=="number"&&(s={marginLeft:r===0?"0px":`calc(100% * ${r} / var(${$a}) + var(${pm("column")}) * ${r} / var(${$a}))`}),i(n,s)}),n},Hj=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={[nT]:12};return lc(t.breakpoints,e.columns,(i,r)=>{const s=r??12;i(n,{[nT]:s,"> *":{[$a]:s}})}),n},Vj=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return lc(t.breakpoints,e.rowSpacing,(i,r)=>{const s=typeof r=="string"?r:t.spacing?.(r);i(n,{[bp("row")]:s,"> *":{[pm("row")]:s}})}),n},Wj=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return lc(t.breakpoints,e.columnSpacing,(i,r)=>{const s=typeof r=="string"?r:t.spacing?.(r);i(n,{[bp("column")]:s,"> *":{[pm("column")]:s}})}),n},Xj=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return lc(t.breakpoints,e.direction,(i,r)=>{i(n,{flexDirection:r})}),n},Gj=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${bp("row")}) var(${bp("column")})`}}),Fj=t=>{const e=[];return Object.entries(t).forEach(([n,i])=>{i!==!1&&i!==void 0&&e.push(`grid-${n}-${String(i)}`)}),e},Yj=(t,e="xs")=>{function n(i){return i===void 0?!1:typeof i=="string"&&!Number.isNaN(Number(i))||typeof i=="number"&&i>0}if(n(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const i=[];return Object.entries(t).forEach(([r,s])=>{n(s)&&i.push(`spacing-${r}-${String(s)}`)}),i}return[]},Kj=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,n])=>`direction-${e}-${n}`):[`direction-xs-${String(t)}`];function Zj(t,e){t.item!==void 0&&delete t.item,t.zeroMinWidth!==void 0&&delete t.zeroMinWidth,e.keys.forEach(n=>{t[n]!==void 0&&delete t[n]})}const Jj=am(),eQ=sj("div",{name:"MuiGrid",slot:"Root"});function tQ(t){return lj({props:t,name:"MuiGrid",defaultTheme:Jj})}function nQ(t={}){const{createStyledComponent:e=eQ,useThemeProps:n=tQ,useTheme:i=Mf,componentName:r="MuiGrid"}=t,s=(d,p)=>{const{container:m,direction:v,spacing:b,wrap:O,size:x}=d,C={root:["root",m&&"container",O!=="wrap"&&`wrap-xs-${String(O)}`,...Kj(v),...Fj(x),...m?Yj(b,p.breakpoints.keys[0]):[]]};return _e(C,k=>Qe(r,k),{})};function a(d,p,m=()=>!0){const v={};return d===null||(Array.isArray(d)?d.forEach((b,O)=>{b!==null&&m(b)&&p.keys[O]&&(v[p.keys[O]]=b)}):typeof d=="object"?Object.keys(d).forEach(b=>{const O=d[b];O!=null&&m(O)&&(v[b]=O)}):v[p.keys[0]]=d),v}const c=e(Hj,Wj,Vj,Uj,Xj,Gj,Ij),f=E.forwardRef(function(p,m){const v=i(),b=n(p),O=Zb(b);Zj(O,v.breakpoints);const{className:x,children:C,columns:k=12,container:$=!1,component:z="div",direction:D="row",wrap:R="wrap",size:B={},offset:M={},spacing:j=0,rowSpacing:N=j,columnSpacing:A=j,unstable_level:Q=0,...T}=O,U=a(B,v.breakpoints,_=>_!==!1),q=a(M,v.breakpoints),V=p.columns??(Q?void 0:k),L=p.spacing??(Q?void 0:j),X=p.rowSpacing??p.spacing??(Q?void 0:N),Y=p.columnSpacing??p.spacing??(Q?void 0:A),K={...O,level:Q,columns:V,container:$,direction:D,wrap:R,spacing:L,rowSpacing:X,columnSpacing:Y,size:U,offset:q},le=s(K,v);return S.jsx(c,{ref:m,as:z,ownerState:K,className:ye(le.root,x),...T,children:E.Children.map(C,_=>E.isValidElement(_)&&NA(_,["Grid"])&&$&&_.props.container?E.cloneElement(_,{unstable_level:_.props?.unstable_level??Q+1}):_)})});return f.muiName="Grid",f}const Zu={black:"#000",white:"#fff"},iO={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"},va={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},ys={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},cu={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},cl={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",500:"#2196f3",700:"#1976d2",800:"#1565c0"},ba={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},ul={300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function _A(){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:Zu.white,default:Zu.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}}}const qA=_A();function UA(){return{text:{primary:Zu.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:Zu.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}}}const Ov=UA();function iT(t,e,n,i){const r=i.light||i,s=i.dark||i*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=hm(t.main,r):e==="dark"&&(t.dark=fm(t.main,s)))}function rT(t,e,n,i,r){const s=r.light||r,a=r.dark||r*1.5;e[n]||(e.hasOwnProperty(i)?e[n]=e[i]:n==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(a*100).toFixed(0)}%)`))}function iQ(t="light"){return t==="dark"?{main:cl[200],light:cl[50],dark:cl[400]}:{main:cl[700],light:cl[400],dark:cl[800]}}function rQ(t="light"){return t==="dark"?{main:va[200],light:va[50],dark:va[400]}:{main:va[500],light:va[300],dark:va[700]}}function oQ(t="light"){return t==="dark"?{main:ys[500],light:ys[300],dark:ys[700]}:{main:ys[700],light:ys[400],dark:ys[800]}}function sQ(t="light"){return t==="dark"?{main:ba[400],light:ba[300],dark:ba[700]}:{main:ba[700],light:ba[500],dark:ba[900]}}function lQ(t="light"){return t==="dark"?{main:ul[400],light:ul[300],dark:ul[700]}:{main:ul[800],light:ul[500],dark:ul[900]}}function aQ(t="light"){return t==="dark"?{main:cu[400],light:cu[300],dark:cu[700]}:{main:"#ed6c02",light:cu[500],dark:cu[900]}}function cQ(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function rO(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:i=.2,colorSpace:r,...s}=t,a=t.primary||iQ(e),c=t.secondary||rQ(e),f=t.error||oQ(e),d=t.info||sQ(e),p=t.success||lQ(e),m=t.warning||aQ(e);function v(C){return r?cQ(C):pj(C,Ov.text.primary)>=n?Ov.text.primary:qA.text.primary}const b=({color:C,name:k,mainShade:$=500,lightShade:z=300,darkShade:D=700})=>{if(C={...C},!C.main&&C[$]&&(C.main=C[$]),!C.hasOwnProperty("main"))throw new Error(Cl(11,k?` (${k})`:"",$));if(typeof C.main!="string")throw new Error(Cl(12,k?` (${k})`:"",JSON.stringify(C.main)));return r?(rT(r,C,"light",z,i),rT(r,C,"dark",D,i)):(iT(C,"light",z,i),iT(C,"dark",D,i)),C.contrastText||(C.contrastText=v(C.main)),C};let O;return e==="light"?O=_A():e==="dark"&&(O=UA()),Mi({common:{...Zu},mode:e,primary:b({color:a,name:"primary"}),secondary:b({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:f,name:"error"}),warning:b({color:m,name:"warning"}),info:b({color:d,name:"info"}),success:b({color:p,name:"success"}),grey:iO,contrastThreshold:n,getContrastText:v,augmentColor:b,tonalOffset:i,...O},s)}function uQ(t){const e={};return Object.entries(t).forEach(i=>{const[r,s]=i;typeof s=="object"&&(e[r]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function fQ(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function hQ(t){return Math.round(t*1e5)/1e5}const oT={textTransform:"uppercase"},sT='"Roboto", "Helvetica", "Arial", sans-serif';function IA(t,e){const{fontFamily:n=sT,fontSize:i=14,fontWeightLight:r=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:f=16,allVariants:d,pxToRem:p,...m}=typeof e=="function"?e(t):e,v=i/14,b=p||(C=>`${C/f*v}rem`),O=(C,k,$,z,D)=>({fontFamily:n,fontWeight:C,fontSize:b(k),lineHeight:$,...n===sT?{letterSpacing:`${hQ(z/k)}em`}:{},...D,...d}),x={h1:O(r,96,1.167,-1.5),h2:O(r,60,1.2,-.5),h3:O(s,48,1.167,0),h4:O(s,34,1.235,.25),h5:O(s,24,1.334,0),h6:O(a,20,1.6,.15),subtitle1:O(s,16,1.75,.15),subtitle2:O(a,14,1.57,.1),body1:O(s,16,1.5,.15),body2:O(s,14,1.43,.15),button:O(a,14,1.75,.4,oT),caption:O(s,12,1.66,.4),overline:O(s,12,2.66,1,oT),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Mi({htmlFontSize:f,pxToRem:b,fontFamily:n,fontSize:i,fontWeightLight:r,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:c,...x},m,{clone:!1})}const dQ=.2,pQ=.14,mQ=.12;function qt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${dQ})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${pQ})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${mQ})`].join(",")}const gQ=["none",qt(0,2,1,-1,0,1,1,0,0,1,3,0),qt(0,3,1,-2,0,2,2,0,0,1,5,0),qt(0,3,3,-2,0,3,4,0,0,1,8,0),qt(0,2,4,-1,0,4,5,0,0,1,10,0),qt(0,3,5,-1,0,5,8,0,0,1,14,0),qt(0,3,5,-1,0,6,10,0,0,1,18,0),qt(0,4,5,-2,0,7,10,1,0,2,16,1),qt(0,5,5,-3,0,8,10,1,0,3,14,2),qt(0,5,6,-3,0,9,12,1,0,3,16,2),qt(0,6,6,-3,0,10,14,1,0,4,18,3),qt(0,6,7,-4,0,11,15,1,0,4,20,3),qt(0,7,8,-4,0,12,17,2,0,5,22,4),qt(0,7,8,-4,0,13,19,2,0,5,24,4),qt(0,7,9,-4,0,14,21,2,0,5,26,4),qt(0,8,9,-5,0,15,22,2,0,6,28,5),qt(0,8,10,-5,0,16,24,2,0,6,30,5),qt(0,8,11,-5,0,17,26,2,0,6,32,5),qt(0,9,11,-5,0,18,28,2,0,7,34,6),qt(0,9,12,-6,0,19,29,2,0,7,36,6),qt(0,10,13,-6,0,20,31,3,0,8,38,7),qt(0,10,13,-6,0,21,33,3,0,8,40,7),qt(0,10,14,-6,0,22,35,3,0,8,42,7),qt(0,11,14,-7,0,23,36,3,0,9,44,8),qt(0,11,15,-7,0,24,38,3,0,9,46,8)],yQ={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)"},HA={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function lT(t){return`${Math.round(t)}ms`}function vQ(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function bQ(t){const e={...yQ,...t.easing},n={...HA,...t.duration};return{getAutoHeightDuration:vQ,create:(r=["all"],s={})=>{const{duration:a=n.standard,easing:c=e.easeInOut,delay:f=0,...d}=s;return(Array.isArray(r)?r:[r]).map(p=>`${p} ${typeof a=="string"?a:lT(a)} ${c} ${typeof f=="string"?f:lT(f)}`).join(",")},...t,easing:e,duration:n}}const OQ={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function SQ(t){return qr(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function VA(t={}){const e={...t};function n(i){const r=Object.entries(i);for(let s=0;s<r.length;s++){const[a,c]=r[s];!SQ(c)||a.startsWith("unstable_")?delete i[a]:qr(c)&&(i[a]={...c},n(i[a]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
101
|
-
|
|
102
|
-
const theme = ${JSON.stringify(e,null,2)};
|
|
103
|
-
|
|
104
|
-
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
105
|
-
theme.transitions = createTransitions(theme.transitions || {});
|
|
106
|
-
|
|
107
|
-
export default theme;`}function aT(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const xQ=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let i=0;i<e.length;i+=1)n+=+e[i];return n};function wQ(t){Object.assign(t,{alpha(e,n){const i=this||t;return i.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Ku(e,xQ(n))},lighten(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #fff ${aT(n)})`:hm(e,n)},darken(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #000 ${aT(n)})`:fm(e,n)}})}function Sv(t={},...e){const{breakpoints:n,mixins:i={},spacing:r,palette:s={},transitions:a={},typography:c={},shape:f,colorSpace:d,...p}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(Cl(20));const m=rO({...s,colorSpace:d}),v=am(t);let b=Mi(v,{mixins:fQ(v.breakpoints,i),palette:m,shadows:gQ.slice(),typography:IA(m,c),transitions:bQ(a),zIndex:{...OQ}});return b=Mi(b,p),b=e.reduce((O,x)=>Mi(O,x),b),b.unstable_sxConfig={...Rf,...p?.unstable_sxConfig},b.unstable_sx=function(x){return As({sx:x,theme:this})},b.toRuntimeSource=VA,wQ(b),b}function xv(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const CQ=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=xv(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function WA(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function XA(t){return t==="dark"?CQ:[]}function TQ(t){const{palette:e={mode:"light"},opacity:n,overlays:i,colorSpace:r,...s}=t,a=rO({...e,colorSpace:r});return{palette:a,opacity:{...WA(a.mode),...n},overlays:i||XA(a.mode),...s}}function kQ(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const EQ=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],AQ=t=>(e,n)=>{const i=t.rootSelector||":root",r=t.colorSchemeSelector;let s=r;if(r==="class"&&(s=".%s"),r==="data"&&(s="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(s=`[${r}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const a={};return EQ(t.cssVarPrefix).forEach(c=>{a[c]=n[c],delete n[c]}),s==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:a}}:s?{[s.replace("%s",e)]:a,[`${i}, ${s.replace("%s",e)}`]:n}:{[i]:{...n,...a}}}if(s&&s!=="media")return`${i}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[i]:n}};if(s)return s.replace("%s",String(e))}return i};function RQ(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function oe(t,e,n){!t[e]&&n&&(t[e]=n)}function Eu(t){return typeof t!="string"||!t.startsWith("hsl")?t:zA(t)}function To(t,e){`${e}Channel`in t||(t[`${e}Channel`]=ku(Eu(t[e])))}function MQ(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Pr=t=>{try{return t()}catch{}},DQ=(t="mui")=>jj(t);function py(t,e,n,i,r){if(!n)return;n=n===!0?{}:n;const s=r==="dark"?"dark":"light";if(!i){e[r]=TQ({...n,palette:{mode:s,...n?.palette},colorSpace:t});return}const{palette:a,...c}=Sv({...i,palette:{mode:s,...n?.palette},colorSpace:t});return e[r]={...n,palette:a,opacity:{...WA(s),...n?.opacity},overlays:n?.overlays||XA(s)},c}function PQ(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:r=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=kQ,colorSchemeSelector:f=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...p}=t,m=Object.keys(n)[0],v=i||(n.light&&m!=="light"?"light":m),b=DQ(s),{[v]:O,light:x,dark:C,...k}=n,$={...k};let z=O;if((v==="dark"&&!("dark"in n)||v==="light"&&!("light"in n))&&(z=!0),!z)throw new Error(Cl(21,v));let D;a&&(D="oklch");const R=py(D,$,z,p,v);x&&!$.light&&py(D,$,x,void 0,"light"),C&&!$.dark&&py(D,$,C,void 0,"dark");let B={defaultColorScheme:v,...R,cssVarPrefix:s,colorSchemeSelector:f,rootSelector:d,getCssVar:b,colorSchemes:$,font:{...uQ(R.typography),...R.font},spacing:MQ(p.spacing)};Object.keys(B.colorSchemes).forEach(Q=>{const T=B.colorSchemes[Q].palette,U=V=>{const L=V.split("-"),X=L[1],Y=L[2];return b(V,T[X][Y])};T.mode==="light"&&(oe(T.common,"background","#fff"),oe(T.common,"onBackground","#000")),T.mode==="dark"&&(oe(T.common,"background","#000"),oe(T.common,"onBackground","#fff"));function q(V,L,X){if(D){let Y;return V===rl&&(Y=`transparent ${((1-X)*100).toFixed(0)}%`),V===St&&(Y=`#000 ${(X*100).toFixed(0)}%`),V===xt&&(Y=`#fff ${(X*100).toFixed(0)}%`),`color-mix(in ${D}, ${L}, ${Y})`}return V(L,X)}if(RQ(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){oe(T.Alert,"errorColor",q(St,T.error.light,.6)),oe(T.Alert,"infoColor",q(St,T.info.light,.6)),oe(T.Alert,"successColor",q(St,T.success.light,.6)),oe(T.Alert,"warningColor",q(St,T.warning.light,.6)),oe(T.Alert,"errorFilledBg",U("palette-error-main")),oe(T.Alert,"infoFilledBg",U("palette-info-main")),oe(T.Alert,"successFilledBg",U("palette-success-main")),oe(T.Alert,"warningFilledBg",U("palette-warning-main")),oe(T.Alert,"errorFilledColor",Pr(()=>T.getContrastText(T.error.main))),oe(T.Alert,"infoFilledColor",Pr(()=>T.getContrastText(T.info.main))),oe(T.Alert,"successFilledColor",Pr(()=>T.getContrastText(T.success.main))),oe(T.Alert,"warningFilledColor",Pr(()=>T.getContrastText(T.warning.main))),oe(T.Alert,"errorStandardBg",q(xt,T.error.light,.9)),oe(T.Alert,"infoStandardBg",q(xt,T.info.light,.9)),oe(T.Alert,"successStandardBg",q(xt,T.success.light,.9)),oe(T.Alert,"warningStandardBg",q(xt,T.warning.light,.9)),oe(T.Alert,"errorIconColor",U("palette-error-main")),oe(T.Alert,"infoIconColor",U("palette-info-main")),oe(T.Alert,"successIconColor",U("palette-success-main")),oe(T.Alert,"warningIconColor",U("palette-warning-main")),oe(T.AppBar,"defaultBg",U("palette-grey-100")),oe(T.Avatar,"defaultBg",U("palette-grey-400")),oe(T.Button,"inheritContainedBg",U("palette-grey-300")),oe(T.Button,"inheritContainedHoverBg",U("palette-grey-A100")),oe(T.Chip,"defaultBorder",U("palette-grey-400")),oe(T.Chip,"defaultAvatarColor",U("palette-grey-700")),oe(T.Chip,"defaultIconColor",U("palette-grey-700")),oe(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),oe(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),oe(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),oe(T.LinearProgress,"primaryBg",q(xt,T.primary.main,.62)),oe(T.LinearProgress,"secondaryBg",q(xt,T.secondary.main,.62)),oe(T.LinearProgress,"errorBg",q(xt,T.error.main,.62)),oe(T.LinearProgress,"infoBg",q(xt,T.info.main,.62)),oe(T.LinearProgress,"successBg",q(xt,T.success.main,.62)),oe(T.LinearProgress,"warningBg",q(xt,T.warning.main,.62)),oe(T.Skeleton,"bg",D?q(rl,T.text.primary,.11):`rgba(${U("palette-text-primaryChannel")} / 0.11)`),oe(T.Slider,"primaryTrack",q(xt,T.primary.main,.62)),oe(T.Slider,"secondaryTrack",q(xt,T.secondary.main,.62)),oe(T.Slider,"errorTrack",q(xt,T.error.main,.62)),oe(T.Slider,"infoTrack",q(xt,T.info.main,.62)),oe(T.Slider,"successTrack",q(xt,T.success.main,.62)),oe(T.Slider,"warningTrack",q(xt,T.warning.main,.62));const V=D?q(St,T.background.default,.6825):id(T.background.default,.8);oe(T.SnackbarContent,"bg",V),oe(T.SnackbarContent,"color",Pr(()=>D?Ov.text.primary:T.getContrastText(V))),oe(T.SpeedDialAction,"fabHoverBg",id(T.background.paper,.15)),oe(T.StepConnector,"border",U("palette-grey-400")),oe(T.StepContent,"border",U("palette-grey-400")),oe(T.Switch,"defaultColor",U("palette-common-white")),oe(T.Switch,"defaultDisabledColor",U("palette-grey-100")),oe(T.Switch,"primaryDisabledColor",q(xt,T.primary.main,.62)),oe(T.Switch,"secondaryDisabledColor",q(xt,T.secondary.main,.62)),oe(T.Switch,"errorDisabledColor",q(xt,T.error.main,.62)),oe(T.Switch,"infoDisabledColor",q(xt,T.info.main,.62)),oe(T.Switch,"successDisabledColor",q(xt,T.success.main,.62)),oe(T.Switch,"warningDisabledColor",q(xt,T.warning.main,.62)),oe(T.TableCell,"border",q(xt,q(rl,T.divider,1),.88)),oe(T.Tooltip,"bg",q(rl,T.grey[700],.92))}if(T.mode==="dark"){oe(T.Alert,"errorColor",q(xt,T.error.light,.6)),oe(T.Alert,"infoColor",q(xt,T.info.light,.6)),oe(T.Alert,"successColor",q(xt,T.success.light,.6)),oe(T.Alert,"warningColor",q(xt,T.warning.light,.6)),oe(T.Alert,"errorFilledBg",U("palette-error-dark")),oe(T.Alert,"infoFilledBg",U("palette-info-dark")),oe(T.Alert,"successFilledBg",U("palette-success-dark")),oe(T.Alert,"warningFilledBg",U("palette-warning-dark")),oe(T.Alert,"errorFilledColor",Pr(()=>T.getContrastText(T.error.dark))),oe(T.Alert,"infoFilledColor",Pr(()=>T.getContrastText(T.info.dark))),oe(T.Alert,"successFilledColor",Pr(()=>T.getContrastText(T.success.dark))),oe(T.Alert,"warningFilledColor",Pr(()=>T.getContrastText(T.warning.dark))),oe(T.Alert,"errorStandardBg",q(St,T.error.light,.9)),oe(T.Alert,"infoStandardBg",q(St,T.info.light,.9)),oe(T.Alert,"successStandardBg",q(St,T.success.light,.9)),oe(T.Alert,"warningStandardBg",q(St,T.warning.light,.9)),oe(T.Alert,"errorIconColor",U("palette-error-main")),oe(T.Alert,"infoIconColor",U("palette-info-main")),oe(T.Alert,"successIconColor",U("palette-success-main")),oe(T.Alert,"warningIconColor",U("palette-warning-main")),oe(T.AppBar,"defaultBg",U("palette-grey-900")),oe(T.AppBar,"darkBg",U("palette-background-paper")),oe(T.AppBar,"darkColor",U("palette-text-primary")),oe(T.Avatar,"defaultBg",U("palette-grey-600")),oe(T.Button,"inheritContainedBg",U("palette-grey-800")),oe(T.Button,"inheritContainedHoverBg",U("palette-grey-700")),oe(T.Chip,"defaultBorder",U("palette-grey-700")),oe(T.Chip,"defaultAvatarColor",U("palette-grey-300")),oe(T.Chip,"defaultIconColor",U("palette-grey-300")),oe(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),oe(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),oe(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),oe(T.LinearProgress,"primaryBg",q(St,T.primary.main,.5)),oe(T.LinearProgress,"secondaryBg",q(St,T.secondary.main,.5)),oe(T.LinearProgress,"errorBg",q(St,T.error.main,.5)),oe(T.LinearProgress,"infoBg",q(St,T.info.main,.5)),oe(T.LinearProgress,"successBg",q(St,T.success.main,.5)),oe(T.LinearProgress,"warningBg",q(St,T.warning.main,.5)),oe(T.Skeleton,"bg",D?q(rl,T.text.primary,.13):`rgba(${U("palette-text-primaryChannel")} / 0.13)`),oe(T.Slider,"primaryTrack",q(St,T.primary.main,.5)),oe(T.Slider,"secondaryTrack",q(St,T.secondary.main,.5)),oe(T.Slider,"errorTrack",q(St,T.error.main,.5)),oe(T.Slider,"infoTrack",q(St,T.info.main,.5)),oe(T.Slider,"successTrack",q(St,T.success.main,.5)),oe(T.Slider,"warningTrack",q(St,T.warning.main,.5));const V=D?q(xt,T.background.default,.985):id(T.background.default,.98);oe(T.SnackbarContent,"bg",V),oe(T.SnackbarContent,"color",Pr(()=>D?qA.text.primary:T.getContrastText(V))),oe(T.SpeedDialAction,"fabHoverBg",id(T.background.paper,.15)),oe(T.StepConnector,"border",U("palette-grey-600")),oe(T.StepContent,"border",U("palette-grey-600")),oe(T.Switch,"defaultColor",U("palette-grey-300")),oe(T.Switch,"defaultDisabledColor",U("palette-grey-600")),oe(T.Switch,"primaryDisabledColor",q(St,T.primary.main,.55)),oe(T.Switch,"secondaryDisabledColor",q(St,T.secondary.main,.55)),oe(T.Switch,"errorDisabledColor",q(St,T.error.main,.55)),oe(T.Switch,"infoDisabledColor",q(St,T.info.main,.55)),oe(T.Switch,"successDisabledColor",q(St,T.success.main,.55)),oe(T.Switch,"warningDisabledColor",q(St,T.warning.main,.55)),oe(T.TableCell,"border",q(St,q(rl,T.divider,1),.68)),oe(T.Tooltip,"bg",q(rl,T.grey[700],.92))}To(T.background,"default"),To(T.background,"paper"),To(T.common,"background"),To(T.common,"onBackground"),To(T,"divider"),Object.keys(T).forEach(V=>{const L=T[V];V!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&oe(T[V],"mainChannel",ku(Eu(L.main))),L.light&&oe(T[V],"lightChannel",ku(Eu(L.light))),L.dark&&oe(T[V],"darkChannel",ku(Eu(L.dark))),L.contrastText&&oe(T[V],"contrastTextChannel",ku(Eu(L.contrastText))),V==="text"&&(To(T[V],"primary"),To(T[V],"secondary")),V==="action"&&(L.active&&To(T[V],"active"),L.selected&&To(T[V],"selected")))})}),B=e.reduce((Q,T)=>Mi(Q,T),B);const M={prefix:s,disableCssColorScheme:r,shouldSkipGeneratingVar:c,getSelector:AQ(B),enableContrastVars:a},{vars:j,generateThemeVars:N,generateStyleSheets:A}=Nj(B,M);return B.vars=j,Object.entries(B.colorSchemes[B.defaultColorScheme]).forEach(([Q,T])=>{B[Q]=T}),B.generateThemeVars=N,B.generateStyleSheets=A,B.generateSpacing=function(){return wA(p.spacing,Yb(this))},B.getColorSchemeSelector=_j(f),B.spacing=B.generateSpacing(),B.shouldSkipGeneratingVar=c,B.unstable_sxConfig={...Rf,...p?.unstable_sxConfig},B.unstable_sx=function(T){return As({sx:T,theme:this})},B.toRuntimeSource=VA,B}function cT(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:rO({...n===!0?{}:n.palette,mode:e})})}function mm(t={},...e){const{palette:n,cssVariables:i=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...a}=t,c=s||"light",f=r?.[c],d={...r,...n?{[c]:{...typeof f!="boolean"&&f,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in t))return Sv(t,...e);let p=n;"palette"in t||d[c]&&(d[c]!==!0?p=d[c].palette:c==="dark"&&(p={mode:"dark"}));const m=Sv({...t,palette:p},...e);return m.defaultColorScheme=c,m.colorSchemes=d,m.palette.mode==="light"&&(m.colorSchemes.light={...d.light!==!0&&d.light,palette:m.palette},cT(m,"dark",d.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:m.palette},cT(m,"light",d.light)),m}return!n&&!("light"in d)&&c==="light"&&(d.light=!0),PQ({...a,colorSchemes:d,defaultColorScheme:c,...typeof i!="boolean"&&i},...e)}const oO=mm();function xr(){const t=Mf(oO);return t[yr]||t}function zQ(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const ac=t=>zQ(t)&&t!=="classes",ge=RA({themeId:yr,defaultTheme:oO,rootShouldForwardProp:ac});function $Q({theme:t,...e}){const n=yr in t?t[yr]:void 0;return S.jsx(QA,{...e,themeId:n?yr:void 0,theme:n||t})}const rd={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:BQ}=Bj({themeId:yr,theme:()=>mm({cssVariables:!0}),colorSchemeStorageKey:rd.colorSchemeStorageKey,modeStorageKey:rd.modeStorageKey,defaultColorScheme:{light:rd.defaultLightColorScheme,dark:rd.defaultDarkColorScheme},resolveTheme:t=>{const e={...t,typography:IA(t.palette,t.typography)};return e.unstable_sx=function(i){return As({sx:i,theme:this})},e}}),jQ=BQ;function QQ({theme:t,...e}){const n=E.useMemo(()=>{if(typeof t=="function")return t;const i=yr in t?t[yr]:t;return"colorSchemes"in i?null:"vars"in i?t:{...t,vars:null}},[t]);return n?S.jsx($Q,{theme:n,...e}):S.jsx(jQ,{theme:t,...e})}const GA={200:"#f48fb1",A400:"#f50057"},LQ={500:"#3f51b5"},NQ={500:"#009688"},_Q={700:"#689f38"},qQ={500:"#ff5722"},UQ=Le("MuiBox",["root"]),IQ=mm(),rt=K3({themeId:yr,defaultTheme:IQ,defaultClassName:UQ.root,generateClassName:TA.generate});function FA(t){return S.jsx(CA,{...t,defaultTheme:oO,themeId:yr})}function YA(t){return function(n){return S.jsx(FA,{styles:typeof t=="function"?i=>t({theme:i,...n}):t})}}function HQ(){return Zb}function je(t){return wj(t)}const wv=typeof YA({})=="function",VQ=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),WQ=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),KA=(t,e=!1)=>{const n={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([s,a])=>{const c=t.getColorSchemeSelector(s);c.startsWith("@")?n[c]={":root":{colorScheme:a.palette?.mode}}:n[c.replace(/\s*&/,"")]={colorScheme:a.palette?.mode}});let i={html:VQ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...WQ(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...n};const r=t.components?.MuiCssBaseline?.styleOverrides;return r&&(i=[i,r]),i},Zd="mui-ecs",XQ=t=>{const e=KA(t,!1),n=Array.isArray(e)?e[0]:e;return!t.vars&&n&&(n.html[`:root:has(${Zd})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([i,r])=>{const s=t.getColorSchemeSelector(i);s.startsWith("@")?n[s]={[`:root:not(:has(.${Zd}))`]:{colorScheme:r.palette?.mode}}:n[s.replace(/\s*&/,"")]={[`&:not(:has(.${Zd}))`]:{colorScheme:r.palette?.mode}}}),e},GQ=YA(wv?({theme:t,enableColorScheme:e})=>KA(t,e):({theme:t})=>XQ(t));function FQ(t){const e=je({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:i=!1}=e;return S.jsxs(E.Fragment,{children:[wv&&S.jsx(GQ,{enableColorScheme:i}),!wv&&!i&&S.jsx("span",{className:Zd,style:{display:"none"}}),n]})}const ZA=PA({themeId:yr}),YQ="/assets/FiraCode-Bold-Ba6ukUQM.otf",KQ="/assets/FiraCode-Regular-DP3ilQdk.otf",We=Ej;function ZQ(t){return typeof t.main=="string"}function JQ(t,e=[]){if(!ZQ(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function gr(t=[]){return([,e])=>e&&JQ(e,t)}function eL(t){return Qe("MuiCircularProgress",t)}Le("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const mr=44,Cv=kf`
|
|
108
|
-
0% {
|
|
109
|
-
transform: rotate(0deg);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
100% {
|
|
113
|
-
transform: rotate(360deg);
|
|
114
|
-
}
|
|
115
|
-
`,Tv=kf`
|
|
116
|
-
0% {
|
|
117
|
-
stroke-dasharray: 1px, 200px;
|
|
118
|
-
stroke-dashoffset: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
50% {
|
|
122
|
-
stroke-dasharray: 100px, 200px;
|
|
123
|
-
stroke-dashoffset: -15px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
100% {
|
|
127
|
-
stroke-dasharray: 1px, 200px;
|
|
128
|
-
stroke-dashoffset: -126px;
|
|
129
|
-
}
|
|
130
|
-
`,tL=typeof Cv!="string"?Xb`
|
|
131
|
-
animation: ${Cv} 1.4s linear infinite;
|
|
132
|
-
`:null,nL=typeof Tv!="string"?Xb`
|
|
133
|
-
animation: ${Tv} 1.4s ease-in-out infinite;
|
|
134
|
-
`:null,iL=t=>{const{classes:e,variant:n,color:i,disableShrink:r}=t,s={root:["root",n,`color${pe(i)}`],svg:["svg"],track:["track"],circle:["circle",`circle${pe(n)}`,r&&"circleDisableShrink"]};return _e(s,eL,e)},rL=ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${pe(n.color)}`]]}})(We(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:tL||{animation:`${Cv} 1.4s linear infinite`}},...Object.entries(t.palette).filter(gr()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),oL=ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),sL=ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${pe(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(We(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:nL||{animation:`${Tv} 1.4s ease-in-out infinite`}}]}))),lL=ge("circle",{name:"MuiCircularProgress",slot:"Track"})(We(({theme:t})=>({stroke:"currentColor",opacity:(t.vars||t).palette.action.activatedOpacity}))),sO=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiCircularProgress"}),{className:r,color:s="primary",disableShrink:a=!1,enableTrackSlot:c=!1,size:f=40,style:d,thickness:p=3.6,value:m=0,variant:v="indeterminate",...b}=i,O={...i,color:s,disableShrink:a,size:f,thickness:p,value:m,variant:v,enableTrackSlot:c},x=iL(O),C={},k={},$={};if(v==="determinate"){const z=2*Math.PI*((mr-p)/2);C.strokeDasharray=z.toFixed(3),$["aria-valuenow"]=Math.round(m),C.strokeDashoffset=`${((100-m)/100*z).toFixed(3)}px`,k.transform="rotate(-90deg)"}return S.jsx(rL,{className:ye(x.root,r),style:{width:f,height:f,...k,...d},ownerState:O,ref:n,role:"progressbar",...$,...b,children:S.jsxs(oL,{className:x.svg,ownerState:O,viewBox:`${mr/2} ${mr/2} ${mr} ${mr}`,children:[c?S.jsx(lL,{className:x.track,ownerState:O,cx:mr,cy:mr,r:(mr-p)/2,fill:"none",strokeWidth:p,"aria-hidden":"true"}):null,S.jsx(sL,{className:x.circle,style:C,ownerState:O,cx:mr,cy:mr,r:(mr-p)/2,fill:"none",strokeWidth:p})]})})});function aL(t){return Qe("MuiPaper",t)}Le("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"]);const cL=t=>{const{square:e,elevation:n,variant:i,classes:r}=t,s={root:["root",i,!e&&"rounded",i==="elevation"&&`elevation${n}`]};return _e(s,aL,r)},uL=ge("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(We(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),cc=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiPaper"}),r=xr(),{className:s,component:a="div",elevation:c=1,square:f=!1,variant:d="elevation",...p}=i,m={...i,component:a,elevation:c,square:f,variant:d},v=cL(m);return S.jsx(uL,{as:a,ownerState:m,className:ye(v.root,s),ref:n,...p,style:{...d==="elevation"&&{"--Paper-shadow":(r.vars||r).shadows[c],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[c]},...!r.vars&&r.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Ku("#fff",xv(c))}, ${Ku("#fff",xv(c))})`}},...p.style}})}),uT={};function JA(t,e){const n=E.useRef(uT);return n.current===uT&&(n.current=t(e)),n}const fL=[];function hL(t){E.useEffect(t,fL)}class gm{static create(){return new gm}currentId=null;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function gl(){const t=JA(gm.create).current;return hL(t.disposeEffect),t}function Ia(t){try{return t.matches(":focus-visible")}catch{}return!1}function zl(t){return parseInt(E.version,10)>=19?t?.props?.ref||null:t?.ref||null}function lO(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}function kv(t,e){return kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kv(t,e)}function eR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,kv(t,e)}var tR=_E();const od=jb(tR),fT={disabled:!1},Op=Ei.createContext(null);var dL=function(e){return e.scrollTop},Au="unmounted",fl="exited",hl="entering",wa="entered",Ev="exiting",lr=(function(t){eR(e,t);function e(i,r){var s;s=t.call(this,i,r)||this;var a=r,c=a&&!a.isMounting?i.enter:i.appear,f;return s.appearStatus=null,i.in?c?(f=fl,s.appearStatus=hl):f=wa:i.unmountOnExit||i.mountOnEnter?f=Au:f=fl,s.state={status:f},s.nextCallback=null,s}e.getDerivedStateFromProps=function(r,s){var a=r.in;return a&&s.status===Au?{status:fl}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var s=null;if(r!==this.props){var a=this.state.status;this.props.in?a!==hl&&a!==wa&&(s=hl):(a===hl||a===wa)&&(s=Ev)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,s,a,c;return s=a=c=r,r!=null&&typeof r!="number"&&(s=r.exit,a=r.enter,c=r.appear!==void 0?r.appear:a),{exit:s,enter:a,appear:c}},n.updateStatus=function(r,s){if(r===void 0&&(r=!1),s!==null)if(this.cancelNextCallback(),s===hl){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:od.findDOMNode(this);a&&dL(a)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===fl&&this.setState({status:Au})},n.performEnter=function(r){var s=this,a=this.props.enter,c=this.context?this.context.isMounting:r,f=this.props.nodeRef?[c]:[od.findDOMNode(this),c],d=f[0],p=f[1],m=this.getTimeouts(),v=c?m.appear:m.enter;if(!r&&!a||fT.disabled){this.safeSetState({status:wa},function(){s.props.onEntered(d)});return}this.props.onEnter(d,p),this.safeSetState({status:hl},function(){s.props.onEntering(d,p),s.onTransitionEnd(v,function(){s.safeSetState({status:wa},function(){s.props.onEntered(d,p)})})})},n.performExit=function(){var r=this,s=this.props.exit,a=this.getTimeouts(),c=this.props.nodeRef?void 0:od.findDOMNode(this);if(!s||fT.disabled){this.safeSetState({status:fl},function(){r.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:Ev},function(){r.props.onExiting(c),r.onTransitionEnd(a.exit,function(){r.safeSetState({status:fl},function(){r.props.onExited(c)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,s){s=this.setNextCallback(s),this.setState(r,s)},n.setNextCallback=function(r){var s=this,a=!0;return this.nextCallback=function(c){a&&(a=!1,s.nextCallback=null,r(c))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(r,s){this.setNextCallback(s);var a=this.props.nodeRef?this.props.nodeRef.current:od.findDOMNode(this),c=r==null&&!this.props.addEndListener;if(!a||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],d=f[0],p=f[1];this.props.addEndListener(d,p)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===Au)return null;var s=this.props,a=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var c=lO(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ei.createElement(Op.Provider,{value:null},typeof a=="function"?a(r,c):Ei.cloneElement(Ei.Children.only(a),c))},e})(Ei.Component);lr.contextType=Op;lr.propTypes={};function Oa(){}lr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Oa,onEntering:Oa,onEntered:Oa,onExit:Oa,onExiting:Oa,onExited:Oa};lr.UNMOUNTED=Au;lr.EXITED=fl;lr.ENTERING=hl;lr.ENTERED=wa;lr.EXITING=Ev;function pL(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aO(t,e){var n=function(s){return e&&E.isValidElement(s)?e(s):s},i=Object.create(null);return t&&E.Children.map(t,function(r){return r}).forEach(function(r){i[r.key]=n(r)}),i}function mL(t,e){t=t||{},e=e||{};function n(p){return p in e?e[p]:t[p]}var i=Object.create(null),r=[];for(var s in t)s in e?r.length&&(i[s]=r,r=[]):r.push(s);var a,c={};for(var f in e){if(i[f])for(a=0;a<i[f].length;a++){var d=i[f][a];c[i[f][a]]=n(d)}c[f]=n(f)}for(a=0;a<r.length;a++)c[r[a]]=n(r[a]);return c}function yl(t,e,n){return n[e]!=null?n[e]:t.props[e]}function gL(t,e){return aO(t.children,function(n){return E.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:yl(n,"appear",t),enter:yl(n,"enter",t),exit:yl(n,"exit",t)})})}function yL(t,e,n){var i=aO(t.children),r=mL(e,i);return Object.keys(r).forEach(function(s){var a=r[s];if(E.isValidElement(a)){var c=s in e,f=s in i,d=e[s],p=E.isValidElement(d)&&!d.props.in;f&&(!c||p)?r[s]=E.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:yl(a,"exit",t),enter:yl(a,"enter",t)}):!f&&c&&!p?r[s]=E.cloneElement(a,{in:!1}):f&&c&&E.isValidElement(d)&&(r[s]=E.cloneElement(a,{onExited:n.bind(null,a),in:d.props.in,exit:yl(a,"exit",t),enter:yl(a,"enter",t)}))}}),r}var vL=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},bL={component:"div",childFactory:function(e){return e}},cO=(function(t){eR(e,t);function e(i,r){var s;s=t.call(this,i,r)||this;var a=s.handleExited.bind(pL(s));return s.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(r,s){var a=s.children,c=s.handleExited,f=s.firstRender;return{children:f?gL(r,c):yL(r,a,c),firstRender:!1}},n.handleExited=function(r,s){var a=aO(this.props.children);r.key in a||(r.props.onExited&&r.props.onExited(s),this.mounted&&this.setState(function(c){var f=Wu({},c.children);return delete f[r.key],{children:f}}))},n.render=function(){var r=this.props,s=r.component,a=r.childFactory,c=lO(r,["component","childFactory"]),f=this.state.contextValue,d=vL(this.state.children).map(a);return delete c.appear,delete c.enter,delete c.exit,s===null?Ei.createElement(Op.Provider,{value:f},d):Ei.createElement(Op.Provider,{value:f},Ei.createElement(s,c,d))},e})(Ei.Component);cO.propTypes={};cO.defaultProps=bL;const uO=t=>t.scrollTop;function Ms(t,e){const{timeout:n,easing:i,style:r={}}=t;return{duration:r.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:r.transitionTimingFunction??(typeof i=="object"?i[e.mode]:i),delay:r.transitionDelay}}function pn(...t){const e=E.useRef(void 0),n=E.useCallback(i=>{const r=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,c=a(i);return typeof c=="function"?c:()=>{a(null)}}return s.current=i,()=>{s.current=null}});return()=>{r.forEach(s=>s?.())}},t);return E.useMemo(()=>t.every(i=>i==null)?null:i=>{e.current&&(e.current(),e.current=void 0),i!=null&&(e.current=n(i))},t)}function Av(t){return`scale(${t}, ${t**2})`}const OL={entering:{opacity:1,transform:Av(1)},entered:{opacity:1,transform:"none"}},my=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ju=E.forwardRef(function(e,n){const{addEndListener:i,appear:r=!0,children:s,easing:a,in:c,onEnter:f,onEntered:d,onEntering:p,onExit:m,onExited:v,onExiting:b,style:O,timeout:x="auto",TransitionComponent:C=lr,...k}=e,$=gl(),z=E.useRef(),D=xr(),R=E.useRef(null),B=pn(R,zl(s),n),M=V=>L=>{if(V){const X=R.current;L===void 0?V(X):V(X,L)}},j=M(p),N=M((V,L)=>{uO(V);const{duration:X,delay:Y,easing:K}=Ms({style:O,timeout:x,easing:a},{mode:"enter"});let le;x==="auto"?(le=D.transitions.getAutoHeightDuration(V.clientHeight),z.current=le):le=X,V.style.transition=[D.transitions.create("opacity",{duration:le,delay:Y}),D.transitions.create("transform",{duration:my?le:le*.666,delay:Y,easing:K})].join(","),f&&f(V,L)}),A=M(d),Q=M(b),T=M(V=>{const{duration:L,delay:X,easing:Y}=Ms({style:O,timeout:x,easing:a},{mode:"exit"});let K;x==="auto"?(K=D.transitions.getAutoHeightDuration(V.clientHeight),z.current=K):K=L,V.style.transition=[D.transitions.create("opacity",{duration:K,delay:X}),D.transitions.create("transform",{duration:my?K:K*.666,delay:my?X:X||K*.333,easing:Y})].join(","),V.style.opacity=0,V.style.transform=Av(.75),m&&m(V)}),U=M(v),q=V=>{x==="auto"&&$.start(z.current||0,V),i&&i(R.current,V)};return S.jsx(C,{appear:r,in:c,nodeRef:R,onEnter:N,onEntered:A,onEntering:j,onExit:T,onExited:U,onExiting:Q,addEndListener:q,timeout:x==="auto"?null:x,...k,children:(V,{ownerState:L,...X})=>E.cloneElement(s,{style:{opacity:0,transform:Av(.75),visibility:V==="exited"&&!c?"hidden":void 0,...OL[V],...O,...s.props.style},ref:B,...X})})});Ju&&(Ju.muiSupportAuto=!0);function In(t){return t&&t.ownerDocument||document}var hi="top",ir="bottom",rr="right",di="left",fO="auto",Df=[hi,ir,rr,di],Ha="start",ef="end",SL="clippingParents",nR="viewport",uu="popper",xL="reference",hT=Df.reduce(function(t,e){return t.concat([e+"-"+Ha,e+"-"+ef])},[]),iR=[].concat(Df,[fO]).reduce(function(t,e){return t.concat([e,e+"-"+Ha,e+"-"+ef])},[]),wL="beforeRead",CL="read",TL="afterRead",kL="beforeMain",EL="main",AL="afterMain",RL="beforeWrite",ML="write",DL="afterWrite",PL=[wL,CL,TL,kL,EL,AL,RL,ML,DL];function Kr(t){return t?(t.nodeName||"").toLowerCase():null}function Di(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Tl(t){var e=Di(t).Element;return t instanceof e||t instanceof Element}function Ji(t){var e=Di(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function hO(t){if(typeof ShadowRoot>"u")return!1;var e=Di(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function zL(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},r=e.attributes[n]||{},s=e.elements[n];!Ji(s)||!Kr(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(a){var c=r[a];c===!1?s.removeAttribute(a):s.setAttribute(a,c===!0?"":c)}))})}function $L(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],s=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),c=a.reduce(function(f,d){return f[d]="",f},{});!Ji(r)||!Kr(r)||(Object.assign(r.style,c),Object.keys(s).forEach(function(f){r.removeAttribute(f)}))})}}const BL={name:"applyStyles",enabled:!0,phase:"write",fn:zL,effect:$L,requires:["computeStyles"]};function Fr(t){return t.split("-")[0]}var Sl=Math.max,Sp=Math.min,Va=Math.round;function Rv(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function rR(){return!/^((?!chrome|android).)*safari/i.test(Rv())}function Wa(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),r=1,s=1;e&&Ji(t)&&(r=t.offsetWidth>0&&Va(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&Va(i.height)/t.offsetHeight||1);var a=Tl(t)?Di(t):window,c=a.visualViewport,f=!rR()&&n,d=(i.left+(f&&c?c.offsetLeft:0))/r,p=(i.top+(f&&c?c.offsetTop:0))/s,m=i.width/r,v=i.height/s;return{width:m,height:v,top:p,right:d+m,bottom:p+v,left:d,x:d,y:p}}function dO(t){var e=Wa(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function oR(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&hO(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Qo(t){return Di(t).getComputedStyle(t)}function jL(t){return["table","td","th"].indexOf(Kr(t))>=0}function Ns(t){return((Tl(t)?t.ownerDocument:t.document)||window.document).documentElement}function ym(t){return Kr(t)==="html"?t:t.assignedSlot||t.parentNode||(hO(t)?t.host:null)||Ns(t)}function dT(t){return!Ji(t)||Qo(t).position==="fixed"?null:t.offsetParent}function QL(t){var e=/firefox/i.test(Rv()),n=/Trident/i.test(Rv());if(n&&Ji(t)){var i=Qo(t);if(i.position==="fixed")return null}var r=ym(t);for(hO(r)&&(r=r.host);Ji(r)&&["html","body"].indexOf(Kr(r))<0;){var s=Qo(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Pf(t){for(var e=Di(t),n=dT(t);n&&jL(n)&&Qo(n).position==="static";)n=dT(n);return n&&(Kr(n)==="html"||Kr(n)==="body"&&Qo(n).position==="static")?e:n||QL(t)||e}function pO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Bu(t,e,n){return Sl(t,Sp(e,n))}function LL(t,e,n){var i=Bu(t,e,n);return i>n?n:i}function sR(){return{top:0,right:0,bottom:0,left:0}}function lR(t){return Object.assign({},sR(),t)}function aR(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var NL=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,lR(typeof e!="number"?e:aR(e,Df))};function _L(t){var e,n=t.state,i=t.name,r=t.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,c=Fr(n.placement),f=pO(c),d=[di,rr].indexOf(c)>=0,p=d?"height":"width";if(!(!s||!a)){var m=NL(r.padding,n),v=dO(s),b=f==="y"?hi:di,O=f==="y"?ir:rr,x=n.rects.reference[p]+n.rects.reference[f]-a[f]-n.rects.popper[p],C=a[f]-n.rects.reference[f],k=Pf(s),$=k?f==="y"?k.clientHeight||0:k.clientWidth||0:0,z=x/2-C/2,D=m[b],R=$-v[p]-m[O],B=$/2-v[p]/2+z,M=Bu(D,B,R),j=f;n.modifiersData[i]=(e={},e[j]=M,e.centerOffset=M-B,e)}}function qL(t){var e=t.state,n=t.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||oR(e.elements.popper,r)&&(e.elements.arrow=r))}const UL={name:"arrow",enabled:!0,phase:"main",fn:_L,effect:qL,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xa(t){return t.split("-")[1]}var IL={top:"auto",right:"auto",bottom:"auto",left:"auto"};function HL(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:Va(n*r)/r||0,y:Va(i*r)/r||0}}function pT(t){var e,n=t.popper,i=t.popperRect,r=t.placement,s=t.variation,a=t.offsets,c=t.position,f=t.gpuAcceleration,d=t.adaptive,p=t.roundOffsets,m=t.isFixed,v=a.x,b=v===void 0?0:v,O=a.y,x=O===void 0?0:O,C=typeof p=="function"?p({x:b,y:x}):{x:b,y:x};b=C.x,x=C.y;var k=a.hasOwnProperty("x"),$=a.hasOwnProperty("y"),z=di,D=hi,R=window;if(d){var B=Pf(n),M="clientHeight",j="clientWidth";if(B===Di(n)&&(B=Ns(n),Qo(B).position!=="static"&&c==="absolute"&&(M="scrollHeight",j="scrollWidth")),B=B,r===hi||(r===di||r===rr)&&s===ef){D=ir;var N=m&&B===R&&R.visualViewport?R.visualViewport.height:B[M];x-=N-i.height,x*=f?1:-1}if(r===di||(r===hi||r===ir)&&s===ef){z=rr;var A=m&&B===R&&R.visualViewport?R.visualViewport.width:B[j];b-=A-i.width,b*=f?1:-1}}var Q=Object.assign({position:c},d&&IL),T=p===!0?HL({x:b,y:x},Di(n)):{x:b,y:x};if(b=T.x,x=T.y,f){var U;return Object.assign({},Q,(U={},U[D]=$?"0":"",U[z]=k?"0":"",U.transform=(R.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",U))}return Object.assign({},Q,(e={},e[D]=$?x+"px":"",e[z]=k?b+"px":"",e.transform="",e))}function VL(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=i===void 0?!0:i,s=n.adaptive,a=s===void 0?!0:s,c=n.roundOffsets,f=c===void 0?!0:c,d={placement:Fr(e.placement),variation:Xa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,pT(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,pT(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const WL={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:VL,data:{}};var sd={passive:!0};function XL(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,s=r===void 0?!0:r,a=i.resize,c=a===void 0?!0:a,f=Di(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&d.forEach(function(p){p.addEventListener("scroll",n.update,sd)}),c&&f.addEventListener("resize",n.update,sd),function(){s&&d.forEach(function(p){p.removeEventListener("scroll",n.update,sd)}),c&&f.removeEventListener("resize",n.update,sd)}}const GL={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:XL,data:{}};var FL={left:"right",right:"left",bottom:"top",top:"bottom"};function Jd(t){return t.replace(/left|right|bottom|top/g,function(e){return FL[e]})}var YL={start:"end",end:"start"};function mT(t){return t.replace(/start|end/g,function(e){return YL[e]})}function mO(t){var e=Di(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function gO(t){return Wa(Ns(t)).left+mO(t).scrollLeft}function KL(t,e){var n=Di(t),i=Ns(t),r=n.visualViewport,s=i.clientWidth,a=i.clientHeight,c=0,f=0;if(r){s=r.width,a=r.height;var d=rR();(d||!d&&e==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}return{width:s,height:a,x:c+gO(t),y:f}}function ZL(t){var e,n=Ns(t),i=mO(t),r=(e=t.ownerDocument)==null?void 0:e.body,s=Sl(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Sl(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),c=-i.scrollLeft+gO(t),f=-i.scrollTop;return Qo(r||n).direction==="rtl"&&(c+=Sl(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:c,y:f}}function yO(t){var e=Qo(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function cR(t){return["html","body","#document"].indexOf(Kr(t))>=0?t.ownerDocument.body:Ji(t)&&yO(t)?t:cR(ym(t))}function ju(t,e){var n;e===void 0&&(e=[]);var i=cR(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=Di(i),a=r?[s].concat(s.visualViewport||[],yO(i)?i:[]):i,c=e.concat(a);return r?c:c.concat(ju(ym(a)))}function Mv(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function JL(t,e){var n=Wa(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function gT(t,e,n){return e===nR?Mv(KL(t,n)):Tl(e)?JL(e,n):Mv(ZL(Ns(t)))}function eN(t){var e=ju(ym(t)),n=["absolute","fixed"].indexOf(Qo(t).position)>=0,i=n&&Ji(t)?Pf(t):t;return Tl(i)?e.filter(function(r){return Tl(r)&&oR(r,i)&&Kr(r)!=="body"}):[]}function tN(t,e,n,i){var r=e==="clippingParents"?eN(t):[].concat(e),s=[].concat(r,[n]),a=s[0],c=s.reduce(function(f,d){var p=gT(t,d,i);return f.top=Sl(p.top,f.top),f.right=Sp(p.right,f.right),f.bottom=Sp(p.bottom,f.bottom),f.left=Sl(p.left,f.left),f},gT(t,a,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function uR(t){var e=t.reference,n=t.element,i=t.placement,r=i?Fr(i):null,s=i?Xa(i):null,a=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,f;switch(r){case hi:f={x:a,y:e.y-n.height};break;case ir:f={x:a,y:e.y+e.height};break;case rr:f={x:e.x+e.width,y:c};break;case di:f={x:e.x-n.width,y:c};break;default:f={x:e.x,y:e.y}}var d=r?pO(r):null;if(d!=null){var p=d==="y"?"height":"width";switch(s){case Ha:f[d]=f[d]-(e[p]/2-n[p]/2);break;case ef:f[d]=f[d]+(e[p]/2-n[p]/2);break}}return f}function tf(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=i===void 0?t.placement:i,s=n.strategy,a=s===void 0?t.strategy:s,c=n.boundary,f=c===void 0?SL:c,d=n.rootBoundary,p=d===void 0?nR:d,m=n.elementContext,v=m===void 0?uu:m,b=n.altBoundary,O=b===void 0?!1:b,x=n.padding,C=x===void 0?0:x,k=lR(typeof C!="number"?C:aR(C,Df)),$=v===uu?xL:uu,z=t.rects.popper,D=t.elements[O?$:v],R=tN(Tl(D)?D:D.contextElement||Ns(t.elements.popper),f,p,a),B=Wa(t.elements.reference),M=uR({reference:B,element:z,placement:r}),j=Mv(Object.assign({},z,M)),N=v===uu?j:B,A={top:R.top-N.top+k.top,bottom:N.bottom-R.bottom+k.bottom,left:R.left-N.left+k.left,right:N.right-R.right+k.right},Q=t.modifiersData.offset;if(v===uu&&Q){var T=Q[r];Object.keys(A).forEach(function(U){var q=[rr,ir].indexOf(U)>=0?1:-1,V=[hi,ir].indexOf(U)>=0?"y":"x";A[U]+=T[V]*q})}return A}function nN(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=n.boundary,s=n.rootBoundary,a=n.padding,c=n.flipVariations,f=n.allowedAutoPlacements,d=f===void 0?iR:f,p=Xa(i),m=p?c?hT:hT.filter(function(O){return Xa(O)===p}):Df,v=m.filter(function(O){return d.indexOf(O)>=0});v.length===0&&(v=m);var b=v.reduce(function(O,x){return O[x]=tf(t,{placement:x,boundary:r,rootBoundary:s,padding:a})[Fr(x)],O},{});return Object.keys(b).sort(function(O,x){return b[O]-b[x]})}function iN(t){if(Fr(t)===fO)return[];var e=Jd(t);return[mT(t),e,mT(e)]}function rN(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,s=r===void 0?!0:r,a=n.altAxis,c=a===void 0?!0:a,f=n.fallbackPlacements,d=n.padding,p=n.boundary,m=n.rootBoundary,v=n.altBoundary,b=n.flipVariations,O=b===void 0?!0:b,x=n.allowedAutoPlacements,C=e.options.placement,k=Fr(C),$=k===C,z=f||($||!O?[Jd(C)]:iN(C)),D=[C].concat(z).reduce(function(W,ce){return W.concat(Fr(ce)===fO?nN(e,{placement:ce,boundary:p,rootBoundary:m,padding:d,flipVariations:O,allowedAutoPlacements:x}):ce)},[]),R=e.rects.reference,B=e.rects.popper,M=new Map,j=!0,N=D[0],A=0;A<D.length;A++){var Q=D[A],T=Fr(Q),U=Xa(Q)===Ha,q=[hi,ir].indexOf(T)>=0,V=q?"width":"height",L=tf(e,{placement:Q,boundary:p,rootBoundary:m,altBoundary:v,padding:d}),X=q?U?rr:di:U?ir:hi;R[V]>B[V]&&(X=Jd(X));var Y=Jd(X),K=[];if(s&&K.push(L[T]<=0),c&&K.push(L[X]<=0,L[Y]<=0),K.every(function(W){return W})){N=Q,j=!1;break}M.set(Q,K)}if(j)for(var le=O?3:1,_=function(ce){var ne=D.find(function(he){var Se=M.get(he);if(Se)return Se.slice(0,ce).every(function(ke){return ke})});if(ne)return N=ne,"break"},G=le;G>0;G--){var se=_(G);if(se==="break")break}e.placement!==N&&(e.modifiersData[i]._skip=!0,e.placement=N,e.reset=!0)}}const oN={name:"flip",enabled:!0,phase:"main",fn:rN,requiresIfExists:["offset"],data:{_skip:!1}};function yT(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function vT(t){return[hi,rr,ir,di].some(function(e){return t[e]>=0})}function sN(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,a=tf(e,{elementContext:"reference"}),c=tf(e,{altBoundary:!0}),f=yT(a,i),d=yT(c,r,s),p=vT(f),m=vT(d);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":m})}const lN={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sN};function aN(t,e,n){var i=Fr(t),r=[di,hi].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=s[0],c=s[1];return a=a||0,c=(c||0)*r,[di,rr].indexOf(i)>=0?{x:c,y:a}:{x:a,y:c}}function cN(t){var e=t.state,n=t.options,i=t.name,r=n.offset,s=r===void 0?[0,0]:r,a=iR.reduce(function(p,m){return p[m]=aN(m,e.rects,s),p},{}),c=a[e.placement],f=c.x,d=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=a}const uN={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cN};function fN(t){var e=t.state,n=t.name;e.modifiersData[n]=uR({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const hN={name:"popperOffsets",enabled:!0,phase:"read",fn:fN,data:{}};function dN(t){return t==="x"?"y":"x"}function pN(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,s=r===void 0?!0:r,a=n.altAxis,c=a===void 0?!1:a,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.padding,v=n.tether,b=v===void 0?!0:v,O=n.tetherOffset,x=O===void 0?0:O,C=tf(e,{boundary:f,rootBoundary:d,padding:m,altBoundary:p}),k=Fr(e.placement),$=Xa(e.placement),z=!$,D=pO(k),R=dN(D),B=e.modifiersData.popperOffsets,M=e.rects.reference,j=e.rects.popper,N=typeof x=="function"?x(Object.assign({},e.rects,{placement:e.placement})):x,A=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),Q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,T={x:0,y:0};if(B){if(s){var U,q=D==="y"?hi:di,V=D==="y"?ir:rr,L=D==="y"?"height":"width",X=B[D],Y=X+C[q],K=X-C[V],le=b?-j[L]/2:0,_=$===Ha?M[L]:j[L],G=$===Ha?-j[L]:-M[L],se=e.elements.arrow,W=b&&se?dO(se):{width:0,height:0},ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:sR(),ne=ce[q],he=ce[V],Se=Bu(0,M[L],W[L]),ke=z?M[L]/2-le-Se-ne-A.mainAxis:_-Se-ne-A.mainAxis,xe=z?-M[L]/2+le+Se+he+A.mainAxis:G+Se+he+A.mainAxis,Re=e.elements.arrow&&Pf(e.elements.arrow),Pe=Re?D==="y"?Re.clientTop||0:Re.clientLeft||0:0,at=(U=Q?.[D])!=null?U:0,qe=X+ke-at-Pe,ct=X+xe-at,At=Bu(b?Sp(Y,qe):Y,X,b?Sl(K,ct):K);B[D]=At,T[D]=At-X}if(c){var Ke,nt=D==="x"?hi:di,Ze=D==="x"?ir:rr,dt=B[R],Ve=R==="y"?"height":"width",Ee=dt+C[nt],Pi=dt-C[Ze],$t=[hi,di].indexOf(k)!==-1,cr=(Ke=Q?.[R])!=null?Ke:0,Vt=$t?Ee:dt-M[Ve]-j[Ve]-cr+A.altAxis,st=$t?dt+M[Ve]+j[Ve]-cr-A.altAxis:Pi,Bt=b&&$t?LL(Vt,dt,st):Bu(b?Vt:Ee,dt,b?st:Pi);B[R]=Bt,T[R]=Bt-dt}e.modifiersData[i]=T}}const mN={name:"preventOverflow",enabled:!0,phase:"main",fn:pN,requiresIfExists:["offset"]};function gN(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yN(t){return t===Di(t)||!Ji(t)?mO(t):gN(t)}function vN(t){var e=t.getBoundingClientRect(),n=Va(e.width)/t.offsetWidth||1,i=Va(e.height)/t.offsetHeight||1;return n!==1||i!==1}function bN(t,e,n){n===void 0&&(n=!1);var i=Ji(e),r=Ji(e)&&vN(e),s=Ns(e),a=Wa(t,r,n),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&((Kr(e)!=="body"||yO(s))&&(c=yN(e)),Ji(e)?(f=Wa(e,!0),f.x+=e.clientLeft,f.y+=e.clientTop):s&&(f.x=gO(s))),{x:a.left+c.scrollLeft-f.x,y:a.top+c.scrollTop-f.y,width:a.width,height:a.height}}function ON(t){var e=new Map,n=new Set,i=[];t.forEach(function(s){e.set(s.name,s)});function r(s){n.add(s.name);var a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(c){if(!n.has(c)){var f=e.get(c);f&&r(f)}}),i.push(s)}return t.forEach(function(s){n.has(s.name)||r(s)}),i}function SN(t){var e=ON(t);return PL.reduce(function(n,i){return n.concat(e.filter(function(r){return r.phase===i}))},[])}function xN(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function wN(t){var e=t.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var bT={placement:"bottom",modifiers:[],strategy:"absolute"};function OT(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function CN(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,r=e.defaultOptions,s=r===void 0?bT:r;return function(c,f,d){d===void 0&&(d=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},bT,s),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},m=[],v=!1,b={state:p,setOptions:function(k){var $=typeof k=="function"?k(p.options):k;x(),p.options=Object.assign({},s,p.options,$),p.scrollParents={reference:Tl(c)?ju(c):c.contextElement?ju(c.contextElement):[],popper:ju(f)};var z=SN(wN([].concat(i,p.options.modifiers)));return p.orderedModifiers=z.filter(function(D){return D.enabled}),O(),b.update()},forceUpdate:function(){if(!v){var k=p.elements,$=k.reference,z=k.popper;if(OT($,z)){p.rects={reference:bN($,Pf(z),p.options.strategy==="fixed"),popper:dO(z)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(A){return p.modifiersData[A.name]=Object.assign({},A.data)});for(var D=0;D<p.orderedModifiers.length;D++){if(p.reset===!0){p.reset=!1,D=-1;continue}var R=p.orderedModifiers[D],B=R.fn,M=R.options,j=M===void 0?{}:M,N=R.name;typeof B=="function"&&(p=B({state:p,options:j,name:N,instance:b})||p)}}}},update:xN(function(){return new Promise(function(C){b.forceUpdate(),C(p)})}),destroy:function(){x(),v=!0}};if(!OT(c,f))return b;b.setOptions(d).then(function(C){!v&&d.onFirstUpdate&&d.onFirstUpdate(C)});function O(){p.orderedModifiers.forEach(function(C){var k=C.name,$=C.options,z=$===void 0?{}:$,D=C.effect;if(typeof D=="function"){var R=D({state:p,name:k,instance:b,options:z}),B=function(){};m.push(R||B)}})}function x(){m.forEach(function(C){return C()}),m=[]}return b}}var TN=[GL,hN,WL,BL,uN,oN,mN,UL,lN],kN=CN({defaultModifiers:TN});function xp(t){return typeof t=="string"}function fR(t,e,n){return t===void 0||xp(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function hR(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(i=>i.match(/^on[A-Z]/)&&typeof t[i]=="function"&&!e.includes(i)).forEach(i=>{n[i]=t[i]}),n}function ST(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function dR(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:i,externalForwardedProps:r,className:s}=t;if(!e){const b=ye(n?.className,s,r?.className,i?.className),O={...n?.style,...r?.style,...i?.style},x={...n,...r,...i};return b.length>0&&(x.className=b),Object.keys(O).length>0&&(x.style=O),{props:x,internalRef:void 0}}const a=hR({...r,...i}),c=ST(i),f=ST(r),d=e(a),p=ye(d?.className,n?.className,s,r?.className,i?.className),m={...d?.style,...n?.style,...r?.style,...i?.style},v={...d,...n,...f,...c};return p.length>0&&(v.className=p),Object.keys(m).length>0&&(v.style=m),{props:v,internalRef:d.ref}}function pR(t,e,n){return typeof t=="function"?t(e,n):t}function Ga(t){const{elementType:e,externalSlotProps:n,ownerState:i,skipResolvingSlotProps:r=!1,...s}=t,a=r?{}:pR(n,i),{props:c,internalRef:f}=dR({...s,externalSlotProps:a}),d=pn(f,a?.ref,t.additionalProps?.ref);return fR(e,{...c,ref:d},i)}function xT(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function EN(t){return typeof t=="function"?t():t}const mR=E.forwardRef(function(e,n){const{children:i,container:r,disablePortal:s=!1}=e,[a,c]=E.useState(null),f=pn(E.isValidElement(i)?zl(i):null,n);if(nr(()=>{s||c(EN(r)||document.body)},[r,s]),nr(()=>{if(a&&!s)return xT(n,a),()=>{xT(n,null)}},[n,a,s]),s){if(E.isValidElement(i)){const d={ref:f};return E.cloneElement(i,d)}return i}return a&&tR.createPortal(i,a)});function AN(t){return Qe("MuiPopper",t)}Le("MuiPopper",["root"]);function RN(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function Dv(t){return typeof t=="function"?t():t}function MN(t){return t.nodeType!==void 0}const DN=t=>{const{classes:e}=t;return _e({root:["root"]},AN,e)},PN={},zN=E.forwardRef(function(e,n){const{anchorEl:i,children:r,direction:s,disablePortal:a,modifiers:c,open:f,placement:d,popperOptions:p,popperRef:m,slotProps:v={},slots:b={},TransitionProps:O,ownerState:x,...C}=e,k=E.useRef(null),$=pn(k,n),z=E.useRef(null),D=pn(z,m),R=E.useRef(D);nr(()=>{R.current=D},[D]),E.useImperativeHandle(m,()=>z.current,[]);const B=RN(d,s),[M,j]=E.useState(B),[N,A]=E.useState(Dv(i));E.useEffect(()=>{z.current&&z.current.forceUpdate()}),E.useEffect(()=>{i&&A(Dv(i))},[i]),nr(()=>{if(!N||!f)return;const V=Y=>{j(Y.placement)};let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Y})=>{V(Y)}}];c!=null&&(L=L.concat(c)),p&&p.modifiers!=null&&(L=L.concat(p.modifiers));const X=kN(N,k.current,{placement:B,...p,modifiers:L});return R.current(X),()=>{X.destroy(),R.current(null)}},[N,a,c,f,p,B]);const Q={placement:M};O!==null&&(Q.TransitionProps=O);const T=DN(e),U=b.root??"div",q=Ga({elementType:U,externalSlotProps:v.root,externalForwardedProps:C,additionalProps:{role:"tooltip",ref:$},ownerState:e,className:T.root});return S.jsx(U,{...q,children:typeof r=="function"?r(Q):r})}),$N=E.forwardRef(function(e,n){const{anchorEl:i,children:r,container:s,direction:a="ltr",disablePortal:c=!1,keepMounted:f=!1,modifiers:d,open:p,placement:m="bottom",popperOptions:v=PN,popperRef:b,style:O,transition:x=!1,slotProps:C={},slots:k={},...$}=e,[z,D]=E.useState(!0),R=()=>{D(!1)},B=()=>{D(!0)};if(!f&&!p&&(!x||z))return null;let M;if(s)M=s;else if(i){const A=Dv(i);M=A&&MN(A)?In(A).body:In(null).body}const j=!p&&f&&(!x||z)?"none":void 0,N=x?{in:p,onEnter:R,onExited:B}:void 0;return S.jsx(mR,{disablePortal:c,container:M,children:S.jsx(zN,{anchorEl:i,direction:a,disablePortal:c,modifiers:d,ref:n,open:x?!z:p,placement:m,popperOptions:v,popperRef:b,slotProps:C,slots:k,...$,style:{position:"fixed",top:0,left:0,display:j,...O},TransitionProps:N,children:r})})}),BN=ge($N,{name:"MuiPopper",slot:"Root"})({}),gR=E.forwardRef(function(e,n){const i=sc(),r=je({props:e,name:"MuiPopper"}),{anchorEl:s,component:a,components:c,componentsProps:f,container:d,disablePortal:p,keepMounted:m,modifiers:v,open:b,placement:O,popperOptions:x,popperRef:C,transition:k,slots:$,slotProps:z,...D}=r,R=$?.root??c?.Root,B={anchorEl:s,container:d,disablePortal:p,keepMounted:m,modifiers:v,open:b,placement:O,popperOptions:x,popperRef:C,transition:k,...D};return S.jsx(BN,{as:a,direction:i?"rtl":"ltr",slots:{root:R},slotProps:z??f,...B,ref:n})});function er(t){const e=E.useRef(t);return nr(()=>{e.current=t}),E.useRef((...n)=>(0,e.current)(...n)).current}function yR(t){const{controlled:e,default:n,name:i,state:r="value"}=t,{current:s}=E.useRef(e!==void 0),[a,c]=E.useState(n),f=s?e:a,d=E.useCallback(p=>{s||c(p)},[]);return[f,d]}function Ie(t,e){const{className:n,elementType:i,ownerState:r,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:c=!1,...f}=e,{component:d,slots:p={[t]:void 0},slotProps:m={[t]:void 0},...v}=s,b=p[t]||i,O=pR(m[t],r),{props:{component:x,...C},internalRef:k}=dR({className:n,...f,externalForwardedProps:t==="root"?v:void 0,externalSlotProps:O}),$=pn(k,O?.ref,e.ref),z=t==="root"?x||d:x,D=fR(b,{...t==="root"&&!d&&!p[t]&&a,...t!=="root"&&!p[t]&&a,...C,...z&&!c&&{as:z},...z&&c&&{component:z},ref:$},r);return[b,D]}function jN(t){return Qe("MuiTooltip",t)}const Zt=Le("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function QN(t){return Math.round(t*1e5)/1e5}const LN=t=>{const{classes:e,disableInteractive:n,arrow:i,touch:r,placement:s}=t,a={popper:["popper",!n&&"popperInteractive",i&&"popperArrow"],tooltip:["tooltip",i&&"tooltipArrow",r&&"touch",`tooltipPlacement${pe(s.split("-")[0])}`],arrow:["arrow"]};return _e(a,jN,e)},NN=ge(gR,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(We(({theme:t})=>({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Zt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Zt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Zt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Zt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Zt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Zt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Zt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Zt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),_N=ge("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${pe(n.placement.split("-")[0])}`]]}})(We(({theme:t})=>({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:t.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium,[`.${Zt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Zt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Zt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${QN(16/14)}em`,fontWeight:t.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Zt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Zt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),qN=ge("span",{name:"MuiTooltip",slot:"Arrow"})(We(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:t.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let ld=!1;const wT=new gm;let fu={x:0,y:0};function ad(t,e){return(n,...i)=>{e&&e(n,...i),t(n,...i)}}const Ds=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTooltip"}),{arrow:r=!1,children:s,classes:a,components:c={},componentsProps:f={},describeChild:d=!1,disableFocusListener:p=!1,disableHoverListener:m=!1,disableInteractive:v=!1,disableTouchListener:b=!1,enterDelay:O=100,enterNextDelay:x=0,enterTouchDelay:C=700,followCursor:k=!1,id:$,leaveDelay:z=0,leaveTouchDelay:D=1500,onClose:R,onOpen:B,open:M,placement:j="bottom",PopperComponent:N,PopperProps:A={},slotProps:Q={},slots:T={},title:U,TransitionComponent:q,TransitionProps:V,...L}=i,X=E.isValidElement(s)?s:S.jsx("span",{children:s}),Y=xr(),K=sc(),[le,_]=E.useState(),[G,se]=E.useState(null),W=E.useRef(!1),ce=v||k,ne=gl(),he=gl(),Se=gl(),ke=gl(),[xe,Re]=yR({controlled:M,default:!1,name:"Tooltip",state:"open"});let Pe=xe;const at=dm($),qe=E.useRef(),ct=er(()=>{qe.current!==void 0&&(document.body.style.WebkitUserSelect=qe.current,qe.current=void 0),ke.clear()});E.useEffect(()=>ct,[ct]);const At=$e=>{wT.clear(),ld=!0,Re(!0),B&&!Pe&&B($e)},Ke=er($e=>{wT.start(800+z,()=>{ld=!1}),Re(!1),R&&Pe&&R($e),ne.start(Y.transitions.duration.shortest,()=>{W.current=!1})}),nt=$e=>{W.current&&$e.type!=="touchstart"||(le&&le.removeAttribute("title"),he.clear(),Se.clear(),O||ld&&x?he.start(ld?x:O,()=>{At($e)}):At($e))},Ze=$e=>{he.clear(),Se.start(z,()=>{Ke($e)})},[,dt]=E.useState(!1),Ve=$e=>{Ia($e.target)||(dt(!1),Ze($e))},Ee=$e=>{le||_($e.currentTarget),Ia($e.target)&&(dt(!0),nt($e))},Pi=$e=>{W.current=!0;const Jn=X.props;Jn.onTouchStart&&Jn.onTouchStart($e)},$t=$e=>{Pi($e),Se.clear(),ne.clear(),ct(),qe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ke.start(C,()=>{document.body.style.WebkitUserSelect=qe.current,nt($e)})},cr=$e=>{X.props.onTouchEnd&&X.props.onTouchEnd($e),ct(),Se.start(D,()=>{Ke($e)})};E.useEffect(()=>{if(!Pe)return;function $e(Jn){Jn.key==="Escape"&&Ke(Jn)}return document.addEventListener("keydown",$e),()=>{document.removeEventListener("keydown",$e)}},[Ke,Pe]);const Vt=pn(zl(X),_,n);!U&&U!==0&&(Pe=!1);const st=E.useRef(),Bt=$e=>{const Jn=X.props;Jn.onMouseMove&&Jn.onMouseMove($e),fu={x:$e.clientX,y:$e.clientY},st.current&&st.current.update()},on={},zi=typeof U=="string";d?(on.title=!Pe&&zi&&!m?U:null,on["aria-describedby"]=Pe?at:null):(on["aria-label"]=zi?U:null,on["aria-labelledby"]=Pe&&!zi?at:null);const Sn={...on,...L,...X.props,className:ye(L.className,X.props.className),onTouchStart:Pi,ref:Vt,...k?{onMouseMove:Bt}:{}},kr={};b||(Sn.onTouchStart=$t,Sn.onTouchEnd=cr),m||(Sn.onMouseOver=ad(nt,Sn.onMouseOver),Sn.onMouseLeave=ad(Ze,Sn.onMouseLeave),ce||(kr.onMouseOver=nt,kr.onMouseLeave=Ze)),p||(Sn.onFocus=ad(Ee,Sn.onFocus),Sn.onBlur=ad(Ve,Sn.onBlur),ce||(kr.onFocus=Ee,kr.onBlur=Ve));const Vn={...i,isRtl:K,arrow:r,disableInteractive:ce,placement:j,PopperComponentProp:N,touch:W.current},Wt=typeof Q.popper=="function"?Q.popper(Vn):Q.popper,Wn=E.useMemo(()=>{let $e=[{name:"arrow",enabled:!!G,options:{element:G,padding:4}}];return A.popperOptions?.modifiers&&($e=$e.concat(A.popperOptions.modifiers)),Wt?.popperOptions?.modifiers&&($e=$e.concat(Wt.popperOptions.modifiers)),{...A.popperOptions,...Wt?.popperOptions,modifiers:$e}},[G,A.popperOptions,Wt?.popperOptions]),mn=LN(Vn),pc=typeof Q.transition=="function"?Q.transition(Vn):Q.transition,ro={slots:{popper:c.Popper,transition:c.Transition??q,tooltip:c.Tooltip,arrow:c.Arrow,...T},slotProps:{arrow:Q.arrow??f.arrow,popper:{...A,...Wt??f.popper},tooltip:Q.tooltip??f.tooltip,transition:{...V,...pc??f.transition}}},[Uo,Io]=Ie("popper",{elementType:NN,externalForwardedProps:ro,ownerState:Vn,className:ye(mn.popper,A?.className)}),[Ho,Er]=Ie("transition",{elementType:Ju,externalForwardedProps:ro,ownerState:Vn}),[ur,Vo]=Ie("tooltip",{elementType:_N,className:mn.tooltip,externalForwardedProps:ro,ownerState:Vn}),[oo,mc]=Ie("arrow",{elementType:qN,className:mn.arrow,externalForwardedProps:ro,ownerState:Vn,ref:se});return S.jsxs(E.Fragment,{children:[E.cloneElement(X,Sn),S.jsx(Uo,{as:N??gR,placement:j,anchorEl:k?{getBoundingClientRect:()=>({top:fu.y,left:fu.x,right:fu.x,bottom:fu.y,width:0,height:0})}:le,popperRef:st,open:le?Pe:!1,id:at,transition:!0,...kr,...Io,popperOptions:Wn,children:({TransitionProps:$e})=>S.jsx(Ho,{timeout:Y.transitions.duration.shorter,...$e,...Er,children:S.jsxs(ur,{...Vo,children:[U,r?S.jsx(oo,{...mc}):null]})})})]})});function UN({sx:t}){const e=Ut(r=>r.loadingLevel),n=Ut(r=>r.connection.state),i=n==="closed"||n==="open"&&e===0;return S.jsx(cc,{elevation:4,sx:[{display:"flex",alignSelf:"center"},...Array.isArray(t)?t:[t]],children:S.jsx(Ds,{title:`${e} pending request${e>1?"s":""}.`,children:S.jsx(sO,{sx:r=>({m:1,transition:r.transitions.create(["color"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.standard}),color:{connecting:GA[200],closed:ys[900]}[n]}),variant:i?"determinate":void 0,value:i?100:void 0})})})}let Pv=[],vR=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?vR:Pv).push(n=n+t[e])})();function IN(t){if(t<768)return!1;for(let e=0,n=Pv.length;;){let i=e+n>>1;if(t<Pv[i])n=i;else if(t>=vR[i])e=i+1;else return!0;if(e==n)return!1}}function CT(t){return t>=127462&&t<=127487}const TT=8205;function HN(t,e,n=!0,i=!0){return(n?bR:VN)(t,e,i)}function bR(t,e,n){if(e==t.length)return e;e&&OR(t.charCodeAt(e))&&SR(t.charCodeAt(e-1))&&e--;let i=gy(t,e);for(e+=kT(i);e<t.length;){let r=gy(t,e);if(i==TT||r==TT||n&&IN(r))e+=kT(r),i=r;else if(CT(r)){let s=0,a=e-2;for(;a>=0&&CT(gy(t,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function VN(t,e,n){for(;e>0;){let i=bR(t,e-2,n);if(i<e)return i;e--}return 0}function gy(t,e){let n=t.charCodeAt(e);if(!SR(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return OR(i)?(n-55296<<10)+(i-56320)+65536:n}function OR(t){return t>=56320&&t<57344}function SR(t){return t>=55296&&t<56320}function kT(t){return t<65536?1:2}class ot{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Fa(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Ur.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Fa(this,e,n);let i=[];return this.decompose(e,n,i,0),Ur.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Qu(this),s=new Qu(e);for(let a=n,c=n;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(c+=r.value.length,r.done||c>=i)return!0}}iter(e=1){return new Qu(this,e)}iterRange(e,n=this.length){return new xR(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new wR(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?ot.empty:e.length<=32?new nn(e):Ur.from(nn.split(e,[]))}}class nn extends ot{constructor(e,n=WN(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.text[s],c=r+a.length;if((n?i:c)>=e)return new XN(r,c,i,a);r=c+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new nn(ET(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),c=ep(s.text,a.text.slice(),0,s.length);if(c.length<=32)i.push(new nn(c,a.length+s.length));else{let f=c.length>>1;i.push(new nn(c.slice(0,f)),new nn(c.slice(f)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof nn))return super.replace(e,n,i);[e,n]=Fa(this,e,n);let r=ep(this.text,ep(i.text,ET(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new nn(r,s):Ur.from(nn.split(r,[]),s)}sliceString(e,n=this.length,i=`
|
|
135
|
-
`){[e,n]=Fa(this,e,n);let r="";for(let s=0,a=0;s<=n&&a<this.text.length;a++){let c=this.text[a],f=s+c.length;s>e&&a&&(r+=i),e<f&&n>s&&(r+=c.slice(Math.max(0,e-s),n-s)),s=f+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new nn(i,r)),i=[],r=-1);return r>-1&&n.push(new nn(i,r)),n}}class Ur extends ot{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.children[s],c=r+a.length,f=i+a.lines-1;if((n?f:c)>=e)return a.lineInner(e,n,i,r);r=c+1,i=f+1}}decompose(e,n,i,r){for(let s=0,a=0;a<=n&&s<this.children.length;s++){let c=this.children[s],f=a+c.length;if(e<=f&&n>=a){let d=r&((a<=e?1:0)|(f>=n?2:0));a>=e&&f<=n&&!d?i.push(c):c.decompose(e-a,n-a,i,d)}a=f+1}}replace(e,n,i){if([e,n]=Fa(this,e,n),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let a=this.children[r],c=s+a.length;if(e>=s&&n<=c){let f=a.replace(e-s,n-s,i),d=this.lines-a.lines+f.lines;if(f.lines<d>>4&&f.lines>d>>6){let p=this.children.slice();return p[r]=f,new Ur(p,this.length-(n-e)+i.length)}return super.replace(s,c,f)}s=c+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=`
|
|
136
|
-
`){[e,n]=Fa(this,e,n);let r="";for(let s=0,a=0;s<this.children.length&&a<=n;s++){let c=this.children[s],f=a+c.length;a>e&&s&&(r+=i),e<f&&n>a&&(r+=c.sliceString(e-a,n-a,i)),a=f+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ur))return 0;let i=0,[r,s,a,c]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==a||s==c)return i;let f=this.children[r],d=e.children[s];if(f!=d)return i+f.scanIdentical(d,n);i+=f.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let b of e)i+=b.lines;if(i<32){let b=[];for(let O of e)O.flatten(b);return new nn(b,n)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,c=[],f=0,d=-1,p=[];function m(b){let O;if(b.lines>s&&b instanceof Ur)for(let x of b.children)m(x);else b.lines>a&&(f>a||!f)?(v(),c.push(b)):b instanceof nn&&f&&(O=p[p.length-1])instanceof nn&&b.lines+O.lines<=32?(f+=b.lines,d+=b.length+1,p[p.length-1]=new nn(O.text.concat(b.text),O.length+1+b.length)):(f+b.lines>r&&v(),f+=b.lines,d+=b.length+1,p.push(b))}function v(){f!=0&&(c.push(p.length==1?p[0]:Ur.from(p,d)),d=-1,f=p.length=0)}for(let b of e)m(b);return v(),c.length==1?c[0]:new Ur(c,n)}}ot.empty=new nn([""],0);function WN(t){let e=-1;for(let n of t)e+=n.length+1;return e}function ep(t,e,n=0,i=1e9){for(let r=0,s=0,a=!0;s<t.length&&r<=i;s++){let c=t[s],f=r+c.length;f>=n&&(f>i&&(c=c.slice(0,i-r)),r<n&&(c=c.slice(n-r)),a?(e[e.length-1]+=c,a=!1):e.push(c)),r=f+1}return e}function ET(t,e,n){return ep(t,[""],e,n)}class Qu{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof nn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,c=r instanceof nn?r.text.length:r.children.length;if(a==(n>0?c:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
137
|
-
`,this;e--}else if(r instanceof nn){let f=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,f.length>Math.max(0,e))return this.value=e==0?f:n>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=r.children[a+(n<0?-1:0)];e>f.length?(e-=f.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(f),this.offsets.push(n>0?1:(f instanceof nn?f.text.length:f.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class xR{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Qu(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class wR{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ot.prototype[Symbol.iterator]=function(){return this.iter()},Qu.prototype[Symbol.iterator]=xR.prototype[Symbol.iterator]=wR.prototype[Symbol.iterator]=function(){return this});class XN{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}function Fa(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Ln(t,e,n=!0,i=!0){return HN(t,e,n,i)}function GN(t){return t>=56320&&t<57344}function FN(t){return t>=55296&&t<56320}function ai(t,e){let n=t.charCodeAt(e);if(!FN(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return GN(i)?(n-55296<<10)+(i-56320)+65536:n}function vO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ir(t){return t<65536?1:2}const zv=/\r\n?|\n/;var Qn=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(Qn||(Qn={}));class Yr{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n+1];e+=i<0?this.sections[n]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,i=0,r=0;n<this.sections.length;){let s=this.sections[n++],a=this.sections[n++];a<0?(e(i,r,s),r+=s):r+=a,i+=s}}iterChangedRanges(e,n=!1){$v(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];r<0?e.push(i,r):e.push(r,i)}return new Yr(e)}composeDesc(e){return this.empty?e:e.empty?this:CR(this,e)}mapDesc(e,n=!1){return e.empty?this:Bv(this,e,n)}mapPos(e,n=-1,i=Qn.Simple){let r=0,s=0;for(let a=0;a<this.sections.length;){let c=this.sections[a++],f=this.sections[a++],d=r+c;if(f<0){if(d>e)return s+(e-r);s+=c}else{if(i!=Qn.Simple&&d>=e&&(i==Qn.TrackDel&&r<e&&d>e||i==Qn.TrackBefore&&r<e||i==Qn.TrackAfter&&d>e))return null;if(d>e||d==e&&n<0&&!c)return e==r||n<0?s:s+f;s+=f}r=d}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i<this.sections.length&&r<=n;){let s=this.sections[i++],a=this.sections[i++],c=r+s;if(a>=0&&r<=n&&c>=e)return r<e&&c>n?"cover":!0;r=c}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Yr(e)}static create(e){return new Yr(e)}}class bn extends Yr{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return $v(this,(n,i,r,s,a)=>e=e.replace(r,r+(i-n),a),!1),e}mapDesc(e,n=!1){return Bv(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r<n.length;r+=2){let a=n[r],c=n[r+1];if(c>=0){n[r]=c,n[r+1]=a;let f=r>>1;for(;i.length<f;)i.push(ot.empty);i.push(a?e.slice(s,s+a):ot.empty)}s+=a}return new bn(n,i)}compose(e){return this.empty?e:e.empty?this:CR(this,e,!0)}map(e,n=!1){return e.empty?this:Bv(this,e,n,!0)}iterChanges(e,n=!1){$v(this,e,n)}get desc(){return Yr.create(this.sections)}filter(e){let n=[],i=[],r=[],s=new nf(this);e:for(let a=0,c=0;;){let f=a==e.length?1e9:e[a++];for(;c<f||c==f&&s.len==0;){if(s.done)break e;let p=Math.min(s.len,f-c);qn(r,p,-1);let m=s.ins==-1?-1:s.off==0?s.ins:0;qn(n,p,m),m>0&&xs(i,n,s.text),s.forward(p),c+=p}let d=e[a++];for(;c<d;){if(s.done)break e;let p=Math.min(s.len,d-c);qn(n,p,-1),qn(r,p,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(p),c+=p}}return{changes:new bn(n,i),filtered:Yr.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n],r=this.sections[n+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],a=0,c=null;function f(p=!1){if(!p&&!r.length)return;a<n&&qn(r,n-a,-1);let m=new bn(r,s);c=c?c.compose(m.map(c)):m,r=[],s=[],a=0}function d(p){if(Array.isArray(p))for(let m of p)d(m);else if(p instanceof bn){if(p.length!=n)throw new RangeError(`Mismatched change set length (got ${p.length}, expected ${n})`);f(),c=c?c.compose(p.map(c)):p}else{let{from:m,to:v=m,insert:b}=p;if(m>v||m<0||v>n)throw new RangeError(`Invalid change range ${m} to ${v} (in doc of length ${n})`);let O=b?typeof b=="string"?ot.of(b.split(i||zv)):b:ot.empty,x=O.length;if(m==v&&x==0)return;m<a&&f(),m>a&&qn(r,m-a,-1),qn(r,v-m,x),xs(s,r,O),a=v}}return d(e),f(!c),c}static empty(e){return new bn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,c)=>c&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length<r;)i.push(ot.empty);i[r]=ot.of(s.slice(1)),n.push(s[0],i[r].length)}}}return new bn(n,i)}static createSet(e,n){return new bn(e,n)}}function qn(t,e,n,i=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function xs(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(ot.empty);t.push(n)}}function $v(t,e,n){let i=t.inserted;for(let r=0,s=0,a=0;a<t.sections.length;){let c=t.sections[a++],f=t.sections[a++];if(f<0)r+=c,s+=c;else{let d=r,p=s,m=ot.empty;for(;d+=c,p+=f,f&&i&&(m=m.append(i[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)c=t.sections[a++],f=t.sections[a++];e(r,d,s,p,m),r=d,s=p}}}function Bv(t,e,n,i=!1){let r=[],s=i?[]:null,a=new nf(t),c=new nf(e);for(let f=-1;;){if(a.done&&c.len||c.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&c.ins==-1){let d=Math.min(a.len,c.len);qn(r,d,-1),a.forward(d),c.forward(d)}else if(c.ins>=0&&(a.ins<0||f==a.i||a.off==0&&(c.len<a.len||c.len==a.len&&!n))){let d=c.len;for(qn(r,c.ins,-1);d;){let p=Math.min(a.len,d);a.ins>=0&&f<a.i&&a.len<=p&&(qn(r,0,a.ins),s&&xs(s,r,a.text),f=a.i),a.forward(p),d-=p}c.next()}else if(a.ins>=0){let d=0,p=a.len;for(;p;)if(c.ins==-1){let m=Math.min(p,c.len);d+=m,p-=m,c.forward(m)}else if(c.ins==0&&c.len<p)p-=c.len,c.next();else break;qn(r,d,f<a.i?a.ins:0),s&&f<a.i&&xs(s,r,a.text),f=a.i,a.forward(a.len-p)}else{if(a.done&&c.done)return s?bn.createSet(r,s):Yr.create(r);throw new Error("Mismatched change set lengths")}}}function CR(t,e,n=!1){let i=[],r=n?[]:null,s=new nf(t),a=new nf(e);for(let c=!1;;){if(s.done&&a.done)return r?bn.createSet(i,r):Yr.create(i);if(s.ins==0)qn(i,s.len,0,c),s.next();else if(a.len==0&&!a.done)qn(i,0,a.ins,c),r&&xs(r,i,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let f=Math.min(s.len2,a.len),d=i.length;if(s.ins==-1){let p=a.ins==-1?-1:a.off?0:a.ins;qn(i,f,p,c),r&&p&&xs(r,i,a.text)}else a.ins==-1?(qn(i,s.off?0:s.len,f,c),r&&xs(r,i,s.textBit(f))):(qn(i,s.off?0:s.len,a.off?0:a.ins,c),r&&!a.off&&xs(r,i,a.text));c=(s.ins>f||a.ins>=0&&a.len>f)&&(c||i.length>d),s.forward2(f),a.forward(f)}}}}class nf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?ot.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?ot.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class vl{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new vl(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ue.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ue.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ue.range(e.anchor,e.head)}static create(e,n,i){return new vl(e,n,i)}}class ue{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ue.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ue([this.main],0)}addRange(e,n=!0){return ue.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let i=this.ranges.slice();return i[n]=e,ue.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ue(e.ranges.map(n=>vl.fromJSON(n)),e.main)}static single(e,n=e){return new ue([ue.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return ue.normalized(e.slice(),n);i=s.to}return new ue(e,n)}static cursor(e,n=0,i,r){return vl.create(e,e,(n==0?0:n<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,n,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return n<e?vl.create(n,e,48|s):vl.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],a=e[r-1];if(s.empty?s.from<=a.to:s.from<a.to){let c=a.from,f=Math.max(s.to,a.to);r<=n&&n--,e.splice(--r,2,s.anchor>s.head?ue.range(f,c):ue.range(c,f))}}return new ue(e,n)}}function TR(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let bO=0;class be{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=bO++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new be(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:OO),!!e.static,e.enables)}of(e){return new tp([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new tp(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new tp(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function OO(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class tp{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=bO++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,a=e[s]>>1,c=this.type==2,f=!1,d=!1,p=[];for(let m of this.dependencies)m=="doc"?f=!0:m=="selection"?d=!0:(((n=e[m.id])!==null&&n!==void 0?n:1)&1)==0&&p.push(e[m.id]);return{create(m){return m.values[a]=i(m),1},update(m,v){if(f&&v.docChanged||d&&(v.docChanged||v.selection)||jv(m,p)){let b=i(m);if(c?!AT(b,m.values[a],r):!r(b,m.values[a]))return m.values[a]=b,1}return 0},reconfigure:(m,v)=>{let b,O=v.config.address[s];if(O!=null){let x=Cp(v,O);if(this.dependencies.every(C=>C instanceof be?v.facet(C)===m.facet(C):C instanceof kn?v.field(C,!1)==m.field(C,!1):!0)||(c?AT(b=i(m),x,r):r(b=i(m),x)))return m.values[a]=x,0}else b=i(m);return m.values[a]=b,1}}}}function AT(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function jv(t,e){let n=!1;for(let i of e)Lu(t,i)&1&&(n=!0);return n}function YN(t,e,n){let i=n.map(f=>t[f.id]),r=n.map(f=>f.type),s=i.filter(f=>!(f&1)),a=t[e.id]>>1;function c(f){let d=[];for(let p=0;p<i.length;p++){let m=Cp(f,i[p]);if(r[p]==2)for(let v of m)d.push(v);else d.push(m)}return e.combine(d)}return{create(f){for(let d of i)Lu(f,d);return f.values[a]=c(f),1},update(f,d){if(!jv(f,s))return 0;let p=c(f);return e.compare(p,f.values[a])?0:(f.values[a]=p,1)},reconfigure(f,d){let p=jv(f,i),m=d.config.facets[e.id],v=d.facet(e);if(m&&!p&&OO(n,m))return f.values[a]=v,0;let b=c(f);return e.compare(b,v)?(f.values[a]=v,0):(f.values[a]=b,1)}}}const cd=be.define({static:!0});class kn{constructor(e,n,i,r,s){this.id=e,this.createF=n,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let n=new kn(bO++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(cd).find(i=>i.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],a=this.updateF(s,r);return this.compareF(s,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>{let s=i.facet(cd),a=r.facet(cd),c;return(c=s.find(f=>f.field==this))&&c!=a.find(f=>f.field==this)?(i.values[n]=c.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,cd.of({field:this,create:e})]}get extension(){return this}}const dl={lowest:4,low:3,default:2,high:1,highest:0};function hu(t){return e=>new kR(e,t)}const Zr={highest:hu(dl.highest),high:hu(dl.high),default:hu(dl.default),low:hu(dl.low),lowest:hu(dl.lowest)};class kR{constructor(e,n){this.inner=e,this.prec=n}}class vm{of(e){return new Qv(this,e)}reconfigure(e){return vm.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Qv{constructor(e,n){this.compartment=e,this.inner=n}}class wp{constructor(e,n,i,r,s,a){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,i){let r=[],s=Object.create(null),a=new Map;for(let v of KN(e,n,a))v instanceof kn?r.push(v):(s[v.facet.id]||(s[v.facet.id]=[])).push(v);let c=Object.create(null),f=[],d=[];for(let v of r)c[v.id]=d.length<<1,d.push(b=>v.slot(b));let p=i?.config.facets;for(let v in s){let b=s[v],O=b[0].facet,x=p&&p[v]||[];if(b.every(C=>C.type==0))if(c[O.id]=f.length<<1|1,OO(x,b))f.push(i.facet(O));else{let C=O.combine(b.map(k=>k.value));f.push(i&&O.compare(C,i.facet(O))?i.facet(O):C)}else{for(let C of b)C.type==0?(c[C.id]=f.length<<1|1,f.push(C.value)):(c[C.id]=d.length<<1,d.push(k=>C.dynamicSlot(k)));c[O.id]=d.length<<1,d.push(C=>YN(C,O,b))}}let m=d.map(v=>v(c));return new wp(e,a,m,c,f,s)}}function KN(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(a,c){let f=r.get(a);if(f!=null){if(f<=c)return;let d=i[f].indexOf(a);d>-1&&i[f].splice(d,1),a instanceof Qv&&n.delete(a.compartment)}if(r.set(a,c),Array.isArray(a))for(let d of a)s(d,c);else if(a instanceof Qv){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=e.get(a.compartment)||a.inner;n.set(a.compartment,d),s(d,c)}else if(a instanceof kR)s(a.inner,a.prec);else if(a instanceof kn)i[c].push(a),a.provides&&s(a.provides,c);else if(a instanceof tp)i[c].push(a),a.facet.extensions&&s(a.facet.extensions,dl.default);else{let d=a.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(d,c)}}return s(t,dl.default),i.reduce((a,c)=>a.concat(c))}function Lu(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function Cp(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const ER=be.define(),Lv=be.define({combine:t=>t.some(e=>e),static:!0}),AR=be.define({combine:t=>t.length?t[0]:void 0,static:!0}),RR=be.define(),MR=be.define(),DR=be.define(),PR=be.define({combine:t=>t.length?t[0]:!1});class to{constructor(e,n){this.type=e,this.value=n}static define(){return new ZN}}class ZN{of(e){return new to(this,e)}}class JN{constructor(e){this.map=e}of(e){return new ze(this,e)}}class ze{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new ze(this.type,n)}is(e){return this.type==e}static define(e={}){return new JN(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}ze.reconfigure=ze.define();ze.appendConfig=ze.define();class dn{constructor(e,n,i,r,s,a){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,i&&TR(i,n.newLength),s.some(c=>c.type==dn.time)||(this.annotations=s.concat(dn.time.of(Date.now())))}static create(e,n,i,r,s,a){return new dn(e,n,i,r,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(dn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}dn.time=to.define();dn.userEvent=to.define();dn.addToHistory=to.define();dn.remote=to.define();function e_(t,e){let n=[];for(let i=0,r=0;;){let s,a;if(i<t.length&&(r==e.length||e[r]>=t[i]))s=t[i++],a=t[i++];else if(r<e.length)s=e[r++],a=e[r++];else return n;!n.length||n[n.length-1]<s?n.push(s,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function zR(t,e,n){var i;let r,s,a;return n?(r=e.changes,s=bn.empty(e.changes.length),a=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(r)),{changes:a,selection:e.selection?e.selection.map(s):(i=t.selection)===null||i===void 0?void 0:i.map(r),effects:ze.mapEffects(t.effects,r).concat(ze.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Nv(t,e,n){let i=e.selection,r=Ba(e.annotations);return e.userEvent&&(r=r.concat(dn.userEvent.of(e.userEvent))),{changes:e.changes instanceof bn?e.changes:bn.of(e.changes||[],n,t.facet(AR)),selection:i&&(i instanceof ue?i:ue.single(i.anchor,i.head)),effects:Ba(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function $R(t,e,n){let i=Nv(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let a=!!e[s].sequential;i=zR(i,Nv(t,e[s],a?i.changes.newLength:t.doc.length),a)}let r=dn.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return n_(n?t_(r):r)}function t_(t){let e=t.startState,n=!0;for(let r of e.facet(RR)){let s=r(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:e_(n,s))}if(n!==!0){let r,s;if(n===!1)s=t.changes.invertedDesc,r=bn.empty(e.doc.length);else{let a=t.changes.filter(n);r=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}t=dn.create(e,r,t.selection&&t.selection.map(s),ze.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(MR);for(let r=i.length-1;r>=0;r--){let s=i[r](t);s instanceof dn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof dn?t=s[0]:t=$R(e,Ba(s),!1)}return t}function n_(t){let e=t.startState,n=e.facet(DR),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=zR(i,Nv(e,s,t.changes.newLength),!0))}return i==t?t:dn.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const i_=[];function Ba(t){return t==null?i_:Array.isArray(t)?t:[t]}var It=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(It||(It={}));const r_=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _v;try{_v=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function o_(t){if(_v)return _v.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||r_.test(n)))return!0}return!1}function s_(t){return e=>{if(!/\S/.test(e))return It.Space;if(o_(e))return It.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return It.Word;return It.Other}}class Ye{constructor(e,n,i,r,s,a){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)Lu(this,c<<1);this.computeSlot=null}field(e,n=!0){let i=this.config.address[e.id];if(i==null){if(n)throw new RangeError("Field is not present in this state");return}return Lu(this,i),Cp(this,i)}update(...e){return $R(this,e,!0)}applyTransaction(e){let n=this.config,{base:i,compartments:r}=n;for(let c of e.effects)c.is(vm.reconfigure)?(n&&(r=new Map,n.compartments.forEach((f,d)=>r.set(d,f)),n=null),r.set(c.value.compartment,c.value.extension)):c.is(ze.reconfigure)?(n=null,i=c.value):c.is(ze.appendConfig)&&(n=null,i=Ba(i).concat(c.value));let s;n?s=e.startState.values.slice():(n=wp.resolve(i,r,this),s=new Ye(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(f,d)=>d.reconfigure(f,this),null).values);let a=e.startState.facet(Lv)?e.newSelection:e.newSelection.asSingle();new Ye(n,e.newDoc,a,s,(c,f)=>f.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ue.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],a=Ba(i.effects);for(let c=1;c<n.ranges.length;c++){let f=e(n.ranges[c]),d=this.changes(f.changes),p=d.map(r);for(let v=0;v<c;v++)s[v]=s[v].map(p);let m=r.mapDesc(d,!0);s.push(f.range.map(m)),r=r.compose(p),a=ze.mapEffects(a,p).concat(ze.mapEffects(Ba(f.effects),m))}return{changes:r,selection:ue.create(s,n.mainIndex),effects:a}}changes(e=[]){return e instanceof bn?e:bn.of(e,this.doc.length,this.facet(Ye.lineSeparator))}toText(e){return ot.of(e.split(this.facet(Ye.lineSeparator)||zv))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Lu(this,n),Cp(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof kn&&this.config.address[r.id]!=null&&(n[i]=r.spec.toJSON(this.field(e[i]),this))}return n}static fromJSON(e,n={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let a=i[s],c=e[s];r.push(a.init(f=>a.spec.fromJSON(c,f)))}}return Ye.create({doc:e.doc,selection:ue.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=wp.resolve(e.extensions||[],new Map),i=e.doc instanceof ot?e.doc:ot.of((e.doc||"").split(n.staticFacet(Ye.lineSeparator)||zv)),r=e.selection?e.selection instanceof ue?e.selection:ue.single(e.selection.anchor,e.selection.head):ue.single(0);return TR(r,i.length),n.staticFacet(Lv)||(r=r.asSingle()),new Ye(n,i,r,n.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(Ye.tabSize)}get lineBreak(){return this.facet(Ye.lineSeparator)||`
|
|
138
|
-
`}get readOnly(){return this.facet(PR)}phrase(e,...n){for(let i of this.facet(Ye.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(ER))for(let a of s(this,n,i))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){return s_(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-i,c=e-i;for(;a>0;){let f=Ln(n,a,!1);if(s(n.slice(f,a))!=It.Word)break;a=f}for(;c<r;){let f=Ln(n,c);if(s(n.slice(c,f))!=It.Word)break;c=f}return a==c?null:ue.range(a+i,c+i)}}Ye.allowMultipleSelections=Lv;Ye.tabSize=be.define({combine:t=>t.length?t[0]:4});Ye.lineSeparator=AR;Ye.readOnly=PR;Ye.phrases=be.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});Ye.languageData=ER;Ye.changeFilter=RR;Ye.transactionFilter=MR;Ye.transactionExtender=DR;vm.reconfigure=ze.define();function no(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let a=r[s],c=i[s];if(c===void 0)i[s]=a;else if(!(c===a||a===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](c,a);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class kl{eq(e){return this==e}range(e,n=e){return qv.create(e,n,this)}}kl.prototype.startSide=kl.prototype.endSide=0;kl.prototype.point=!1;kl.prototype.mapMode=Qn.TrackDel;let qv=class BR{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new BR(e,n,i)}};function Uv(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class SO{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let a=r,c=s.length;;){if(a==c)return a;let f=a+c>>1,d=s[f]-e||(i?this.value[f].endSide:this.value[f].startSide)-n;if(f==a)return d>=0?a:c;d>=0?c=f:a=f+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,s);s<a;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let i=[],r=[],s=[],a=-1,c=-1;for(let f=0;f<this.value.length;f++){let d=this.value[f],p=this.from[f]+e,m=this.to[f]+e,v,b;if(p==m){let O=n.mapPos(p,d.startSide,d.mapMode);if(O==null||(v=b=O,d.startSide!=d.endSide&&(b=n.mapPos(p,d.endSide),b<v)))continue}else if(v=n.mapPos(p,d.startSide),b=n.mapPos(m,d.endSide),v>b||v==b&&d.startSide>0&&d.endSide<=0)continue;(b-v||d.endSide-d.startSide)<0||(a<0&&(a=v),d.point&&(c=Math.max(c,b-v)),i.push(d),r.push(v-a),s.push(b-a))}return{mapped:i.length?new SO(r,s,i,c):null,pos:a}}}class lt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new lt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(Uv)),this.isEmpty)return n.length?lt.of(n):this;let c=new jR(this,null,-1).goto(0),f=0,d=[],p=new Jr;for(;c.value||f<n.length;)if(f<n.length&&(c.from-n[f].from||c.startSide-n[f].value.startSide)>=0){let m=n[f++];p.addInner(m.from,m.to,m.value)||d.push(m)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(f==n.length||this.chunkEnd(c.chunkIndex)<n[f].from)&&(!a||r>this.chunkEnd(c.chunkIndex)||s<this.chunkPos[c.chunkIndex])&&p.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!a||r>c.to||s<c.from||a(c.from,c.to,c.value))&&(p.addInner(c.from,c.to,c.value)||d.push(qv.create(c.from,c.to,c.value))),c.next());return p.finishInner(this.nextLayer.isEmpty&&!d.length?lt.empty:this.nextLayer.update({add:d,filter:a,filterFrom:r,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],i=[],r=-1;for(let a=0;a<this.chunk.length;a++){let c=this.chunkPos[a],f=this.chunk[a],d=e.touchesRange(c,c+f.length);if(d===!1)r=Math.max(r,f.maxPoint),n.push(f),i.push(e.mapPos(c));else if(d===!0){let{mapped:p,pos:m}=f.map(c,e);p&&(r=Math.max(r,p.maxPoint),n.push(p),i.push(m))}}let s=this.nextLayer.map(e);return n.length==0?s:new lt(i,n,s||lt.empty,r)}between(e,n,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],a=this.chunk[r];if(n>=s&&e<=s+a.length&&a.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return rf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return rf.from(e).goto(n)}static compare(e,n,i,r,s=-1){let a=e.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=s),c=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=s),f=RT(a,c,i),d=new du(a,f,s),p=new du(c,f,s);i.iterGaps((m,v,b)=>MT(d,m,p,v,b,r)),i.empty&&i.length==0&&MT(d,0,p,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(p=>!p.isEmpty&&n.indexOf(p)<0),a=n.filter(p=>!p.isEmpty&&e.indexOf(p)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let c=RT(s,a),f=new du(s,c,0).goto(i),d=new du(a,c,0).goto(i);for(;;){if(f.to!=d.to||!Iv(f.active,d.active)||f.point&&(!d.point||!f.point.eq(d.point)))return!1;if(f.to>r)return!0;f.next(),d.next()}}static spans(e,n,i,r,s=-1){let a=new du(e,null,s).goto(n),c=n,f=a.openStart;for(;;){let d=Math.min(a.to,i);if(a.point){let p=a.activeForPoint(a.to),m=a.pointFrom<n?p.length+1:a.point.startSide<0?p.length:Math.min(p.length,f);r.point(c,d,a.point,p,m,a.pointRank),f=Math.min(a.openEnd(d),p.length)}else d>c&&(r.span(c,d,a.active,f),f=a.openEnd(d));if(a.to>i)return f+(a.point&&a.to>i?1:0);c=a.to,a.next()}}static of(e,n=!1){let i=new Jr;for(let r of e instanceof qv?[e]:n?l_(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return lt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=lt.empty;r=r.nextLayer)n=new lt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}lt.empty=new lt([],[],null,-1);function l_(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(Uv(e,i)>0)return t.slice().sort(Uv);e=i}return t}lt.empty.nextLayer=lt.empty;class Jr{finishChunk(e){this.chunks.push(new SO(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Jr)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(lt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=lt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function RT(t,e,n){let i=new Map;for(let s of t)for(let a=0;a<s.chunk.length;a++)s.chunk[a].maxPoint<=0&&i.set(s.chunk[a],s.chunkPos[a]);let r=new Set;for(let s of e)for(let a=0;a<s.chunk.length;a++){let c=i.get(s.chunk[a]);c!=null&&(n?n.mapPos(c):c)==s.chunkPos[a]&&!n?.touchesRange(c,c+s.chunk[a].length)&&r.add(s.chunk[a])}return r}class jR{constructor(e,n,i,r=0){this.layer=e,this.skip=n,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=e+n.from[this.rangeIndex];if(this.from=i,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class rf{constructor(e){this.heap=e}static from(e,n=null,i=-1){let r=[];for(let s=0;s<e.length;s++)for(let a=e[s];!a.isEmpty;a=a.nextLayer)a.maxPoint>=i&&r.push(new jR(a,n,i,s));return r.length==1?r[0]:new rf(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)yy(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)yy(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),yy(this.heap,0)}}}function yy(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class du{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=rf.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ud(this.active,e),ud(this.activeTo,e),ud(this.activeRank,e),this.minActive=DT(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||r-this.activeTo[n])>0;)n++;fd(this.active,n,i),fd(this.activeTo,n,r),fd(this.activeRank,n,s),e&&fd(e,n,this.cursor.from),this.minActive=DT(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&ud(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function MT(t,e,n,i,r,s){t.goto(e),n.goto(i);let a=i+r,c=i,f=i-e;for(;;){let d=t.to+f-n.to,p=d||t.endSide-n.endSide,m=p<0?t.to+f:n.to,v=Math.min(m,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Iv(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(c,v,t.point,n.point):v>c&&!Iv(t.active,n.active)&&s.compareRange(c,v,t.active,n.active),m>a)break;(d||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(m),c=m,p<=0&&t.next(),p>=0&&n.next()}}function Iv(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function ud(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function fd(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function DT(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function uc(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=Ln(t,r));return i}function Hv(t,e,n,i){for(let r=0,s=0;;){if(s>=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=Ln(t,r)}return i===!0?-1:t.length}const Vv="ͼ",PT=typeof Symbol>"u"?"__"+Vv:Symbol.for(Vv),Wv=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),zT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ps{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,c,f,d){let p=[],m=/^@(\w+)\b/.exec(a[0]),v=m&&m[1]=="keyframes";if(m&&c==null)return f.push(a[0]+";");for(let b in c){let O=c[b];if(/&/.test(b))s(b.split(/,\s*/).map(x=>a.map(C=>x.replace(/&/,C))).reduce((x,C)=>x.concat(C)),O,f);else if(O&&typeof O=="object"){if(!m)throw new RangeError("The value of a property ("+b+") should be a primitive value.");s(r(b),O,p,v)}else O!=null&&p.push(b.replace(/_.*/,"").replace(/[A-Z]/g,x=>"-"+x.toLowerCase())+": "+O+";")}(p.length||v)&&f.push((i&&!m&&!d?a.map(i):a).join(", ")+" {"+p.join(" ")+"}")}for(let a in e)s(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
|
|
139
|
-
`)}static newName(){let e=zT[PT]||1;return zT[PT]=e+1,Vv+e.toString(36)}static mount(e,n,i){let r=e[Wv],s=i&&i.nonce;r?s&&r.setNonce(s):r=new a_(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let $T=new Map;class a_{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=$T.get(i);if(s)return e[Wv]=s;this.sheet=new r.CSSStyleSheet,$T.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Wv]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let a=0;a<e.length;a++){let c=e[a],f=this.modules.indexOf(c);if(f<s&&f>-1&&(this.modules.splice(f,1),s--,f=-1),f==-1){if(this.modules.splice(s++,0,c),i)for(let d=0;d<c.rules.length;d++)i.insertRule(c.rules[d],r++)}else{for(;s<f;)r+=this.modules[s++].rules.length;r+=c.rules.length,s++}}if(i)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let a="";for(let f=0;f<this.modules.length;f++)a+=this.modules[f].getRules()+`
|
|
140
|
-
`;this.styleTag.textContent=a;let c=n.head||n;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var zs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},of={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c_=typeof navigator<"u"&&/Mac/.test(navigator.platform),u_=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var jn=0;jn<10;jn++)zs[48+jn]=zs[96+jn]=String(jn);for(var jn=1;jn<=24;jn++)zs[jn+111]="F"+jn;for(var jn=65;jn<=90;jn++)zs[jn]=String.fromCharCode(jn+32),of[jn]=String.fromCharCode(jn);for(var vy in zs)of.hasOwnProperty(vy)||(of[vy]=zs[vy]);function f_(t){var e=c_&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||u_&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?of:zs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Mt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e<arguments.length;e++)QR(t,arguments[e]);return t}function QR(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)QR(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}function sf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Xv(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function np(t,e){if(!e.anchorNode)return!1;try{return Xv(t,e.anchorNode)}catch{return!1}}function Ya(t){return t.nodeType==3?Al(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Nu(t,e,n,i){return n?BT(t,e,n,i,-1)||BT(t,e,n,i,1):!1}function El(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Tp(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function BT(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:eo(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=El(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?eo(t):0}else return!1}}function eo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function zf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function h_(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function LR(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function d_(t,e,n,i,r,s,a,c){let f=t.ownerDocument,d=f.defaultView||window;for(let p=t,m=!1;p&&!m;)if(p.nodeType==1){let v,b=p==f.body,O=1,x=1;if(b)v=h_(d);else{if(/^(fixed|sticky)$/.test(getComputedStyle(p).position)&&(m=!0),p.scrollHeight<=p.clientHeight&&p.scrollWidth<=p.clientWidth){p=p.assignedSlot||p.parentNode;continue}let $=p.getBoundingClientRect();({scaleX:O,scaleY:x}=LR(p,$)),v={left:$.left,right:$.left+p.clientWidth*O,top:$.top,bottom:$.top+p.clientHeight*x}}let C=0,k=0;if(r=="nearest")e.top<v.top?(k=e.top-(v.top+a),n>0&&e.bottom>v.bottom+k&&(k=e.bottom-v.bottom+a)):e.bottom>v.bottom&&(k=e.bottom-v.bottom+a,n<0&&e.top-k<v.top&&(k=e.top-(v.top+a)));else{let $=e.bottom-e.top,z=v.bottom-v.top;k=(r=="center"&&$<=z?e.top+$/2-z/2:r=="start"||r=="center"&&n<0?e.top-a:e.bottom-z+a)-v.top}if(i=="nearest"?e.left<v.left?(C=e.left-(v.left+s),n>0&&e.right>v.right+C&&(C=e.right-v.right+s)):e.right>v.right&&(C=e.right-v.right+s,n<0&&e.left<v.left+C&&(C=e.left-(v.left+s))):C=(i=="center"?e.left+(e.right-e.left)/2-(v.right-v.left)/2:i=="start"==c?e.left-s:e.right-(v.right-v.left)+s)-v.left,C||k)if(b)d.scrollBy(C,k);else{let $=0,z=0;if(k){let D=p.scrollTop;p.scrollTop+=k/x,z=(p.scrollTop-D)*x}if(C){let D=p.scrollLeft;p.scrollLeft+=C/O,$=(p.scrollLeft-D)*O}e={left:e.left-$,top:e.top-z,right:e.right-$,bottom:e.bottom-z},$&&Math.abs($-C)<1&&(i="nearest"),z&&Math.abs(z-k)<1&&(r="nearest")}if(b)break;(e.top<v.top||e.bottom>v.bottom||e.left<v.left||e.right>v.right)&&(e={left:Math.max(e.left,v.left),right:Math.min(e.right,v.right),top:Math.max(e.top,v.top),bottom:Math.min(e.bottom,v.bottom)}),p=p.assignedSlot||p.parentNode}else if(p.nodeType==11)p=p.host;else break}function p_(t){let e=t.ownerDocument,n,i;for(let r=t.parentNode;r&&!(r==e.body||n&&i);)if(r.nodeType==1)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:i}}class m_{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?eo(n):0),i,Math.min(e.focusOffset,i?eo(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Sa=null;function NR(t){if(t.setActive)return t.setActive();if(Sa)return t.focus(Sa);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Sa==null?{get preventScroll(){return Sa={preventScroll:!0},!0}}:void 0),!Sa){Sa=!1;for(let n=0;n<e.length;){let i=e[n++],r=e[n++],s=e[n++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=s&&(i.scrollLeft=s)}}}let jT;function Al(t,e,n=e){let i=jT||(jT=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function ja(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,t.dispatchEvent(s);let a=new KeyboardEvent("keyup",r);return a.synthetic=!0,t.dispatchEvent(a),s.defaultPrevented||a.defaultPrevented}function g_(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function _R(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function y_(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,eo(n));;)if(i){if(n.nodeType!=1)return!1;let r=n.childNodes[i-1];r.contentEditable=="false"?i--:(n=r,i=eo(n))}else{if(n==t)return!0;i=El(n),n=n.parentNode}}function qR(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function UR(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=eo(n)}else if(n.parentNode&&!Tp(n))i=El(n),n=n.parentNode;else return null}}function IR(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i<n.nodeValue.length)return{node:n,offset:i};if(n.nodeType==1&&i<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[i],i=0}else if(n.parentNode&&!Tp(n))i=El(n)+1,n=n.parentNode;else return null}}class Un{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new Un(e.parentNode,El(e),n)}static after(e,n){return new Un(e.parentNode,El(e)+1,n)}}const xO=[];class Pt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,r=null,s;for(let a of this.children){if(a.flags&7){if(!a.dom&&(s=r?r.nextSibling:i.firstChild)){let c=Pt.get(s);(!c||!c.parent&&c.canReuseDOM(a))&&a.reuseDOM(s)}a.sync(e,n),a.flags&=-8}if(s=r?r.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&s!=a.dom&&(n.written=!0),a.dom.parentNode==i)for(;s&&s!=a.dom;)s=QT(s);else i.insertBefore(a.dom,s);r=a.dom}for(s=r?r.nextSibling:i.firstChild,s&&n&&n.node==i&&(n.written=!0);s;)s=QT(s)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let r=eo(e)==0?0:n==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;r==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?r=-1:r=1),e=s}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Pt.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,s=0;;r++){let a=this.children[r];if(a.dom==i)return s;s+=a.length+a.breakAfter}}domBoundsAround(e,n,i=0){let r=-1,s=-1,a=-1,c=-1;for(let f=0,d=i,p=i;f<this.children.length;f++){let m=this.children[f],v=d+m.length;if(d<e&&v>n)return m.domBoundsAround(e,n,d);if(v>=e&&r==-1&&(r=f,s=d),d>n&&m.dom.parentNode==this.dom){a=f,c=p;break}p=v,d=v+m.breakAfter}return{from:s,to:c<0?i+this.length:c,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=xO){this.markDirty();for(let r=e;r<n;r++){let s=this.children[r];s.parent==this&&i.indexOf(s)<0&&s.destroy()}i.length<250?this.children.splice(e,n-e,...i):this.children=[].concat(this.children.slice(0,e),i,this.children.slice(n));for(let r=0;r<i.length;r++)i[r].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new HR(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,i,r,s,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Pt.prototype.breakAfter=0;function QT(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class HR{constructor(e,n,i){this.children=e,this.pos=n,this.i=i,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function VR(t,e,n,i,r,s,a,c,f){let{children:d}=t,p=d.length?d[e]:null,m=s.length?s[s.length-1]:null,v=m?m.breakAfter:a;if(!(e==i&&p&&!a&&!v&&s.length<2&&p.merge(n,r,s.length?m:null,n==0,c,f))){if(i<d.length){let b=d[i];b&&(r<b.length||b.breakAfter&&m?.breakAfter)?(e==i&&(b=b.split(r),r=0),!v&&m&&b.merge(0,r,m,!0,0,f)?s[s.length-1]=b:((r||b.children.length&&!b.children[0].length)&&b.merge(0,r,null,!1,0,f),s.push(b))):b?.breakAfter&&(m?m.breakAfter=1:a=1),i++}for(p&&(p.breakAfter=a,n>0&&(!a&&s.length&&p.merge(n,p.length,s[0],!1,c,0)?p.breakAfter=s.shift().breakAfter:(n<p.length||p.children.length&&p.children[p.children.length-1].length==0)&&p.merge(n,p.length,null,!1,c,0),e++));e<i&&s.length;)if(d[i-1].become(s[s.length-1]))i--,s.pop(),f=s.length?0:c;else if(d[e].become(s[0]))e++,s.shift(),c=s.length?0:f;else break;!s.length&&e&&i<d.length&&!d[e-1].breakAfter&&d[i].merge(0,0,d[e-1],!1,c,f)&&e--,(e<i||s.length)&&t.replaceChildren(e,i,s)}}function WR(t,e,n,i,r,s){let a=t.childCursor(),{i:c,off:f}=a.findPos(n,1),{i:d,off:p}=a.findPos(e,-1),m=e-n;for(let v of i)m+=v.length;t.length+=m,VR(t,d,p,c,f,i,0,r,s)}let ci=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Gv=typeof document<"u"?document:{documentElement:{style:{}}};const Fv=/Edge\/(\d+)/.exec(ci.userAgent),XR=/MSIE \d/.test(ci.userAgent),Yv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ci.userAgent),bm=!!(XR||Yv||Fv),LT=!bm&&/gecko\/(\d+)/i.test(ci.userAgent),by=!bm&&/Chrome\/(\d+)/.exec(ci.userAgent),v_="webkitFontSmoothing"in Gv.documentElement.style,GR=!bm&&/Apple Computer/.test(ci.vendor),NT=GR&&(/Mobile\/\w+/.test(ci.userAgent)||ci.maxTouchPoints>2);var ve={mac:NT||/Mac/.test(ci.platform),windows:/Win/.test(ci.platform),linux:/Linux|X11/.test(ci.platform),ie:bm,ie_version:XR?Gv.documentMode||6:Yv?+Yv[1]:Fv?+Fv[1]:0,gecko:LT,gecko_version:LT?+(/Firefox\/(\d+)/.exec(ci.userAgent)||[0,0])[1]:0,chrome:!!by,chrome_version:by?+by[1]:0,ios:NT,android:/Android\b/.test(ci.userAgent),safari:GR,webkit_version:v_?+(/\bAppleWebKit\/(\d+)/.exec(ci.userAgent)||[0,0])[1]:0,tabSize:Gv.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const b_=256;class br extends Pt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof br)||this.length-(n-e)+i.length>b_||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new br(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Un(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return O_(this.dom,e,n)}}class Lo extends Pt{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(_R(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,s,a){return i&&(!(i instanceof Lo&&i.mark.eq(this.mark))||e&&s<=0||n<this.length&&a<=0)?!1:(WR(this,e,n,i?i.children.slice():[],s-1,a-1),this.markDirty(),!0)}split(e){let n=[],i=0,r=-1,s=0;for(let c of this.children){let f=i+c.length;f>e&&n.push(i<e?c.split(e-i):c),r<0&&i>=e&&(r=s),i=f,s++}let a=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Lo(this.mark,n,a)}domAtPos(e){return FR(this,e)}coordsAt(e,n){return KR(this,e,n)}}function O_(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,s=e,a=0;e==0&&n<0||e==i&&n>=0?ve.chrome||ve.gecko||(e?(r--,a=1):s<i&&(s++,a=-1)):n<0?r--:s<i&&s++;let c=Al(t,r,s).getClientRects();if(!c.length)return null;let f=c[(a?a<0:n>=0)?0:c.length-1];return ve.safari&&!a&&f.width==0&&(f=Array.prototype.find.call(c,d=>d.width)||f),a?zf(f,a<0):f||null}class ws extends Pt{static create(e,n,i){return new ws(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=ws.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,s,a){return i&&(!(i instanceof ws)||!this.widget.compare(i.widget)||e>0&&s<=0||n<this.length&&a<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-n),!0)}become(e){return e instanceof ws&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return ot.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,i=n&&n.state.doc,r=this.posAtStart;return i?i.slice(r,r+this.length):ot.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Un.before(this.dom):Un.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let a=this.side?this.side<0:e>0;for(let c=a?r.length-1:0;s=r[c],!(e>0?c==0:c==r.length-1||s.top<s.bottom);c+=a?-1:1);return zf(s,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Ka extends Pt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Ka&&e.side==this.side}split(){return new Ka(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Un.before(this.dom):Un.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ot.empty}get isHidden(){return!0}}br.prototype.children=ws.prototype.children=Ka.prototype.children=xO;function FR(t,e){let n=t.dom,{children:i}=t,r=0;for(let s=0;r<i.length;r++){let a=i[r],c=s+a.length;if(!(c==s&&a.getSide()<=0)){if(e>s&&e<c&&a.dom.parentNode==n)return a.domAtPos(e-s);if(e<=s)break;s=c}}for(let s=r;s>0;s--){let a=i[s-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let s=r;s<i.length;s++){let a=i[s];if(a.dom.parentNode==n)return a.domAtPos(0)}return new Un(n,0)}function YR(t,e,n){let i,{children:r}=t;n>0&&e instanceof Lo&&r.length&&(i=r[r.length-1])instanceof Lo&&i.mark.eq(e.mark)?YR(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function KR(t,e,n){let i=null,r=-1,s=null,a=-1;function c(d,p){for(let m=0,v=0;m<d.children.length&&v<=p;m++){let b=d.children[m],O=v+b.length;O>=p&&(b.children.length?c(b,p-v):(!s||s.isHidden&&(n>0||x_(s,b)))&&(O>p||v==O&&b.getSide()>0)?(s=b,a=p-v):(v<p||v==O&&b.getSide()<0&&!b.isHidden)&&(i=b,r=p-v)),v=O}}c(t,e);let f=(n<0?i:s)||i||s;return f?f.coordsAt(Math.max(0,f==i?r:a),n):S_(t)}function S_(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Ya(e);return n[n.length-1]||null}function x_(t,e){let n=t.coordsAt(0,1),i=e.coordsAt(0,1);return n&&i&&i.top<n.bottom}function Kv(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const _T=Object.create(null);function kp(t,e,n){if(t==e)return!0;t||(t=_T),e||(e=_T);let i=Object.keys(t),r=Object.keys(e);if(i.length-(n&&i.indexOf(n)>-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function Zv(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function w_(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class io{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Yn=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Yn||(Yn={}));class Te extends kl{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new $f(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new $s(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:a}=ZR(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new $s(e,i,r,n,e.widget||null,!0)}static line(e){return new Bf(e)}static set(e,n=!1){return lt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Te.none=lt.empty;class $f extends Te{constructor(e){let{start:n,end:i}=ZR(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof $f&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&kp(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}$f.prototype.point=!1;class Bf extends Te{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Bf&&this.spec.class==e.spec.class&&kp(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Bf.prototype.mapMode=Qn.TrackBefore;Bf.prototype.point=!0;class $s extends Te{constructor(e,n,i,r,s,a){super(n,i,s,e),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Qn.TrackBefore:Qn.TrackAfter:Qn.TrackDel}get type(){return this.startSide!=this.endSide?Yn.WidgetRange:this.startSide<=0?Yn.WidgetBefore:Yn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof $s&&C_(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}$s.prototype.point=!0;function ZR(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function C_(t,e){return t==e||!!(t&&e&&t.compare(e))}function ip(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class un extends Pt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,r,s,a){if(i){if(!(i instanceof un))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),WR(this,e,n,i?i.children.slice():[],s,a),!0}split(e){let n=new un;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:r}=this.childPos(e);r&&(n.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s<this.children.length;s++)n.append(this.children[s],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){kp(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){YR(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=Kv(n,this.attrs||{})),i&&(this.attrs=Kv({class:i},this.attrs||{}))}domAtPos(e){return FR(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(_R(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Zv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&Pt.get(r)instanceof Lo;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Pt.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!ve.ios||!this.children.some(s=>s instanceof br))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof br)||/[^ -~]/.test(i.text))return null;let r=Ya(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=KR(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight<s){let a=(s-r.textHeight)/2;return{top:i.top+a,bottom:i.bottom-a,left:i.left,right:i.left}}}return i}become(e){return e instanceof un&&this.children.length==0&&e.children.length==0&&kp(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let i=0,r=0;i<e.children.length;i++){let s=e.children[i],a=r+s.length;if(a>=n){if(s instanceof un)return s;if(a>n)break}r=a+s.breakAfter}return null}}class Bo extends Pt{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,s,a){return i&&(!(i instanceof Bo)||!this.widget.compare(i.widget)||e>0&&s<=0||n<this.length&&a<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?Un.before(this.dom):Un.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let i=new Bo(this.widget,n,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return xO}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):ot.empty}domBoundsAround(){return null}become(e){return e instanceof Bo&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);return i||(this.widget instanceof Jv?null:zf(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:i}=this.deco;return n==i?!1:e<0?n<0:i>0}}class Jv extends io{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class _u{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Bo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new un),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(hd(new Ka(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Bo)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:c,done:f}=this.cursor.next(this.skip);if(this.skip=0,f)throw new Error("Ran out of text content when drawing inline views");if(c){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e),s=Math.min(r,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(hd(new br(this.text.slice(this.textOff,this.textOff+s)),n),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=r<=s?0:n.length}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,s,a){if(this.disallowBlockEffectsFor[a]&&i instanceof $s){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let c=n-e;if(i instanceof $s)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Bo(i.widget||Za.block,c,i));else{let f=ws.create(i.widget||Za.inline,c,c?0:i.startSide),d=this.atCursorPos&&!f.isEditable&&s<=r.length&&(e<n||i.startSide>0),p=!f.isEditable&&(e<n||s>r.length||i.startSide<=0),m=this.getLine();this.pendingBuffer==2&&!d&&!f.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),d&&(m.append(hd(new Ka(1),r),s),s=r.length+Math.max(0,s-r.length)),m.append(hd(f,r),s),this.atCursorPos=p,this.pendingBuffer=p?e<n||s>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);c&&(this.textOff+c<=this.text.length?this.textOff+=c:(this.skip+=c-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,i,r,s){let a=new _u(e,n,i,s);return a.openEnd=lt.spans(r,n,i,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function hd(t,e){for(let n of e)t=new Lo(n,[t],t.length);return t}class Za extends io{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Za.inline=new Za("span");Za.block=new Za("div");var Nt=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Nt||(Nt={}));const Rl=Nt.LTR,wO=Nt.RTL;function JR(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const T_=JR("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),k_=JR("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),eb=Object.create(null),zr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);eb[e]=n,eb[n]=-e}function eM(t){return t<=247?T_[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?k_[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const E_=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Cs{get dir(){return this.level%2?wO:Rl}constructor(e,n,i){this.from=e,this.to=n,this.level=i}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,i,r){let s=-1;for(let a=0;a<e.length;a++){let c=e[a];if(c.from<=n&&c.to>=n){if(c.level==i)return a;(s<0||(r!=0?r<0?c.from<n:c.to>n:e[s].level>c.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function tM(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!tM(i.inner,r.inner))return!1}return!0}const Dt=[];function A_(t,e,n,i,r){for(let s=0;s<=i.length;s++){let a=s?i[s-1].to:e,c=s<i.length?i[s].from:n,f=s?256:r;for(let d=a,p=f,m=f;d<c;d++){let v=eM(t.charCodeAt(d));v==512?v=p:v==8&&m==4&&(v=16),Dt[d]=v==4?2:v,v&7&&(m=v),p=v}for(let d=a,p=f,m=f;d<c;d++){let v=Dt[d];if(v==128)d<c-1&&p==Dt[d+1]&&p&24?v=Dt[d]=p:Dt[d]=256;else if(v==64){let b=d+1;for(;b<c&&Dt[b]==64;)b++;let O=d&&p==8||b<n&&Dt[b]==8?m==1?1:8:256;for(let x=d;x<b;x++)Dt[x]=O;d=b-1}else v==8&&m==1&&(Dt[d]=1);p=v,v&7&&(m=v)}}}function R_(t,e,n,i,r){let s=r==1?2:1;for(let a=0,c=0,f=0;a<=i.length;a++){let d=a?i[a-1].to:e,p=a<i.length?i[a].from:n;for(let m=d,v,b,O;m<p;m++)if(b=eb[v=t.charCodeAt(m)])if(b<0){for(let x=c-3;x>=0;x-=3)if(zr[x+1]==-b){let C=zr[x+2],k=C&2?r:C&4?C&1?s:r:0;k&&(Dt[m]=Dt[zr[x]]=k),c=x;break}}else{if(zr.length==189)break;zr[c++]=m,zr[c++]=v,zr[c++]=f}else if((O=Dt[m])==2||O==1){let x=O==r;f=x?0:1;for(let C=c-3;C>=0;C-=3){let k=zr[C+2];if(k&2)break;if(x)zr[C+2]|=2;else{if(k&4)break;zr[C+2]|=4}}}}}function M_(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let a=r?n[r-1].to:t,c=r<n.length?n[r].from:e;for(let f=a;f<c;){let d=Dt[f];if(d==256){let p=f+1;for(;;)if(p==c){if(r==n.length)break;p=n[r++].to,c=r<n.length?n[r].from:e}else if(Dt[p]==256)p++;else break;let m=s==1,v=(p<e?Dt[p]:i)==1,b=m==v?m?1:2:i;for(let O=p,x=r,C=x?n[x-1].to:t;O>f;)O==C&&(O=n[--x].from,C=x?n[x-1].to:t),Dt[--O]=b;f=p}else s=d,f++}}}function tb(t,e,n,i,r,s,a){let c=i%2?2:1;if(i%2==r%2)for(let f=e,d=0;f<n;){let p=!0,m=!1;if(d==s.length||f<s[d].from){let x=Dt[f];x!=c&&(p=!1,m=x==16)}let v=!p&&c==1?[]:null,b=p?i:i+1,O=f;e:for(;;)if(d<s.length&&O==s[d].from){if(m)break e;let x=s[d];if(!p)for(let C=x.to,k=d+1;;){if(C==n)break e;if(k<s.length&&s[k].from==C)C=s[k++].to;else{if(Dt[C]==c)break e;break}}if(d++,v)v.push(x);else{x.from>f&&a.push(new Cs(f,x.from,b));let C=x.direction==Rl!=!(b%2);nb(t,C?i+1:i,r,x.inner,x.from,x.to,a),f=x.to}O=x.to}else{if(O==n||(p?Dt[O]!=c:Dt[O]==c))break;O++}v?tb(t,f,O,i+1,r,v,a):f<O&&a.push(new Cs(f,O,b)),f=O}else for(let f=n,d=s.length;f>e;){let p=!0,m=!1;if(!d||f>s[d-1].to){let x=Dt[f-1];x!=c&&(p=!1,m=x==16)}let v=!p&&c==1?[]:null,b=p?i:i+1,O=f;e:for(;;)if(d&&O==s[d-1].to){if(m)break e;let x=s[--d];if(!p)for(let C=x.from,k=d;;){if(C==e)break e;if(k&&s[k-1].to==C)C=s[--k].from;else{if(Dt[C-1]==c)break e;break}}if(v)v.push(x);else{x.to<f&&a.push(new Cs(x.to,f,b));let C=x.direction==Rl!=!(b%2);nb(t,C?i+1:i,r,x.inner,x.from,x.to,a),f=x.from}O=x.from}else{if(O==e||(p?Dt[O-1]!=c:Dt[O-1]==c))break;O--}v?tb(t,O,f,i+1,r,v,a):O<f&&a.push(new Cs(O,f,b)),f=O}}function nb(t,e,n,i,r,s,a){let c=e%2?2:1;A_(t,r,s,i,c),R_(t,r,s,i,c),M_(r,s,i,c),tb(t,r,s,e,n,i,a)}function D_(t,e,n){if(!t)return[new Cs(0,0,e==wO?1:0)];if(e==Rl&&!n.length&&!E_.test(t))return nM(t.length);if(n.length)for(;t.length>Dt.length;)Dt[Dt.length]=256;let i=[],r=e==Rl?0:1;return nb(t,r,r,n,0,t.length,i),i}function nM(t){return[new Cs(0,t,0)]}let iM="";function P_(t,e,n,i,r){var s;let a=i.head-t.from,c=Cs.find(e,a,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),f=e[c],d=f.side(r,n);if(a==d){let v=c+=r?1:-1;if(v<0||v>=e.length)return null;f=e[c=v],a=f.side(!r,n),d=f.side(r,n)}let p=Ln(t.text,a,f.forward(r,n));(p<f.from||p>f.to)&&(p=d),iM=t.text.slice(Math.min(a,p),Math.max(a,p));let m=c==(r?e.length-1:0)?null:e[c+(r?1:-1)];return m&&p==d&&m.level+(r?0:1)<f.level?ue.cursor(m.side(!r,n)+t.from,m.forward(r,n)?1:-1,m.level):ue.cursor(p+t.from,f.forward(r,n)?-1:1,f.level)}function z_(t,e,n){for(let i=e;i<n;i++){let r=eM(t.charCodeAt(i));if(r==1)return Rl;if(r==2||r==4)return wO}return Rl}const rM=be.define(),oM=be.define(),sM=be.define(),lM=be.define(),ib=be.define(),aM=be.define(),cM=be.define(),CO=be.define(),TO=be.define(),uM=be.define({combine:t=>t.some(e=>e)}),fM=be.define({combine:t=>t.some(e=>e)}),hM=be.define();class Qa{constructor(e,n="nearest",i="nearest",r=5,s=5,a=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new Qa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Qa(ue.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const dd=ze.define({map:(t,e)=>t.map(e)}),dM=ze.define();function ui(t,e,n){let i=t.facet(lM);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const $o=be.define({combine:t=>t.length?t[0]:!0});let $_=0;const Ea=be.define({combine(t){return t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})}});class Jt{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Ea.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Ea.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:a}=n||{};return new Jt($_++,e,i,r,c=>{let f=[];return a&&f.push(lf.of(d=>{let p=d.plugin(c);return p?a(p):Te.none})),s&&f.push(s(c)),f})}static fromClass(e,n){return Jt.define((i,r)=>new e(i,r),n)}}class Oy{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(ui(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){ui(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){ui(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const pM=be.define(),kO=be.define(),lf=be.define(),mM=be.define(),jf=be.define(),gM=be.define();function qT(t,e){let n=t.state.facet(gM);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return lt.spans(i,e.from,e.to,{point(){},span(s,a,c,f){let d=s-e.from,p=a-e.from,m=r;for(let v=c.length-1;v>=0;v--,f--){let b=c[v].spec.bidiIsolate,O;if(b==null&&(b=z_(e.text,d,p)),f>0&&m.length&&(O=m[m.length-1]).to==d&&O.direction==b)O.to=p,m=O.inner;else{let x={from:d,to:p,direction:b,inner:[]};m.push(x),m=x.inner}}}}),r}const yM=be.define();function EO(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(yM)){let a=s(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Ru=be.define();class tr{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new tr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(n-1,1)}}return e.splice(n,0,i),e}static extendWithRanges(e,n){if(n.length==0)return e;let i=[];for(let r=0,s=0,a=0,c=0;;r++){let f=r==e.length?null:e[r],d=a-c,p=f?f.fromB:1e9;for(;s<n.length&&n[s]<p;){let m=n[s],v=n[s+1],b=Math.max(c,m),O=Math.min(p,v);if(b<=O&&new tr(b+d,O+d,b,O).addToSet(i),v>p)break;s+=2}if(!f)return i;new tr(f.fromA,f.toA,f.fromB,f.toB).addToSet(i),a=f.toA,c=f.toB}}}class Ep{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=bn.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,a,c,f)=>r.push(new tr(s,a,c,f))),this.changedRanges=r}static create(e,n,i){return new Ep(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class UT extends Pt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Te.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new un],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new tr(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:d,toA:p})=>p<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!q_(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?j_(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:d,to:p}=this.hasComposition;i=new tr(d,p,e.changes.mapPos(d,-1),e.changes.mapPos(p,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ve.ie||ve.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.updateDeco(),f=N_(a,c,e.changes);return i=tr.extendWithRanges(i,f),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=ve.chrome||ve.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||r.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof Bo&&a.widget instanceof Jv&&s.push(a.dom);r.updateGaps(s)}updateChildren(e,n,i){let r=i?i.range.addToSet(e.slice()):e,s=this.childCursor(n);for(let a=r.length-1;;a--){let c=a>=0?r[a]:null;if(!c)break;let{fromA:f,toA:d,fromB:p,toB:m}=c,v,b,O,x;if(i&&i.range.fromB<m&&i.range.toB>p){let D=_u.build(this.view.state.doc,p,i.range.fromB,this.decorations,this.dynamicDecorationMap),R=_u.build(this.view.state.doc,i.range.toB,m,this.decorations,this.dynamicDecorationMap);b=D.breakAtStart,O=D.openStart,x=R.openEnd;let B=this.compositionView(i);R.breakAtStart?B.breakAfter=1:R.content.length&&B.merge(B.length,B.length,R.content[0],!1,R.openStart,0)&&(B.breakAfter=R.content[0].breakAfter,R.content.shift()),D.content.length&&B.merge(0,0,D.content[D.content.length-1],!0,0,D.openEnd)&&D.content.pop(),v=D.content.concat(B).concat(R.content)}else({content:v,breakAtStart:b,openStart:O,openEnd:x}=_u.build(this.view.state.doc,p,m,this.decorations,this.dynamicDecorationMap));let{i:C,off:k}=s.findPos(d,1),{i:$,off:z}=s.findPos(f,-1);VR(this,$,z,C,k,v,b,O,x)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(dM)&&(this.editContextFormatting=i.value)}compositionView(e){let n=new br(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Lo(r,[n],n.length);let i=new un;return i.append(n,0),i}fixCompositionDOM(e){let n=(s,a)=>{a.flags|=8|(a.children.some(f=>f.flags&7)?1:0),this.markedForComposition.add(a);let c=Pt.get(s);c&&c!=a&&(c.dom=null),a.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],n(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&!(this.view.state.facet($o)||this.dom.tabIndex>-1)&&np(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||s))return;let a=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,f=this.moveToLine(this.domAtPos(c.anchor)),d=c.empty?f:this.moveToLine(this.domAtPos(c.head));if(ve.gecko&&c.empty&&!this.hasComposition&&B_(f)){let m=document.createTextNode("");this.view.observer.ignore(()=>f.node.insertBefore(m,f.node.childNodes[f.offset]||null)),f=d=new Un(m,0),a=!0}let p=this.view.observer.selectionRange;(a||!p.focusNode||(!Nu(f.node,f.offset,p.anchorNode,p.anchorOffset)||!Nu(d.node,d.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,c))&&(this.view.observer.ignore(()=>{ve.android&&ve.chrome&&this.dom.contains(p.focusNode)&&__(p.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let m=sf(this.view.root);if(m)if(c.empty){if(ve.gecko){let v=Q_(f.node,f.offset);if(v&&v!=3){let b=(v==1?UR:IR)(f.node,f.offset);b&&(f=new Un(b.node,b.offset))}}m.collapse(f.node,f.offset),c.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=c.bidiLevel)}else if(m.extend){m.collapse(f.node,f.offset);try{m.extend(d.node,d.offset)}catch{}}else{let v=document.createRange();c.anchor>c.head&&([f,d]=[d,f]),v.setEnd(d.node,d.offset),v.setStart(f.node,f.offset),m.removeAllRanges(),m.addRange(v)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(f,d)),this.impreciseAnchor=f.precise?null:new Un(p.anchorNode,p.anchorOffset),this.impreciseHead=d.precise?null:new Un(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Nu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=sf(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=un.find(this,n.head);if(!a)return;let c=a.posAtStart;if(n.head==c||n.head==c+a.length)return;let f=this.coordsAt(n.head,-1),d=this.coordsAt(n.head,1);if(!f||!d||f.bottom>d.top)return;let p=this.domAtPos(n.head+n.assoc);i.collapse(p.node,p.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let m=e.observer.selectionRange;e.docView.posFromDOM(m.anchorNode,m.anchorOffset)!=n.from&&i.collapse(r,s)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r<n.childNodes.length;r++){let s=Pt.get(n.childNodes[r]);s instanceof un&&(i=s.domAtPos(0))}for(let r=e.offset-1;!i&&r>=0;r--){let s=Pt.get(n.childNodes[r]);s instanceof un&&(i=s.domAtPos(s.length))}return i?new Un(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=Pt.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let r=this.children[n];if(i<r.length||r instanceof un)break;n++,i=0}return this.children[n].domAtPos(i)}coordsAt(e,n){let i=null,r=0;for(let s=this.length,a=this.children.length-1;a>=0;a--){let c=this.children[a],f=s-c.breakAfter,d=f-c.length;if(f<e)break;if(d<=e&&(d<e||c.covers(-1))&&(f>e||c.covers(1))&&(!i||c instanceof un&&!(i instanceof un&&n>=0)))i=c,r=d;else if(i&&d==e&&f==e&&c instanceof Bo&&Math.abs(n)<2){if(c.deco.startSide<0)break;a&&(i=null)}s=d}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof un))return null;for(;r.children.length;){let{i:c,off:f}=r.childPos(i,1);for(;;c++){if(c==r.children.length)return null;if((r=r.children[c]).length)break}i=f}if(!(r instanceof br))return null;let s=Ln(r.text,i);if(s==i)return null;let a=Al(r.dom,i,s).getClientRects();for(let c=0;c<a.length;c++){let f=a[c];if(c==a.length-1||f.top<f.bottom&&f.left<f.right)return f}return null}measureVisibleLineHeights(e){let n=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,f=this.view.textDirection==Nt.LTR;for(let d=0,p=0;p<this.children.length;p++){let m=this.children[p],v=d+m.length;if(v>r)break;if(d>=i){let b=m.dom.getBoundingClientRect();if(n.push(b.height),a){let O=m.dom.lastChild,x=O?Ya(O):[];if(x.length){let C=x[x.length-1],k=f?C.right-b.left:b.right-C.left;k>c&&(c=k,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=v)}}}d=v+m.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Nt.RTL:Nt.LTR}measureTextSize(){for(let s of this.children)if(s instanceof un){let a=s.measureTextSize();if(a)return a}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Ya(e.firstChild)[0];n=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new HR(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],a=s?s.from-1:this.length;if(a>i){let c=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Te.replace({widget:new Jv(c),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!s)break;i=s.to+1}return Te.set(e)}updateDeco(){let e=1,n=this.view.state.facet(lf).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(mM).map((s,a)=>{let c=typeof s=="function";return c&&(i=!0),c?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(lt.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let d of this.view.state.facet(hM))try{if(d(this.view,e.range,e))return!0}catch(p){ui(this.view.state,p,"scroll handler")}let{range:n}=e,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=EO(this.view),a={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:c,offsetHeight:f}=this.view.scrollDOM;d_(this.view.scrollDOM,a,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,c),-c),Math.max(Math.min(e.yMargin,f),-f),this.view.textDirection==Nt.LTR)}}function B_(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function vM(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=UR(n.focusNode,n.focusOffset),r=IR(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let c=Pt.get(r.node);if(!c||c instanceof br&&c.text!=r.node.nodeValue)s=r;else if(t.docView.lastCompositionAfterCursor){let f=Pt.get(i.node);!f||f instanceof br&&f.text!=i.node.nodeValue||(s=r)}}if(t.docView.lastCompositionAfterCursor=s!=i,!s)return null;let a=e-s.offset;return{from:a,to:a+s.node.nodeValue.length,node:s.node}}function j_(t,e,n){let i=vM(t,n);if(!i)return null;let{node:r,from:s,to:a}=i,c=r.nodeValue;if(/[\n\r]/.test(c)||t.state.doc.sliceString(i.from,i.to)!=c)return null;let f=e.invertedDesc,d=new tr(f.mapPos(s),f.mapPos(a),s,a),p=[];for(let m=r.parentNode;;m=m.parentNode){let v=Pt.get(m);if(v instanceof Lo)p.push({node:m,deco:v.mark});else{if(v instanceof un||m.nodeName=="DIV"&&m.parentNode==t.contentDOM)return{range:d,text:r,marks:p,line:m};if(m!=t.contentDOM)p.push({node:m,deco:new $f({inclusive:!0,attributes:w_(m),tagName:m.tagName.toLowerCase()})});else return null}}}function Q_(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let L_=class{constructor(){this.changes=[]}compareRange(e,n){ip(e,n,this.changes)}comparePoint(e,n){ip(e,n,this.changes)}boundChange(e){ip(e,e,this.changes)}};function N_(t,e,n){let i=new L_;return lt.compare(t,e,n,i),i.changes}function __(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function q_(t,e){let n=!1;return e&&t.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(n=!0)}),n}function U_(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return ue.cursor(e);s==0?n=1:s==r.length&&(n=-1);let a=s,c=s;n<0?a=Ln(r.text,s,!1):c=Ln(r.text,s);let f=i(r.text.slice(a,c));for(;a>0;){let d=Ln(r.text,a,!1);if(i(r.text.slice(d,a))!=f)break;a=d}for(;c<r.length;){let d=Ln(r.text,c);if(i(r.text.slice(c,d))!=f)break;c=d}return ue.range(a+r.from,c+r.from)}function I_(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function H_(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Sy(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function IT(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function HT(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function rb(t,e,n){let i,r,s,a,c=!1,f,d,p,m;for(let O=t.firstChild;O;O=O.nextSibling){let x=Ya(O);for(let C=0;C<x.length;C++){let k=x[C];r&&Sy(r,k)&&(k=IT(HT(k,r.bottom),r.top));let $=I_(e,k),z=H_(n,k);if($==0&&z==0)return O.nodeType==3?VT(O,e,n):rb(O,e,n);(!i||a>z||a==z&&s>$)&&(i=O,r=k,s=$,a=z,c=$?e<k.left?C>0:C<x.length-1:!0),$==0?n>k.bottom&&(!p||p.bottom<k.bottom)?(f=O,p=k):n<k.top&&(!m||m.top>k.top)&&(d=O,m=k):p&&Sy(p,k)?p=HT(p,k.bottom):m&&Sy(m,k)&&(m=IT(m,k.top))}}if(p&&p.bottom>=n?(i=f,r=p):m&&m.top<=n&&(i=d,r=m),!i)return{node:t,offset:0};let v=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return VT(i,v,n);if(c&&i.contentEditable!="false")return rb(i,v,n);let b=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:b}}function VT(t,e,n){let i=t.nodeValue.length,r=-1,s=1e9,a=0;for(let c=0;c<i;c++){let f=Al(t,c,c+1).getClientRects();for(let d=0;d<f.length;d++){let p=f[d];if(p.top==p.bottom)continue;a||(a=e-p.left);let m=(p.top>n?p.top-n:n-p.bottom)-1;if(p.left-1<=e&&p.right+1>=e&&m<s){let v=e>=(p.left+p.right)/2,b=v;if((ve.chrome||ve.gecko)&&Al(t,c).getBoundingClientRect().left==p.right&&(b=!v),m<=0)return{node:t,offset:c+(b?1:0)};r=c+(b?1:0),s=m}}}return{node:t,offset:r>-1?r:a>0?t.nodeValue.length:0}}function bM(t,e,n,i=-1){var r,s;let a=t.contentDOM.getBoundingClientRect(),c=a.top+t.viewState.paddingTop,f,{docHeight:d}=t.viewState,{x:p,y:m}=e,v=m-c;if(v<0)return 0;if(v>d)return t.state.doc.length;for(let D=t.viewState.heightOracle.textHeight/2,R=!1;f=t.elementAtHeight(v),f.type!=Yn.Text;)for(;v=i>0?f.bottom+D:f.top-D,!(v>=0&&v<=d);){if(R)return n?null:0;R=!0,i=-i}m=c+v;let b=f.from;if(b<t.viewport.from)return t.viewport.from==0?0:n?null:WT(t,a,f,p,m);if(b>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:WT(t,a,f,p,m);let O=t.dom.ownerDocument,x=t.root.elementFromPoint?t.root:O,C=x.elementFromPoint(p,m);C&&!t.contentDOM.contains(C)&&(C=null),C||(p=Math.max(a.left+1,Math.min(a.right-1,p)),C=x.elementFromPoint(p,m),C&&!t.contentDOM.contains(C)&&(C=null));let k,$=-1;if(C&&((r=t.docView.nearest(C))===null||r===void 0?void 0:r.isEditable)!=!1){if(O.caretPositionFromPoint){let D=O.caretPositionFromPoint(p,m);D&&({offsetNode:k,offset:$}=D)}else if(O.caretRangeFromPoint){let D=O.caretRangeFromPoint(p,m);D&&({startContainer:k,startOffset:$}=D)}k&&(!t.contentDOM.contains(k)||ve.safari&&V_(k,$,p)||ve.chrome&&W_(k,$,p))&&(k=void 0),k&&($=Math.min(eo(k),$))}if(!k||!t.docView.dom.contains(k)){let D=un.find(t.docView,b);if(!D)return v>f.top+f.height/2?f.to:f.from;({node:k,offset:$}=rb(D.dom,p,m))}let z=t.docView.nearest(k);if(!z)return null;if(z.isWidget&&((s=z.dom)===null||s===void 0?void 0:s.nodeType)==1){let D=z.dom.getBoundingClientRect();return e.y<D.top||e.y<=D.bottom&&e.x<=(D.left+D.right)/2?z.posAtStart:z.posAtEnd}else return z.localPosFromDOM(k,$)+z.posAtStart}function WT(t,e,n,i,r){let s=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let c=t.viewState.heightOracle.textHeight,f=Math.floor((r-n.top-(t.defaultLineHeight-c)*.5)/c);s+=f*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+Hv(a,s,t.state.tabSize)}function OM(t,e,n){let i,r=t;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(;;){let s=r.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let a=r.parentNode;if(!a||a.nodeName=="DIV")break;r=a}}return Al(t,i-1,i).getBoundingClientRect().right>n}function V_(t,e,n){return OM(t,e,n)}function W_(t,e,n){if(e!=0)return OM(t,e,n);for(let r=t;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=t.nodeType==1?t.getBoundingClientRect():Al(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function ob(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!r||s.type==Yn.Text&&(r.type!=s.type||(n<0?s.from<e:s.to>e)))&&(r=s)}}return r||i}return i}function X_(t,e,n,i){let r=ob(t,e.head,e.assoc||-1),s=!i||r.type!=Yn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let a=t.dom.getBoundingClientRect(),c=t.textDirectionAt(r.from),f=t.posAtCoords({x:n==(c==Nt.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(f!=null)return ue.cursor(f,n?-1:1)}return ue.cursor(n?r.to:r.from,n?-1:1)}function XT(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let c=e,f=null;;){let d=P_(r,s,a,c,n),p=iM;if(!d){if(r.number==(n?t.state.doc.lines:1))return c;p=`
|
|
141
|
-
`,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),d=t.visualLineSide(r,!n)}if(f){if(!f(p))return c}else{if(!i)return d;f=i(p)}c=d}}function G_(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let a=i(s);return r==It.Space&&(r=a),r==a}}function F_(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return ue.cursor(r,e.assoc);let a=e.goalColumn,c,f=t.contentDOM.getBoundingClientRect(),d=t.coordsAtPos(r,e.assoc||-1),p=t.documentTop;if(d)a==null&&(a=d.left-f.left),c=s<0?d.top:d.bottom;else{let b=t.viewState.lineBlockAt(r);a==null&&(a=Math.min(f.right-f.left,t.defaultCharacterWidth*(r-b.from))),c=(s<0?b.top:b.bottom)+p}let m=f.left+a,v=i??t.viewState.heightOracle.textHeight>>1;for(let b=0;;b+=10){let O=c+(v+b)*s,x=bM(t,{x:m,y:O},!1,s);if(O<f.top||O>f.bottom||(s<0?x<r:x>r)){let C=t.docView.coordsForChar(x),k=!C||O<C.top?-1:1;return ue.cursor(x,k,void 0,a)}}}function qu(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,a,c)=>{if(e>s&&e<a){let f=i||n||(e-s<a-e?-1:1);e=f<0?s:a,i=f}});if(!i)return e}}function SM(t,e){let n=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],s=null;if(r.empty){let a=qu(t,r.from,0);a!=r.from&&(s=ue.cursor(a,-1))}else{let a=qu(t,r.from,-1),c=qu(t,r.to,1);(a!=r.from||c!=r.to)&&(s=ue.range(r.from==r.anchor?a:c,r.from==r.head?a:c))}s&&(n||(n=e.ranges.slice()),n[i]=s)}return n?ue.create(n,e.mainIndex):e}function xy(t,e,n){let i=qu(t.state.facet(jf).map(r=>r(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:ue.cursor(i,i<n.from?1:-1)}const Mu="";class Y_{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ye.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Mu}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let a=r.nextSibling;if(a==n)break;let c=Pt.get(r),f=Pt.get(a);(c&&f?c.breakAfter:(c?c.breakAfter:Tp(r))||Tp(a)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>s)&&this.lineBreak(),r=a}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,c;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(c=r.exec(n))&&(s=c.index,a=c[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=a-1);i=s+a}}readNode(e){if(e.cmIgnore)return;let n=Pt.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(K_(e,i.node,i.offset)?n:0))}}function K_(t,e,n){for(;;){if(!e||n<eo(e))return!1;if(e==t)return!0;n=El(e)+1,e=e.parentNode}}class GT{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class Z_{constructor(e,n,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let c=s||a?[]:t6(e),f=new Y_(c,e.state);f.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=f.text,this.newSel=n6(c,this.bounds.from)}else{let c=e.observer.selectionRange,f=s&&s.node==c.focusNode&&s.offset==c.focusOffset||!Xv(e.contentDOM,c.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(c.focusNode,c.focusOffset),d=a&&a.node==c.anchorNode&&a.offset==c.anchorOffset||!Xv(e.contentDOM,c.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(c.anchorNode,c.anchorOffset),p=e.viewport;if((ve.ios||ve.chrome)&&e.state.selection.main.empty&&f!=d&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(f,d),v=Math.max(f,d),b=p.from-m,O=p.to-v;(b==0||b==1||m==0)&&(O==0||O==-1||v==e.state.doc.length)&&(f=0,d=e.state.doc.length)}this.newSel=ue.single(d,f)}}}function xM(t,e){let n,{newSel:i}=e,r=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:c}=e.bounds,f=r.from,d=null;(s===8||ve.android&&e.text.length<c-a)&&(f=r.to,d="end");let p=e6(t.state.doc.sliceString(a,c,Mu),e.text,f-a,d);p&&(ve.chrome&&s==13&&p.toB==p.from+2&&e.text.slice(p.from,p.toB)==Mu+Mu&&p.toB--,n={from:a+p.from,to:a+p.toA,insert:ot.of(e.text.slice(p.from,p.toB).split(Mu))})}else i&&(!t.hasFocus&&t.state.facet($o)||i.main.eq(r))&&(i=null);if(!n&&!i)return!1;if(!n&&e.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:(ve.mac||ve.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=ue.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:ot.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:ve.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==`
|
|
142
|
-
`&&t.lineWrapping&&(i&&(i=ue.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ot.of([" "])}),n)return AO(t,n,i,s);if(i&&!i.main.eq(r)){let a=!1,c="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),c=t.inputState.lastSelectionOrigin,c=="select.pointer"&&(i=SM(t.state.facet(jf).map(f=>f(t)),i))),t.dispatch({selection:i,scrollIntoView:a,userEvent:c}),!0}else return!1}function AO(t,e,n,i=-1){if(ve.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(ve.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ja(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&ja(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&ja(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,c=()=>a||(a=J_(t,e,n));return t.state.facet(aM).some(f=>f(t,e.from,e.to,s,c))||t.dispatch(c()),!0}function J_(t,e,n){let i,r=t.state,s=r.selection.main,a=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let f=e.from<s.from?-1:1,d=f<0?s.from:s.to,p=qu(r.facet(jf).map(m=>m(t)),d,f);e.from==p&&(a=p)}if(a>-1)i={changes:e,selection:ue.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let f=s.from<e.from?r.sliceDoc(s.from,e.from):"",d=s.to>e.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(f+e.insert.sliceString(0,void 0,t.state.lineBreak)+d))}else{let f=r.changes(e),d=n&&n.main.to<=f.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let p=t.state.sliceDoc(e.from,e.to),m,v=n&&vM(t,n.main.head);if(v){let x=e.insert.length-(e.to-e.from);m={from:v.from,to:v.to-x}}else m=t.state.doc.lineAt(s.head);let b=s.to-e.to,O=s.to-s.from;i=r.changeByRange(x=>{if(x.from==s.from&&x.to==s.to)return{changes:f,range:d||x.map(f)};let C=x.to-b,k=C-p.length;if(x.to-x.from!=O||t.state.sliceDoc(k,C)!=p||x.to>=m.from&&x.from<=m.to)return{range:x};let $=r.changes({from:k,to:C,insert:e.insert}),z=x.to-s.to;return{changes:$,range:d?ue.range(Math.max(0,d.anchor+z),Math.max(0,d.head+z)):x.map($)}})}else i={changes:f,selection:d&&r.selection.replaceRange(d)}}let c="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,c+=".compose",t.inputState.compositionFirstChange&&(c+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:c,scrollIntoView:!0})}function e6(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s<r&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&t.length==e.length)return null;let a=t.length,c=e.length;for(;a>0&&c>0&&t.charCodeAt(a-1)==e.charCodeAt(c-1);)a--,c--;if(i=="end"){let f=Math.max(0,s-Math.min(a,c));n-=a+f-s}if(a<s&&t.length<e.length){let f=n<=s&&n>=a?s-n:0;s-=f,c=s+(c-a),a=s}else if(c<s){let f=n<=s&&n>=c?s-n:0;s-=f,a=s+(a-c),c=s}return{from:s,toA:a,toB:c}}function t6(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new GT(n,i)),(r!=n||s!=i)&&e.push(new GT(r,s))),e}function n6(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?ue.single(n+e,i+e):null}class i6{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ve.safari&&e.contentDOM.addEventListener("input",()=>null),ve.gecko&&b6(e.contentDOM.ownerDocument)}handleEvent(e){!f6(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=r6(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let a=!n[s].handlers.length,c=i[s];c&&a!=!c.handlers.length&&(r.removeEventListener(s,this.handleEvent),c=null),c||r.addEventListener(s,this.handleEvent,{passive:a})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&CM.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ve.android&&ve.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return ve.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=wM.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||o6.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,ja(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:ve.safari&&!ve.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function FT(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){ui(n.state,r)}}}function r6(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,a=r&&r.plugin.domEventObservers;if(s)for(let c in s){let f=s[c];f&&n(c).handlers.push(FT(i.value,f))}if(a)for(let c in a){let f=a[c];f&&n(c).observers.push(FT(i.value,f))}}for(let i in Or)n(i).handlers.push(Or[i]);for(let i in or)n(i).observers.push(or[i]);return e}const wM=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],o6="dthko",CM=[16,17,18,20,91,92,224,225],pd=6;function md(t){return Math.max(0,t)*.7+8}function s6(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class l6{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=p_(e.contentDOM),this.atoms=e.state.facet(jf).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ye.allowMultipleSelections)&&a6(e,n),this.dragging=u6(e,n)&&EM(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&s6(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,a=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:c}=this.scrollParents.y.getBoundingClientRect());let f=EO(this.view);e.clientX-f.left<=r+pd?n=-md(r-e.clientX):e.clientX+f.right>=a-pd&&(n=md(e.clientX-a)),e.clientY-f.top<=s+pd?i=-md(s-e.clientY):e.clientY+f.bottom>=c-pd&&(i=md(e.clientY-c)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=SM(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function a6(t,e){let n=t.state.facet(rM);return n.length?n[0](e):ve.mac?e.metaKey:e.ctrlKey}function c6(t,e){let n=t.state.facet(oM);return n.length?n[0](e):ve.mac?!e.altKey:!e.ctrlKey}function u6(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=sf(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s<r.length;s++){let a=r[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function f6(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Pt.get(n))&&i.ignoreEvent(e))return!1;return!0}const Or=Object.create(null),or=Object.create(null),TM=ve.ie&&ve.ie_version<15||ve.ios&&ve.webkit_version<604;function h6(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),kM(t,n.value)},50)}function Om(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function kM(t,e){e=Om(t.state,CO,e);let{state:n}=t,i,r=1,s=n.toText(e),a=s.lines==n.selection.ranges.length;if(sb!=null&&n.selection.ranges.every(f=>f.empty)&&sb==s.toString()){let f=-1;i=n.changeByRange(d=>{let p=n.doc.lineAt(d.from);if(p.from==f)return{range:d};f=p.from;let m=n.toText((a?s.line(r++).text:e)+n.lineBreak);return{changes:{from:p.from,insert:m},range:ue.cursor(d.from+m.length)}})}else a?i=n.changeByRange(f=>{let d=s.line(r++);return{changes:{from:f.from,to:f.to,insert:d.text},range:ue.cursor(f.from+d.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}or.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Or.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);or.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};or.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Or.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(sM))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=m6(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new l6(t,e,n,i)),i&&t.observer.ignore(()=>{NR(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function YT(t,e,n,i){if(i==1)return ue.cursor(e,n);if(i==2)return U_(t.state,e,n);{let r=un.find(t.docView,e),s=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:s.from,c=r?r.posAtEnd:s.to;return c<t.state.doc.length&&c==s.to&&c++,ue.range(a,c)}}let KT=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function d6(t,e,n,i){let r=un.find(t.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let a=r.coordsAt(s,-1);if(a&&KT(n,i,a))return-1;let c=r.coordsAt(s,1);return c&&KT(n,i,c)?1:a&&a.bottom>=i?-1:1}function ZT(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:d6(t,n,e.clientX,e.clientY)}}const p6=ve.ie&&ve.ie_version<=11;let JT=null,ek=0,tk=0;function EM(t){if(!p6)return t.detail;let e=JT,n=tk;return JT=t,tk=Date.now(),ek=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(ek+1)%3:1}function m6(t,e){let n=ZT(t,e),i=EM(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,a,c){let f=ZT(t,s),d,p=YT(t,f.pos,f.bias,i);if(n.pos!=f.pos&&!a){let m=YT(t,n.pos,n.bias,i),v=Math.min(m.from,p.from),b=Math.max(m.to,p.to);p=v<p.from?ue.range(v,b):ue.range(b,v)}return a?r.replaceRange(r.main.extend(p.from,p.to)):c&&i==1&&r.ranges.length>1&&(d=g6(r,f.pos))?d:c?r.addRange(p):ue.create([p])}}}function g6(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return ue.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Or.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,a=s+r.length;(s>=n.to||a<=n.from)&&(n=ue.range(s,a))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Om(t.state,TO,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Or.dragend=t=>(t.inputState.draggedContent=null,!1);function nk(t,e,n,i){if(n=Om(t.state,CO,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,a=i&&s&&c6(t,e)?{from:s.from,to:s.to}:null,c={from:r,insert:n},f=t.state.changes(a?[a,c]:c);t.focus(),t.dispatch({changes:f,selection:{anchor:f.mapPos(r,-1),head:f.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Or.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&nk(t,e,i.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let c=new FileReader;c.onerror=s,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[a]=c.result),s()},c.readAsText(n[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return nk(t,e,i,!0),!0}return!1};Or.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=TM?null:e.clipboardData;return n?(kM(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(h6(t),!1)};function y6(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function v6(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let a=t.doc.lineAt(s);a.number>r&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),r=a.number}i=!0}return{text:Om(t,TO,e.join(t.lineBreak)),ranges:n,linewise:i}}let sb=null;Or.copy=Or.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=v6(t.state);if(!n&&!r)return!1;sb=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=TM?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(y6(t,n),!1)};const AM=to.define();function RM(t,e){let n=[];for(let i of t.facet(cM)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:AM.of(!0)}):null}function MM(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=RM(t.state,e);n?t.dispatch(n):t.update([])}},10)}or.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),MM(t)};or.blur=t=>{t.observer.clearSelectionRange(),MM(t)};or.compositionstart=or.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};or.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ve.chrome&&ve.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};or.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Or.beforeinput=(t,e)=>{var n,i;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(s&&a.length){let c=a[0],f=t.posAtDOM(c.startContainer,c.startOffset),d=t.posAtDOM(c.endContainer,c.endOffset);return AO(t,{from:f,to:d,insert:t.state.toText(s)},null),!0}}let r;if(ve.chrome&&ve.android&&(r=wM.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ve.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ve.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>or.compositionend(t,e),20),!1};const ik=new Set;function b6(t){ik.has(t)||(ik.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const rk=["pre-wrap","normal","pre-line","break-spaces"];let Ja=!1;function ok(){Ja=!1}class O6{constructor(e){this.lineWrapping=e,this.doc=ot.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return rk.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,i,r,s,a){let c=rk.indexOf(e)>-1,f=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=c;if(this.lineWrapping=c,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,f){this.heightSamples={};for(let d=0;d<a.length;d++){let p=a[d];p<0?d++:this.heightSamples[Math.floor(p*10)]=!0}}return f}}class S6{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Hr{constructor(e,n,i,r,s){this.from=e,this.length=n,this.top=i,this.height=r,this._content=s}get type(){return typeof this._content=="number"?Yn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof $s?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Hr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Lt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(Lt||(Lt={}));const rp=.001;class Kn{constructor(e,n,i=2){this.length=e,this.height=n,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>rp&&(Ja=!0),this.height=e)}replace(e,n,i){return Kn.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,a=i.doc;for(let c=r.length-1;c>=0;c--){let{fromA:f,toA:d,fromB:p,toB:m}=r[c],v=s.lineAt(f,Lt.ByPosNoHeight,i.setDoc(n),0,0),b=v.to>=d?v:s.lineAt(d,Lt.ByPosNoHeight,i,0,0);for(m+=b.to-d,d=b.to;c>0&&v.from<=r[c-1].toA;)f=r[c-1].fromA,p=r[c-1].fromB,c--,f<v.from&&(v=s.lineAt(f,Lt.ByPosNoHeight,i,0,0));p+=v.from-f,f=v.from;let O=RO.build(i.setDoc(a),e,p,m);s=Ap(s,s.replace(f,d,O))}return s.updateHeight(i,0)}static empty(){return new Ti(0,0)}static of(e){if(e.length==1)return e[0];let n=0,i=e.length,r=0,s=0;for(;;)if(n==i)if(r>s*2){let c=e[n-1];c.break?e.splice(--n,1,c.left,null,c.right):e.splice(--n,1,c.left,c.right),i+=1+c.break,r-=c.size}else if(s>r*2){let c=e[i];c.break?e.splice(i,1,c.left,null,c.right):e.splice(i,1,c.left,c.right),i+=2+c.break,s-=c.size}else break;else if(r<s){let c=e[n++];c&&(r+=c.size)}else{let c=e[--i];c&&(s+=c.size)}let a=0;return e[n-1]==null?(a=1,n--):e[n]==null&&(a=1,i++),new x6(Kn.of(e.slice(0,n)),a,Kn.of(e.slice(i)))}}function Ap(t,e){return t==e?t:(t.constructor!=e.constructor&&(Ja=!0),e)}Kn.prototype.size=1;class DM extends Kn{constructor(e,n,i){super(e,n),this.deco=i}blockAt(e,n,i,r){return new Hr(r,this.length,i,this.height,this.deco||0)}lineAt(e,n,i,r,s){return this.blockAt(0,i,r,s)}forEachLine(e,n,i,r,s,a){e<=s+this.length&&n>=s&&a(this.blockAt(0,i,r,s))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ti extends DM{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new Hr(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Ti||r instanceof zn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof zn?r=new Ti(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Kn.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(r.heights[r.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class zn extends Kn{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,a,c=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*s);a=f/s,this.length>s+1&&(c=(this.height-f)/(this.length-s-1))}else a=this.height/s;return{firstLine:i,lastLine:r,perLine:a,perChar:c}}blockAt(e,n,i,r){let{firstLine:s,lastLine:a,perLine:c,perChar:f}=this.heightMetrics(n,r);if(n.lineWrapping){let d=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),p=n.doc.lineAt(d),m=c+p.length*f,v=Math.max(i,e-m/2);return new Hr(p.from,p.length,v,m,0)}else{let d=Math.max(0,Math.min(a-s,Math.floor((e-i)/c))),{from:p,length:m}=n.doc.line(s+d);return new Hr(p,m,i+c*d,c,0)}}lineAt(e,n,i,r,s){if(n==Lt.ByHeight)return this.blockAt(e,i,r,s);if(n==Lt.ByPosNoHeight){let{from:b,to:O}=i.doc.lineAt(e);return new Hr(b,O-b,0,0,0)}let{firstLine:a,perLine:c,perChar:f}=this.heightMetrics(i,s),d=i.doc.lineAt(e),p=c+d.length*f,m=d.number-a,v=r+c*m+f*(d.from-s-m);return new Hr(d.from,d.length,Math.max(r,Math.min(v,r+this.height-p)),p,0)}forEachLine(e,n,i,r,s,a){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:c,perLine:f,perChar:d}=this.heightMetrics(i,s);for(let p=e,m=r;p<=n;){let v=i.doc.lineAt(p);if(p==e){let O=v.number-c;m+=f*O+d*(e-s-O)}let b=f+d*v.length;a(new Hr(v.from,v.length,m,b,0)),m+=b,p=v.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let s=i[i.length-1];s instanceof zn?i[i.length-1]=new zn(s.length+r):i.push(null,new zn(r-1))}if(e>0){let s=i[0];s instanceof zn?i[0]=new zn(e+s.length):i.unshift(new zn(e-1),null)}return Kn.of(i)}decomposeLeft(e,n){n.push(new zn(e-1),null)}decomposeRight(e,n){n.push(null,new zn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],c=Math.max(n,r.from),f=-1;for(r.from>n&&a.push(new zn(r.from-n-1).updateHeight(e,n));c<=s&&r.more;){let p=e.doc.lineAt(c).length;a.length&&a.push(null);let m=r.heights[r.index++];f==-1?f=m:Math.abs(m-f)>=rp&&(f=-2);let v=new Ti(p,m);v.outdated=!1,a.push(v),c+=p+1}c<=s&&a.push(null,new zn(s-c).updateHeight(e,c));let d=Kn.of(a);return(f<0||Math.abs(d.height-this.height)>=rp||Math.abs(f-this.heightMetrics(e,n).perLine)>=rp)&&(Ja=!0),Ap(this,d)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class x6 extends Kn{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return e<s?this.left.blockAt(e,n,i,r):this.right.blockAt(e,n,s,r+this.left.length+this.break)}lineAt(e,n,i,r,s){let a=r+this.left.height,c=s+this.left.length+this.break,f=n==Lt.ByHeight?e<a:e<c,d=f?this.left.lineAt(e,n,i,r,s):this.right.lineAt(e,n,i,a,c);if(this.break||(f?d.to<c:d.from>c))return d;let p=n==Lt.ByPosNoHeight?Lt.ByPosNoHeight:Lt.ByPos;return f?d.join(this.right.lineAt(c,p,i,a,c)):this.left.lineAt(c,p,i,r,s).join(d)}forEachLine(e,n,i,r,s,a){let c=r+this.left.height,f=s+this.left.length+this.break;if(this.break)e<f&&this.left.forEachLine(e,n,i,r,s,a),n>=f&&this.right.forEachLine(e,n,i,c,f,a);else{let d=this.lineAt(f,Lt.ByPos,i,r,s);e<d.from&&this.left.forEachLine(e,d.from-1,i,r,s,a),d.to>=e&&d.from<=n&&a(d),n>d.to&&this.right.forEachLine(d.to+1,n,i,c,f,a)}}replace(e,n,i){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let c of i)s.push(c);if(e>0&&sk(s,a-1),n<this.length){let c=s.length;this.decomposeRight(n,s),sk(s,c)}return Kn.of(s)}decomposeLeft(e,n){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(i++,e>=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<i&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Kn.of(this.break?[e,null,n]:[e,n]):(this.left=Ap(this.left,e),this.right=Ap(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:a}=this,c=n+s.length+this.break,f=null;return r&&r.from<=n+s.length&&r.more?f=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=c+a.length&&r.more?f=a=a.updateHeight(e,c,i,r):a.updateHeight(e,c,i),f?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function sk(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof zn&&(i=t[e+1])instanceof zn&&t.splice(e-1,3,new zn(n.length+1+i.length))}const w6=5;class RO{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ti?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ti(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e<n||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=n-e;i.block?this.addBlock(new DM(a,r,i)):(a||s||r>=w6)&&this.addLineDeco(r,s,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ti(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new zn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ti)return e;let n=new Ti(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ti)&&!this.isCovered?this.nodes.push(new Ti(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof Ti&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,n,i,r){let s=new RO(i,e);return lt.spans(n,i,r,s,0),s.finish(i)}}function C6(t,e,n){let i=new T6;return lt.compare(t,e,n,i,0),i.changes}class T6{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,i,r){(e<n||i&&i.heightRelevant||r&&r.heightRelevant)&&ip(e,n,this.changes,5)}}function k6(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,s=Math.max(0,n.left),a=Math.min(r.innerWidth,n.right),c=Math.max(0,n.top),f=Math.min(r.innerHeight,n.bottom);for(let d=t.parentNode;d&&d!=i.body;)if(d.nodeType==1){let p=d,m=window.getComputedStyle(p);if((p.scrollHeight>p.clientHeight||p.scrollWidth>p.clientWidth)&&m.overflow!="visible"){let v=p.getBoundingClientRect();s=Math.max(s,v.left),a=Math.min(a,v.right),c=Math.max(c,v.top),f=Math.min(d==t.parentNode?r.innerHeight:f,v.bottom)}d=m.position=="absolute"||m.position=="fixed"?p.offsetParent:p.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:c-(n.top+e),bottom:Math.max(c,f)-(n.top+e)}}function E6(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function A6(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class wy{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],s=n[i];if(r.from!=s.from||r.to!=s.to||r.size!=s.size)return!1}return!0}draw(e,n){return Te.replace({widget:new R6(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class R6 extends io{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class lk{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=ak,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Nt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(kO).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new O6(n),this.stateDeco=e.facet(lf).filter(i=>typeof i!="function"),this.heightMap=Kn.empty().applyChanges(this.stateDeco,ot.empty,this.heightOracle.setDoc(e.doc),[new tr(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Te.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:a})=>r>=s&&r<=a)){let{from:s,to:a}=this.lineBlockAt(r);e.push(new gd(s,a))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?ak:new MO(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Du(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(lf).filter(p=>typeof p!="function");let r=e.changedRanges,s=tr.extendWithRanges(r,C6(i,this.stateDeco,e?e.changes:bn.empty(this.state.doc.length))),a=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);ok(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=a||Ja)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let f=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<f.from||n.range.head>f.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,n));let d=f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,e.flags|=this.updateForViewport(),(d||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(fM)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Nt.RTL:Nt.LTR;let a=this.heightOracle.mustRefreshForWrapping(s),c=n.getBoundingClientRect(),f=a||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let d=0,p=0;if(c.width&&c.height){let{scaleX:D,scaleY:R}=LR(n,c);(D>.005&&Math.abs(this.scaleX-D)>.005||R>.005&&Math.abs(this.scaleY-R)>.005)&&(this.scaleX=D,this.scaleY=R,d|=16,a=f=!0)}let m=(parseInt(i.paddingTop)||0)*this.scaleY,v=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=m||this.paddingBottom!=v)&&(this.paddingTop=m,this.paddingBottom=v,d|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,d|=16);let b=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=b&&(this.scrollAnchorHeight=-1,this.scrollTop=b),this.scrolledToBottom=qR(e.scrollDOM);let O=(this.printing?A6:k6)(n,this.paddingTop),x=O.top-this.pixelViewport.top,C=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(f=!0)),!this.inView&&!this.scrollTarget&&!E6(e.dom))return 0;let $=c.width;if((this.contentDOMWidth!=$||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,d|=16),f){let D=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(D)&&(a=!0),a||r.lineWrapping&&Math.abs($-this.contentDOMWidth)>r.charWidth){let{lineHeight:R,charWidth:B,textHeight:M}=e.docView.measureTextSize();a=R>0&&r.refresh(s,R,B,M,Math.max(5,$/B),D),a&&(e.docView.minWidth=0,d|=16)}x>0&&C>0?p=Math.max(x,C):x<0&&C<0&&(p=Math.min(x,C)),ok();for(let R of this.viewports){let B=R.from==this.viewport.from?D:e.docView.measureVisibleLineHeights(R);this.heightMap=(a?Kn.empty().applyChanges(this.stateDeco,ot.empty,this.heightOracle,[new tr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new S6(R.from,B))}Ja&&(d|=2)}let z=!this.viewportIsAppropriate(this.viewport,p)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return z&&(d&2&&(d|=this.updateScaler()),this.viewport=this.getViewport(p,this.scrollTarget),d|=this.updateForViewport()),(d&2||z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),d|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),d}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:c}=this,f=new gd(r.lineAt(a-i*1e3,Lt.ByHeight,s,0,0).from,r.lineAt(c+(1-i)*1e3,Lt.ByHeight,s,0,0).to);if(n){let{head:d}=n.range;if(d<f.from||d>f.to){let p=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),m=r.lineAt(d,Lt.ByPos,s,0,0),v;n.y=="center"?v=(m.top+m.bottom)/2-p/2:n.y=="start"||n.y=="nearest"&&d<f.from?v=m.top:v=m.bottom-p,f=new gd(r.lineAt(v-1e3/2,Lt.ByHeight,s,0,0).from,r.lineAt(v+p+1e3/2,Lt.ByHeight,s,0,0).to)}}return f}mapViewport(e,n){let i=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new gd(this.heightMap.lineAt(i,Lt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Lt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Lt.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,Lt.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:c}=this;return(e==0||r<=a-Math.max(10,Math.min(-i,250)))&&(n==this.state.doc.length||s>=c+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&s<c+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let i=[];for(let r of e)n.touchesRange(r.from,r.to)||i.push(new wy(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,n){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,s=r>>1,a=r<<1;if(this.defaultTextDirection!=Nt.LTR&&!i)return[];let c=[],f=(p,m,v,b)=>{if(m-p<s)return;let O=this.state.selection.main,x=[O.from];O.empty||x.push(O.to);for(let k of x)if(k>p&&k<m){f(p,k-10,v,b),f(k+10,m,v,b);return}let C=D6(e,k=>k.from>=v.from&&k.to<=v.to&&Math.abs(k.from-p)<s&&Math.abs(k.to-m)<s&&!x.some($=>k.from<$&&k.to>$));if(!C){if(m<v.to&&n&&i&&n.visibleRanges.some(z=>z.from<=m&&z.to>=m)){let z=n.moveToLineBoundary(ue.cursor(m),!1,!0).head;z>p&&(m=z)}let k=this.gapSize(v,p,m,b),$=i||k<2e6?k:2e6;C=new wy(p,m,k,$)}c.push(C)},d=p=>{if(p.length<a||p.type!=Yn.Text)return;let m=M6(p.from,p.to,this.stateDeco);if(m.total<a)return;let v=this.scrollTarget?this.scrollTarget.range.head:null,b,O;if(i){let x=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,k;if(v!=null){let $=vd(m,v),z=((this.visibleBottom-this.visibleTop)/2+x)/p.height;C=$-z,k=$+z}else C=(this.visibleTop-p.top-x)/p.height,k=(this.visibleBottom-p.top+x)/p.height;b=yd(m,C),O=yd(m,k)}else{let x=m.total*this.heightOracle.charWidth,C=r*this.heightOracle.charWidth,k=0;if(x>2e6)for(let B of e)B.from>=p.from&&B.from<p.to&&B.size!=B.displaySize&&B.from*this.heightOracle.charWidth+k<this.pixelViewport.left&&(k=B.size-B.displaySize);let $=this.pixelViewport.left+k,z=this.pixelViewport.right+k,D,R;if(v!=null){let B=vd(m,v),M=((z-$)/2+C)/x;D=B-M,R=B+M}else D=($-C)/x,R=(z+C)/x;b=yd(m,D),O=yd(m,R)}b>p.from&&f(p.from,b,p,m),O<p.to&&f(O,p.to,p,m)};for(let p of this.viewportLines)Array.isArray(p.type)?p.type.forEach(d):d(p);return c}gapSize(e,n,i,r){let s=vd(r,i)-vd(r,n);return this.heightOracle.lineWrapping?e.height*s:r.total*this.heightOracle.charWidth*s}updateLineGaps(e){wy.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Te.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];lt.spans(n,this.viewport.from,this.viewport.to,{span(s,a){i.push({from:s,to:a})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s<i.length&&!(r&8);s++){let a=this.visibleRanges[s],c=i[s];(a.from!=c.from||a.to!=c.to)&&(r|=4,e&&e.mapPos(a.from,-1)==c.from&&e.mapPos(a.to,1)==c.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Du(this.heightMap.lineAt(e,Lt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Du(this.heightMap.lineAt(this.scaler.fromDOM(e),Lt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Du(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class gd{constructor(e,n){this.from=e,this.to=n}}function M6(t,e,n){let i=[],r=t,s=0;return lt.spans(n,t,e,{span(){},point(a,c){a>r&&(i.push({from:r,to:a}),s+=a-r),r=c}},20),r<e&&(i.push({from:r,to:e}),s+=e-r),{total:s,ranges:i}}function yd({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:a}=e[r],c=a-s;if(i<=c)return s+i;i-=c}}function vd(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function D6(t,e){for(let n of t)if(e(n))return n}const ak={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class MO{constructor(e,n,i){let r=0,s=0,a=0;this.viewports=i.map(({from:c,to:f})=>{let d=n.lineAt(c,Lt.ByPos,e,0,0).top,p=n.lineAt(f,Lt.ByPos,e,0,0).bottom;return r+=p-d,{from:c,to:f,top:d,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let c of this.viewports)c.domTop=a+(c.top-s)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),s=c.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return r+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,r=s.domBottom}}fromDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return i+(e-r)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,r=s.domBottom}}eq(e){return e instanceof MO?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,i)=>n.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function Du(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Hr(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>Du(r,e)):t._content)}const bd=be.define({combine:t=>t.join(" ")}),lb=be.define({combine:t=>t.indexOf(!0)>-1}),ab=Ps.newName(),PM=Ps.newName(),zM=Ps.newName(),$M={"&light":"."+PM,"&dark":"."+zM};function cb(t,e,n){return new Ps(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const P6=cb("."+ab,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},$M),z6={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Cy=ve.ie&&ve.ie_version<=11;class $6{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new m_,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(ve.ie&&ve.ie_version<=11||ve.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ve.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ve.chrome&&ve.chrome_version<126)&&(this.editContext=new j6(e),e.state.facet($o)&&(e.contentDOM.editContext=this.editContext.editContext)),Cy&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet($o)?i.root.activeElement!=this.dom:!np(this.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ve.ie&&ve.ie_version<=11||ve.android&&ve.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Nu(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=sf(e.root);if(!n)return!1;let i=ve.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&B6(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=np(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&y_(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let i=this.dom;i;)if(i.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=n)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,z6),Cy&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Cy&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var i;if(!this.delayedAndroidKey){let r=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&ja(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&np(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Z_(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=xM(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=ck(n,e.previousSibling||e.target.previousSibling,-1),r=ck(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet($o)!=e.state.facet($o)&&(e.view.contentDOM.editContext=e.state.facet($o)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function ck(t,e,n){for(;e;){let i=Pt.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function uk(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Nu(a.node,a.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function B6(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return uk(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?uk(t,n):null}class j6{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:a}=r,c=this.toEditorPos(i.updateRangeStart),f=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:c,drifted:!1});let d={from:c,to:f,insert:ot.of(i.text.split(`
|
|
143
|
-
`))};if(d.from==this.from&&s<this.from?d.from=s:d.to==this.to&&s>this.to&&(d.to=s),d.from==d.to&&!d.insert.length){let p=ue.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));p.main.eq(r)||e.dispatch({selection:p,userEvent:"select"});return}if((ve.mac||ve.android)&&d.from==a-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(d={from:c,to:f,insert:ot.of([i.text.replace("."," ")])}),this.pendingContextChange=d,!e.state.readOnly){let p=this.to-this.from+(d.to-d.from+d.insert.length);AO(e,d,ue.single(this.toEditorPos(i.selectionStart,p),this.toEditorPos(i.selectionEnd,p)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),d.from<d.to&&!d.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let a=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);a<c;a++){let f=e.coordsForChar(a);s=f&&new DOMRect(f.left,f.top,f.right-f.left,f.bottom-f.top)||s||new DOMRect,r.push(s)}n.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let s of i.getTextFormats()){let a=s.underlineStyle,c=s.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(c)){let f=this.toEditorPos(s.rangeStart),d=this.toEditorPos(s.rangeEnd);if(f<d){let p=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;r.push(Te.mark({attributes:{style:p}}).range(f,d))}}}e.dispatch({effects:dM.of(Te.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=sf(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,a,c,f,d)=>{if(i)return;let p=d.length-(a-s);if(r&&a>=r.to)if(r.from==s&&r.to==a&&r.insert.eq(d)){r=this.pendingContextChange=null,n+=p,this.to+=p;return}else r=null,this.revertPending(e.state);if(s+=n,a+=n,a<=this.from)this.from+=p,this.to+=p;else if(s<this.to){if(s<this.from||a>this.to||this.to-this.from+d.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(a),d.toString()),this.to+=p}n+=p}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class de{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||g_(e.parent)||document,this.viewState=new lk(e.state||Ye.create(e)),e.scrollTo&&e.scrollTo.is(dd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ea).map(r=>new Oy(r));for(let r of this.plugins)r.update(this);this.observer=new $6(this),this.inputState=new i6(this),this.inputState.ensureHandlers(this.plugins),this.docView=new UT(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof dn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let v of e){if(v.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=v.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,c=0,f=null;e.some(v=>v.annotation(AM))?(this.inputState.notifiedFocused=a,c=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,f=RM(s,a),f||(c=1));let d=this.observer.delayedAndroidKey,p=null;if(d?(this.observer.clearDelayedAndroidKey(),p=this.observer.readChange(),(p&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(p=null)):this.observer.clear(),s.facet(Ye.phrases)!=this.state.facet(Ye.phrases))return this.setState(s);r=Ep.create(this,s,e),r.flags|=c;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let v of e){if(m&&(m=m.map(v.changes)),v.scrollIntoView){let{main:b}=v.state.selection;m=new Qa(b.empty?b:ue.cursor(b.head,b.head>b.anchor?-1:1))}for(let b of v.effects)b.is(dd)&&(m=b.value.clip(this.state))}this.viewState.update(r,m),this.bidiCache=Rp.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Ru)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(v=>v.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(bd)!=r.state.facet(bd)&&(this.viewState.mustMeasureContent=!0),(n||i||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let v of this.state.facet(ib))try{v(r)}catch(b){ui(this.state,b,"update listener")}(f||p)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),p&&!xM(this,p)&&d.force&&ja(this.contentDOM,d.key,d.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new lk(e),this.plugins=e.facet(Ea).map(i=>new Oy(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new UT(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ea),i=e.state.facet(Ea);if(n!=i){let r=[];for(let s of i){let a=n.indexOf(s);if(a<0)r.push(new Oy(s));else{let c=this.plugins[a];c.mustUpdate=e,r.push(c)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(i){ui(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(a<0)if(qR(i))s=-1,a=this.viewState.heightMap.height;else{let b=this.viewState.scrollAnchorAt(r);s=b.from,a=b.top}this.updateState=1;let f=this.viewState.measure(this);if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];f&4||([this.measureRequests,d]=[d,this.measureRequests]);let p=d.map(b=>{try{return b.read(this)}catch(O){return ui(this.state,O),fk}}),m=Ep.create(this,this.state,[]),v=!1;m.flags|=f,n?n.flags|=f:n=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),v=this.docView.update(m),v&&this.docViewUpdate());for(let b=0;b<d.length;b++)if(p[b]!=fk)try{let O=d[b];O.write&&O.write(p[b],this)}catch(O){ui(this.state,O)}if(v&&this.docView.updateSelection(!0),!m.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let O=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-a;if(O>1||O<-1){r=r+O,i.scrollTop=r/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let c of this.state.facet(ib))c(n)}get themeClasses(){return ab+" "+(this.state.facet(lb)?zM:PM)+" "+this.state.facet(bd)}updateAttrs(){let e=hk(this,pM,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet($o)?"true":"false",class:"cm-content",style:`${ve.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),hk(this,kO,n);let i=this.observer.ignore(()=>{let r=Zv(this.contentDOM,this.contentAttrs,n),s=Zv(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(de.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Ru);let e=this.state.facet(de.cspNonce);Ps.mount(this.root,this.styleModules.concat(P6).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(i=>i.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return xy(this,e,XT(this,e,n,i))}moveByGroup(e,n){return xy(this,e,XT(this,e,n,i=>G_(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return ue.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return X_(this,e,n,i)}moveVertically(e,n,i){return xy(this,e,F_(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),bM(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),a=s[Cs.find(s,e-r.from,-1,n)];return zf(i,a.dir==Nt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(uM)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Q6)return nM(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||tM(s.isolates,i=qT(this,e))))return s.order;i||(i=qT(this,e));let r=D_(e.text,n,i);return this.bidiCache.push(new Rp(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ve.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{NR(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return dd.of(new Qa(typeof e=="number"?ue.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return dd.of(new Qa(ue.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Jt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Jt.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=Ps.newName(),r=[bd.of(i),Ru.of(cb(`.${i}`,e))];return n&&n.dark&&r.push(lb.of(!0)),r}static baseTheme(e){return Zr.lowest(Ru.of(cb("."+ab,e,$M)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Pt.get(i)||Pt.get(e);return((n=r?.rootView)===null||n===void 0?void 0:n.view)||null}}de.styleModule=Ru;de.inputHandler=aM;de.clipboardInputFilter=CO;de.clipboardOutputFilter=TO;de.scrollHandler=hM;de.focusChangeEffect=cM;de.perLineTextDirection=uM;de.exceptionSink=lM;de.updateListener=ib;de.editable=$o;de.mouseSelectionStyle=sM;de.dragMovesSelection=oM;de.clickAddsSelectionRange=rM;de.decorations=lf;de.outerDecorations=mM;de.atomicRanges=jf;de.bidiIsolatedRanges=gM;de.scrollMargins=yM;de.darkTheme=lb;de.cspNonce=be.define({combine:t=>t.length?t[0]:""});de.contentAttributes=kO;de.editorAttributes=pM;de.lineWrapping=de.contentAttributes.of({class:"cm-lineWrapping"});de.announce=ze.define();const Q6=4096,fk={};class Rp{constructor(e,n,i,r,s,a){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=a}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Nt.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==r&&!n.touchesRange(a.from,a.to)&&i.push(new Rp(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return i}}function hk(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let s=i[r],a=typeof s=="function"?s(t):s;a&&Kv(a,n)}return n}const L6=ve.mac?"mac":ve.windows?"win":ve.linux?"linux":"key";function N6(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,a,c;for(let f=0;f<n.length-1;++f){const d=n[f];if(/^(cmd|meta|m)$/i.test(d))c=!0;else if(/^a(lt)?$/i.test(d))r=!0;else if(/^(c|ctrl|control)$/i.test(d))s=!0;else if(/^s(hift)?$/i.test(d))a=!0;else if(/^mod$/i.test(d))e=="mac"?c=!0:s=!0;else throw new Error("Unrecognized modifier name: "+d)}return r&&(i="Alt-"+i),s&&(i="Ctrl-"+i),c&&(i="Meta-"+i),a&&(i="Shift-"+i),i}function Od(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const _6=Zr.default(de.domEventHandlers({keydown(t,e){return jM(BM(e.state),t,e,"editor")}})),No=be.define({enables:_6}),dk=new WeakMap;function BM(t){let e=t.facet(No),n=dk.get(e);return n||dk.set(e,n=I6(e.reduce((i,r)=>i.concat(r),[]))),n}function q6(t,e,n){return jM(BM(t.state),e,t,n)}let Os=null;const U6=4e3;function I6(t,e=L6){let n=Object.create(null),i=Object.create(null),r=(a,c)=>{let f=i[a];if(f==null)i[a]=c;else if(f!=c)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,c,f,d,p)=>{var m,v;let b=n[a]||(n[a]=Object.create(null)),O=c.split(/ (?!$)/).map(k=>N6(k,e));for(let k=1;k<O.length;k++){let $=O.slice(0,k).join(" ");r($,!0),b[$]||(b[$]={preventDefault:!0,stopPropagation:!1,run:[z=>{let D=Os={view:z,prefix:$,scope:a};return setTimeout(()=>{Os==D&&(Os=null)},U6),!0}]})}let x=O.join(" ");r(x,!1);let C=b[x]||(b[x]={preventDefault:!1,stopPropagation:!1,run:((v=(m=b._any)===null||m===void 0?void 0:m.run)===null||v===void 0?void 0:v.slice())||[]});f&&C.run.push(f),d&&(C.preventDefault=!0),p&&(C.stopPropagation=!0)};for(let a of t){let c=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let d of c){let p=n[d]||(n[d]=Object.create(null));p._any||(p._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=a;for(let v in p)p[v].run.push(b=>m(b,ub))}let f=a[e]||a.key;if(f)for(let d of c)s(d,f,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(d,"Shift-"+f,a.shift,a.preventDefault,a.stopPropagation)}return n}let ub=null;function jM(t,e,n,i){ub=e;let r=f_(e),s=ai(r,0),a=Ir(s)==r.length&&r!=" ",c="",f=!1,d=!1,p=!1;Os&&Os.view==n&&Os.scope==i&&(c=Os.prefix+" ",CM.indexOf(e.keyCode)<0&&(d=!0,Os=null));let m=new Set,v=C=>{if(C){for(let k of C.run)if(!m.has(k)&&(m.add(k),k(n)))return C.stopPropagation&&(p=!0),!0;C.preventDefault&&(C.stopPropagation&&(p=!0),d=!0)}return!1},b=t[i],O,x;return b&&(v(b[c+Od(r,e,!a)])?f=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ve.windows&&e.ctrlKey&&e.altKey)&&!(ve.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(O=zs[e.keyCode])&&O!=r?(v(b[c+Od(O,e,!0)])||e.shiftKey&&(x=of[e.keyCode])!=r&&x!=O&&v(b[c+Od(x,e,!1)]))&&(f=!0):a&&e.shiftKey&&v(b[c+Od(r,e,!0)])&&(f=!0),!f&&v(b._any)&&(f=!0)),d&&(f=!0),f&&p&&e.stopPropagation(),ub=null,f}class Qf{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=QM(e);return[new Qf(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return H6(e,n,i)}}function QM(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Nt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function pk(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,c=t.posAtCoords({x:s.left+1,y:a}),f=t.posAtCoords({x:s.right-1,y:a});return c==null||f==null?i:{from:Math.max(i.from,Math.min(c,f)),to:Math.min(i.to,Math.max(c,f))}}function H6(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==Nt.LTR,a=t.contentDOM,c=a.getBoundingClientRect(),f=QM(t),d=a.querySelector(".cm-line"),p=d&&window.getComputedStyle(d),m=c.left+(p?parseInt(p.paddingLeft)+Math.min(0,parseInt(p.textIndent)):0),v=c.right-(p?parseInt(p.paddingRight):0),b=ob(t,i,1),O=ob(t,r,-1),x=b.type==Yn.Text?b:null,C=O.type==Yn.Text?O:null;if(x&&(t.lineWrapping||b.widgetLineBreaks)&&(x=pk(t,i,1,x)),C&&(t.lineWrapping||O.widgetLineBreaks)&&(C=pk(t,r,-1,C)),x&&C&&x.from==C.from&&x.to==C.to)return $(z(n.from,n.to,x));{let R=x?z(n.from,null,x):D(b,!1),B=C?z(null,n.to,C):D(O,!0),M=[];return(x||b).to<(C||O).from-(x&&C?1:0)||b.widgetLineBreaks>1&&R.bottom+t.defaultLineHeight/2<B.top?M.push(k(m,R.bottom,v,B.top)):R.bottom<B.top&&t.elementAtHeight((R.bottom+B.top)/2).type==Yn.Text&&(R.bottom=B.top=(R.bottom+B.top)/2),$(R).concat(M).concat($(B))}function k(R,B,M,j){return new Qf(e,R-f.left,B-f.top,M-R,j-B)}function $({top:R,bottom:B,horizontal:M}){let j=[];for(let N=0;N<M.length;N+=2)j.push(k(M[N],R,M[N+1],B));return j}function z(R,B,M){let j=1e9,N=-1e9,A=[];function Q(q,V,L,X,Y){let K=t.coordsAtPos(q,q==M.to?-2:2),le=t.coordsAtPos(L,L==M.from?2:-2);!K||!le||(j=Math.min(K.top,le.top,j),N=Math.max(K.bottom,le.bottom,N),Y==Nt.LTR?A.push(s&&V?m:K.left,s&&X?v:le.right):A.push(!s&&X?m:le.left,!s&&V?v:K.right))}let T=R??M.from,U=B??M.to;for(let q of t.visibleRanges)if(q.to>T&&q.from<U)for(let V=Math.max(q.from,T),L=Math.min(q.to,U);;){let X=t.state.doc.lineAt(V);for(let Y of t.bidiSpans(X)){let K=Y.from+X.from,le=Y.to+X.from;if(K>=L)break;le>V&&Q(Math.max(K,V),R==null&&K<=T,Math.min(le,L),B==null&&le>=U,Y.dir)}if(V=X.to+1,V>=L)break}return A.length==0&&Q(T,R==null,U,B==null,t.textDirection),{top:j,bottom:N,horizontal:A}}function D(R,B){let M=c.top+(B?R.top:R.bottom);return{top:M,bottom:M,horizontal:[]}}}function V6(t,e){return t.constructor==e.constructor&&t.eq(e)}class W6{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(op)!=e.state.facet(op)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(op);for(;n<i.length&&i[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,i)=>!V6(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,ve.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const op=be.define();function LM(t){return[Jt.define(e=>new W6(e,t)),op.of(t)]}const af=be.define({combine(t){return no(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function DO(t={}){return[af.of(t),X6,G6,F6,fM.of(!0)]}function NM(t){return t.startState.facet(af)!=t.state.facet(af)}const X6=LM({above:!0,markers(t){let{state:e}=t,n=e.facet(af),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor){let a=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=r.empty?r:ue.cursor(r.head,r.head>r.anchor?-1:1);for(let f of Qf.forRange(t,a,c))i.push(f)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=NM(t);return n&&mk(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){mk(e.state,t)},class:"cm-cursorLayer"});function mk(t,e){e.style.animationDuration=t.facet(af).cursorBlinkRate+"ms"}const G6=LM({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Qf.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||NM(t)},class:"cm-selectionLayer"}),F6=Zr.highest(de.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),_M=ze.define({map(t,e){return t==null?null:e.mapPos(t)}}),Pu=kn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(_M)?i.value:n,t)}}),Y6=Jt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Pu);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Pu)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Pu),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Pu)!=t&&this.view.dispatch({effects:_M.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function qM(){return[Pu,Y6]}function gk(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),a=n,c;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;c=e.exec(s.value);)r(a+c.index,c)}function K6(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class Z6{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(c,f,d,p)=>r(p,d,d+c[0].length,c,f);else if(typeof i=="function")this.addMatch=(c,f,d,p)=>{let m=i(c,f,d);m&&p(d,d+c[0].length,m)};else if(i)this.addMatch=(c,f,d,p)=>p(d,d+c[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let n=new Jr,i=n.add.bind(n);for(let{from:r,to:s}of K6(e,this.maxLength))gk(e.state.doc,this.regexp,r,s,(a,c)=>this.addMatch(c,e,a,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,a,c,f)=>{f>=e.view.viewport.from&&c<=e.view.viewport.to&&(i=Math.min(c,i),r=Math.max(f,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let a=Math.max(s.from,i),c=Math.min(s.to,r);if(c>=a){let f=e.state.doc.lineAt(a),d=f.to<c?e.state.doc.lineAt(c):f,p=Math.max(s.from,f.from),m=Math.min(s.to,d.to);if(this.boundary){for(;a>f.from;a--)if(this.boundary.test(f.text[a-1-f.from])){p=a;break}for(;c<d.to;c++)if(this.boundary.test(d.text[c-d.from])){m=c;break}}let v=[],b,O=(x,C,k)=>v.push(k.range(x,C));if(f==d)for(this.regexp.lastIndex=p-f.from;(b=this.regexp.exec(f.text))&&b.index<m-f.from;)this.addMatch(b,e,b.index+f.from,O);else gk(e.state.doc,this.regexp,p,m,(x,C)=>this.addMatch(C,e,x,O));n=n.update({filterFrom:p,filterTo:m,filter:(x,C)=>x<p||C>m,add:v})}}return n}}const fb=/x/.unicode!=null?"gu":"g",J6=new RegExp(`[\0-\b
|
|
144
|
-
--\u2028\u2029\uFEFF-]`,fb),e8={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ty=null;function t8(){var t;if(Ty==null&&typeof document<"u"&&document.body){let e=document.body.style;Ty=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Ty||!1}const sp=be.define({combine(t){let e=no(t,{render:null,specialChars:J6,addSpecialChars:null});return(e.replaceTabs=!t8())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,fb)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,fb)),e}});function PO(t={}){return[sp.of(t),n8()]}let yk=null;function n8(){return yk||(yk=Jt.fromClass(class{constructor(t){this.view=t,this.decorations=Te.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(sp)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Z6({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=ai(e[0],0);if(s==9){let a=r.lineAt(i),c=n.state.tabSize,f=uc(a.text,c,i-a.from);return Te.replace({widget:new s8((c-f%c)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Te.replace({widget:new o8(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(sp);t.startState.facet(sp)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const i8="•";function r8(t){return t>=32?i8:t==10?"":String.fromCharCode(9216+t)}class o8 extends io{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=r8(this.code),i=e.state.phrase("Control character")+" "+(e8[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class s8 extends io{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function l8(){return c8}const a8=Te.line({class:"cm-activeLine"}),c8=Jt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(a8.range(r.from)),e=r.from)}return Te.set(n)}},{decorations:t=>t.decorations});class u8 extends io{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Ya(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=zf(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function f8(t){let e=Jt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?Te.set([Te.widget({widget:new u8(t),side:1}).range(0)]):Te.none}get decorations(){return this.view.state.doc.length?Te.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,de.contentAttributes.of({"aria-placeholder":t})]:e}const hb=2e3;function h8(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>hb||n.off>hb||e.col<0||n.col<0){let a=Math.min(e.off,n.off),c=Math.max(e.off,n.off);for(let f=i;f<=r;f++){let d=t.doc.line(f);d.length<=c&&s.push(ue.range(d.from+a,d.to+c))}}else{let a=Math.min(e.col,n.col),c=Math.max(e.col,n.col);for(let f=i;f<=r;f++){let d=t.doc.line(f),p=Hv(d.text,a,t.tabSize,!0);if(p<0)s.push(ue.cursor(d.to));else{let m=Hv(d.text,c,t.tabSize);s.push(ue.range(d.from+p,d.from+m))}}}return s}function d8(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function vk(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>hb?-1:r==i.length?d8(t,e.clientX):uc(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function p8(t,e){let n=vk(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(s);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,s,a){let c=vk(t,r);if(!c)return i;let f=h8(t.state,n,c);return f.length?a?ue.create(f.concat(i.ranges)):ue.create(f):i}}:null}function UM(t){let e=(n=>n.altKey&&n.button==0);return de.mouseSelectionStyle.of((n,i)=>e(i)?p8(n,i):null)}const m8={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},g8={style:"cursor: crosshair"};function y8(t={}){let[e,n]=m8[t.key||"Alt"],i=Jt.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,de.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?g8:null})]}const pu="-10000px";class IM{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=i(a,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(f=>f);if(r===this.input){for(let f of this.tooltipViews)f.update&&f.update(e);return!1}let a=[],c=n?[]:null;for(let f=0;f<s.length;f++){let d=s[f],p=-1;if(d){for(let m=0;m<this.tooltips.length;m++){let v=this.tooltips[m];v&&v.create==d.create&&(p=m)}if(p<0)a[f]=this.createTooltipView(d,f?a[f-1]:null),c&&(c[f]=!!d.above);else{let m=a[f]=this.tooltipViews[p];c&&(c[f]=n[p]),m.update&&m.update(e)}}}for(let f of this.tooltipViews)a.indexOf(f)<0&&(this.removeTooltipView(f),(i=f.destroy)===null||i===void 0||i.call(f));return n&&(c.forEach((f,d)=>n[d]=f),n.length=c.length),this.input=r,this.tooltips=s,this.tooltipViews=a,!0}}function v8(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const ky=be.define({combine:t=>{var e,n,i;return{position:ve.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||v8}}}),bk=new WeakMap,zO=Jt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(ky);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new IM(t,$O,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(ky);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=pu,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(ve.gecko)n=s.offsetParent!=this.container.ownerDocument.body;else if(s.style.top==pu&&s.style.left=="0px"){let a=s.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=EO(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,a)=>{let c=this.manager.tooltipViews[a];return c.getCoords?c.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(ky).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let c of this.manager.tooltipViews)c.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,a=[];for(let c=0;c<this.manager.tooltips.length;c++){let f=this.manager.tooltips[c],d=this.manager.tooltipViews[c],{dom:p}=d,m=t.pos[c],v=t.size[c];if(!m||f.clip!==!1&&(m.bottom<=Math.max(n.top,i.top)||m.top>=Math.min(n.bottom,i.bottom)||m.right<Math.max(n.left,i.left)-.1||m.left>Math.min(n.right,i.right)+.1)){p.style.top=pu;continue}let b=f.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,O=b?7:0,x=v.right-v.left,C=(e=bk.get(d))!==null&&e!==void 0?e:v.bottom-v.top,k=d.offset||O8,$=this.view.textDirection==Nt.LTR,z=v.width>i.right-i.left?$?i.left:i.right-v.width:$?Math.max(i.left,Math.min(m.left-(b?14:0)+k.x,i.right-x)):Math.min(Math.max(i.left,m.left-x+(b?14:0)-k.x),i.right-x),D=this.above[c];!f.strictSide&&(D?m.top-C-O-k.y<i.top:m.bottom+C+O+k.y>i.bottom)&&D==i.bottom-m.bottom>m.top-i.top&&(D=this.above[c]=!D);let R=(D?m.top-i.top:i.bottom-m.bottom)-O;if(R<C&&d.resize!==!1){if(R<this.view.defaultLineHeight){p.style.top=pu;continue}bk.set(d,C),p.style.height=(C=R)/s+"px"}else p.style.height&&(p.style.height="");let B=D?m.top-C-O-k.y:m.bottom+O+k.y,M=z+x;if(d.overlap!==!0)for(let j of a)j.left<M&&j.right>z&&j.top<B+C&&j.bottom>B&&(B=D?j.top-C-2-O:j.bottom+O+2);if(this.position=="absolute"?(p.style.top=(B-t.parent.top)/s+"px",Ok(p,(z-t.parent.left)/r)):(p.style.top=B/s+"px",Ok(p,z/r)),b){let j=m.left+($?k.x:-k.x)-(z+14-7);b.style.left=j/r+"px"}d.overlap!==!0&&a.push({left:z,top:B,right:M,bottom:B+C}),p.classList.toggle("cm-tooltip-above",D),p.classList.toggle("cm-tooltip-below",!D),d.positioned&&d.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=pu}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Ok(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const b8=de.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),O8={x:0,y:0},$O=be.define({enables:[zO,b8]}),Mp=be.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Sm{static create(e){return new Sm(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new IM(e,Mp,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const S8=$O.compute([Mp],t=>{let e=t.facet(Mp);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:Sm.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class x8{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,i=e.docView.nearest(n.target);if(!i)return;let r,s=1;if(i instanceof ws)r=i.posAtStart;else{if(r=e.posAtCoords(n),r==null)return;let c=e.coordsAtPos(r);if(!c||n.y<c.top||n.y>c.bottom||n.x<c.left-e.defaultCharacterWidth||n.x>c.right+e.defaultCharacterWidth)return;let f=e.bidiSpans(e.state.doc.lineAt(r)).find(p=>p.from<=r&&p.to>=r),d=f&&f.dir==Nt.RTL?-1:1;s=n.x<c.left?-d:d}let a=this.source(e,r,s);if(a?.then){let c=this.pending={pos:r};a.then(f=>{this.pending==c&&(this.pending=null,f&&!(Array.isArray(f)&&!f.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(f)?f:[f])}))},f=>ui(e.state,f,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(zO),n=e?e.manager.tooltips.findIndex(i=>i.create==Sm.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!w8(s.dom,e)||this.pending){let{pos:a}=r[0]||this.pending,c=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:a;(a==c?this.view.posAtCoords(this.lastMove)!=a:!C8(this.view,a,c,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Sd=4;function w8(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let c=a.getBoundingClientRect();r=Math.min(c.top,r),s=Math.max(c.bottom,s)}return e.clientX>=n-Sd&&e.clientX<=i+Sd&&e.clientY>=r-Sd&&e.clientY<=s+Sd}function C8(t,e,n,i,r,s){let a=t.scrollDOM.getBoundingClientRect(),c=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>i||a.right<i||a.top>r||Math.min(a.bottom,c)<r)return!1;let f=t.posAtCoords({x:i,y:r},!1);return f>=e&&f<=n}function T8(t,e={}){let n=ze.define(),i=kn.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(a=>!e.hideOn(s,a))),s.docChanged)){let a=[];for(let c of r){let f=s.changes.mapPos(c.pos,-1,Qn.TrackDel);if(f!=null){let d=Object.assign(Object.create(null),c);d.pos=f,d.end!=null&&(d.end=s.changes.mapPos(d.end)),a.push(d)}}r=a}for(let a of s.effects)a.is(n)&&(r=a.value),a.is(k8)&&(r=[]);return r},provide:r=>Mp.from(r)});return{active:i,extension:[i,Jt.define(r=>new x8(r,t,i,n,e.hoverTime||300)),S8]}}function HM(t,e){let n=t.plugin(zO);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const k8=ze.define(),Sk=be.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function cf(t,e){let n=t.plugin(VM),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const VM=Jt.fromClass(class{constructor(t){this.input=t.state.facet(uf),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Sk);this.top=new xd(t,!0,e.topContainer),this.bottom=new xd(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Sk);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new xd(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new xd(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(uf);if(n!=this.input){let i=n.filter(f=>f),r=[],s=[],a=[],c=[];for(let f of i){let d=this.specs.indexOf(f),p;d<0?(p=f(t.view),c.push(p)):(p=this.panels[d],p.update&&p.update(t)),r.push(p),(p.top?s:a).push(p)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(a);for(let f of c)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>de.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class xd{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=xk(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=xk(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function xk(t){let e=t.nextSibling;return t.remove(),e}const uf=be.define({enables:VM});class _o extends kl{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}_o.prototype.elementClass="";_o.prototype.toDOM=void 0;_o.prototype.mapMode=Qn.TrackBefore;_o.prototype.startSide=_o.prototype.endSide=-1;_o.prototype.point=!0;const lp=be.define(),E8=be.define(),A8={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>lt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Uu=be.define();function R8(t){return[WM(),Uu.of({...A8,...t})]}const wk=be.define({combine:t=>t.some(e=>e)});function WM(t){return[M8]}const M8=Jt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Uu).map(e=>new Tk(t,e)),this.fixed=!t.state.facet(wk);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(wk)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=lt.iter(this.view.state.facet(lp),this.view.viewport.from),i=[],r=this.gutters.map(s=>new D8(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let a=!0;for(let c of s.type)if(c.type==Yn.Text&&a){db(n,i,c.from);for(let f of r)f.line(this.view,c,i);a=!1}else if(c.widget)for(let f of r)f.widget(this.view,c)}else if(s.type==Yn.Text){db(n,i,s.from);for(let a of r)a.line(this.view,s,i)}else if(s.widget)for(let a of r)a.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Uu),n=t.state.facet(Uu),i=t.docChanged||t.heightChanged||t.viewportChanged||!lt.eq(t.startState.facet(lp),t.state.facet(lp),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let a=e.indexOf(s);a<0?r.push(new Tk(this.view,s)):(this.gutters[a].update(t),r.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>de.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Nt.LTR?{left:i,right:r}:{right:i,left:r}})});function Ck(t){return Array.isArray(t)?t:[t]}function db(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class D8{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=lt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==r.elements.length){let c=new XM(e,a,s,i);r.elements.push(c),r.dom.appendChild(c.dom)}else r.elements[this.i].update(e,a,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];db(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(E8)){let a=s(e,n.widget,n);a&&(r||(r=[])).push(a)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Tk{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let f=s.getBoundingClientRect();a=(f.top+f.bottom)/2}else a=r.clientY;let c=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[i](e,c,r)&&r.preventDefault()});this.markers=Ck(n.markers(e)),n.initialSpacer&&(this.spacer=new XM(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Ck(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!lt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class XM{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),P8(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,a=0;;){let c=a,f=s<n.length?n[s++]:null,d=!1;if(f){let p=f.elementClass;p&&(i+=" "+p);for(let m=a;m<this.markers.length;m++)if(this.markers[m].compare(f)){c=m,d=!0;break}}else c=this.markers.length;for(;a<c;){let p=this.markers[a++];if(p.toDOM){p.destroy(r);let m=r.nextSibling;r.remove(),r=m}}if(!f)break;f.toDOM&&(d?r=r.nextSibling:this.dom.insertBefore(f.toDOM(e),r)),d&&a++}this.dom.className=i,this.markers=n}destroy(){this.setMarkers(null,[])}}function P8(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const z8=be.define(),$8=be.define(),Aa=be.define({combine(t){return no(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let i=Object.assign({},e);for(let r in n){let s=i[r],a=n[r];i[r]=s?(c,f,d)=>s(c,f,d)||a(c,f,d):a}return i}})}});class Ey extends _o{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Ay(t,e){return t.state.facet(Aa).formatNumber(e,t.state)}const B8=Uu.compute([Aa],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(z8)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new Ey(Ay(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet($8)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Aa)!=e.state.facet(Aa),initialSpacer(e){return new Ey(Ay(e,kk(e.state.doc.lines)))},updateSpacer(e,n){let i=Ay(n.view,kk(n.view.state.doc.lines));return i==e.number?e:new Ey(i)},domEventHandlers:t.facet(Aa).domEventHandlers,side:"before"}));function GM(t={}){return[Aa.of(t),WM(),B8]}function kk(t){let e=9;for(;e<t;)e=e*10+9;return e}const j8=new class extends _o{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Q8=lp.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(j8.range(r)))}return lt.of(e)});function L8(){return Q8}const FM=1024;let N8=0;class Ry{constructor(e,n){this.from=e,this.to=n}}class He{constructor(e={}){this.id=N8++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Zn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}He.closedBy=new He({deserialize:t=>t.split(" ")});He.openedBy=new He({deserialize:t=>t.split(" ")});He.group=new He({deserialize:t=>t.split(" ")});He.isolate=new He({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});He.contextHash=new He({perNode:!0});He.lookAhead=new He({perNode:!0});He.mounted=new He({perNode:!0});class Dp{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[He.mounted.id]}}const _8=Object.create(null);class Zn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):_8,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Zn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(He.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(He.group),s=-1;s<(r?r.length:0);s++){let a=n[s<0?i.name:r[s]];if(a)return a}}}}Zn.none=new Zn("",Object.create(null),0,8);class xm{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let i of this.types){let r=null;for(let s of e){let a=s(i);a&&(r||(r=Object.assign({},i.props)),r[a[0].id]=a[1])}n.push(r?new Zn(i.name,r,i.id,i.flags):i)}return new xm(n)}}const wd=new WeakMap,Ek=new WeakMap;var On;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(On||(On={}));class zt{constructor(e,n,i,r,s){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,c]of s)this.props[typeof a=="number"?a:a.id]=c}}toString(){let e=Dp.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new mb(this.topNode,e)}cursorAt(e,n=0,i=0){let r=wd.get(this)||this.topNode,s=new mb(r);return s.moveTo(e,n),wd.set(this,s._tree),s}get topNode(){return new pi(this,0,0,null)}resolve(e,n=0){let i=ff(wd.get(this)||this.topNode,e,n,!1);return wd.set(this,i),i}resolveInner(e,n=0){let i=ff(Ek.get(this)||this.topNode,e,n,!0);return Ek.set(this,i),i}resolveStack(e,n=0){return I8(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:s=this.length}=e,a=e.mode||0,c=(a&On.IncludeAnonymous)>0;for(let f=this.cursor(a|On.IncludeAnonymous);;){let d=!1;if(f.from<=s&&f.to>=r&&(!c&&f.type.isAnonymous||n(f)!==!1)){if(f.firstChild())continue;d=!0}for(;d&&i&&(c||!f.type.isAnonymous)&&i(f),!f.nextSibling();){if(!f.parent())return;d=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:QO(Zn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new zt(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new zt(Zn.none,n,i,r)))}static build(e){return H8(e)}}zt.empty=new zt(Zn.none,[],[],0);class BO{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new BO(this.buffer,this.index)}}class Bs{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Zn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],i=this.buffer[e+3],r=this.set.types[n],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let a=[];for(;e<i;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,n,i,r,s){let{buffer:a}=this,c=-1;for(let f=e;f!=n&&!(YM(s,r,a[f+1],a[f+2])&&(c=f,i>0));f=a[f+3]);return c}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),a=0;for(let c=e,f=0;c<n;){s[f++]=r[c++],s[f++]=r[c++]-i;let d=s[f++]=r[c++]-i;s[f++]=r[c++]-e,a=Math.max(a,d)}return new Bs(s,a,this.set)}}function YM(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function ff(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!i&&t instanceof pi&&t.index<0?null:t.parent;if(!a)return t;t=a}let s=i?0:On.IgnoreOverlays;if(i)for(let a=t,c=a.parent;c;a=c,c=a.parent)a instanceof pi&&a.index<0&&((r=c.enter(e,n,s))===null||r===void 0?void 0:r.from)!=a.from&&(t=c);for(;;){let a=t.enter(e,n,s);if(!a)return t;t=a}}class KM{cursor(e=0){return new mb(this,e)}getChild(e,n=null,i=null){let r=Ak(this,e,n,i);return r.length?r[0]:null}getChildren(e,n=null,i=null){return Ak(this,e,n,i)}resolve(e,n=0){return ff(this,e,n,!1)}resolveInner(e,n=0){return ff(this,e,n,!0)}matchContext(e){return pb(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),i=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(i=n,n=r.prevSibling):n=r}return i}get node(){return this}get next(){return this.parent}}class pi extends KM{constructor(e,n,i,r){super(),this._tree=e,this.from=n,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,i,r,s=0){for(let a=this;;){for(let{children:c,positions:f}=a._tree,d=n>0?c.length:-1;e!=d;e+=n){let p=c[e],m=f[e]+a.from;if(YM(r,i,m,m+p.length)){if(p instanceof Bs){if(s&On.ExcludeBuffers)continue;let v=p.findChild(0,p.buffer.length,n,i-m,r);if(v>-1)return new Vr(new q8(a,p,e,m),null,v)}else if(s&On.IncludeAnonymous||!p.type.isAnonymous||jO(p)){let v;if(!(s&On.IgnoreMounts)&&(v=Dp.get(p))&&!v.overlay)return new pi(v.tree,m,e,a);let b=new pi(p,m,e,a);return s&On.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?p.children.length-1:0,n,i,r)}}}if(s&On.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let r;if(!(i&On.IgnoreOverlays)&&(r=Dp.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:a,to:c}of r.overlay)if((n>0?a<=s:a<s)&&(n<0?c>=s:c>s))return new pi(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Ak(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function pb(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class q8{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Vr extends KM{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Vr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&On.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Vr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Vr(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Vr(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let a=i.buffer[this.index+1];e.push(i.slice(r,s,a)),n.push(0)}return new zt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ZM(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let a=t[s];(a.from>n.from||a.to<n.to)&&(n=a,e=s)}let i=n instanceof pi&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new U8(r,n)}class U8{constructor(e,n){this.heads=e,this.node=n}get next(){return ZM(this.heads)}}function I8(t,e,n){let i=t.resolveInner(e,n),r=null;for(let s=i instanceof pi?i:i.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(r||(r=[i])).push(a.resolve(e,n)),s=a}else{let a=Dp.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let c=new pi(a.tree,a.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(ff(c,e,n,!1))}}return r?ZM(r):i}class mb{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof pi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof pi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&On.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&On.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&On.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:i}=r)}else({index:n,_parent:i}=this._tree);for(;i;{index:n,_parent:i}=i)if(n>-1)for(let s=n+e,a=e<0?-1:i._tree.children.length;s!=a;s+=e){let c=i._tree.children[s];if(this.mode&On.IncludeAnonymous||c instanceof Bs||!c.type.isAnonymous||jO(c))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)n=new Vr(this.buffer,n,this.stack[r]);return this.bufferNode=new Vr(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return pb(this.node.parent,e);let{buffer:n}=this.buffer,{types:i}=n.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return pb(this._tree,e,r);let a=i[n.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}}function jO(t){return t.children.some(e=>e instanceof Bs||!e.type.isAnonymous||jO(e))}function H8(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=FM,reused:s=[],minRepeatType:a=i.types.length}=t,c=Array.isArray(n)?new BO(n,n.length):n,f=i.types,d=0,p=0;function m(R,B,M,j,N,A){let{id:Q,start:T,end:U,size:q}=c,V=p,L=d;for(;q<0;)if(c.next(),q==-1){let _=s[Q];M.push(_),j.push(T-R);return}else if(q==-3){d=Q;return}else if(q==-4){p=Q;return}else throw new RangeError(`Unrecognized record size: ${q}`);let X=f[Q],Y,K,le=T-R;if(U-T<=r&&(K=C(c.pos-B,N))){let _=new Uint16Array(K.size-K.skip),G=c.pos-K.size,se=_.length;for(;c.pos>G;)se=k(K.start,_,se);Y=new Bs(_,U-K.start,i),le=K.start-R}else{let _=c.pos-q;c.next();let G=[],se=[],W=Q>=a?Q:-1,ce=0,ne=U;for(;c.pos>_;)W>=0&&c.id==W&&c.size>=0?(c.end<=ne-r&&(O(G,se,T,ce,c.end,ne,W,V,L),ce=G.length,ne=c.end),c.next()):A>2500?v(T,_,G,se):m(T,_,G,se,W,A+1);if(W>=0&&ce>0&&ce<G.length&&O(G,se,T,ce,T,ne,W,V,L),G.reverse(),se.reverse(),W>-1&&ce>0){let he=b(X,L);Y=QO(X,G,se,0,G.length,0,U-T,he,he)}else Y=x(X,G,se,U-T,V-U,L)}M.push(Y),j.push(le)}function v(R,B,M,j){let N=[],A=0,Q=-1;for(;c.pos>B;){let{id:T,start:U,end:q,size:V}=c;if(V>4)c.next();else{if(Q>-1&&U<Q)break;Q<0&&(Q=q-r),N.push(T,U,q),A++,c.next()}}if(A){let T=new Uint16Array(A*4),U=N[N.length-2];for(let q=N.length-3,V=0;q>=0;q-=3)T[V++]=N[q],T[V++]=N[q+1]-U,T[V++]=N[q+2]-U,T[V++]=V;M.push(new Bs(T,N[2]-U,i)),j.push(U-R)}}function b(R,B){return(M,j,N)=>{let A=0,Q=M.length-1,T,U;if(Q>=0&&(T=M[Q])instanceof zt){if(!Q&&T.type==R&&T.length==N)return T;(U=T.prop(He.lookAhead))&&(A=j[Q]+T.length+U)}return x(R,M,j,N,A,B)}}function O(R,B,M,j,N,A,Q,T,U){let q=[],V=[];for(;R.length>j;)q.push(R.pop()),V.push(B.pop()+M-N);R.push(x(i.types[Q],q,V,A-N,T-A,U)),B.push(N-M)}function x(R,B,M,j,N,A,Q){if(A){let T=[He.contextHash,A];Q=Q?[T].concat(Q):[T]}if(N>25){let T=[He.lookAhead,N];Q=Q?[T].concat(Q):[T]}return new zt(R,B,M,j,Q)}function C(R,B){let M=c.fork(),j=0,N=0,A=0,Q=M.end-r,T={size:0,start:0,skip:0};e:for(let U=M.pos-R;M.pos>U;){let q=M.size;if(M.id==B&&q>=0){T.size=j,T.start=N,T.skip=A,A+=4,j+=4,M.next();continue}let V=M.pos-q;if(q<0||V<U||M.start<Q)break;let L=M.id>=a?4:0,X=M.start;for(M.next();M.pos>V;){if(M.size<0)if(M.size==-3)L+=4;else break e;else M.id>=a&&(L+=4);M.next()}N=X,j+=q,A+=L}return(B<0||j==R)&&(T.size=j,T.start=N,T.skip=A),T.size>4?T:void 0}function k(R,B,M){let{id:j,start:N,end:A,size:Q}=c;if(c.next(),Q>=0&&j<a){let T=M;if(Q>4){let U=c.pos-(Q-4);for(;c.pos>U;)M=k(R,B,M)}B[--M]=T,B[--M]=A-R,B[--M]=N-R,B[--M]=j}else Q==-3?d=j:Q==-4&&(p=j);return M}let $=[],z=[];for(;c.pos>0;)m(t.start||0,t.bufferStart||0,$,z,-1,0);let D=(e=t.length)!==null&&e!==void 0?e:$.length?z[0]+$[0].length:0;return new zt(f[t.topID],$.reverse(),z.reverse(),D)}const Rk=new WeakMap;function ap(t,e){if(!t.isAnonymous||e instanceof Bs||e.type!=t)return 1;let n=Rk.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof zt)){n=1;break}n+=ap(t,i)}Rk.set(e,n)}return n}function QO(t,e,n,i,r,s,a,c,f){let d=0;for(let O=i;O<r;O++)d+=ap(t,e[O]);let p=Math.ceil(d*1.5/8),m=[],v=[];function b(O,x,C,k,$){for(let z=C;z<k;){let D=z,R=x[z],B=ap(t,O[z]);for(z++;z<k;z++){let M=ap(t,O[z]);if(B+M>=p)break;B+=M}if(z==D+1){if(B>p){let M=O[D];b(M.children,M.positions,0,M.children.length,x[D]+$);continue}m.push(O[D])}else{let M=x[z-1]+O[z-1].length-R;m.push(QO(t,O,x,D,z,R,M,null,f))}v.push(R+$-s)}}return b(e,n,i,r,0),(c||f)(m,v,a)}class V8{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Vr?this.setBuffer(e.context.buffer,e.index,n):e instanceof pi&&this.map.set(e.tree,n)}get(e){return e instanceof Vr?this.getBuffer(e.context.buffer,e.index):e instanceof pi?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class xl{constructor(e,n,i,r,s=!1,a=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new xl(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,a=e.length?e[0]:null;for(let c=0,f=0,d=0;;c++){let p=c<n.length?n[c]:null,m=p?p.fromA:1e9;if(m-f>=i)for(;a&&a.from<m;){let v=a;if(f>=v.from||m<=v.to||d){let b=Math.max(v.from,f)-d,O=Math.min(v.to,m)-d;v=b>=O?null:new xl(b,O,v.tree,v.offset+d,c>0,!!p)}if(v&&r.push(v),a.to>m)break;a=s<e.length?e[s++]:null}if(!p)break;f=p.toA,d=p.toA-p.toB}return r}}class LO{startParse(e,n,i){return typeof e=="string"&&(e=new W8(e)),i=i?i.length?i.map(r=>new Ry(r.from,r.to)):[new Ry(0,0)]:[new Ry(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class W8{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new He({perNode:!0});let X8=0;class Fi{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=X8++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof Fi&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let r=new Fi(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new Pp(e);return i=>i.modified.indexOf(n)>-1?i:Pp.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let G8=0;class Pp{constructor(e){this.name=e,this.instances=[],this.id=G8++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(c=>c.base==e&&F8(n,c.modified));if(i)return i;let r=[],s=new Fi(e.name,r,e,n);for(let c of n)c.instances.push(s);let a=Y8(n);for(let c of e.set)if(!c.modified.length)for(let f of a)r.push(Pp.get(c,f));return s}}function F8(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function Y8(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((n,i)=>i.length-n.length)}function JM(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],a=2,c=r;for(let m=0;;){if(c=="..."&&m>0&&m+3==r.length){a=1;break}let v=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!v)throw new RangeError("Invalid path: "+r);if(s.push(v[0]=="*"?"":v[0][0]=='"'?JSON.parse(v[0]):v[0]),m+=v[0].length,m==r.length)break;let b=r[m++];if(m==r.length&&b=="!"){a=0;break}if(b!="/")throw new RangeError("Invalid path: "+r);c=r.slice(m)}let f=s.length-1,d=s[f];if(!d)throw new RangeError("Invalid path: "+r);let p=new zp(i,a,f>0?s.slice(0,f):null);e[d]=p.sort(e[d])}}return e5.add(e)}const e5=new He;class zp{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}zp.empty=new zp([],2,null);function t5(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let a of s.tag)n[a.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let a=r;for(let c of s)for(let f of c.set){let d=n[f.id];if(d){a=a?a+" "+d:d;break}}return a},scope:i}}function K8(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function n5(t,e,n,i=0,r=t.length){let s=new Z8(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class Z8{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:a,from:c,to:f}=e;if(c>=i||f<=n)return;a.isTop&&(s=this.highlighters.filter(b=>!b.scope||b.scope(a)));let d=r,p=J8(e)||zp.empty,m=K8(s,p.tags);if(m&&(d&&(d+=" "),d+=m,p.mode==1&&(r+=(r?" ":"")+m)),this.startSpan(Math.max(n,c),d),p.opaque)return;let v=e.tree&&e.tree.prop(He.mounted);if(v&&v.overlay){let b=e.node.enter(v.overlay[0].from+c,1),O=this.highlighters.filter(C=>!C.scope||C.scope(v.tree.type)),x=e.firstChild();for(let C=0,k=c;;C++){let $=C<v.overlay.length?v.overlay[C]:null,z=$?$.from+c:f,D=Math.max(n,k),R=Math.min(i,z);if(D<R&&x)for(;e.from<R&&(this.highlightRange(e,D,R,r,s),this.startSpan(Math.min(R,e.to),d),!(e.to>=z||!e.nextSibling())););if(!$||z>i)break;k=$.to+c,k>n&&(this.highlightRange(b.cursor(),Math.max(n,$.from+c),Math.min(i,k),"",O),this.startSpan(Math.min(i,k),d))}x&&e.parent()}else if(e.firstChild()){v&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),d)}while(e.nextSibling());e.parent()}}}function J8(t){let e=t.type.prop(e5);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const me=Fi.define,Cd=me(),vs=me(),Mk=me(vs),Dk=me(vs),bs=me(),Td=me(bs),My=me(bs),Qr=me(),ol=me(Qr),$r=me(),Br=me(),gb=me(),mu=me(gb),kd=me(),J={comment:Cd,lineComment:me(Cd),blockComment:me(Cd),docComment:me(Cd),name:vs,variableName:me(vs),typeName:Mk,tagName:me(Mk),propertyName:Dk,attributeName:me(Dk),className:me(vs),labelName:me(vs),namespace:me(vs),macroName:me(vs),literal:bs,string:Td,docString:me(Td),character:me(Td),attributeValue:me(Td),number:My,integer:me(My),float:me(My),bool:me(bs),regexp:me(bs),escape:me(bs),color:me(bs),url:me(bs),keyword:$r,self:me($r),null:me($r),atom:me($r),unit:me($r),modifier:me($r),operatorKeyword:me($r),controlKeyword:me($r),definitionKeyword:me($r),moduleKeyword:me($r),operator:Br,derefOperator:me(Br),arithmeticOperator:me(Br),logicOperator:me(Br),bitwiseOperator:me(Br),compareOperator:me(Br),updateOperator:me(Br),definitionOperator:me(Br),typeOperator:me(Br),controlOperator:me(Br),punctuation:gb,separator:me(gb),bracket:mu,angleBracket:me(mu),squareBracket:me(mu),paren:me(mu),brace:me(mu),content:Qr,heading:ol,heading1:me(ol),heading2:me(ol),heading3:me(ol),heading4:me(ol),heading5:me(ol),heading6:me(ol),contentSeparator:me(Qr),list:me(Qr),quote:me(Qr),emphasis:me(Qr),strong:me(Qr),link:me(Qr),monospace:me(Qr),strikethrough:me(Qr),inserted:me(),deleted:me(),changed:me(),invalid:me(),meta:kd,documentMeta:me(kd),annotation:me(kd),processingInstruction:me(kd),definition:Fi.defineModifier("definition"),constant:Fi.defineModifier("constant"),function:Fi.defineModifier("function"),standard:Fi.defineModifier("standard"),local:Fi.defineModifier("local"),special:Fi.defineModifier("special")};for(let t in J){let e=J[t];e instanceof Fi&&(e.name=t)}t5([{tag:J.link,class:"tok-link"},{tag:J.heading,class:"tok-heading"},{tag:J.emphasis,class:"tok-emphasis"},{tag:J.strong,class:"tok-strong"},{tag:J.keyword,class:"tok-keyword"},{tag:J.atom,class:"tok-atom"},{tag:J.bool,class:"tok-bool"},{tag:J.url,class:"tok-url"},{tag:J.labelName,class:"tok-labelName"},{tag:J.inserted,class:"tok-inserted"},{tag:J.deleted,class:"tok-deleted"},{tag:J.literal,class:"tok-literal"},{tag:J.string,class:"tok-string"},{tag:J.number,class:"tok-number"},{tag:[J.regexp,J.escape,J.special(J.string)],class:"tok-string2"},{tag:J.variableName,class:"tok-variableName"},{tag:J.local(J.variableName),class:"tok-variableName tok-local"},{tag:J.definition(J.variableName),class:"tok-variableName tok-definition"},{tag:J.special(J.variableName),class:"tok-variableName2"},{tag:J.definition(J.propertyName),class:"tok-propertyName tok-definition"},{tag:J.typeName,class:"tok-typeName"},{tag:J.namespace,class:"tok-namespace"},{tag:J.className,class:"tok-className"},{tag:J.macroName,class:"tok-macroName"},{tag:J.propertyName,class:"tok-propertyName"},{tag:J.operator,class:"tok-operator"},{tag:J.comment,class:"tok-comment"},{tag:J.meta,class:"tok-meta"},{tag:J.invalid,class:"tok-invalid"},{tag:J.punctuation,class:"tok-punctuation"}]);var Dy;const bl=new He;function i5(t){return be.define({combine:t?e=>e.concat(t):void 0})}const eq=new He;class Yi{constructor(e,n,i=[],r=""){this.data=e,this.name=r,Ye.prototype.hasOwnProperty("tree")||Object.defineProperty(Ye.prototype,"tree",{get(){return Tn(this)}}),this.parser=n,this.extension=[js.of(this),Ye.languageData.of((s,a,c)=>{let f=Pk(s,a,c),d=f.type.prop(bl);if(!d)return[];let p=s.facet(d),m=f.type.prop(eq);if(m){let v=f.resolve(a-f.from,c);for(let b of m)if(b.test(v,s)){let O=s.facet(b.facet);return b.type=="replace"?O:O.concat(p)}}return p})].concat(i)}isActiveAt(e,n,i=-1){return Pk(e,n,i).type.prop(bl)==this.data}findRegions(e){let n=e.facet(js);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,a)=>{if(s.prop(bl)==this.data){i.push({from:a,to:a+s.length});return}let c=s.prop(He.mounted);if(c){if(c.tree.prop(bl)==this.data){if(c.overlay)for(let f of c.overlay)i.push({from:f.from+a,to:f.to+a});else i.push({from:a,to:a+s.length});return}else if(c.overlay){let f=i.length;if(r(c.tree,c.overlay[0].from+a),i.length>f)return}}for(let f=0;f<s.children.length;f++){let d=s.children[f];d instanceof zt&&r(d,s.positions[f]+a)}};return r(Tn(e),0),i}get allowsNesting(){return!0}}Yi.setState=ze.define();function Pk(t,e,n){let i=t.facet(js),r=Tn(t).topNode;if(!i||i.allowsNesting)for(let s=r;s;s=s.enter(e,n,On.ExcludeBuffers))s.type.isTop&&(r=s);return r}class $p extends Yi{constructor(e,n,i){super(e,n,[],i),this.parser=n}static define(e){let n=i5(e.languageData);return new $p(n,e.parser.configure({props:[bl.add(i=>i.isTop?n:void 0)]}),e.name)}configure(e,n){return new $p(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Tn(t){let e=t.field(Yi.state,!1);return e?e.tree:zt.empty}class tq{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e<i||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let gu=null;class ec{constructor(e,n,i=[],r,s,a,c,f){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=a,this.skipped=c,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new ec(e,n,[],zt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new tq(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=zt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(xl.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(xl.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=gu;gu=this;try{return e()}finally{gu=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=zk(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:a,skipped:c}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((d,p,m,v)=>f.push({fromA:d,toA:p,fromB:m,toB:v})),i=xl.applyChanges(i,f),r=zt.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){c=[];for(let d of this.skipped){let p=e.mapPos(d.from,1),m=e.mapPos(d.to,-1);p<m&&c.push({from:p,to:m})}}}return new ec(this.parser,n,i,r,s,a,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:s}=this.skipped[i];r<e.to&&s>e.from&&(this.fragments=zk(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends LO{createParse(n,i,r){let s=r[0].from,a=r[r.length-1].to;return{parsedPos:s,advance(){let f=gu;if(f){for(let d of r)f.tempSkipped.push(d);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=a,new zt(Zn.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return gu}}function zk(t,e,n){return xl.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class tc{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new tc(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=ec.create(e.facet(js).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new tc(i)}}Yi.state=kn.define({create:tc.init,update(t,e){for(let n of e.effects)if(n.is(Yi.setState))return n.value;return e.startState.facet(js)!=e.state.facet(js)?tc.init(e.state):t.apply(e)}});let r5=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(r5=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Py=typeof navigator<"u"&&(!((Dy=navigator.scheduling)===null||Dy===void 0)&&Dy.isInputPending)?()=>navigator.scheduling.isInputPending():null,nq=Jt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Yi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Yi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=r5(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,s=i.field(Yi.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Py?Math.max(25,e.timeRemaining()-5):1e9),c=s.context.treeLen<r&&i.doc.length>r+1e3,f=s.context.work(()=>Py&&Py()||Date.now()>a,r+(c?0:1e5));this.chunkBudget-=Date.now()-n,(f||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Yi.setState.of(new tc(s.context))})),this.chunkBudget>0&&!(f&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>ui(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),js=be.define({combine(t){return t.length?t[0]:null},enables:t=>[Yi.state,nq,de.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class iq{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const rq=be.define(),Lf=be.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ml(t){let e=t.facet(Lf);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function hf(t,e){let n="",i=t.tabSize,r=t.facet(Lf)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s<e;s++)n+=r;return n}function NO(t,e){t instanceof Ye&&(t=new wm(t));for(let i of t.state.facet(rq)){let r=i(t,e);if(r!==void 0)return r}let n=Tn(t.state);return n.length>=e?oq(t,n,e):null}class wm{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ml(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,n);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.countColumn(i,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(s+=a-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return uc(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let a=s(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const _O=new He;function oq(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let a=r;a&&!(a.from<i.node.from||a.to>i.node.to||a.from==i.node.from&&a.type==i.node.type);a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)i={node:s[a],next:i}}return o5(i,t,n)}function o5(t,e,n){for(let i=t;i;i=i.next){let r=lq(i.node);if(r)return r(qO.create(e,n,i))}return 0}function sq(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function lq(t){let e=t.type.prop(_O);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(He.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return a=>s5(a,!0,1,void 0,s&&!sq(a)?r.from:void 0)}return t.parent==null?aq:null}function aq(){return 0}class qO extends wm{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new qO(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(cq(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return o5(this.context.next,this.base,this.pos)}}function cq(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function uq(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),a=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let c=n.to;;){let f=e.childAfter(c);if(!f||f==i)return null;if(!f.type.isSkipped){if(f.from>=a)return null;let d=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+d}}c=f.to}}function zy({closing:t,align:e=!0,units:n=1}){return i=>s5(i,e,n,t)}function s5(t,e,n,i,r){let s=t.textAfter,a=s.match(/^\s*/)[0].length,c=i&&s.slice(a,a+i.length)==i||r==t.pos+a,f=e?uq(t):null;return f?c?t.column(f.from):t.column(f.to):t.baseIndent+(c?0:t.unit*n)}const fq=200;function l5(){return Ye.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+fq)return t;let s=n.sliceString(r.from,i);if(!e.some(d=>d.test(s)))return t;let{state:a}=t,c=-1,f=[];for(let{head:d}of a.selection.ranges){let p=a.doc.lineAt(d);if(p.from==c)continue;c=p.from;let m=NO(a,p.from);if(m==null)continue;let v=/^\s*/.exec(p.text)[0],b=hf(a,m);v!=b&&f.push({from:p.from,to:p.from+v.length,insert:b})}return f.length?[t,{changes:f,sequential:!0}]:t})}const hq=be.define(),a5=new He;function dq(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function pq(t,e,n){let i=Tn(t);if(i.length<n)return null;let r=i.resolveStack(n,1),s=null;for(let a=r;a;a=a.next){let c=a.node;if(c.to<=n||c.from>n)continue;if(s&&c.from<e)break;let f=c.type.prop(a5);if(f&&(c.to<i.length-50||i.length==t.doc.length||!mq(c))){let d=f(c,t);d&&d.from<=n&&d.from>=e&&d.to>n&&(s=d)}}return s}function mq(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Bp(t,e,n){for(let i of t.facet(hq)){let r=i(t,e,n);if(r)return r}return pq(t,e,n)}function c5(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Cm=ze.define({map:c5}),Nf=ze.define({map:c5});function u5(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Dl=kn.define({create(){return Te.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=$k(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Cm)&&!gq(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(d5),r=i?Te.replace({widget:new xq(i(e.state,n.value))}):Bk;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Nf)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=$k(t,e.selection.main.head)),t},provide:t=>de.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(Bk.range(i,r))}return Te.set(e,!0)}});function $k(t,e,n=e){let i=!1;return t.between(e,n,(r,s)=>{r<n&&s>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function jp(t,e,n){var i;let r=null;return(i=t.field(Dl,!1))===null||i===void 0||i.between(e,n,(s,a)=>{(!r||r.from>s)&&(r={from:s,to:a})}),r}function gq(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function f5(t,e){return t.field(Dl,!1)?e:e.concat(ze.appendConfig.of(p5()))}const yq=t=>{for(let e of u5(t)){let n=Bp(t.state,e.from,e.to);if(n)return t.dispatch({effects:f5(t.state,[Cm.of(n),h5(t,n)])}),!0}return!1},vq=t=>{if(!t.state.field(Dl,!1))return!1;let e=[];for(let n of u5(t)){let i=jp(t.state,n.from,n.to);i&&e.push(Nf.of(i),h5(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function h5(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return de.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const bq=t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),s=Bp(e,r.from,r.to);s&&n.push(Cm.of(s)),i=(s?t.lineBlockAt(s.to):r).to+1}return n.length&&t.dispatch({effects:f5(t.state,n)}),!!n.length},Oq=t=>{let e=t.state.field(Dl,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Nf.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},UO=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:yq},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:vq},{key:"Ctrl-Alt-[",run:bq},{key:"Ctrl-Alt-]",run:Oq}],Sq={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},d5=be.define({combine(t){return no(t,Sq)}});function p5(t){return[Dl,Cq]}function m5(t,e){let{state:n}=t,i=n.facet(d5),r=a=>{let c=t.lineBlockAt(t.posAtDOM(a.target)),f=jp(t.state,c.from,c.to);f&&t.dispatch({effects:Nf.of(f)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const Bk=Te.replace({widget:new class extends io{toDOM(t){return m5(t,null)}}});class xq extends io{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return m5(e,this.value)}}const wq={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class $y extends _o{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function g5(t={}){let e={...wq,...t},n=new $y(e,!0),i=new $y(e,!1),r=Jt.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(js)!=a.state.facet(js)||a.startState.field(Dl,!1)!=a.state.field(Dl,!1)||Tn(a.startState)!=Tn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let c=new Jr;for(let f of a.viewportLineBlocks){let d=jp(a.state,f.from,f.to)?i:Bp(a.state,f.from,f.to)?n:null;d&&c.add(f.from,f.from,d)}return c.finish()}}),{domEventHandlers:s}=e;return[r,R8({class:"cm-foldGutter",markers(a){var c;return((c=a.plugin(r))===null||c===void 0?void 0:c.markers)||lt.empty},initialSpacer(){return new $y(e,!1)},domEventHandlers:{...s,click:(a,c,f)=>{if(s.click&&s.click(a,c,f))return!0;let d=jp(a.state,c.from,c.to);if(d)return a.dispatch({effects:Nf.of(d)}),!0;let p=Bp(a.state,c.from,c.to);return p?(a.dispatch({effects:Cm.of(p)}),!0):!1}}}),p5()]}const Cq=de.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class _f{constructor(e,n){this.specs=e;let i;function r(c){let f=Ps.newName();return(i||(i=Object.create(null)))["."+f]=c,f}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof Yi?c=>c.prop(bl)==a.data:a?c=>c==a:void 0,this.style=t5(e.map(c=>({tag:c.tag,class:c.class||r(Object.assign({},c,{tag:null}))})),{all:s}).style,this.module=i?new Ps(i):null,this.themeType=n.themeType}static define(e,n){return new _f(e,n||{})}}const yb=be.define(),y5=be.define({combine(t){return t.length?[t[0]]:null}});function By(t){let e=t.facet(yb);return e.length?e:t.facet(y5)}function IO(t,e){let n=[kq],i;return t instanceof _f&&(t.module&&n.push(de.styleModule.of(t.module)),i=t.themeType),e?.fallback?n.push(y5.of(t)):i?n.push(yb.computeN([de.darkTheme],r=>r.facet(de.darkTheme)==(i=="dark")?[t]:[])):n.push(yb.of(t)),n}class Tq{constructor(e){this.markCache=Object.create(null),this.tree=Tn(e.state),this.decorations=this.buildDeco(e,By(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Tn(e.state),i=By(e.state),r=i!=By(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!r&&n.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return Te.none;let i=new Jr;for(let{from:r,to:s}of e.visibleRanges)n5(this.tree,n,(a,c,f)=>{i.add(a,c,this.markCache[f]||(this.markCache[f]=Te.mark({class:f})))},r,s);return i.finish()}}const kq=Zr.high(Jt.fromClass(Tq,{decorations:t=>t.decorations})),HO=_f.define([{tag:J.meta,color:"#404740"},{tag:J.link,textDecoration:"underline"},{tag:J.heading,textDecoration:"underline",fontWeight:"bold"},{tag:J.emphasis,fontStyle:"italic"},{tag:J.strong,fontWeight:"bold"},{tag:J.strikethrough,textDecoration:"line-through"},{tag:J.keyword,color:"#708"},{tag:[J.atom,J.bool,J.url,J.contentSeparator,J.labelName],color:"#219"},{tag:[J.literal,J.inserted],color:"#164"},{tag:[J.string,J.deleted],color:"#a11"},{tag:[J.regexp,J.escape,J.special(J.string)],color:"#e40"},{tag:J.definition(J.variableName),color:"#00f"},{tag:J.local(J.variableName),color:"#30a"},{tag:[J.typeName,J.namespace],color:"#085"},{tag:J.className,color:"#167"},{tag:[J.special(J.variableName),J.macroName],color:"#256"},{tag:J.definition(J.propertyName),color:"#00c"},{tag:J.comment,color:"#940"},{tag:J.invalid,color:"#f00"}]),Eq=de.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),v5=1e4,b5="()[]{}",O5=be.define({combine(t){return no(t,{afterCursor:!0,brackets:b5,maxScanDistance:v5,renderMatch:Mq})}}),Aq=Te.mark({class:"cm-matchingBracket"}),Rq=Te.mark({class:"cm-nonmatchingBracket"});function Mq(t){let e=[],n=t.matched?Aq:Rq;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Dq=kn.define({create(){return Te.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(O5);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Wr(e.state,r.head,-1,i)||r.head>0&&Wr(e.state,r.head-1,1,i)||i.afterCursor&&(Wr(e.state,r.head,1,i)||r.head<e.state.doc.length&&Wr(e.state,r.head+1,-1,i));s&&(n=n.concat(i.renderMatch(s,e.state)))}return Te.set(n,!0)},provide:t=>de.decorations.from(t)}),Pq=[Dq,Eq];function S5(t={}){return[O5.of(t),Pq]}const zq=new He;function vb(t,e,n){let i=t.prop(e<0?He.openedBy:He.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function bb(t){let e=t.type.prop(zq);return e?e(t.node):t}function Wr(t,e,n,i={}){let r=i.maxScanDistance||v5,s=i.brackets||b5,a=Tn(t),c=a.resolveInner(e,n);for(let f=c;f;f=f.parent){let d=vb(f.type,n,s);if(d&&f.from<f.to){let p=bb(f);if(p&&(n>0?e>=p.from&&e<p.to:e>p.from&&e<=p.to))return $q(t,e,n,f,p,d,s)}}return Bq(t,e,n,a,c.type,r,s)}function $q(t,e,n,i,r,s,a){let c=i.parent,f={from:r.from,to:r.to},d=0,p=c?.cursor();if(p&&(n<0?p.childBefore(i.from):p.childAfter(i.to)))do if(n<0?p.to<=i.from:p.from>=i.to){if(d==0&&s.indexOf(p.type.name)>-1&&p.from<p.to){let m=bb(p);return{start:f,end:m?{from:m.from,to:m.to}:void 0,matched:!0}}else if(vb(p.type,n,a))d++;else if(vb(p.type,-n,a)){if(d==0){let m=bb(p);return{start:f,end:m&&m.from<m.to?{from:m.from,to:m.to}:void 0,matched:!1}}d--}}while(n<0?p.prevSibling():p.nextSibling());return{start:f,matched:!1}}function Bq(t,e,n,i,r,s,a){let c=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),f=a.indexOf(c);if(f<0||f%2==0!=n>0)return null;let d={from:n<0?e-1:e,to:n>0?e+1:e},p=t.doc.iterRange(e,n>0?t.doc.length:0),m=0;for(let v=0;!p.next().done&&v<=s;){let b=p.value;n<0&&(v+=b.length);let O=e+v*n;for(let x=n>0?0:b.length-1,C=n>0?b.length:-1;x!=C;x+=n){let k=a.indexOf(b[x]);if(!(k<0||i.resolveInner(O+x,1).type!=r))if(k%2==0==n>0)m++;else{if(m==1)return{start:d,end:{from:O+x,to:O+x+1},matched:k>>1==f>>1};m--}}n>0&&(v+=b.length)}return p.done?{start:d,matched:!1}:null}function jk(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let a=i;a<e;a++)t.charCodeAt(a)==9?s+=n-s%n:s++;return s}class x5{constructor(e,n,i,r){this.string=e,this.tabSize=n,this.indentUnit=i,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),i;if(typeof e=="string"?i=n==e:i=n&&(e instanceof RegExp?e.test(n):e(n)),i)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=jk(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:jk(this.string,null,this.tabSize)}match(e,n,i){if(typeof e=="string"){let r=a=>i?a.toLowerCase():a,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function jq(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||Qq,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||XO,mergeTokens:t.mergeTokens!==!1}}function Qq(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const Qk=new WeakMap;class VO extends Yi{constructor(e){let n=i5(e.languageData),i=jq(e),r,s=new class extends LO{createParse(a,c,f){return new Nq(r,a,c,f)}};super(n,s,[],e.name),this.topNode=Uq(n,this),r=this,this.streamParser=i,this.stateAfter=new He({perNode:!0}),this.tokenTable=e.tokenTable?new k5(i.tokenTable):qq}static define(e){return new VO(e)}getIndent(e){let n,{overrideIndentation:i}=e.options;i&&(n=Qk.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let r=WO(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,a;if(r?(a=r.state,s=r.pos+1):(a=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let f=e.state.doc.lineAt(s),d=Math.min(e.pos,f.to);if(f.length){let p=i?i(f.from):-1,m=new x5(f.text,e.state.tabSize,e.unit,p<0?void 0:p);for(;m.pos<d-f.from;)C5(this.streamParser.token,m,a)}else this.streamParser.blankLine(a,e.unit);if(d==e.pos)break;s=f.to+1}let c=e.lineAt(e.pos);return i&&n==null&&Qk.set(e.state,c.from),this.streamParser.indent(a,/^\s*(.*)/.exec(c.text)[1],e)}get allowsNesting(){return!1}}function WO(t,e,n,i,r){let s=n>=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let a=e.children.length-1;a>=0;a--){let c=e.children[a],f=n+e.positions[a],d=c instanceof zt&&f<r&&WO(t,c,f,i,r);if(d)return d}return null}function w5(t,e,n,i,r){if(r&&n<=0&&i>=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let a=e.positions[s],c=e.children[s],f;if(a<i&&c instanceof zt){if(!(f=w5(t,c,n-a,i-a,r)))break;return r?new zt(e.type,e.children.slice(0,s).concat(f),e.positions.slice(0,s+1),a+f.length):f}}return null}function Lq(t,e,n,i,r){for(let s of e){let a=s.from+(s.openStart?25:0),c=s.to-(s.openEnd?25:0),f=a<=n&&c>n&&WO(t,s.tree,0-s.offset,n,c),d;if(f&&f.pos<=i&&(d=w5(t,s.tree,n+s.offset,f.pos+s.offset,!1)))return{state:f.state,tree:d}}return{state:t.streamParser.startState(r?Ml(r):4),tree:zt.empty}}let Nq=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=ec.get(),a=r[0].from,{state:c,tree:f}=Lq(e,i,a,this.to,s?.state);this.state=c,this.parsedPos=this.chunkStart=a+f.length;for(let d=0;d<f.children.length;d++)this.chunks.push(f.children[d]),this.chunkPos.push(f.positions[d]);s&&this.parsedPos<s.viewport.from-1e5&&r.some(d=>d.from<=s.viewport.from&&d.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Ml(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=ec.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos<i;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
|
|
145
|
-
`&&(n="");else{let i=n.indexOf(`
|
|
146
|
-
`);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let a=this.ranges[r].from,c=this.lineAfter(a);n+=c,i=a+c.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let a=this.ranges[++this.rangeIndex].from;n+=a-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,i,r){let s=4;if(this.ranges.length>1){r=this.skipGapsTo(n,r,1),n+=r;let c=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-c}let a=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&a>=0&&this.chunk[a]==e&&this.chunk[a+2]==n?this.chunk[a+2]=i:this.chunk.push(e,n,i,s),r}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,a=new x5(n,e?e.state.tabSize:4,e?Ml(e.state):2);if(a.eol())s.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let c=C5(s.token,a,this.state);if(c&&(r=this.emitToken(this.lang.tokenTable.resolve(c),this.parsedPos+a.start,this.parsedPos+a.pos,r)),a.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=zt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:_q,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new zt(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new zt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function C5(t,e,n){e.start=e.pos;for(let i=0;i<10;i++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const XO=Object.create(null),df=[Zn.none],_q=new xm(df),Lk=[],Nk=Object.create(null),T5=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])T5[t]=E5(XO,e);class k5{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),T5)}resolve(e){return e?this.table[e]||(this.table[e]=E5(this.extra,e)):0}}const qq=new k5(XO);function jy(t,e){Lk.indexOf(t)>-1||(Lk.push(t),console.warn(e))}function E5(t,e){let n=[];for(let c of e.split(" ")){let f=[];for(let d of c.split(".")){let p=t[d]||J[d];p?typeof p=="function"?f.length?f=f.map(p):jy(d,`Modifier ${d} used at start of tag`):f.length?jy(d,`Tag ${d} used as modifier`):f=Array.isArray(p)?p:[p]:jy(d,`Unknown highlighting tag ${d}`)}for(let d of f)n.push(d)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(c=>c.id),s=Nk[r];if(s)return s.id;let a=Nk[r]=Zn.define({id:df.length,name:i,props:[JM({[i]:n})]});return df.push(a),a.id}function Uq(t,e){let n=Zn.define({id:df.length,name:"Document",props:[bl.add(()=>t),_O.add(()=>i=>e.getIndent(i))],top:!0});return df.push(n),n}Nt.RTL,Nt.LTR;class A5{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Tn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(M5(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function _k(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Iq(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;s<r.length;s++)n[r[s]]=!0}let i=_k(e)+_k(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function R5(t){let e=t.map(r=>typeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:Iq(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function Hq(t,e){return n=>{for(let i=Tn(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class qk{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function wl(t){return t.selection.main.from}function M5(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const GO=to.define();function Vq(t,e,n,i){let{main:r}=t.selection,s=n-r.from,a=i-r.from;return{...t.changeByRange(c=>{if(c!=r&&n!=i&&t.sliceDoc(c.from+s,c.from+a)!=t.sliceDoc(n,i))return{range:c};let f=t.toText(e);return{changes:{from:c.from+s,to:i==r.from?c.to:c.from+a,insert:f},range:ue.cursor(c.from+s+f.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const Uk=new WeakMap;function Wq(t){if(!Array.isArray(t))return t;let e=Uk.get(t);return e||Uk.set(t,e=R5(t)),e}const Qp=ze.define(),pf=ze.define();class Xq{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let i=ai(e,n),r=Ir(i);this.chars.push(i);let s=e.slice(n,n+r),a=s.toUpperCase();this.folded.push(ai(a==s?s.toLowerCase():a,0)),n+=r}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:i,any:r,precise:s,byWord:a}=this;if(n.length==1){let $=ai(e,0),z=Ir($),D=z==e.length?0:-100;if($!=n[0])if($==i[0])D+=-200;else return null;return this.ret(D,[0,z])}let c=e.indexOf(this.pattern);if(c==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let f=n.length,d=0;if(c<0){for(let $=0,z=Math.min(e.length,200);$<z&&d<f;){let D=ai(e,$);(D==n[d]||D==i[d])&&(r[d++]=$),$+=Ir(D)}if(d<f)return null}let p=0,m=0,v=!1,b=0,O=-1,x=-1,C=/[a-z]/.test(e),k=!0;for(let $=0,z=Math.min(e.length,200),D=0;$<z&&m<f;){let R=ai(e,$);c<0&&(p<f&&R==n[p]&&(s[p++]=$),b<f&&(R==n[b]||R==i[b]?(b==0&&(O=$),x=$+1,b++):b=0));let B,M=R<255?R>=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(B=vO(R))!=B.toLowerCase()?1:B!=B.toUpperCase()?2:0;(!$||M==1&&C||D==0&&M!=0)&&(n[m]==R||i[m]==R&&(v=!0)?a[m++]=$:a.length&&(k=!1)),D=M,$+=Ir(R)}return m==f&&a[0]==0&&k?this.result(-100+(v?-200:0),a,e):b==f&&O==0?this.ret(-200-e.length+(x==e.length?0:-100),[0,x]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):b==f?this.ret(-900-e.length,[O,x]):m==f?this.result(-100+(v?-200:0)+-700+(k?0:-1100),a,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let a of n){let c=a+(this.astral?Ir(ai(i,a)):1);s&&r[s-1]==a?r[s-1]=c:(r[s++]=a,r[s++]=c)}return this.ret(e-i.length,r)}}class Gq{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),i=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,n.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const Cn=be.define({combine(t){return no(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Fq,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>Ik(e(i),n(i)),optionClass:(e,n)=>i=>Ik(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function Ik(t,e){return t?e?t+" "+e:t:e}function Fq(t,e,n,i,r,s){let a=t.textDirection==Nt.RTL,c=a,f=!1,d="top",p,m,v=e.left-r.left,b=r.right-e.right,O=i.right-i.left,x=i.bottom-i.top;if(c&&v<Math.min(O,b)?c=!1:!c&&b<Math.min(O,v)&&(c=!0),O<=(c?v:b))p=Math.max(r.top,Math.min(n.top,r.bottom-x))-e.top,m=Math.min(400,c?v:b);else{f=!0,m=Math.min(400,(a?e.right:r.right-e.left)-30);let $=r.bottom-e.bottom;$>=x||$>e.top?p=n.bottom-e.top:(d="bottom",p=e.bottom-n.top)}let C=(e.bottom-e.top)/s.offsetHeight,k=(e.right-e.left)/s.offsetWidth;return{style:`${d}: ${p/C}px; max-width: ${m/k}px`,class:"cm-completionInfo-"+(f?a?"left-narrow":"right-narrow":c?"left":"right")}}function Yq(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let a=document.createElement("span");a.className="cm-completionLabel";let c=n.displayLabel||n.label,f=0;for(let d=0;d<s.length;){let p=s[d++],m=s[d++];p>f&&a.appendChild(document.createTextNode(c.slice(f,p)));let v=a.appendChild(document.createElement("span"));v.appendChild(document.createTextNode(c.slice(p,m))),v.className="cm-completionMatchedText",f=m}return f<c.length&&a.appendChild(document.createTextNode(c.slice(f))),a},position:50},{render(n){if(!n.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=n.detail,i},position:80}),e.sort((n,i)=>n.position-i.position).map(n=>n.render)}function Qy(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class Kq{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:f=>this.placeInfo(f),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:a}=r.open,c=e.state.facet(Cn);this.optionContent=Yq(c),this.optionClass=c.optionClass,this.tooltipClass=c.tooltipClass,this.range=Qy(s.length,a,c.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",f=>{let{options:d}=e.state.field(n).open;for(let p=f.target,m;p&&p!=this.dom;p=p.parentNode)if(p.nodeName=="LI"&&(m=/-(\d+)$/.exec(p.id))&&+m[1]<d.length){this.applyCompletion(e,d[+m[1]]),f.preventDefault();return}}),this.dom.addEventListener("focusout",f=>{let d=e.state.field(this.stateField,!1);d&&d.tooltip&&e.state.facet(Cn).closeOnBlur&&f.relatedTarget!=e.contentDOM&&e.dispatch({effects:pf.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:a,disabled:c}=i.open;(!r.open||r.open.options!=s)&&(this.range=Qy(s.length,a,e.state.facet(Cn).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),c!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!c)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Qy(n.options.length,n.selected,this.view.state.facet(Cn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>ui(this.view.state,a,"completion info")):this.addInfoPane(s,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&Jq(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Cn).positionInfo(this.view,n,r,i,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,i){const r=document.createElement("ul");r.id=n,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",a=>{a.target==r&&a.preventDefault()});let s=null;for(let a=i.from;a<i.to;a++){let{completion:c,match:f}=e[a],{section:d}=c;if(d){let v=typeof d=="string"?d:d.name;if(v!=s&&(a>i.from||i.from==0))if(s=v,typeof d!="string"&&d.header)r.appendChild(d.header(d));else{let b=r.appendChild(document.createElement("completion-section"));b.textContent=v}}const p=r.appendChild(document.createElement("li"));p.id=n+"-"+a,p.setAttribute("role","option");let m=this.optionClass(c);m&&(p.className=m);for(let v of this.optionContent){let b=v(c,this.view.state,this.view,f);b&&p.appendChild(b)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Zq(t,e){return n=>new Kq(n,t,e)}function Jq(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function Hk(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function e9(t,e){let n=[],i=null,r=null,s=p=>{n.push(p);let{section:m}=p.completion;if(m){i||(i=[]);let v=typeof m=="string"?m:m.name;i.some(b=>b.name==v)||i.push(typeof m=="string"?{name:v}:m)}},a=e.facet(Cn);for(let p of t)if(p.hasResult()){let m=p.result.getMatch;if(p.result.filter===!1)for(let v of p.result.options)s(new qk(v,p.source,m?m(v):[],1e9-n.length));else{let v=e.sliceDoc(p.from,p.to),b,O=a.filterStrict?new Gq(v):new Xq(v);for(let x of p.result.options)if(b=O.match(x.label)){let C=x.displayLabel?m?m(x,b.matched):[]:b.matched,k=b.score+(x.boost||0);if(s(new qk(x,p.source,C,k)),typeof x.section=="object"&&x.section.rank==="dynamic"){let{name:$}=x.section;r||(r=Object.create(null)),r[$]=Math.max(k,r[$]||-1e9)}}}}if(i){let p=Object.create(null),m=0,v=(b,O)=>(b.rank==="dynamic"&&O.rank==="dynamic"?r[O.name]-r[b.name]:0)||(typeof b.rank=="number"?b.rank:1e9)-(typeof O.rank=="number"?O.rank:1e9)||(b.name<O.name?-1:1);for(let b of i.sort(v))m-=1e5,p[b.name]=m;for(let b of n){let{section:O}=b.completion;O&&(b.score+=p[typeof O=="string"?O:O.name])}}let c=[],f=null,d=a.compareCompletions;for(let p of n.sort((m,v)=>v.score-m.score||d(m.completion,v.completion))){let m=p.completion;!f||f.label!=m.label||f.detail!=m.detail||f.type!=null&&m.type!=null&&f.type!=m.type||f.apply!=m.apply||f.boost!=m.boost?c.push(p):Hk(p.completion)>Hk(f)&&(c[c.length-1]=p),f=p.completion}return c}class Ra{constructor(e,n,i,r,s,a){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Ra(this.options,Vk(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,a){if(r&&!a&&e.some(d=>d.isPending))return r.setDisabled();let c=e9(e,n);if(!c.length)return r&&e.some(d=>d.isPending)?r.setDisabled():null;let f=n.facet(Cn).selectOnOpen?0:-1;if(r&&r.selected!=f&&r.selected!=-1){let d=r.options[r.selected].completion;for(let p=0;p<c.length;p++)if(c[p].completion==d){f=p;break}}return new Ra(c,Vk(i,f),{pos:e.reduce((d,p)=>p.hasResult()?Math.min(d,p.from):d,1e8),create:s9,above:s.aboveCursor},r?r.timestamp:Date.now(),f,!1)}map(e){return new Ra(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Ra(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Lp{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Lp(r9,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Cn),s=(i.override||n.languageDataAt("autocomplete",wl(n)).map(Wq)).map(f=>(this.active.find(p=>p.source==f)||new Ki(f,this.active.some(p=>p.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((f,d)=>f==this.active[d])&&(s=this.active);let a=this.open,c=e.effects.some(f=>f.is(FO));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(f=>f.hasResult()&&e.changes.touchesRange(f.from,f.to))||!t9(s,this.active)||c?a=Ra.build(s,n,this.id,a,i,c):a&&a.disabled&&!s.some(f=>f.isPending)&&(a=null),!a&&s.every(f=>!f.isPending)&&s.some(f=>f.hasResult())&&(s=s.map(f=>f.hasResult()?new Ki(f.source,0):f));for(let f of e.effects)f.is(P5)&&(a=a&&a.setSelected(f.value,this.id));return s==this.active&&a==this.open?this:new Lp(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?n9:i9}}function t9(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,s=i==e.length;if(r||s)return r==s;if(t[n++].result!=e[i++].result)return!1}}const n9={"aria-autocomplete":"list"},i9={};function Vk(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const r9=[];function D5(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(GO);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Ki{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=D5(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new Ki(r.source,0)),i&4&&r.state==0&&(r=new Ki(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(Qp))r=new Ki(r.source,1,s.value);else if(s.is(pf))r=new Ki(r.source,0);else if(s.is(FO))for(let a of s.value)a.source==r.source&&(r=a);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(wl(e.state))}}class La extends Ki{constructor(e,n,i,r,s,a){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=a}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),c=wl(e.state);if(c>a||!r||n&2&&(wl(e.startState)==this.from||c<this.limit))return new Ki(this.source,n&4?1:0);let f=e.changes.mapPos(this.limit);return o9(r.validFor,e.state,s,a)?new La(this.source,this.explicit,f,r,s,a):r.update&&(r=r.update(r,s,a,new A5(e.state,c,!1)))?new La(this.source,this.explicit,f,r,r.from,(i=r.to)!==null&&i!==void 0?i:wl(e.state)):new Ki(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new La(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Ki(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function o9(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):M5(t,!0).test(r)}const FO=ze.define({map(t,e){return t.map(n=>n.map(e))}}),P5=ze.define(),Fn=kn.define({create(){return Lp.start()},update(t,e){return t.update(e)},provide:t=>[$O.from(t,e=>e.tooltip),de.contentAttributes.from(t,e=>e.attrs)]});function YO(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Fn).active.find(r=>r.source==e.source);return i instanceof La?(typeof n=="string"?t.dispatch({...Vq(t.state,n,i.from,i.to),annotations:GO.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const s9=Zq(Fn,YO);function Ed(t,e="option"){return n=>{let i=n.state.field(Fn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(Cn).interactionDelay)return!1;let r=1,s;e=="page"&&(s=HM(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:a}=i.open.options,c=i.open.selected>-1?i.open.selected+r*(t?1:-1):t?0:a-1;return c<0?c=e=="page"?0:a-1:c>=a&&(c=e=="page"?a-1:0),n.dispatch({effects:P5.of(c)}),!0}}const z5=t=>{let e=t.state.field(Fn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Cn).interactionDelay?!1:YO(t,e.open.options[e.open.selected])},cp=t=>t.state.field(Fn,!1)?(t.dispatch({effects:Qp.of(!0)}),!0):!1,l9=t=>{let e=t.state.field(Fn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:pf.of(null)}),!0)};class a9{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const c9=50,u9=1e3,f9=Jt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Fn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Fn),n=t.state.facet(Cn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Fn)==e)return;let i=t.transactions.some(s=>{let a=D5(s,n);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;s<this.running.length;s++){let a=this.running[s];if(i||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>c9&&Date.now()-a.time>u9){for(let c of a.context.abortListeners)try{c()}catch(f){ui(this.view.state,f)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(a=>a.is(Qp)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Fn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Cn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=wl(e),i=new A5(e,n,t.explicit,this.view),r=new a9(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:pf.of(null)}),ui(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Cn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Cn),i=this.view.state.field(Fn);for(let r=0;r<this.running.length;r++){let s=this.running[r];if(s.done===void 0)continue;if(this.running.splice(r--,1),s.done){let c=wl(s.updates.length?s.updates[0].startState:this.view.state),f=Math.min(c,s.done.from+(s.active.explicit?0:1)),d=new La(s.active.source,s.active.explicit,f,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:c);for(let p of s.updates)d=d.update(p,n);if(d.hasResult()){e.push(d);continue}}let a=i.active.find(c=>c.source==s.active.source);if(a&&a.isPending)if(s.done==null){let c=new Ki(s.active.source,0);for(let f of s.updates)c=c.update(f,n);c.isPending||e.push(c)}else this.startQuery(a)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:FO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Fn,!1);if(e&&e.tooltip&&this.view.state.facet(Cn).closeOnBlur){let n=e.open&&HM(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:pf.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Qp.of(!1)}),20),this.composing=0}}}),h9=typeof navigator=="object"&&/Win/.test(navigator.platform),d9=Zr.highest(de.domEventHandlers({keydown(t,e){let n=e.state.field(Fn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(h9&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&YO(e,i),!1}})),$5=de.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class p9{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class KO{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Qn.TrackDel),i=e.mapPos(this.to,1,Qn.TrackDel);return n==null||i==null?null:new KO(this.field,n,i)}}let m9=class B5{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),a=/^\s*/.exec(s.text)[0];for(let f of this.lines){if(i.length){let d=a,p=/^\t*/.exec(f)[0].length;for(let m=0;m<p;m++)d+=e.facet(Lf);r.push(n+d.length-p),f=d+f.slice(p)}i.push(f),n+=f.length+1}let c=this.fieldPositions.map(f=>new KO(f.field,r[f.line]+f.from,r[f.line]+f.to));return{text:i,ranges:c}}static parse(e){let n=[],i=[],r=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let c=s[1]?+s[1]:null,f=s[2]||s[3]||"",d=-1,p=f.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(c!=null?n[m].seq==c:p&&n[m].name==p)&&(d=m);if(d<0){let m=0;for(;m<n.length&&(c==null||n[m].seq!=null&&n[m].seq<c);)m++;n.splice(m,0,{seq:c,name:p}),d=m;for(let v of r)v.field>=d&&v.field++}for(let m of r)if(m.line==i.length&&m.from>s.index){let v=s[2]?3+(s[1]||"").length:2;m.from-=v,m.to-=v}r.push(new p9(d,i.length,s.index,s.index+p.length)),a=a.slice(0,s.index)+f+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(c,f,d)=>{for(let p of r)p.line==i.length&&p.from>d&&(p.from--,p.to--);return f}),i.push(a)}return new B5(i,r)}},g9=Te.widget({widget:new class extends io{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),y9=Te.mark({class:"cm-snippetField"});class fc{constructor(e,n){this.ranges=e,this.active=n,this.deco=Te.set(e.map(i=>(i.from==i.to?g9:y9).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new fc(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const qf=ze.define({map(t,e){return t&&t.map(e)}}),v9=ze.define(),mf=kn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(qf))return n.value;if(n.is(v9)&&t)return new fc(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>de.decorations.from(t,e=>e?e.deco:Te.none)});function ZO(t,e){return ue.create(t.filter(n=>n.field==e).map(n=>ue.range(n.from,n.to)))}function b9(t){let e=m9.parse(t);return(n,i,r,s)=>{let{text:a,ranges:c}=e.instantiate(n.state,r),{main:f}=n.state.selection,d={changes:{from:r,to:s==f.from?f.to:s,insert:ot.of(a)},scrollIntoView:!0,annotations:i?[GO.of(i),dn.userEvent.of("input.complete")]:void 0};if(c.length&&(d.selection=ZO(c,0)),c.some(p=>p.field>0)){let p=new fc(c,0),m=d.effects=[qf.of(p)];n.state.field(mf,!1)===void 0&&m.push(ze.appendConfig.of([mf,C9,T9,$5]))}n.dispatch(n.state.update(d))}}function j5(t){return({state:e,dispatch:n})=>{let i=e.field(mf,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(a=>a.field==r+t);return n(e.update({selection:ZO(i.ranges,r),effects:qf.of(s?null:new fc(i.ranges,r)),scrollIntoView:!0})),!0}}const O9=({state:t,dispatch:e})=>t.field(mf,!1)?(e(t.update({effects:qf.of(null)})),!0):!1,S9=j5(1),x9=j5(-1),w9=[{key:"Tab",run:S9,shift:x9},{key:"Escape",run:O9}],Wk=be.define({combine(t){return t.length?t[0]:w9}}),C9=Zr.highest(No.compute([Wk],t=>t.facet(Wk)));function ko(t,e){return{...e,apply:b9(t)}}const T9=de.domEventHandlers({mousedown(t,e){let n=e.state.field(mf,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:ZO(n.ranges,r.field),effects:qf.of(n.ranges.some(s=>s.field>r.field)?new fc(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),gf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ol=ze.define({map(t,e){let n=e.mapPos(t,-1,Qn.TrackAfter);return n??void 0}}),JO=new class extends kl{};JO.startSide=1;JO.endSide=-1;const Q5=kn.define({create(){return lt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Ol)&&(t=t.update({add:[JO.range(n.value,n.value+1)]}));return t}});function L5(){return[E9,Q5]}const Ly="()[]{}<>«»»«[]{}";function N5(t){for(let e=0;e<Ly.length;e+=2)if(Ly.charCodeAt(e)==t)return Ly.charAt(e+1);return vO(t<128?t:t+1)}function _5(t,e){return t.languageDataAt("closeBrackets",e)[0]||gf}const k9=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),E9=de.inputHandler.of((t,e,n,i)=>{if((k9?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Ir(ai(i,0))==1||e!=r.from||n!=r.to)return!1;let s=R9(t.state,i);return s?(t.dispatch(s),!0):!1}),A9=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=_5(t,t.selection.main.head).brackets||gf.brackets,r=null,s=t.changeByRange(a=>{if(a.empty){let c=M9(t.doc,a.head);for(let f of i)if(f==c&&Tm(t.doc,a.head)==N5(ai(f,0)))return{changes:{from:a.head-f.length,to:a.head+f.length},range:ue.cursor(a.head-f.length)}}return{range:r=a}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},e1=[{key:"Backspace",run:A9}];function R9(t,e){let n=_5(t,t.selection.main.head),i=n.brackets||gf.brackets;for(let r of i){let s=N5(ai(r,0));if(e==r)return s==r?z9(t,r,i.indexOf(r+r+r)>-1,n):D9(t,r,s,n.before||gf.before);if(e==s&&q5(t,t.selection.main.from))return P9(t,r,s)}return null}function q5(t,e){let n=!1;return t.field(Q5).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function Tm(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Ir(ai(n,0)))}function M9(t,e){let n=t.sliceString(e-2,e);return Ir(ai(n,0))==n.length?n:n.slice(1)}function D9(t,e,n,i){let r=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Ol.of(a.to+e.length),range:ue.range(a.anchor+e.length,a.head+e.length)};let c=Tm(t.doc,a.head);return!c||/\s/.test(c)||i.indexOf(c)>-1?{changes:{insert:e+n,from:a.head},effects:Ol.of(a.head+e.length),range:ue.cursor(a.head+e.length)}:{range:r=a}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function P9(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&Tm(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:ue.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function z9(t,e,n,i){let r=i.stringPrefixes||gf.stringPrefixes,s=null,a=t.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:Ol.of(c.to+e.length),range:ue.range(c.anchor+e.length,c.head+e.length)};let f=c.head,d=Tm(t.doc,f),p;if(d==e){if(Xk(t,f))return{changes:{insert:e+e,from:f},effects:Ol.of(f+e.length),range:ue.cursor(f+e.length)};if(q5(t,f)){let v=n&&t.sliceDoc(f,f+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:f,to:f+v.length,insert:v},range:ue.cursor(f+v.length)}}}else{if(n&&t.sliceDoc(f-2*e.length,f)==e+e&&(p=Gk(t,f-2*e.length,r))>-1&&Xk(t,p))return{changes:{insert:e+e+e+e,from:f},effects:Ol.of(f+e.length),range:ue.cursor(f+e.length)};if(t.charCategorizer(f)(d)!=It.Word&&Gk(t,f,r)>-1&&!$9(t,f,e,r))return{changes:{insert:e+e,from:f},effects:Ol.of(f+e.length),range:ue.cursor(f+e.length)}}return{range:s=c}});return s?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function Xk(t,e){let n=Tn(t).resolveInner(e+1);return n.parent&&n.from==e}function $9(t,e,n,i){let r=Tn(t).resolveInner(e,-1),s=i.reduce((a,c)=>Math.max(a,c.length),0);for(let a=0;a<5;a++){let c=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),f=c.indexOf(n);if(!f||f>-1&&i.indexOf(c.slice(0,f))>-1){let p=r.firstChild;for(;p&&p.from==r.from&&p.to-p.from>n.length+f;){if(t.sliceDoc(p.to-n.length,p.to)==n)return!1;p=p.firstChild}return!0}let d=r.to==e&&r.parent;if(!d)break;r=d}return!1}function Gk(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=It.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=It.Word)return s}return-1}function t1(t={}){return[d9,Fn,Cn.of(t),f9,B9,$5]}const km=[{key:"Ctrl-Space",run:cp},{mac:"Alt-`",run:cp},{mac:"Alt-i",run:cp},{key:"Escape",run:l9},{key:"ArrowDown",run:Ed(!0)},{key:"ArrowUp",run:Ed(!1)},{key:"PageDown",run:Ed(!0,"page")},{key:"PageUp",run:Ed(!1,"page")},{key:"Enter",run:z5}],B9=Zr.highest(No.computeN([Cn],t=>t.facet(Cn).defaultKeymap?[km]:[]));function Ad(t){let e=t.field(Fn,!1);return e&&e.active.some(n=>n.isPending)?"pending":e&&e.active.some(n=>n.state!=0)?"active":null}const j9=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=i1(t.state,n.from);return i.line?Q9(t):i.block?N9(t):!1};function n1(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const Q9=n1(U9,0),L9=n1(U5,0),N9=n1((t,e)=>U5(t,e,q9(e)),0);function i1(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const yu=50;function _9(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-yu,i),a=t.sliceDoc(r,r+yu),c=/\s*$/.exec(s)[0].length,f=/^\s*/.exec(a)[0].length,d=s.length-c;if(s.slice(d-e.length,d)==e&&a.slice(f,f+n.length)==n)return{open:{pos:i-c,margin:c&&1},close:{pos:r+f,margin:f&&1}};let p,m;r-i<=2*yu?p=m=t.sliceDoc(i,r):(p=t.sliceDoc(i,i+yu),m=t.sliceDoc(r-yu,r));let v=/^\s*/.exec(p)[0].length,b=/\s*$/.exec(m)[0].length,O=m.length-b-n.length;return p.slice(v,v+e.length)==e&&m.slice(O,O+n.length)==n?{open:{pos:i+v+e.length,margin:/\s/.test(p.charAt(v+e.length))?1:0},close:{pos:r-b-n.length,margin:/\s/.test(m.charAt(O-1))?1:0}}:null}function q9(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function U5(t,e,n=e.selection.ranges){let i=n.map(s=>i1(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,a)=>_9(e,i[a],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,a)=>r[a]?[]:[{from:s.from,insert:i[a].open+" "},{from:s.to,insert:" "+i[a].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let a=0,c;a<r.length;a++)if(c=r[a]){let f=i[a],{open:d,close:p}=c;s.push({from:d.pos-f.open.length,to:d.pos+d.margin},{from:p.pos-p.margin,to:p.pos+f.close.length})}return{changes:s}}return null}function U9(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:s,to:a}of n){let c=i.length,f=1e9,d=i1(e,s).line;if(d){for(let p=s;p<=a;){let m=e.doc.lineAt(p);if(m.from>r&&(s==a||a>m.from)){r=m.from;let v=/^\s*/.exec(m.text)[0].length,b=v==m.length,O=m.text.slice(v,v+d.length)==d?v:-1;v<m.text.length&&v<f&&(f=v),i.push({line:m,comment:O,token:d,indent:v,empty:b,single:!1})}p=m.to+1}if(f<1e9)for(let p=c;p<i.length;p++)i[p].indent<i[p].line.text.length&&(i[p].indent=f);i.length==c+1&&(i[c].single=!0)}}if(t!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:c,token:f,indent:d,empty:p,single:m}of i)(m||!p)&&s.push({from:c.from+d,insert:f+" "});let a=e.changes(s);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:c,token:f}of i)if(c>=0){let d=a.from+c,p=d+f.length;a.text[p-a.from]==" "&&p++,s.push({from:d,to:p})}return{changes:s}}return null}const Ob=to.define(),I9=to.define(),H9=be.define(),I5=be.define({combine(t){return no(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),H5=kn.define({create(){return Xr.empty},update(t,e){let n=e.state.facet(I5),i=e.annotation(Ob);if(i){let f=fi.fromTransaction(e,i.selection),d=i.side,p=d==0?t.undone:t.done;return f?p=Np(p,p.length,n.minDepth,f):p=G5(p,e.startState.selection),new Xr(d==0?i.rest:p,d==0?p:i.rest)}let r=e.annotation(I9);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(dn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=fi.fromTransaction(e),a=e.annotation(dn.time),c=e.annotation(dn.userEvent);return s?t=t.addChanges(s,a,c,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,c,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Xr(t.done.map(fi.fromJSON),t.undone.map(fi.fromJSON))}});function V5(t={}){return[H5,I5.of(t),de.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?W5:e.inputType=="historyRedo"?Sb:null;return i?(e.preventDefault(),i(n)):!1}})]}function Em(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(H5,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const W5=Em(0,!1),Sb=Em(1,!1),V9=Em(0,!0),W9=Em(1,!0);class fi{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new fi(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new fi(e.changes&&bn.fromJSON(e.changes),[],e.mapped&&Yr.fromJSON(e.mapped),e.startSelection&&ue.fromJSON(e.startSelection),e.selectionsAfter.map(ue.fromJSON))}static fromTransaction(e,n){let i=Zi;for(let r of e.startState.facet(H9)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new fi(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Zi)}static selection(e){return new fi(void 0,Zi,void 0,void 0,e)}}function Np(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function X9(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,a,c)=>{for(let f=0;f<n.length;){let d=n[f++],p=n[f++];c>=d&&a<=p&&(i=!0)}}),i}function G9(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function X5(t,e){return t.length?e.length?t.concat(e):t:e}const Zi=[],F9=200;function G5(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-F9));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Np(t,t.length-1,1e9,n.setSelAfter(i)))}else return[fi.selection([e])]}function Y9(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Ny(t,e){if(!t.length)return t;let n=t.length,i=Zi;for(;n;){let r=K9(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[fi.selection(i)]:Zi}function K9(t,e,n){let i=X5(t.selectionsAfter.length?t.selectionsAfter.map(c=>c.map(e)):Zi,n);if(!t.changes)return fi.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(s):s;return new fi(r,ze.mapEffects(t.effects,e),a,t.startSelection.map(s),i)}const Z9=/^(input\.type|delete)($|\.)/;class Xr{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Xr(this.done,this.undone):this}addChanges(e,n,i,r,s){let a=this.done,c=a[a.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!i||Z9.test(i))&&(!c.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(s,X9(c.changes,e.changes))||i=="input.type.compose")?a=Np(a,a.length-1,r.minDepth,new fi(e.changes.compose(c.changes),X5(ze.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,Zi)):a=Np(a,a.length,r.minDepth,e),new Xr(a,Zi,n,i)}addSelection(e,n,i,r){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Zi;return s.length>0&&n-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&G9(s[s.length-1],e)?this:new Xr(G5(this.done,e),this.undone,n,i)}addMapping(e){return new Xr(Ny(this.done,e),Ny(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let s=r[r.length-1],a=s.selectionsAfter[0]||n.selection;if(i&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Ob.of({side:e,rest:Y9(r),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let c=r.length==1?Zi:r.slice(0,r.length-1);return s.mapped&&(c=Ny(c,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Ob.of({side:e,rest:c,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Xr.empty=new Xr(Zi,Zi);const r1=[{key:"Mod-z",run:W5,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Sb,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Sb,preventDefault:!0},{key:"Mod-u",run:V9,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:W9,preventDefault:!0}];function hc(t,e){return ue.create(t.ranges.map(e),t.mainIndex)}function wr(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Cr({state:t,dispatch:e},n){let i=hc(t.selection,n);return i.eq(t.selection,!0)?!1:(e(wr(t,i)),!0)}function Am(t,e){return ue.cursor(e?t.to:t.from)}function F5(t,e){return Cr(t,n=>n.empty?t.moveByChar(n,e):Am(n,e))}function Hn(t){return t.textDirectionAt(t.state.selection.main.head)==Nt.LTR}const Y5=t=>F5(t,!Hn(t)),K5=t=>F5(t,Hn(t));function Z5(t,e){return Cr(t,n=>n.empty?t.moveByGroup(n,e):Am(n,e))}const J9=t=>Z5(t,!Hn(t)),eU=t=>Z5(t,Hn(t));function tU(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Rm(t,e,n){let i=Tn(t).resolveInner(e.head),r=n?He.closedBy:He.openedBy;for(let f=e.head;;){let d=n?i.childAfter(f):i.childBefore(f);if(!d)break;tU(t,d,r)?i=d:f=n?d.to:d.from}let s=i.type.prop(r),a,c;return s&&(a=n?Wr(t,i.from,1):Wr(t,i.to,-1))&&a.matched?c=n?a.end.to:a.end.from:c=n?i.to:i.from,ue.cursor(c,n?-1:1)}const nU=t=>Cr(t,e=>Rm(t.state,e,!Hn(t))),iU=t=>Cr(t,e=>Rm(t.state,e,Hn(t)));function J5(t,e){return Cr(t,n=>{if(!n.empty)return Am(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const eD=t=>J5(t,!1),tD=t=>J5(t,!0);function nD(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,i=0,r;if(e){for(let s of t.state.facet(de.scrollMargins)){let a=s(t);a?.top&&(n=Math.max(a?.top,n)),a?.bottom&&(i=Math.max(a?.bottom,i))}r=t.scrollDOM.clientHeight-n-i}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function iD(t,e){let n=nD(t),{state:i}=t,r=hc(i.selection,a=>a.empty?t.moveVertically(a,e,n.height):Am(a,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let a=t.coordsAtPos(i.selection.main.head),c=t.scrollDOM.getBoundingClientRect(),f=c.top+n.marginTop,d=c.bottom-n.marginBottom;a&&a.top>f&&a.bottom<d&&(s=de.scrollIntoView(r.main.head,{y:"start",yMargin:a.top-f}))}return t.dispatch(wr(i,r),{effects:s}),!0}const Fk=t=>iD(t,!1),xb=t=>iD(t,!0);function _s(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=ue.cursor(i.from+s))}return r}const rU=t=>Cr(t,e=>_s(t,e,!0)),oU=t=>Cr(t,e=>_s(t,e,!1)),sU=t=>Cr(t,e=>_s(t,e,!Hn(t))),lU=t=>Cr(t,e=>_s(t,e,Hn(t))),aU=t=>Cr(t,e=>ue.cursor(t.lineBlockAt(e.head).from,1)),cU=t=>Cr(t,e=>ue.cursor(t.lineBlockAt(e.head).to,-1));function uU(t,e,n){let i=!1,r=hc(t.selection,s=>{let a=Wr(t,s.head,-1)||Wr(t,s.head,1)||s.head>0&&Wr(t,s.head-1,1)||s.head<t.doc.length&&Wr(t,s.head+1,-1);if(!a||!a.end)return s;i=!0;let c=a.start.from==s.head?a.end.to:a.end.from;return ue.cursor(c)});return i?(e(wr(t,r)),!0):!1}const fU=({state:t,dispatch:e})=>uU(t,e);function ar(t,e){let n=hc(t.state.selection,i=>{let r=e(i);return ue.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(wr(t.state,n)),!0)}function rD(t,e){return ar(t,n=>t.moveByChar(n,e))}const oD=t=>rD(t,!Hn(t)),sD=t=>rD(t,Hn(t));function lD(t,e){return ar(t,n=>t.moveByGroup(n,e))}const hU=t=>lD(t,!Hn(t)),dU=t=>lD(t,Hn(t)),pU=t=>ar(t,e=>Rm(t.state,e,!Hn(t))),mU=t=>ar(t,e=>Rm(t.state,e,Hn(t)));function aD(t,e){return ar(t,n=>t.moveVertically(n,e))}const cD=t=>aD(t,!1),uD=t=>aD(t,!0);function fD(t,e){return ar(t,n=>t.moveVertically(n,e,nD(t).height))}const Yk=t=>fD(t,!1),Kk=t=>fD(t,!0),gU=t=>ar(t,e=>_s(t,e,!0)),yU=t=>ar(t,e=>_s(t,e,!1)),vU=t=>ar(t,e=>_s(t,e,!Hn(t))),bU=t=>ar(t,e=>_s(t,e,Hn(t))),OU=t=>ar(t,e=>ue.cursor(t.lineBlockAt(e.head).from)),SU=t=>ar(t,e=>ue.cursor(t.lineBlockAt(e.head).to)),Zk=({state:t,dispatch:e})=>(e(wr(t,{anchor:0})),!0),Jk=({state:t,dispatch:e})=>(e(wr(t,{anchor:t.doc.length})),!0),e2=({state:t,dispatch:e})=>(e(wr(t,{anchor:t.selection.main.anchor,head:0})),!0),t2=({state:t,dispatch:e})=>(e(wr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),xU=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),wU=({state:t,dispatch:e})=>{let n=Mm(t).map(({from:i,to:r})=>ue.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:ue.create(n),userEvent:"select"})),!0},CU=({state:t,dispatch:e})=>{let n=hc(t.selection,i=>{let r=Tn(t),s=r.resolveStack(i.from,1);if(i.empty){let a=r.resolveStack(i.from,-1);a.node.from>=s.node.from&&a.node.to<=s.node.to&&(s=a)}for(let a=s;a;a=a.next){let{node:c}=a;if((c.from<i.from&&c.to>=i.to||c.to>i.to&&c.from<=i.from)&&a.next)return ue.range(c.to,c.from)}return i});return n.eq(t.selection)?!1:(e(wr(t,n)),!0)};function hD(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let a=n.doc.lineAt(s.head);if(e?a.to<t.state.doc.length:a.from>0)for(let c=s;;){let f=t.moveVertically(c,e);if(f.head<a.from||f.head>a.to){r.some(d=>d.head==f.head)||r.push(f);break}else{if(f.head==c.head)break;c=f}}}return r.length==i.ranges.length?!1:(t.dispatch(wr(n,ue.create(r,r.length-1))),!0)}const TU=t=>hD(t,!1),kU=t=>hD(t,!0),EU=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=ue.create([n.main]):n.main.empty||(i=ue.create([ue.cursor(n.main.head)])),i?(e(wr(t,i)),!0):!1};function Uf(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:a,to:c}=s;if(a==c){let f=e(s);f<a?(n="delete.backward",f=Rd(t,f,!1)):f>a&&(n="delete.forward",f=Rd(t,f,!0)),a=Math.min(a,f),c=Math.max(c,f)}else a=Rd(t,a,!1),c=Rd(t,c,!0);return a==c?{range:s}:{changes:{from:a,to:c},range:ue.cursor(a,a<s.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?de.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function Rd(t,e,n){if(t instanceof de)for(let i of t.state.facet(de.atomicRanges).map(r=>r(t)))i.between(e,e,(r,s)=>{r<e&&s>e&&(e=n?s:r)});return e}const dD=(t,e,n)=>Uf(t,i=>{let r=i.from,{state:s}=t,a=s.doc.lineAt(r),c,f;if(n&&!e&&r>a.from&&r<a.from+200&&!/[^ \t]/.test(c=a.text.slice(0,r-a.from))){if(c[c.length-1]==" ")return r-1;let d=uc(c,s.tabSize),p=d%Ml(s)||Ml(s);for(let m=0;m<p&&c[c.length-1-m]==" ";m++)r--;f=r}else f=Ln(a.text,r-a.from,e,e)+a.from,f==r&&a.number!=(e?s.doc.lines:1)?f+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(f-a.from,r-a.from))&&(f=Ln(a.text,f-a.from,!1,!1)+a.from);return f}),wb=t=>dD(t,!1,!0),pD=t=>dD(t,!0,!1),mD=(t,e)=>Uf(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let c=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let f=Ln(s.text,i-s.from,e)+s.from,d=s.text.slice(Math.min(i,f)-s.from,Math.max(i,f)-s.from),p=a(d);if(c!=null&&p!=c)break;(d!=" "||i!=n.head)&&(c=p),i=f}return i}),gD=t=>mD(t,!1),AU=t=>mD(t,!0),RU=t=>Uf(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),MU=t=>Uf(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),DU=t=>Uf(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),PU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:ot.of(["",""])},range:ue.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},zU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),a=r==s.from?r-1:Ln(s.text,r-s.from,!1)+s.from,c=r==s.to?r+1:Ln(s.text,r-s.from,!0)+s.from;return{changes:{from:a,to:c,insert:t.doc.slice(r,c).append(t.doc.slice(a,r))},range:ue.cursor(c)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Mm(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let a=e[e.length-1];a.to=s.to,a.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function yD(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of Mm(t)){if(n?s.to==t.doc.length:s.from==0)continue;let a=t.doc.lineAt(n?s.to+1:s.from-1),c=a.length+1;if(n){i.push({from:s.to,to:a.to},{from:s.from,insert:a.text+t.lineBreak});for(let f of s.ranges)r.push(ue.range(Math.min(t.doc.length,f.anchor+c),Math.min(t.doc.length,f.head+c)))}else{i.push({from:a.from,to:s.from},{from:s.to,insert:t.lineBreak+a.text});for(let f of s.ranges)r.push(ue.range(f.anchor-c,f.head-c))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:ue.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const $U=({state:t,dispatch:e})=>yD(t,e,!1),BU=({state:t,dispatch:e})=>yD(t,e,!0);function vD(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of Mm(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jU=({state:t,dispatch:e})=>vD(t,e,!1),QU=({state:t,dispatch:e})=>vD(t,e,!0),LU=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Mm(e).map(({from:r,to:s})=>(r>0?r--:s<e.doc.length&&s++,{from:r,to:s}))),i=hc(e.selection,r=>{let s;if(t.lineWrapping){let a=t.lineBlockAt(r.head),c=t.coordsAtPos(r.head,r.assoc||1);c&&(s=a.bottom+t.documentTop-c.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function NU(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Tn(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(He.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const n2=bD(!1),_U=bD(!0);function bD(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:a}=r,c=e.doc.lineAt(s),f=!t&&s==a&&NU(e,s);t&&(s=a=(a<=c.to?c:e.doc.lineAt(a)).to);let d=new wm(e,{simulateBreak:s,simulateDoubleBreak:!!f}),p=NO(d,s);for(p==null&&(p=uc(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));a<c.to&&/\s/.test(c.text[a-c.from]);)a++;f?{from:s,to:a}=f:s>c.from&&s<c.from+100&&!/\S/.test(c.text.slice(0,s))&&(s=c.from);let m=["",hf(e,p)];return f&&m.push(hf(e,d.lineIndent(c.from,-1))),{changes:{from:s,to:a,insert:ot.of(m)},range:ue.cursor(s+1+m[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function o1(t,e){let n=-1;return t.changeByRange(i=>{let r=[];for(let a=i.from;a<=i.to;){let c=t.doc.lineAt(a);c.number>n&&(i.empty||i.to>c.from)&&(e(c,r,i),n=c.number),a=c.to+1}let s=t.changes(r);return{changes:r,range:ue.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const qU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new wm(t,{overrideIndentation:s=>{let a=n[s];return a??-1}}),r=o1(t,(s,a,c)=>{let f=NO(i,s.from);if(f==null)return;/\S/.test(s.text)||(f=0);let d=/^\s*/.exec(s.text)[0],p=hf(t,f);(d!=p||c.from<s.from+d.length)&&(n[s.from]=f,a.push({from:s.from,to:s.from+d.length,insert:p}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},OD=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(o1(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Lf)})}),{userEvent:"input.indent"})),!0),SD=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(o1(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=uc(r,t.tabSize),a=0,c=hf(t,Math.max(0,s-Ml(t)));for(;a<r.length&&a<c.length&&r.charCodeAt(a)==c.charCodeAt(a);)a++;i.push({from:n.from+a,to:n.from+r.length,insert:c.slice(a)})}),{userEvent:"delete.dedent"})),!0),UU=t=>(t.setTabFocusMode(),!0),IU=[{key:"Ctrl-b",run:Y5,shift:oD,preventDefault:!0},{key:"Ctrl-f",run:K5,shift:sD},{key:"Ctrl-p",run:eD,shift:cD},{key:"Ctrl-n",run:tD,shift:uD},{key:"Ctrl-a",run:aU,shift:OU},{key:"Ctrl-e",run:cU,shift:SU},{key:"Ctrl-d",run:pD},{key:"Ctrl-h",run:wb},{key:"Ctrl-k",run:RU},{key:"Ctrl-Alt-h",run:gD},{key:"Ctrl-o",run:PU},{key:"Ctrl-t",run:zU},{key:"Ctrl-v",run:xb}],HU=[{key:"ArrowLeft",run:Y5,shift:oD,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:J9,shift:hU,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:sU,shift:vU,preventDefault:!0},{key:"ArrowRight",run:K5,shift:sD,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:eU,shift:dU,preventDefault:!0},{mac:"Cmd-ArrowRight",run:lU,shift:bU,preventDefault:!0},{key:"ArrowUp",run:eD,shift:cD,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Zk,shift:e2},{mac:"Ctrl-ArrowUp",run:Fk,shift:Yk},{key:"ArrowDown",run:tD,shift:uD,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Jk,shift:t2},{mac:"Ctrl-ArrowDown",run:xb,shift:Kk},{key:"PageUp",run:Fk,shift:Yk},{key:"PageDown",run:xb,shift:Kk},{key:"Home",run:oU,shift:yU,preventDefault:!0},{key:"Mod-Home",run:Zk,shift:e2},{key:"End",run:rU,shift:gU,preventDefault:!0},{key:"Mod-End",run:Jk,shift:t2},{key:"Enter",run:n2,shift:n2},{key:"Mod-a",run:xU},{key:"Backspace",run:wb,shift:wb,preventDefault:!0},{key:"Delete",run:pD,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:gD,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:AU,preventDefault:!0},{mac:"Mod-Backspace",run:MU,preventDefault:!0},{mac:"Mod-Delete",run:DU,preventDefault:!0}].concat(IU.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),s1=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:nU,shift:pU},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:iU,shift:mU},{key:"Alt-ArrowUp",run:$U},{key:"Shift-Alt-ArrowUp",run:jU},{key:"Alt-ArrowDown",run:BU},{key:"Shift-Alt-ArrowDown",run:QU},{key:"Mod-Alt-ArrowUp",run:TU},{key:"Mod-Alt-ArrowDown",run:kU},{key:"Escape",run:EU},{key:"Mod-Enter",run:_U},{key:"Alt-l",mac:"Ctrl-l",run:wU},{key:"Mod-i",run:CU,preventDefault:!0},{key:"Mod-[",run:SD},{key:"Mod-]",run:OD},{key:"Mod-Alt-\\",run:qU},{key:"Shift-Mod-k",run:LU},{key:"Shift-Mod-\\",run:fU},{key:"Mod-/",run:j9},{key:"Alt-A",run:L9},{key:"Ctrl-m",mac:"Shift-Alt-m",run:UU}].concat(HU),VU={key:"Tab",run:OD,shift:SD};var i2={};class _p{constructor(e,n,i,r,s,a,c,f,d,p=0,m){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=c,this.bufferBase=f,this.curContext=d,this.lookAhead=p,this.parent=m}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new _p(e,[],n,i,i,0,[],0,r?new r2(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let c=s.dynamicPrecedence(r);if(c&&(this.score+=c),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(r,this.reducePos);return}let f=this.stack.length-(i-1)*3-(e&262144?6:0),d=f?this.stack[f-2]:this.p.ranges[0].from,p=this.reducePos-d;p>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(d==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=p):this.p.lastBigReductionSize<p&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=d,this.p.lastBigReductionSize=p));let m=f?this.stack[f-1]:0,v=this.bufferBase+this.buffer.length-m;if(r<s.minRepeatTerm||e&131072){let b=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,d,b,v+4,!0)}if(e&262144)this.state=this.stack[f];else{let b=this.stack[f-3];this.state=s.getGoto(b,r,!0)}for(;this.stack.length>f;)this.stack.pop();this.reduceContext(r,d)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,c=this.buffer.length;if(c==0&&a.parent&&(c=a.bufferBase-a.parent.bufferBase,a=a.parent),c>0&&a.buffer[c-4]==0&&a.buffer[c-1]>-1){if(n==i)return;if(a.buffer[c-2]>=n){a.buffer[c-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let c=!1;for(let f=a;f>0&&this.buffer[f-2]>i;f-=4)if(this.buffer[f-1]>=0){c=!0;break}if(c)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;(r>this.pos||n<=a.maxNode)&&(this.pos=r,a.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new _p(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new WU(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;s<n.length;s+=2)(a=n[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&r.push(n[s],a);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let a=n[s+1];r.some((c,f)=>f&1&&c==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[r],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let c=(a>>19)-s;if(c>1){let f=a&65535,d=this.stack.length-c*3;if(d>=0&&e.getGoto(this.stack[d],f,!1)>=0)return c<<19|65536|f}}else{let c=i(a,s+1);if(c!=null)return c}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new r2(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class r2{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class WU{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class qp{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new qp(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new qp(this.stack,this.pos,this.index)}}function Md(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let a=t.charCodeAt(i++),c=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let f=a-32;if(f>=46&&(f-=46,c=!0),s+=f,c)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class up{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const o2=new up;class XU{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=o2,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let a=this.ranges[--r];s-=i.from-a.to,i=a}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,c=this.range;for(;c.to<=i;)c=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=o2,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class Na{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;GU(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Na.prototype.contextual=Na.prototype.fallback=Na.prototype.extend=!1;Na.prototype.fallback=Na.prototype.extend=!1;class Dm{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function GU(t,e,n,i,r,s){let a=0,c=1<<i,{dialect:f}=n.p.parser;e:for(;(c&t[a])!=0;){let d=t[a+1];for(let b=a+3;b<d;b+=2)if((t[b+1]&c)>0){let O=t[b];if(f.allows(O)&&(e.token.value==-1||e.token.value==O||FU(O,e.token.value,r,s))){e.acceptToken(O);break}}let p=e.next,m=0,v=t[a+2];if(e.next<0&&v>m&&t[d+v*3-3]==65535){a=t[d+v*3-1];continue e}for(;m<v;){let b=m+v>>1,O=d+b+(b<<1),x=t[O],C=t[O+1]||65536;if(p<x)v=b;else if(p>=C)m=b+1;else{a=t[O+2],e.advance();continue e}}break}}function s2(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function FU(t,e,n,i){let r=s2(n,i,e);return r<0||s2(n,i,t)<r}const wi=typeof process<"u"&&i2&&/\bparse\b/.test(i2.LOG);let _y=null;function l2(t,e,n){let i=t.cursor(On.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class YU{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?l2(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?l2(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],a=this.start[n]+i.positions[r];if(a>e)return this.nextStart=a,null;if(s instanceof zt){if(a==e){if(a<this.safeFrom)return null;let c=a+s.length;if(c<=this.safeTo){let f=s.prop(He.lookAhead);if(!f||c+f<this.fragment.to)return s}}this.index[n]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}}class KU{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new up)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,a=r.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,f=0;for(let d=0;d<s.length;d++){if((1<<d&a)==0)continue;let p=s[d],m=this.tokens[d];if(!(i&&!p.fallback)&&((p.contextual||m.start!=e.pos||m.mask!=a||m.context!=c)&&(this.updateCachedToken(m,p,e),m.mask=a,m.context=c),m.lookAhead>m.end+25&&(f=Math.max(m.lookAhead,f)),m.value!=0)){let v=n;if(m.extended>-1&&(n=this.addActions(e,m.extended,m.end,n)),n=this.addActions(e,m.value,m.end,n),!p.extend&&(i=m,n>v))break}}for(;this.actions.length>n;)this.actions.pop();return f&&e.setLookAhead(f),!i&&e.pos==this.stream.end&&(i=new up,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new up,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let c=s.specializers[a](this.stream.read(e.start,e.end),i);if(c>=0&&i.p.parser.dialect.allows(c>>1)){(c&1)==0?e.value=c>>1:e.extended=c>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:a}=e.p,{data:c}=a;for(let f=0;f<2;f++)for(let d=a.stateSlot(s,f?2:1);;d+=3){if(c[d]==65535)if(c[d+1]==1)d=zo(c,d+2);else{r==0&&c[d+1]==2&&(r=this.putAction(zo(c,d+2),n,i,r));break}c[d]==n&&(r=this.putAction(zo(c,d+1),n,i,r))}return r}}class ZU{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new XU(n,r),this.tokens=new KU(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[_p.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new YU(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let c=e[a];for(;;){if(this.tokens.mainToken=null,c.pos>n)i.push(c);else{if(this.advanceStack(c,i,e))continue;{r||(r=[],s=[]),r.push(c);let f=this.tokens.getMainToken(c);s.push(f.value,f.end)}}break}}if(!i.length){let a=r&&tI(r);if(a)return wi&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw wi&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return wi&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((c,f)=>f.score-c.score);i.length>a;)i.pop();i.some(c=>c.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let c=i[a];for(let f=a+1;f<i.length;f++){let d=i[f];if(c.sameState(d)||c.buffer.length>500&&d.buffer.length>500)if((c.score-d.score||c.buffer.length-d.buffer.length)>0)i.splice(f--,1);else{i.splice(a--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,a=wi?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let d=e.curContext&&e.curContext.tracker.strict,p=d?e.curContext.hash:0;for(let m=this.fragments.nodeAt(r);m;){let v=this.parser.nodeSet.types[m.type.id]==m.type?s.getGoto(e.state,m.type.id):-1;if(v>-1&&m.length&&(!d||(m.prop(He.contextHash)||0)==p))return e.useNode(m,v),wi&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(m.type.id)})`),!0;if(!(m instanceof zt)||m.children.length==0||m.positions[0]>0)break;let b=m.children[0];if(b instanceof zt&&m.positions[0]==0)m=b;else break}}let c=s.stateSlot(e.state,4);if(c>0)return e.reduce(c),wi&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let d=0;d<f.length;){let p=f[d++],m=f[d++],v=f[d++],b=d==f.length||!i,O=b?e:e.split(),x=this.tokens.mainToken;if(O.apply(p,m,x?x.start:O.pos,v),wi&&console.log(a+this.stackID(O)+` (via ${(p&65536)==0?"shift":`reduce of ${s.getName(p&65535)}`} for ${s.getName(m)} @ ${r}${O==e?"":", split"})`),b)return!0;O.pos>r?n.push(O):i.push(O)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return a2(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let a=0;a<e.length;a++){let c=e[a],f=n[a<<1],d=n[(a<<1)+1],p=wi?this.stackID(c)+" -> ":"";if(c.deadEnd&&(s||(s=!0,c.restart(),wi&&console.log(p+this.stackID(c)+" (restarted)"),this.advanceFully(c,i))))continue;let m=c.split(),v=p;for(let b=0;m.forceReduce()&&b<10&&(wi&&console.log(v+this.stackID(m)+" (via force-reduce)"),!this.advanceFully(m,i));b++)wi&&(v=this.stackID(m)+" -> ");for(let b of c.recoverByInsert(f))wi&&console.log(p+this.stackID(b)+" (via recover-insert)"),this.advanceFully(b,i);this.stream.end>c.pos?(d==c.pos&&(d++,f=0),c.recoverByDelete(f,d),wi&&console.log(p+this.stackID(c)+` (via recover-delete ${this.parser.getName(f)})`),a2(c,i)):(!r||r.score<c.score)&&(r=c)}return r}stackToTree(e){return e.close(),zt.build({buffer:qp.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(_y||(_y=new WeakMap)).get(e);return n||_y.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function a2(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class JU{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const qy=t=>t;class eI{constructor(e){this.start=e.start,this.shift=e.shift||qy,this.reduce=e.reduce||qy,this.reuse=e.reuse||qy,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Up extends LO{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let c=0;c<e.repeatNodeCount;c++)n.push("");let i=Object.keys(e.topRules).map(c=>e.topRules[c][1]),r=[];for(let c=0;c<n.length;c++)r.push([]);function s(c,f,d){r[c].push([f,f.deserialize(String(d))])}if(e.nodeProps)for(let c of e.nodeProps){let f=c[0];typeof f=="string"&&(f=He[f]);for(let d=1;d<c.length;){let p=c[d++];if(p>=0)s(p,f,c[d++]);else{let m=c[d+-p];for(let v=-p;v>0;v--)s(c[d++],f,m);d++}}}this.nodeSet=new xm(n.map((c,f)=>Zn.define({name:f>=this.minRepeatTerm?void 0:c,id:f,props:r[f],top:i.indexOf(f)>-1,error:f==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(f)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=FM;let a=Md(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(c2),this.states=Md(e.states,Uint32Array),this.data=Md(e.stateData),this.goto=Md(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new Na(a,c):c),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new ZU(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],c=a&1,f=r[s++];if(c&&i)return f;for(let d=s+(a>>1);s<d;s++)if(r[s]==e)return f;if(c)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),a;;s+=3){if((a=i[s])==65535)if(i[s+1]==1)a=i[s=zo(i,s+2)];else{if(i[s+1]==2)return zo(i,s+2);break}if(a==n||a==0)return zo(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=zo(this.data,s+2);else break;r=n(zo(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=zo(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Up.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(c=>c.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=c2(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let a=this.dialects[n[s]],c;(c=this.data[a++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[c]=1;return new JU(e,i,r)}static deserialize(e){return new Up(e)}}function zo(t,e){return t[e]|t[e+1]<<16}function tI(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function c2(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const nI=1,xD=194,wD=195,iI=196,u2=197,rI=198,oI=199,sI=200,lI=2,CD=3,f2=201,aI=24,cI=25,uI=49,fI=50,hI=55,dI=56,pI=57,mI=59,gI=60,yI=61,vI=62,bI=63,OI=65,SI=238,xI=71,wI=241,CI=242,TI=243,kI=244,EI=245,AI=246,RI=247,MI=248,TD=72,DI=249,PI=250,zI=251,$I=252,BI=253,jI=254,QI=255,LI=256,NI=73,_I=77,qI=263,UI=112,II=130,HI=151,VI=152,WI=155,Pl=10,yf=13,l1=32,Pm=9,a1=35,XI=40,GI=46,Cb=123,h2=125,kD=39,ED=34,d2=92,FI=111,YI=120,KI=78,ZI=117,JI=85,eH=new Set([cI,uI,fI,qI,OI,II,dI,pI,SI,vI,bI,TD,NI,_I,gI,yI,HI,VI,WI,UI]);function Uy(t){return t==Pl||t==yf}function Iy(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}const tH=new Dm((t,e)=>{let n;if(t.next<0)t.acceptToken(oI);else if(e.context.flags&fp)Uy(t.next)&&t.acceptToken(rI,1);else if(((n=t.peek(-1))<0||Uy(n))&&e.canShift(u2)){let i=0;for(;t.next==l1||t.next==Pm;)t.advance(),i++;(t.next==Pl||t.next==yf||t.next==a1)&&t.acceptToken(u2,-i)}else Uy(t.next)&&t.acceptToken(iI,1)},{contextual:!0}),nH=new Dm((t,e)=>{let n=e.context;if(n.flags)return;let i=t.peek(-1);if(i==Pl||i==yf){let r=0,s=0;for(;;){if(t.next==l1)r++;else if(t.next==Pm)r+=8-r%8;else break;t.advance(),s++}r!=n.indent&&t.next!=Pl&&t.next!=yf&&t.next!=a1&&(r<n.indent?t.acceptToken(wD,-s):t.acceptToken(xD))}}),fp=1,AD=2,Ro=4,Mo=8,Do=16,Po=32;function hp(t,e,n){this.parent=t,this.indent=e,this.flags=n,this.hash=(t?t.hash+t.hash<<8:0)+e+(e<<4)+n+(n<<6)}const iH=new hp(null,0,0);function rH(t){let e=0;for(let n=0;n<t.length;n++)e+=t.charCodeAt(n)==Pm?8-e%8:1;return e}const p2=new Map([[wI,0],[CI,Ro],[TI,Mo],[kI,Mo|Ro],[EI,Do],[AI,Do|Ro],[RI,Do|Mo],[MI,Do|Mo|Ro],[DI,Po],[PI,Po|Ro],[zI,Po|Mo],[$I,Po|Mo|Ro],[BI,Po|Do],[jI,Po|Do|Ro],[QI,Po|Do|Mo],[LI,Po|Do|Mo|Ro]].map(([t,e])=>[t,e|AD])),oH=new eI({start:iH,reduce(t,e,n,i){return t.flags&fp&&eH.has(e)||(e==xI||e==TD)&&t.flags&AD?t.parent:t},shift(t,e,n,i){return e==xD?new hp(t,rH(i.read(i.pos,n.pos)),0):e==wD?t.parent:e==aI||e==hI||e==mI||e==CD?new hp(t,0,fp):p2.has(e)?new hp(t,0,p2.get(e)|t.flags&fp):t},hash(t){return t.hash}}),sH=new Dm(t=>{for(let e=0;e<5;e++){if(t.next!="print".charCodeAt(e))return;t.advance()}if(!/\w/.test(String.fromCharCode(t.next)))for(let e=0;;e++){let n=t.peek(e);if(!(n==l1||n==Pm)){n!=XI&&n!=GI&&n!=Pl&&n!=yf&&n!=a1&&t.acceptToken(nI);return}}}),lH=new Dm((t,e)=>{let{flags:n}=e.context,i=n&Ro?ED:kD,r=(n&Mo)>0,s=!(n&Do),a=(n&Po)>0,c=t.pos;for(;!(t.next<0);)if(a&&t.next==Cb)if(t.peek(1)==Cb)t.advance(2);else{if(t.pos==c){t.acceptToken(CD,1);return}break}else if(s&&t.next==d2){if(t.pos==c){t.advance();let f=t.next;f>=0&&(t.advance(),aH(t,f)),t.acceptToken(lI);return}break}else if(t.next==d2&&!s&&t.peek(1)>-1)t.advance(2);else if(t.next==i&&(!r||t.peek(1)==i&&t.peek(2)==i)){if(t.pos==c){t.acceptToken(f2,r?3:1);return}break}else if(t.next==Pl){if(r)t.advance();else if(t.pos==c){t.acceptToken(f2);return}break}else t.advance();t.pos>c&&t.acceptToken(sI)});function aH(t,e){if(e==FI)for(let n=0;n<2&&t.next>=48&&t.next<=55;n++)t.advance();else if(e==YI)for(let n=0;n<2&&Iy(t.next);n++)t.advance();else if(e==ZI)for(let n=0;n<4&&Iy(t.next);n++)t.advance();else if(e==JI)for(let n=0;n<8&&Iy(t.next);n++)t.advance();else if(e==KI&&t.next==Cb){for(t.advance();t.next>=0&&t.next!=h2&&t.next!=kD&&t.next!=ED&&t.next!=Pl;)t.advance();t.next==h2&&t.advance()}}const cH=JM({'async "*" "**" FormatConversion FormatSpec':J.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":J.controlKeyword,"in not and or is del":J.operatorKeyword,"from def class global nonlocal lambda":J.definitionKeyword,import:J.moduleKeyword,"with as print":J.keyword,Boolean:J.bool,None:J.null,VariableName:J.variableName,"CallExpression/VariableName":J.function(J.variableName),"FunctionDefinition/VariableName":J.function(J.definition(J.variableName)),"ClassDefinition/VariableName":J.definition(J.className),PropertyName:J.propertyName,"CallExpression/MemberExpression/PropertyName":J.function(J.propertyName),Comment:J.lineComment,Number:J.number,String:J.string,FormatString:J.special(J.string),Escape:J.escape,UpdateOp:J.updateOperator,"ArithOp!":J.arithmeticOperator,BitOp:J.bitwiseOperator,CompareOp:J.compareOperator,AssignOp:J.definitionOperator,Ellipsis:J.punctuation,At:J.meta,"( )":J.paren,"[ ]":J.squareBracket,"{ }":J.brace,".":J.derefOperator,", ;":J.separator}),uH={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},fH=Up.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyO<POWO,5:aOOQS,5:a,5:aO<[QdO'#HwOOOW'#Dw'#DwOOOW'#Fz'#FzO<lOWO,5:bOOQS,5:b,5:bOOQS'#F}'#F}O<zQtO,5:iO?lQtO,5=`O@VQ#xO,5=`O@vQtO,5=`OOQS,5:},5:}OA_QeO'#GWOBqQdO,5;^OOQV,5=^,5=^OB|QtO'#IPOCkQdO,5;tOOQS-E:[-E:[OOQV,5;s,5;sO4dQdO'#FQOOQV-E9o-E9oOCsQtO,59]OEzQtO,59iOFeQdO'#HVOFpQdO'#HVO1XQdO'#HVOF{QdO'#DTOGTQdO,59mOGYQdO'#HZO'vQdO'#HZO0rQdO,5=tOOQS,5=t,5=tO0rQdO'#EROOQS'#ES'#ESOGwQdO'#GPOHXQdO,58|OHXQdO,58|O*xQdO,5:oOHgQtO'#H]OOQS,5:r,5:rOOQS,5:z,5:zOHzQdO,5;OOI]QdO'#IOO1XQdO'#H}OOQS,5;Q,5;QOOQS'#GT'#GTOIqQtO,5;QOJPQdO,5;QOJUQdO'#IQOOQS,5;T,5;TOJdQdO'#H|OOQS,5;W,5;WOJuQdO,5;YO4iQdO,5;`O4iQdO,5;cOJ}QtO'#ITO'vQdO'#ITOKXQdO,5;eO4VQdO,5;eO0rQdO,5;jO1XQdO,5;lOK^QeO'#EuOLjQgO,5;fO!!kQdO'#IUO4iQdO,5;jO!!vQdO,5;lO!#OQdO,5;qO!#ZQtO,5;vO'vQdO,5;vPOOO,5=[,5=[P!#bOSO,5=[P!#jOdO,5=[O!&bQtO1G.jO!&iQtO1G.jO!)YQtO1G.jO!)dQtO1G.jO!+}QtO1G.jO!,bQtO1G.jO!,uQdO'#HcO!-TQtO'#GuO0rQdO'#HcO!-_QdO'#HbOOQS,5:Z,5:ZO!-gQdO,5:ZO!-lQdO'#HeO!-wQdO'#HeO!.[QdO,5>OOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5<jOOQS,5<j,5<jOOQS-E9|-E9|OOQS,5<r,5<rOOQS-E:U-E:UOOQV1G0x1G0xO1XQdO'#GRO!7dQtO,5>kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5<k,5<kOOQS-E9}-E9}O!9wQdO1G.hOOQS1G0Z1G0ZO!:VQdO,5=wO!:gQdO,5=wO0rQdO1G0jO0rQdO1G0jO!:xQdO,5>jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!<RQdO,5>lO!<aQdO,5>lO!<oQdO,5>hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5<m,5<mOOQS-E:P-E:POOQS7+&z7+&zOOQS1G3]1G3]OOQS,5<^,5<^OOQS-E9p-E9pOOQS7+$s7+$sO#)bQdO,5=`O#){QdO,5=`O#*^QtO,5<aO#*qQdO1G3cOOQS-E9s-E9sOOQS7+&U7+&UO#+RQdO7+&UO#+aQdO,5<nO#+uQdO1G4UOOQS-E:Q-E:QO#,WQdO1G4UOOQS1G4T1G4TOOQS7+&W7+&WO#,iQdO7+&WOOQS,5<p,5<pO#,tQdO1G4WOOQS-E:S-E:SOOQS,5<l,5<lO#-SQdO1G4SOOQS-E:O-E:OO1XQdO'#EqO#-jQdO'#EqO#-uQdO'#IRO#-}QdO,5;[OOQS7+&`7+&`O0rQdO7+&`O#.SQgO7+&fO!JmQdO'#GXO4iQdO7+&fO4iQdO7+&iO#2QQtO,5<tO'vQdO,5<tO#2[QdO1G4ZOOQS-E:W-E:WO#2fQdO1G4ZO4iQdO7+&kO0rQdO7+&kOOQV7+&p7+&pO!KrQ!fO7+&rO!KzQdO7+&rO`QeO1G0{OOQV-E:X-E:XO4iQdO7+&lO4iQdO7+&lOOQV,5<u,5<uO#2nQdO,5<uO!JmQdO,5<uOOQV7+&l7+&lO#2yQgO7+&lO#6tQdO,5<vO#7PQdO1G4[OOQS-E:Y-E:YO#7^QdO1G4[O#7fQdO'#IWO#7tQdO'#IWO1XQdO'#IWOOQS'#IW'#IWO#8PQdO'#IVOOQS,5;n,5;nO#8XQdO,5;nO0rQdO'#FUOOQV7+&r7+&rO4iQdO7+&rOOQV7+&w7+&wO4iQdO7+&wO#8^QfO,5;xOOQV7+&|7+&|POOO7+(b7+(bO#8cQdO1G3iOOQS,5<c,5<cO#8qQdO1G3hOOQS-E9u-E9uO#9UQdO,5<dO#9aQdO,5<dO#9tQdO1G3kOOQS-E9v-E9vO#:UQdO1G3kO#:^QdO1G3kO#:nQdO1G3kO#:UQdO1G3kOOQS<<H[<<H[O#:yQtO1G1zOOQS<<Hk<<HkP#;WQdO'#FtO8vQdO1G3bO#;eQdO1G3bO#;jQdO<<HkOOQS<<Hl<<HlO#;zQdO7+)QOOQS<<Hs<<HsO#<[QtO1G1yP#<{QdO'#FsO#=YQdO7+)RO#=jQdO7+)RO#=rQdO<<HwO#=wQdO7+({OOQS<<Hy<<HyO#>nQdO,5<bO'vQdO,5<bOOQS-E9t-E9tOOQS<<Hw<<HwOOQS,5<g,5<gO0rQdO,5<gO#>sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<<IpO1XQdO1G2YP1XQdO'#GSO#AOQdO7+)pO#AaQdO7+)pOOQS<<Ir<<IrP1XQdO'#GUP0rQdO'#GQOOQS,5;],5;]O#ArQdO,5>mO#BQQdO,5>mOOQS1G0v1G0vOOQS<<Iz<<IzOOQV-E:V-E:VO4iQdO<<JQOOQV,5<s,5<sO4iQdO,5<sOOQV<<JQ<<JQOOQV<<JT<<JTO#BYQtO1G2`P#BdQdO'#GYO#BkQdO7+)uO#BuQgO<<JVO4iQdO<<JVOOQV<<J^<<J^O4iQdO<<J^O!KrQ!fO<<J^O#FpQgO7+&gOOQV<<JW<<JWO#FzQgO<<JWOOQV1G2a1G2aO1XQdO1G2aO#JuQdO1G2aO4iQdO<<JWO1XQdO1G2bP0rQdO'#G[O#KQQdO7+)vO#K_QdO7+)vOOQS'#FT'#FTO0rQdO,5>rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<<Jc<<JcO#LhQdO1G1dOOQS7+)T7+)TP#LmQdO'#FwO#L}QdO1G2OO#MbQdO1G2OO#MrQdO1G2OP#M}QdO'#FxO#N[QdO7+)VO#NlQdO7+)VO#NlQdO7+)VO#NtQdO7+)VO$ UQdO7+(|O8vQdO7+(|OOQSAN>VAN>VO$ oQdO<<LmOOQSAN>cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<<MT<<MTO$#nQdO7+(fOOQSAN?[AN?[OOQS7+'t7+'tO$$XQdO<<M[OOQS,5<q,5<qO$$jQdO1G4XOOQS-E:T-E:TOOQVAN?lAN?lOOQV1G2_1G2_O4iQdOAN?qO$$xQgOAN?qOOQVAN?xAN?xO4iQdOAN?xOOQV<<JR<<JRO4iQdOAN?rO4iQdO7+'{OOQV7+'{7+'{O1XQdO7+'{OOQVAN?rAN?rOOQS7+'|7+'|O$(sQdO<<MbOOQS1G4^1G4^O0rQdO1G4^OOQS,5<w,5<wO$)QQdO1G4]OOQS-E:Z-E:ZOOQU'#G_'#G_O$)cQfO7+'OO$)nQdO'#F_O$*uQdO7+'jO$+VQdO7+'jOOQS7+'j7+'jO$+bQdO<<LqO$+rQdO<<LqO$+rQdO<<LqO$+zQdO'#H^OOQS<<Lh<<LhO$,UQdO<<LhOOQS7+'h7+'hOOQS'#D|'#D|OOOO1G4R1G4RO$,oQdO1G4RO$,wQdO1G4RP!=hQdO'#GVOOQVG25]G25]O4iQdOG25]OOQVG25dG25dOOQVG25^G25^OOQV<<Kg<<KgO4iQdO<<KgOOQS7+)x7+)xP$-SQdO'#G]OOQU-E:]-E:]OOQV<<Jj<<JjO$-vQtO'#FaOOQS'#Fc'#FcO$.WQdO'#FbO$.xQdO'#FbOOQS'#Fb'#FbO$.}QdO'#IYO$)nQdO'#FiO$)nQdO'#FiO$/fQdO'#FjO$)nQdO'#FkO$/mQdO'#IZOOQS'#IZ'#IZO$0[QdO,5;yOOQS<<KU<<KUO$0dQdO<<KUO$0tQdOANB]O$1UQdOANB]O$1^QdO'#H_OOQS'#H_'#H_O1sQdO'#DcO$1wQdO,5=xOOQSANBSANBSOOOO7+)m7+)mO$2`QdO7+)mOOQVLD*wLD*wOOQVANARANARO5uQ!fO'#GaO$2hQtO,5<SO$)nQdO'#FmOOQS,5<W,5<WOOQS'#Fd'#FdO$3YQdO,5;|O$3_QdO,5;|OOQS'#Fg'#FgO$)nQdO'#G`O$4PQdO,5<QO$4kQdO,5>tO$4{QdO,5>tO1XQdO,5<PO$5^QdO,5<TO$5cQdO,5<TO$)nQdO'#I[O$5hQdO'#I[O$5mQdO,5<UOOQS,5<V,5<VO0rQdO'#FpOOQU1G1e1G1eO4iQdO1G1eOOQSAN@pAN@pO$5rQdOG27wO$6SQdO,59}OOQS1G3d1G3dOOOO<<MX<<MXOOQS,5<{,5<{OOQS-E:_-E:_O$6XQtO'#FaO$6`QdO'#I]O$6nQdO'#I]O$6vQdO,5<XOOQS1G1h1G1hO$6{QdO1G1hO$7QQdO,5<zOOQS-E:^-E:^O$7lQdO,5=OO$8TQdO1G4`OOQS-E:b-E:bOOQS1G1k1G1kOOQS1G1o1G1oO$8eQdO,5>vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5<YO$8sQdO,5>wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5<ZP$)nQdO'#GcO$;XQdO1G2hO$)nQdO1G2hP$;gQdO'#GbO$;nQdO<<MhO$;xQdO1G1uO$<WQdO7+(SO8vQdO'#C}O8vQdO,59bO8vQdO,59bO8vQdO,59bO$<fQtO,5=`O8vQdO1G.|O0rQdO1G/XO0rQdO7+$pP$<yQdO'#GOO'vQdO'#GtO$=WQdO,59bO$=]QdO,59bO$=dQdO,59mO$=iQdO1G/UO1sQdO'#DRO8vQdO,59j",stateData:"$>S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!<S!<VP!<_!<h!=d!=g]eOn#g$j)t,P'}`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r{!cQ#c#p$R$d$p%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g}!dQ#c#p$R$d$p$u%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!P!eQ#c#p$R$d$p$u$v%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!R!fQ#c#p$R$d$p$u$v$w%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!T!gQ#c#p$R$d$p$u$v$w$x%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!V!hQ#c#p$R$d$p$u$v$w$x$y%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!Z!hQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g'}TOTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r&eVOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0r%oXOYZ[dnrxy}!P!Q!U!i!k#[#d#g#y#{#}$Q$h$j$}%S%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#vqQ/[.kR0o0q't`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rh#jhz{$W$Z&l&q)S)X+f+g-RW#rq&].k0qQ$]|Q$a!OQ$n!VQ$o!WW$|!i'm*d,gS&[#s#tQ'S$iQ(s&UQ)U&nU)Y&s)Z+jW)a&w+m-T-{Q*Q']W*R'_,`-h.TQ+l)`S,_*S*TQ-Q+eQ-_,TQ-c,WQ.R-al.W-l.^._.a.z.|/R/j/o/t/y0U0Z0^Q/S.`Q/a.tQ/l/OU0P/u0S0[X0V/z0W0_0`R&Z#r!_!wYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZR%^!vQ!{YQ%x#[Q&d#}Q&g$QR,{+YT.j-s/s!Y!jQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gQ&X#kQ'c$oR*^'dR'l$|Q%V!mR/_.r'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rS#a_#b!P.[-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rT#a_#bT#^^#_R(o%xa(l%x(n(o+`,{-y-z.oT+[(k+]R-z,{Q$PsQ+l)aQ,^*RR-e,_X#}s$O$P&fQ&y$aQ'a$nQ'd$oR)s'SQ)b&wV-S+m-T-{ZgOn$j)t,PXkOn)t,PQ$k!TQ&z$bQ&{$cQ'^$mQ'b$oQ)q'RQ)x'WQ){'XQ)|'YQ*Z'`S*]'c'dQ+s)gQ+u)hQ+v)iQ+z)oS+|)r*[Q,Q)vQ,R)wS,S)y)zQ,d*^Q-V+rQ-W+tQ-Y+{S-Z+},OQ-`,UQ-b,VQ-|-XQ.O-[Q.P-^Q.Q-_Q.p-}Q.q.RQ/W.dR/r/XWkOn)t,PR#mjQ'`$nS)r'S'aR,O)sQ,]*RR-f,^Q*['`Q+})rR-[,OZiOjn)t,PQ'f$pR*`'gT-j,e-ku.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^t.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^Q/S.`X0V/z0W0_0`!P.Z-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`Q.w.YR/f.xg.z.].{/b/i/n/|0O0Q0]0a0bu.b-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^X.u.W.b/a0PR/c.tV0R/u0S0[R/X.dQnOS#on,PR,P)tQ&^#uR(x&^S%m#R#wS(_%m(bT(b%p&`Q%a!yQ%h!}W(P%a%h(U(YQ(U%eR(Y%jQ&i$RR)O&iQ(e%qQ*{(`T+R(e*{Q'n%OR*e'nS'q%R%SY*i'q*j,m-q.hU*j'r's'tU,m*k*l*mS-q,n,oR.h-rQ#Y]R%t#YQ#_^R%y#_Q(h%vS+W(h+XR+X(iQ+](kR,|+]Q#b_R%{#bQ#ebQ%}#cW&Q#e%}({+bQ({&cR+b0gQ$OsS&e$O&fR&f$PQ&v$_R)_&vQ&V#jR(t&VQ&m$VS)T&m+hR+h)UQ$Z{R&p$ZQ&t$]R)[&tQ+n)bR-U+nQ#hfR&S#hQ)f&zR+q)fQ&}$dS)m&})nR)n'OQ'V$kR)u'VQ'[$lS*P'[,ZR,Z*QQ,a*VR-i,aWjOn)t,PR#ljQ-k,eR.U-kd.{.]/b/i/n/|0O0Q0]0a0bR/h.{U.s.W/a0PR/`.sQ/{/nS0X/{0YR0Y/|S/v/b/cR0T/vQ.}.]R/k.}R!ZPXmOn)t,PWlOn)t,PR'T$jYfOn$j)t,PR&R#g[sOn#g$j)t,PR&d#}&dQOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0rQ!nTQ#caQ#poU$Rt%c(SS$d!R$gQ$p!XQ$u!cQ$v!dQ$w!eQ$x!fQ$y!gQ$z!hQ%e!zQ%j#OQ%p#SQ%q#TQ&`#xQ'O$eQ'g$qQ(q&OU(|&h(}+cW)j&|)l+x+yQ*o'|Q*x(]Q+w)kQ,v+QR0g0lQ!yYQ!}ZQ$b!PQ$c!QQ%R!kQ't%S^'{%`%g(O(W*q*t*v^*f'p*h,k,l-p.g/ZQ*l'rQ*m'sQ+t)gQ,j*gQ,n*kQ-n,hQ-o,iQ-r,oQ.e-mR/Y.f[bOn#g$j)t,P!^!vYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZQ#R[Q#fdS#wrxQ$UyW$_}$Q'P)pS$l!U$hW${!i'm*d,gS%v#[+Y`&P#d%|(p(r(z+a-O0kQ&a#yQ&b#{Q&c#}Q'j$}Q'z%^W([%l(^*y*}Q(`%nQ(i%wQ(v&ZS(y&_0iQ)P&jQ)Q&kU)]&u)^+kQ)d&xQ)y'WY)}'Z*O,X,Y-dQ*b'lS*n'w0jW+P(d*z,s,wW+T(g+V,y,zQ+p)eQ,U)zQ,c*YQ,x+UQ-P+dQ-e,]Q-v,uQ.S-fR/q/VhUOn#d#g$j%|&_'w(p(r)t,P%U!uYZ[drxy}!P!Q!U!i!k#[#y#{#}$Q$h$}%S%^%`%g%l%n%w&Z&j&k&u&x'P'W'Z'l'm'p'r's(O(W(^(d(g(z)^)e)g)p)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#qpW%W!o!s0d0nQ%X!pQ%Y!qQ%[!tQ%f0cS'v%Z0hQ'x0eQ'y0fQ,p*rQ-u,qS.i-s/sR0p0rU#uq.k0qR(w&][cOn#g$j)t,PZ!xY#[#}$Q+YQ#W[Q#zrR$TxQ%b!yQ%i!}Q%o#RQ'j${Q(V%eQ(Z%jQ(c%pQ(f%qQ*|(`Q,f*bQ-t,pQ.m-uR/].lQ$StQ(R%cR*s(SQ.l-sR/}/sR#QZR#V[R%Q!iQ%O!iV*c'm*d,g!Z!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:"⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:oH,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[cH],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[sH,nH,tH,lH,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:t=>uH[t]||-1}],tokenPrec:7668}),m2=new V8,RD=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function Dd(t){return(e,n,i)=>{if(i)return!1;let r=e.node.getChild("VariableName");return r&&n(r,t),!0}}const hH={FunctionDefinition:Dd("function"),ClassDefinition:Dd("class"),ForStatement(t,e,n){if(n){for(let i=t.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")e(i,"variable");else if(i.name=="in")break}},ImportStatement(t,e){var n,i;let{node:r}=t,s=((n=r.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let a=r.getChild("import");a;a=a.nextSibling)a.name=="VariableName"&&((i=a.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&e(a,s?"variable":"namespace")},AssignStatement(t,e){for(let n=t.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")e(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(t,e){for(let n=null,i=t.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&e(i,"variable"),n=i},CapturePattern:Dd("variable"),AsPattern:Dd("variable"),__proto__:null};function MD(t,e){let n=m2.get(e);if(n)return n;let i=[],r=!0;function s(a,c){let f=t.sliceString(a.from,a.to);i.push({label:f,type:c})}return e.cursor(On.IncludeAnonymous).iterate(a=>{if(a.name){let c=hH[a.name];if(c&&c(a,s,r)||!r&&RD.has(a.name))return!1;r=!1}else if(a.to-a.from>8192){for(let c of MD(t,a.node))i.push(c);return!1}}),m2.set(e,i),i}const g2=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,DD=["String","FormatString","Comment","PropertyName"];function dH(t){let e=Tn(t.state).resolveInner(t.pos,-1);if(DD.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&g2.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)RD.has(r.name)&&(i=i.concat(MD(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:g2}}const pH=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(t=>({label:t,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(t=>({label:t,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(t=>({label:t,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(t=>({label:t,type:"function"}))),mH=[ko("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),ko("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),ko("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),ko("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),ko(`if \${}:
|
|
147
|
-
|
|
148
|
-
`,{label:"if",detail:"block",type:"keyword"}),ko("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),ko("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),ko("import ${module}",{label:"import",detail:"statement",type:"keyword"}),ko("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],gH=Hq(DD,R5(pH.concat(mH)));function Hy(t){let{node:e,pos:n}=t,i=t.lineIndent(n,-1),r=null;for(;;){let s=e.childBefore(n);if(s)if(s.name=="Comment")n=s.from;else if(s.name=="Body"||s.name=="MatchBody")t.baseIndentFor(s)+t.unit<=i&&(r=s),e=s;else if(s.name=="MatchClause")e=s;else if(s.type.is("Statement"))e=s;else break;else break}return r}function Vy(t,e){let n=t.baseIndentFor(e),i=t.lineAt(t.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&t.node.to<r+100&&!/\S/.test(t.state.sliceDoc(r,t.node.to))&&t.lineIndent(t.pos,-1)<=n||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(t.textAfter)&&t.lineIndent(t.pos,-1)>n?null:n+t.unit}const Wy=$p.define({name:"python",parser:fH.configure({props:[_O.add({Body:t=>{var e;let n=/^\s*(#|$)/.test(t.textAfter)&&Hy(t)||t.node;return(e=Vy(t,n))!==null&&e!==void 0?e:t.continue()},MatchBody:t=>{var e;let n=Hy(t);return(e=Vy(t,n||t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),"ForStatement WhileStatement":t=>/^\s*else:/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except[ :]|finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),MatchStatement:t=>/^\s*case /.test(t.textAfter)?t.baseIndent+t.unit:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":zy({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":zy({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":zy({closing:"]"}),MemberExpression:t=>t.baseIndent+t.unit,"String FormatString":()=>null,Script:t=>{var e;let n=Hy(t);return(e=n&&Vy(t,n))!==null&&e!==void 0?e:t.continue()}}),a5.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":dq,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)}),"String FormatString":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function c1(){return new iq(Wy,[Wy.data.of({autocomplete:dH}),Wy.data.of({autocomplete:gH})])}class y2{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class pl{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(vf).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((p,m)=>p.from-m.from||p.to-m.to),a=new Jr,c=[],f=0;for(let p=0;;){let m=p==s.length?null:s[p];if(!m&&!c.length)break;let v,b;for(c.length?(v=f,b=c.reduce((x,C)=>Math.min(x,C.to),m&&m.from>v?m.from:1e8)):(v=m.from,b=m.to,c.push(m),p++);p<s.length;){let x=s[p];if(x.from==v&&(x.to>x.from||x.to==v))c.push(x),p++,b=Math.min(x.to,b);else{b=Math.min(x.from,b);break}}let O=AH(c);if(c.some(x=>x.from==x.to||x.from==x.to-1&&i.doc.lineAt(x.from).to==x.from))a.add(v,v,Te.widget({widget:new CH(O),diagnostics:c.slice()}));else{let x=c.reduce((C,k)=>k.markClass?C+" "+k.markClass:C,"");a.add(v,b,Te.mark({class:"cm-lintRange cm-lintRange-"+O+x,diagnostics:c.slice(),inclusiveEnd:c.some(C=>C.to>b)}))}f=b;for(let x=0;x<c.length;x++)c[x].to<=f&&c.splice(x--,1)}let d=a.finish();return new pl(d,n,nc(d))}}function nc(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!i)i=new y2(r,s,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new y2(i.from,s,i.diagnostic)}}),i}function yH(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(vf).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(PD))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function vH(t,e){return t.field(Ai,!1)?e:e.concat(ze.appendConfig.of(RH))}const PD=ze.define(),u1=ze.define(),zD=ze.define(),Ai=kn.define({create(){return new pl(Te.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=nc(n,t.selected.diagnostic,s)||nc(n,null,s)}!n.size&&r&&e.state.facet(vf).autoPanel&&(r=null),t=new pl(n,r,i)}for(let n of e.effects)if(n.is(PD)){let i=e.state.facet(vf).autoPanel?n.value.length?bf.open:null:t.panel;t=pl.init(n.value,i,e.state)}else n.is(u1)?t=new pl(t.diagnostics,n.value?bf.open:null,t.selected):n.is(zD)&&(t=new pl(t.diagnostics,t.panel,n.value));return t},provide:t=>[uf.from(t,e=>e.panel),de.decorations.from(t,e=>e.diagnostics)]}),bH=Te.mark({class:"cm-lintRange cm-lintRange-active"});function OH(t,e,n){let{diagnostics:i}=t.state.field(Ai),r,s=-1,a=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(f,d,{spec:p})=>{if(e>=f&&e<=d&&(f==d||(e>f||n>0)&&(e<d||n<0)))return r=p.diagnostics,s=f,a=d,!1});let c=t.state.facet(vf).tooltipFilter;return r&&c&&(r=c(r,t.state)),r?{pos:s,end:a,above:t.state.doc.lineAt(s).to<a,create(){return{dom:SH(t,r)}}}:null}function SH(t,e){return Mt("ul",{class:"cm-tooltip-lint"},e.map(n=>BD(t,n,!1)))}const xH=t=>{let e=t.state.field(Ai,!1);(!e||!e.panel)&&t.dispatch({effects:vH(t.state,[u1.of(!0)])});let n=cf(t,bf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},v2=t=>{let e=t.state.field(Ai,!1);return!e||!e.panel?!1:(t.dispatch({effects:u1.of(!1)}),!0)},wH=t=>{let e=t.state.field(Ai,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},f1=[{key:"Mod-Shift-m",run:xH,preventDefault:!0},{key:"F8",run:wH}],vf=be.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...no(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:b2,tooltipFilter:b2,needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n,hideOn:(e,n)=>e?n?(i,r,s)=>e(i,r,s)||n(i,r,s):e:n,autoPanel:(e,n)=>e||n})}}});function b2(t,e){return t?e?(n,i)=>e(t(n,i),i):t:e}function $D(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;i<n.length;i++){let r=n[i];if(/[a-zA-Z]/.test(r)&&!e.some(s=>s.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function BD(t,e,n){var i;let r=n?$D(e.actions):[];return Mt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Mt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,a)=>{let c=!1,f=b=>{if(b.preventDefault(),c)return;c=!0;let O=nc(t.state.field(Ai).diagnostics,e);O&&s.apply(t,O.from,O.to)},{name:d}=s,p=r[a]?d.indexOf(r[a]):-1,m=p<0?d:[d.slice(0,p),Mt("u",d.slice(p,p+1)),d.slice(p+1)],v=s.markClass?" "+s.markClass:"";return Mt("button",{type:"button",class:"cm-diagnosticAction"+v,onclick:f,onmousedown:f,"aria-label":` Action: ${d}${p<0?"":` (access key "${r[a]})"`}.`},m)}),e.source&&Mt("div",{class:"cm-diagnosticSource"},e.source))}class CH extends io{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Mt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class O2{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=BD(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class bf{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)v2(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],a=$D(s.actions);for(let c=0;c<a.length;c++)if(a[c].toUpperCase().charCodeAt(0)==r.keyCode){let f=nc(this.view.state.field(Ai).diagnostics,s);f&&s.actions[c].apply(e,f.from,f.to)}}else return;r.preventDefault()},i=r=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(r.target)&&this.moveSelection(s)};this.list=Mt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:i}),this.dom=Mt("div",{class:"cm-panel-lint"},this.list,Mt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>v2(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ai).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Ai),i=0,r=!1,s=null,a=new Set;for(e.between(0,this.view.state.doc.length,(c,f,{spec:d})=>{for(let p of d.diagnostics){if(a.has(p))continue;a.add(p);let m=-1,v;for(let b=i;b<this.items.length;b++)if(this.items[b].diagnostic==p){m=b;break}m<0?(v=new O2(this.view,p),this.items.splice(i,0,v),r=!0):(v=this.items[m],m>i&&(this.items.splice(i,m-i),r=!0)),n&&v.diagnostic==n.diagnostic?v.dom.hasAttribute("aria-selected")||(v.dom.setAttribute("aria-selected","true"),s=v):v.dom.hasAttribute("aria-selected")&&v.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new O2(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:c,panel:f})=>{let d=f.height/this.list.offsetHeight;c.top<f.top?this.list.scrollTop-=(f.top-c.top)/d:c.bottom>f.bottom&&(this.list.scrollTop+=(c.bottom-f.bottom)/d)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ai),i=nc(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:zD.of(i)})}static open(e){return new bf(e)}}function TH(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Pd(t){return TH(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const kH=de.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Pd("#d11")},".cm-lintRange-warning":{backgroundImage:Pd("orange")},".cm-lintRange-info":{backgroundImage:Pd("#999")},".cm-lintRange-hint":{backgroundImage:Pd("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function EH(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function AH(t){let e="hint",n=1;for(let i of t){let r=EH(i.severity);r>n&&(n=r,e=i.severity)}return e}const RH=[Ai,de.decorations.compute([Ai],t=>{let{selected:e,panel:n}=t.field(Ai);return!e||!n||e.from==e.to?Te.none:Te.set([bH.range(e.from,e.to)])}),T8(OH,{hideOn:yH}),kH],S2=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ic{constructor(e,n,i=0,r=e.length,s,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?c=>s(S2(c)):S2,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ai(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=vO(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ir(e);let r=this.normalize(n);if(r.length)for(let s=0,a=i;;s++){let c=r.charCodeAt(s),f=this.match(c,a,this.bufferPos+this.bufferStart);if(s==r.length-1){if(f)return this.value=f,this;break}a==i&&s<n.length&&n.charCodeAt(s)==c&&a++}}}match(e,n,i){let r=null;for(let s=0;s<this.matches.length;s+=2){let a=this.matches[s],c=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?r={from:this.matches[s+1],to:i}:(this.matches[s]++,c=!0)),c||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:i}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(ic.prototype[Symbol.iterator]=function(){return this});const jD={from:-1,to:-1,match:/.*/.exec("")},h1="gm"+(/x/.unicode==null?"":"u");class QD{constructor(e,n,i,r=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=jD,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new LD(e,n,i,r,s);this.re=new RegExp(n,h1+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=Ip(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=Ip(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Xy=new WeakMap;class _a{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,i){let r=Xy.get(e);if(!r||r.from>=i||r.to<=n){let c=new _a(n,e.sliceString(n,i));return Xy.set(e,c),c}if(r.from==n&&r.to==i)return r;let{text:s,from:a}=r;return a>n&&(s=e.sliceString(n,a)+s,a=n),r.to<i&&(s+=e.sliceString(r.to,i)),Xy.set(e,new _a(a,s)),new _a(n,s.slice(n-a,i-a))}}class LD{constructor(e,n,i,r,s){this.text=e,this.to=s,this.done=!1,this.value=jD,this.matchPos=Ip(e,r),this.re=new RegExp(n,h1+(i?.ignoreCase?"i":"")),this.test=i?.test,this.flat=_a.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=Ip(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_a.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(QD.prototype[Symbol.iterator]=LD.prototype[Symbol.iterator]=function(){return this});function MH(t){try{return new RegExp(t,h1),!0}catch{return!1}}function Ip(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}function Tb(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=Mt("input",{class:"cm-textfield",name:"line",value:e}),i=Mt("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:Iu.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},Mt("label",t.state.phrase("Go to line"),": ",n)," ",Mt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),Mt("button",{name:"close",onclick:()=>{t.dispatch({effects:Iu.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:a}=t,c=a.doc.lineAt(a.selection.main.head),[,f,d,p,m]=s,v=p?+p.slice(1):0,b=d?+d:c.number;if(d&&m){let C=b/100;f&&(C=C*(f=="-"?-1:1)+c.number/a.doc.lines),b=Math.round(a.doc.lines*C)}else d&&f&&(b=b*(f=="-"?-1:1)+c.number);let O=a.doc.line(Math.max(1,Math.min(a.doc.lines,b))),x=ue.cursor(O.from+Math.max(0,Math.min(v,O.length)));t.dispatch({effects:[Iu.of(!1),de.scrollIntoView(x.from,{y:"center"})],selection:x}),t.focus()}return{dom:i}}const Iu=ze.define(),x2=kn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Iu)&&(t=n.value);return t},provide:t=>uf.from(t,e=>e?Tb:null)}),DH=t=>{let e=cf(t,Tb);if(!e){let n=[Iu.of(!0)];t.state.field(x2,!1)==null&&n.push(ze.appendConfig.of([x2,PH])),t.dispatch({effects:n}),e=cf(t,Tb)}return e&&e.dom.querySelector("input").select(),!0},PH=de.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),zH={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},$H=be.define({combine(t){return no(t,zH,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function d1(t){return[NH,LH]}const BH=Te.mark({class:"cm-selectionMatch"}),jH=Te.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function w2(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=It.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=It.Word)}function QH(t,e,n,i){return t(e.sliceDoc(n,n+1))==It.Word&&t(e.sliceDoc(i-1,i))==It.Word}const LH=Jt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet($H),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Te.none;let r=i.main,s,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return Te.none;let f=n.wordAt(r.head);if(!f)return Te.none;a=n.charCategorizer(r.head),s=n.sliceDoc(f.from,f.to)}else{let f=r.to-r.from;if(f<e.minSelectionLength||f>200)return Te.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(w2(a,n,r.from,r.to)&&QH(a,n,r.from,r.to)))return Te.none}else if(s=n.sliceDoc(r.from,r.to),!s)return Te.none}let c=[];for(let f of t.visibleRanges){let d=new ic(n.doc,s,f.from,f.to);for(;!d.next().done;){let{from:p,to:m}=d.value;if((!a||w2(a,n,p,m))&&(r.empty&&p<=r.from&&m>=r.to?c.push(jH.range(p,m)):(p>=r.to||m<=r.from)&&c.push(BH.range(p,m)),c.length>e.maxMatches))return Te.none}}return Te.set(c)}},{decorations:t=>t.decorations}),NH=de.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),_H=({state:t,dispatch:e})=>{let{selection:n}=t,i=ue.create(n.ranges.map(r=>t.wordAt(r.head)||ue.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function qH(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let a=!1,c=new ic(t.doc,e,i[i.length-1].to);;)if(c.next(),c.done){if(a)return null;c=new ic(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(f=>f.from==c.value.from))continue;if(s){let f=t.wordAt(c.value.from);if(!f||f.from!=c.value.from||f.to!=c.value.to)continue}return c.value}}const UH=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return _H({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=qH(t,i);return r?(e(t.update({selection:t.selection.addRange(ue.range(r.from,r.to),!1),effects:de.scrollIntoView(r.to)})),!0):!1},dc=be.define({combine(t){return no(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new JH(e),scrollToMatch:e=>de.scrollIntoView(e)})}});class ND{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||MH(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?`
|
|
149
|
-
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new WH(this):new HH(this)}getCursor(e,n=0,i){let r=e.doc?e:Ye.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Ta(this,r,n,i):Ca(this,r,n,i)}}class _D{constructor(e){this.spec=e}}function Ca(t,e,n,i){return new ic(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?IH(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function IH(t,e){return(n,i,r,s)=>((s>n||s+r.length<i)&&(s=Math.max(0,n-2),r=t.sliceString(s,Math.min(t.length,i+2))),(e(Hp(r,n-s))!=It.Word||e(Vp(r,n-s))!=It.Word)&&(e(Vp(r,i-s))!=It.Word||e(Hp(r,i-s))!=It.Word))}class HH extends _D{constructor(e){super(e)}nextMatch(e,n,i){let r=Ca(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);r=Ca(this.spec,e,0,s).nextOverlapping()}return r.done||r.value.from==n&&r.value.to==i?null:r.value}prevMatchInRange(e,n,i){for(let r=i;;){let s=Math.max(n,r-1e4-this.spec.unquoted.length),a=Ca(this.spec,e,s,r),c=null;for(;!a.nextOverlapping().done;)c=a.value;if(c)return c;if(s==n)return null;r-=1e4}}prevMatch(e,n,i){let r=this.prevMatchInRange(e,0,n);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=n||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let i=Ca(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=Ca(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function Ta(t,e,n,i){return new QD(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?VH(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function Hp(t,e){return t.slice(Ln(t,e,!1),e)}function Vp(t,e){return t.slice(e,Ln(t,e))}function VH(t){return(e,n,i)=>!i[0].length||(t(Hp(i.input,i.index))!=It.Word||t(Vp(i.input,i.index))!=It.Word)&&(t(Vp(i.input,i.index+i[0].length))!=It.Word||t(Hp(i.input,i.index+i[0].length))!=It.Word)}class WH extends _D{nextMatch(e,n,i){let r=Ta(this.spec,e,i,e.doc.length).next();return r.done&&(r=Ta(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),a=Ta(this.spec,e,s,i),c=null;for(;!a.next().done;)c=a.value;if(c&&(s==n||c.from>s+10))return c;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s<e.match.length)return e.match[s]+i.slice(r)}return n})}matchAll(e,n){let i=Ta(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=Ta(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const Of=ze.define(),p1=ze.define(),ks=kn.define({create(t){return new Gy(kb(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Of)?t=new Gy(n.value.create(),t.panel):n.is(p1)&&(t=new Gy(t.query,n.value?m1:null));return t},provide:t=>uf.from(t,e=>e.panel)});class Gy{constructor(e,n){this.query=e,this.panel=n}}const XH=Te.mark({class:"cm-searchMatch"}),GH=Te.mark({class:"cm-searchMatch cm-searchMatch-selected"}),FH=Jt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(ks))}update(t){let e=t.state.field(ks);(e!=t.startState.field(ks)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Te.none;let{view:n}=this,i=new Jr;for(let r=0,s=n.visibleRanges,a=s.length;r<a;r++){let{from:c,to:f}=s[r];for(;r<a-1&&f>s[r+1].from-500;)f=s[++r].to;t.highlight(n.state,c,f,(d,p)=>{let m=n.state.selection.ranges.some(v=>v.from==d&&v.to==p);i.add(d,p,m?GH:XH)})}return i.finish()}},{decorations:t=>t.decorations});function If(t){return e=>{let n=e.state.field(ks,!1);return n&&n.query.spec.valid?t(e,n):ID(e)}}const Wp=If((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=ue.single(i.from,i.to),s=t.state.facet(dc);return t.dispatch({selection:r,effects:[g1(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),UD(t),!0}),Xp=If((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=ue.single(r.from,r.to),a=t.state.facet(dc);return t.dispatch({selection:s,effects:[g1(t,r),a.scrollToMatch(s.main,t)],userEvent:"select.search"}),UD(t),!0}),YH=If((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ue.create(n.map(i=>ue.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),KH=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let c=new ic(t.doc,t.sliceDoc(i,r));!c.next().done;){if(s.length>1e3)return!1;c.value.from==i&&(a=s.length),s.push(ue.range(c.value.from,c.value.to))}return e(t.update({selection:ue.create(s,a),userEvent:"select.search.matches"})),!0},C2=If((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let a=s,c=[],f,d,p=[];a.from==i&&a.to==r&&(d=n.toText(e.getReplacement(a)),c.push({from:a.from,to:a.to,insert:d}),a=e.nextMatch(n,a.from,a.to),p.push(de.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let m=t.state.changes(c);return a&&(f=ue.single(a.from,a.to).map(m),p.push(g1(t,a)),p.push(n.facet(dc).scrollToMatch(f.main,t))),t.dispatch({changes:m,selection:f,effects:p,userEvent:"input.replace"}),!0}),ZH=If((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:a}=r;return{from:s,to:a,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:de.announce.of(i),userEvent:"input.replace.all"}),!0});function m1(t){return t.state.facet(dc).createPanel(t)}function kb(t,e){var n,i,r,s,a;let c=t.selection.main,f=c.empty||c.to>c.from+100?"":t.sliceDoc(c.from,c.to);if(e&&!f)return e;let d=t.facet(dc);return new ND({search:((n=e?.literal)!==null&&n!==void 0?n:d.literal)?f:f.replace(/\n/g,"\\n"),caseSensitive:(i=e?.caseSensitive)!==null&&i!==void 0?i:d.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:d.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:d.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:d.wholeWord})}function qD(t){let e=cf(t,m1);return e&&e.dom.querySelector("[main-field]")}function UD(t){let e=qD(t);e&&e==t.root.activeElement&&e.select()}const ID=t=>{let e=t.state.field(ks,!1);if(e&&e.panel){let n=qD(t);if(n&&n!=t.root.activeElement){let i=kb(t.state,e.query.spec);i.valid&&t.dispatch({effects:Of.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[p1.of(!0),e?Of.of(kb(t.state,e.query.spec)):ze.appendConfig.of(tV)]});return!0},HD=t=>{let e=t.state.field(ks,!1);if(!e||!e.panel)return!1;let n=cf(t,m1);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:p1.of(!1)}),!0},VD=[{key:"Mod-f",run:ID,scope:"editor search-panel"},{key:"F3",run:Wp,shift:Xp,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wp,shift:Xp,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:HD,scope:"editor search-panel"},{key:"Mod-Shift-l",run:KH},{key:"Mod-Alt-g",run:DH},{key:"Mod-d",run:UH,preventDefault:!0}];class JH{constructor(e){this.view=e;let n=this.query=e.state.field(ks).query.spec;this.commit=this.commit.bind(this),this.searchField=Mt("input",{value:n.search,placeholder:Ci(e,"Find"),"aria-label":Ci(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Mt("input",{value:n.replace,placeholder:Ci(e,"Replace"),"aria-label":Ci(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Mt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Mt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Mt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,a){return Mt("button",{class:"cm-button",name:r,onclick:s,type:"button"},a)}this.dom=Mt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Wp(e),[Ci(e,"next")]),i("prev",()=>Xp(e),[Ci(e,"previous")]),i("select",()=>YH(e),[Ci(e,"all")]),Mt("label",null,[this.caseField,Ci(e,"match case")]),Mt("label",null,[this.reField,Ci(e,"regexp")]),Mt("label",null,[this.wordField,Ci(e,"by word")]),...e.state.readOnly?[]:[Mt("br"),this.replaceField,i("replace",()=>C2(e),[Ci(e,"replace")]),i("replaceAll",()=>ZH(e),[Ci(e,"replace all")])],Mt("button",{name:"close",onclick:()=>HD(e),"aria-label":Ci(e,"close"),type:"button"},["×"])])}commit(){let e=new ND({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Of.of(e)}))}keydown(e){q6(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Xp:Wp)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),C2(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(Of)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(dc).top}}function Ci(t,e){return t.state.phrase(e)}const zd=30,$d=/[\s\.,:;?!]/;function g1(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-zd),a=Math.min(r,n+zd),c=t.state.sliceDoc(s,a);if(s!=i.from){for(let f=0;f<zd;f++)if(!$d.test(c[f+1])&&$d.test(c[f])){c=c.slice(f);break}}if(a!=r){for(let f=c.length-1;f>c.length-zd;f--)if(!$d.test(c[f-1])&&$d.test(c[f])){c=c.slice(0,f);break}}return de.announce.of(`${t.state.phrase("current match")}. ${c} ${t.state.phrase("on line")} ${i.number}.`)}const eV=de.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),tV=[ks,Zr.low(FH),eV],nV="#e5c07b",T2="#e06c75",iV="#56b6c2",rV="#ffffff",dp="#abb2bf",Eb="#7d8799",oV="#61afef",sV="#98c379",k2="#d19a66",lV="#c678dd",aV="#21252b",E2="#2c313a",A2="#282c34",Fy="#353a42",cV="#3E4451",R2="#528bff",uV=de.theme({"&":{color:dp,backgroundColor:A2},".cm-content":{caretColor:R2},".cm-cursor, .cm-dropCursor":{borderLeftColor:R2},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:cV},".cm-panels":{backgroundColor:aV,color:dp},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:A2,color:Eb,border:"none"},".cm-activeLineGutter":{backgroundColor:E2},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Fy},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Fy,borderBottomColor:Fy},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:E2,color:dp}}},{dark:!0}),fV=_f.define([{tag:J.keyword,color:lV},{tag:[J.name,J.deleted,J.character,J.propertyName,J.macroName],color:T2},{tag:[J.function(J.variableName),J.labelName],color:oV},{tag:[J.color,J.constant(J.name),J.standard(J.name)],color:k2},{tag:[J.definition(J.name),J.separator],color:dp},{tag:[J.typeName,J.className,J.number,J.changed,J.annotation,J.modifier,J.self,J.namespace],color:nV},{tag:[J.operator,J.operatorKeyword,J.url,J.escape,J.regexp,J.link,J.special(J.string)],color:iV},{tag:[J.meta,J.comment],color:Eb},{tag:J.strong,fontWeight:"bold"},{tag:J.emphasis,fontStyle:"italic"},{tag:J.strikethrough,textDecoration:"line-through"},{tag:J.link,color:Eb,textDecoration:"underline"},{tag:J.heading,fontWeight:"bold",color:T2},{tag:[J.atom,J.bool,J.special(J.variableName)],color:k2},{tag:[J.processingInstruction,J.string,J.inserted],color:sV},{tag:J.invalid,color:rV}]),WD=[uV,IO(fV)];var M2=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(e1)),e.defaultKeymap!==!1&&(i=i.concat(s1)),e.searchKeymap!==!1&&(i=i.concat(VD)),e.historyKeymap!==!1&&(i=i.concat(r1)),e.foldKeymap!==!1&&(i=i.concat(UO)),e.completionKeymap!==!1&&(i=i.concat(km)),e.lintKeymap!==!1&&(i=i.concat(f1));var r=[];return e.lineNumbers!==!1&&r.push(GM()),e.highlightActiveLineGutter!==!1&&r.push(L8()),e.highlightSpecialChars!==!1&&r.push(PO()),e.history!==!1&&r.push(V5()),e.foldGutter!==!1&&r.push(g5()),e.drawSelection!==!1&&r.push(DO()),e.dropCursor!==!1&&r.push(qM()),e.allowMultipleSelections!==!1&&r.push(Ye.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(l5()),e.syntaxHighlighting!==!1&&r.push(IO(HO,{fallback:!0})),e.bracketMatching!==!1&&r.push(S5()),e.closeBrackets!==!1&&r.push(L5()),e.autocompletion!==!1&&r.push(t1()),e.rectangularSelection!==!1&&r.push(UM()),n!==!1&&r.push(y8()),e.highlightActiveLine!==!1&&r.push(l8()),e.highlightSelectionMatches!==!1&&r.push(d1()),e.tabSize&&typeof e.tabSize=="number"&&r.push(Lf.of(" ".repeat(e.tabSize))),r.concat([No.of(i.flat())]).filter(Boolean)},hV=de.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),dV=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:i=!0,readOnly:r=!1,theme:s="light",placeholder:a="",basicSetup:c=!0}=e,f=[];switch(n&&f.unshift(No.of([VU])),c&&(typeof c=="boolean"?f.unshift(M2()):f.unshift(M2(c))),a&&f.unshift(f8(a)),s){case"light":f.push(hV);break;case"dark":f.push(WD);break;case"none":break;default:f.push(s);break}return i===!1&&f.push(de.editable.of(!1)),r&&f.push(Ye.readOnly.of(!0)),[...f]},pV=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class mV{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class D2{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Yy=null,gV=()=>typeof window>"u"?new D2:(Yy||(Yy=new D2),Yy),P2=to.define(),yV=200,vV=[];function bV(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:s,onUpdate:a,extensions:c=vV,autoFocus:f,theme:d="light",height:p=null,minHeight:m=null,maxHeight:v=null,width:b=null,minWidth:O=null,maxWidth:x=null,placeholder:C="",editable:k=!0,readOnly:$=!1,indentWithTab:z=!0,basicSetup:D=!0,root:R,initialState:B}=t,[M,j]=E.useState(),[N,A]=E.useState(),[Q,T]=E.useState(),U=E.useState(()=>({current:null}))[0],q=E.useState(()=>({current:null}))[0],V=de.theme({"&":{height:p,minHeight:m,maxHeight:v,width:b,minWidth:O,maxWidth:x},"& .cm-scroller":{height:"100% !important"}}),L=de.updateListener.of(K=>{if(K.docChanged&&typeof i=="function"&&!K.transactions.some(G=>G.annotation(P2))){U.current?U.current.reset():(U.current=new mV(()=>{if(q.current){var G=q.current;q.current=null,G()}U.current=null},yV),gV().add(U.current));var le=K.state.doc,_=le.toString();i(_,K)}r&&r(pV(K))}),X=dV({theme:d,editable:k,readOnly:$,placeholder:C,indentWithTab:z,basicSetup:D}),Y=[L,V,...X];return a&&typeof a=="function"&&Y.push(de.updateListener.of(a)),Y=Y.concat(c),E.useLayoutEffect(()=>{if(M&&!Q){var K={doc:e,selection:n,extensions:Y},le=B?Ye.fromJSON(B.json,K,B.fields):Ye.create(K);if(T(le),!N){var _=new de({state:le,parent:M,root:R});A(_),s&&s(_,le)}}return()=>{N&&(T(void 0),A(void 0))}},[M,Q]),E.useEffect(()=>{t.container&&j(t.container)},[t.container]),E.useEffect(()=>()=>{N&&(N.destroy(),A(void 0)),U.current&&(U.current.cancel(),U.current=null)},[N]),E.useEffect(()=>{f&&N&&N.focus()},[f,N]),E.useEffect(()=>{N&&N.dispatch({effects:ze.reconfigure.of(Y)})},[d,c,p,m,v,b,O,x,C,k,$,z,D,i,a]),E.useEffect(()=>{if(e!==void 0){var K=N?N.state.doc.toString():"";if(N&&e!==K){var le=U.current&&!U.current.isDone,_=()=>{N&&e!==N.state.doc.toString()&&N.dispatch({changes:{from:0,to:N.state.doc.toString().length,insert:e||""},annotations:[P2.of(!0)]})};le?q.current=_:_()}}},[e,N]),{state:Q,setState:T,view:N,setView:A,container:M,setContainer:j}}var OV=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Gp=E.forwardRef((t,e)=>{var{className:n,value:i="",selection:r,extensions:s=[],onChange:a,onStatistics:c,onCreateEditor:f,onUpdate:d,autoFocus:p,theme:m="light",height:v,minHeight:b,maxHeight:O,width:x,minWidth:C,maxWidth:k,basicSetup:$,placeholder:z,indentWithTab:D,editable:R,readOnly:B,root:M,initialState:j}=t,N=lO(t,OV),A=E.useRef(null),{state:Q,view:T,container:U,setContainer:q}=bV({root:M,value:i,autoFocus:p,theme:m,height:v,minHeight:b,maxHeight:O,width:x,minWidth:C,maxWidth:k,basicSetup:$,placeholder:z,indentWithTab:D,editable:R,readOnly:B,selection:r,onChange:a,onStatistics:c,onCreateEditor:f,onUpdate:d,extensions:s,initialState:j});E.useImperativeHandle(e,()=>({editor:A.current,state:Q,view:T}),[A,U,Q,T]);var V=E.useCallback(X=>{A.current=X,q(X)},[q]);if(typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var L=typeof m=="string"?"cm-theme-"+m:"cm-theme";return S.jsx("div",Wu({ref:V,className:""+L+(n?" "+n:"")},N))});Gp.displayName="CodeMirror";const SV=.2,Bd=.8,xV=.5,wV=de.baseTheme({"& .cm-context-top":{borderTop:`1px solid rgba(0, 0, 0, ${Bd})`},"& .cm-context-bottom":{borderBottom:`1px solid rgba(0, 0, 0, ${Bd})`},"& .cm-context":{backgroundColor:`rgba(0, 0, 0, ${SV})`,borderRight:`1px solid rgba(0, 0, 0, ${Bd})`,borderLeft:`1px solid rgba(0, 0, 0, ${Bd})`},"& .cm-context-active":{backgroundColor:`rgba(0, 0, 0, ${xV})`}}),XD=be.define({combine:t=>t.reduce((e,n)=>({active:n.active,first:Math.min(n.first,e.first),last:Math.max(n.last,e.last)}),{active:0,first:1/0,last:0})}),CV=Te.line({attributes:{class:"cm-context-active"}}),TV=Te.line({attributes:{class:"cm-context"}}),kV=Te.line({attributes:{class:"cm-context-top"}}),EV=Te.line({attributes:{class:"cm-context-bottom"}});function z2(t){let{active:e,first:n,last:i}=t.state.facet(XD),r=new Jr;for(let{from:s,to:a}of t.visibleRanges)for(let c=s;c<=a;){let f=t.state.doc.lineAt(c);f.number>=n&&f.number<=i&&(r.add(f.from,f.from,TV),f.number===n&&r.add(f.from,f.from,kV),f.number===i&&r.add(f.from,f.from,EV)),f.number===e&&r.add(f.from,f.from,CV),c=f.to+1}return r.finish()}const AV=Jt.fromClass(class{constructor(t){this.decorations=z2(t)}update(t){this.decorations=z2(t.view)}},{decorations:t=>t.decorations});function RV({active:t,first:e,last:n}){return[wV,XD.of({active:t,first:e,last:n}),AV]}const GD=de.theme({"& .cm-lineWrapping":{wordBreak:"break-all"}}),MV=de.theme({"&,& .cm-content":{fontFamily:'"Fira Code", monospace'},"& .cm-cursor":{display:"none !important"}}),DV=[GM(),PO(),g5(),DO(),d1(),No.of([...e1,...s1,...VD,...r1,...UO,...km,...f1]),Ye.readOnly.of(!0),de.lineWrapping,GD,MV,c1()];function PV({currentFile:t}){const e=Ls(),n=Ut(p=>p.files),{absoluteFilename:i,lineNumber:r,firstFunctionLineNumber:s,lastFunctionLineNumber:a}=t,c=E.useRef(),f=n[i];E.useEffect(()=>{i&&typeof f>"u"&&e(OB(i))},[e,n,i,f]);const d=E.useMemo(()=>[...DV,RV({active:r,first:s,last:a})],[r,s,a]);return E.useEffect(()=>{let p=null;if(f&&c.current){const m=()=>{if(c.current.view){const v=f.split(`
|
|
150
|
-
`).slice(0,r-1).join(`
|
|
151
|
-
`).length,{view:b}=c.current;b.dispatch(b.state.update({effects:de.scrollIntoView(v,{y:"center"})}))}else p=setTimeout(()=>{p=null,m()},10)};m()}return()=>{p&&clearTimeout(p)}},[f,r]),S.jsx(Gp,{ref:c,style:{flex:1},basicSetup:!1,theme:WD,height:"100%",extensions:d,value:f||""})}function $2(t){return t.substring(2).toLowerCase()}function zV(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function $V(t){const{children:e,disableReactTree:n=!1,mouseEvent:i="onClick",onClickAway:r,touchEvent:s="onTouchEnd"}=t,a=E.useRef(!1),c=E.useRef(null),f=E.useRef(!1),d=E.useRef(!1);E.useEffect(()=>(setTimeout(()=>{f.current=!0},0),()=>{f.current=!1}),[]);const p=pn(zl(e),c),m=er(O=>{const x=d.current;d.current=!1;const C=In(c.current);if(!f.current||!c.current||"clientX"in O&&zV(O,C))return;if(a.current){a.current=!1;return}let k;O.composedPath?k=O.composedPath().includes(c.current):k=!C.documentElement.contains(O.target)||c.current.contains(O.target),!k&&(n||!x)&&r(O)}),v=O=>x=>{d.current=!0;const C=e.props[O];C&&C(x)},b={ref:p};return s!==!1&&(b[s]=v(s)),E.useEffect(()=>{if(s!==!1){const O=$2(s),x=In(c.current),C=()=>{a.current=!0};return x.addEventListener(O,m),x.addEventListener("touchmove",C),()=>{x.removeEventListener(O,m),x.removeEventListener("touchmove",C)}}},[m,s]),i!==!1&&(b[i]=v(i)),E.useEffect(()=>{if(i!==!1){const O=$2(i),x=In(c.current);return x.addEventListener(O,m),()=>{x.removeEventListener(O,m)}}},[m,i]),E.cloneElement(e,b)}const B2=(t,e)=>{if(!e||!e.getBoundingClientRect)return null;const{x:n,y:i}=e.getBoundingClientRect(),r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY;return{x:r-n,y:s-i}};function BV({children:t,vertical:e}){const[n,i]=E.useState(50),[r,s]=E.useState(null),a=E.useRef(),c=E.useCallback(p=>{s(B2(p,a.current))},[]),f=E.useCallback(p=>{if(!r)return;const m=B2(p,a.current);if(!m)return null;const{width:v,height:b}=a.current.getBoundingClientRect();i(Math.min(100,Math.max(0,(e?m.x/v:m.y/b)*100)))},[r,e]),d=E.useCallback(()=>{s(null)},[]);return Ei.Children.count(t)!==2||!Ei.Children.map(t,p=>!!p).every(p=>p)?t:S.jsxs(rt,{ref:a,sx:{display:"flex",flex:1,minHeight:0,flexDirection:e?"row":"column"},onTouchMove:f,onMouseMove:f,onTouchEnd:d,onMouseUp:d,children:[S.jsx(rt,{style:{[e?"width":"height"]:`${n}%`,display:"flex",minHeight:0,minWidth:0,overflow:"hidden"},children:t[0]}),S.jsx($V,{onClickAway:d,children:S.jsx(rt,{sx:p=>({backgroundColor:p.palette.text.primary,minWidth:"6px",minHeight:"6px",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",cursor:e?"ew-resize":"ns-resize","&::before":{display:"block",content:"''",background:p.palette.background.paper,borderRadius:"15%",width:e?.5:.05,height:e?.05:.5}}),onTouchStart:c,onMouseDown:c})}),S.jsx(rt,{style:{display:"flex",minHeight:0,minWidth:0,overflow:"hidden",flex:1},children:t[1]})]})}function jV(t){return Qe("MuiTypography",t)}const Fp=Le("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),QV={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},LV=HQ(),NV=t=>{const{align:e,gutterBottom:n,noWrap:i,paragraph:r,variant:s,classes:a}=t,c={root:["root",s,t.align!=="inherit"&&`align${pe(e)}`,n&&"gutterBottom",i&&"noWrap",r&&"paragraph"]};return _e(c,jV,a)},_V=ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${pe(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(We(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,n])=>e!=="inherit"&&n&&typeof n=="object").map(([e,n])=>({props:{variant:e},style:n})),...Object.entries(t.palette).filter(gr()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${pe(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),j2={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Et=E.forwardRef(function(e,n){const{color:i,...r}=je({props:e,name:"MuiTypography"}),s=!QV[i],a=LV({...r,...s&&{color:i}}),{align:c="inherit",className:f,component:d,gutterBottom:p=!1,noWrap:m=!1,paragraph:v=!1,variant:b="body1",variantMapping:O=j2,...x}=a,C={...a,align:c,color:i,className:f,component:d,gutterBottom:p,noWrap:m,paragraph:v,variant:b,variantMapping:O},k=d||(v?"p":O[b]||j2[b])||"span",$=NV(C);return S.jsx(_V,{as:k,ref:n,className:ye($.root,f),...x,ownerState:C,style:{...c!=="inherit"&&{"--Typography-textAlign":c},...x.style}})});function Q2(...t){return t.reduce((e,n)=>n==null?e:function(...r){e.apply(this,r),n.apply(this,r)},()=>{})}function qV(t){return Qe("MuiSvgIcon",t)}Le("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const UV=t=>{const{color:e,fontSize:n,classes:i}=t,r={root:["root",e!=="inherit"&&`color${pe(e)}`,`fontSize${pe(n)}`]};return _e(r,qV,i)},IV=ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${pe(n.color)}`],e[`fontSize${pe(n.fontSize)}`]]}})(We(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:t.transitions?.create?.("fill",{duration:(t.vars??t).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:t.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:t.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,e])=>e&&e.main).map(([e])=>({props:{color:e},style:{color:(t.vars??t).palette?.[e]?.main}})),{props:{color:"action"},style:{color:(t.vars??t).palette?.action?.active}},{props:{color:"disabled"},style:{color:(t.vars??t).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Ab=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiSvgIcon"}),{children:r,className:s,color:a="inherit",component:c="svg",fontSize:f="medium",htmlColor:d,inheritViewBox:p=!1,titleAccess:m,viewBox:v="0 0 24 24",...b}=i,O=E.isValidElement(r)&&r.type==="svg",x={...i,color:a,component:c,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:p,viewBox:v,hasSvgAsChild:O},C={};p||(C.viewBox=v);const k=UV(x);return S.jsxs(IV,{as:c,className:ye(k.root,s),focusable:"false",color:d,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...C,...b,...O&&r.props,ownerState:x,children:[O?r.props.children:r,m?S.jsx("title",{children:m}):null]})});Ab.muiName="SvgIcon";function yt(t,e){function n(i,r){return S.jsx(Ab,{"data-testid":void 0,ref:r,...i,children:t})}return n.muiName=Ab.muiName,E.memo(E.forwardRef(n))}function zm(t,e=166){let n;function i(...r){const s=()=>{t.apply(this,r)};clearTimeout(n),n=setTimeout(s,e)}return i.clear=()=>{clearTimeout(n)},i}function Sr(t){return In(t).defaultView||window}function HV(t,e){const n=t.charCodeAt(2);return t[0]==="o"&&t[1]==="n"&&n>=65&&n<=90&&typeof e=="function"}function FD(t,e){if(!t)return e;function n(a,c){const f={};return Object.keys(c).forEach(d=>{HV(d,c[d])&&typeof a[d]=="function"&&(f[d]=(...p)=>{a[d](...p),c[d](...p)})}),f}if(typeof t=="function"||typeof e=="function")return a=>{const c=typeof e=="function"?e(a):e,f=typeof t=="function"?t({...a,...c}):t,d=ye(a?.className,c?.className,f?.className),p=n(f,c);return{...c,...f,...p,...!!d&&{className:d},...c?.style&&f?.style&&{style:{...c.style,...f.style}},...c?.sx&&f?.sx&&{sx:[...Array.isArray(c.sx)?c.sx:[c.sx],...Array.isArray(f.sx)?f.sx:[f.sx]]}}};const i=e,r=n(t,i),s=ye(i?.className,t?.className);return{...e,...t,...r,...!!s&&{className:s},...i?.style&&t?.style&&{style:{...i.style,...t.style}},...i?.sx&&t?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const YD=yt(S.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"})),VV=yt(S.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),Sf=yt(S.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),WV=yt(S.jsx("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M15 19l-6-2.11V5l6 2.11z"})),XV=yt(S.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"})),GV=yt(S.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}));function FV(t){return Qe("MuiCard",t)}Le("MuiCard",["root"]);const YV=t=>{const{classes:e}=t;return _e({root:["root"]},FV,e)},KV=ge(cc,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),KD=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiCard"}),{className:r,raised:s=!1,...a}=i,c={...i,raised:s},f=YV(c);return S.jsx(KV,{className:ye(f.root,r),elevation:s?8:void 0,ref:n,ownerState:c,...a})});function ZV(t){return Qe("MuiCardContent",t)}Le("MuiCardContent",["root"]);const JV=t=>{const{classes:e}=t;return _e({root:["root"]},ZV,e)},e7=ge("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),t7=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiCardContent"}),{className:r,component:s="div",...a}=i,c={...i,component:s},f=JV(c);return S.jsx(e7,{as:s,className:ye(f.root,r),ownerState:c,ref:n,...a})});function n7(t){return Qe("MuiCardHeader",t)}const Yp=Le("MuiCardHeader",["root","avatar","action","content","title","subheader"]),i7=t=>{const{classes:e}=t;return _e({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},n7,e)},r7=ge("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(t,e)=>[{[`& .${Yp.title}`]:e.title},{[`& .${Yp.subheader}`]:e.subheader},e.root]})({display:"flex",alignItems:"center",padding:16}),o7=ge("div",{name:"MuiCardHeader",slot:"Avatar"})({display:"flex",flex:"0 0 auto",marginRight:16}),s7=ge("div",{name:"MuiCardHeader",slot:"Action"})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),l7=ge("div",{name:"MuiCardHeader",slot:"Content"})({flex:"1 1 auto",[`.${Fp.root}:where(& .${Yp.title})`]:{display:"block"},[`.${Fp.root}:where(& .${Yp.subheader})`]:{display:"block"}}),ZD=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiCardHeader"}),{action:r,avatar:s,component:a="div",disableTypography:c=!1,subheader:f,subheaderTypographyProps:d,title:p,titleTypographyProps:m,slots:v={},slotProps:b={},...O}=i,x={...i,component:a,disableTypography:c},C=i7(x),k={slots:v,slotProps:{title:m,subheader:d,...b}};let $=p;const[z,D]=Ie("title",{className:C.title,elementType:Et,externalForwardedProps:k,ownerState:x,additionalProps:{variant:s?"body2":"h5",component:"span"}});$!=null&&$.type!==Et&&!c&&($=S.jsx(z,{...D,children:$}));let R=f;const[B,M]=Ie("subheader",{className:C.subheader,elementType:Et,externalForwardedProps:k,ownerState:x,additionalProps:{variant:s?"body2":"body1",color:"textSecondary",component:"span"}});R!=null&&R.type!==Et&&!c&&(R=S.jsx(B,{...M,children:R}));const[j,N]=Ie("root",{ref:n,className:C.root,elementType:r7,externalForwardedProps:{...k,...O,component:a},ownerState:x}),[A,Q]=Ie("avatar",{className:C.avatar,elementType:o7,externalForwardedProps:k,ownerState:x}),[T,U]=Ie("content",{className:C.content,elementType:l7,externalForwardedProps:k,ownerState:x}),[q,V]=Ie("action",{className:C.action,elementType:s7,externalForwardedProps:k,ownerState:x});return S.jsxs(j,{...N,children:[s&&S.jsx(A,{...Q,children:s}),S.jsxs(T,{...U,children:[$,R]}),r&&S.jsx(q,{...V,children:r})]})}),a7=yt(S.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"}));class Kp{static create(){return new Kp}static use(){const e=JA(Kp.create).current,[n,i]=E.useState(!1);return e.shouldMount=n,e.setShouldMount=i,E.useEffect(e.mountEffect,[n]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=u7(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function c7(){return Kp.use()}function u7(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function f7(t){const{className:e,classes:n,pulsate:i=!1,rippleX:r,rippleY:s,rippleSize:a,in:c,onExited:f,timeout:d}=t,[p,m]=E.useState(!1),v=ye(e,n.ripple,n.rippleVisible,i&&n.ripplePulsate),b={width:a,height:a,top:-(a/2)+s,left:-(a/2)+r},O=ye(n.child,p&&n.childLeaving,i&&n.childPulsate);return!c&&!p&&m(!0),E.useEffect(()=>{if(!c&&f!=null){const x=setTimeout(f,d);return()=>{clearTimeout(x)}}},[f,c,d]),S.jsx("span",{className:v,style:b,children:S.jsx("span",{className:O})})}const Xi=Le("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Rb=550,h7=80,d7=kf`
|
|
152
|
-
0% {
|
|
153
|
-
transform: scale(0);
|
|
154
|
-
opacity: 0.1;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
100% {
|
|
158
|
-
transform: scale(1);
|
|
159
|
-
opacity: 0.3;
|
|
160
|
-
}
|
|
161
|
-
`,p7=kf`
|
|
162
|
-
0% {
|
|
163
|
-
opacity: 1;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
100% {
|
|
167
|
-
opacity: 0;
|
|
168
|
-
}
|
|
169
|
-
`,m7=kf`
|
|
170
|
-
0% {
|
|
171
|
-
transform: scale(1);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
50% {
|
|
175
|
-
transform: scale(0.92);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
100% {
|
|
179
|
-
transform: scale(1);
|
|
180
|
-
}
|
|
181
|
-
`,g7=ge("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),y7=ge(f7,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
182
|
-
opacity: 0;
|
|
183
|
-
position: absolute;
|
|
184
|
-
|
|
185
|
-
&.${Xi.rippleVisible} {
|
|
186
|
-
opacity: 0.3;
|
|
187
|
-
transform: scale(1);
|
|
188
|
-
animation-name: ${d7};
|
|
189
|
-
animation-duration: ${Rb}ms;
|
|
190
|
-
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
&.${Xi.ripplePulsate} {
|
|
194
|
-
animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
& .${Xi.child} {
|
|
198
|
-
opacity: 1;
|
|
199
|
-
display: block;
|
|
200
|
-
width: 100%;
|
|
201
|
-
height: 100%;
|
|
202
|
-
border-radius: 50%;
|
|
203
|
-
background-color: currentColor;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
& .${Xi.childLeaving} {
|
|
207
|
-
opacity: 0;
|
|
208
|
-
animation-name: ${p7};
|
|
209
|
-
animation-duration: ${Rb}ms;
|
|
210
|
-
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
& .${Xi.childPulsate} {
|
|
214
|
-
position: absolute;
|
|
215
|
-
/* @noflip */
|
|
216
|
-
left: 0px;
|
|
217
|
-
top: 0;
|
|
218
|
-
animation-name: ${m7};
|
|
219
|
-
animation-duration: 2500ms;
|
|
220
|
-
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
|
|
221
|
-
animation-iteration-count: infinite;
|
|
222
|
-
animation-delay: 200ms;
|
|
223
|
-
}
|
|
224
|
-
`,v7=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:s={},className:a,...c}=i,[f,d]=E.useState([]),p=E.useRef(0),m=E.useRef(null);E.useEffect(()=>{m.current&&(m.current(),m.current=null)},[f]);const v=E.useRef(!1),b=gl(),O=E.useRef(null),x=E.useRef(null),C=E.useCallback(D=>{const{pulsate:R,rippleX:B,rippleY:M,rippleSize:j,cb:N}=D;d(A=>[...A,S.jsx(y7,{classes:{ripple:ye(s.ripple,Xi.ripple),rippleVisible:ye(s.rippleVisible,Xi.rippleVisible),ripplePulsate:ye(s.ripplePulsate,Xi.ripplePulsate),child:ye(s.child,Xi.child),childLeaving:ye(s.childLeaving,Xi.childLeaving),childPulsate:ye(s.childPulsate,Xi.childPulsate)},timeout:Rb,pulsate:R,rippleX:B,rippleY:M,rippleSize:j},p.current)]),p.current+=1,m.current=N},[s]),k=E.useCallback((D={},R={},B=()=>{})=>{const{pulsate:M=!1,center:j=r||R.pulsate,fakeElement:N=!1}=R;if(D?.type==="mousedown"&&v.current){v.current=!1;return}D?.type==="touchstart"&&(v.current=!0);const A=N?null:x.current,Q=A?A.getBoundingClientRect():{width:0,height:0,left:0,top:0};let T,U,q;if(j||D===void 0||D.clientX===0&&D.clientY===0||!D.clientX&&!D.touches)T=Math.round(Q.width/2),U=Math.round(Q.height/2);else{const{clientX:V,clientY:L}=D.touches&&D.touches.length>0?D.touches[0]:D;T=Math.round(V-Q.left),U=Math.round(L-Q.top)}if(j)q=Math.sqrt((2*Q.width**2+Q.height**2)/3),q%2===0&&(q+=1);else{const V=Math.max(Math.abs((A?A.clientWidth:0)-T),T)*2+2,L=Math.max(Math.abs((A?A.clientHeight:0)-U),U)*2+2;q=Math.sqrt(V**2+L**2)}D?.touches?O.current===null&&(O.current=()=>{C({pulsate:M,rippleX:T,rippleY:U,rippleSize:q,cb:B})},b.start(h7,()=>{O.current&&(O.current(),O.current=null)})):C({pulsate:M,rippleX:T,rippleY:U,rippleSize:q,cb:B})},[r,C,b]),$=E.useCallback(()=>{k({},{pulsate:!0})},[k]),z=E.useCallback((D,R)=>{if(b.clear(),D?.type==="touchend"&&O.current){O.current(),O.current=null,b.start(0,()=>{z(D,R)});return}O.current=null,d(B=>B.length>0?B.slice(1):B),m.current=R},[b]);return E.useImperativeHandle(n,()=>({pulsate:$,start:k,stop:z}),[$,k,z]),S.jsx(g7,{className:ye(Xi.root,s.root,a),ref:x,...c,children:S.jsx(cO,{component:null,exit:!0,children:f})})});function b7(t){return Qe("MuiButtonBase",t)}const O7=Le("MuiButtonBase",["root","disabled","focusVisible"]),S7=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:i,classes:r}=t,a=_e({root:["root",e&&"disabled",n&&"focusVisible"]},b7,r);return n&&i&&(a.root+=` ${i}`),a},x7=ge("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"},[`&.${O7.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),qo=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:s=!1,children:a,className:c,component:f="button",disabled:d=!1,disableRipple:p=!1,disableTouchRipple:m=!1,focusRipple:v=!1,focusVisibleClassName:b,LinkComponent:O="a",onBlur:x,onClick:C,onContextMenu:k,onDragLeave:$,onFocus:z,onFocusVisible:D,onKeyDown:R,onKeyUp:B,onMouseDown:M,onMouseLeave:j,onMouseUp:N,onTouchEnd:A,onTouchMove:Q,onTouchStart:T,tabIndex:U=0,TouchRippleProps:q,touchRippleRef:V,type:L,...X}=i,Y=E.useRef(null),K=c7(),le=pn(K.ref,V),[_,G]=E.useState(!1);d&&_&&G(!1),E.useImperativeHandle(r,()=>({focusVisible:()=>{G(!0),Y.current.focus()}}),[]);const se=K.shouldMount&&!p&&!d;E.useEffect(()=>{_&&v&&!p&&K.pulsate()},[p,v,_,K]);const W=Eo(K,"start",M,m),ce=Eo(K,"stop",k,m),ne=Eo(K,"stop",$,m),he=Eo(K,"stop",N,m),Se=Eo(K,"stop",Ee=>{_&&Ee.preventDefault(),j&&j(Ee)},m),ke=Eo(K,"start",T,m),xe=Eo(K,"stop",A,m),Re=Eo(K,"stop",Q,m),Pe=Eo(K,"stop",Ee=>{Ia(Ee.target)||G(!1),x&&x(Ee)},!1),at=er(Ee=>{Y.current||(Y.current=Ee.currentTarget),Ia(Ee.target)&&(G(!0),D&&D(Ee)),z&&z(Ee)}),qe=()=>{const Ee=Y.current;return f&&f!=="button"&&!(Ee.tagName==="A"&&Ee.href)},ct=er(Ee=>{v&&!Ee.repeat&&_&&Ee.key===" "&&K.stop(Ee,()=>{K.start(Ee)}),Ee.target===Ee.currentTarget&&qe()&&Ee.key===" "&&Ee.preventDefault(),R&&R(Ee),Ee.target===Ee.currentTarget&&qe()&&Ee.key==="Enter"&&!d&&(Ee.preventDefault(),C&&C(Ee))}),At=er(Ee=>{v&&Ee.key===" "&&_&&!Ee.defaultPrevented&&K.stop(Ee,()=>{K.pulsate(Ee)}),B&&B(Ee),C&&Ee.target===Ee.currentTarget&&qe()&&Ee.key===" "&&!Ee.defaultPrevented&&C(Ee)});let Ke=f;Ke==="button"&&(X.href||X.to)&&(Ke=O);const nt={};Ke==="button"?(nt.type=L===void 0?"button":L,nt.disabled=d):(!X.href&&!X.to&&(nt.role="button"),d&&(nt["aria-disabled"]=d));const Ze=pn(n,Y),dt={...i,centerRipple:s,component:f,disabled:d,disableRipple:p,disableTouchRipple:m,focusRipple:v,tabIndex:U,focusVisible:_},Ve=S7(dt);return S.jsxs(x7,{as:Ke,className:ye(Ve.root,c),ownerState:dt,onBlur:Pe,onClick:C,onContextMenu:ce,onFocus:at,onKeyDown:ct,onKeyUp:At,onMouseDown:W,onMouseLeave:Se,onMouseUp:he,onDragLeave:ne,onTouchEnd:xe,onTouchMove:Re,onTouchStart:ke,ref:Ze,tabIndex:d?-1:U,type:L,...nt,...X,children:[a,se?S.jsx(v7,{ref:le,center:s,...q}):null]})});function Eo(t,e,n,i=!1){return er(r=>(n&&n(r),i||t[e](r),!0))}function w7(t){return Qe("MuiChip",t)}const Fe=Le("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),C7=t=>{const{classes:e,disabled:n,size:i,color:r,iconColor:s,onDelete:a,clickable:c,variant:f}=t,d={root:["root",f,n&&"disabled",`size${pe(i)}`,`color${pe(r)}`,c&&"clickable",c&&`clickableColor${pe(r)}`,a&&"deletable",a&&`deletableColor${pe(r)}`,`${f}${pe(r)}`],label:["label",`label${pe(i)}`],avatar:["avatar",`avatar${pe(i)}`,`avatarColor${pe(r)}`],icon:["icon",`icon${pe(i)}`,`iconColor${pe(s)}`],deleteIcon:["deleteIcon",`deleteIcon${pe(i)}`,`deleteIconColor${pe(r)}`,`deleteIcon${pe(f)}Color${pe(r)}`]};return _e(d,w7,e)},T7=ge("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:i,iconColor:r,clickable:s,onDelete:a,size:c,variant:f}=n;return[{[`& .${Fe.avatar}`]:e.avatar},{[`& .${Fe.avatar}`]:e[`avatar${pe(c)}`]},{[`& .${Fe.avatar}`]:e[`avatarColor${pe(i)}`]},{[`& .${Fe.icon}`]:e.icon},{[`& .${Fe.icon}`]:e[`icon${pe(c)}`]},{[`& .${Fe.icon}`]:e[`iconColor${pe(r)}`]},{[`& .${Fe.deleteIcon}`]:e.deleteIcon},{[`& .${Fe.deleteIcon}`]:e[`deleteIcon${pe(c)}`]},{[`& .${Fe.deleteIcon}`]:e[`deleteIconColor${pe(i)}`]},{[`& .${Fe.deleteIcon}`]:e[`deleteIcon${pe(f)}Color${pe(i)}`]},e.root,e[`size${pe(c)}`],e[`color${pe(i)}`],s&&e.clickable,s&&i!=="default"&&e[`clickableColor${pe(i)})`],a&&e.deletable,a&&i!=="default"&&e[`deletableColor${pe(i)}`],e[f],e[`${f}${pe(i)}`]]}})(We(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Fe.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Fe.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${Fe.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${Fe.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${Fe.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${Fe.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Fe.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.alpha((t.vars||t).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.alpha((t.vars||t).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Fe.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Fe.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(gr(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${Fe.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Fe.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Fe.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Fe.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}}},...Object.entries(t.palette).filter(gr(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Fe.focusVisible}`]:{background:(t.vars||t).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)},[`&.${Fe.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(gr(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Fe.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${Fe.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Fe.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${Fe.avatar}`]:{marginLeft:4},[`& .${Fe.avatarSmall}`]:{marginLeft:2},[`& .${Fe.icon}`]:{marginLeft:4},[`& .${Fe.iconSmall}`]:{marginLeft:2},[`& .${Fe.deleteIcon}`]:{marginRight:5},[`& .${Fe.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(gr()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(t.vars||t).palette[n].main,border:`1px solid ${t.alpha((t.vars||t).palette[n].main,.7)}`,[`&.${Fe.clickable}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette[n].main,(t.vars||t).palette.action.hoverOpacity)},[`&.${Fe.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette[n].main,(t.vars||t).palette.action.focusOpacity)},[`& .${Fe.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}))]}})),k7=ge("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:i}=n;return[e.label,e[`label${pe(i)}`]]}})({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 L2(t){return t.key==="Backspace"||t.key==="Delete"}const $m=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiChip"}),{avatar:r,className:s,clickable:a,color:c="default",component:f,deleteIcon:d,disabled:p=!1,icon:m,label:v,onClick:b,onDelete:O,onKeyDown:x,onKeyUp:C,size:k="medium",variant:$="filled",tabIndex:z,skipFocusWhenDisabled:D=!1,slots:R={},slotProps:B={},...M}=i,j=E.useRef(null),N=pn(j,n),A=ne=>{ne.stopPropagation(),O&&O(ne)},Q=ne=>{ne.currentTarget===ne.target&&L2(ne)&&ne.preventDefault(),x&&x(ne)},T=ne=>{ne.currentTarget===ne.target&&O&&L2(ne)&&O(ne),C&&C(ne)},U=a!==!1&&b?!0:a,q=U||O?qo:f||"div",V={...i,component:q,disabled:p,size:k,color:c,iconColor:E.isValidElement(m)&&m.props.color||c,onDelete:!!O,clickable:U,variant:$},L=C7(V),X=q===qo?{component:f||"div",focusVisibleClassName:L.focusVisible,...O&&{disableRipple:!0}}:{};let Y=null;O&&(Y=d&&E.isValidElement(d)?E.cloneElement(d,{className:ye(d.props.className,L.deleteIcon),onClick:A}):S.jsx(a7,{className:L.deleteIcon,onClick:A}));let K=null;r&&E.isValidElement(r)&&(K=E.cloneElement(r,{className:ye(L.avatar,r.props.className)}));let le=null;m&&E.isValidElement(m)&&(le=E.cloneElement(m,{className:ye(L.icon,m.props.className)}));const _={slots:R,slotProps:B},[G,se]=Ie("root",{elementType:T7,externalForwardedProps:{..._,...M},ownerState:V,shouldForwardComponentProp:!0,ref:N,className:ye(L.root,s),additionalProps:{disabled:U&&p?!0:void 0,tabIndex:D&&p?-1:z,...X},getSlotProps:ne=>({...ne,onClick:he=>{ne.onClick?.(he),b?.(he)},onKeyDown:he=>{ne.onKeyDown?.(he),Q(he)},onKeyUp:he=>{ne.onKeyUp?.(he),T(he)}})}),[W,ce]=Ie("label",{elementType:k7,externalForwardedProps:_,ownerState:V,className:L.label});return S.jsxs(G,{as:q,...se,children:[K||le,S.jsx(W,{...ce,children:v}),Y]})});function E7(t){return Qe("MuiCollapse",t)}Le("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const A7=t=>{const{orientation:e,classes:n}=t,i={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return _e(i,E7,n)},R7=ge("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.orientation],n.state==="entered"&&e.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&e.hidden]}})(We(({theme:t})=>({height:0,overflow:"hidden",transition:t.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:t.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>e.state==="exited"&&!e.in&&e.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),M7=ge("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),D7=ge("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ss=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiCollapse"}),{addEndListener:r,children:s,className:a,collapsedSize:c="0px",component:f,easing:d,in:p,onEnter:m,onEntered:v,onEntering:b,onExit:O,onExited:x,onExiting:C,orientation:k="vertical",style:$,timeout:z=HA.standard,TransitionComponent:D=lr,...R}=i,B={...i,orientation:k,collapsedSize:c},M=A7(B),j=xr(),N=gl(),A=E.useRef(null),Q=E.useRef(),T=typeof c=="number"?`${c}px`:c,U=k==="horizontal",q=U?"width":"height",V=E.useRef(null),L=pn(n,V),X=ne=>he=>{if(ne){const Se=V.current;he===void 0?ne(Se):ne(Se,he)}},Y=()=>A.current?A.current[U?"clientWidth":"clientHeight"]:0,K=X((ne,he)=>{A.current&&U&&(A.current.style.position="absolute"),ne.style[q]=T,m&&m(ne,he)}),le=X((ne,he)=>{const Se=Y();A.current&&U&&(A.current.style.position="");const{duration:ke,easing:xe}=Ms({style:$,timeout:z,easing:d},{mode:"enter"});if(z==="auto"){const Re=j.transitions.getAutoHeightDuration(Se);ne.style.transitionDuration=`${Re}ms`,Q.current=Re}else ne.style.transitionDuration=typeof ke=="string"?ke:`${ke}ms`;ne.style[q]=`${Se}px`,ne.style.transitionTimingFunction=xe,b&&b(ne,he)}),_=X((ne,he)=>{ne.style[q]="auto",v&&v(ne,he)}),G=X(ne=>{ne.style[q]=`${Y()}px`,O&&O(ne)}),se=X(x),W=X(ne=>{const he=Y(),{duration:Se,easing:ke}=Ms({style:$,timeout:z,easing:d},{mode:"exit"});if(z==="auto"){const xe=j.transitions.getAutoHeightDuration(he);ne.style.transitionDuration=`${xe}ms`,Q.current=xe}else ne.style.transitionDuration=typeof Se=="string"?Se:`${Se}ms`;ne.style[q]=T,ne.style.transitionTimingFunction=ke,C&&C(ne)}),ce=ne=>{z==="auto"&&N.start(Q.current||0,ne),r&&r(V.current,ne)};return S.jsx(D,{in:p,onEnter:K,onEntered:_,onEntering:le,onExit:G,onExited:se,onExiting:W,addEndListener:ce,nodeRef:V,timeout:z==="auto"?null:z,...R,children:(ne,{ownerState:he,...Se})=>S.jsx(R7,{as:f,className:ye(M.root,a,{entered:M.entered,exited:!p&&T==="0px"&&M.hidden}[ne]),style:{[U?"minWidth":"minHeight"]:T,...$},ref:L,ownerState:{...B,state:ne},...Se,children:S.jsx(M7,{ownerState:{...B,state:ne},className:M.wrapper,ref:A,children:S.jsx(D7,{ownerState:{...B,state:ne},className:M.wrapperInner,children:s})})})})});Ss&&(Ss.muiSupportAuto=!0);function P7(t){return Qe("MuiDivider",t)}const N2=Le("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),z7=t=>{const{absolute:e,children:n,classes:i,flexItem:r,light:s,orientation:a,textAlign:c,variant:f}=t;return _e({root:["root",e&&"absolute",f,s&&"light",a==="vertical"&&"vertical",r&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",c==="right"&&a!=="vertical"&&"textAlignRight",c==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},P7,i)},$7=ge("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(We(({theme:t})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.alpha((t.vars||t).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&e.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>e.orientation==="vertical"&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>e.textAlign==="right"&&e.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>e.textAlign==="left"&&e.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),B7=ge("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(We(({theme:t})=>({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}))),xf=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiDivider"}),{absolute:r=!1,children:s,className:a,orientation:c="horizontal",component:f=s||c==="vertical"?"div":"hr",flexItem:d=!1,light:p=!1,role:m=f!=="hr"?"separator":void 0,textAlign:v="center",variant:b="fullWidth",...O}=i,x={...i,absolute:r,component:f,flexItem:d,light:p,orientation:c,role:m,textAlign:v,variant:b},C=z7(x);return S.jsx($7,{as:f,className:ye(C.root,a),role:m,ref:n,ownerState:x,"aria-orientation":m==="separator"&&(f!=="hr"||c==="vertical")?c:void 0,...O,children:s?S.jsx(B7,{className:C.wrapper,ownerState:x,children:s}):null})});xf&&(xf.muiSkipListHighlight=!0);function j7(t){return Qe("MuiIconButton",t)}const _2=Le("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Q7=t=>{const{classes:e,disabled:n,color:i,edge:r,size:s,loading:a}=t,c={root:["root",a&&"loading",n&&"disabled",i!=="default"&&`color${pe(i)}`,r&&`edge${pe(r)}`,`size${pe(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return _e(c,j7,e)},L7=ge(qo,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${pe(n.color)}`],n.edge&&e[`edge${pe(n.edge)}`],e[`size${pe(n.size)}`]]}})(We(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.alpha((t.vars||t).palette.action.active,(t.vars||t).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}}]})),We(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(gr()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(gr()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${_2.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${_2.loading}`]:{color:"transparent"}}))),N7=ge("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Bn=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiIconButton"}),{edge:r=!1,children:s,className:a,color:c="default",disabled:f=!1,disableFocusRipple:d=!1,size:p="medium",id:m,loading:v=null,loadingIndicator:b,...O}=i,x=dm(m),C=b??S.jsx(sO,{"aria-labelledby":x,color:"inherit",size:16}),k={...i,edge:r,color:c,disabled:f,disableFocusRipple:d,loading:v,loadingIndicator:C,size:p},$=Q7(k);return S.jsxs(L7,{id:v?x:m,className:ye($.root,a),centerRipple:!0,focusRipple:!d,disabled:f||v,ref:n,...O,ownerState:k,children:[typeof v=="boolean"&&S.jsx("span",{className:$.loadingWrapper,style:{display:"contents"},children:S.jsx(N7,{className:$.loadingIndicator,ownerState:k,children:v&&C})}),s]})});var q2={"+":"inserted","-":"deleted","@":"meta"};const _7={name:"diff",token:function(t){var e=t.string.search(/[\t ]+?$/);if(!t.sol()||e===0)return t.skipToEnd(),("error "+(q2[t.string.charAt(0)]||"")).replace(/ $/,"");var n=q2[t.peek()]||t.skipToEnd();return e===-1?t.skipToEnd():t.pos=e,n}};function q7(t,e,n){const i=e.parser.parse(t);let r=0;n5(i,HO,(s,a,c)=>{s>r&&n(t.slice(r,s),null,r,s),n(t.slice(s,a),c,s,a),r=a}),r!==i.length&&n(t.slice(r,i.length),null,r,i.length)}const U7=c1().language,I7=VO.define(_7),hn=E.forwardRef(function({sx:e,value:n="",mode:i="python",onClick:r,noBreak:s,...a},c){const[f,d]=E.useState([[n,null,0]]);return E.useEffect(()=>{const p={python:U7,diff:I7}[i];!p||!n||(d([]),q7(n,p,(m,v,b)=>{s&&m.includes(`
|
|
225
|
-
`)&&(m=S.jsx(S.Fragment,{children:m.split(`
|
|
226
|
-
`).map((O,x,C)=>S.jsxs(Ei.Fragment,{children:[O,x<C.length-1?S.jsx(Et,{component:"span",sx:{fontSize:"0.75em",pl:.25,pr:1,color:"info.main",verticalAlign:"bottom"},children:"⏎"}):null]},x))})),d(O=>[...O,[m,v,b]])}))},[i,n]),S.jsx(rt,{ref:c,component:"code",sx:[{fontFamily:'"Fira Code", monospace',whiteSpace:s?void 0:"pre-wrap",wordBreak:s||"break-all",overflowWrap:s||"break-word"},...Array.isArray(e)?e:[e]],onClick:r,...a,children:f.map(([p,m,v])=>S.jsx("span",{className:m,children:p},v))})}),zu=()=>Date.now().toString(36)+Math.random().toString(36).substr(2,5),H7=t=>{if(!t)return"";if(t<1e3)return`${t}ns`;if(t/=1e3,t<10)return`${t.toFixed(2)}μs`;if(t<100)return`${t.toFixed(1)}μs`;if(t<1e3)return`${t.toFixed(0)}μs`;if(t/=1e3,t<10)return`${t.toFixed(2)}ms`;if(t<100)return`${t.toFixed(1)}ms`;if(t<1e3)return`${t.toFixed(0)}ms`;if(t/=1e3,t<10)return`${t.toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;const e=s=>(s=s.toString(),s.length===1?`0${s}`:s);let n=Math.floor(t/60);const i=(t-60*n).toFixed(0);if(n<60)return`${n}m${e(i)}s`;const r=Math.floor(n/60);return n=(n-60*r).toFixed(0),`${r}h${e(n)}m${e(i)}s`},V7=t=>{if(!t)return;const{top:e,bottom:n}=t.getBoundingClientRect();e<0?t.scrollIntoView():n>window.innerHeight&&t.scrollIntoView(!1)};function W7({diff:t}){return S.jsx(hn,{value:t,mode:"diff"})}function X7({text:t}){return S.jsx(hn,{sx:{color:ys[400]},value:t,mode:"text"})}const G7=yt(S.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"})),JD=E.createContext({});function F7(t){return Qe("MuiAccordion",t)}const jd=Le("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),Y7=t=>{const{classes:e,square:n,expanded:i,disabled:r,disableGutters:s}=t;return _e({root:["root",!n&&"rounded",i&&"expanded",r&&"disabled",!s&&"gutters"],heading:["heading"],region:["region"]},F7,e)},K7=ge(cc,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${jd.region}`]:e.region},e.root,!n.square&&e.rounded,!n.disableGutters&&e.gutters]}})(We(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${jd.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${jd.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),We(({theme:t})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${jd.expanded}`]:{margin:"16px 0"}}}]}))),Z7=ge("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),J7=ge("div",{name:"MuiAccordion",slot:"Region"})({}),eW=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiAccordion"}),{children:r,className:s,defaultExpanded:a=!1,disabled:c=!1,disableGutters:f=!1,expanded:d,onChange:p,square:m=!1,slots:v={},slotProps:b={},TransitionComponent:O,TransitionProps:x,...C}=i,[k,$]=yR({controlled:d,default:a,name:"Accordion",state:"expanded"}),z=E.useCallback(le=>{$(!k),p&&p(le,!k)},[k,p,$]),[D,...R]=E.Children.toArray(r),B=E.useMemo(()=>({expanded:k,disabled:c,disableGutters:f,toggle:z}),[k,c,f,z]),M={...i,square:m,disabled:c,disableGutters:f,expanded:k},j=Y7(M),N={transition:O,...v},A={transition:x,...b},Q={slots:N,slotProps:A},[T,U]=Ie("root",{elementType:K7,externalForwardedProps:{...Q,...C},className:ye(j.root,s),shouldForwardComponentProp:!0,ownerState:M,ref:n,additionalProps:{square:m}}),[q,V]=Ie("heading",{elementType:Z7,externalForwardedProps:Q,className:j.heading,ownerState:M}),[L,X]=Ie("transition",{elementType:Ss,externalForwardedProps:Q,ownerState:M}),[Y,K]=Ie("region",{elementType:J7,externalForwardedProps:Q,ownerState:M,className:j.region,additionalProps:{"aria-labelledby":D.props.id,id:D.props["aria-controls"],role:"region"}});return S.jsxs(T,{...U,children:[S.jsx(q,{...V,children:S.jsx(JD.Provider,{value:B,children:D})}),S.jsx(L,{in:k,timeout:"auto",...X,children:S.jsx(Y,{...K,children:R})})]})});function tW(t){return Qe("MuiAccordionDetails",t)}Le("MuiAccordionDetails",["root"]);const nW=t=>{const{classes:e}=t;return _e({root:["root"]},tW,e)},iW=ge("div",{name:"MuiAccordionDetails",slot:"Root"})(We(({theme:t})=>({padding:t.spacing(1,2,2)}))),rW=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiAccordionDetails"}),{className:r,...s}=i,a=i,c=nW(a);return S.jsx(iW,{className:ye(c.root,r),ref:n,ownerState:a,...s})});function oW(t){return Qe("MuiAccordionSummary",t)}const Ma=Le("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),sW=t=>{const{classes:e,expanded:n,disabled:i,disableGutters:r}=t;return _e({root:["root",n&&"expanded",i&&"disabled",!r&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!r&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},oW,e)},lW=ge(qo,{name:"MuiAccordionSummary",slot:"Root"})(We(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],e),[`&.${Ma.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Ma.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${Ma.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Ma.expanded}`]:{minHeight:64}}}]}})),aW=ge("span",{name:"MuiAccordionSummary",slot:"Content"})(We(({theme:t})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${Ma.expanded}`]:{margin:"20px 0"}}}]}))),cW=ge("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})(We(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${Ma.expanded}`]:{transform:"rotate(180deg)"}}))),uW=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiAccordionSummary"}),{children:r,className:s,expandIcon:a,focusVisibleClassName:c,onClick:f,slots:d,slotProps:p,...m}=i,{disabled:v=!1,disableGutters:b,expanded:O,toggle:x}=E.useContext(JD),C=A=>{x&&x(A),f&&f(A)},k={...i,expanded:O,disabled:v,disableGutters:b},$=sW(k),z={slots:d,slotProps:p},[D,R]=Ie("root",{ref:n,shouldForwardComponentProp:!0,className:ye($.root,s),elementType:lW,externalForwardedProps:{...z,...m},ownerState:k,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:v,"aria-expanded":O,focusVisibleClassName:ye($.focusVisible,c)},getSlotProps:A=>({...A,onClick:Q=>{A.onClick?.(Q),C(Q)}})}),[B,M]=Ie("content",{className:$.content,elementType:aW,externalForwardedProps:z,ownerState:k}),[j,N]=Ie("expandIconWrapper",{className:$.expandIconWrapper,elementType:cW,externalForwardedProps:z,ownerState:k});return S.jsxs(D,{...R,children:[S.jsx(B,{...M,children:r}),a&&S.jsx(j,{...N,children:a})]})});function fW(t){return Qe("MuiAppBar",t)}Le("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const hW=t=>{const{color:e,position:n,classes:i}=t,r={root:["root",`color${pe(e)}`,`position${pe(n)}`]};return _e(r,fW,i)},U2=(t,e)=>t?`${t?.replace(")","")}, ${e})`:e,dW=ge(cc,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${pe(n.position)}`],e[`color${pe(n.color)}`]]}})(We(({theme:t})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(t.vars||t).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"}},{props:{color:"default"},style:{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[100],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[100]),...t.applyStyles("dark",{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[900],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[900])})}},...Object.entries(t.palette).filter(gr(["contrastText"])).map(([e])=>({props:{color:e},style:{"--AppBar-background":(t.vars??t).palette[e].main,"--AppBar-color":(t.vars??t).palette[e].contrastText}})),{props:e=>e.enableColorOnDark===!0&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>e.enableColorOnDark===!1&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundColor:t.vars?U2(t.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:t.vars?U2(t.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)",...t.applyStyles("dark",{backgroundImage:"none"})}}]}))),pW=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiAppBar"}),{className:r,color:s="primary",enableColorOnDark:a=!1,position:c="fixed",...f}=i,d={...i,color:s,position:c,enableColorOnDark:a},p=hW(d);return S.jsx(dW,{square:!0,component:"header",ownerState:d,elevation:4,className:ye(p.root,r,c==="fixed"&&"mui-fixed"),ref:n,...f})}),mW={entering:{opacity:1},entered:{opacity:1}},gW=E.forwardRef(function(e,n){const i=xr(),r={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:c,easing:f,in:d,onEnter:p,onEntered:m,onEntering:v,onExit:b,onExited:O,onExiting:x,style:C,timeout:k=r,TransitionComponent:$=lr,...z}=e,D=E.useRef(null),R=pn(D,zl(c),n),B=q=>V=>{if(q){const L=D.current;V===void 0?q(L):q(L,V)}},M=B(v),j=B((q,V)=>{uO(q);const L=Ms({style:C,timeout:k,easing:f},{mode:"enter"});q.style.webkitTransition=i.transitions.create("opacity",L),q.style.transition=i.transitions.create("opacity",L),p&&p(q,V)}),N=B(m),A=B(x),Q=B(q=>{const V=Ms({style:C,timeout:k,easing:f},{mode:"exit"});q.style.webkitTransition=i.transitions.create("opacity",V),q.style.transition=i.transitions.create("opacity",V),b&&b(q)}),T=B(O),U=q=>{s&&s(D.current,q)};return S.jsx($,{appear:a,in:d,nodeRef:D,onEnter:j,onEntered:N,onEntering:M,onExit:Q,onExited:T,onExiting:A,addEndListener:U,timeout:k,...z,children:(q,{ownerState:V,...L})=>E.cloneElement(c,{style:{opacity:0,visibility:q==="exited"&&!d?"hidden":void 0,...mW[q],...C,...c.props.style},ref:R,...L})})});function yW(t){return Qe("MuiBackdrop",t)}Le("MuiBackdrop",["root","invisible"]);const vW=t=>{const{classes:e,invisible:n}=t;return _e({root:["root",n&&"invisible"]},yW,e)},bW=ge("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.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"}}]}),OW=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiBackdrop"}),{children:r,className:s,component:a="div",invisible:c=!1,open:f,components:d={},componentsProps:p={},slotProps:m={},slots:v={},TransitionComponent:b,transitionDuration:O,...x}=i,C={...i,component:a,invisible:c},k=vW(C),$={transition:b,root:d.Root,...v},z={...p,...m},D={component:a,slots:$,slotProps:z},[R,B]=Ie("root",{elementType:bW,externalForwardedProps:D,className:ye(k.root,s),ownerState:C}),[M,j]=Ie("transition",{elementType:gW,externalForwardedProps:D,ownerState:C});return S.jsx(M,{in:f,timeout:O,...x,...j,children:S.jsx(R,{"aria-hidden":!0,...B,classes:k,ref:n,children:r})})});function SW(t){return Qe("MuiButton",t)}const sl=Le("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),xW=E.createContext({}),wW=E.createContext(void 0),CW=t=>{const{color:e,disableElevation:n,fullWidth:i,size:r,variant:s,loading:a,loadingPosition:c,classes:f}=t,d={root:["root",a&&"loading",s,`${s}${pe(e)}`,`size${pe(r)}`,`${s}Size${pe(r)}`,`color${pe(e)}`,n&&"disableElevation",i&&"fullWidth",a&&`loadingPosition${pe(c)}`],startIcon:["icon","startIcon",`iconSize${pe(r)}`],endIcon:["icon","endIcon",`iconSize${pe(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},p=_e(d,SW,f);return{...f,...p}},eP=[{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}}}],TW=ge(qo,{shouldForwardProp:t=>ac(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${pe(n.color)}`],e[`size${pe(n.size)}`],e[`${n.variant}Size${pe(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(We(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${sl.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${sl.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${sl.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).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)",[`&.${sl.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(gr()).map(([i])=>({props:{color:i},style:{"--variant-textColor":(t.vars||t).palette[i].main,"--variant-outlinedColor":(t.vars||t).palette[i].main,"--variant-outlinedBorder":t.alpha((t.vars||t).palette[i].main,.5),"--variant-containedColor":(t.vars||t).palette[i].contrastText,"--variant-containedBg":(t.vars||t).palette[i].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[i].dark,"--variant-textBg":t.alpha((t.vars||t).palette[i].main,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[i].main,"--variant-outlinedBg":t.alpha((t.vars||t).palette[i].main,(t.vars||t).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${sl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${sl.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${sl.loading}`]:{color:"transparent"}}}]}})),kW=ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${pe(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...eP]})),EW=ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${pe(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...eP]})),AW=ge("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:t})=>({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:(t.vars||t).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}}]})),I2=ge("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),tP=E.forwardRef(function(e,n){const i=E.useContext(xW),r=E.useContext(wW),s=Yu(i,e),a=je({props:s,name:"MuiButton"}),{children:c,color:f="primary",component:d="button",className:p,disabled:m=!1,disableElevation:v=!1,disableFocusRipple:b=!1,endIcon:O,focusVisibleClassName:x,fullWidth:C=!1,id:k,loading:$=null,loadingIndicator:z,loadingPosition:D="center",size:R="medium",startIcon:B,type:M,variant:j="text",...N}=a,A=dm(k),Q=z??S.jsx(sO,{"aria-labelledby":A,color:"inherit",size:16}),T={...a,color:f,component:d,disabled:m,disableElevation:v,disableFocusRipple:b,fullWidth:C,loading:$,loadingIndicator:Q,loadingPosition:D,size:R,type:M,variant:j},U=CW(T),q=(B||$&&D==="start")&&S.jsx(kW,{className:U.startIcon,ownerState:T,children:B||S.jsx(I2,{className:U.loadingIconPlaceholder,ownerState:T})}),V=(O||$&&D==="end")&&S.jsx(EW,{className:U.endIcon,ownerState:T,children:O||S.jsx(I2,{className:U.loadingIconPlaceholder,ownerState:T})}),L=r||"",X=typeof $=="boolean"?S.jsx("span",{className:U.loadingWrapper,style:{display:"contents"},children:$&&S.jsx(AW,{className:U.loadingIndicator,ownerState:T,children:Q})}):null;return S.jsxs(TW,{ownerState:T,className:ye(i.className,U.root,p,L),component:d,disabled:m||$,focusRipple:!b,focusVisibleClassName:ye(U.focusVisible,x),ref:n,type:M,id:$?A:k,...N,classes:U,children:[q,D!=="end"&&X,c,D==="end"&&X,V]})});function nP(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}function RW(t){const e=In(t);return e.body===t?Sr(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Hu(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function H2(t){return parseInt(Sr(t).getComputedStyle(t).paddingRight,10)||0}function MW(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(t.tagName),i=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||i}function V2(t,e,n,i,r){const s=[e,n,...i];[].forEach.call(t.children,a=>{const c=!s.includes(a),f=!MW(a);c&&f&&Hu(a,r)})}function Ky(t,e){let n=-1;return t.some((i,r)=>e(i)?(n=r,!0):!1),n}function DW(t,e){const n=[],i=t.container;if(!e.disableScrollLock){if(RW(i)){const a=nP(Sr(i));n.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${H2(i)+a}px`;const c=In(i).querySelectorAll(".mui-fixed");[].forEach.call(c,f=>{n.push({value:f.style.paddingRight,property:"padding-right",el:f}),f.style.paddingRight=`${H2(f)+a}px`})}let s;if(i.parentNode instanceof DocumentFragment)s=In(i).body;else{const a=i.parentElement,c=Sr(i);s=a?.nodeName==="HTML"&&c.getComputedStyle(a).overflowY==="scroll"?a:i}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:c})=>{s?a.style.setProperty(c,s):a.style.removeProperty(c)})}}function PW(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class zW{constructor(){this.modals=[],this.containers=[]}add(e,n){let i=this.modals.indexOf(e);if(i!==-1)return i;i=this.modals.length,this.modals.push(e),e.modalRef&&Hu(e.modalRef,!1);const r=PW(n);V2(n,e.mount,e.modalRef,r,!0);const s=Ky(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(e),i):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:r}),i)}mount(e,n){const i=Ky(this.containers,s=>s.modals.includes(e)),r=this.containers[i];r.restore||(r.restore=DW(r,n))}remove(e,n=!0){const i=this.modals.indexOf(e);if(i===-1)return i;const r=Ky(this.containers,a=>a.modals.includes(e)),s=this.containers[r];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(i,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&Hu(e.modalRef,n),V2(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(r,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&Hu(a.modalRef,!1)}return i}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const $W=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function BW(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function jW(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=i=>t.ownerDocument.querySelector(`input[type="radio"]${i}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function QW(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||jW(t))}function LW(t){const e=[],n=[];return Array.from(t.querySelectorAll($W)).forEach((i,r)=>{const s=BW(i);s===-1||!QW(i)||(s===0?e.push(i):n.push({documentOrder:r,tabIndex:s,node:i}))}),n.sort((i,r)=>i.tabIndex===r.tabIndex?i.documentOrder-r.documentOrder:i.tabIndex-r.tabIndex).map(i=>i.node).concat(e)}function NW(){return!0}function _W(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:i=!1,disableRestoreFocus:r=!1,getTabbable:s=LW,isEnabled:a=NW,open:c}=t,f=E.useRef(!1),d=E.useRef(null),p=E.useRef(null),m=E.useRef(null),v=E.useRef(null),b=E.useRef(!1),O=E.useRef(null),x=pn(zl(e),O),C=E.useRef(null);E.useEffect(()=>{!c||!O.current||(b.current=!n)},[n,c]),E.useEffect(()=>{if(!c||!O.current)return;const z=In(O.current);return O.current.contains(z.activeElement)||(O.current.hasAttribute("tabIndex")||O.current.setAttribute("tabIndex","-1"),b.current&&O.current.focus()),()=>{r||(m.current&&m.current.focus&&(f.current=!0,m.current.focus()),m.current=null)}},[c]),E.useEffect(()=>{if(!c||!O.current)return;const z=In(O.current),D=M=>{C.current=M,!(i||!a()||M.key!=="Tab")&&z.activeElement===O.current&&M.shiftKey&&(f.current=!0,p.current&&p.current.focus())},R=()=>{const M=O.current;if(M===null)return;if(!z.hasFocus()||!a()||f.current){f.current=!1;return}if(M.contains(z.activeElement)||i&&z.activeElement!==d.current&&z.activeElement!==p.current)return;if(z.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!b.current)return;let j=[];if((z.activeElement===d.current||z.activeElement===p.current)&&(j=s(O.current)),j.length>0){const N=!!(C.current?.shiftKey&&C.current?.key==="Tab"),A=j[0],Q=j[j.length-1];typeof A!="string"&&typeof Q!="string"&&(N?Q.focus():A.focus())}else M.focus()};z.addEventListener("focusin",R),z.addEventListener("keydown",D,!0);const B=setInterval(()=>{z.activeElement&&z.activeElement.tagName==="BODY"&&R()},50);return()=>{clearInterval(B),z.removeEventListener("focusin",R),z.removeEventListener("keydown",D,!0)}},[n,i,r,a,c,s]);const k=z=>{m.current===null&&(m.current=z.relatedTarget),b.current=!0,v.current=z.target;const D=e.props.onFocus;D&&D(z)},$=z=>{m.current===null&&(m.current=z.relatedTarget),b.current=!0};return S.jsxs(E.Fragment,{children:[S.jsx("div",{tabIndex:c?0:-1,onFocus:$,ref:d,"data-testid":"sentinelStart"}),E.cloneElement(e,{ref:x,onFocus:k}),S.jsx("div",{tabIndex:c?0:-1,onFocus:$,ref:p,"data-testid":"sentinelEnd"})]})}function qW(t){return typeof t=="function"?t():t}function UW(t){return t?t.props.hasOwnProperty("in"):!1}const W2=()=>{},Qd=new zW;function IW(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,closeAfterTransition:r=!1,onTransitionEnter:s,onTransitionExited:a,children:c,onClose:f,open:d,rootRef:p}=t,m=E.useRef({}),v=E.useRef(null),b=E.useRef(null),O=pn(b,p),[x,C]=E.useState(!d),k=UW(c);let $=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&($=!1);const z=()=>In(v.current),D=()=>(m.current.modalRef=b.current,m.current.mount=v.current,m.current),R=()=>{Qd.mount(D(),{disableScrollLock:i}),b.current&&(b.current.scrollTop=0)},B=er(()=>{const V=qW(e)||z().body;Qd.add(D(),V),b.current&&R()}),M=()=>Qd.isTopModal(D()),j=er(V=>{v.current=V,V&&(d&&M()?R():b.current&&Hu(b.current,$))}),N=E.useCallback(()=>{Qd.remove(D(),$)},[$]);E.useEffect(()=>()=>{N()},[N]),E.useEffect(()=>{d?B():(!k||!r)&&N()},[d,N,k,r,B]);const A=V=>L=>{V.onKeyDown?.(L),!(L.key!=="Escape"||L.which===229||!M())&&(n||(L.stopPropagation(),f&&f(L,"escapeKeyDown")))},Q=V=>L=>{V.onClick?.(L),L.target===L.currentTarget&&f&&f(L,"backdropClick")};return{getRootProps:(V={})=>{const L=hR(t);delete L.onTransitionEnter,delete L.onTransitionExited;const X={...L,...V};return{role:"presentation",...X,onKeyDown:A(X),ref:O}},getBackdropProps:(V={})=>{const L=V;return{"aria-hidden":!0,...L,onClick:Q(L),open:d}},getTransitionProps:()=>{const V=()=>{C(!1),s&&s()},L=()=>{C(!0),a&&a(),r&&N()};return{onEnter:Q2(V,c?.props.onEnter??W2),onExited:Q2(L,c?.props.onExited??W2)}},rootRef:O,portalRef:j,isTopModal:M,exited:x,hasTransition:k}}function HW(t){return Qe("MuiModal",t)}Le("MuiModal",["root","hidden","backdrop"]);const VW=t=>{const{open:e,exited:n,classes:i}=t;return _e({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},HW,i)},WW=ge("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(We(({theme:t})=>({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),XW=ge(OW,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),iP=E.forwardRef(function(e,n){const i=je({name:"MuiModal",props:e}),{BackdropComponent:r=XW,BackdropProps:s,classes:a,className:c,closeAfterTransition:f=!1,children:d,container:p,component:m,components:v={},componentsProps:b={},disableAutoFocus:O=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:C=!1,disablePortal:k=!1,disableRestoreFocus:$=!1,disableScrollLock:z=!1,hideBackdrop:D=!1,keepMounted:R=!1,onClose:B,onTransitionEnter:M,onTransitionExited:j,open:N,slotProps:A={},slots:Q={},theme:T,...U}=i,q={...i,closeAfterTransition:f,disableAutoFocus:O,disableEnforceFocus:x,disableEscapeKeyDown:C,disablePortal:k,disableRestoreFocus:$,disableScrollLock:z,hideBackdrop:D,keepMounted:R},{getRootProps:V,getBackdropProps:L,getTransitionProps:X,portalRef:Y,isTopModal:K,exited:le,hasTransition:_}=IW({...q,rootRef:n}),G={...q,exited:le},se=VW(G),W={};if(d.props.tabIndex===void 0&&(W.tabIndex="-1"),_){const{onEnter:xe,onExited:Re}=X();W.onEnter=xe,W.onExited=Re}const ce={slots:{root:v.Root,backdrop:v.Backdrop,...Q},slotProps:{...b,...A}},[ne,he]=Ie("root",{ref:n,elementType:WW,externalForwardedProps:{...ce,...U,component:m},getSlotProps:V,ownerState:G,className:ye(c,se?.root,!G.open&&G.exited&&se?.hidden)}),[Se,ke]=Ie("backdrop",{ref:s?.ref,elementType:r,externalForwardedProps:ce,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:xe=>L({...xe,onClick:Re=>{xe?.onClick&&xe.onClick(Re)}}),className:ye(s?.className,se?.backdrop),ownerState:G});return!R&&!N&&(!_||le)?null:S.jsx(mR,{ref:Y,container:p,disablePortal:k,children:S.jsxs(ne,{...he,children:[!D&&r?S.jsx(Se,{...ke}):null,S.jsx(_W,{disableEnforceFocus:x,disableAutoFocus:O,disableRestoreFocus:$,isEnabled:K,open:N,children:E.cloneElement(d,W)})]})})});function GW(t,e,n){const i=e.getBoundingClientRect(),r=n&&n.getBoundingClientRect(),s=Sr(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const d=s.getComputedStyle(e);a=d.getPropertyValue("-webkit-transform")||d.getPropertyValue("transform")}let c=0,f=0;if(a&&a!=="none"&&typeof a=="string"){const d=a.split("(")[1].split(")")[0].split(",");c=parseInt(d[4],10),f=parseInt(d[5],10)}return t==="left"?r?`translateX(${r.right+c-i.left}px)`:`translateX(${s.innerWidth+c-i.left}px)`:t==="right"?r?`translateX(-${i.right-r.left-c}px)`:`translateX(-${i.left+i.width-c}px)`:t==="up"?r?`translateY(${r.bottom+f-i.top}px)`:`translateY(${s.innerHeight+f-i.top}px)`:r?`translateY(-${i.top-r.top+i.height-f}px)`:`translateY(-${i.top+i.height-f}px)`}function FW(t){return typeof t=="function"?t():t}function Ld(t,e,n){const i=FW(n),r=GW(t,e,i);r&&(e.style.webkitTransform=r,e.style.transform=r)}const YW=E.forwardRef(function(e,n){const i=xr(),r={enter:i.transitions.easing.easeOut,exit:i.transitions.easing.sharp},s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:f,container:d,direction:p="down",easing:m=r,in:v,onEnter:b,onEntered:O,onEntering:x,onExit:C,onExited:k,onExiting:$,style:z,timeout:D=s,TransitionComponent:R=lr,...B}=e,M=E.useRef(null),j=pn(zl(f),M,n),N=Y=>K=>{Y&&(K===void 0?Y(M.current):Y(M.current,K))},A=N((Y,K)=>{Ld(p,Y,d),uO(Y),b&&b(Y,K)}),Q=N((Y,K)=>{const le=Ms({timeout:D,style:z,easing:m},{mode:"enter"});Y.style.webkitTransition=i.transitions.create("-webkit-transform",{...le}),Y.style.transition=i.transitions.create("transform",{...le}),Y.style.webkitTransform="none",Y.style.transform="none",x&&x(Y,K)}),T=N(O),U=N($),q=N(Y=>{const K=Ms({timeout:D,style:z,easing:m},{mode:"exit"});Y.style.webkitTransition=i.transitions.create("-webkit-transform",K),Y.style.transition=i.transitions.create("transform",K),Ld(p,Y,d),C&&C(Y)}),V=N(Y=>{Y.style.webkitTransition="",Y.style.transition="",k&&k(Y)}),L=Y=>{a&&a(M.current,Y)},X=E.useCallback(()=>{M.current&&Ld(p,M.current,d)},[p,d]);return E.useEffect(()=>{if(v||p==="down"||p==="right")return;const Y=zm(()=>{M.current&&Ld(p,M.current,d)}),K=Sr(M.current);return K.addEventListener("resize",Y),()=>{Y.clear(),K.removeEventListener("resize",Y)}},[p,v,d]),E.useEffect(()=>{v||X()},[v,X]),S.jsx(R,{nodeRef:M,onEnter:A,onEntered:T,onEntering:Q,onExit:q,onExited:V,onExiting:U,addEndListener:L,appear:c,in:v,timeout:D,...B,children:(Y,{ownerState:K,...le})=>E.cloneElement(f,{ref:j,style:{visibility:Y==="exited"&&!v?"hidden":void 0,...z,...f.props.style},...le})})});function KW(t){return Qe("MuiDrawer",t)}Le("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const rP=(t,e)=>{const{ownerState:n}=t;return[e.root,(n.variant==="permanent"||n.variant==="persistent")&&e.docked,e.modal]},ZW=t=>{const{classes:e,anchor:n,variant:i}=t,r={root:["root",`anchor${pe(n)}`],docked:[(i==="permanent"||i==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${pe(n)}`,i!=="temporary"&&`paperAnchorDocked${pe(n)}`]};return _e(r,KW,e)},JW=ge(iP,{name:"MuiDrawer",slot:"Root",overridesResolver:rP})(We(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer}))),eX=ge("div",{shouldForwardProp:ac,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:rP})({flex:"0 0 auto"}),tX=ge(cc,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${pe(n.anchor)}`],n.variant!=="temporary"&&e[`paperAnchorDocked${pe(n.anchor)}`]]}})(We(({theme:t})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>e.anchor==="left"&&e.variant!=="temporary",style:{borderRight:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="top"&&e.variant!=="temporary",style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="right"&&e.variant!=="temporary",style:{borderLeft:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="bottom"&&e.variant!=="temporary",style:{borderTop:`1px solid ${(t.vars||t).palette.divider}`}}]}))),oP={left:"right",right:"left",top:"down",bottom:"up"};function nX(t){return["left","right"].includes(t)}function iX({direction:t},e){return t==="rtl"&&nX(e)?oP[e]:e}const rX=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiDrawer"}),r=xr(),s=sc(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:f,children:d,className:p,elevation:m=16,hideBackdrop:v=!1,ModalProps:{BackdropProps:b,...O}={},onClose:x,open:C=!1,PaperProps:k={},SlideProps:$,TransitionComponent:z,transitionDuration:D=a,variant:R="temporary",slots:B={},slotProps:M={},...j}=i,N=E.useRef(!1);E.useEffect(()=>{N.current=!0},[]);const A=iX({direction:s?"rtl":"ltr"},c),T={...i,anchor:c,elevation:m,open:C,variant:R,...j},U=ZW(T),q={slots:{transition:z,...B},slotProps:{paper:k,transition:$,...M,backdrop:FD(M.backdrop||{...f,...b},{transitionDuration:D})}},[V,L]=Ie("root",{ref:n,elementType:JW,className:ye(U.root,U.modal,p),shouldForwardComponentProp:!0,ownerState:T,externalForwardedProps:{...q,...j,...O},additionalProps:{open:C,onClose:x,hideBackdrop:v,slots:{backdrop:q.slots.backdrop},slotProps:{backdrop:q.slotProps.backdrop}}}),[X,Y]=Ie("paper",{elementType:tX,shouldForwardComponentProp:!0,className:ye(U.paper,k.className),ownerState:T,externalForwardedProps:q,additionalProps:{elevation:R==="temporary"?m:0,square:!0,...R==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[K,le]=Ie("docked",{elementType:eX,ref:n,className:ye(U.root,U.docked,p),ownerState:T,externalForwardedProps:q,additionalProps:j}),[_,G]=Ie("transition",{elementType:YW,ownerState:T,externalForwardedProps:q,additionalProps:{in:C,direction:oP[A],timeout:D,appear:N.current}}),se=S.jsx(X,{...Y,children:d});if(R==="permanent")return S.jsx(K,{...le,children:se});const W=S.jsx(_,{...G,children:se});return R==="persistent"?S.jsx(K,{...le,children:W}):S.jsx(V,{...L,children:W})}),oX=nQ({createStyledComponent:ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.container&&e.container]}}),componentName:"MuiGrid",useThemeProps:t=>je({props:t,name:"MuiGrid"}),useTheme:xr});function sX(t){return Qe("MuiLink",t)}const lX=Le("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),aX=({theme:t,ownerState:e})=>{const n=e.color;if("colorSpace"in t&&t.colorSpace){const s=_r(t,`palette.${n}.main`)||_r(t,`palette.${n}`)||e.color;return t.alpha(s,.4)}const i=_r(t,`palette.${n}.main`,!1)||_r(t,`palette.${n}`,!1)||e.color,r=_r(t,`palette.${n}.mainChannel`)||_r(t,`palette.${n}Channel`);return"vars"in t&&r?`rgba(${r} / 0.4)`:Ku(i,.4)},X2={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},cX=t=>{const{classes:e,component:n,focusVisible:i,underline:r}=t,s={root:["root",`underline${pe(r)}`,n==="button"&&"button",i&&"focusVisible"]};return _e(s,sX,e)},uX=ge(Et,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${pe(n.underline)}`],n.component==="button"&&e.button]}})(We(({theme:t})=>({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:e,ownerState:n})=>e==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:e,ownerState:n})=>e==="always"&&n.color==="inherit",style:t.colorSpace?{textDecorationColor:t.alpha("currentColor",.4)}:null},...Object.entries(t.palette).filter(gr()).map(([e])=>({props:{underline:"always",color:e},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette[e].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(t.vars||t).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"},[`&.${lX.focusVisible}`]:{outline:"auto"}}}]}))),Mb=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiLink"}),r=xr(),{className:s,color:a="primary",component:c="a",onBlur:f,onFocus:d,TypographyClasses:p,underline:m="always",variant:v="inherit",sx:b,...O}=i,[x,C]=E.useState(!1),k=R=>{Ia(R.target)||C(!1),f&&f(R)},$=R=>{Ia(R.target)&&C(!0),d&&d(R)},z={...i,color:a,component:c,focusVisible:x,underline:m,variant:v},D=cX(z);return S.jsx(uX,{color:a,className:ye(D.root,s),classes:p,component:c,onBlur:k,onFocus:$,ref:n,ownerState:z,variant:v,...O,sx:[...X2[a]===void 0?[{color:a}]:[],...Array.isArray(b)?b:[b]],style:{...O.style,...m==="always"&&a!=="inherit"&&!X2[a]&&{"--Link-underlineColor":aX({theme:r,ownerState:z})}}})}),vr=E.createContext({});function fX(t){return Qe("MuiList",t)}Le("MuiList",["root","padding","dense","subheader"]);const hX=t=>{const{classes:e,disablePadding:n,dense:i,subheader:r}=t;return _e({root:["root",!n&&"padding",i&&"dense",r&&"subheader"]},fX,e)},dX=ge("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>t.subheader,style:{paddingTop:0}}]}),y1=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiList"}),{children:r,className:s,component:a="ul",dense:c=!1,disablePadding:f=!1,subheader:d,...p}=i,m=E.useMemo(()=>({dense:c}),[c]),v={...i,component:a,dense:c,disablePadding:f},b=hX(v);return S.jsx(vr.Provider,{value:m,children:S.jsxs(dX,{as:a,className:ye(b.root,s),ref:n,ownerState:v,...p,children:[d,r]})})});function pX(t){return Qe("MuiListItem",t)}Le("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function mX(t){return Qe("MuiListItemButton",t)}const ka=Le("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),gX=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},yX=t=>{const{alignItems:e,classes:n,dense:i,disabled:r,disableGutters:s,divider:a,selected:c}=t,d=_e({root:["root",i&&"dense",!s&&"gutters",a&&"divider",r&&"disabled",e==="flex-start"&&"alignItemsFlexStart",c&&"selected"]},mX,n);return{...n,...d}},vX=ge(qo,{shouldForwardProp:t=>ac(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:gX})(We(({theme:t})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ka.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${ka.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${ka.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${ka.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${ka.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),bX=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:s=!1,component:a="div",children:c,dense:f=!1,disableGutters:d=!1,divider:p=!1,focusVisibleClassName:m,selected:v=!1,className:b,...O}=i,x=E.useContext(vr),C=E.useMemo(()=>({dense:f||x.dense||!1,alignItems:r,disableGutters:d}),[r,x.dense,f,d]),k=E.useRef(null);nr(()=>{s&&k.current&&k.current.focus()},[s]);const $={...i,alignItems:r,dense:C.dense,disableGutters:d,divider:p,selected:v},z=yX($),D=pn(k,n);return S.jsx(vr.Provider,{value:C,children:S.jsx(vX,{ref:D,href:O.href||O.to,component:(O.href||O.to)&&a==="div"?"button":a,focusVisibleClassName:ye(z.focusVisible,m),ownerState:$,className:ye(z.root,b),...O,classes:z,children:c})})});function OX(t){return Qe("MuiListItemSecondaryAction",t)}Le("MuiListItemSecondaryAction",["root","disableGutters"]);const SX=t=>{const{disableGutters:e,classes:n}=t;return _e({root:["root",e&&"disableGutters"]},OX,n)},xX=ge("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),sP=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...s}=i,a=E.useContext(vr),c={...i,disableGutters:a.disableGutters},f=SX(c);return S.jsx(xX,{className:ye(f.root,r),ownerState:c,ref:n,...s})});sP.muiName="ListItemSecondaryAction";const wX=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.hasSecondaryAction&&e.secondaryAction]},CX=t=>{const{alignItems:e,classes:n,dense:i,disableGutters:r,disablePadding:s,divider:a,hasSecondaryAction:c}=t;return _e({root:["root",i&&"dense",!r&&"gutters",!s&&"padding",a&&"divider",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction"],container:["container"]},pX,n)},TX=ge("div",{name:"MuiListItem",slot:"Root",overridesResolver:wX})(We(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${ka.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),kX=ge("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),lP=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiListItem"}),{alignItems:r="center",children:s,className:a,component:c,components:f={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:m,...v}={},dense:b=!1,disableGutters:O=!1,disablePadding:x=!1,divider:C=!1,secondaryAction:k,slotProps:$={},slots:z={},...D}=i,R=E.useContext(vr),B=E.useMemo(()=>({dense:b||R.dense||!1,alignItems:r,disableGutters:O}),[r,R.dense,b,O]),M=E.useRef(null),j=E.Children.toArray(s),N=j.length&&NA(j[j.length-1],["ListItemSecondaryAction"]),A={...i,alignItems:r,dense:B.dense,disableGutters:O,disablePadding:x,divider:C,hasSecondaryAction:N},Q=CX(A),T=pn(M,n),U=z.root||f.Root||TX,q=$.root||d.root||{},V={className:ye(Q.root,q.className,a),...D};let L=c||"li";return N?(L=!V.component&&!c?"div":L,p==="li"&&(L==="li"?L="div":V.component==="li"&&(V.component="div")),S.jsx(vr.Provider,{value:B,children:S.jsxs(kX,{as:p,className:ye(Q.container,m),ref:T,ownerState:A,...v,children:[S.jsx(U,{...q,...!xp(U)&&{as:L,ownerState:{...A,...q.ownerState}},...V,children:j}),j.pop()]})})):S.jsx(vr.Provider,{value:B,children:S.jsxs(U,{...q,as:L,ref:T,...!xp(U)&&{ownerState:{...A,...q.ownerState}},...V,children:[j,k&&S.jsx(sP,{children:k})]})})});function EX(t){return Qe("MuiListItemIcon",t)}const G2=Le("MuiListItemIcon",["root","alignItemsFlexStart"]),AX=t=>{const{alignItems:e,classes:n}=t;return _e({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},EX,n)},RX=ge("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(We(({theme:t})=>({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),MX=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiListItemIcon"}),{className:r,...s}=i,a=E.useContext(vr),c={...i,alignItems:a.alignItems},f=AX(c);return S.jsx(RX,{className:ye(f.root,r),ownerState:c,ref:n,...s})});function DX(t){return Qe("MuiListItemText",t)}const Da=Le("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),PX=t=>{const{classes:e,inset:n,primary:i,secondary:r,dense:s}=t;return _e({root:["root",n&&"inset",s&&"dense",i&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},DX,e)},zX=ge("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Da.primary}`]:e.primary},{[`& .${Da.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Fp.root}:where(& .${Da.primary})`]:{display:"block"},[`.${Fp.root}:where(& .${Da.secondary})`]:{display:"block"},variants:[{props:({ownerState:t})=>t.primary&&t.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:56}}]}),aP=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiListItemText"}),{children:r,className:s,disableTypography:a=!1,inset:c=!1,primary:f,primaryTypographyProps:d,secondary:p,secondaryTypographyProps:m,slots:v={},slotProps:b={},...O}=i,{dense:x}=E.useContext(vr);let C=f??r,k=p;const $={...i,disableTypography:a,inset:c,primary:!!C,secondary:!!k,dense:x},z=PX($),D={slots:v,slotProps:{primary:d,secondary:m,...b}},[R,B]=Ie("root",{className:ye(z.root,s),elementType:zX,externalForwardedProps:{...D,...O},ownerState:$,ref:n}),[M,j]=Ie("primary",{className:z.primary,elementType:Et,externalForwardedProps:D,ownerState:$}),[N,A]=Ie("secondary",{className:z.secondary,elementType:Et,externalForwardedProps:D,ownerState:$});return C!=null&&C.type!==Et&&!a&&(C=S.jsx(M,{variant:x?"body2":"body1",component:j?.variant?void 0:"span",...j,children:C})),k!=null&&k.type!==Et&&!a&&(k=S.jsx(N,{variant:"body2",color:"textSecondary",...A,children:k})),S.jsxs(R,{...B,children:[C,k]})});function Zy(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function F2(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function cP(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.startsWith(e.keys.join(""))}function vu(t,e,n,i,r,s){let a=!1,c=r(t,e,e?n:!1);for(;c;){if(c===t.firstChild){if(a)return!1;a=!0}const f=i?!1:c.disabled||c.getAttribute("aria-disabled")==="true";if(!c.hasAttribute("tabindex")||!cP(c,s)||f)c=r(t,c,n);else return c.focus(),!0}return!1}const $X=E.forwardRef(function(e,n){const{actions:i,autoFocus:r=!1,autoFocusItem:s=!1,children:a,className:c,disabledItemsFocusable:f=!1,disableListWrap:d=!1,onKeyDown:p,variant:m="selectedMenu",...v}=e,b=E.useRef(null),O=E.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});nr(()=>{r&&b.current.focus()},[r]),E.useImperativeHandle(i,()=>({adjustStyleForScrollbar:(z,{direction:D})=>{const R=!b.current.style.width;if(z.clientHeight<b.current.clientHeight&&R){const B=`${nP(Sr(z))}px`;b.current.style[D==="rtl"?"paddingLeft":"paddingRight"]=B,b.current.style.width=`calc(100% + ${B})`}return b.current}}),[]);const x=z=>{const D=b.current,R=z.key;if(z.ctrlKey||z.metaKey||z.altKey){p&&p(z);return}const M=In(D).activeElement;if(R==="ArrowDown")z.preventDefault(),vu(D,M,d,f,Zy);else if(R==="ArrowUp")z.preventDefault(),vu(D,M,d,f,F2);else if(R==="Home")z.preventDefault(),vu(D,null,d,f,Zy);else if(R==="End")z.preventDefault(),vu(D,null,d,f,F2);else if(R.length===1){const j=O.current,N=R.toLowerCase(),A=performance.now();j.keys.length>0&&(A-j.lastTime>500?(j.keys=[],j.repeating=!0,j.previousKeyMatched=!0):j.repeating&&N!==j.keys[0]&&(j.repeating=!1)),j.lastTime=A,j.keys.push(N);const Q=M&&!j.repeating&&cP(M,j);j.previousKeyMatched&&(Q||vu(D,M,!1,f,Zy,j))?z.preventDefault():j.previousKeyMatched=!1}p&&p(z)},C=pn(b,n);let k=-1;E.Children.forEach(a,(z,D)=>{if(!E.isValidElement(z)){k===D&&(k+=1,k>=a.length&&(k=-1));return}z.props.disabled||(m==="selectedMenu"&&z.props.selected||k===-1)&&(k=D),k===D&&(z.props.disabled||z.props.muiSkipListHighlight||z.type.muiSkipListHighlight)&&(k+=1,k>=a.length&&(k=-1))});const $=E.Children.map(a,(z,D)=>{if(D===k){const R={};return s&&(R.autoFocus=!0),z.props.tabIndex===void 0&&m==="selectedMenu"&&(R.tabIndex=0),E.cloneElement(z,R)}return z});return S.jsx(y1,{role:"menu",ref:C,className:c,onKeyDown:x,tabIndex:r?0:-1,...v,children:$})});function BX(t){return Qe("MuiPopover",t)}Le("MuiPopover",["root","paper"]);function Y2(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function K2(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function Z2(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Nd(t){return typeof t=="function"?t():t}const jX=t=>{const{classes:e}=t;return _e({root:["root"],paper:["paper"]},BX,e)},QX=ge(iP,{name:"MuiPopover",slot:"Root"})({}),uP=ge(cc,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),LX=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiPopover"}),{action:r,anchorEl:s,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:f="anchorEl",children:d,className:p,container:m,elevation:v=8,marginThreshold:b=16,open:O,PaperProps:x={},slots:C={},slotProps:k={},transformOrigin:$={vertical:"top",horizontal:"left"},TransitionComponent:z,transitionDuration:D="auto",TransitionProps:R={},disableScrollLock:B=!1,...M}=i,j=E.useRef(),N={...i,anchorOrigin:a,anchorReference:f,elevation:v,marginThreshold:b,transformOrigin:$,TransitionComponent:z,transitionDuration:D,TransitionProps:R},A=jX(N),Q=E.useCallback(()=>{if(f==="anchorPosition")return c;const xe=Nd(s),Pe=(xe&&xe.nodeType===1?xe:In(j.current).body).getBoundingClientRect();return{top:Pe.top+Y2(Pe,a.vertical),left:Pe.left+K2(Pe,a.horizontal)}},[s,a.horizontal,a.vertical,c,f]),T=E.useCallback(xe=>({vertical:Y2(xe,$.vertical),horizontal:K2(xe,$.horizontal)}),[$.horizontal,$.vertical]),U=E.useCallback(xe=>{const Re={width:xe.offsetWidth,height:xe.offsetHeight},Pe=T(Re);if(f==="none")return{top:null,left:null,transformOrigin:Z2(Pe)};const at=Q();let qe=at.top-Pe.vertical,ct=at.left-Pe.horizontal;const At=qe+Re.height,Ke=ct+Re.width,nt=Sr(Nd(s)),Ze=nt.innerHeight-b,dt=nt.innerWidth-b;if(b!==null&&qe<b){const Ve=qe-b;qe-=Ve,Pe.vertical+=Ve}else if(b!==null&&At>Ze){const Ve=At-Ze;qe-=Ve,Pe.vertical+=Ve}if(b!==null&&ct<b){const Ve=ct-b;ct-=Ve,Pe.horizontal+=Ve}else if(Ke>dt){const Ve=Ke-dt;ct-=Ve,Pe.horizontal+=Ve}return{top:`${Math.round(qe)}px`,left:`${Math.round(ct)}px`,transformOrigin:Z2(Pe)}},[s,f,Q,T,b]),[q,V]=E.useState(O),L=E.useCallback(()=>{const xe=j.current;if(!xe)return;const Re=U(xe);Re.top!==null&&xe.style.setProperty("top",Re.top),Re.left!==null&&(xe.style.left=Re.left),xe.style.transformOrigin=Re.transformOrigin,V(!0)},[U]);E.useEffect(()=>(B&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[s,B,L]);const X=()=>{L()},Y=()=>{V(!1)};E.useEffect(()=>{O&&L()}),E.useImperativeHandle(r,()=>O?{updatePosition:()=>{L()}}:null,[O,L]),E.useEffect(()=>{if(!O)return;const xe=zm(()=>{L()}),Re=Sr(Nd(s));return Re.addEventListener("resize",xe),()=>{xe.clear(),Re.removeEventListener("resize",xe)}},[s,O,L]);let K=D;const le={slots:{transition:z,...C},slotProps:{transition:R,paper:x,...k}},[_,G]=Ie("transition",{elementType:Ju,externalForwardedProps:le,ownerState:N,getSlotProps:xe=>({...xe,onEntering:(Re,Pe)=>{xe.onEntering?.(Re,Pe),X()},onExited:Re=>{xe.onExited?.(Re),Y()}}),additionalProps:{appear:!0,in:O}});D==="auto"&&!_.muiSupportAuto&&(K=void 0);const se=m||(s?In(Nd(s)).body:void 0),[W,{slots:ce,slotProps:ne,...he}]=Ie("root",{ref:n,elementType:QX,externalForwardedProps:{...le,...M},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:C.backdrop},slotProps:{backdrop:FD(typeof k.backdrop=="function"?k.backdrop(N):k.backdrop,{invisible:!0})},container:se,open:O},ownerState:N,className:ye(A.root,p)}),[Se,ke]=Ie("paper",{ref:j,className:A.paper,elementType:uP,externalForwardedProps:le,shouldForwardComponentProp:!0,additionalProps:{elevation:v,style:q?void 0:{opacity:0}},ownerState:N});return S.jsx(W,{...he,...!xp(W)&&{slots:ce,slotProps:ne,disableScrollLock:B},children:S.jsx(_,{...G,timeout:K,children:S.jsx(Se,{...ke,children:d})})})});function NX(t){return Qe("MuiMenu",t)}Le("MuiMenu",["root","paper","list"]);const _X={vertical:"top",horizontal:"right"},qX={vertical:"top",horizontal:"left"},UX=t=>{const{classes:e}=t;return _e({root:["root"],paper:["paper"],list:["list"]},NX,e)},IX=ge(LX,{shouldForwardProp:t=>ac(t)||t==="classes",name:"MuiMenu",slot:"Root"})({}),HX=ge(uP,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),VX=ge($X,{name:"MuiMenu",slot:"List"})({outline:0}),WX=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:s,className:a,disableAutoFocusItem:c=!1,MenuListProps:f={},onClose:d,open:p,PaperProps:m={},PopoverClasses:v,transitionDuration:b="auto",TransitionProps:{onEntering:O,...x}={},variant:C="selectedMenu",slots:k={},slotProps:$={},...z}=i,D=sc(),R={...i,autoFocus:r,disableAutoFocusItem:c,MenuListProps:f,onEntering:O,PaperProps:m,transitionDuration:b,TransitionProps:x,variant:C},B=UX(R),M=r&&!c&&p,j=E.useRef(null),N=(K,le)=>{j.current&&j.current.adjustStyleForScrollbar(K,{direction:D?"rtl":"ltr"}),O&&O(K,le)},A=K=>{K.key==="Tab"&&(K.preventDefault(),d&&d(K,"tabKeyDown"))};let Q=-1;E.Children.map(s,(K,le)=>{E.isValidElement(K)&&(K.props.disabled||(C==="selectedMenu"&&K.props.selected||Q===-1)&&(Q=le))});const T={slots:k,slotProps:{list:f,transition:x,paper:m,...$}},U=Ga({elementType:k.root,externalSlotProps:$.root,ownerState:R,className:[B.root,a]}),[q,V]=Ie("paper",{className:B.paper,elementType:HX,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:R}),[L,X]=Ie("list",{className:ye(B.list,f.className),elementType:VX,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:K=>({...K,onKeyDown:le=>{A(le),K.onKeyDown?.(le)}}),ownerState:R}),Y=typeof T.slotProps.transition=="function"?T.slotProps.transition(R):T.slotProps.transition;return S.jsx(IX,{onClose:d,anchorOrigin:{vertical:"bottom",horizontal:D?"right":"left"},transformOrigin:D?_X:qX,slots:{root:k.root,paper:q,backdrop:k.backdrop,...k.transition&&{transition:k.transition}},slotProps:{root:U,paper:V,backdrop:typeof $.backdrop=="function"?$.backdrop(R):$.backdrop,transition:{...Y,onEntering:(...K)=>{N(...K),Y?.onEntering?.(...K)}}},open:p,ref:n,transitionDuration:b,ownerState:R,...z,classes:v,children:S.jsx(L,{actions:j,autoFocus:r&&(Q===-1||c),autoFocusItem:M,variant:C,...X,children:s})})});function XX(t){return Qe("MuiMenuItem",t)}const bu=Le("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),GX=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},FX=t=>{const{disabled:e,dense:n,divider:i,disableGutters:r,selected:s,classes:a}=t,f=_e({root:["root",n&&"dense",e&&"disabled",!r&&"gutters",i&&"divider",s&&"selected"]},XX,a);return{...a,...f}},YX=ge(qo,{shouldForwardProp:t=>ac(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:GX})(We(({theme:t})=>({...t.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:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${bu.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${bu.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${bu.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${bu.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${bu.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${N2.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${N2.inset}`]:{marginLeft:52},[`& .${Da.root}`]:{marginTop:0,marginBottom:0},[`& .${Da.inset}`]:{paddingLeft:36},[`& .${G2.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[t.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...t.typography.body2,[`& .${G2.root} svg`]:{fontSize:"1.25rem"}}}]}))),KX=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:a=!1,divider:c=!1,disableGutters:f=!1,focusVisibleClassName:d,role:p="menuitem",tabIndex:m,className:v,...b}=i,O=E.useContext(vr),x=E.useMemo(()=>({dense:a||O.dense||!1,disableGutters:f}),[O.dense,a,f]),C=E.useRef(null);nr(()=>{r&&C.current&&C.current.focus()},[r]);const k={...i,dense:x.dense,divider:c,disableGutters:f},$=FX(i),z=pn(C,n);let D;return i.disabled||(D=m!==void 0?m:-1),S.jsx(vr.Provider,{value:x,children:S.jsx(YX,{ref:z,role:p,tabIndex:D,component:s,focusVisibleClassName:ye($.focusVisible,d),className:ye($.root,v),...b,ownerState:k,classes:$})})});function ZX(t){return Qe("MuiTab",t)}const Vi=Le("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),JX=t=>{const{classes:e,textColor:n,fullWidth:i,wrapped:r,icon:s,label:a,selected:c,disabled:f}=t,d={root:["root",s&&a&&"labelIcon",`textColor${pe(n)}`,i&&"fullWidth",r&&"wrapped",c&&"selected",f&&"disabled"],icon:["iconWrapper","icon"]};return _e(d,ZX,e)},eG=ge(qo,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${pe(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${Vi.iconWrapper}`]:e.iconWrapper},{[`& .${Vi.icon}`]:e.icon}]}})(We(({theme:t})=>({...t.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:e})=>e.label&&(e.iconPosition==="top"||e.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&e.iconPosition!=="top"&&e.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="top",style:{[`& > .${Vi.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="bottom",style:{[`& > .${Vi.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="start",style:{[`& > .${Vi.icon}`]:{marginRight:t.spacing(1)}}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="end",style:{[`& > .${Vi.icon}`]:{marginLeft:t.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Vi.selected}`]:{opacity:1},[`&.${Vi.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Vi.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Vi.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Vi.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Vi.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:t.typography.pxToRem(12)}}]}))),_d=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTab"}),{className:r,disabled:s=!1,disableFocusRipple:a=!1,fullWidth:c,icon:f,iconPosition:d="top",indicator:p,label:m,onChange:v,onClick:b,onFocus:O,selected:x,selectionFollowsFocus:C,textColor:k="inherit",value:$,wrapped:z=!1,...D}=i,R={...i,disabled:s,disableFocusRipple:a,selected:x,icon:!!f,iconPosition:d,label:!!m,fullWidth:c,textColor:k,wrapped:z},B=JX(R),M=f&&m&&E.isValidElement(f)?E.cloneElement(f,{className:ye(B.icon,f.props.className)}):f,j=A=>{!x&&v&&v(A,$),b&&b(A)},N=A=>{C&&!x&&v&&v(A,$),O&&O(A)};return S.jsxs(eG,{focusRipple:!a,className:ye(B.root,r),ref:n,role:"tab","aria-selected":x,disabled:s,onClick:j,onFocus:N,ownerState:R,tabIndex:x?0:-1,...D,children:[d==="top"||d==="start"?S.jsxs(E.Fragment,{children:[M,m]}):S.jsxs(E.Fragment,{children:[m,M]}),p]})}),fP=E.createContext();function tG(t){return Qe("MuiTable",t)}Le("MuiTable",["root","stickyHeader"]);const nG=t=>{const{classes:e,stickyHeader:n}=t;return _e({root:["root",n&&"stickyHeader"]},tG,e)},iG=ge("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(We(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),J2="table",Db=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTable"}),{className:r,component:s=J2,padding:a="normal",size:c="medium",stickyHeader:f=!1,...d}=i,p={...i,component:s,padding:a,size:c,stickyHeader:f},m=nG(p),v=E.useMemo(()=>({padding:a,size:c,stickyHeader:f}),[a,c,f]);return S.jsx(fP.Provider,{value:v,children:S.jsx(iG,{as:s,role:s===J2?null:"table",ref:n,className:ye(m.root,r),ownerState:p,...d})})}),Bm=E.createContext();function rG(t){return Qe("MuiTableBody",t)}Le("MuiTableBody",["root"]);const oG=t=>{const{classes:e}=t;return _e({root:["root"]},rG,e)},sG=ge("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),lG={variant:"body"},eE="tbody",Pb=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTableBody"}),{className:r,component:s=eE,...a}=i,c={...i,component:s},f=oG(c);return S.jsx(Bm.Provider,{value:lG,children:S.jsx(sG,{className:ye(f.root,r),as:s,ref:n,role:s===eE?null:"rowgroup",ownerState:c,...a})})});function aG(t){return Qe("MuiTableCell",t)}const cG=Le("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),uG=t=>{const{classes:e,variant:n,align:i,padding:r,size:s,stickyHeader:a}=t,c={root:["root",n,a&&"stickyHeader",i!=="inherit"&&`align${pe(i)}`,r!=="normal"&&`padding${pe(r)}`,`size${pe(s)}`]};return _e(c,aG,e)},fG=ge("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${pe(n.size)}`],n.padding!=="normal"&&e[`padding${pe(n.padding)}`],n.align!=="inherit"&&e[`align${pe(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(We(({theme:t})=>({...t.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid
|
|
227
|
-
${t.palette.mode==="light"?t.lighten(t.alpha(t.palette.divider,1),.88):t.darken(t.alpha(t.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(t.vars||t).palette.text.primary}},{props:{variant:"footer"},style:{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${cG.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default}}]}))),Kt=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTableCell"}),{align:r="inherit",className:s,component:a,padding:c,scope:f,size:d,sortDirection:p,variant:m,...v}=i,b=E.useContext(fP),O=E.useContext(Bm),x=O&&O.variant==="head";let C;a?C=a:C=x?"th":"td";let k=f;C==="td"?k=void 0:!k&&x&&(k="col");const $=m||O&&O.variant,z={...i,align:r,component:C,padding:c||(b&&b.padding?b.padding:"normal"),size:d||(b&&b.size?b.size:"medium"),sortDirection:p,stickyHeader:$==="head"&&b&&b.stickyHeader,variant:$},D=uG(z);let R=null;return p&&(R=p==="asc"?"ascending":"descending"),S.jsx(fG,{as:C,ref:n,className:ye(D.root,s),"aria-sort":R,scope:k,ownerState:z,...v})});function hG(t){return Qe("MuiTableHead",t)}Le("MuiTableHead",["root"]);const dG=t=>{const{classes:e}=t;return _e({root:["root"]},hG,e)},pG=ge("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),mG={variant:"head"},tE="thead",gG=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTableHead"}),{className:r,component:s=tE,...a}=i,c={...i,component:s},f=dG(c);return S.jsx(Bm.Provider,{value:mG,children:S.jsx(pG,{as:s,className:ye(f.root,r),ref:n,role:s===tE?null:"rowgroup",ownerState:c,...a})})});function yG(t){return Qe("MuiToolbar",t)}Le("MuiToolbar",["root","gutters","regular","dense"]);const vG=t=>{const{classes:e,disableGutters:n,variant:i}=t;return _e({root:["root",!n&&"gutters",i]},yG,e)},bG=ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(We(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:t.mixins.toolbar}]}))),OG=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiToolbar"}),{className:r,component:s="div",disableGutters:a=!1,variant:c="regular",...f}=i,d={...i,component:s,disableGutters:a,variant:c},p=vG(d);return S.jsx(bG,{as:s,className:ye(p.root,r),ref:n,ownerState:d,...f})}),SG=yt(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),xG=yt(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function wG(t){return Qe("MuiTableRow",t)}const nE=Le("MuiTableRow",["root","selected","hover","head","footer"]),CG=t=>{const{classes:e,selected:n,hover:i,head:r,footer:s}=t;return _e({root:["root",n&&"selected",i&&"hover",r&&"head",s&&"footer"]},wG,e)},TG=ge("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(We(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${nE.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${nE.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),iE="tr",Wi=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTableRow"}),{className:r,component:s=iE,hover:a=!1,selected:c=!1,...f}=i,d=E.useContext(Bm),p={...i,component:s,hover:a,selected:c,head:d&&d.variant==="head",footer:d&&d.variant==="footer"},m=CG(p);return S.jsx(TG,{as:s,ref:n,className:ye(m.root,r),role:s===iE?null:"row",ownerState:p,...f})});function kG(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function EG(t,e,n,i={},r=()=>{}){const{ease:s=kG,duration:a=300}=i;let c=null;const f=e[t];let d=!1;const p=()=>{d=!0},m=v=>{if(d){r(new Error("Animation cancelled"));return}c===null&&(c=v);const b=Math.min(1,(v-c)/a);if(e[t]=s(b)*(n-f)+f,b>=1){requestAnimationFrame(()=>{r(null)});return}requestAnimationFrame(m)};return f===n?(r(new Error("Element already at target position")),p):(requestAnimationFrame(m),p)}const AG={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function RG(t){const{onChange:e,...n}=t,i=E.useRef(),r=E.useRef(null),s=()=>{i.current=r.current.offsetHeight-r.current.clientHeight};return nr(()=>{const a=zm(()=>{const f=i.current;s(),f!==i.current&&e(i.current)}),c=Sr(r.current);return c.addEventListener("resize",a),()=>{a.clear(),c.removeEventListener("resize",a)}},[e]),E.useEffect(()=>{s(),e(i.current)},[e]),S.jsx("div",{style:AG,...n,ref:r})}function MG(t){return Qe("MuiTabScrollButton",t)}const DG=Le("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),PG=t=>{const{classes:e,orientation:n,disabled:i}=t;return _e({root:["root",n,i&&"disabled"]},MG,e)},zG=ge(qo,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${DG.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),$G=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTabScrollButton"}),{className:r,slots:s={},slotProps:a={},direction:c,orientation:f,disabled:d,...p}=i,m=sc(),v={isRtl:m,...i},b=PG(v),O=s.StartScrollButtonIcon??SG,x=s.EndScrollButtonIcon??xG,C=Ga({elementType:O,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v}),k=Ga({elementType:x,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v});return S.jsx(zG,{component:"div",className:ye(b.root,r),ref:n,role:null,ownerState:v,tabIndex:null,...p,style:{...p.style,...f==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:c==="left"?S.jsx(O,{...C}):S.jsx(x,{...k})})});function BG(t){return Qe("MuiTabs",t)}const Jy=Le("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),rE=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,oE=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,qd=(t,e,n)=>{let i=!1,r=n(t,e);for(;r;){if(r===t.firstChild){if(i)return;i=!0}const s=r.disabled||r.getAttribute("aria-disabled")==="true";if(!r.hasAttribute("tabindex")||s)r=n(t,r);else{r.focus();return}}},jG=t=>{const{vertical:e,fixed:n,hideScrollbar:i,scrollableX:r,scrollableY:s,centered:a,scrollButtonsHideMobile:c,classes:f}=t;return _e({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",i&&"hideScrollbar",r&&"scrollableX",s&&"scrollableY"],list:["list","flexContainer",e&&"flexContainerVertical",e&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",c&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},BG,f)},QG=ge("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Jy.scrollButtons}`]:e.scrollButtons},{[`& .${Jy.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(We(({theme:t})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Jy.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}}]}))),LG=ge("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:t})=>t.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:t})=>t.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:t})=>t.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:t})=>t.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),NG=ge("div",{name:"MuiTabs",slot:"List",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.list,e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})({display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.centered,style:{justifyContent:"center"}}]}),_G=ge("span",{name:"MuiTabs",slot:"Indicator"})(We(({theme:t})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(t.vars||t).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(t.vars||t).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),qG=ge(RG)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),sE={},UG=E.forwardRef(function(e,n){const i=je({props:e,name:"MuiTabs"}),r=xr(),s=sc(),{"aria-label":a,"aria-labelledby":c,action:f,centered:d=!1,children:p,className:m,component:v="div",allowScrollButtonsMobile:b=!1,indicatorColor:O="primary",onChange:x,orientation:C="horizontal",ScrollButtonComponent:k,scrollButtons:$="auto",selectionFollowsFocus:z,slots:D={},slotProps:R={},TabIndicatorProps:B={},TabScrollButtonProps:M={},textColor:j="primary",value:N,variant:A="standard",visibleScrollbar:Q=!1,...T}=i,U=A==="scrollable",q=C==="vertical",V=q?"scrollTop":"scrollLeft",L=q?"top":"left",X=q?"bottom":"right",Y=q?"clientHeight":"clientWidth",K=q?"height":"width",le={...i,component:v,allowScrollButtonsMobile:b,indicatorColor:O,orientation:C,vertical:q,scrollButtons:$,textColor:j,variant:A,visibleScrollbar:Q,fixed:!U,hideScrollbar:U&&!Q,scrollableX:U&&!q,scrollableY:U&&q,centered:d&&!U,scrollButtonsHideMobile:!b},_=jG(le),G=Ga({elementType:D.StartScrollButtonIcon,externalSlotProps:R.startScrollButtonIcon,ownerState:le}),se=Ga({elementType:D.EndScrollButtonIcon,externalSlotProps:R.endScrollButtonIcon,ownerState:le}),[W,ce]=E.useState(!1),[ne,he]=E.useState(sE),[Se,ke]=E.useState(!1),[xe,Re]=E.useState(!1),[Pe,at]=E.useState(!1),[qe,ct]=E.useState({overflow:"hidden",scrollbarWidth:0}),At=new Map,Ke=E.useRef(null),nt=E.useRef(null),Ze={slots:D,slotProps:{indicator:B,scrollButton:M,...R}},dt=()=>{const Oe=Ke.current;let Me;if(Oe){const it=Oe.getBoundingClientRect();Me={clientWidth:Oe.clientWidth,scrollLeft:Oe.scrollLeft,scrollTop:Oe.scrollTop,scrollWidth:Oe.scrollWidth,top:it.top,bottom:it.bottom,left:it.left,right:it.right}}let ut;if(Oe&&N!==!1){const it=nt.current.children;if(it.length>0){const Ht=it[At.get(N)];ut=Ht?Ht.getBoundingClientRect():null}}return{tabsMeta:Me,tabMeta:ut}},Ve=er(()=>{const{tabsMeta:Oe,tabMeta:Me}=dt();let ut=0,it;q?(it="top",Me&&Oe&&(ut=Me.top-Oe.top+Oe.scrollTop)):(it=s?"right":"left",Me&&Oe&&(ut=(s?-1:1)*(Me[it]-Oe[it]+Oe.scrollLeft)));const Ht={[it]:ut,[K]:Me?Me[K]:0};if(typeof ne[it]!="number"||typeof ne[K]!="number")he(Ht);else{const ei=Math.abs(ne[it]-Ht[it]),fr=Math.abs(ne[K]-Ht[K]);(ei>=1||fr>=1)&&he(Ht)}}),Ee=(Oe,{animation:Me=!0}={})=>{Me?EG(V,Ke.current,Oe,{duration:r.transitions.duration.standard}):Ke.current[V]=Oe},Pi=Oe=>{let Me=Ke.current[V];q?Me+=Oe:Me+=Oe*(s?-1:1),Ee(Me)},$t=()=>{const Oe=Ke.current[Y];let Me=0;const ut=Array.from(nt.current.children);for(let it=0;it<ut.length;it+=1){const Ht=ut[it];if(Me+Ht[Y]>Oe){it===0&&(Me=Oe);break}Me+=Ht[Y]}return Me},cr=()=>{Pi(-1*$t())},Vt=()=>{Pi($t())},[st,{onChange:Bt,...on}]=Ie("scrollbar",{className:ye(_.scrollableX,_.hideScrollbar),elementType:qG,shouldForwardComponentProp:!0,externalForwardedProps:Ze,ownerState:le}),zi=E.useCallback(Oe=>{Bt?.(Oe),ct({overflow:null,scrollbarWidth:Oe})},[Bt]),[Sn,kr]=Ie("scrollButtons",{className:ye(_.scrollButtons,M.className),elementType:$G,externalForwardedProps:Ze,ownerState:le,additionalProps:{orientation:C,slots:{StartScrollButtonIcon:D.startScrollButtonIcon||D.StartScrollButtonIcon,EndScrollButtonIcon:D.endScrollButtonIcon||D.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:G,endScrollButtonIcon:se}}}),Vn=()=>{const Oe={};Oe.scrollbarSizeListener=U?S.jsx(st,{...on,onChange:zi}):null;const ut=U&&($==="auto"&&(Se||xe)||$===!0);return Oe.scrollButtonStart=ut?S.jsx(Sn,{direction:s?"right":"left",onClick:cr,disabled:!Se,...kr}):null,Oe.scrollButtonEnd=ut?S.jsx(Sn,{direction:s?"left":"right",onClick:Vt,disabled:!xe,...kr}):null,Oe},Wt=er(Oe=>{const{tabsMeta:Me,tabMeta:ut}=dt();if(!(!ut||!Me)){if(ut[L]<Me[L]){const it=Me[V]+(ut[L]-Me[L]);Ee(it,{animation:Oe})}else if(ut[X]>Me[X]){const it=Me[V]+(ut[X]-Me[X]);Ee(it,{animation:Oe})}}}),Wn=er(()=>{U&&$!==!1&&at(!Pe)});E.useEffect(()=>{const Oe=zm(()=>{Ke.current&&Ve()});let Me;const ut=ei=>{ei.forEach(fr=>{fr.removedNodes.forEach(Wo=>{Me?.unobserve(Wo)}),fr.addedNodes.forEach(Wo=>{Me?.observe(Wo)})}),Oe(),Wn()},it=Sr(Ke.current);it.addEventListener("resize",Oe);let Ht;return typeof ResizeObserver<"u"&&(Me=new ResizeObserver(Oe),Array.from(nt.current.children).forEach(ei=>{Me.observe(ei)})),typeof MutationObserver<"u"&&(Ht=new MutationObserver(ut),Ht.observe(nt.current,{childList:!0})),()=>{Oe.clear(),it.removeEventListener("resize",Oe),Ht?.disconnect(),Me?.disconnect()}},[Ve,Wn]),E.useEffect(()=>{const Oe=Array.from(nt.current.children),Me=Oe.length;if(typeof IntersectionObserver<"u"&&Me>0&&U&&$!==!1){const ut=Oe[0],it=Oe[Me-1],Ht={root:Ke.current,threshold:.99},ei=$i=>{ke(!$i[0].isIntersecting)},fr=new IntersectionObserver(ei,Ht);fr.observe(ut);const Wo=$i=>{Re(!$i[0].isIntersecting)},gc=new IntersectionObserver(Wo,Ht);return gc.observe(it),()=>{fr.disconnect(),gc.disconnect()}}},[U,$,Pe,p?.length]),E.useEffect(()=>{ce(!0)},[]),E.useEffect(()=>{Ve()}),E.useEffect(()=>{Wt(sE!==ne)},[Wt,ne]),E.useImperativeHandle(f,()=>({updateIndicator:Ve,updateScrollButtons:Wn}),[Ve,Wn]);const[mn,pc]=Ie("indicator",{className:ye(_.indicator,B.className),elementType:_G,externalForwardedProps:Ze,ownerState:le,additionalProps:{style:ne}}),ro=S.jsx(mn,{...pc});let Uo=0;const Io=E.Children.map(p,Oe=>{if(!E.isValidElement(Oe))return null;const Me=Oe.props.value===void 0?Uo:Oe.props.value;At.set(Me,Uo);const ut=Me===N;return Uo+=1,E.cloneElement(Oe,{fullWidth:A==="fullWidth",indicator:ut&&!W&&ro,selected:ut,selectionFollowsFocus:z,onChange:x,textColor:j,value:Me,...Uo===1&&N===!1&&!Oe.props.tabIndex?{tabIndex:0}:{}})}),Ho=Oe=>{if(Oe.altKey||Oe.shiftKey||Oe.ctrlKey||Oe.metaKey)return;const Me=nt.current,ut=In(Me).activeElement;if(ut.getAttribute("role")!=="tab")return;let Ht=C==="horizontal"?"ArrowLeft":"ArrowUp",ei=C==="horizontal"?"ArrowRight":"ArrowDown";switch(C==="horizontal"&&s&&(Ht="ArrowRight",ei="ArrowLeft"),Oe.key){case Ht:Oe.preventDefault(),qd(Me,ut,oE);break;case ei:Oe.preventDefault(),qd(Me,ut,rE);break;case"Home":Oe.preventDefault(),qd(Me,null,rE);break;case"End":Oe.preventDefault(),qd(Me,null,oE);break}},Er=Vn(),[ur,Vo]=Ie("root",{ref:n,className:ye(_.root,m),elementType:QG,externalForwardedProps:{...Ze,...T,component:v},ownerState:le}),[oo,mc]=Ie("scroller",{ref:Ke,className:_.scroller,elementType:LG,externalForwardedProps:Ze,ownerState:le,additionalProps:{style:{overflow:qe.overflow,[q?`margin${s?"Left":"Right"}`:"marginBottom"]:Q?void 0:-qe.scrollbarWidth}}}),[$e,Jn]=Ie("list",{ref:nt,className:ye(_.list,_.flexContainer),elementType:NG,externalForwardedProps:Ze,ownerState:le,getSlotProps:Oe=>({...Oe,onKeyDown:Me=>{Ho(Me),Oe.onKeyDown?.(Me)}})});return S.jsxs(ur,{...Vo,children:[Er.scrollButtonStart,Er.scrollbarSizeListener,S.jsxs(oo,{...mc,children:[S.jsx($e,{"aria-label":a,"aria-labelledby":c,"aria-orientation":C==="vertical"?"vertical":null,role:"tablist",...Jn,children:Io}),W&&ro]}),Er.scrollButtonEnd]})});function rc({id:t,type:e="button",children:n,sx:i,...r}){const s=Ls(),a=E.useCallback(()=>{s(xB(zu(),t))},[s,t]),c=e==="chip"?$m:e==="icon"?Bn:tP;return S.jsx(c,{onClick:a,sx:[e==="button"?{minWidth:"auto",textTransform:"none",padding:0,backgroundColor:"rgba(0, 0, 0, 0.02)",display:"inline"}:{},...Array.isArray(i)?i:[i]],component:"a",color:"neutral",...r,children:n})}function IG({id:t,name:e,description:n,subtype:i,traceback:r,expanded:s,i:a,onChange:c}){const f=E.useCallback(()=>{c(s?null:a)},[a,s,c]),d=i==="internal"?"warning.main":"error.main";return S.jsxs(eW,{expanded:s,onChange:f,elevation:0,disableGutters:!0,children:[S.jsx(uW,{expandIcon:S.jsx(Sf,{}),sx:{alignItems:"center",p:0,color:d},children:S.jsxs(oX,{container:!0,direction:"row",alignItems:"center",children:[S.jsx(rc,{id:t,type:"icon",sx:{pt:.6,color:d},children:S.jsx(G7,{})}),i!=="root"&&S.jsx(Et,{color:"textSecondary",sx:{p:1,pb:.5},children:i==="internal"?"Internal kalong error:":i==="cause"?"Caused by":"Issued from"}),S.jsx(Et,{variant:"h6",component:"span",children:S.jsx(hn,{value:e,mode:"text"})}),S.jsx(Et,{variant:"subtitle1",component:"span",children:S.jsx(hn,{value:" ― ",mode:"text"})}),S.jsx(Et,{component:"span",children:S.jsx(hn,{value:n,mode:"text"})})]})}),S.jsx(xf,{}),S.jsx(rW,{sx:{p:0},children:S.jsx(y1,{children:r.map((p,m)=>S.jsx(lP,{divider:m!==r.length-1,children:S.jsx(aP,{primary:S.jsxs(S.Fragment,{children:[S.jsxs(Et,{display:"inline",color:"textSecondary",children:[" ","In"," "]}),S.jsx(Et,{display:"inline",children:p.function}),S.jsxs(Et,{display:"inline",color:"textSecondary",children:[" ","at line"," "]}),S.jsx(Et,{display:"inline",children:p.lineNumber}),S.jsxs(Et,{display:"inline",color:"textSecondary",children:[" ","of"," "]}),S.jsx(Ds,{title:p.absoluteFilename,children:S.jsx(Et,{display:"inline",children:p.filename})})]}),secondary:S.jsx(hn,{value:p.lineSource||"?"})})},p.key))})})]})}function HG({causes:t,...e}){const[n,i]=E.useState(-1),r=[e,...t||[]];return S.jsx(S.Fragment,{children:r.map((s,a)=>S.jsx(IG,{i:a,expanded:n===a,onChange:i,...s},s.id))})}const VG=yt(S.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}));var ev={},tv,lE;function hP(){if(lE)return tv;lE=1;function t(e){if(e&&e.__esModule)return e;var n={};if(e!=null){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,i):{};r.get||r.set?Object.defineProperty(n,i,r):n[i]=e[i]}}return n.default=e,n}return tv=t,tv}var Ao={},nv,aE;function WG(){if(aE)return nv;aE=1;function t(e){return e&&e.__esModule?e:{default:e}}return nv=t,nv}var Ud,cE;function XG(){if(cE)return Ud;cE=1;function t(){return Ud=t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},t.apply(this,arguments)}return Ud=t,Ud}var iv,uE;function GG(){if(uE)return iv;uE=1;function t(e,n){if(e==null)return{};var i={},r=Object.keys(e),s,a;for(a=0;a<r.length;a++)s=r[a],!(n.indexOf(s)>=0)&&(i[s]=e[s]);return i}return iv=t,iv}var rv,fE;function FG(){if(fE)return rv;fE=1;var t=GG();function e(n,i){if(n==null)return{};var r=t(n,i),s,a;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(a=0;a<c.length;a++)s=c[a],!(i.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(r[s]=n[s])}return r}return rv=e,rv}var ov,hE;function YG(){if(hE)return ov;hE=1;function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}return ov=t,ov}var sv,dE;function KG(){if(dE)return sv;dE=1;function t(n,i){for(var r=0;r<i.length;r++){var s=i[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(n,s.key,s)}}function e(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}return sv=e,sv}var Ou,pE;function ZG(){if(pE)return Ou;pE=1;function t(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(r){return typeof r}:t=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t(n)}function e(n){return typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?Ou=e=function(r){return t(r)}:Ou=e=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":t(r)},e(n)}return Ou=e,Ou}var lv,mE;function JG(){if(mE)return lv;mE=1;function t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}return lv=t,lv}var av,gE;function eF(){if(gE)return av;gE=1;var t=ZG(),e=JG();function n(i,r){return r&&(t(r)==="object"||typeof r=="function")?r:e(i)}return av=n,av}var Id,yE;function tF(){if(yE)return Id;yE=1;function t(e){return Id=t=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},t(e)}return Id=t,Id}var Hd,vE;function nF(){if(vE)return Hd;vE=1;function t(e,n){return Hd=t=Object.setPrototypeOf||function(r,s){return r.__proto__=s,r},t(e,n)}return Hd=t,Hd}var cv,bE;function iF(){if(bE)return cv;bE=1;var t=nF();function e(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),i&&t(n,i)}return cv=e,cv}var uv,OE;function dP(){if(OE)return uv;OE=1;var t=function(){};return uv=t,uv}var fv={},hv,SE;function jm(){if(SE)return hv;SE=1;function t(e){return e&&e.__esModule?e:{default:e}}return hv=t,hv}var Su={},xE;function rF(){if(xE)return Su;xE=1;var t=jm();Object.defineProperty(Su,"__esModule",{value:!0}),Su.default=void 0;var e=t(Qs());t(dP());var n=function(s){s.index;var a=s.children;e.default.Children.count(a)},i=n;return Su.default=i,Su}var Vd={},xu={},wE;function pP(){if(wE)return xu;wE=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.default=void 0;var t={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return xu.default=t,xu}var CE;function oF(){if(CE)return Vd;CE=1;var t=jm();Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.default=i;var e=t(Qs()),n=t(pP());function i(r){var s=r.children,a=r.startIndex,c=r.startX,f=r.pageX,d=r.viewLength,p=r.resistance,m=e.default.Children.count(s)-1,v=a+(c-f)/d,b;return p?v<0?v=Math.exp(v*n.default.RESISTANCE_COEF)-1:v>m&&(v=m+1-Math.exp((m-v)*n.default.RESISTANCE_COEF)):v<0?(v=0,b=(v-a)*d+f):v>m&&(v=m,b=(v-a)*d+f),{index:v,startX:b}}return Vd}var wu={},TE;function sF(){if(TE)return wu;TE=1;var t=jm();Object.defineProperty(wu,"__esModule",{value:!0}),wu.default=void 0;var e=t(Qs()),n=function(s,a){var c=!1,f=function(O){return O?O.key:"empty"};if(s.children.length&&a.children.length){var d=e.default.Children.map(s.children,f),p=d[s.index];if(p!=null){var m=e.default.Children.map(a.children,f),v=m[a.index];p===v&&(c=!0)}}return c},i=n;return wu.default=i,wu}var Cu={},kE;function lF(){if(kE)return Cu;kE=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.default=void 0;function t(n,i){var r=n%i;return r<0?r+i:r}var e=t;return Cu.default=e,Cu}var EE;function aF(){return EE||(EE=1,(function(t){var e=jm();Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"checkIndexBounds",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"computeIndex",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"constant",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"getDisplaySameSlide",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"mod",{enumerable:!0,get:function(){return a.default}});var n=e(rF()),i=e(oF()),r=e(pP()),s=e(sF()),a=e(lF())})(fv)),fv}var AE;function cF(){if(AE)return Ao;AE=1;var t=hP(),e=WG();Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.getDomTreeShapes=k,Ao.findNativeHandler=z,Ao.default=Ao.SwipeableViewsContext=void 0;var n=e(XG()),i=e(FG()),r=e(YG()),s=e(KG()),a=e(eF()),c=e(tF()),f=e(iF()),d=t(Qs());e(V4()),e(dP());var p=aF();function m(M,j,N,A){return M.addEventListener(j,N,A),{remove:function(){M.removeEventListener(j,N,A)}}}var v={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},b={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(j){return"translate(".concat(-j,"%, 0)")},"x-reverse":function(j){return"translate(".concat(j,"%, 0)")},y:function(j){return"translate(0, ".concat(-j,"%)")},"y-reverse":function(j){return"translate(0, ".concat(j,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function O(M,j){var N=j.duration,A=j.easeFunction,Q=j.delay;return"".concat(M," ").concat(N," ").concat(A," ").concat(Q)}function x(M,j){var N=b.rotationMatrix[j];return{pageX:N.x[0]*M.pageX+N.x[1]*M.pageY,pageY:N.y[0]*M.pageX+N.y[1]*M.pageY}}function C(M){return M.touches=[{pageX:M.pageX,pageY:M.pageY}],M}function k(M,j){for(var N=[];M&&M!==j&&M!==document.body&&!M.hasAttribute("data-swipeable");){var A=window.getComputedStyle(M);A.getPropertyValue("position")==="absolute"||A.getPropertyValue("overflow-x")==="hidden"?N=[]:(M.clientWidth>0&&M.scrollWidth>M.clientWidth||M.clientHeight>0&&M.scrollHeight>M.clientHeight)&&N.push({element:M,scrollWidth:M.scrollWidth,scrollHeight:M.scrollHeight,clientWidth:M.clientWidth,clientHeight:M.clientHeight,scrollLeft:M.scrollLeft,scrollTop:M.scrollTop}),M=M.parentNode}return N}var $=null;function z(M){var j=M.domTreeShapes,N=M.pageX,A=M.startX,Q=M.axis;return j.some(function(T){var U=N>=A;(Q==="x"||Q==="y")&&(U=!U);var q=Math.round(T[b.scrollPosition[Q]]),V=q>0,L=q+T[b.clientLength[Q]]<T[b.scrollLength[Q]];return U&&L||!U&&V?($=T.element,!0):!1})}var D=d.createContext();Ao.SwipeableViewsContext=D;var R=(function(M){(0,f.default)(j,M);function j(N){var A;return(0,r.default)(this,j),A=(0,a.default)(this,(0,c.default)(j).call(this,N)),A.rootNode=null,A.containerNode=null,A.ignoreNextScrollEvents=!1,A.viewLength=0,A.startX=0,A.lastX=0,A.vx=0,A.startY=0,A.isSwiping=void 0,A.started=!1,A.startIndex=0,A.transitionListener=null,A.touchMoveListener=null,A.activeSlide=null,A.indexCurrent=null,A.firstRenderTimeout=null,A.setRootNode=function(Q){A.rootNode=Q},A.setContainerNode=function(Q){A.containerNode=Q},A.setActiveSlide=function(Q){A.activeSlide=Q,A.updateHeight()},A.handleSwipeStart=function(Q){var T=A.props.axis,U=x(Q.touches[0],T);A.viewLength=A.rootNode.getBoundingClientRect()[b.length[T]],A.startX=U.pageX,A.lastX=U.pageX,A.vx=0,A.startY=U.pageY,A.isSwiping=void 0,A.started=!0;var q=window.getComputedStyle(A.containerNode),V=q.getPropertyValue("-webkit-transform")||q.getPropertyValue("transform");if(V&&V!=="none"){var L=V.split("(")[1].split(")")[0].split(","),X=window.getComputedStyle(A.rootNode),Y=x({pageX:parseInt(L[4],10),pageY:parseInt(L[5],10)},T);A.startIndex=-Y.pageX/(A.viewLength-parseInt(X.paddingLeft,10)-parseInt(X.paddingRight,10))||0}},A.handleSwipeMove=function(Q){if(!A.started){A.handleTouchStart(Q);return}if(!($!==null&&$!==A.rootNode)){var T=A.props,U=T.axis,q=T.children,V=T.ignoreNativeScroll,L=T.onSwitching,X=T.resistance,Y=x(Q.touches[0],U);if(A.isSwiping===void 0){var K=Math.abs(Y.pageX-A.startX),le=Math.abs(Y.pageY-A.startY),_=K>le&&K>p.constant.UNCERTAINTY_THRESHOLD;if(!X&&(U==="y"||U==="y-reverse")&&(A.indexCurrent===0&&A.startX<Y.pageX||A.indexCurrent===d.Children.count(A.props.children)-1&&A.startX>Y.pageX)){A.isSwiping=!1;return}if(K>le&&Q.preventDefault(),_===!0||le>p.constant.UNCERTAINTY_THRESHOLD){A.isSwiping=_,A.startX=Y.pageX;return}}if(A.isSwiping===!0){Q.preventDefault(),A.vx=A.vx*.5+(Y.pageX-A.lastX)*.5,A.lastX=Y.pageX;var G=(0,p.computeIndex)({children:q,resistance:X,pageX:Y.pageX,startIndex:A.startIndex,startX:A.startX,viewLength:A.viewLength}),se=G.index,W=G.startX;if($===null&&!V){var ce=k(Q.target,A.rootNode),ne=z({domTreeShapes:ce,startX:A.startX,pageX:Y.pageX,axis:U});if(ne)return}W?A.startX=W:$===null&&($=A.rootNode),A.setIndexCurrent(se);var he=function(){L&&L(se,"move")};(A.state.displaySameSlide||!A.state.isDragging)&&A.setState({displaySameSlide:!1,isDragging:!0},he),he()}}},A.handleSwipeEnd=function(){if($=null,!!A.started&&(A.started=!1,A.isSwiping===!0)){var Q=A.state.indexLatest,T=A.indexCurrent,U=Q-T,q;Math.abs(A.vx)>A.props.threshold?A.vx>0?q=Math.floor(T):q=Math.ceil(T):Math.abs(U)>A.props.hysteresis?q=U>0?Math.floor(T):Math.ceil(T):q=Q;var V=d.Children.count(A.props.children)-1;q<0?q=0:q>V&&(q=V),A.setIndexCurrent(q),A.setState({indexLatest:q,isDragging:!1},function(){A.props.onSwitching&&A.props.onSwitching(q,"end"),A.props.onChangeIndex&&q!==Q&&A.props.onChangeIndex(q,Q,{reason:"swipe"}),T===Q&&A.handleTransitionEnd()})}},A.handleTouchStart=function(Q){A.props.onTouchStart&&A.props.onTouchStart(Q),A.handleSwipeStart(Q)},A.handleTouchEnd=function(Q){A.props.onTouchEnd&&A.props.onTouchEnd(Q),A.handleSwipeEnd(Q)},A.handleMouseDown=function(Q){A.props.onMouseDown&&A.props.onMouseDown(Q),Q.persist(),A.handleSwipeStart(C(Q))},A.handleMouseUp=function(Q){A.props.onMouseUp&&A.props.onMouseUp(Q),A.handleSwipeEnd(C(Q))},A.handleMouseLeave=function(Q){A.props.onMouseLeave&&A.props.onMouseLeave(Q),A.started&&A.handleSwipeEnd(C(Q))},A.handleMouseMove=function(Q){A.props.onMouseMove&&A.props.onMouseMove(Q),A.started&&A.handleSwipeMove(C(Q))},A.handleScroll=function(Q){if(A.props.onScroll&&A.props.onScroll(Q),Q.target===A.rootNode){if(A.ignoreNextScrollEvents){A.ignoreNextScrollEvents=!1;return}var T=A.state.indexLatest,U=Math.ceil(Q.target.scrollLeft/Q.target.clientWidth)+T;A.ignoreNextScrollEvents=!0,Q.target.scrollLeft=0,A.props.onChangeIndex&&U!==T&&A.props.onChangeIndex(U,T,{reason:"focus"})}},A.updateHeight=function(){if(A.activeSlide!==null){var Q=A.activeSlide.children[0];Q!==void 0&&Q.offsetHeight!==void 0&&A.state.heightLatest!==Q.offsetHeight&&A.setState({heightLatest:Q.offsetHeight})}},A.state={indexLatest:N.index,isDragging:!1,renderOnlyActive:!N.disableLazyLoading,heightLatest:0,displaySameSlide:!0},A.setIndexCurrent(N.index),A}return(0,s.default)(j,[{key:"componentDidMount",value:function(){var A=this;this.transitionListener=m(this.containerNode,"transitionend",function(Q){Q.target===A.containerNode&&A.handleTransitionEnd()}),this.touchMoveListener=m(this.rootNode,"touchmove",function(Q){A.props.disabled||A.handleSwipeMove(Q)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){A.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(A){var Q=A.index;typeof Q=="number"&&Q!==this.props.index&&(this.setIndexCurrent(Q),this.setState({displaySameSlide:(0,p.getDisplaySameSlide)(this.props,A),indexLatest:Q}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var A=this;return{slideUpdateHeight:function(){A.updateHeight()}}}},{key:"setIndexCurrent",value:function(A){if(!this.props.animateTransitions&&this.indexCurrent!==A&&this.handleTransitionEnd(),this.indexCurrent=A,this.containerNode){var Q=this.props.axis,T=b.transform[Q](A*100);this.containerNode.style.WebkitTransform=T,this.containerNode.style.transform=T}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var A=this,Q=this.props;Q.action;var T=Q.animateHeight,U=Q.animateTransitions,q=Q.axis,V=Q.children,L=Q.containerStyle,X=Q.disabled;Q.disableLazyLoading;var Y=Q.enableMouseEvents;Q.hysteresis,Q.ignoreNativeScroll,Q.index,Q.onChangeIndex,Q.onSwitching,Q.onTransitionEnd,Q.resistance;var K=Q.slideStyle,le=Q.slideClassName,_=Q.springConfig,G=Q.style;Q.threshold;var se=(0,i.default)(Q,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),W=this.state,ce=W.displaySameSlide,ne=W.heightLatest,he=W.indexLatest,Se=W.isDragging,ke=W.renderOnlyActive,xe=X?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},Re=!X&&Y?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{},Pe=(0,n.default)({},v.slide,K),at,qe;if(Se||!U||ce)at="all 0s ease 0s",qe="all 0s ease 0s";else if(at=O("transform",_),qe=O("-webkit-transform",_),ne!==0){var ct=", ".concat(O("height",_));at+=ct,qe+=ct}var At={height:null,WebkitFlexDirection:b.flexDirection[q],flexDirection:b.flexDirection[q],WebkitTransition:qe,transition:at};if(!ke){var Ke=b.transform[q](this.indexCurrent*100);At.WebkitTransform=Ke,At.transform=Ke}return T&&(At.height=ne),d.createElement(D.Provider,{value:this.getSwipeableViewsContext()},d.createElement("div",(0,n.default)({ref:this.setRootNode,style:(0,n.default)({},b.root[q],G)},se,xe,Re,{onScroll:this.handleScroll}),d.createElement("div",{ref:this.setContainerNode,style:(0,n.default)({},At,v.container,L),className:"react-swipeable-view-container"},d.Children.map(V,function(nt,Ze){if(ke&&Ze!==he)return null;var dt,Ve=!0;return Ze===he&&(Ve=!1,T&&(dt=A.setActiveSlide,Pe.overflowY="hidden")),d.createElement("div",{ref:dt,style:Pe,className:le,"aria-hidden":Ve,"data-swipeable":"true"},nt)}))))}}]),j})(d.Component);R.displayName="ReactSwipableView",R.propTypes={},R.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var B=R;return Ao.default=B,Ao}var RE;function uF(){return RE||(RE=1,(function(t){var e=hP();Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"SwipeableViewsContext",{enumerable:!0,get:function(){return n.SwipeableViewsContext}});var n=e(cF())})(ev)),ev}var fF=uF();const hF=jb(fF),ME="1em",Wd="3px";function mP({cls:{id:t,name:e,bases:n},first:i,root:r}){return S.jsxs(rt,{sx:{display:"flex",alignItems:"center"},children:[!r&&S.jsxs(rt,{sx:{display:"flex",flexDirection:"column",width:ME,alignSelf:"normal"},children:[S.jsx(rt,{sx:{flex:1,borderLeft:i?"none":`${Wd} solid black`,borderBottom:`${Wd} solid black`}}),S.jsx(rt,{sx:{flex:1,borderLeft:i?"none":`${Wd} solid black`}})]}),S.jsx(rt,{sx:{m:.5},children:S.jsx(rc,{id:t,type:"chip",label:e,color:["object","type"].includes(e)?void 0:"secondary"})}),!!n.length&&S.jsx(rt,{sx:{borderBottom:`${Wd} solid black`,width:ME}}),S.jsx(rt,{sx:{display:"flex",flexDirection:"column"},children:n.map((s,a)=>S.jsx(mP,{cls:s,first:a===0,last:a===n.length-1},s.id))})]})}function v1({id:t,value:e}){return S.jsx(rc,{id:t,children:S.jsx(hn,{value:e})})}function dF({attributes:t,doc:e,source:n,infos:i}){const[r,s]=E.useState(0),a=E.useCallback((c,f)=>s(f),[s]);return S.jsxs(rt,{children:[S.jsxs(UG,{value:r,onChange:a,indicatorColor:"secondary",textColor:"secondary",variant:"scrollable",scrollButtons:"auto",children:[S.jsx(_d,{label:"infos",value:0}),Object.entries(t).sort(()=>1).map(([c],f)=>S.jsx(_d,{label:c,value:f+1},c)),e&&S.jsx(_d,{label:"documentation",value:Object.keys(t).length+1}),n&&S.jsx(_d,{label:"source",value:Object.keys(t).length+2})]}),S.jsxs(hF,{axis:"x",index:r,onChangeIndex:s,children:[S.jsx(rt,{sx:{maxHeight:"400px"},children:S.jsx(Db,{children:S.jsxs(Pb,{children:[i.type?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Type"}),S.jsx(Kt,{children:S.jsx($m,{label:i.type,sx:{m:.5}})})]}):null,i.bases?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Bases"}),S.jsx(Kt,{children:S.jsx(mP,{cls:i.bases,root:!0})})]}):null,i.mro?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"MRO"}),S.jsx(Kt,{children:i.mro.map(({id:c,type:f})=>S.jsx(rc,{id:c,type:"chip",label:f.trim(),sx:{m:.5},color:["object","type"].includes(f)?void 0:"secondary"},f))})]}):null,i.signature?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Signature"}),S.jsx(Kt,{children:S.jsx(hn,{value:i.signature})})]}):null,i.fqn?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Full Qualified Name"}),S.jsx(Kt,{children:i.fqn})]}):null,S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Identity"}),S.jsxs(Kt,{children:[i.id," (0x",i.id.toString(16),")"]})]}),i.online_doc?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Online documentation"}),S.jsx(Kt,{children:S.jsxs(Mb,{href:i.online_doc,target:"_blank",rel:"noopener noreferrer",children:[i.fqn||i.type," ",S.jsx(VG,{fontSize:"small"})]})})]}):null,i.file?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Declared in file"}),S.jsxs(Kt,{children:[i.file,i.source_size?` (${i.source_size} lines)`:""]})]}):null,i.comments?S.jsxs(Wi,{children:[S.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Comments"}),S.jsx(Kt,{children:S.jsx(hn,{value:i.comments,mode:"text"})})]}):null]})})}),Object.entries(t).map(([c,f])=>S.jsx(rt,{sx:{maxHeight:"400px"},children:S.jsx(Db,{children:S.jsx(Pb,{children:f.map(({key:d,value:p,id:m,signature:v})=>S.jsxs(Wi,{children:[S.jsxs(Kt,{sx:{wordBreak:"normal"},align:"right",children:[d,S.jsx(rt,{component:"span",sx:{color:"text.secondary"},children:v})]}),S.jsx(Kt,{children:S.jsx(v1,{value:p,id:m})})]},d))})})},c)),S.jsx(rt,{sx:{p:3,fontSize:".7em",maxHeight:"400px"},children:S.jsx(hn,{value:e,mode:"text"})}),S.jsx(rt,{sx:{p:3,fontSize:".9em",maxHeight:"400px"},children:S.jsx(hn,{value:n})})]})]})}const pF=yt(S.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),gP=yt(S.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),yP=yt(S.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),mF=yt(S.jsx("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})),gF=yt(S.jsx("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}));function vP({subtype:t,values:e,id:n,mapping:i}){const r=Math.max(Math.min(50,e.length/5),20),s=Math.min(e.length,r),[a,c]=E.useState(!0),[f,d]=E.useState(s),p=E.useCallback(()=>d(k=>Math.min(e.length,k+r)),[r,e.length]),m=E.useCallback(()=>d(k=>k===0?s:0),[s]),v=E.useCallback(()=>d(e.length),[e.length]),b=E.useCallback(()=>c(k=>!k),[]),O={list:"[",set:"{",tuple:"(",dict:"{"}[t]||`${t}(${i?"{":"["}`,x={list:"]",set:"}",tuple:")",dict:"}"}[t]||`${i?"}":"]"})`,C=e.slice(0,f);return S.jsxs(rt,{sx:{m:1,p:1,transition:"250ms ease-in-out box-shadow","&:hover":{boxShadow:"0 0 5px rgba(0, 0, 0, .125)"}},children:[!!e.length&&S.jsxs(Et,{sx:{fontSize:"0.7em",fontStyle:"italic"},color:"textSecondary",component:"span",children:["(",e.length,")"," "]}),S.jsx(rc,{id:n,children:S.jsx(hn,{mode:"text",value:O})}),!!e.length&&S.jsx(Bn,{onClick:m,sx:{p:.5},size:"large",children:f===0?S.jsx(gF,{sx:{fontSize:"16px"}}):S.jsx(mF,{sx:{fontSize:"16px"}})}),S.jsxs(rt,{component:"section",sx:{pl:a&&C.length>1?1:void 0,display:a&&C.length>1?void 0:"inline"},children:[C.map((k,$)=>S.jsxs(rt,{component:"span",sx:{whiteSpace:"pre"},children:[i?S.jsxs(S.Fragment,{children:[S.jsx(pp,{...k.key}),S.jsx(hn,{mode:"text",value:": "}),S.jsx(pp,{...k.value})]}):S.jsx(pp,{...k}),$+1!==e.length&&S.jsx(hn,{mode:"text",value:", "}),a&&C.length>1&&S.jsx("br",{})]},`member-${n}-${$}`)),e.length>C.length&&S.jsxs(rt,{component:"span",sx:{whiteSpace:"pre"},children:[S.jsx(Bn,{onClick:p,sx:{p:.5},size:"large",children:S.jsx(gP,{sx:{fontSize:"16px"}})}),S.jsxs(tP,{sx:{color:"text.secondary"},size:"small",component:"span",onClick:p,children:[e.length-C.length," more"]}),e.length>C.length+r&&S.jsx(Bn,{onClick:v,sx:{p:.5},size:"large",children:S.jsx(yP,{sx:{fontSize:"16px"}})})]})]}),S.jsxs(rc,{id:n,children:[e.length===1&&O==="("&&S.jsx(hn,{mode:"text",value:","}),S.jsx(hn,{mode:"text",value:x})]}),C.length>1&&S.jsx(Bn,{onClick:b,sx:{p:.5},size:"large",children:a?S.jsx(pF,{sx:{fontSize:"16px"}}):S.jsx(Sf,{sx:{fontSize:"16px"}})})]})}function yF(t){return S.jsx(vP,{mapping:!0,...t})}function vF({text:t}){return S.jsx(hn,{value:t,mode:"text"})}function bF({value:t}){return t}function OF({columns:t,rows:e}){return S.jsxs(Db,{children:[S.jsx(gG,{children:S.jsx(Wi,{children:t.map(n=>S.jsx(Kt,{children:n},n))})}),S.jsx(Pb,{children:e.map((n,i)=>S.jsx(Wi,{children:t.map((r,s)=>S.jsx(Kt,{children:n[r].value?S.jsx(v1,{value:n[r].value,id:n[r].id}):null},s))},i))})]})}const SF={out:vF,err:X7,obj:v1,diff:W7,table:OF,inspect:dF,iterable:vP,mapping:yF,exception:HG,raw:bF};function pp({type:t,...e}){const n=SF[t];return S.jsx(n,{...e})}const xF=E.memo(function({uid:e,answer:n,duration:i,prompt:r,command:s,frame:a,level:c,watching:f}){const d=Ls(),[p,m]=E.useState(!0),[v,b]=E.useState(!1),x=Ut(j=>j.frames).find(({key:j})=>j===a),C=Ut(j=>j.activeFrame),k=E.useCallback(()=>m(j=>!j),[]),$=E.useCallback(()=>b(j=>!j),[]),z=E.useCallback(()=>{navigator.clipboard?.writeText(r)},[r]),D=E.useCallback(()=>d(CB(e,f==="frame"?"all":f==="all"?null:"frame")),[d,e,f]),R=E.useCallback(()=>d(YE(e,r,s,C)),[C,s,d,r,e]),B=E.useCallback(()=>d(Nb(a)),[d,a]),M=E.useCallback(()=>{d(ZE(e))},[d,e]);return S.jsxs(KD,{sx:{m:1,ml:1+c*4,display:"flex",flexDirection:"column",opacity:a===C?1:.75,filter:x?"none":"grayscale(50%)",transition:j=>j.transitions.create(["opacity","box-shadow"])},children:[S.jsx(ZD,{sx:{".MuiCardHeader-content":{minWidth:0}},avatar:S.jsxs(S.Fragment,{children:[S.jsx(Bn,{sx:j=>({transform:`rotate(${p?180:0}deg)`,marginLeft:"auto",transition:j.transitions.create("transform",{duration:j.transitions.duration.shortest})}),onClick:k,size:"small",children:S.jsx(Sf,{})}),s&&S.jsx($m,{label:s})]}),title:S.jsx(Ds,{title:r,children:S.jsx(hn,{sx:{p:.5},value:r,noBreak:!0})}),titleTypographyProps:{variant:"h5",noWrap:!0},action:S.jsxs(S.Fragment,{children:[S.jsx(Bn,{sx:j=>({transform:`rotate(${v?-90:90}deg)`,marginLeft:"auto",transition:j.transitions.create("transform")}),onClick:$,size:"small",children:S.jsx(Sf,{})}),S.jsx(Ss,{mountOnEnter:!0,unmountOnExit:!0,in:v,sx:{display:"inline-flex"},orientation:"horizontal",children:S.jsx(Bn,{onClick:z,size:"small",children:S.jsx(VV,{})})}),x?S.jsx(Ss,{mountOnEnter:!0,unmountOnExit:!0,in:v,sx:{display:"inline-flex"},orientation:"horizontal",children:S.jsx(Ds,{title:`${x.absoluteFilename}:${x.lineNumber}`,children:S.jsx(Bn,{onClick:B,size:"small",children:S.jsx(WV,{})})})}):null,S.jsx(Ss,{mountOnEnter:!0,unmountOnExit:!0,in:v,sx:{display:"inline-flex"},orientation:"horizontal",children:S.jsx(Bn,{onClick:R,size:"small",children:S.jsx(XV,{})})}),S.jsx(Ss,{mountOnEnter:!0,unmountOnExit:!0,in:v||f,sx:{display:"inline-flex"},orientation:"horizontal",children:S.jsx(Bn,{onClick:D,size:"small",sx:{color:f==="all"?"warning.main":f==="frame"?"info.main":void 0},children:S.jsx(GV,{})})}),S.jsx(Bn,{onClick:M,size:"large",children:S.jsx(YD,{})})]})}),!!(n&&n.length)&&S.jsxs(S.Fragment,{children:[S.jsx(xf,{}),S.jsx(Ss,{in:p,timeout:"auto",unmountOnExit:!0,sx:{position:"relative","&::after":{content:'""',pointerEvents:"none",position:"absolute",top:0,left:"-100%",width:"300%",height:"100%",boxShadow:"0 0 20px 10px #fff inset"}},children:S.jsxs(t7,{sx:{display:"flex",maxHeight:"50vh",overflow:"auto"},children:[S.jsx(Et,{variant:"body1",sx:{minWidth:0,px:2,py:0,flex:1},component:"div",children:n.map((j,N)=>S.jsx(pp,{...j},N))}),i?S.jsx(hn,{value:H7(i)}):null]})})]})]})});function wF(t,e){switch(e.type){case"search":return{...t,value:"",reverse:e.reverse,insensitive:e.insensitive,index:e.index};case"found":return{...t,value:e.value,notFound:!1,highlight:e.highlight,index:e.index};case"empty":return{...t,value:"",notFound:!1,highlight:null,index:0};case"not-found":return{...t,value:e.value,notFound:!0,highlight:null};case"reset":return{value:null,insensitive:!1,reverse:!1,notFound:!1,highlight:null,index:0};default:throw new Error}}const CF={value:null,reverse:!1,insensitive:!1,notFound:!1,highlight:null,index:0},b1=(t,...e)=>{let n="",i="",r=!1;for(;t.i<t.str.length&&!(e.includes(t.str[t.i])&&!i&&!r);)i&&t.str[t.i]===i?i="":!i&&!r&&["'",'"'].includes(t.str[t.i])&&(i=t.str[t.i]),!r&&!i&&t.str[t.i]==="#"&&(r=!0),r&&t.str[t.i]===`
|
|
228
|
-
`&&(r=!1),t.str[t.i]==="\\"&&(r||(n+=t.str[t.i]),t.i++),r||(n+=t.str[t.i]),t.i++;return n},bP=t=>{let e=[];if(t.str[t.i]==="("){let n=t.str[t.i];for(t.i++;t.i<t.str.length&&t.str[t.i]!==")";)if(t.str[t.i]==="(")e=[...e,...bP(t)],n+=e.slice(-1)[0];else{const i=b1(t,"(",",",")");n+=i,i.trim()&&e.push(i.trim()),t.str[t.i]===","&&(n+=t.str[t.i],t.i++)}t.str[t.i]===")"&&(n+=t.str[t.i],t.i++),e.push(n)}return e},TF=(t,e)=>{let n=[];const i={str:t,i:0};for(;i.i<i.str.length;)b1(i,"("),n=[...n,...bP(i)],i.i++;return n},DE=t=>{const e={str:t,i:0};return[b1(e,"?").trim(),t.slice(e.i+1).trim()]},zb={h:"help",i:"inspect",d:"diff",t:"table",r:"recursive_debug"},$b="≏",Bb="⌅";function kF(t,e){const n=(()=>{switch(e.type){case"new-value":return{...t,index:-1,value:e.value,transientValue:e.value,passive:!1};case"handle-up":return{...t,index:Math.min(t.index+1,e.history.length-1),value:e.history[Math.min(t.index+1,e.history.length-1)]||"",command:null,passive:!0};case"handle-down":return{...t,index:Math.max(t.index-1,-1),value:e.history[Math.max(t.index-1,-1)]||t.transientValue,command:null,passive:!0};case"jump":return{...t,index:e.index,value:e.value,command:null,passive:!0};case"toggle-command":return{...t,command:t.command===e.command?null:e.command};case"remove-command":return{...t,command:null};case"reset":return{index:-1,value:"",transientValue:"",command:null,passive:!0};default:throw new Error}})();if(n.value){const i=n.value.match(/^\?(\S+)(.*)/);if(i){const[,r,s]=i;Object.values(zb).includes(r)&&(n.value=s.trim(),n.command=r)}if(n.command==="diff"&&!n.value.includes($b)){const[r,s]=DE(n.value);s&&(n.value=`${r} ${$b} ${s}`)}else if(n.command==="table"&&!n.value.includes(Bb)){const[r,s]=DE(n.value);s&&(n.value=`${r} ${Bb} ${s}`)}}return n}const EF={index:-1,value:"",transientValue:"",command:null,passive:!0},Tr=({title:t,children:e})=>S.jsx("kbd",{style:{display:"inline-block",padding:"0.2em 0.4em",fontSize:"0.85em",fontFamily:'"Fira Code", monospace',lineHeight:1.5,color:"#444",verticalAlign:"middle",backgroundColor:"#f7f7f9",border:"1px solid #ccc",borderRadius:"3px",boxShadow:"inset 0 -1px 0 #ccc"},title:t,children:e}),Tu=()=>S.jsx(Tr,{title:"Shift",children:"⇧"}),xa=()=>S.jsx(Tr,{title:"Ctrl",children:"Ctrl"}),ll=()=>S.jsx(Tr,{title:"Alt",children:"Alt"}),AF=()=>S.jsx(Tr,{title:"Backspace",children:"⌫"}),PE=()=>S.jsx(Tr,{title:"ArrowUp",children:"↑"}),zE=()=>S.jsx(Tr,{title:"ArrowDown",children:"↓"}),RF=()=>S.jsx(Tr,{title:"PageUp",children:"⇞"}),MF=()=>S.jsx(Tr,{title:"PageDown",children:"⇟"}),DF=()=>S.jsx(Tr,{title:"Space",children:"⎵"}),PF=()=>S.jsx(Tr,{title:"Tab",children:"⭾"}),jr=({chr:t})=>S.jsx(Tr,{title:t,children:t}),Gn=({children:t})=>S.jsx("code",{style:{fontFamily:'"Fira Code", monospace',display:"inline-block",padding:"0.2em 0.4em",lineHeight:1.5,color:"black",verticalAlign:"middle",whiteSpace:"nowrap"},children:t}),dv=({children:t})=>S.jsx("div",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:t}),yn=({shortcut:t,children:e})=>S.jsxs("div",{style:{display:"flex",margin:"0.25em",padding:"0.5em",alignItems:"center",justifyContent:"space-between",background:"#f7f7f9"},children:[S.jsx("div",{style:{display:"flex",flexDirection:"column"},children:t}),S.jsx("div",{style:{fontSize:"1.2em",marginLeft:"1em",textAlign:"right"},children:e})]}),vn=({children:t})=>S.jsx("div",{style:{whiteSpace:"nowrap"},children:t});function zF(){return S.jsxs("aside",{style:{paddingBottom:"16px",fontSize:".9em"},children:[S.jsxs("h2",{children:["Welcome to Kalong v",OP]}),S.jsx("p",{children:S.jsx("strong",{children:"Keyboard shortcuts"})}),S.jsxs(dv,{children:[S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsx(vn,{children:S.jsx(PE,{})}),S.jsx(vn,{children:S.jsx(zE,{})})]}),children:"Scroll through history"}),S.jsx(yn,{shortcut:S.jsxs(vn,{children:[S.jsx(Tu,{})," + ",S.jsx(AF,{})]}),children:"Remove last answer"}),S.jsx(yn,{shortcut:S.jsx(vn,{children:S.jsx(PF,{})}),children:"Indent or complete"}),S.jsx(yn,{shortcut:S.jsxs(vn,{children:[S.jsx(xa,{})," + ",S.jsx(DF,{})]}),children:"Complete (with info)"}),S.jsx(yn,{shortcut:S.jsxs(vn,{children:[S.jsx(xa,{})," + ",S.jsx(jr,{chr:"c"})]}),children:"Clear prompt"}),S.jsx(yn,{shortcut:S.jsxs(vn,{children:[S.jsx(xa,{})," + ",S.jsx(jr,{chr:"d"})]}),children:"On empty prompt, close the terminal"}),S.jsx(yn,{shortcut:S.jsxs(vn,{children:[S.jsx(xa,{})," + ",S.jsx(jr,{chr:"l"})]}),children:"Clear screen"}),S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsxs(vn,{children:[S.jsx(xa,{})," + ",S.jsx(Tu,{})," + ",S.jsx(jr,{chr:"r"})]}),S.jsxs(vn,{children:[S.jsx(xa,{})," + ",S.jsx(Tu,{})," + ",S.jsx(jr,{chr:"s"})]})]}),children:"Search command history (case insensitive)"}),S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsxs(vn,{children:[S.jsx(Tu,{})," + ",S.jsx(RF,{})]}),S.jsxs(vn,{children:[S.jsx(Tu,{})," + ",S.jsx(MF,{})]})]}),children:"Scroll through scrollback"}),S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(PE,{})]}),S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(zE,{})]})]}),children:"Complete from history arguments"})]}),S.jsx("p",{children:S.jsx("strong",{children:"Commands"})}),S.jsxs(dv,{children:[S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsx(Gn,{children:"?help"}),S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(jr,{chr:"h"})]})]}),children:"Show this help message"}),S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsx(Gn,{children:"?inspect <value>"}),S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(jr,{chr:"i"})]})]}),children:"Inspect a value"}),S.jsx(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsx(Gn,{children:"?recursive_debug <expression>"}),S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(jr,{chr:"r"})]})]}),children:"Step into expression using recursive debugging"}),S.jsxs(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsx(Gn,{children:"?diff <v1> ? <v2>"}),S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(jr,{chr:"d"})]})]}),children:["Show the diff between two values repr: ",S.jsx(Gn,{children:"<v1>"}),","," ",S.jsx(Gn,{children:"<v2>"}),S.jsx("br",{}),"The '?' separator will be replaced by the separator:"," ",$b]}),S.jsxs(yn,{shortcut:S.jsxs(S.Fragment,{children:[S.jsx(Gn,{children:"?table <it> ? <p1>, <p2>.."}),S.jsxs(vn,{children:[S.jsx(ll,{})," + ",S.jsx(jr,{chr:"t"})]})]}),children:["Make a table iterating ",S.jsx(Gn,{children:"<it>"})," and listing"," ",S.jsx(Gn,{children:"<pn>"})," paths on it. A path contain one or more dict key, list index or object attribute name separated by dots."," ",S.jsx("br",{}),"(i.e attr.0.key)",S.jsx("br",{}),"The '?' separator will be replaced by the separator:"," ",Bb]})]}),S.jsx("p",{children:S.jsx("strong",{children:"Special values"})}),S.jsxs(dv,{children:[S.jsxs(yn,{shortcut:S.jsx(Gn,{children:"_"}),children:["Last result (",S.jsx(Gn,{children:"__"})," if ",S.jsx(Gn,{children:"_"})," is in scope)"]}),S.jsx(yn,{shortcut:S.jsx(Gn,{children:"__kalong_current_frame__"}),children:"Current debugged frame"}),S.jsx(yn,{shortcut:S.jsx(Gn,{children:"__kalong_return_value__"}),children:"While returning from a function, the return value"}),S.jsx(yn,{shortcut:S.jsx(Gn,{children:"__kalong_exception__"}),children:"While in exception, the exception tuple"})]})]})}const qa=new EventTarget,$F={module:"namespace",class:"class",instance:"variable",function:"function",param:"interface",path:"text",keyword:"keyword",property:"property",statement:"constant"},BF=t=>({token:e=>{t.lastIndex=e.pos;const n=t.exec(e.string);if(n&&n.index===e.pos)return e.pos+=n[0].length||1,"searching";n?e.pos=n.index:e.skipToEnd()}}),jF=de.theme({"&,& .cm-content, & .cm-tooltip.cm-tooltip-autocomplete > ul ":{fontFamily:'"Fira Code", monospace'},"&.cm-editor.cm-focused":{outline:"none"},"& .cm-tooltip":{fontSize:"0.75em"}}),QF=de.theme({"& .cm-cursor":{width:"12px",border:"none",outline:"1px solid rgba(0, 0, 0, .5)",display:"block"},"&.cm-focused .cm-cursor":{background:"rgba(0, 0, 0, .75)",animation:"blink 1.5s ease-in-out infinite",outline:0}}),$E=[PO(),V5(),DO(),qM(),Ye.allowMultipleSelections.of(!0),l5(),IO(HO,{fallback:!0}),S5(),L5(),t1(),UM(),d1(),de.lineWrapping,GD,jF,No.of([...e1,...s1,...r1,...UO,...km,...f1]),c1()];function LF({onScrollUp:t,onScrollDown:e,scrollToBottom:n}){const i=E.useRef(),r=E.useRef(),s=Ut(W=>W.history),a=Ut(W=>W.scrollback),c=Ut(W=>W.activeFrame),f=Ut(W=>W.recursionLevel),d=Ls(),[p,m]=E.useReducer(kF,EF),[v,b]=E.useReducer(wF,CF);E.useEffect(()=>{const W=({keyCode:ne})=>{if(ne!==13)return;const he=getSelection().toString();if(he){const Se=zu();d(ty(Se,he,null,c,f))}},ce=({key:ne,target:he})=>{if(!r.current?.view.dom.contains(he)&&i.current?.view){const{view:Se}=i.current;if(Se.hasFocus||document.activeElement.tagName==="INPUT")return;(ne.length===1||ne==="Spacebar")&&Se.dispatch(Se.state.replaceSelection(ne==="Spacebar"?" ":ne)),Se.focus()}};return window.addEventListener("keydown",W),window.addEventListener("keyup",ce),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",ce)}},[c,d,f]);const O=E.useCallback((W,ce)=>{n(),ce.selectionSet&&m({type:"new-value",value:W})},[n]),x=!!p.value&&!p.command;E.useEffect(()=>{qa.dispatchEvent(new CustomEvent("state",{detail:{ready:x}}))},[x]),E.useEffect(()=>{const W=()=>{const ce=zu();d(ty(ce,p.value,"condition",c,f))};return qa.addEventListener("condition",W),()=>qa.removeEventListener("condition",W)},[c,d,p.value,f]);const C=E.useCallback(W=>{if(W.state&&Ad(W.state)==="active")return!1;if(!p.value)return!0;const ce=zu();return d(ty(ce,p.value,p.command,c,f)),m({type:"reset"}),!0},[c,d,p.command,p.value,f]),k=E.useMemo(()=>Object.entries(zb).reduce((W,[ce,ne])=>(W[ce]=()=>m({type:"toggle-command",command:ne}),W),{}),[m]);E.useEffect(()=>{if(p.command==="help"){const W=zu();d({type:"SET_PROMPT",key:W,frame:null,...p}),d({type:"SET_ANSWER",key:W,frame:null,duration:0,...p,answer:[{type:"raw",value:S.jsx(zF,{})}]}),m({type:"reset"})}},[d,p]);const $=E.useCallback(W=>Ad(W.state)==="active"?!1:(m({type:"handle-up",history:s}),!0),[s]),z=E.useCallback(W=>Ad(W.state)==="active"?!1:(m({type:"handle-down",history:s}),!0),[s]),D=E.useCallback(()=>{if(n(),i.current?.view){i.current.view.focus();const W=i.current.view.state.doc.length;i.current.view.dispatch({selection:{anchor:W,head:W}})}},[i]),R=E.useCallback(W=>{if(W.state.selection.main.head===0&&p.command)return m({type:"remove-command"}),!0},[p.command]),B=E.useCallback(()=>{if(a.length)return d(ZE(a.slice(-1)[0].key)),!0},[d,a]),M=E.useCallback(()=>(m({type:"remove-command"}),!0),[]),j=E.useCallback(W=>{W.state.selection.main.from!==W.state.selection.main.to?window.document.execCommand("copy"):m({type:"reset"})},[]),N=E.useCallback(()=>{if(!p.value)return d(pv("kill")),!0},[d,p.value]),A=E.useCallback(()=>(d(TB()),!0),[d]),Q=E.useCallback((W,ce,ne=null)=>{if(ce&&!ce.selectionSet)return;if(!W){b({type:"empty"});return}const he=new RegExp(W.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),`g${v.insensitive?"i":""}`);ne=ne===null?v.index:ne;const ke=(v.reverse?s.slice(ne):[...s].sort(()=>-1).slice(s.length-ne-1)).findIndex(Re=>Re&&Re.match(he));if(ke===-1){b({type:"not-found",value:W});return}const xe=v.reverse?ne+ke:ne-ke;b({type:"found",value:W,highlight:BF(he),index:xe}),m({type:"jump",index:xe,value:s[xe]})},[s,v]),T=E.useCallback(W=>()=>{const ce=W.reset?W.reverse?p.index===-1?0:p.index:p.index===-1?s.length-1:p.index:W.reverse?v.index+1:v.index-1;return b({type:"search",reverse:W.reverse||!1,insensitive:W.insensitive||!1,reset:W.reset||!1,history:s,index:ce}),Q(v.value,null,ce),!0},[Q,s,p.index,v.index,v.value]),U=E.useCallback(()=>{b({type:"reset"}),i.current&&i.current.view.focus()},[i]),[q,V]=E.useState(null),L=E.useCallback((W,ce)=>{const ne=s.reduce((Re,Pe)=>[...Re,...TF(Pe)],[]),he=ce==="up"?0:s.length-1,Se=q!==null&&(ce==="up"?q+1:q-1),ke=W.state.selection.main.from===W.state.selection.main.to||q===null?he:Se,xe=ne[ke];xe?(W.dispatch(W.state.replaceSelection(xe)),W.dispatch({selection:{anchor:W.state.selection.main.head-xe.length,head:W.state.selection.main.head}}),V(ke)):W.dispatch(W.state.replaceSelection(""))},[s,q,V]),X=E.useCallback(W=>{L(W,"up")},[L]),Y=E.useCallback(W=>{L(W,"down")},[L]),K=E.useCallback(async W=>{let ce=W.matchBefore(/[\w?]*/);if(ce.from===ce.to&&!W.explicit)return null;const ne=W.state.doc.lineAt(W.state.selection.main.head),he=W.state.doc.lineAt(ce.from),Se=W.state.doc.lineAt(ce.to),ke={line:ne.number-1,ch:W.state.selection.main.head-ne.from},xe={line:he.number-1,ch:ce.from-he.from},Re={line:Se.number-1,ch:ce.to-Se.from};if(!p.value.includes(" ")&&p.value.startsWith("?"))return{from:ce.from,options:Object.values(zb).map(at=>({label:`?${at}`,type:"namespace"}))};d(EB(p.value,xe,Re,ke,c));const Pe=await Promise.race([new Promise(at=>setTimeout(()=>at([]),5e3)),new Promise(at=>{const qe=Vu.subscribe(()=>{const{suggestions:{prompt:ct,from:At,to:Ke,suggestion:nt}}=Vu.getState();ct===p.value&&xe.line===At.line&&xe.ch===At.ch&&Re.line===Ke.line&&Re.ch===Ke.ch&&(at(nt.list||[]),qe())})})]);return{from:ce.from,options:Pe.map(({text:at,docstring:qe,type:ct})=>({label:at,info:W.explicit&&qe,type:$F[ct]||ct}))}},[c,d,p.value]),le=E.useCallback(W=>{const ce=W.state.selection.main.head;return p.value.slice(0,ce).split(`
|
|
229
|
-
`).slice(-1)[0].match(/^\s*$/)?!1:(Ad(W.state)==="active"?z5(W):cp(W),!0)},[p.value]),_=a.length===0||a.slice(-1)[0].answer!==null||f>0,G=E.useMemo(()=>[Zr.highest(No.of([{key:"ArrowUp",run:$,preventDefault:!0},{key:"ArrowDown",run:z,preventDefault:!0},{key:"Enter",run:C,preventDefault:!0},{key:"Backspace",run:R,preventDefault:!0},{key:"Shift-Backspace",run:B,preventDefault:!0},{key:"Tab",run:le,preventDefault:!0},{key:"Ctrl-c",run:j,preventDefault:!0},{key:"Ctrl-d",run:N,preventDefault:!0},{key:"Ctrl-l",run:A,preventDefault:!0},{key:"Ctrl-r",run:T({reverse:!0,reset:!0}),preventDefault:!0},{key:"Ctrl-s",run:T({reset:!0}),preventDefault:!0},{key:"Shift-Ctrl-r",run:T({reverse:!0,insensitive:!0,reset:!0}),preventDefault:!0},{key:"Shift-Ctrl-s",run:T({insensitive:!0,reset:!0}),preventDefault:!0},{key:"Shift-PageUp",run:t,preventDefault:!0},{key:"Shift-PageDown",run:e,preventDefault:!0},{key:"Alt-ArrowUp",run:X,preventDefault:!0},{key:"Alt-ArrowDown",run:Y,preventDefault:!0},...Object.entries(k).map(([W,ce])=>({key:`Alt-${W}`,run:ce,preventDefault:!0}))])),t1({override:[K]}),QF,...$E],[K,R,A,k,N,z,C,Y,X,j,B,T,le,$,e,t]),se=E.useMemo(()=>[de.domEventHandlers({blur:U}),Zr.highest(No.of([{key:"Enter",run:U,preventDefault:!0},{key:"Escape",run:U,preventDefault:!0},{key:"Ctrl-r",run:T({reverse:!0}),preventDefault:!0},{key:"Ctrl-s",run:T({}),preventDefault:!0},{key:"Shift-Ctrl-r",run:T({reverse:!0,insensitive:!0}),preventDefault:!0},{key:"Shift-Ctrl-s",run:T({insensitive:!0}),preventDefault:!0}])),...$E],[T,U]);return E.useEffect(()=>{if(i.current?.view&&p.passive){const{view:W}=i.current;W.dispatch({selection:{anchor:p.value.length}})}},[p.value,p.passive]),S.jsx(Ju,{in:_,exit:!1,mountOnEnter:!0,unmountOnExit:!0,onEntered:D,children:S.jsx(KD,{raised:!0,sx:{m:1,ml:1+f*4},children:S.jsx(ZD,{avatar:S.jsxs(S.Fragment,{children:[S.jsx(Bn,{sx:W=>({transform:`rotate(${_?270:0}deg)`,marginLeft:"auto",transition:W.transitions.create("transform",{duration:W.transitions.duration.shortest})}),onClick:C,size:"small",children:S.jsx(Sf,{})}),p.command&&S.jsx($m,{label:p.command,onDelete:M})]}),title:S.jsxs(S.Fragment,{children:[S.jsx(Gp,{ref:i,value:p.value,basicSetup:!1,theme:"light",onChange:O,onCreateEditor:n,height:"auto",extensions:G,width:"100%"}),v.value!==null&&S.jsxs(rt,{component:"label",sx:{fontSize:".5em",color:v.notFound?"error.main":"text.secondary",display:"flex",alignItems:"center"},children:[S.jsxs(rt,{component:"span",sx:{px:0,py:.5},children:[v.insensitive&&"I-","Search"," ",v.reverse?"backward":"forward",":"]}),S.jsx(Gp,{ref:r,value:v.value,height:"auto",autoFocus:!0,basicSetup:!1,extensions:se,width:"100%",onChange:Q})]})]}),titleTypographyProps:{variant:"h5"}})})})}const NF=(function(){const e=Ut(a=>a.scrollback),n=E.useRef(),i=E.useCallback(()=>{n.current.scrollTop-=300},[n]),r=E.useCallback(()=>{n.current.scrollTop+=300},[n]),s=E.useCallback(()=>{n.current.scrollTop=n.current.scrollHeight},[]);return S.jsxs(rt,{sx:{flex:1,overflowY:"auto",scrollBehavior:"smooth"},ref:n,children:[S.jsxs(Et,{variant:"h6",sx:{pt:1,px:2,fontSize:"0.75em",color:"#999"},children:["Type ",S.jsx("code",{style:{fontWeight:600},children:"?help"})," to get some help"]}),e.map(({key:a,...c})=>S.jsx(xF,{uid:a,...c},a)),S.jsx(LF,{onScrollUp:i,onScrollDown:r,scrollToBottom:s})]})});function _F(){const t=ZA("(min-aspect-ratio: 1/1)"),e=Ut(r=>r.frames),n=Ut(r=>r.activeFrame),i=e.find(({key:r})=>r===n);return S.jsxs(rt,{component:"main",sx:r=>({flexGrow:1,display:"flex",flexDirection:"column",zIndex:r.zIndex.drawer+1,minWidth:0}),children:[S.jsx(rt,{sx:r=>r.mixins.toolbar}),S.jsxs(BV,{vertical:t,children:[i?S.jsx(PV,{currentFile:i}):null,S.jsx(NF,{})]})]})}const qF=yt(S.jsx("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})),UF=E.memo(function({frame:e,last:n}){const i=Ut(a=>a.activeFrame),r=Ls(),s=E.useCallback(()=>{r(Nb(e.key))},[r,e.key]);return S.jsx(lP,{secondaryAction:e.active&&S.jsx(Ds,{title:"Current Frame",children:S.jsx(Bn,{edge:"end","aria-label":"comments",onClick:s,children:S.jsx(qF,{fontSize:"small"})})}),disablePadding:!0,children:S.jsx(bX,{divider:!n,selected:e.key===i,onClick:s,children:S.jsx(aP,{primary:e.function,secondary:S.jsxs(S.Fragment,{children:[S.jsx(hn,{value:e.lineSource}),S.jsx(Ds,{title:e.absoluteFilename,children:S.jsxs(Et,{variant:"body2",display:"block",component:"span",noWrap:!0,children:[e.filename,":",e.lineNumber]})})]})})})})});function IF(){const t=Ut(r=>r.frames),e=Ut(r=>r.activeFrame),n=E.useRef(),i=Ls();return E.useEffect(()=>{t.length&&i(Nb(t[0].key))},[i,t]),E.useEffect(()=>{if(n.current){const r=n.current.querySelectorAll(".Mui-selected");r.length&&V7(r[0])}},[e]),S.jsx(y1,{ref:n,sx:{p:0},children:t.map((r,s)=>S.jsx(UF,{frame:r,last:s===t.length-1},r.key))})}const Xd=240;function HF({rtl:t,open:e,mobile:n,onDrawerClose:i}){return S.jsxs(rX,{sx:r=>({width:{sm:Xd,md:e?Xd:0},"& .MuiPaper-root":{width:{sm:Xd,md:e?Xd:0}},flexShrink:{sm:0,md:null},transition:r.transitions.create("width",{easing:r.transitions.easing.sharp,duration:r.transitions.duration[e?"enteringScreen":"leavingScreen"]}),overflow:e?void 0:"hidden"}),open:e,variant:n?"temporary":"persistent",anchor:t?"right":"left",onClose:i,children:[S.jsx(rt,{sx:r=>({...r.mixins.toolbar,display:"flex"}),children:S.jsxs(rt,{sx:{p:1,display:"flex",alignItems:"baseline",width:"100%",justifyContent:"space-around",userSelect:"none"},children:[S.jsx(Mb,{href:"http://github.com/paradoxxxzero/kalong/",underline:"hover",children:S.jsxs(Et,{variant:"h1",sx:{fontSize:"2.25em","&:hover span":{display:"inline-block","&.K":{transform:"rotate3d(0, 0, 1, -90deg) translate(-8.5px, 0px)",textDecoration:"none"},"&.o":{transform:"rotate3d(0, 1, 0, 180deg)",textDecoration:"underline"},transformOrigin:"center"}},children:[S.jsx(rt,{component:"span",className:"K",sx:{transform:"rotate3d(0, 1, 0, 0deg)",transition:"transform 500ms",marginLeft:"-1px"},children:"K"}),"al",S.jsx(rt,{component:"span",className:"o",sx:{transform:"rotate3d(0, 1, 0, 0deg)",transition:"transform 500ms",marginLeft:"-1px"},children:"o"}),"ng"]})}),S.jsx(Mb,{href:"http://github.com/paradoxxxzero/kalong/releases",underline:"hover",children:S.jsxs(Et,{variant:"subtitle1",sx:{fontSize:"1.25em"},children:["v",OP]})})]})}),S.jsx(xf,{}),S.jsx(IF,{})]})}const BE=yt(S.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),jE=yt(S.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),VF=yt(S.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})),WF=yt(S.jsx("path",{d:"M5 17h14v2H5zm7-12L5.33 15h13.34z"})),XF=yt(S.jsx("path",{d:"m4 18 8.5-6L4 6zm9-12v12l8.5-6z"})),GF=yt(S.jsx("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"})),FF=yt(S.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})),YF=yt(S.jsx("path",{d:"M8 5v14l11-7z"})),KF=yt(S.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"})),ZF=yt(S.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})),JF=yt(S.jsx("path",{d:"m19 15-1.41-1.41L13 18.17V2h-2v16.17l-4.59-4.59L5 15l7 7z"})),eY=yt(S.jsx("path",{d:"M19 9h-2v6.59L5.41 4 4 5.41 15.59 17H9v2h10z"})),tY=yt(S.jsx("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"})),nY=yt(S.jsx("path",{d:"M13.05 9.79 10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zM11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62M5.69 7.1 4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9M4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89m1.61 6.74C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62zM22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12"})),QE=(t,e,n)=>[{label:"Pause the program",action:"pause",Icon:FF,key:"F8",disabled:!t||!e,hidden:!t||!e},{label:"Continue the program",action:"continue",Icon:YF,key:"F8",disabled:t,hidden:t,menu:"continue"},{label:"Continue till condition",action:"continueCondition",key:"Alt+F8",Icon:nY,disabled:t,hidden:t||!n,menu:"continue"},{label:"Step to the next instruction",action:"step",Icon:VF,key:"F9",disabled:t},{label:"Step Until next line (bypass loops)",action:"stepUntil",Icon:KF,key:"F10",disabled:t},{label:"Step Into function call",action:"stepInto",Icon:tY,key:"F11",disabled:t,menu:"stepInto"},{label:"Step Into function call (all)",action:"stepIntoAll",Icon:JF,key:"Ctrl+F11",disabled:t,menu:"stepInto"},{label:"Step Into function call (public only)",action:"stepIntoPublic",Icon:eY,key:"Alt+F11",disabled:t,menu:"stepInto"},{label:"Step Out of the current function",action:"stepOut",Icon:GF,key:"Shift+F11",disabled:t},{label:"Trace the program (stop at every exception)",action:"trace",Icon:ZF,key:"Shift+F12",disabled:t},{label:"Run the program",action:"run",Icon:XF,key:"F12",disabled:t},{label:"Stop debugging",action:"stop",Icon:WF,key:"Escape",disabled:t},{label:"Exit program",action:"kill",Icon:YD,key:"Shift+Escape",disabled:!1}],iY=({action:{label:t,action:e,disabled:n,Icon:i},handleCommand:r})=>S.jsxs(KX,{onClick:r,disabled:n,"data-action":e,children:[S.jsx(MX,{children:S.jsx(i,{})}),S.jsx(Et,{variant:"inherit",noWrap:!0,children:t})]}),rY=({action:{key:t,label:e,action:n,disabled:i,Icon:r},handleCommand:s,handleMenu:a})=>S.jsx(Ds,{title:`${e} [${t}]`,children:S.jsxs(Bn,{color:"inherit",onClick:s,onContextMenu:a,disabled:i,"data-action":n,size:"large",children:[S.jsx(r,{}),a&&S.jsx(gP,{fontSize:"small",sx:{position:"absolute",top:"1.5em",left:"1.75em",width:"0.6em"}})]})}),oY=(function({mobile:e}){const n=Ut(j=>j.title),i=Ut(j=>j.frames),r=Ut(j=>j.running),s=Ut(j=>j.recursionLevel),a=Ut(j=>j.main),c=Ut(j=>j.activeFrame),[f,d]=E.useState({stepInto:"stepInto",continue:"continue"}),[p,m]=E.useState(!1);E.useEffect(()=>{const j=({detail:N})=>{m(N.ready)};return qa.addEventListener("state",j),()=>qa.removeEventListener("state",j)},[]);const v=QE(r,a,p),b=v.reduce((j,N)=>(N.menu&&!N.hidden&&(j[N.menu]||(j[N.menu]=[]),j[N.menu].push(N.action)),j),{});E.useEffect(()=>{const j={};Object.entries(b).forEach(([N,A])=>{f[N]&&!A.includes(f[N])&&(j[N]=A[0])}),Object.keys(j).length&&d(N=>({...N,...j}))},[b,f]);const O=Ls(),[x,C]=E.useState(null),k=E.useCallback(j=>{const N=j.currentTarget.getAttribute("data-action");N==="continueCondition"?qa.dispatchEvent(new CustomEvent("condition")):O(pv(N,c))},[c,O]),$=(j,N)=>{const A=b[j],Q=A.findIndex(T=>T===N);return A[(Q+1)%A.length]},z=j=>N=>{d(A=>({...A,[j]:$(j,A[j])})),N.preventDefault()};E.useEffect(()=>{const j=N=>{let{code:A}=N;N.shiftKey&&(A=`Shift+${A}`),N.altKey&&(A=`Alt+${A}`),N.ctrlKey&&(A=`Ctrl+${A}`);const Q=QE(r).find(({key:T,disabled:U})=>!U&&A===T);Q&&(O(pv(Q.action,c)),N.preventDefault())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[r,O,c]);const D=E.useCallback(()=>C(null),[]),R=E.useCallback(({currentTarget:j})=>C(j),[]);E.useLayoutEffect(()=>{!e&&x&&D()});const B=e?iY:rY,M=v.map(j=>!j.hidden&&(e||!j.menu||f[j.menu]===j.action)&&S.jsx(B,{action:j,handleCommand:k,handleMenu:j.menu&&b[j.menu].length>1?z(j.menu):void 0},j.action));return S.jsxs(S.Fragment,{children:[S.jsxs(Et,{variant:"h6",color:"inherit",noWrap:!0,children:[s?`${"(".repeat(s)} `:"",n,s?` ${")".repeat(s)}`:""]}),!!i.length&&S.jsxs(S.Fragment,{children:[S.jsx(rt,{sx:{flexGrow:1}}),e?S.jsxs(S.Fragment,{children:[S.jsx(Bn,{onClick:R,size:"large",children:S.jsx(yP,{color:"inherit"})}),S.jsx(WX,{anchorEl:x,open:!!x,onClose:D,children:M})]}):S.jsx(rt,{sx:{whiteSpace:"pre"},children:M})]})]})}),LE=240;function sY({rtl:t,open:e,mobile:n,onDrawerOpen:i,onDrawerClose:r}){return S.jsx(pW,{sx:s=>({zIndex:s.zIndex.drawer+2,transition:`${s.transitions.create(["margin","width"],{easing:s.transitions.easing.sharp,duration:s.transitions.duration[e&&!n?"enteringScreen":"leavingScreen"]})},${s.transitions.create(["background-color","color"],{easing:s.transitions.easing.easeInOut,duration:s.transitions.duration.normal})}`,width:e&&!n?`calc(100% - ${LE}px)`:void 0,marginLeft:e&&!n?LE:void 0}),position:"fixed",children:S.jsxs(OG,{children:[S.jsx(Ds,{title:`${e?"Close":"Open"} the call stack`,children:S.jsx(Bn,{color:"inherit",onClick:e?r:i,sx:{mr:2.5},size:"large",children:!n&&e?t?S.jsx(jE,{}):S.jsx(BE,{}):t?S.jsx(BE,{}):S.jsx(jE,{})})}),S.jsx(oY,{mobile:n})]})})}function lY(){const t=xr(),e=ZA(t.breakpoints.down("md")),n=Ls(),i=Ut(d=>d.running),r=Ut(d=>d.frames),[s,a]=E.useState(!e);E.useEffect(()=>{n(gB())},[n]),E.useEffect(()=>{a(!e&&!!r.length)},[e,r]);const c=E.useCallback(()=>a(!0),[]),f=E.useCallback(()=>a(!1),[]);return S.jsxs(rt,{sx:{display:"flex",width:"100vw",height:"100vh",justifyContent:"center",fontVariant:"oldstyle-nums",transition:"filter 500ms ease-in",filter:i?"grayscale(100%)":void 0},children:[S.jsx(FA,{styles:{"@global":{"@font-face":[{fontFamily:"Fira Code",fontWeight:"normal",fontStyle:"normal",src:`url(${KQ}) format("opentype")`},{fontFamily:"Fira Code",fontWeight:"bold",fontStyle:"normal",src:`url(${YQ}) format("opentype")`}]}}}),S.jsx(FQ,{}),S.jsx(sY,{mobile:e,open:s,rtl:t.direction==="rtl",onDrawerOpen:c,onDrawerClose:f}),S.jsx(HF,{mobile:e,open:s,rtl:t.direction==="rtl",onDrawerClose:f}),S.jsx(_F,{}),S.jsx(UN,{sx:{position:"fixed",right:"1em",bottom:"1em"}})]})}const al=t=>mm({palette:{action:{selectedOpacity:.15},primary:{main:t},secondary:{main:GA.A400},neutral:{main:iO[700]}},mixins:{toolbar:{minHeight:56,"@media (min-width:600px)":{minHeight:64}}}}),NE={init:al(cl[500]),line:al(ul[600]),call:al(NQ[500]),return:al(_Q[700]),exception:al(qQ[500]),shell:al(LQ[500]),dead:al(iO[600])};function aY(){const t=Ut(e=>e.theme);return S.jsx(G4,{injectFirst:!0,children:S.jsx(QQ,{theme:NE[t]||NE.line,children:S.jsx(lY,{})})})}Vu.subscribe(()=>{localStorage.setItem("history",JSON.stringify(Vu.getState().history))});q$.createRoot(document.getElementById("root")).render(S.jsx(rB,{store:Vu,children:S.jsx(aY,{})}));const OP="0.5.3";
|